source: firmaeventos/static/plugins/material-dialog/material-dialog.min.js @ 16cf088

Last change on this file since 16cf088 was 3996539, checked in by rudmanmrrod <rudman22@…>, 7 years ago

Renombrado utils como base, cambiado el template, quitados modelos no usados, agregado materialize

  • Property mode set to 100644
File size: 4.0 KB
Line 
1!function(t){t.Package?MaterialDialog={}:t.MaterialDialog={}}(window),MaterialDialog.templates={alert:"<div class='modal material-alert'><div class='modal-content'><h4 class='modal-title'></h4></div><div class='modal-footer'><div></div>",dialog:"<div class='modal material-dialog class_here'><div class='modal-content'><h4 class='modal-title'>title_here</h4></div><div class='modal-footer'><button class='btn modal-close confirm confirm_button_class'>confirm_button_text</button><button class='btn modal-close close close_button_class'>close_button_text</button><div></div>"},MaterialDialog.alert=function(t,e){t="undefined"!=typeof t?t:"",e="undefined"!=typeof e?e:{};var o='<button class="btn modal-close button_class close">button_text</button>',l=null,a=e;if("undefined"!=typeof e.buttons?"undefined"!=typeof e.buttons.close&&(o="undefined"!=typeof e.buttons.close.text?o.replace("button_text",e.buttons.close.text):o.replace("button_text","Close"),o="undefined"!=typeof e.buttons.close.className?o.replace("button_class",e.buttons.close.className):o.replace("button_class",""),"undefined"!=typeof e.buttons.close.modalClose&&(o=0==e.buttons.close.modalClose?o.replace("modal-close",""):o),"undefined"!=typeof e.buttons.close.callback&&(l=e.buttons.close.callback)):(o=o.replace("button_text","Close"),o=o.replace("button_class","")),e={title:"undefined"!=typeof e.title?e.title:"Alert",footer:"undefined"!=typeof e.footer?e.footer:"",button:o},$("body").append(this.templates.alert),$(".material-alert").find(".modal-title").last().html(e.title),$(".material-alert").find(".modal-content").last().append(t),$(".material-alert").find(".modal-footer").last().append(e.footer),$(".material-alert").find(".modal-footer").last().append(e.button),$(".material-alert").modal(a),$(".material-alert").last().modal("open"),l){var n=$(".material-alert .close").last();$(n).click(function(){l.call()})}},MaterialDialog.replace_close_button=function(t){return t=t.replace("close_button_text","Close"),t=t.replace("close_button_class","red")},MaterialDialog.replace_confirm_button=function(t){return t=t.replace("confirm_button_text","Confirm"),t=t.replace("confirm_button_class","")},MaterialDialog.dialog=function(t,e){t="undefined"!=typeof t?t:"",e="undefined"!=typeof e?e:{};var o=null,l=null,a=e,n=this.templates.dialog;if(n="undefined"!=typeof e.title?n.replace("title_here",e.title):n.replace("title_here","Dialog"),n="undefined"!=typeof e.modalType?n.replace("class_here",e.modalType):n.replace("class_here",""),"undefined"!=typeof e.buttons?("undefined"!=typeof e.buttons.close?(n="undefined"!=typeof e.buttons.close.text?n.replace("close_button_text",e.buttons.close.text):n.replace("close_button_text","Close"),n="undefined"!=typeof e.buttons.close.className?n.replace("close_button_class",e.buttons.close.className):n.replace("close_button_class",""),"undefined"!=typeof e.buttons.close.modalClose&&(n=0==e.buttons.close.modalClose?n.replace("modal-close close","close"):n),"undefined"!=typeof e.buttons.close.callback&&(o=e.buttons.close.callback)):n=this.replace_close_button(n),"undefined"!=typeof e.buttons.confirm?(n="undefined"!=typeof e.buttons.confirm.text?n.replace("confirm_button_text",e.buttons.confirm.text):n.replace("confirm_button_text","Confirm"),n="undefined"!=typeof e.buttons.confirm.className?n.replace("confirm_button_class",e.buttons.confirm.className):n.replace("confirm_button_class",""),"undefined"!=typeof e.buttons.confirm.modalClose&&(n=0==e.buttons.confirm.modalClose?n.replace("modal-close confirm","confirm"):n),"undefined"!=typeof e.buttons.confirm.callback&&(l=e.buttons.confirm.callback)):n=this.replace_confirm_button(n)):(n=this.replace_close_button(n),n=this.replace_confirm_button(n)),$("body").append(n),$(".material-dialog").find(".modal-content").last().append(t),$(".material-dialog").modal(a),$(".material-dialog").last().modal("open"),o){var s=$(".material-dialog .close").last();$(s).click(function(){o.call()})}if(l){var s=$(".material-dialog .confirm").last();$(s).click(function(){l.call()})}};
Note: See TracBrowser for help on using the repository browser.