Replace bootstrap-dialog with Alertify.js, which is more configurable

and supports non-modal dialogs.
This commit is contained in:
Dave Page
2015-01-28 15:57:03 +00:00
parent 53d649de70
commit 65dc4320f1
19 changed files with 5266 additions and 1368 deletions

View File

@@ -10,7 +10,36 @@
#}
function about_show() {
BootstrapDialog.show({
title: 'About {{ config.APP_NAME }}',
message: $('<div></div>').load('{{ url_for('about.index') }}')});
if (!alertify.aboutDialog) {
alertify.dialog('aboutDialog', function factory() {
return {
main:function(title, message) {
this.set('title', title);
this.message = message;
},
setup:function() {
return {
buttons:[{ text: "OK", key: 27, className: "btn btn-primary" }],
focus: { element: 0 },
options: { modal: 0, overflow: false, resizable: true }
};
},
build:function() {
this.elements.body.style.minHeight = "450px";
this.elements.body.style.minWidth = "800px";
},
prepare:function() {
this.setContent(this.message);
}
}
});
}
var content = '';
$.get("{{ url_for('about.index') }}",
function(data) {
alertify.aboutDialog('About {{ config.APP_NAME }}', data);
}
);
}