modal not initialised
When using jQuery tabs the modal would not open. Also, if you have several tabs and need to open a modal (different one) in each tab, then currently you cannot specify that.
So first part of the issue is that in modal component apex:attribute for styleClass is available, but is never assigned to actual element. The importance of styleClass is that to open the modal you need to have attribute (e.g. on button): data-target="#myModal-1" (reference by id), yet c:modal cannot use dynamic id (like id="myModal-{!currentNum}"), so instead you could reference the modal by class (use data-target=".myModal-{!currentNUm}" and assign class to c:modal styleClass="myModal-{!currentNum}"). This fix would be easy I guess.
... <apex:attribute name="styleclass" type="String" description="The CSS style class to be used with the component" access="global" required="false"/>
<div class="modal fade {!styleclass}" id="{!id}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
The second part of this issue is that if page is re-rendered I reckon (I'm starter with jQuery and Bootstrap) the actions are not re-initialised and the modal would not open anymore. What I ended up doing was to include the bootstrap.min.js script directly (from static Visualstrap resource) and then call method directly from whichever button I needed like so $('.myDialog1').modal('show');
My apologies if this does not qualify as an issue for Visualstrap directly. Let me say it again - Visualstrap is cool!
Well I need few things from you
- Are you using jQuery UI tabs ? or Bootstrap tabs ?
- I think the modal documentation needs a update I will update the same
Hi, Sorry for the delay - I was away on holidays.
To elaborate on second issue: I have a page template which has all scripts to be included defined. On this template I also have <c:importvisualstrap theme="WHICHEVER" />
The actual page uses the template and has two jQuery (1.9.1.) UI tabs which are rerendered whenever you open any of them. The tricky part is that actual content of such tab is a component which then might have a dialog which fails when you open e.g. the tab the second time.
Hope this helps!