Sha256: 3b0771fd37a7ae7730d23e5b181d4b1e1a923556d7b9c621050a15bef76209aa
Contents?: true
Size: 865 Bytes
Versions: 11
Compression:
Stored size: 865 Bytes
Contents
Informant.NoticeView = Backbone.View.extend({ className: "success", displayLength: 5000, defaultMessage: '', initialize: function() { _.bindAll(this, 'render'); this.message = this.options.message || this.defaultMessage; this.render(); }, render: function() { var view = this; $(this.el).html(this.message); $(this.el).hide(); $('#notices').html(this.el); $(this.el).slideDown(); $.doTimeout(this.displayLength, function() { $(view.el).slideUp(); $.doTimeout(2000, function() { view.remove(); }); }); return this; } }); Informant.ErrorView = Informant.NoticeView.extend({ className: "error", defaultMessage: 'Uh oh! Something went wrong. Please try again.' });
Version data entries
11 entries across 11 versions & 1 rubygems