Skip to content

This little library helps you to handle multiple bootbox modals an the same time.

Notifications You must be signed in to change notification settings

AcTiv3MineD/Bootbox-Dialog-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Documentation

This little library works very simple, it just helps you to handle multiple bootbox modals an the same time. This is very useful when you have multiple bootbox insttances called from callbacks, for example a modal with a prompt, followed by a modal with some kind of form and followed with a bootbox confirmation. Allowing you to manipulate each modal individually as you desire from wherever you want in your code.

Methods

add

dialog_manager.add(
    'sample_dialog',
    bootbox.dialog( {
        title: 'Hi, i am a custom dialog!',
        message: '<p><i class="fa fa-spin fa-spinner"></i> Watch me spinning...</p>'
    } )
);

To use bootbox_dialog_manager.js we need to specify the dialog identification and the dialog object itself.

get

var dialog = dialog_manager.get( 'sample_dialog' );

This will get you the dialog object itself for you to implement som bootbox methods on it.

remove

var dialog = dialog_manager.remove( 'sample_dialog' );

This will remove the dialog if it exists.

remove_all

var dialog = dialog_manager.remove_all( );

This will remove all the registered dialogs.

About

This little library helps you to handle multiple bootbox modals an the same time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published