Download:
child 26:17f590c312bd
parent 24:fe92472b29b7
25:79ae5c1900a2
Anton Shestakov <engored@ya.ru>, Fri, 11 Jan 2013 17:24:48 +0900
Reorganize ui.js a bit.

1 файлов изменено, 23 вставок(+), 23 удалений(-) [+]
static/js/ui.js file | annotate | diff | comparison | revisions
--- a/static/js/ui.js Fri Jan 11 17:22:25 2013 +0900
+++ b/static/js/ui.js Fri Jan 11 17:24:48 2013 +0900
@@ -4,29 +4,6 @@
fruitbar.projects = new Projects();
fruitbar.router = new Router();
- fruitbar.workspaceTitleDisplayer = new Displayer({
- el: $('.workspace-title')
- });
-
- fruitbar.projectCounter = new CollectionCounterView({
- el: $('.project-counter'),
- collection: fruitbar.projects,
- plurals: ['project', 'projects']
- });
-
- fruitbar.projectsView = new ProjectsView({
- el: $('.projects'),
- collection: fruitbar.projects,
- tasks: fruitbar.tasks,
- templates: {
- project: $('#project-template').html(),
- task: $('#task-template').html()
- },
- controls: {
- create: $('.btn-new-project')
- }
- });
-
fruitbar.xhrs = [];
fruitbar.xhrs.done = function() {
return _(this).all(function(xhr) {
@@ -52,6 +29,29 @@
});
};
+ fruitbar.workspaceTitleDisplayer = new Displayer({
+ el: $('.workspace-title')
+ });
+
+ fruitbar.projectCounter = new CollectionCounterView({
+ el: $('.project-counter'),
+ collection: fruitbar.projects,
+ plurals: ['project', 'projects']
+ });
+
+ fruitbar.projectsView = new ProjectsView({
+ el: $('.projects'),
+ collection: fruitbar.projects,
+ tasks: fruitbar.tasks,
+ templates: {
+ project: $('#project-template').html(),
+ task: $('#task-template').html()
+ },
+ controls: {
+ create: $('.btn-new-project')
+ }
+ });
+
fruitbar.on('workspace', function(workspace) {
$('body').stop().animate({opacity: 0});