Page 1 of 1

How to change options?

Posted: Thu Jul 11, 2019 7:35 pm
by Autoflow
I'm new to MetroUI CSS and i tried several things to change the caption of a window component programatically.
Without success.

Please could you leave a note how its possible to change ie. "clsCaption" of window component with Metro lib.

I create a default window instance:

Code: Select all

var win = Metro.window.create({clsCaption: 'ie. my-default-style'});
which i would like to update to an Alert-Window:

Code: Select all'window').win.attr('data-cls-caption', 'bg-red');
But it seems to me that the data observers are not working cause nothing changes.

Instead when i create a window by markup:

Code: Select all

<div class="window" data-role="window" data-cls-caption="bg-default">
and then change the caption by JS everything works fine.

Code: Select all

$('.window').attr('data-cls-caption', 'bg-red');
Many thanks!

Re: How to change options?

Posted: Thu Jul 11, 2019 8:11 pm
by olton
This is a bug for runtime method Metro.window.create(...). Please create issue on GitHub ( Thank you.

Re: How to change options?

Posted: Fri Jul 12, 2019 11:30 am
by olton

Re: How to change options?

Posted: Sat Jul 13, 2019 4:13 pm
by Autoflow
Hi Olton,
just wanted to post an issue ... :-)
Thank you very much for the fix.

Best regards,