Merge branch 'release/v7.2.0' into feature/add-ole-sse
This commit is contained in:
commit
ec50606aa5
|
@ -134,7 +134,7 @@ Common.UI.HintManager = new(function() {
|
|||
return;
|
||||
}
|
||||
if (_isEditDiagram) {
|
||||
_currentSection = [$(window.parent.document).find('.advanced-settings-dlg')[0], window.document];
|
||||
_currentSection = [$(window.parent.document).find('.advanced-settings-dlg:visible')[0], window.document];
|
||||
} else if ($('#file-menu-panel').is(':visible')) {
|
||||
_currentSection = $('#file-menu-panel');
|
||||
} else {
|
||||
|
|
|
@ -50,7 +50,8 @@ define([
|
|||
height: 54,
|
||||
header: false,
|
||||
cls: 'search-bar',
|
||||
alias: 'SearchBar'
|
||||
alias: 'SearchBar',
|
||||
showOpenPanel: true
|
||||
},
|
||||
|
||||
initialize : function(options) {
|
||||
|
@ -62,7 +63,7 @@ define([
|
|||
'<div class="tools">',
|
||||
'<div id="search-bar-back"></div>',
|
||||
'<div id="search-bar-next"></div>',
|
||||
'<div id="search-bar-open-panel"></div>',
|
||||
this.options.showOpenPanel ? '<div id="search-bar-open-panel"></div>' : '',
|
||||
'<div id="search-bar-close"></div>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
|
@ -103,13 +104,15 @@ define([
|
|||
});
|
||||
this.btnNext.on('click', _.bind(this.onBtnNextClick, this, 'next'));
|
||||
|
||||
this.btnOpenPanel = new Common.UI.Button({
|
||||
parentEl: $('#search-bar-open-panel'),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'toolbar__icon more-vertical',
|
||||
hint: this.tipOpenAdvancedSettings
|
||||
});
|
||||
this.btnOpenPanel.on('click', _.bind(this.onOpenPanel, this));
|
||||
if (this.options.showOpenPanel) {
|
||||
this.btnOpenPanel = new Common.UI.Button({
|
||||
parentEl: $('#search-bar-open-panel'),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'toolbar__icon more-vertical',
|
||||
hint: this.tipOpenAdvancedSettings
|
||||
});
|
||||
this.btnOpenPanel.on('click', _.bind(this.onOpenPanel, this));
|
||||
}
|
||||
|
||||
this.btnClose = new Common.UI.Button({
|
||||
parentEl: $('#search-bar-close'),
|
||||
|
|
|
@ -28,6 +28,12 @@
|
|||
<div id="form-txt-pholder"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small">
|
||||
<label class="input-label"><%= scope.textTag %></label>
|
||||
<div id="form-txt-tag"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-large">
|
||||
<label class="input-label"><%= scope.textTip %></label>
|
||||
|
|
|
@ -147,6 +147,24 @@ define([
|
|||
setTimeout(function(){me.txtPlaceholder._input && me.txtPlaceholder._input.select();}, 1);
|
||||
});
|
||||
|
||||
this.txtTag = new Common.UI.InputField({
|
||||
el : $markup.findById('#form-txt-tag'),
|
||||
allowBlank : true,
|
||||
validateOnChange: false,
|
||||
validateOnBlur: false,
|
||||
style : 'width: 100%;',
|
||||
value : '',
|
||||
dataHint : '1',
|
||||
dataHintDirection: 'left',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
this.lockedControls.push(this.txtTag);
|
||||
this.txtTag.on('changed:after', this.onTagChanged.bind(this));
|
||||
this.txtTag.on('inputleave', function(){ me.fireEvent('editcomplete', me);});
|
||||
this.txtTag.cmpEl.on('focus', 'input.form-control', function() {
|
||||
setTimeout(function(){me.txtTag._input && me.txtTag._input.select();}, 1);
|
||||
});
|
||||
|
||||
this.textareaHelp = new Common.UI.TextareaField({
|
||||
el : $markup.findById('#form-txt-help'),
|
||||
style : 'width: 100%; height: 60px;',
|
||||
|
@ -501,6 +519,16 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onTagChanged: function(input, newValue, oldValue, e) {
|
||||
if (this.api && !this._noApply && (newValue!==oldValue)) {
|
||||
var props = this._originalProps || new AscCommon.CContentControlPr();
|
||||
props.put_Tag(newValue);
|
||||
this.api.asc_SetContentControlProperties(props, this.internalId);
|
||||
if (!e.relatedTarget || (e.relatedTarget.localName != 'input' && e.relatedTarget.localName != 'textarea') || !/form-control/.test(e.relatedTarget.className))
|
||||
this.fireEvent('editcomplete', this);
|
||||
}
|
||||
},
|
||||
|
||||
onHelpChanged: function(input, newValue, oldValue, e) {
|
||||
if (this.api && !this._noApply && (newValue!==oldValue)) {
|
||||
var props = this._originalProps || new AscCommon.CContentControlPr();
|
||||
|
@ -830,6 +858,12 @@ define([
|
|||
this._state.placeholder = val;
|
||||
}
|
||||
|
||||
val = props.get_Tag();
|
||||
if (this._state.tag !== val) {
|
||||
this.txtTag.setValue(val ? val : '');
|
||||
this._state.tag = val;
|
||||
}
|
||||
|
||||
val = props.get_Lock();
|
||||
(val===undefined) && (val = Asc.c_oAscSdtLockType.Unlocked);
|
||||
if (this._state.LockDelete !== (val==Asc.c_oAscSdtLockType.SdtContentLocked || val==Asc.c_oAscSdtLockType.SdtLocked)) {
|
||||
|
@ -1341,7 +1375,8 @@ define([
|
|||
textTooBig: 'Image is Too Big',
|
||||
textTooSmall: 'Image is Too Small',
|
||||
textScale: 'When to scale',
|
||||
textBackgroundColor: 'Background Color'
|
||||
textBackgroundColor: 'Background Color',
|
||||
textTag: 'Tag'
|
||||
|
||||
}, DE.Views.FormSettings || {}));
|
||||
});
|
|
@ -1862,6 +1862,7 @@
|
|||
"DE.Views.FormSettings.textRequired": "Required",
|
||||
"DE.Views.FormSettings.textScale": "When to scale",
|
||||
"DE.Views.FormSettings.textSelectImage": "Select Image",
|
||||
"DE.Views.FormSettings.textTag": "Tag",
|
||||
"DE.Views.FormSettings.textTip": "Tip",
|
||||
"DE.Views.FormSettings.textTipAdd": "Add new value",
|
||||
"DE.Views.FormSettings.textTipDelete": "Delete value",
|
||||
|
|
|
@ -1809,6 +1809,7 @@
|
|||
"DE.Views.FormSettings.textRequired": "Обязательно",
|
||||
"DE.Views.FormSettings.textScale": "Когда масштабировать",
|
||||
"DE.Views.FormSettings.textSelectImage": "Выбрать изображение",
|
||||
"DE.Views.FormSettings.textTag": "Тег",
|
||||
"DE.Views.FormSettings.textTip": "Подсказка",
|
||||
"DE.Views.FormSettings.textTipAdd": "Добавить новое значение",
|
||||
"DE.Views.FormSettings.textTipDelete": "Удалить значение",
|
||||
|
|
|
@ -678,6 +678,10 @@ define([
|
|||
switch (s) {
|
||||
case 'replace':
|
||||
case 'search':
|
||||
if (this.mode.isEditMailMerge || this.mode.isEditOle) {
|
||||
this.leftMenu.fireEvent('search:show');
|
||||
return false;
|
||||
}
|
||||
if (!this.leftMenu.btnSearchBar.isDisabled()) {
|
||||
Common.UI.Menu.Manager.hideAll();
|
||||
this.leftMenu.btnAbout.toggle(false);
|
||||
|
@ -766,12 +770,15 @@ define([
|
|||
return false;
|
||||
}
|
||||
if (this.mode.isEditDiagram || this.mode.isEditMailMerge || this.mode.isEditOle) {
|
||||
var searchBarBtn = (this.mode.isEditMailMerge || this.mode.isEditOle) && this.getApplication().getController('Toolbar').toolbar.btnSearch,
|
||||
isSearchOpen = searchBarBtn && searchBarBtn.pressed;
|
||||
menu_opened = $(document.body).find('.open > .dropdown-menu');
|
||||
if (!this.api.isCellEdited && !menu_opened.length) {
|
||||
if (!this.api.isCellEdited && !menu_opened.length && !isSearchOpen) {
|
||||
this.mode.isEditOle && Common.NotificationCenter.trigger('oleedit:close');
|
||||
Common.Gateway.internalMessage('shortcut', {key:'escape'});
|
||||
return false;
|
||||
}
|
||||
isSearchOpen && searchBarBtn.toggle(false);
|
||||
}
|
||||
break;
|
||||
/** coauthoring begin **/
|
||||
|
|
|
@ -47,6 +47,7 @@ define([
|
|||
'common/main/lib/view/SymbolTableDialog',
|
||||
'common/main/lib/view/OptionsDialog',
|
||||
'common/main/lib/util/define',
|
||||
'common/main/lib/view/SearchBar',
|
||||
'spreadsheeteditor/main/app/view/Toolbar',
|
||||
'spreadsheeteditor/main/app/collection/TableTemplates',
|
||||
'spreadsheeteditor/main/app/controller/PivotTable',
|
||||
|
@ -147,6 +148,9 @@ define([
|
|||
},
|
||||
'ViewTab': {
|
||||
'viewtab:showtoolbar': this.onChangeViewMode.bind(this)
|
||||
},
|
||||
'LeftMenu': {
|
||||
'search:show': this.searchShow.bind(this)
|
||||
}
|
||||
});
|
||||
Common.NotificationCenter.on('page:settings', _.bind(this.onApiSheetChanged, this));
|
||||
|
@ -297,7 +301,7 @@ define([
|
|||
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.btnSearch.on('click', _.bind(this.onSearch, this));
|
||||
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));
|
||||
toolbar.btnSetAutofilter.on('click', _.bind(this.onAutoFilter, this));
|
||||
|
@ -308,7 +312,7 @@ define([
|
|||
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.btnSearch.on('click', _.bind(this.onSearch, this));
|
||||
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));
|
||||
toolbar.cmbNumberFormat.on('selected', _.bind(this.onNumberFormatSelect, this));
|
||||
|
@ -1312,8 +1316,27 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
searchShow: function () {
|
||||
if (this.toolbar.btnSearch && this.searchBar && !this.searchBar.isVisible()) {
|
||||
this.toolbar.btnSearch.toggle(true);
|
||||
}
|
||||
},
|
||||
|
||||
onSearch: function(type, btn) {
|
||||
this.getApplication().getController('LeftMenu').showSearchDlg(true);
|
||||
if (!this.searchBar) {
|
||||
this.searchBar = new Common.UI.SearchBar({
|
||||
showOpenPanel: false,
|
||||
width: 303
|
||||
});
|
||||
this.searchBar.on('hide', _.bind(function () {
|
||||
this.toolbar.btnSearch.toggle(false, true);
|
||||
}, this));
|
||||
}
|
||||
if (this.toolbar.btnSearch.pressed) {
|
||||
this.searchBar.show(this.api.asc_GetSelectedText());
|
||||
} else {
|
||||
this.searchBar.hide();
|
||||
}
|
||||
},
|
||||
|
||||
onAutoFilter: function(btn) {
|
||||
|
|
|
@ -295,6 +295,7 @@ define([
|
|||
cls : 'btn-toolbar',
|
||||
iconCls : 'toolbar__icon btn-menu-search',
|
||||
lock : [_set.lostConnect],
|
||||
enableToggle: true,
|
||||
dataHint : '1',
|
||||
dataHintDirection: 'bottom'
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue