saribe / eModal

Easy Modal for bootstrap, is a simple way to create modal dialogs using javascript.
http://saribe.github.io/eModal
271 stars 97 forks source link

Passing params to BS modal() function #7

Closed rebutatul closed 9 years ago

rebutatul commented 9 years ago

function build(message, params) should return: return $modal.modal(params);

instead of return $modal.modal(options);

saribe commented 9 years ago

Hi, the params and options are differents objects:

@params allowed elements: /// title {string}: The header title string. /// message {string|object}: The body message string or the html element. e,g: $(selector); /// subtitle {string}: The header subtitle string. This appear in a smaller text. /// size {string}: sm || lg -> define the modal size. /// loading {bool}: set loading progress as message. /// useBin {bool}: set message as recyclable. /// css {object}: css object try apply into message body; only able if message == string /// buttons {array}: An array of objects to configure buttons to modal footer; only able if message == string ///

and options is the bootstrap modal options,

if you need to set options you should use eModal.setModalOptions({...})

the {...} object will be used as default in all next modal dialogs...

Please let me know if you need help or some tune in eModal.js!