[Header] Refactoring
This commit is contained in:
parent
f2143c7de7
commit
38b36d923d
|
@ -89,7 +89,6 @@ define([
|
||||||
'<div class="inner-box-icon">' +
|
'<div class="inner-box-icon">' +
|
||||||
'<svg class=""><use xlink:href="#svg-icon-users"></use></svg>' +
|
'<svg class=""><use xlink:href="#svg-icon-users"></use></svg>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
// '<i class="icon toolbar__icon icon--inverse btn-users"></i>' +
|
|
||||||
'<label class="caption"></label>' +
|
'<label class="caption"></label>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="cousers-menu dropdown-menu">' +
|
'<div class="cousers-menu dropdown-menu">' +
|
||||||
|
@ -174,31 +173,15 @@ define([
|
||||||
|
|
||||||
var has_edit_users = count > 1 && appConfig && (appConfig.isEdit || appConfig.isRestrictedEdit); // has other user(s) who edit document
|
var has_edit_users = count > 1 && appConfig && (appConfig.isEdit || appConfig.isRestrictedEdit); // has other user(s) who edit document
|
||||||
if ( has_edit_users ) {
|
if ( has_edit_users ) {
|
||||||
// $btnUsers
|
|
||||||
// .attr('data-toggle', 'dropdown')
|
|
||||||
// .addClass('dropdown-toggle')
|
|
||||||
// .menu = true;
|
|
||||||
|
|
||||||
$panelUsers['show']();
|
$panelUsers['show']();
|
||||||
|
$btnUsers.find('.caption').html(originalCount);
|
||||||
$btnUsers.find('.caption')
|
|
||||||
// .css({'font-size': '12px',
|
|
||||||
// 'margin-top': '0'})
|
|
||||||
.html(originalCount);
|
|
||||||
} else {
|
} else {
|
||||||
// $btnUsers
|
|
||||||
// .removeAttr('data-toggle')
|
|
||||||
// .removeClass('dropdown-toggle')
|
|
||||||
// .menu = false;
|
|
||||||
$panelUsers['hide']();
|
$panelUsers['hide']();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onLostEditRights() {
|
function onLostEditRights() {
|
||||||
_readonlyRights = true;
|
_readonlyRights = true;
|
||||||
// $panelUsers && $panelUsers.find('#tlb-change-rights').hide();
|
|
||||||
// $btnUsers && !$btnUsers.menu && $panelUsers.hide();
|
|
||||||
$panelShare && $panelShare.hide();
|
$panelShare && $panelShare.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,7 +196,6 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
function onShareClick(e) {
|
function onShareClick(e) {
|
||||||
$panelUsers.removeClass('open');
|
|
||||||
Common.NotificationCenter.trigger('collaboration:sharing');
|
Common.NotificationCenter.trigger('collaboration:sharing');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,13 +274,6 @@ define([
|
||||||
});
|
});
|
||||||
$btnShare.on('click', onShareClick.bind(me));
|
$btnShare.on('click', onShareClick.bind(me));
|
||||||
|
|
||||||
// var $labelChangeRights = $panelUsers.find('#tlb-change-rights');
|
|
||||||
// $labelChangeRights.on('click', function(e) {
|
|
||||||
// $panelUsers.removeClass('open');
|
|
||||||
// Common.NotificationCenter.trigger('collaboration:sharing');
|
|
||||||
// });
|
|
||||||
//
|
|
||||||
// $labelChangeRights[(!mode.isOffline && (mode.sharingSettingsUrl && mode.sharingSettingsUrl.length || mode.canRequestSharingSettings))?'show':'hide']();
|
|
||||||
$panelShare[(!_readonlyRights && appConfig && (appConfig.sharingSettingsUrl && appConfig.sharingSettingsUrl.length || appConfig.canRequestSharingSettings)) ? 'show' : 'hide']();
|
$panelShare[(!_readonlyRights && appConfig && (appConfig.sharingSettingsUrl && appConfig.sharingSettingsUrl.length || appConfig.canRequestSharingSettings)) ? 'show' : 'hide']();
|
||||||
$panelUsers[(editingUsers > 1 && appConfig && (appConfig.isEdit || appConfig.isRestrictedEdit)) ? 'show' : 'hide']();
|
$panelUsers[(editingUsers > 1 && appConfig && (appConfig.isEdit || appConfig.isRestrictedEdit)) ? 'show' : 'hide']();
|
||||||
}
|
}
|
||||||
|
@ -452,7 +427,6 @@ define([
|
||||||
id: 'btn-goback',
|
id: 'btn-goback',
|
||||||
cls: 'btn-header',
|
cls: 'btn-header',
|
||||||
iconCls: 'toolbar__icon icon--inverse btn-goback',
|
iconCls: 'toolbar__icon icon--inverse btn-goback',
|
||||||
// split: true,
|
|
||||||
dataHint: '0',
|
dataHint: '0',
|
||||||
dataHintDirection: 'bottom',
|
dataHintDirection: 'bottom',
|
||||||
dataHintOffset: 'big'
|
dataHintOffset: 'big'
|
||||||
|
|
|
@ -296,6 +296,7 @@
|
||||||
"Common.Views.Header.tipViewUsers": "View users",
|
"Common.Views.Header.tipViewUsers": "View users",
|
||||||
"Common.Views.Header.txtAccessRights": "Change access rights",
|
"Common.Views.Header.txtAccessRights": "Change access rights",
|
||||||
"Common.Views.Header.txtRename": "Rename",
|
"Common.Views.Header.txtRename": "Rename",
|
||||||
|
"Common.Views.Header.textShare": "Share",
|
||||||
"Common.Views.History.textCloseHistory": "Close History",
|
"Common.Views.History.textCloseHistory": "Close History",
|
||||||
"Common.Views.History.textHide": "Collapse",
|
"Common.Views.History.textHide": "Collapse",
|
||||||
"Common.Views.History.textHideAll": "Hide detailed changes",
|
"Common.Views.History.textHideAll": "Hide detailed changes",
|
||||||
|
|
Loading…
Reference in a new issue