diff --git a/app.js b/app.js index 67f2994..3efa391 100644 --- a/app.js +++ b/app.js @@ -543,12 +543,51 @@ var app = { }).click(); // TODO: remove ".click()" after development }, + settingsShowMessage: function(msg, msgType, $container) { + if(!$container) { + $container = $('#cc-settings-content'); + } + + var msgTypeClass; + + if(typeof(msgType) === 'undefined') { + msgType = 'info'; + } + + switch(msgType) { + case 'warning': + msgTypeClass = 'msg-warning'; + break; + case 'success': + msgTypeClass = 'msg-success'; + break; + default: // 'info' + msgTypeClass = 'msg-info'; + } + + var $msg = $('
') + .prependTo($container).hide().fadeIn(); + + $msg.animate({ + backgroundColor: '#ffffff', + color: '#000000' + }, 1000 + ); + + window.setTimeout(function(){ + $msg.fadeOut(400, function() { + $msg.remove(); + }) + }, 4000); + }, + settingsInit: function($container) { var self = this; - self.settingsRenderList($container, function() { + var $queuesListBox = $container.find('#queues-list-container'); + self.settingsQueuesListRender(null, $queuesListBox, function() { monster.ui.tooltips($container, { options: { - placement: 'bottom', + placement: 'right', container: 'body' } }); @@ -581,12 +620,12 @@ var app = { $(this).removeClass('active'); }); $queuesList.find('.js-new-queue-item').remove(); - $queuesList.find('.js-nav-list').append('