From 4f37e52b8ca37f0e626b9ff853ca709cd4b3b16e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 17 Aug 2017 16:44:57 +0300 Subject: [PATCH] Fix Bug 35626. refactoring rev. 1843040605b4bd79c1819d6d9b14c92a6dd04022. --- apps/common/main/lib/view/Header.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index b9393a254..2eb360396 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -135,7 +135,7 @@ define([ function onResetUsers(collection, opts) { var usercount = collection.getEditingCount(); if ( $userList ) { - if ( usercount > 1 || usercount > 0 && !appConfig.isEdit) { + if ( usercount > 1 || usercount > 0 && appConfig && !appConfig.isEdit) { $userList.html(templateUserList({ users: collection.models, usertpl: _.template(templateUserItem), @@ -157,7 +157,7 @@ define([ }; function applyUsers(count) { - if ( count > 1 || count > 0 && !appConfig.isEdit) { + if ( count > 1 || count > 0 && appConfig && !appConfig.isEdit) { $btnUsers .attr('data-toggle', 'dropdown') .addClass('dropdown-toggle') @@ -174,13 +174,13 @@ define([ } $btnUsers.find('.caption') - .css({'font-size': ((count > 1 || count > 0 && !appConfig.isEdit) ? '12px' : '14px'), - 'margin-top': ((count > 1 || count > 0 && !appConfig.isEdit) ? '0' : '-1px')}) - .html((count > 1 || count > 0 && !appConfig.isEdit) ? count : '+'); + .css({'font-size': ((count > 1 || count > 0 && appConfig && !appConfig.isEdit) ? '12px' : '14px'), + 'margin-top': ((count > 1 || count > 0 && appConfig && !appConfig.isEdit) ? '0' : '-1px')}) + .html((count > 1 || count > 0 && appConfig && !appConfig.isEdit) ? count : '+'); var usertip = $btnUsers.data('bs.tooltip'); if ( usertip ) { - usertip.options.title = (count > 1 || count > 0 && !appConfig.isEdit) ? usertip.options.titleExt : usertip.options.titleNorm; + usertip.options.title = (count > 1 || count > 0 && appConfig && !appConfig.isEdit) ? usertip.options.titleExt : usertip.options.titleNorm; usertip.setContent(); } }