great progress on views

This commit is contained in:
Peter Cottle 2012-12-19 17:21:01 -08:00
parent 277f4f9209
commit ce37b7fae4
2 changed files with 63 additions and 16 deletions

View file

@ -11338,11 +11338,6 @@ var ModalView = Backbone.View.extend({
// add ourselves to the DOM // add ourselves to the DOM
this.$el.html(this.template({})); this.$el.html(this.template({}));
$('body').append(this.el); $('body').append(this.el);
console.log(this.el);
var _this = this;
setTimeout(function() {
_this.show();
}, 1050);
}, },
show: function() { show: function() {
@ -11366,7 +11361,25 @@ var ModalView = Backbone.View.extend({
} }
}); });
var ModalAlert = Backbone.View.extend({
tagName: 'div',
className: 'ModalAlert box',
initialize: function(options) {
options = options || {};
this.text = options.text || 'alert!';
this.container = new ModalView();
this.render();
},
render: function() {
var destination = this.container.getInsideElement();
$(destination).html('<p> lol wut </p>');
}
});
exports.ModalView = ModalView; exports.ModalView = ModalView;
exports.ModalAlert = ModalAlert;
}); });
@ -14374,11 +14387,6 @@ var ModalView = Backbone.View.extend({
// add ourselves to the DOM // add ourselves to the DOM
this.$el.html(this.template({})); this.$el.html(this.template({}));
$('body').append(this.el); $('body').append(this.el);
console.log(this.el);
var _this = this;
setTimeout(function() {
_this.show();
}, 1050);
}, },
show: function() { show: function() {
@ -14402,7 +14410,25 @@ var ModalView = Backbone.View.extend({
} }
}); });
var ModalAlert = Backbone.View.extend({
tagName: 'div',
className: 'ModalAlert box',
initialize: function(options) {
options = options || {};
this.text = options.text || 'alert!';
this.container = new ModalView();
this.render();
},
render: function() {
var destination = this.container.getInsideElement();
$(destination).html('<p> lol wut </p>');
}
});
exports.ModalView = ModalView; exports.ModalView = ModalView;
exports.ModalAlert = ModalAlert;
}); });

View file

@ -16,11 +16,6 @@ var ModalView = Backbone.View.extend({
// add ourselves to the DOM // add ourselves to the DOM
this.$el.html(this.template({})); this.$el.html(this.template({}));
$('body').append(this.el); $('body').append(this.el);
console.log(this.el);
var _this = this;
setTimeout(function() {
_this.show();
}, 1050);
}, },
show: function() { show: function() {
@ -44,5 +39,31 @@ var ModalView = Backbone.View.extend({
} }
}); });
exports.ModalView = ModalView; var ModalTerminal = Backbone.View.extend({
tagName: 'div',
className: 'ModalTerminal box',
initialize: function(options) {
options = options || {};
this.text = options.text || 'alert!';
this.container = new ModalView();
this.render();
},
render: function() {
var destination = this.container.getInsideElement();
$(destination).html('<p> lol wut </p>');
},
show: function() {
this.container.show();
},
hide: function() {
this.container.hide();
}
});
exports.ModalView = ModalView;
exports.ModalTerminal = ModalTerminal;