diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index b905c9ffd..00125e1d5 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -605,7 +605,8 @@ define([ 'newpad', 'share', 'limit', - 'unpinnedWarning' + 'unpinnedWarning', + 'notifications' ], title: title.getTitleConfig(), metadataMgr: cpNfInner.metadataMgr, diff --git a/www/common/toolbar3.js b/www/common/toolbar3.js index 41a4f0731..4c53df130 100644 --- a/www/common/toolbar3.js +++ b/www/common/toolbar3.js @@ -37,6 +37,7 @@ MessengerUI, Messages) { var TITLE_CLS = Bar.constants.title = "cp-toolbar-title"; var NEWPAD_CLS = Bar.constants.newpad = "cp-toolbar-new"; var LINK_CLS = Bar.constants.link = "cp-toolbar-link"; + var NOTIFICATIONS_CLS = Bar.constants.user = 'cp-toolbar-notifications'; // User admin menu var USERADMIN_CLS = Bar.constants.user = 'cp-toolbar-user-dropdown'; @@ -70,6 +71,7 @@ MessengerUI, Messages) { 'class': USER_CLS }).appendTo($topContainer); $('', {'class': LIMIT_CLS}).hide().appendTo($userContainer); + $('', {'class': NOTIFICATIONS_CLS + ' cp-dropdown-container'}).hide().appendTo($userContainer); $('', {'class': NEWPAD_CLS + ' cp-dropdown-container'}).hide().appendTo($userContainer); $('', {'class': USERADMIN_CLS + ' cp-dropdown-container'}).hide().appendTo($userContainer); @@ -927,6 +929,12 @@ MessengerUI, Messages) { return $userAdmin; }; + var createNotifications = function (toolbar, config) { + console.log(Common.mailbox); + var $userAdmin = toolbar.$userAdmin.find('.'+NOTIFICATIONS_CLS).show(); + return $userAdmin; + }; + // Events var initClickEvents = function (toolbar) { var removeDropdowns = function () { @@ -1095,6 +1103,7 @@ MessengerUI, Messages) { tb['newpad'] = createNewPad; tb['useradmin'] = createUserAdmin; tb['unpinnedWarning'] = createUnpinnedWarning; + tb['notifications'] = createNotifications; var addElement = toolbar.addElement = function (arr, additionalCfg, init) { if (typeof additionalCfg === "object") { $.extend(true, config, additionalCfg); }