diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-09-22 19:57:54 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-09-22 19:57:54 +0200 |
commit | 2c02eac4fc62d33556d5c1ad8748ecbe6a0b812f (patch) | |
tree | a8169eb3b708ac82421f0e80b97f47b1b5af1f96 /module/web/static/js | |
parent | web socket api handler (diff) | |
download | pyload-2c02eac4fc62d33556d5c1ad8748ecbe6a0b812f.tar.xz |
fixed the dashboard
Diffstat (limited to 'module/web/static/js')
-rw-r--r-- | module/web/static/js/views/modal/modalView.js | 12 | ||||
-rw-r--r-- | module/web/static/js/views/packageTreeView.js | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/module/web/static/js/views/modal/modalView.js b/module/web/static/js/views/modal/modalView.js index b20aab57d..297808ead 100644 --- a/module/web/static/js/views/modal/modalView.js +++ b/module/web/static/js/views/modal/modalView.js @@ -32,21 +32,19 @@ define(['jquery', 'backbone', 'underscore', 'text!tpl/default/modal.html', 'omni }); }, show: function(subjects, internalCallback) { - subjects.overlay.fadeIn(250, function() { - internalCallback(subjects); - }); + subjects.overlay.fadeIn(300); + internalCallback(subjects); }}}, modal: { hideClass: 'hide', animations: { hide: function(subjects, internalCallback) { - subjects.modal.transition({opacity: 'hide', scale: 0.7}, 250, function() { - internalCallback(subjects); - }); + subjects.modal.transition({opacity: 'hide', scale: 0.7}, 300); + internalCallback(subjects); }, show: function(subjects, internalCallback) { - subjects.modal.transition({opacity: 'show', scale: 1}, 250, function() { + subjects.modal.transition({opacity: 'show', scale: 1}, 400, function() { internalCallback(subjects); }); }} diff --git a/module/web/static/js/views/packageTreeView.js b/module/web/static/js/views/packageTreeView.js index 30f159cf7..3cef27601 100644 --- a/module/web/static/js/views/packageTreeView.js +++ b/module/web/static/js/views/packageTreeView.js @@ -4,7 +4,7 @@ define(['jquery', 'backbone', 'underscore', 'models/TreeCollection', 'views/pack // Renders whole PackageView return Backbone.View.extend({ - el: '#content', + el: '#dashboard', events: { 'click #add': 'addPackage', @@ -27,6 +27,7 @@ define(['jquery', 'backbone', 'underscore', 'models/TreeCollection', 'views/pack var packs = this.tree.get('packages'), files = this.tree.get('files'); + this.$el.empty() this.$el.append($('<span>Root: ' + this.tree.get('root').get('name') + ' </span>')); this.$el.append($('<input id="name" type="text" size="20">')); this.$el.append($('<a id="add" href="#"> Add</a><br>')); @@ -57,9 +58,10 @@ define(['jquery', 'backbone', 'underscore', 'models/TreeCollection', 'views/pack addPackage: function() { var self = this; var settings = { + type: 'POST', data: { - name: '"' + $('#name').val() + '"', - links: '["some link"]' + name: JSON.stringify($('#name').val()), + links: JSON.stringify(['some link']) }, success: function() { self.tree.fetch({success: function() { |