Correctly using application template (fixes timestamps/theme/css class issues)
authorDarren <darren@darrenwhitlen.com>
Sun, 27 Oct 2013 11:01:57 +0000 (11:01 +0000)
committerDarren <darren@darrenwhitlen.com>
Sun, 27 Oct 2013 11:01:57 +0000 (11:01 +0000)
client/src/views/application.js

index f68e52b8d3cb8f25edc29d8ddfc77b6b6ccb27d4..2f0af27d78a74b114bc9f1bb73ca88aa2ae585b9 100644 (file)
@@ -2,7 +2,10 @@ _kiwi.view.Application = Backbone.View.extend({
     initialize: function () {
         var that = this;
 
-        this.$el.append($('#tmpl_application').html().trim());
+        this.$el = $($('#tmpl_application').html().trim());
+        this.el = this.$el[0];
+
+        $(this.model.get('container') || 'body').append(this.$el);
 
         this.elements = {
             panels:        this.$el.find('.panels'),