- Timestamp:
- Nov 11, 2017 1:13:38 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/js/Msg.js
r552 r617 47 47 Strangecode.Msg = function (options) { 48 48 // Merge options with defaults 49 this.o = $.extend({49 var options = this.o = $.extend({ 50 50 container: '.sc-msg:last', 51 51 above_msg: '', 52 52 gotohash: true 53 53 }, options || {}); 54 55 document.addEventListener('DOMContentLoaded', function (e) { 56 // Warn if the target doesn't exist. 57 if (!$(options.container).length) { 58 console.warn('Strangecode.Msg container not found: ' + this.o.container); 59 } 60 }); 54 61 }; 55 62 … … 70 77 } 71 78 // Use 'sc-msg-error' as default class string. 72 msg_class = (typeof msg_class === 'undefined') ? 'sc-msg-error' : msg_class;79 var msg_class = (typeof msg_class === 'undefined') ? 'sc-msg-error' : msg_class; 73 80 // Append this raised message to the sc-msg stack, if it doesn't exist already. 74 81 if (!$(this.o.container).find(':contains("' + message + '")').length) {
Note: See TracChangeset
for help on using the changeset viewer.