Using MyBB.popupWindow
#1
Exclamation 
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:
<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
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM or Discord
Reply


Messages In This Thread
Using MyBB.popupWindow - by Crazycat - 2015-02-11, 12:56 PM
RE: Using MyBB.popupWindow - by .m. - 2015-02-11, 01:25 PM
RE: Using MyBB.popupWindow - by Crazycat - 2015-02-11, 01:40 PM
RE: Using MyBB.popupWindow - by .m. - 2015-02-11, 01:48 PM
RE: Using MyBB.popupWindow - by Crazycat - 2015-02-11, 02:07 PM
RE: Using MyBB.popupWindow - by Crazycat - 2015-06-18, 08:51 AM
RE: Using MyBB.popupWindow - by martec - 2015-06-18, 01:26 PM
RE: Using MyBB.popupWindow - by Crazycat - 2015-06-18, 01:36 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)