mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 17:27:22 +02:00
great progress on views
This commit is contained in:
parent
277f4f9209
commit
ce37b7fae4
2 changed files with 63 additions and 16 deletions
|
@ -11338,11 +11338,6 @@ var ModalView = Backbone.View.extend({
|
|||
// add ourselves to the DOM
|
||||
this.$el.html(this.template({}));
|
||||
$('body').append(this.el);
|
||||
console.log(this.el);
|
||||
var _this = this;
|
||||
setTimeout(function() {
|
||||
_this.show();
|
||||
}, 1050);
|
||||
},
|
||||
|
||||
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.ModalAlert = ModalAlert;
|
||||
|
||||
|
||||
});
|
||||
|
@ -14374,11 +14387,6 @@ var ModalView = Backbone.View.extend({
|
|||
// add ourselves to the DOM
|
||||
this.$el.html(this.template({}));
|
||||
$('body').append(this.el);
|
||||
console.log(this.el);
|
||||
var _this = this;
|
||||
setTimeout(function() {
|
||||
_this.show();
|
||||
}, 1050);
|
||||
},
|
||||
|
||||
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.ModalAlert = ModalAlert;
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -16,11 +16,6 @@ var ModalView = Backbone.View.extend({
|
|||
// add ourselves to the DOM
|
||||
this.$el.html(this.template({}));
|
||||
$('body').append(this.el);
|
||||
console.log(this.el);
|
||||
var _this = this;
|
||||
setTimeout(function() {
|
||||
_this.show();
|
||||
}, 1050);
|
||||
},
|
||||
|
||||
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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue