From 9d94848af475f84dd2cefe5c3b944382632c81bc Mon Sep 17 00:00:00 2001 From: Dave Page Date: Wed, 28 Jan 2015 17:56:13 +0000 Subject: [PATCH] Minor tweaks to the dialog code. --- web/pgadmin/about/templates/about/browser.js | 9 +++------ web/pgadmin/test/templates/test/browser.js | 11 +++++++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/web/pgadmin/about/templates/about/browser.js b/web/pgadmin/about/templates/about/browser.js index eda06722f..ee8311cd8 100644 --- a/web/pgadmin/about/templates/about/browser.js +++ b/web/pgadmin/about/templates/about/browser.js @@ -20,13 +20,11 @@ function about_show() { setup:function() { return { buttons:[{ text: "OK", key: 27, className: "btn btn-primary" }], - focus: { element: 0 }, - options: { modal: 0, overflow: false, resizable: true } + options: { modal: 0, resizable: true } }; }, build:function() { - this.elements.body.style.minHeight = "450px"; - this.elements.body.style.minWidth = "800px"; + }, prepare:function() { this.setContent(this.message); @@ -38,8 +36,7 @@ function about_show() { var content = ''; $.get("{{ url_for('about.index') }}", function(data) { - alertify.aboutDialog('About {{ config.APP_NAME }}', data); + alertify.aboutDialog('About {{ config.APP_NAME }}', data).resizeTo(800, 450); } ); - } \ No newline at end of file diff --git a/web/pgadmin/test/templates/test/browser.js b/web/pgadmin/test/templates/test/browser.js index 53188c3d1..76e2fb9b9 100644 --- a/web/pgadmin/test/templates/test/browser.js +++ b/web/pgadmin/test/templates/test/browser.js @@ -46,9 +46,10 @@ function test_dialog() { if (!alertify.myAlert) { alertify.dialog('myAlert', function factory() { return { - main:function(title, message) { + main:function(title, message, data) { this.set('title', title); this.message = message; + this.data = data; }, setup:function() { return { @@ -59,6 +60,9 @@ function test_dialog() { }, prepare:function() { 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', - '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'); } \ No newline at end of file