Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

page widget uses 'body' tag as this.$node

  • Loading branch information...
commit 58c1b9b6d45a05da4fe055cba84eb71c87afa156 1 parent 67d8bbd
@aaronj1335 aaronj1335 authored
Showing with 9 additions and 7 deletions.
  1. +9 −7 src/widgets/page.js
View
16 src/widgets/page.js
@@ -11,13 +11,15 @@ define([
'path!gloss:widgets/widget'
], function($, Widget) {
return Widget.extend({
- defaults: {
- template: null
- },
-
create: function() {
- var self = this;
- this._super();
+ var self = this, $origNode;
+
+ if (this.node.tagName.toLowerCase() !== 'body') {
+ $origNode = this.$node.remove();
+ this.$node = $('body');
+ this.node = this.$node[0];
+ this.$node.attr('id', $origNode.attr('id'));
+ }
self.load = $.Deferred();
$(function() {
@@ -45,4 +47,4 @@ define([
}
}
});
-});
+});
Please sign in to comment.
Something went wrong with that request. Please try again.