summaryrefslogtreecommitdiffstats
path: root/module/web/static/js
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/static/js')
-rw-r--r--module/web/static/js/views/modal/modalView.js12
-rw-r--r--module/web/static/js/views/packageTreeView.js8
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() {