diff options
Diffstat (limited to 'module/web')
-rw-r--r-- | module/web/static/js/views/modal/modalView.js | 12 | ||||
-rw-r--r-- | module/web/static/js/views/packageTreeView.js | 8 | ||||
-rw-r--r-- | module/web/templates/default/dashboard.html | 6 |
3 files changed, 14 insertions, 12 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() { diff --git a/module/web/templates/default/dashboard.html b/module/web/templates/default/dashboard.html index 05f5b85a3..adcc6dc71 100644 --- a/module/web/templates/default/dashboard.html +++ b/module/web/templates/default/dashboard.html @@ -11,7 +11,7 @@ <ul id="dash-nav" class="nav nav-pills">
<li>
<ul class="breadcrumb">
- <li><a href="#">Home</a> <span class="divider">/</span></li>
+ <li><a href="#">{{ _("Home") }}</a> <span class="divider">/</span></li>
<li><a href="#">Library</a> <span class="divider">/</span></li>
<li class="active">Data</li>
</ul>
@@ -60,6 +60,8 @@ <li class="active" style="float: right;">
<a>All</a>
</li>
-
</ul>
+ <div id="dashboard">
+ {# Build up by js #}
+ </div>
{% endblock %}
\ No newline at end of file |