2019-01-02 15:54:12 +05:30
|
|
|
/////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2013 - 2019, The pgAdmin Development Team
|
|
|
|
|
// This software is released under the PostgreSQL Licence
|
|
|
|
|
//
|
|
|
|
|
//////////////////////////////////////////////////////////////
|
|
|
|
|
|
2015-06-30 11:21:55 +05:30
|
|
|
define(
|
2019-10-10 12:05:28 +05:30
|
|
|
['jquery', 'alertify', 'sources/pgadmin', 'sources/gettext',
|
2018-01-12 12:59:51 +05:30
|
|
|
'sources/url_for',
|
2017-07-18 15:13:16 +01:00
|
|
|
],
|
2019-10-10 12:05:28 +05:30
|
|
|
function($, alertify, pgAdmin, gettext, url_for) {
|
2015-06-30 11:21:55 +05:30
|
|
|
pgAdmin = pgAdmin || window.pgAdmin || {};
|
2015-01-28 17:56:13 +00:00
|
|
|
|
2015-06-30 11:21:55 +05:30
|
|
|
/* Return back, this has been called more than once */
|
|
|
|
|
if (pgAdmin.About)
|
2018-01-12 12:59:51 +05:30
|
|
|
return;
|
2015-01-28 15:57:03 +00:00
|
|
|
|
2015-06-30 11:21:55 +05:30
|
|
|
pgAdmin.About = {
|
|
|
|
|
about_show: function() {
|
|
|
|
|
if (!alertify.aboutDialog) {
|
|
|
|
|
alertify.dialog('aboutDialog', function factory() {
|
|
|
|
|
return {
|
2016-06-20 12:46:30 +05:30
|
|
|
main: function(title, message) {
|
2015-06-30 11:21:55 +05:30
|
|
|
this.set('title', title);
|
|
|
|
|
this.message = message;
|
|
|
|
|
},
|
2016-06-20 12:46:30 +05:30
|
|
|
setup: function() {
|
2015-06-30 11:21:55 +05:30
|
|
|
return {
|
2019-01-02 15:05:15 +05:30
|
|
|
buttons:[{ text: gettext('OK'), key: 27,
|
|
|
|
|
className: 'btn btn-primary fa fa-lg fa-check pg-alertify-button' }],
|
2017-02-27 14:58:22 +00:00
|
|
|
options: {
|
|
|
|
|
modal: false,
|
|
|
|
|
resizable: true,
|
|
|
|
|
maximizable: true,
|
|
|
|
|
pinnable: false,
|
2018-01-12 12:59:51 +05:30
|
|
|
closableByDimmer: false,
|
|
|
|
|
},
|
2015-06-30 11:21:55 +05:30
|
|
|
};
|
|
|
|
|
},
|
2016-06-20 12:46:30 +05:30
|
|
|
build: function() {
|
|
|
|
|
alertify.pgDialogBuild.apply(this);
|
|
|
|
|
},
|
2015-06-30 11:21:55 +05:30
|
|
|
prepare:function() {
|
|
|
|
|
this.setContent(this.message);
|
2018-01-12 12:59:51 +05:30
|
|
|
},
|
2015-06-30 11:21:55 +05:30
|
|
|
};
|
|
|
|
|
});
|
2015-01-28 15:57:03 +00:00
|
|
|
}
|
2015-06-30 11:21:55 +05:30
|
|
|
|
2017-07-18 15:13:16 +01:00
|
|
|
$.get(url_for('about.index'),
|
2019-03-14 15:11:16 +00:00
|
|
|
function(data) {
|
|
|
|
|
alertify.aboutDialog(
|
2019-10-10 12:05:28 +05:30
|
|
|
gettext('About %s', pgAdmin.Browser.utils.app_name), data
|
2019-03-14 15:11:16 +00:00
|
|
|
).resizeTo(pgAdmin.Browser.stdW.md, pgAdmin.Browser.stdH.md);
|
|
|
|
|
});
|
2018-01-12 12:59:51 +05:30
|
|
|
},
|
2015-06-30 11:21:55 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return pgAdmin.About;
|
|
|
|
|
});
|