Removes setMessage from framework, as egw_message handles all cases now, and bind click handler to dismiss the message when we create the element

This commit is contained in:
Hadi Nategh
2014-12-10 10:32:51 +00:00
parent 00b22e82bf
commit af05aa9471
2 changed files with 1 additions and 50 deletions

View File

@@ -830,35 +830,6 @@ var fw_base = Class.extend({
return framework.activeApp.appName;
},
/**
* Display an error or regular message
*
* @param {string} _msg message to show
* @param {string} _type 'error', 'warning' or 'success' (default)
*/
setMessage: function(_msg, _type)
{
if (typeof _type == 'undefined')
_type = _msg.match(/error/i) ? 'error' : 'success';
if (this.messageTimer)
{
window.clearTimeout(this.messageTimer);
delete this.messageTimer;
}
this.tabsUi.setAppHeader(_msg, _type+'_message');
this.resizeHandler();
if (_type != 'error') // clear message again after some time, if no error
{
var self = this;
this.messageTimer = window.setTimeout(function() {
self.refreshAppTitle.call(self);
}, 5000);
}
},
/**
* Change timezone and refresh current app
* @param _tz