1 define(['libs/jquery-1.9.1.min', 'libs/underscore-min'], function($ ,_) {
\r
4 var Layout = function(template) {
\r
6 this.dom = $(_.template(template)());
\r
9 this.dom.onShow = function() {
\r
10 _.values(layout.views).forEach(function(view) {
\r
18 Layout.prototype.setView = function(place, view) {
\r
19 this.dom.find('[fnpjs-place=' + place + ']').append(view);
\r
20 this.views[place] = view;
\r
21 if(this.dom.is(':visible') && view.onShow) {
\r
26 Layout.prototype.getAsView = function() {
\r
30 return {Layout: Layout};
\r