2015-02-11, 12:56 PM
Hello there !
I'm trying to understand how to use the MyBB js functions, but I fail.
I want to use MyBB.popupWindow to simply open a modal popup (for the imgur plugin next version), so I did:
In my imgur_popup template:
The button is:
And when I click my button, my popup content is added in the page but not showed (class modal is hidden).
I can't understand why it works fine for existing popups (smilies, buddylist, ...) and not for this.
Did I miss something ? I don't find any particular code for the smilies popup, but I'm sure there is one to do the modal:open...
Thanks by advance.
Regards,
CrazyCat
I'm trying to understand how to use the MyBB js functions, but I fail.
I want to use MyBB.popupWindow to simply open a modal popup (for the imgur plugin next version), so I did:
In my imgur_popup template:
<div class="modal">
<div style="overflow-y: auto; max-height: 400px;" class="modal_{$pid}">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead">Test imgur</td>
</tr>
<tr>
<td class="tcat">This is a test</td>
</tr>
</table>
</div>
</div>
The button is:
<a href="/misc.php?action=imgur" onclick="MyBB.popupWindow('/misc.php?action=imgur&popup=true&editor=MyBBEditor'); return false;">{$lang->imgur_open}</a>
And when I click my button, my popup content is added in the page but not showed (class modal is hidden).
I can't understand why it works fine for existing popups (smilies, buddylist, ...) and not for this.
Did I miss something ? I don't find any particular code for the smilies popup, but I'm sure there is one to do the modal:open...
Thanks by advance.
Regards,
CrazyCat