codiad/js/message.js
Isaac Brown 5583db5528 * Added Bangla language
* Added PostgreSQL
* Added SQL library
* Added show password
* Performance Improvements
* Updated active files module
* Updated cursor tracking
* Updated settings module
2019-05-01 09:11:50 -04:00

48 lines
931 B
JavaScript
Executable File

( function( global, $ ) {
var codiad = global.codiad;
//////////////////////////////////////////////////////////////////////
// User Alerts / Messages
//////////////////////////////////////////////////////////////////////
codiad.message = {
init: function() {},
_showMessage: function(toastType, message, options) {
options = options || {};
options.text = message;
options.type = toastType
$().toastmessage('showToast', options);
},
success: function( m, options ) {
this._showMessage('success', m, options);
},
error: function( m, options ) {
this._showMessage('error', m, options);
},
warning: function( m, options ) {
this._showMessage('warning', m, options);
},
notice: function( m, options ) {
this._showMessage('notice', m, options);
},
hide: function() {
$(".toast-item-wrapper").remove();
}
};
})( this, jQuery );