From f04b5e0fe88aefa04ff461ffe8aa642596ff315d Mon Sep 17 00:00:00 2001 From: Matthieu Lalonde Date: Fri, 9 Nov 2012 09:51:37 -0500 Subject: [PATCH] Moved player layout to template --- index.html | 23 +------------------- resources/js/views/player.js | 30 ++++++++++++++++++++++++-- resources/templates/player/layout.html | 20 +++++++++++++++++ 3 files changed, 49 insertions(+), 24 deletions(-) create mode 100644 resources/templates/player/layout.html diff --git a/index.html b/index.html index 5a9a0a2..6119d42 100644 --- a/index.html +++ b/index.html @@ -27,28 +27,7 @@ -
-
- - - -
- - - -
-
-
- -
-

DAAPr3

-
-
+
diff --git a/resources/js/views/player.js b/resources/js/views/player.js index a9c4497..aac12a1 100644 --- a/resources/js/views/player.js +++ b/resources/js/views/player.js @@ -5,9 +5,35 @@ /*jslint browser:true */ /*jslint devel:true */ define([ + "underscore" + , "jquery" + , "backbone" + + , "text!../../templates/player/layout.html" ] -, function () { +, function ( +_ +, $ +, Backbone + +, tmplPlayerLayout +) { "use strict"; - return function() {}; + var Player = Backbone.View.extend({ + el: $("body > div.ui-layout-north") + + , initialize: function (options) { + var that = this + ; + + Player.__super__.initialize.apply(that); + + that.$el.html(tmplPlayerLayout); + + return that; + } + }); + + return Player; }); \ No newline at end of file diff --git a/resources/templates/player/layout.html b/resources/templates/player/layout.html new file mode 100644 index 0000000..ec0ce12 --- /dev/null +++ b/resources/templates/player/layout.html @@ -0,0 +1,20 @@ +
+ + + +
+ + + +
+
+
+ +
+

DAAPr3

+
\ No newline at end of file