diff options
author | 2013-12-06 18:15:24 +0100 | |
---|---|---|
committer | 2013-12-06 18:15:24 +0100 | |
commit | 1f4c6cd6e4b712263b40de4ce1fcebe716019b4f (patch) | |
tree | d25db580032edff61a58b3be426b4681e23addf8 /pyload/web/app/scripts/views/abstract/modalView.js | |
parent | fixed jshint (diff) | |
download | pyload-1f4c6cd6e4b712263b40de4ce1fcebe716019b4f.tar.xz |
package edit dialog
Diffstat (limited to 'pyload/web/app/scripts/views/abstract/modalView.js')
-rw-r--r-- | pyload/web/app/scripts/views/abstract/modalView.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/pyload/web/app/scripts/views/abstract/modalView.js b/pyload/web/app/scripts/views/abstract/modalView.js index 61016a9fb..2fd84441b 100644 --- a/pyload/web/app/scripts/views/abstract/modalView.js +++ b/pyload/web/app/scripts/views/abstract/modalView.js @@ -31,6 +31,11 @@ define(['jquery', 'backbone', 'underscore', 'omniwindow'], function($, Backbone, } }, + // Class method that will show a temporary instance + display: function() { + + }, + // TODO: whole modal stuff is not very elegant render: function() { this.$el.html(this.template(this.renderContent())); @@ -110,8 +115,14 @@ define(['jquery', 'backbone', 'underscore', 'omniwindow'], function($, Backbone, }, confirm: function() { - if (this.confirmCallback) - this.confirmCallback.apply(); + // Call the confirms given or from extended class + if (this.confirmCallback) { + if (this.confirmCallback.apply() === false) + return; + } else if (_.isFunction(this.constructor.prototype.confirmCallback)) { + if (this.constructor.prototype.confirmCallback.call(this) === false) + return; + } this.hide(); }, |