1
0
Fork 0

Moved App layout to template

master
Matthieu Lalonde 12 years ago
parent 8f7c3bdbbf
commit e0f483f7e3

@ -27,14 +27,6 @@
<script data-main="/resources/js/main" src="/resources/vendors/require/require.min.js">/**/</script> <script data-main="/resources/js/main" src="/resources/vendors/require/require.min.js">/**/</script>
</head> </head>
<body> <body>
<div class="ui-layout-north" id="wrapperPlayer"></div>
<div class="ui-layout-west"></div>
<div class="ui-layout-center" class="loading"></div>
<div class="ui-layout-south row-fluid"></div>
<ul id="listItemContextMenu" class="context-menu dropdown-menu"> <ul id="listItemContextMenu" class="context-menu dropdown-menu">
<li><a href="javascript:void(0);" data-target="listItemDetails"><i class="icon-info-sign"></i>&nbsp;Details...</a></li> <li><a href="javascript:void(0);" data-target="listItemDetails"><i class="icon-info-sign"></i>&nbsp;Details...</a></li>
<li><a href="javascript:void(0);" data-target="permalink"><i class="icon-bookmark"></i>&nbsp;Direct link</a></li> <li><a href="javascript:void(0);" data-target="permalink"><i class="icon-bookmark"></i>&nbsp;Direct link</a></li>

@ -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;
}); });

@ -0,0 +1,7 @@
<div class="ui-layout-north" id="wrapperPlayer"></div>
<div class="ui-layout-west"></div>
<div class="ui-layout-center"></div>
<div class="ui-layout-south row-fluid"></div>
Loading…
Cancel
Save