X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/4e9af76312159043dfa1c15a56945e232ccfaed3..0214643f72c6aaa8e85eaba2ad27f2ca03ca6401:/fnpjs/layout.js diff --git a/fnpjs/layout.js b/fnpjs/layout.js new file mode 100644 index 0000000..a7c27fe --- /dev/null +++ b/fnpjs/layout.js @@ -0,0 +1,18 @@ +define(['libs/jquery-1.9.1.min', 'libs/underscore-min'], function($ ,_) { + 'use strict'; + + var Layout = function(template) { + this.dom = $(_.template(template)()); + + }; + + Layout.prototype.setView = function(place, view) { + this.dom.find('[fnpjs-place=' + place + ']').append(view); + }; + + Layout.prototype.getAsView = function() { + return this.dom + }; + + return {Layout: Layout}; +}); \ No newline at end of file