diff --git a/build/bundle.js b/build/bundle.js index 4bdaacb5..e62a6169 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -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('
lol wut
'); + } +}); + 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('lol wut
'); + } +}); + exports.ModalView = ModalView; +exports.ModalAlert = ModalAlert; }); diff --git a/src/js/views/index.js b/src/js/views/index.js index bf8d00d8..5823af0a 100644 --- a/src/js/views/index.js +++ b/src/js/views/index.js @@ -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('lol wut
'); + }, + + show: function() { + this.container.show(); + }, + + hide: function() { + this.container.hide(); + } +}); + +exports.ModalView = ModalView; +exports.ModalTerminal = ModalTerminal;