mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Minor tweaks to the dialog code.
This commit is contained in:
parent
65dc4320f1
commit
9d94848af4
@ -20,13 +20,11 @@ function about_show() {
|
|||||||
setup:function() {
|
setup:function() {
|
||||||
return {
|
return {
|
||||||
buttons:[{ text: "OK", key: 27, className: "btn btn-primary" }],
|
buttons:[{ text: "OK", key: 27, className: "btn btn-primary" }],
|
||||||
focus: { element: 0 },
|
options: { modal: 0, resizable: true }
|
||||||
options: { modal: 0, overflow: false, resizable: true }
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
build:function() {
|
build:function() {
|
||||||
this.elements.body.style.minHeight = "450px";
|
|
||||||
this.elements.body.style.minWidth = "800px";
|
|
||||||
},
|
},
|
||||||
prepare:function() {
|
prepare:function() {
|
||||||
this.setContent(this.message);
|
this.setContent(this.message);
|
||||||
@ -38,8 +36,7 @@ function about_show() {
|
|||||||
var content = '';
|
var content = '';
|
||||||
$.get("{{ url_for('about.index') }}",
|
$.get("{{ url_for('about.index') }}",
|
||||||
function(data) {
|
function(data) {
|
||||||
alertify.aboutDialog('About {{ config.APP_NAME }}', data);
|
alertify.aboutDialog('About {{ config.APP_NAME }}', data).resizeTo(800, 450);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
@ -46,9 +46,10 @@ function test_dialog() {
|
|||||||
if (!alertify.myAlert) {
|
if (!alertify.myAlert) {
|
||||||
alertify.dialog('myAlert', function factory() {
|
alertify.dialog('myAlert', function factory() {
|
||||||
return {
|
return {
|
||||||
main:function(title, message) {
|
main:function(title, message, data) {
|
||||||
this.set('title', title);
|
this.set('title', title);
|
||||||
this.message = message;
|
this.message = message;
|
||||||
|
this.data = data;
|
||||||
},
|
},
|
||||||
setup:function() {
|
setup:function() {
|
||||||
return {
|
return {
|
||||||
@ -59,6 +60,9 @@ function test_dialog() {
|
|||||||
},
|
},
|
||||||
prepare:function() {
|
prepare:function() {
|
||||||
this.setContent(this.message);
|
this.setContent(this.message);
|
||||||
|
},
|
||||||
|
callback:function(closeEvent) {
|
||||||
|
alertify.alert('Close Event', 'You pressed: ' + closeEvent.button.text + ' on ' + this.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -66,5 +70,8 @@ function test_dialog() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
alertify.myAlert('Dialog Test',
|
alertify.myAlert('Dialog Test',
|
||||||
'This is a test dialog from Alertify!');
|
'This is a test dialog from Alertify!', 'This is dialog 1');
|
||||||
|
|
||||||
|
alertify.myAlert('Dialog Test 2',
|
||||||
|
'This is another test dialog from Alertify!', 'This is dialog 2');
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user