Bootstrap Extra Components 1.1.0 released

Announcements of the latest WebComponents for NGClient (shipped by the WebPackageManager)

Re: Bootstrap Extra Components 1.1.0 released

Postby rafig » Fri Jun 23, 2017 10:02 am

patrick wrote:As I thought: the media type does not support byte[]. I could add a property brandLogoDataprovider, then you could assign a form variable or something like that, but I think that's a bit over engineered. Your use case of setting a nav bar's brand logo from a record is maybe not the 90% use case...

Hi.
My ‘use case’ is that I want a client to be able to associate an image of their choosing that I am now getting them to store along with their organisation details & then in solution, if they change the ‘org’ it changes the logo…
(My client has two parts that I have termed organisations and in the solution someone at a higher level may want to change which org they are dealing with & illustrate by changing logo)
I'd be happy with a new property brandLogoDataprovider...

Thanks
Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Bootstrap Extra Components 1.1.0 released

Postby patrick » Fri Jun 23, 2017 1:34 pm

But since this logo is rather static, it doesn't feel wrong to create a media from it, does it?
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Bootstrap Extra Components 1.1.0 released

Postby rafig » Fri Jun 23, 2017 1:46 pm

patrick wrote:But since this logo is rather static, it doesn't feel wrong to create a media from it, does it?

Most of them it will be static, but if the client decides to change the logo they use for an org, I don't want to have to be changing media files on the server and I'm also using that table media on reports, so want it to come from the table ...

Also, I'm a bit confused :?
In my onLoad I put
Code: Select all
   var media = solutionModel.newMedia('mylogo',_to_organisation_default.logo);
   elements.navbar.brandLogo = 'media:///mylogo';

and that sets the correct image.
I have added a menu to the navbar with the list of organisations and an 'onDataChange' method to that menu.
Prior to this, this code changed the brandLogo correctly
Code: Select all
   switch (_to_organisation_default.name, 1)) {
   case 'Org2':
      elements.navbar.brandLogo = "media:///Org2Logo.png";
      break
   default:
      elements.navbar.brandLogo = "media:///OrgDefaultLogo.png";
   }

but now using this code, it doesn't work
Code: Select all
   // remove logo if it exists
   var removed = solutionModel.removeMedia('mylogo');
   // set logo to org logo
   var media = solutionModel.newMedia('mylogo',_to_organisation_default.logo);
   elements.navbar.brandLogo = 'media:///mylogo';

(followed by an application.updateUI...)
and the relationship which is based on a global is having it's global value changed (& if I console output the media column, it changes), as the org name which is setting brandName is changing also based on that relationship??
Not sure what I'm doing wrong or why it isn't working...
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Bootstrap Extra Components 1.1.0 released

Postby patrick » Fri Jun 23, 2017 2:03 pm

It could be that Servoy does not see the setting of brandLogo = 'media:///logo' as a change and therefore doesn't send anything to the client.

Try something like this instead:

Code: Select all
// set logo to org logo
var media = solutionModel.newMedia('logo_' + _to_organisation_default.organisation_id, _to_organisation_default.logo);
elements.navbar.brandLogo = 'media:///logo_' + _to_organisation_default.organisation_id;


This should give each org logo a unique name... (given that the ID of organisation is called "organisation_id").
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Bootstrap Extra Components 1.1.0 released

Postby patrick » Fri Jun 23, 2017 2:03 pm

Also, with this approach, there is no need to remove any media previously created...
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Bootstrap Extra Components 1.1.0 released

Postby rafig » Fri Jun 23, 2017 2:47 pm

patrick wrote:It could be that Servoy does not see the setting of brandLogo = 'media:///logo' as a change and therefore doesn't send anything to the client.

I think that must be the case...
patrick wrote:Try something like this instead:
This should give each org logo a unique name... (given that the ID of organisation is called "organisation_id").
Also, with this approach, there is no need to remove any media previously created...

as it now works great, thanks for the suggestion.
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Bootstrap Extra Components 1.2.5

Postby rafig » Mon Jun 25, 2018 7:35 pm

Hi,
I was just playing with the online demo (demo.servoy.com) & downloaded the bootstrapextracomponents sample from there, imported it & let it auto import the correct web packages, but the current release of Bootstrap Extra Components seems to be missing the 'badges' component??
Is there a reason or is it just a mistake?
Thanks
Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Bootstrap Extra Components 1.1.0 released

Postby rafig » Thu Jun 28, 2018 11:32 am

[^^BUMP^^]
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Bootstrap Extra Components 1.1.0 released

Postby patrick » Fri Jun 29, 2018 9:14 am

That is a know little problem and is fixed for the next release. You could also use the git source to fix this.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Bootstrap Extra Components 1.1.0 released

Postby rafig » Fri Jun 29, 2018 9:36 am

patrick wrote:That is a know little problem and is fixed for the next release. You could also use the git source to fix this.

Thanks Patrick...
I can probably wait for next release ;-)
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Bootstrap Extra Components 1.1.0 released

Postby rieder » Mon Jul 29, 2019 11:25 am

Hi

There was a question in this thread about the navbar, placed in the header part, where the menu items of the dropdown menu where not shown completely. They were cut off by the main part. Can anyone answer this question? We have the same problem. I tried to define the z-index of header, navbar etc.

Thanks and regards
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm

Previous

Return to Web Components

Who is online

Users browsing this forum: No registered users and 6 guests