|
|
@ -9,14 +9,22 @@ define([
|
|
|
|
"underscore"
|
|
|
|
"underscore"
|
|
|
|
, "jquery"
|
|
|
|
, "jquery"
|
|
|
|
, "backbone"
|
|
|
|
, "backbone"
|
|
|
|
, "jquery-layout"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
, "text!../../templates/app/layout.html"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
, "jquery-layout"
|
|
|
|
, "jquery-ui"
|
|
|
|
, "jquery-ui"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
, function (_, $, Backbone) {
|
|
|
|
, function (
|
|
|
|
|
|
|
|
_
|
|
|
|
|
|
|
|
, $
|
|
|
|
|
|
|
|
, Backbone
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
, tmplAppLayout
|
|
|
|
|
|
|
|
) {
|
|
|
|
"use strict";
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
return Backbone.View.extend({
|
|
|
|
var App = Backbone.View.extend({
|
|
|
|
el: $("body")
|
|
|
|
el: $("body")
|
|
|
|
|
|
|
|
|
|
|
|
, Layout: null
|
|
|
|
, Layout: null
|
|
|
@ -26,9 +34,16 @@ define([
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
, initialize: function() {
|
|
|
|
, initialize: function() {
|
|
|
|
_.bindAll(this, "toggleSideBar");
|
|
|
|
_.bindAll(this
|
|
|
|
|
|
|
|
, "toggleSideBar"
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var that = this
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
App.__super__.initialize.apply(that);
|
|
|
|
|
|
|
|
console.log(tmplAppLayout);
|
|
|
|
|
|
|
|
that.$el.html(tmplAppLayout);
|
|
|
|
|
|
|
|
|
|
|
|
that.Layout = that.$el.layout({
|
|
|
|
that.Layout = that.$el.layout({
|
|
|
|
//applyDefaultStyles: true
|
|
|
|
//applyDefaultStyles: true
|
|
|
@ -59,10 +74,13 @@ define([
|
|
|
|
size: 30
|
|
|
|
size: 30
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return that;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
, toggleSideBar: function () {
|
|
|
|
, toggleSideBar: function () {
|
|
|
|
this.Layout.toggle("west");
|
|
|
|
this.Layout.toggle("west");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
return App;
|
|
|
|
});
|
|
|
|
});
|