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() ...@@ -23,36 +23,42 @@ $(function()
}); });
var EventInspector = {
TYPE: {
SUCCESS: 'success',
function EventInspector_ShowMsg(text, type) ERROR: 'error'
{ },
if (inspectorCounter >= inspectorMax)
inspectorList.children().first().remove(); show: function (text, type) {
if (inspectorCounter >= inspectorMax)
++inspectorCounter; inspectorList.children().first().remove();
var MsgDiv = inspectorList.append('<div class="EventItem '+ type +'">' + text + '</div>').children().last(); ++inspectorCounter;
setTimeout(
function(){ var MsgDiv = inspectorList.append('<div class="EventItem ' + type + '">' + text + '</div>').children().last();
--inspectorCounter;
MsgDiv.animate( setTimeout(
{opacity: 0}, function () {
1000, --inspectorCounter;
function() MsgDiv.animate({ opacity: 0 }, 1000,
{ function () {
$(this).remove(); $(this).remove();
});
} }, 4000);
); },
},
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