diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-12-22 20:32:58 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-12-22 20:32:58 +0100 |
commit | 6e0413b2e036b8fff997bcd1d6017681cdd91cfd (patch) | |
tree | 351eb28c2ab192785d19d4eb18166f42b9eae3d6 /module/web/static/js/views/packageView.js | |
parent | updated header, more responsive for smaller width (diff) | |
download | pyload-6e0413b2e036b8fff997bcd1d6017681cdd91cfd.tar.xz |
improved modal dialogs, added one for link grabber
Diffstat (limited to 'module/web/static/js/views/packageView.js')
-rw-r--r-- | module/web/static/js/views/packageView.js | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/module/web/static/js/views/packageView.js b/module/web/static/js/views/packageView.js index 7cccc9bf4..efbf6b76e 100644 --- a/module/web/static/js/views/packageView.js +++ b/module/web/static/js/views/packageView.js @@ -1,22 +1,17 @@ -define(['jquery', 'views/abstract/itemView', 'underscore', 'views/fileView', 'utils/lazyRequire', 'handlebars'], - function($, itemView, _, fileView, lazyLoader, HB) { +define(['jquery', 'views/abstract/itemView', 'underscore', 'views/fileView'], + function($, itemView, _, fileView) { // Renders a single package item return itemView.extend({ tagName: 'li', className: 'package-view', -// template: _.template($("#template-package").html()), - template: HB.compile($("#template-package").html()), + template: _.compile($("#template-package").html()), events: { 'click .package-header': 'load', - 'click .delete': 'delete', - 'click .show-dialog': 'show_dialog' + 'click .delete': 'delete' }, - modal: null, - requireOnce: lazyLoader.once(), - initialize: function() { this.model.on('filter:added', this.hide, this); this.model.on('filter:removed', this.show, this); @@ -48,18 +43,6 @@ define(['jquery', 'views/abstract/itemView', 'underscore', 'views/fileView', 'ut this.$el.zapOut(function() { self.destroy(); }); - }, - - show_dialog: function(e) { - console.log(e); - e.stopPropagation(); - var self = this; - this.requireOnce(['views/modal/modalView'], function(modalView){ - if (self.modal === null) - self.modal = new modalView(); - - self.modal.show(); - }); - } + } }); });
\ No newline at end of file |