We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This function was updated to support:
SW_UPDATE_NOTIFICATIONS_OPTIONS
widgetOnUpdateReady : function(buttonTitle, dialogButtonTitle, dialogContent, dialogTitle) { var k = 'mochiModalUpdateAvailable', c = this.__body.find('#'+k+'-container'), o, d, y, v; if (!c.length) { o = this.getOption('SW_UPDATE_NOTIFICATIONS_OPTIONS'); d = this.getDefaultOption('SW_UPDATE_NOTIFICATIONS_OPTIONS'); y = function(v){return (/^string|number$/.test(typeof v) && /\S/.test(v))}; v = {}; v.buttonTitle = $.trim( y( buttonTitle ) ? buttonTitle : ( y(o.buttonTitle) ? o.buttonTitle : d.buttonTitle )); v.dialogButtonTitle = $.trim( y( dialogButtonTitle ) ? dialogButtonTitle : ( y(o.dialogButtonTitle) ? o.dialogButtonTitle : d.dialogButtonTitle )); v.dialogContent = $.trim( y( dialogContent ) ? dialogContent : ( y(o.dialogContent) ? o.dialogContent : d.dialogContent )); v.dialogTitle = $.trim( y( dialogTitle ) ? dialogTitle : ( y(o.dialogTitle) ? o.dialogTitle : d.dialogTitle )); this.__body.append( '<div id="'+k+'-container">' + '<button type="button" class="btn btn-success" data-toggle="modal" data-target="#'+k+'">' + v.buttonTitle + '</button>' + '</div>' + '<div class="modal fade" id="'+k+'" tabindex="-1" role="dialog" aria-labelledby="'+k+'Label" aria-hidden="true">' + '<div class="modal-dialog modal-dialog-centered" role="document">' + '<div class="modal-content">' + '<div class="modal-header">' + '<h5 class="modal-title" id="'+k+'Label">'+v.dialogTitle+'</h5>' + '<button type="button" class="close" data-dismiss="modal" aria-label="Close">' + '<span aria-hidden="true">×</span>' + '</button>' + '</div>' + '<div class="modal-body">' + v.dialogContent + '</div>' + '<div class="modal-footer">' + '<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>' + '<button type="button" class="btn btn-success" onclick="window.location.reload(true)">'+v.dialogButtonTitle+'</button>' + '</div>' + '</div>' + '</div>' + '</div>' ); $('#'+k).on( 'hidden.bs.modal', new Function( "$('#"+k+"-container').remove();" + "$(this).modal('dispose').remove()" ) ); } return this }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This function was updated to support:
SW_UPDATE_NOTIFICATIONS_OPTIONS
flag (API: New flag SW_UPDATE_NOTIFICATIONS_OPTIONS #195), andUPDATED DEFINITION
The text was updated successfully, but these errors were encountered: