Fix Bug 35626. refactoring rev. 1843040605.

This commit is contained in:
Julia Radzhabova 2017-08-17 16:44:57 +03:00
parent 1843040605
commit 4f37e52b8c

View file

@ -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();
}
}