Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Suggestions:
generic jr5 js functions
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 08/21/13 14:30 
I realise that it's only used in a couple of places for the main modules, but why not make the modal form window a core js function, like this:

Code
function jrCore_modal_form(el)
{
    $('#' + el).modal({
        onOpen: function (dialog) {
            dialog.overlay.fadeIn(75, function () {
                dialog.container.slideDown(5, function () {
                    dialog.data.fadeIn(75);
                });
            });
        },
        onClose: function (dialog) {
            dialog.data.fadeOut('fast', function () {
                dialog.container.hide('fast', function () {
                    dialog.overlay.fadeOut('fast', function () {
                        $.modal.close();
                    });
                });
            });
        },
        overlayClose:true
    });
}

Otherwise it needs to be rewritten in the module js file for each time you might need to use it, or people need to write their own generic function (as above).

function jrCore_modal_form(el,speed) might work if people needed more control over the animation as well.


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 08/23/13 15:34 

SteveX:
I realise that it's only used in a couple of places for the main modules, but why not make the modal form window a core js function, like this:

Code
function jrCore_modal_form(el)
{
    $('#' + el).modal({
        onOpen: function (dialog) {
            dialog.overlay.fadeIn(75, function () {
                dialog.container.slideDown(5, function () {
                    dialog.data.fadeIn(75);
                });
            });
        },
        onClose: function (dialog) {
            dialog.data.fadeOut('fast', function () {
                dialog.container.hide('fast', function () {
                    dialog.overlay.fadeOut('fast', function () {
                        $.modal.close();
                    });
                });
            });
        },
        overlayClose:true
    });
}

Otherwise it needs to be rewritten in the module js file for each time you might need to use it, or people need to write their own generic function (as above).

function jrCore_modal_form(el,speed) might work if people needed more control over the animation as well.


The modal window support is already setup for you just by initializing it in the form create. Or are you talking about a "generic" modal window?

Thanks!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 08/23/13 16:07 
A more generic modal window - but how do you initialise it in the form create?


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 08/24/13 12:19 

SteveX:
A more generic modal window - but how do you initialise it in the form create?


Yeah it's automatic - I'm not at my system now, but check out the form create array in the view_jrCore_integrity_check function in the core index.php file and you'll see how it is done.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Suggestions

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.