Skip to content
Snippets Groups Projects
Commit 88f302c6 authored by xamgore's avatar xamgore
Browse files

Interface improvements of event inspector

parent 72da3e2e
Branches
Tags
No related merge requests found
......@@ -23,36 +23,42 @@ $(function()
});
function EventInspector_ShowMsg(text, type)
{
if (inspectorCounter >= inspectorMax)
inspectorList.children().first().remove();
++inspectorCounter;
var MsgDiv = inspectorList.append('<div class="EventItem '+ type +'">' + text + '</div>').children().last();
setTimeout(
function(){
--inspectorCounter;
MsgDiv.animate(
{opacity: 0},
1000,
function()
{
$(this).remove();
}
);
},
4000
);
var EventInspector = {
TYPE: {
SUCCESS: 'success',
ERROR: 'error'
},
show: function (text, type) {
if (inspectorCounter >= inspectorMax)
inspectorList.children().first().remove();
++inspectorCounter;
var MsgDiv = inspectorList.append('<div class="EventItem ' + type + '">' + text + '</div>').children().last();
setTimeout(
function () {
--inspectorCounter;
MsgDiv.animate({ opacity: 0 }, 1000,
function () {
$(this).remove();
});
}, 4000);
},
error: function (text) {
this.show(text, 'error');
},
success: function (text) {
this.show(text, 'success');
}
};
/**
* @deprecated use EventInspector.show() instead
*/
function EventInspector_ShowMsg(text, type) {
EventInspector.show(text, type);
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment