diff --git a/test/spreadsheeteditor/main/js/ApplicationController.js b/test/spreadsheeteditor/main/js/ApplicationController.js
index 5c0ad2d3a..77a6d4c37 100644
--- a/test/spreadsheeteditor/main/js/ApplicationController.js
+++ b/test/spreadsheeteditor/main/js/ApplicationController.js
@@ -75,7 +75,7 @@ SSE.ApplicationController = new(function(){
//common.controller.modals.init(embedConfig);
// Docked toolbar
- if (embedConfig.toolbarDocked === 'bottom') {
+ /*if (embedConfig.toolbarDocked === 'bottom') {
$('#toolbar').addClass('bottom');
$('.viewer').addClass('bottom');
$('#box-tools').removeClass('dropdown').addClass('dropup');
@@ -83,7 +83,7 @@ SSE.ApplicationController = new(function(){
} else {
$('#toolbar').addClass('top');
$('.viewer').addClass('top');
- }
+ }*/
config.canBackToFolder = (config.canBackToFolder!==false) && config.customization && config.customization.goback &&
(config.customization.goback.url || config.customization.goback.requestClose && config.canRequestClose);
@@ -138,8 +138,8 @@ SSE.ApplicationController = new(function(){
}
embedConfig.docTitle = docConfig.title;
- labelDocName = $('#title-doc-name');
- labelDocName.text(embedConfig.docTitle || '')
+ /* labelDocName = $('#title-doc-name');
+ labelDocName.text(embedConfig.docTitle || '')*/
}
}
@@ -185,11 +185,11 @@ SSE.ApplicationController = new(function(){
function onPrint() {
if ( permissions.print!==false )
- api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
+ api.asc_Print(new Asc.asc_CDownloadOptions(null, true));
}
function onPrintUrl(url) {
- common.utils.dialogPrint(url, api);
+ //common.utils.dialogPrint(url, api);
}
function hidePreloader() {
@@ -201,7 +201,7 @@ SSE.ApplicationController = new(function(){
onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
- if ( permissions.print === false)
+ /*if ( permissions.print === false)
$('#idt-print').hide();
if ( !embedConfig.saveUrl && permissions.print === false)
@@ -222,7 +222,7 @@ SSE.ApplicationController = new(function(){
if ( !embedConfig.saveUrl && permissions.print === false && !embedConfig.shareUrl && !embedConfig.embedUrl && !embedConfig.fullscreenUrl && !config.canBackToFolder)
$('#box-tools').addClass('hidden');
else if (!embedConfig.embedUrl && !embedConfig.fullscreenUrl)
- $('#box-tools .divider').hide();
+ $('#box-tools .divider').hide();*/
/*common.controller.modals.attach({
share: '#idt-share',
@@ -232,8 +232,8 @@ SSE.ApplicationController = new(function(){
api.asc_registerCallback('asc_onMouseMove', onApiMouseMove);
api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink);
api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl);
- api.asc_registerCallback('asc_onPrint', onPrint);
- api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
+ //api.asc_registerCallback('asc_onPrint', onPrint);
+ //api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
Common.Gateway.on('processmouse', onProcessMouse);
@@ -243,7 +243,7 @@ SSE.ApplicationController = new(function(){
- SSE.ApplicationView.tools.get('#idt-fullscreen')
+ /*SSE.ApplicationView.tools.get('#idt-fullscreen')
.on('click', function(){
common.utils.openLink(embedConfig.fullscreenUrl);
});
@@ -256,8 +256,6 @@ SSE.ApplicationController = new(function(){
if (permissions.print!==false){
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
}
-
- //Common.Analytics.trackEvent('Save');
});
SSE.ApplicationView.tools.get('#idt-print')
@@ -310,7 +308,7 @@ SSE.ApplicationController = new(function(){
ismoved = false;
}, 2000);
}
- });
+ });*/
var ismodalshown = false;
$(document.body).on('show.bs.modal', '.modal',
@@ -352,33 +350,10 @@ SSE.ApplicationController = new(function(){
});
Common.Gateway.documentReady();
- //Common.Analytics.trackEvent('Load', 'Complete');
}
function onEditorPermissions(params) {
api.asc_setAutoSaveGap(1);
- if ( (params.asc_getLicenseType() === Asc.c_oLicenseResult.Success) && (typeof config.customization == 'object') &&
- config.customization && config.customization.logo ) {
-
- var logo = $('#header-logo');
- if (config.customization.logo.imageEmbedded) {
- logo.html('
');
- logo.css({'background-image': 'none', width: 'auto', height: 'auto'});
- }
-
- if (config.customization.logo.url) {
- logo.attr('href', config.customization.logo.url);
- }
- }
-
- var $parent = labelDocName.parent();
- var _left_width = $parent.position().left,
- _right_width = $parent.next().outerWidth();
-
- if ( _left_width < _right_width )
- $parent.css('padding-left', _right_width - _left_width);
- else
- $parent.css('padding-right', _left_width - _right_width);
onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
@@ -430,8 +405,6 @@ SSE.ApplicationController = new(function(){
}
me.loadMask && me.loadMask.hide();
- /* if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || Common.Utils.ModalWindow.isVisible() || this.inFormControl) ))
- this.onEditComplete(this.loadMask, {restorefocus:true});*/
}
}
diff --git a/test/spreadsheeteditor/main/js/ApplicationView.js b/test/spreadsheeteditor/main/js/ApplicationView.js
index cd16ae144..1f03ca6ac 100644
--- a/test/spreadsheeteditor/main/js/ApplicationView.js
+++ b/test/spreadsheeteditor/main/js/ApplicationView.js
@@ -46,14 +46,7 @@ SSE.ApplicationView = new(function(){
$btnTools.addClass('dropdown-toggle').attr('data-toggle', 'dropdown').attr('aria-expanded', 'true');
$btnTools.parent().append(
'');
+ '');
}
function getTools(name) {
diff --git a/test/unit-tests/common/main/lib/controller/CellEditor.js b/test/unit-tests/common/main/lib/controller/CellEditor.js
index 695834e05..544ae9d69 100644
--- a/test/unit-tests/common/main/lib/controller/CellEditor.js
+++ b/test/unit-tests/common/main/lib/controller/CellEditor.js
@@ -1,7 +1,7 @@
!window.common && (window.common = {});
!common.controller && (common.controller = {});
-Common.UI = _.extend(Common.UI || {}, {
+common.ui = _.extend(common.ui || {}, {
Keys : {
BACKSPACE: 8,
TAB: 9,
@@ -49,17 +49,16 @@ common.controller.CellEditor = new(function(){
created=false;
function onCellName(e){
- if (e.keyCode == Common.UI.Keys.RETURN){
+ if (e.keyCode == common.ui.Keys.RETURN){
var name = editor.$cellname.val();
if (name && name.length) {
api.asc_findCell(name);
}
- //Common.NotificationCenter.trigger('edit:complete', editor);
}
}
function onKeyupCellEditor(e) {
- if(e.keyCode == Common.UI.Keys.RETURN && !e.altKey){
+ if(e.keyCode == common.ui.Keys.RETURN && !e.altKey){
api.isCEditorFocused = 'clear';
}
}
@@ -71,28 +70,10 @@ common.controller.CellEditor = new(function(){
api.isCEditorFocused = true;
}
- function expandEditorField() {
- if ( Math.floor(editor.$el.height()) > 19) {
- editor.keep_height = editor.$el.height();
- editor.$el.height(19);
- editor.$el.removeClass('expanded');
- editor.$btnexpand['removeClass']('btn-collapse');
- common.localStorage.setBool('sse-celleditor-expand', false);
- } else {
- editor.$el.height(editor.keep_height);
- editor.$el.addClass('expanded');
- editor.$btnexpand['addClass']('btn-collapse');
- common.localStorage.setBool('sse-celleditor-expand', true);
- }
-
- }
-
function events() {
editor.$el.find('#ce-cell-name').on( 'keyup', onCellName);
editor.$el.find('textarea#ce-cell-content').on( 'keyup', onKeyupCellEditor);
editor.$el.find('textarea#ce-cell-content').on('blur', onBlurCellEditor);
- //editor.$el.find('button#ce-btn-expand').on('click', expandEditorField);/*,
- /*'click button#ce-func-label': onInsertFunction*/
}
function createController() {
@@ -100,7 +81,6 @@ common.controller.CellEditor = new(function(){
if (created)
return me;
-
created = true;
onLaunch();
return me;
@@ -108,39 +88,23 @@ common.controller.CellEditor = new(function(){
function onLayoutResize(o, r) {
if (r == 'cell:edit') {
- /*if (Math.floor(editor.$el.height()) > 19) {
- if (!editor.$btnexpand.hasClass('btn-collapse')) {
- editor.$el.addClass('expanded');
- editor.$btnexpand['addClass']('btn-collapse');
- }
-
- o && common.localStorage.setItem('sse-celleditor-height', editor.$el.height());
- o && common.localStorage.setBool('sse-celleditor-expand', true);
- } else {*/
- editor.$el.removeClass('expanded');
- editor.$btnexpand['removeClass']('btn-collapse');
o && common.localStorage.setBool('sse-celleditor-expand', false);
- //}
}
}
function onLaunch(){
common.view.CellEditor.create();
editor = common.view.CellEditor;
- //me.bindViewEvents(editor, events);
events();
editor.$el.parent().find('.after').css({zIndex: '4'}); // for spreadsheets - bug 23127
var val = common.localStorage.getItem('sse-celleditor-height');
- editor.keep_height = (val!==null && parseInt(val)>0) ? parseInt(val) : 74;
+ editor.keep_height = (val!==null && parseInt(val)>0) ? parseInt(val) : 19;
if (common.localStorage.getBool('sse-celleditor-expand')) {
editor.$el.height(editor.keep_height);
onLayoutResize(undefined, 'cell:edit');
}
-
- /* editor.btnNamedRanges.menu.on('item:click', _.bind(this.onNamedRangesMenu, this))
- .on('show:before', _.bind(this.onNameBeforeShow, this));*/
this.namedrange_locked = false;
}
@@ -161,7 +125,6 @@ common.controller.CellEditor = new(function(){
api.isCEditorFocused = false;
editor.cell.nameDisabled(false);
}
- editor.$btnfunc.toggleClass('disabled', state == Asc.c_oAscCellEditorState.editText);
}
function onLockDefNameManager(state) {
@@ -169,27 +132,17 @@ common.controller.CellEditor = new(function(){
}
function onInputKeyDown(e) {
- if (Common.UI.Keys.UP === e.keyCode || Common.UI.Keys.DOWN === e.keyCode ||
- Common.UI.Keys.TAB === e.keyCode || Common.UI.Keys.RETURN === e.keyCode || Common.UI.Keys.ESC === e.keyCode ||
- Common.UI.Keys.LEFT === e.keyCode || Common.UI.Keys.RIGHT === e.keyCode) {
+ /*if (common.ui.Keys.UP === e.keyCode || common.ui.Keys.DOWN === e.keyCode ||
+ common.ui.Keys.TAB === e.keyCode || common.ui.Keys.RETURN === e.keyCode || common.ui.Keys.ESC === e.keyCode ||
+ common.ui.Keys.LEFT === e.keyCode || common.ui.Keys.RIGHT === e.keyCode) {
var menu = $('#menu-formula-selection'); // for formula menu
if (menu.hasClass('open'))
menu.find('.dropdown-menu').trigger('keydown', e);
- }
+ }*/
}
function onApiDisconnect() {
mode.isEdit = false;
-
- var controller = this.getApplication().getController('FormulaDialog');
- if (controller) {
- controller.hideDialog();
- }
-
- if (!mode.isEdit) {
- $('#ce-func-label', editor.$el).addClass('disabled');
- editor.btnNamedRanges.setVisible(false);
- }
}
function setApi(apiF){
@@ -205,25 +158,11 @@ common.controller.CellEditor = new(function(){
function onApiSelectionChanged(info) {
if (this.viewmode) return; // signed file
-
- var seltype = info.asc_getSelectionType(),
- coauth_disable = (!mode.isEditMailMerge && !mode.isEditDiagram) ? (info.asc_getLocked() === true || info.asc_getLockedTable() === true || info.asc_getLockedPivotTable()===true) : false;
-
- var is_chart_text = seltype == Asc.c_oAscSelectionType.RangeChartText,
- is_chart = seltype == Asc.c_oAscSelectionType.RangeChart,
- is_shape_text = seltype == Asc.c_oAscSelectionType.RangeShapeText,
- is_shape = seltype == Asc.c_oAscSelectionType.RangeShape,
- is_image = seltype == Asc.c_oAscSelectionType.RangeImage || seltype == Asc.c_oAscSelectionType.RangeSlicer,
- is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart;
-
- editor.$btnfunc.toggleClass('disabled', is_image || is_mode_2 || coauth_disable);
}
function setMode(modeF) {
mode = modeF;
- editor.$btnfunc[mode.isEdit?'removeClass':'addClass']('disabled');
-
if ( mode.isEdit ) {
api.asc_registerCallback('asc_onSelectionChanged', onApiSelectionChanged);
}
@@ -232,7 +171,6 @@ common.controller.CellEditor = new(function(){
function setPreviewMode(mode) {
if (this.viewmode === mode) return;
this.viewmode = mode;
- //editor.$btnfunc[!mode && mode.isEdit?'removeClass':'addClass']('disabled');
editor.cell.nameDisabled(mode && !(mode.isEdit && !mode.isEditDiagram && !mode.isEditMailMerge));
}
diff --git a/test/unit-tests/common/main/lib/view/CellEditor.js b/test/unit-tests/common/main/lib/view/CellEditor.js
index 701c576d5..5e9cc970d 100644
--- a/test/unit-tests/common/main/lib/view/CellEditor.js
+++ b/test/unit-tests/common/main/lib/view/CellEditor.js
@@ -30,25 +30,13 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
-/**
- * CellEditor.js
- *
- * Displays loading mask over selected element(s) or component. Accepts both single and multiple selectors.
- *
- * Created by Sharova Olga 07.09.2021
- * Copyright (c) 2021 Ascensio System SIA. All rights reserved.
- *
- */
+
!window.common && (window.common = {});
!common.view && (common.view = {});
common.view.CellEditor = new(function (){
- var me
- ,$cellname
- ,$cellcontent
- ,$btnexpand
- ,$btnfunc;
+ var me;
function createView()
{
@@ -56,9 +44,6 @@ common.view.CellEditor = new(function (){
me.$el = $('#cell-editing-box');
me.$cellcontent=$('#ce-cell-content');
me.$cellname = $('#ce-cell-name');
- me.$btnexpand = $('#ce-btn-expand');
- me.$btnfunc = $('#ce-func-label');
- me.$btnfunc.addClass('disabled');
me.$cellname.on('focus', function(e){
var txt = me.$cellname[0];
diff --git a/test/unit-tests/common/main/resources/less/common.less b/test/unit-tests/common/main/resources/less/common.less
index e9ac9315e..7797bc79a 100644
--- a/test/unit-tests/common/main/resources/less/common.less
+++ b/test/unit-tests/common/main/resources/less/common.less
@@ -97,7 +97,8 @@
padding: 0;
left: 0;
right: 0;
-
+ top: 0;
+ bottom: 0;
&.top {
top: 48px;
bottom: 0;