Merge pull request #1833 from ONLYOFFICE/fix/select-cut-buttons

Fix/select cut buttons
This commit is contained in:
Julia Radzhabova 2022-06-29 20:26:30 +03:00 committed by GitHub
commit 652a342983
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 244 additions and 45 deletions

View file

@ -268,8 +268,10 @@ define([
toolbar.btnUndo.on('disabled', _.bind(this.onBtnChangeState, this, 'undo:disabled'));
toolbar.btnRedo.on('click', _.bind(this.onRedo, this));
toolbar.btnRedo.on('disabled', _.bind(this.onBtnChangeState, this, 'redo:disabled'));
toolbar.btnCopy.on('click', _.bind(this.onCopyPaste, this, true));
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, false));
toolbar.btnCopy.on('click', _.bind(this.onCopyPaste, this, 'copy'));
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, 'paste'));
toolbar.btnCut.on('click', _.bind(this.onCopyPaste, this, 'cut'));
toolbar.btnSelectAll.on('click', _.bind(this.onSelectAll, this));
toolbar.btnIncFontSize.on('click', _.bind(this.onIncrease, this));
toolbar.btnDecFontSize.on('click', _.bind(this.onDecrease, this));
toolbar.mnuChangeCase.on('item:click', _.bind(this.onChangeCase, this));
@ -515,7 +517,7 @@ define([
onApiCanCopyCut: function(can) {
if (this._state.can_copycut !== can) {
this.toolbar.lockToolbar(Common.enumLock.copyLock, !can, {array: [this.toolbar.btnCopy]});
this.toolbar.lockToolbar(Common.enumLock.copyLock, !can, {array: [this.toolbar.btnCopy, this.toolbar.btnCut]});
this._state.can_copycut = can;
}
},
@ -1101,10 +1103,10 @@ define([
Common.component.Analytics.trackEvent('ToolBar', 'Redo');
},
onCopyPaste: function(copy, e) {
onCopyPaste: function(type, e) {
var me = this;
if (me.api) {
var res = (copy) ? me.api.Copy() : me.api.Paste();
var res = (type === 'cut') ? me.api.Cut() : ((type === 'copy') ? me.api.Copy() : me.api.Paste());
if (!res) {
if (!Common.localStorage.getBool("de-hide-copywarning")) {
(new Common.Views.CopyWarningDialog({
@ -1120,6 +1122,14 @@ define([
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
},
onSelectAll: function(e) {
if (this.api)
this.api.asc_EditSelectAll();
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Select All');
},
onIncrease: function(e) {
if (this.api)
this.api.FontSizeIn();
@ -2883,7 +2893,7 @@ define([
this.toolbar.lockToolbar(Common.enumLock.disableOnStart, false);
this.toolbar.lockToolbar(Common.enumLock.undoLock, this._state.can_undo!==true, {array: [this.toolbar.btnUndo]});
this.toolbar.lockToolbar(Common.enumLock.redoLock, this._state.can_redo!==true, {array: [this.toolbar.btnRedo]});
this.toolbar.lockToolbar(Common.enumLock.copyLock, this._state.can_copycut!==true, {array: [this.toolbar.btnCopy]});
this.toolbar.lockToolbar(Common.enumLock.copyLock, this._state.can_copycut!==true, {array: [this.toolbar.btnCopy, this.toolbar.btnCut]});
this.toolbar.lockToolbar(Common.enumLock.mmergeLock, !!this._state.mmdisable, {array: [this.toolbar.btnMailRecepients]});
if (!this._state.mmdisable) {
this.toolbar.mnuMailRecepients.items[2].setVisible(this.toolbar.mode.fileChoiceUrl || this.toolbar.mode.canRequestMailMergeRecipients);

View file

@ -25,6 +25,14 @@
<span class="btn-slot" id="slot-btn-redo"></span>
</div>
</div>
<div class="group small">
<div class="elset">
<span class="btn-slot" id="slot-btn-cut"></span>
</div>
<div class="elset">
<span class="btn-slot" id="slot-btn-select-all"></span>
</div>
</div>
<div class="separator long"></div>
</section>
<section class="box-panels">

View file

@ -255,6 +255,27 @@ define([
});
this.paragraphControls.push(this.btnPaste);
this.btnCut = new Common.UI.Button({
id: 'id-toolbar-btn-cut',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-cut',
lock: [_set.copyLock, _set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.imageLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart],
dataHint: '1',
dataHintDirection: 'top',
dataHintTitle: 'X'
});
this.paragraphControls.push(this.btnCut);
this.btnSelectAll = new Common.UI.Button({
id: 'id-toolbar-btn-select-all',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon select-all',
lock: [_set.viewFormMode, _set.disableOnStart],
dataHint: '1',
dataHintDirection: 'bottom'
});
this.toolbarControls.push(this.btnSelectAll);
this.btnIncFontSize = new Common.UI.Button({
id: 'id-toolbar-btn-incfont',
cls: 'btn-toolbar',
@ -1652,6 +1673,8 @@ define([
_injectComponent('#slot-btn-redo', this.btnRedo);
_injectComponent('#slot-btn-copy', this.btnCopy);
_injectComponent('#slot-btn-paste', this.btnPaste);
_injectComponent('#slot-btn-cut', this.btnCut);
_injectComponent('#slot-btn-select-all', this.btnSelectAll);
_injectComponent('#slot-btn-incfont', this.btnIncFontSize);
_injectComponent('#slot-btn-decfont', this.btnDecFontSize);
_injectComponent('#slot-btn-bold', this.btnBold);
@ -1952,6 +1975,8 @@ define([
this.btnRedo.updateHint(this.tipRedo + Common.Utils.String.platformKey('Ctrl+Y'));
this.btnCopy.updateHint(this.tipCopy + Common.Utils.String.platformKey('Ctrl+C'));
this.btnPaste.updateHint(this.tipPaste + Common.Utils.String.platformKey('Ctrl+V'));
this.btnCut.updateHint(this.tipCut + Common.Utils.String.platformKey('Ctrl+X'));
this.btnSelectAll.updateHint(this.tipSelectAll + Common.Utils.String.platformKey('Ctrl+A'));
this.btnIncFontSize.updateHint(this.tipIncFont + Common.Utils.String.platformKey('Ctrl+]'));
this.btnDecFontSize.updateHint(this.tipDecFont + Common.Utils.String.platformKey('Ctrl+['));
this.btnBold.updateHint(this.textBold + Common.Utils.String.platformKey('Ctrl+B'));
@ -2837,7 +2862,9 @@ define([
textTabView: 'View',
mniRemoveHeader: 'Remove Header',
mniRemoveFooter: 'Remove Footer',
mniInsertSSE: 'Insert Spreadsheet'
mniInsertSSE: 'Insert Spreadsheet',
tipSelectAll: 'Select all',
tipCut: 'Cut'
}
})(), DE.Views.Toolbar || {}));
});

View file

@ -139,7 +139,7 @@
right: 0;
top: 0;
bottom: 0;
left: 525px;
left: 587px;
width: inherit;
height: 44px;
}
@ -272,8 +272,8 @@
<div class="brendpanel" style="display: none;">
<div><div class="loading-logo"><img src="../../common/main/resources/img/header/header-logo_s.svg"></div><div class="spacer"></div><div class="circle"></div></div><div><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span></div></div>
<div class="sktoolbar" style="display: none;">
<ul><li></li><li class="space"></li><li style="width: 209px;"></li><li class="space"></li><li style="width: 187px;"></li><li class="space"></li><li style="width: 60px;"></li><li class="fat"></li></ul>
<ul><li></li><li class="space"></li><li style="width: 209px;"></li><li class="space"></li><li style="width: 187px;"></li><li class="space"></li><li style="width: 60px;"></li></ul>
<ul><li class="compact" style="width: 30px;display: none;"></li><li class="compact space" style="display: none;"></li><li class="compact" style="width: 90px;display: none;"></li><li class="not-compact" style="width: 63px;"></li><li class="space"></li><li style="width: 212px;"></li><li class="space"></li><li style="width: 200px;"></li><li class="space"></li><li style="width: 63px;"></li><li class="fat"></li></ul>
<ul><li class="compact" style="width: 30px;display: none;"></li><li class="compact space" style="display: none;"></li><li class="compact" style="width: 90px;display: none;"></li><li class="not-compact" style="width: 63px;"></li><li class="space"></li><li style="width: 212px;"></li><li class="space"></li><li style="width: 200px;"></li><li class="space"></li><li style="width: 63px;"></li></ul>
</div>
<div class="placeholder" style="display: none;">
<div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div>
@ -301,6 +301,16 @@
document.querySelector('.brendpanel > :nth-child(1)').style.height = '28px';
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
document.querySelector('.fat').style.left = '655px';
}
visible && (document.querySelector('.brendpanel').style.display = 'block');
!(view && (params["toolbar"] !== 'true') || notoolbar) && (document.querySelector('.sktoolbar').style.display = 'block');
view && (document.querySelector('.placeholder').style.marginTop = '19px');

View file

@ -117,7 +117,7 @@
right: 0;
top: 0;
bottom: 0;
left: 525px;
left: 587px;
width: inherit;
height: 44px;
}
@ -236,7 +236,7 @@
<body>
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>
<div id="loading-mask" class="loadmask"><div class="brendpanel" style="display: none;"><div><div class="loading-logo"><img src="../../../apps/documenteditor/main/resources/img/header/header-logo_s.svg"></div><div class="spacer"></div><div class="circle"></div></div><div><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span></div></div><div class="sktoolbar" style="display: none;"><ul><li></li><li class="space"></li><li style="width: 209px;"></li><li class="space"></li><li style="width: 187px;"></li><li class="space"></li><li style="width: 60px;"></li><li class="fat"></li></ul><ul><li></li><li class="space"></li><li style="width: 209px;"></li><li class="space"></li><li style="width: 187px;"></li><li class="space"></li><li style="width: 60px;"></li></ul></div><div class="placeholder" style="display: none;"><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div></div></div>
<div id="loading-mask" class="loadmask"><div class="brendpanel" style="display: none;"><div><div class="loading-logo"><img src="../../../apps/documenteditor/main/resources/img/header/header-logo_s.svg"></div><div class="spacer"></div><div class="circle"></div></div><div><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span></div></div><div class="sktoolbar" style="display: none;"><ul><li class="compact" style="width: 30px;display: none;"></li><li class="compact space" style="display: none;"></li><li class="compact" style="width: 90px;display: none;"></li><li class="not-compact" style="width: 63px;"></li><li class="space"></li><li style="width: 212px;"></li><li class="space"></li><li style="width: 200px;"></li><li class="space"></li><li style="width: 63px;"></li><li class="fat"></li></ul><ul><li class="compact" style="width: 30px;display: none;"></li><li class="compact space" style="display: none;"></li><li class="compact" style="width: 90px;display: none;"></li><li class="not-compact" style="width: 63px;"></li><li class="space"></li><li style="width: 212px;"></li><li class="space"></li><li style="width: 200px;"></li><li class="space"></li><li style="width: 63px;"></li></ul></div><div class="placeholder" style="display: none;"><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div></div></div>
<div id="viewport"></div>
<script>
@ -265,6 +265,16 @@
document.querySelector('.brendpanel > :nth-child(1)').style.height = '28px';
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
document.querySelector('.fat').style.left = '655px';
}
visible && (document.querySelector('.brendpanel').style.display = 'block');
!(view && (params["toolbar"] !== 'true') || notoolbar) && (document.querySelector('.sktoolbar').style.display = 'block');
view && (document.querySelector('.placeholder').style.marginTop = '19px');

View file

@ -2907,6 +2907,8 @@
"DE.Views.Toolbar.txtScheme7": "Equity",
"DE.Views.Toolbar.txtScheme8": "Flow",
"DE.Views.Toolbar.txtScheme9": "Foundry",
"DE.Views.Toolbar.tipSelectAll": "Select all",
"DE.Views.Toolbar.tipCut": "Cut",
"DE.Views.ViewTab.textAlwaysShowToolbar": "Always show toolbar",
"DE.Views.ViewTab.textDarkDocument": "Dark document",
"DE.Views.ViewTab.textFitToPage": "Fit To Page",

View file

@ -284,8 +284,10 @@ define([
toolbar.btnUndo.on('disabled', _.bind(this.onBtnChangeState, this, 'undo:disabled'));
toolbar.btnRedo.on('click', _.bind(this.onRedo, this));
toolbar.btnRedo.on('disabled', _.bind(this.onBtnChangeState, this, 'redo:disabled'));
toolbar.btnCopy.on('click', _.bind(this.onCopyPaste, this, true));
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, false));
toolbar.btnCopy.on('click', _.bind(this.onCopyPaste, this, 'copy'));
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, 'paste'));
toolbar.btnCut.on('click', _.bind(this.onCopyPaste, this, 'cut'));
toolbar.btnSelectAll.on('click', _.bind(this.onSelectAll, this));
toolbar.btnIncFontSize.on('click', _.bind(this.onIncrease, this));
toolbar.btnDecFontSize.on('click', _.bind(this.onDecrease, this));
toolbar.btnBold.on('click', _.bind(this.onBold, this));
@ -717,7 +719,7 @@ define([
this._state.no_slides = (count<=0);
this.toolbar.lockToolbar(Common.enumLock.noSlides, this._state.no_slides, {array: this.toolbar.paragraphControls});
this.toolbar.lockToolbar(Common.enumLock.noSlides, this._state.no_slides, {array: [
this.toolbar.btnChangeSlide, this.toolbar.btnPreview, this.toolbar.btnPrint, this.toolbar.btnCopy, this.toolbar.btnPaste,
this.toolbar.btnChangeSlide, this.toolbar.btnPreview, this.toolbar.btnPrint, this.toolbar.btnCopy, this.toolbar.btnCut, this.toolbar.btnSelectAll, this.toolbar.btnPaste,
this.toolbar.btnCopyStyle, this.toolbar.btnInsertTable, this.toolbar.btnInsertChart,
this.toolbar.btnColorSchemas, this.toolbar.btnShapeAlign,
this.toolbar.btnShapeArrange, this.toolbar.btnSlideSize, this.toolbar.listTheme, this.toolbar.btnEditHeader, this.toolbar.btnInsDateTime, this.toolbar.btnInsSlideNum
@ -1109,10 +1111,10 @@ define([
Common.component.Analytics.trackEvent('ToolBar', 'Redo');
},
onCopyPaste: function(copy, e) {
onCopyPaste: function(type, e) {
var me = this;
if (me.api) {
var res = (copy) ? me.api.Copy() : me.api.Paste();
var res = (type === 'cut') ? me.api.Cut() : ((type === 'copy') ? me.api.Copy() : me.api.Paste());
if (!res) {
if (!Common.localStorage.getBool("pe-hide-copywarning")) {
(new Common.Views.CopyWarningDialog({
@ -1128,6 +1130,14 @@ define([
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
},
onSelectAll: function(e) {
if (this.api)
this.api.asc_EditSelectAll();
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Select All');
},
onIncrease: function(e) {
if (this.api)
this.api.FontSizeIn();

View file

@ -25,6 +25,14 @@
<span class="btn-slot" id="slot-btn-redo"></span>
</div>
</div>
<div class="group small">
<div class="elset">
<span class="btn-slot" id="slot-btn-cut"></span>
</div>
<div class="elset">
<span class="btn-slot" id="slot-btn-select-all"></span>
</div>
</div>
<div class="separator long"></div>
</section>
<section class="box-panels">

View file

@ -274,6 +274,27 @@ define([
});
me.paragraphControls.push(me.btnPaste);
me.btnCut = new Common.UI.Button({
id: 'id-toolbar-btn-cut',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-cut',
lock: [_set.slideDeleted, _set.paragraphLock, _set.shapeLock, _set.slideLock, _set.lostConnect, _set.noSlides, _set.disableOnStart],
dataHint: '1',
dataHintDirection: 'top',
dataHintTitle: 'X'
});
me.paragraphControls.push(me.btnCut);
me.btnSelectAll = new Common.UI.Button({
id: 'id-toolbar-btn-select-all',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon select-all',
lock: [_set.noSlides, _set.disableOnStart],
dataHint: '1',
dataHintDirection: 'bottom'
});
me.slideOnlyControls.push(me.btnSelectAll);
me.cmbFontName = new Common.UI.ComboBoxFonts({
cls: 'input-group-nr',
menuCls: 'scrollable-menu',
@ -1100,7 +1121,7 @@ define([
});
this.lockControls = [this.btnChangeSlide, this.btnSave,
this.btnCopy, this.btnPaste, this.btnUndo, this.btnRedo, this.cmbFontName, this.cmbFontSize, this.btnIncFontSize, this.btnDecFontSize,
this.btnCopy, this.btnPaste, this.btnCut, this.btnSelectAll,this.btnUndo, this.btnRedo, this.cmbFontName, this.cmbFontSize, this.btnIncFontSize, this.btnDecFontSize,
this.btnBold, this.btnItalic, this.btnUnderline, this.btnStrikeout, this.btnSuperscript, this.btnChangeCase, this.btnHighlightColor,
this.btnSubscript, this.btnFontColor, this.btnClearStyle, this.btnCopyStyle, this.btnMarkers,
this.btnNumbers, this.btnDecLeftOffset, this.btnIncLeftOffset, this.btnLineSpace, this.btnHorizontalAlign, this.btnColumns,
@ -1206,6 +1227,8 @@ define([
_injectComponent('#slot-btn-redo', this.btnRedo);
_injectComponent('#slot-btn-copy', this.btnCopy);
_injectComponent('#slot-btn-paste', this.btnPaste);
_injectComponent('#slot-btn-cut', this.btnCut);
_injectComponent('#slot-btn-select-all', this.btnSelectAll);
_injectComponent('#slot-btn-bold', this.btnBold);
_injectComponent('#slot-btn-italic', this.btnItalic);
_injectComponent('#slot-btn-underline', this.btnUnderline);
@ -1338,6 +1361,8 @@ define([
this.btnRedo.updateHint(this.tipRedo + Common.Utils.String.platformKey('Ctrl+Y'));
this.btnCopy.updateHint(this.tipCopy + Common.Utils.String.platformKey('Ctrl+C'));
this.btnPaste.updateHint(this.tipPaste + Common.Utils.String.platformKey('Ctrl+V'));
this.btnCut.updateHint(this.tipCut + Common.Utils.String.platformKey('Ctrl+X'));
this.btnSelectAll.updateHint(this.tipSelectAll + Common.Utils.String.platformKey('Ctrl+A'));
this.btnIncFontSize.updateHint(this.tipIncFont + Common.Utils.String.platformKey('Ctrl+]'));
this.btnDecFontSize.updateHint(this.tipDecFont + Common.Utils.String.platformKey('Ctrl+['));
this.btnBold.updateHint(this.textBold + Common.Utils.String.platformKey('Ctrl+B'));
@ -2031,7 +2056,9 @@ define([
tipMarkersDash: 'Dash bullets',
tipNone: 'None',
textTabView: 'View',
mniInsertSSE: 'Insert Spreadsheet'
mniInsertSSE: 'Insert Spreadsheet',
tipSelectAll: 'Select all',
tipCut: 'Cut'
}
}()), PE.Views.Toolbar || {}));
});

View file

@ -121,7 +121,7 @@
}
.loadmask > .sktoolbar li.big {
width: 55px;
width: 50px;
height: 46px;
margin-top: -46px;
}
@ -131,7 +131,7 @@
right: 0;
top: 0;
bottom: 0;
left: 758px;
left: 800px;
width: inherit;
height: 44px;
}
@ -287,8 +287,8 @@
<div><div class="loading-logo"><img src="../../common/main/resources/img/header/header-logo_s.svg"></div><div class="spacer"></div><div class="circle"></div></div><div><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><div class="spacer"></div></div>
</div>
<div class="sktoolbar" style="display: none;">
<ul><li/><li class="space" style="width: 76px;"/><li class="split" /><li class="space"/><li style="width: 176px;"/><li class="space"/><li style="width: 115px;"/><li class="space" style="width: 183px;"/><li style="width: 95px;"/><li class="fat"/></ul>
<ul><li/><li class="space"/><li class="big" style="width: 70px;"/><li class="split" /><li class="space"/><li style="width: 176px;"/><li class="space"/><li style="width: 115px;"/><li class="space"/><li class="big"/><li class="big"/><li class="big"/><li style="width: 95px;"/></ul>
<ul><li class="compact" style="width: 30px;display: none;"></li><li class="compact space" style="display: none;"></li><li class="compact" style="width: 90px;display: none;"></li><li class="not-compact" style="width: 63px;"></li><li class="space" style="width: 54px;"/><li class="split" /><li class="space"/><li style="width: 216px;"/><li class="space"/><li style="width: 136px;"/><li class="space" style="width: 168px;"/><li class="space"/><li style="width: 65px;"/><li class="fat"/></ul>
<ul><li class="compact" style="width: 30px;display: none;"></li><li class="compact space" style="display: none;"></li><li class="compact" style="width: 90px;display: none;"></li><li class="not-compact" style="width: 63px;"></li><li class="space"/><li class="big" style="width: 48px;"/><li class="split" /><li class="space"/><li style="width: 216px;"/><li class="space"/><li style="width: 136px;"/><li class="space"/><li class="big"/><li class="big"/><li class="big"/><li class="space"/><li style="width: 65px;"/></ul>
</div>
<div class="placeholder" style="display: none;">
<div class="slide-h"><div class="slide-v"><div class="slide-container"><div class="line"></div><div class="line empty"></div><div class="line"></div></div></div></div>
@ -316,6 +316,16 @@
document.querySelector('.brendpanel > :nth-child(1)').style.height = '28px';
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
document.querySelector('.fat').style.left = '868px';
}
visible && (document.querySelector('.brendpanel').style.display = 'block');
!(view || notoolbar) && (document.querySelector('.sktoolbar').style.display = 'block');
document.querySelector('.placeholder').style.display = 'block';

View file

@ -109,7 +109,7 @@
}
.loadmask > .sktoolbar li.big {
width: 55px;
width: 50px;
height: 46px;
margin-top: -46px;
}
@ -119,7 +119,7 @@
right: 0;
top: 0;
bottom: 0;
left: 758px;
left: 800px;
width: inherit;
height: 44px;
}
@ -275,8 +275,8 @@
<div><div class="loading-logo"><img src="../../../apps/presentationeditor/main/resources/img/header/header-logo_s.svg"></div><div class="spacer"></div><div class="circle"></div></div><div><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><div class="spacer"></div></div>
</div>
<div class="sktoolbar" style="display: none;">
<ul><li/><li class="space" style="width: 76px;"/><li class="split" /><li class="space"/><li style="width: 176px;"/><li class="space"/><li style="width: 115px;"/><li class="space" style="width: 183px;"/><li style="width: 95px;"/><li class="fat"/></ul>
<ul><li/><li class="space"/><li class="big" style="width: 70px;"/><li class="split" /><li class="space"/><li style="width: 176px;"/><li class="space"/><li style="width: 115px;"/><li class="space"/><li class="big"/><li class="big"/><li class="big"/><li style="width: 95px;"/></ul>
<ul><li class="compact" style="width: 30px;display: none;"></li><li class="compact space" style="display: none;"></li><li class="compact" style="width: 90px;display: none;"></li><li class="not-compact" style="width: 63px;"></li><li class="space" style="width: 54px;"/><li class="split" /><li class="space"/><li style="width: 216px;"/><li class="space"/><li style="width: 136px;"/><li class="space" style="width: 168px;"/><li class="space"/><li style="width: 65px;"/><li class="fat"/></ul>
<ul><li class="compact" style="width: 30px;display: none;"></li><li class="compact space" style="display: none;"></li><li class="compact" style="width: 90px;display: none;"></li><li class="not-compact" style="width: 63px;"></li><li class="space"/><li class="big" style="width: 48px;"/><li class="split" /><li class="space"/><li style="width: 216px;"/><li class="space"/><li style="width: 136px;"/><li class="space"/><li class="big"/><li class="big"/><li class="big"/><li class="space"/><li style="width: 65px;"/></ul>
</div>
<div class="placeholder" style="display: none;">
<div class="slide-h"><div class="slide-v"><div class="slide-container"><div class="line"></div><div class="line empty"></div><div class="line"></div></div></div></div>
@ -310,6 +310,16 @@
document.querySelector('.brendpanel > :nth-child(1)').style.height = '28px';
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
document.querySelector('.fat').style.left = '868px';
}
visible && (document.querySelector('.brendpanel').style.display = 'block');
!(view || notoolbar) && (document.querySelector('.sktoolbar').style.display = 'block');
document.querySelector('.placeholder').style.display = 'block';

View file

@ -2319,6 +2319,8 @@
"PE.Views.Toolbar.txtScheme9": "Foundry",
"PE.Views.Toolbar.txtSlideAlign": "Align to Slide",
"PE.Views.Toolbar.txtUngroup": "Ungroup",
"PE.Views.Toolbar.tipSelectAll": "Select all",
"PE.Views.Toolbar.tipCut": "Cut",
"PE.Views.Transitions.strDelay": "Delay",
"PE.Views.Transitions.strDuration": "Duration",
"PE.Views.Transitions.strStartOnClick": "Start On Click",

View file

@ -282,8 +282,8 @@ define([
if ( me.appConfig.isEditDiagram ) {
toolbar.btnUndo.on('click', _.bind(this.onUndo, this));
toolbar.btnRedo.on('click', _.bind(this.onRedo, this));
toolbar.btnCopy.on('click', _.bind(this.onCopyPaste, this, true));
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, false));
toolbar.btnCopy.on('click', _.bind(this.onCopyPaste, this, 'copy'));
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, 'paste'));
toolbar.btnInsertFormula.on('click', _.bind(this.onInsertFormulaMenu, this));
toolbar.btnInsertFormula.menu.on('item:click', _.bind(this.onInsertFormulaMenu, this));
toolbar.btnDecDecimal.on('click', _.bind(this.onDecrement, this));
@ -299,8 +299,8 @@ define([
if ( me.appConfig.isEditMailMerge ) {
toolbar.btnUndo.on('click', _.bind(this.onUndo, this));
toolbar.btnRedo.on('click', _.bind(this.onRedo, this));
toolbar.btnCopy.on('click', _.bind(this.onCopyPaste, this, true));
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, false));
toolbar.btnCopy.on('click', _.bind(this.onCopyPaste, this, 'copy'));
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, 'paste'));
toolbar.btnSearch.on('toggle', _.bind(this.onSearch, this));
toolbar.btnSortDown.on('click', _.bind(this.onSortType, this, Asc.c_oAscSortOptions.Ascending));
toolbar.btnSortUp.on('click', _.bind(this.onSortType, this, Asc.c_oAscSortOptions.Descending));
@ -310,8 +310,8 @@ define([
if ( me.appConfig.isEditOle ) {
toolbar.btnUndo.on('click', _.bind(this.onUndo, this));
toolbar.btnRedo.on('click', _.bind(this.onRedo, this));
toolbar.btnCopy.on('click', _.bind(this.onCopyPaste, this, true));
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, false));
toolbar.btnCopy.on('click', _.bind(this.onCopyPaste, this, 'copy'));
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, 'paste'));
toolbar.btnSearch.on('toggle', _.bind(this.onSearch, this));
toolbar.btnInsertFormula.on('click', _.bind(this.onInsertFormulaMenu, this));
toolbar.btnInsertFormula.menu.on('item:click', _.bind(this.onInsertFormulaMenu, this));
@ -361,8 +361,10 @@ define([
toolbar.btnUndo.on('disabled', _.bind(this.onBtnChangeState, this, 'undo:disabled'));
toolbar.btnRedo.on('click', _.bind(this.onRedo, this));
toolbar.btnRedo.on('disabled', _.bind(this.onBtnChangeState, this, 'redo:disabled'));
toolbar.btnCopy.on('click', _.bind(this.onCopyPaste, this, true));
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, false));
toolbar.btnCopy.on('click', _.bind(this.onCopyPaste, this, 'copy'));
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, 'paste'));
toolbar.btnCut.on('click', _.bind(this.onCopyPaste, this, 'cut'));
toolbar.btnSelectAll.on('click', _.bind(this.onSelectAll, this));
toolbar.btnIncFontSize.on('click', _.bind(this.onIncreaseFontSize, this));
toolbar.btnDecFontSize.on('click', _.bind(this.onDecreaseFontSize, this));
toolbar.btnBold.on('click', _.bind(this.onBold, this));
@ -559,10 +561,10 @@ define([
Common.component.Analytics.trackEvent('ToolBar', 'Redo');
},
onCopyPaste: function(copy, e) {
onCopyPaste: function(type, e) {
var me = this;
if (me.api) {
var res = (copy) ? me.api.asc_Copy() : me.api.asc_Paste();
var res = (type === 'cut') ? me.api.asc_Cut() : ((type === 'copy') ? me.api.asc_Copy() : me.api.asc_Paste());
if (!res) {
var value = Common.localStorage.getItem("sse-hide-copywarning");
if (!(value && parseInt(value) == 1)) {
@ -579,6 +581,14 @@ define([
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
},
onSelectAll: function(e) {
if (this.api)
this.api.asc_EditSelectAll();
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Select All');
},
onIncreaseFontSize: function(e) {
if (this.api)
this.api.asc_increaseFontSize();

View file

@ -25,6 +25,14 @@
<span class="btn-slot" id="slot-btn-redo"></span>
</div>
</div>
<div class="group small">
<div class="elset">
<span class="btn-slot" id="slot-btn-cut"></span>
</div>
<div class="elset">
<span class="btn-slot" id="slot-btn-select-all"></span>
</div>
</div>
<div class="separator long"></div>
</section>
<section class="box-panels">

View file

@ -737,6 +737,25 @@ define([
]}
);
me.btnCut = new Common.UI.Button({
id: 'id-toolbar-btn-cut',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-cut',
lock: [_set.coAuth, _set.lostConnect, _set.disableOnStart],
dataHint: '1',
dataHintDirection: 'top',
dataHintTitle: 'X'
});
me.btnSelectAll = new Common.UI.Button({
id: 'id-toolbar-btn-select-all',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon select-all',
lock: [_set.disableOnStart],
dataHint: '1',
dataHintDirection: 'bottom'
});
me.cmbFontSize = new Common.UI.ComboBox({
cls : 'input-group-nr',
menuStyle : 'min-width: 55px;',
@ -2031,7 +2050,7 @@ define([
me.btnTableTemplate, me.btnPercentStyle, me.btnCurrencyStyle, me.btnDecDecimal, me.btnAddCell, me.btnDeleteCell, me.btnCondFormat,
me.cmbNumberFormat, me.btnBorders, me.btnInsertImage, me.btnInsertHyperlink,
me.btnInsertChart, me.btnColorSchemas, me.btnInsertSparkline,
me.btnCopy, me.btnPaste, me.listStyles, me.btnPrint,
me.btnCopy, me.btnPaste, me.btnCut, me.btnSelectAll, me.listStyles, me.btnPrint,
/*me.btnSave,*/ me.btnClearStyle, me.btnCopyStyle,
me.btnPageMargins, me.btnPageSize, me.btnPageOrient, me.btnPrintArea, me.btnPrintTitles, me.btnImgAlign, me.btnImgBackward, me.btnImgForward, me.btnImgGroup, me.btnScale,
me.chPrintGridlines, me.chPrintHeadings, me.btnVisibleArea, me.btnVisibleAreaClose, me.btnTextFormatting, me.btnHorizontalAlign, me.btnVerticalAlign
@ -2183,6 +2202,8 @@ define([
_injectComponent('#slot-btn-redo', this.btnRedo);
_injectComponent('#slot-btn-copy', this.btnCopy);
_injectComponent('#slot-btn-paste', this.btnPaste);
_injectComponent('#slot-btn-cut', this.btnCut);
_injectComponent('#slot-btn-select-all', this.btnSelectAll);
_injectComponent('#slot-btn-incfont', this.btnIncFontSize);
_injectComponent('#slot-btn-decfont', this.btnDecFontSize);
_injectComponent('#slot-btn-bold', this.btnBold);
@ -2274,6 +2295,8 @@ define([
_updateHint(this.btnSave, this.btnSaveTip);
_updateHint(this.btnCopy, this.tipCopy + Common.Utils.String.platformKey('Ctrl+C'));
_updateHint(this.btnPaste, this.tipPaste + Common.Utils.String.platformKey('Ctrl+V'));
_updateHint(this.btnCut, this.tipCut + Common.Utils.String.platformKey('Ctrl+X'));
_updateHint(this.btnSelectAll, this.tipSelectAll + Common.Utils.String.platformKey('Ctrl+A'));
_updateHint(this.btnUndo, this.tipUndo + Common.Utils.String.platformKey('Ctrl+Z'));
_updateHint(this.btnRedo, this.tipRedo + Common.Utils.String.platformKey('Ctrl+Y'));
_updateHint(this.btnIncFontSize, this.tipIncFont + Common.Utils.String.platformKey('Ctrl+]'));
@ -3279,6 +3302,8 @@ define([
textDone: 'Done',
tipTextFormatting: 'More text formatting tools',
tipHAligh: 'Horizontal Align',
tipVAligh: 'Vertical Align'
tipVAligh: 'Vertical Align',
tipSelectAll: 'Select all',
tipCut: 'Cut'
}, SSE.Views.Toolbar || {}));
});

View file

@ -129,7 +129,7 @@
right: 0;
top: 0;
bottom: 0;
left: 763px;
left: 854px;
width: inherit;
height: 44px;
}
@ -299,8 +299,8 @@
<div class="spacer"></div><div class="circle"></div></div><div><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><div class="spacer"></div></div>
</div>
<div class="sktoolbar" style="display: none;">
<ul><li/><li class="space"/><li style="width: 219px;"/><li class="space"/><li style="width: 136px;"/><li class="space"/><li style="width: 340px;"/><li class="fat"/></ul>
<ul><li/><li class="space"/><li style="width: 219px;"/><li class="space"/><li style="width: 136px;"/><li class="space"/><li style="width: 340px;"/></ul>
<ul><li class="compact" style="width: 30px;display: none;"></li><li class="compact space" style="display: none;"></li><li class="compact" style="width: 90px;display: none;"></li><li class="not-compact" style="width: 63px;"></li><li class="space"/><li style="width: 223px;"/><li class="space"/><li style="width: 146px;"/><li class="space"/><li style="width: 244px;"/><li class="space"/><li style="width: 118px;"/><li class="fat"/></ul>
<ul><li class="compact" style="width: 30px;display: none;"></li><li class="compact space" style="display: none;"></li><li class="compact" style="width: 90px;display: none;"></li><li class="not-compact" style="width: 63px;"></li><li class="space"/><li style="width: 223px;"/><li class="space"/><li style="width: 146px;"/><li class="space"/><li style="width: 244px;"/><li class="space"/><li style="width: 118px;"/></ul>
</div>
<div class="skformula" style="display: none;">
<ul><li/><li/></ul>
@ -337,6 +337,16 @@
document.querySelector('.brendpanel > :nth-child(1)').style.height = '28px';
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
document.querySelector('.fat').style.left = '923px';
}
visible && (document.querySelector('.brendpanel').style.display = 'block');
!(view || notoolbar) && (document.querySelector('.sktoolbar').style.display = 'block');
document.querySelector('.skformula').style.display = 'block';

View file

@ -108,7 +108,7 @@
right: 0;
top: 0;
bottom: 0;
left: 763px;
left: 854px;
width: inherit;
height: 44px;
}
@ -278,8 +278,8 @@
<div class="spacer"></div><div class="circle"></div></div><div><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><div class="spacer"></div></div>
</div>
<div class="sktoolbar" style="display: none;">
<ul><li/><li class="space"/><li style="width: 219px;"/><li class="space"/><li style="width: 136px;"/><li class="space"/><li style="width: 340px;"/><li class="fat"/></ul>
<ul><li/><li class="space"/><li style="width: 219px;"/><li class="space"/><li style="width: 136px;"/><li class="space"/><li style="width: 340px;"/></ul>
<ul><li class="compact" style="width: 30px;display: none;"></li><li class="compact space" style="display: none;"></li><li class="compact" style="width: 90px;display: none;"></li><li class="not-compact" style="width: 63px;"></li><li class="space"/><li style="width: 223px;"/><li class="space"/><li style="width: 146px;"/><li class="space"/><li style="width: 244px;"/><li class="space"/><li style="width: 118px;"/><li class="fat"/></ul>
<ul><li class="compact" style="width: 30px;display: none;"></li><li class="compact space" style="display: none;"></li><li class="compact" style="width: 90px;display: none;"></li><li class="not-compact" style="width: 63px;"></li><li class="space"/><li style="width: 223px;"/><li class="space"/><li style="width: 146px;"/><li class="space"/><li style="width: 244px;"/><li class="space"/><li style="width: 118px;"/></ul>
</div>
<div class="skformula" style="display: none;">
<ul><li/><li/></ul>
@ -323,6 +323,16 @@
document.querySelector('.brendpanel > :nth-child(1)').style.height = '28px';
}
if (compact) {
document.querySelectorAll('.not-compact').forEach(function(item){
item.remove();
});
document.querySelectorAll('.compact').forEach(function(item){
item.style.display = 'inline-block';
});
document.querySelector('.fat').style.left = '923px';
}
visible && (document.querySelector('.brendpanel').style.display = 'block');
!(view || notoolbar) && (document.querySelector('.sktoolbar').style.display = 'block');
document.querySelector('.skformula').style.display = 'block';

View file

@ -3596,6 +3596,8 @@
"SSE.Views.Toolbar.txtTime": "Time",
"SSE.Views.Toolbar.txtUnmerge": "Unmerge Cells",
"SSE.Views.Toolbar.txtYen": "¥ Yen",
"SSE.Views.Toolbar.tipSelectAll": "Select all",
"SSE.Views.Toolbar.tipCut": "Cut",
"SSE.Views.Top10FilterDialog.textType": "Show",
"SSE.Views.Top10FilterDialog.txtBottom": "Bottom",
"SSE.Views.Top10FilterDialog.txtBy": "by",