From 0bdf8570e1854a10baca1b27b6258cec1ea51a95 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 23 Mar 2018 12:09:09 +0300 Subject: [PATCH 1/4] [DE] Fix Bug 37217 --- apps/common/main/lib/component/DataView.js | 2 +- .../main/app/view/TableOfContentsSettings.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/common/main/lib/component/DataView.js b/apps/common/main/lib/component/DataView.js index 40a19c71f..0d75d97fa 100644 --- a/apps/common/main/lib/component/DataView.js +++ b/apps/common/main/lib/component/DataView.js @@ -552,7 +552,7 @@ define([ window._event = e; // for FireFox only - this.selectRecord(record); + if (this.showLast) this.selectRecord(record); this.lastSelectedRec = null; if (!this.isSuspendEvents) { diff --git a/apps/documenteditor/main/app/view/TableOfContentsSettings.js b/apps/documenteditor/main/app/view/TableOfContentsSettings.js index 0527ffcb3..e7aa47d80 100644 --- a/apps/documenteditor/main/app/view/TableOfContentsSettings.js +++ b/apps/documenteditor/main/app/view/TableOfContentsSettings.js @@ -316,7 +316,7 @@ define([ '
', '
<%= name %>
', '
', - '
', + '
', '
', '
', '
' @@ -593,7 +593,7 @@ define([ if(!/[1-9]/.test(charCode) && !e.ctrlKey && e.keyCode !== Common.UI.Keys.DELETE && e.keyCode !== Common.UI.Keys.BACKSPACE && e.keyCode !== Common.UI.Keys.LEFT && e.keyCode !== Common.UI.Keys.RIGHT && e.keyCode !== Common.UI.Keys.HOME && e.keyCode !== Common.UI.Keys.END && e.keyCode !== Common.UI.Keys.ESC && e.keyCode !== Common.UI.Keys.INSERT && - e.keyCode !== Common.UI.Keys.TAB || input.val().length>1){ + e.keyCode !== Common.UI.Keys.TAB){ e.preventDefault(); e.stopPropagation(); } @@ -628,8 +628,10 @@ define([ onItemChange: function(listView, itemView, record) { this.addEvents(listView, itemView, record); + var inp = itemView.$el.find('input'); setTimeout(function(){ - itemView.$el.find('input').focus(); + inp.focus(); + inp[0].selectionStart = inp[0].selectionEnd = inp[0].value.length; }, 10); }, From 89cf77c1721c5dd925887fef41a26d4789c0d1c6 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 23 Mar 2018 16:00:57 +0300 Subject: [PATCH 2/4] Customization goback parameter doesn't depend of license. --- apps/common/main/lib/view/Header.js | 10 +++------- apps/documenteditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/spreadsheeteditor/main/app/controller/Main.js | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 5f2895b03..ca5fe4918 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -208,8 +208,6 @@ define([ appConfig = mode; var me = this; - if ( !(me.branding && me.branding.goback && me.branding.goback.text) ) - me.btnGoBack.updateHint(me.textBack); me.btnGoBack.on('click', function (e) { Common.NotificationCenter.trigger('goback'); }); @@ -482,10 +480,6 @@ define([ element.css({'background-image': 'none', width: 'auto'}); } } - - if ( !!value.goback && value.goback.text) { - this.btnGoBack.updateHint(value.goback.text); - } } }, @@ -527,10 +521,12 @@ define([ this.labelDocName.text(_name); }, - setCanBack: function (value) { + setCanBack: function (value, text) { this.canBack = value; this.btnGoBack[value ? 'show' : 'hide'](); + if (value) + this.btnGoBack.updateHint((text && typeof text == 'string') ? text : this.textBack); }, getCanBack: function () { diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index d24bc1d8c..681b0d0a6 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -313,7 +313,7 @@ define([ this.plugins = this.editorConfig.plugins; appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header'); - appHeader.setCanBack(this.appOptions.canBackToFolder === true); + appHeader.setCanBack(this.appOptions.canBackToFolder === true, (this.appOptions.canBackToFolder) ? this.editorConfig.customization.goback.text : ''); if (this.editorConfig.lang) this.api.asc_setLocale(this.editorConfig.lang); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 82f78f1d3..a8765bc2e 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -292,7 +292,7 @@ define([ this.plugins = this.editorConfig.plugins; appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header'); - appHeader.setCanBack(this.appOptions.canBackToFolder === true); + appHeader.setCanBack(this.appOptions.canBackToFolder === true, (this.appOptions.canBackToFolder) ? this.editorConfig.customization.goback.text : ''); if (this.editorConfig.lang) this.api.asc_setLocale(this.editorConfig.lang); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 9f853ed88..a3dfb9896 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -307,7 +307,7 @@ define([ this.plugins = this.editorConfig.plugins; this.headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header'); - this.headerView.setCanBack(this.appOptions.canBackToFolder === true); + this.headerView.setCanBack(this.appOptions.canBackToFolder === true, (this.appOptions.canBackToFolder) ? this.editorConfig.customization.goback.text : ''); var value = Common.localStorage.getItem("sse-settings-reg-settings"); if (value!==null) From 582b7e16e4fcc723695034378a37826dad50671d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 23 Mar 2018 17:11:51 +0300 Subject: [PATCH 3/4] [DE] Change special paste. --- apps/documenteditor/main/app/view/DocumentHolder.js | 4 +++- apps/documenteditor/main/locale/en.json | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index 35787eb77..11fd1c0eb 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -617,6 +617,7 @@ define([ if (pasteContainer.length < 1) { me._arrSpecialPaste = []; me._arrSpecialPaste[Asc.c_oSpecialPasteProps.paste] = me.textPaste; + me._arrSpecialPaste[Asc.c_oSpecialPasteProps.sourceformatting] = me.txtPasteSourceFormat; me._arrSpecialPaste[Asc.c_oSpecialPasteProps.keepTextOnly] = me.txtKeepTextOnly; me._arrSpecialPaste[Asc.c_oSpecialPasteProps.insertAsNestedTable] = me.textNest; me._arrSpecialPaste[Asc.c_oSpecialPasteProps.overwriteCells] = me.txtOverwriteCells; @@ -3726,7 +3727,8 @@ define([ textUpdatePages: 'Refresh page numbers only', textTOCSettings: 'Table of contents settings', textTOC: 'Table of contents', - textRefreshField: 'Refresh field' + textRefreshField: 'Refresh field', + txtPasteSourceFormat: 'Keep source formatting' }, DE.Views.DocumentHolder || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index c87840c5d..fb020e770 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -978,6 +978,7 @@ "DE.Views.DocumentHolder.txtMatrixAlign": "Matrix alignment", "DE.Views.DocumentHolder.txtOverbar": "Bar over text", "DE.Views.DocumentHolder.txtOverwriteCells": "Overwrite cells", + "DE.Views.DocumentHolder.txtPasteSourceFormat": "Keep source formatting", "DE.Views.DocumentHolder.txtPressLink": "Press CTRL and click link", "DE.Views.DocumentHolder.txtRemFractionBar": "Remove fraction bar", "DE.Views.DocumentHolder.txtRemLimit": "Remove limit", From f11f79b1b9f7f79fab08691e8c3ff48628b7b11e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 23 Mar 2018 17:15:42 +0300 Subject: [PATCH 4/4] Fix Bug 37291 --- apps/common/main/lib/view/Chat.js | 4 ++-- apps/common/main/lib/view/Comments.js | 2 +- apps/common/main/resources/less/chat.less | 14 +++++++++----- apps/common/main/resources/less/comments.less | 3 +-- apps/common/main/resources/less/history.less | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/apps/common/main/lib/view/Chat.js b/apps/common/main/lib/view/Chat.js index 8d5a6212a..50489737b 100644 --- a/apps/common/main/lib/view/Chat.js +++ b/apps/common/main/lib/view/Chat.js @@ -60,8 +60,8 @@ define([ storeMessages: undefined, tplUser: ['
  • "<% if (!user.get("online")) { %> class="offline"<% } %>>', - '
    ;" >', - '', + '
    <%= scope.getUserName(user.get("username")) %>', + '
    ;" >
    ', '
    ', '
  • '].join(''), diff --git a/apps/common/main/lib/view/Comments.js b/apps/common/main/lib/view/Comments.js index 164e936ed..efda93c5c 100644 --- a/apps/common/main/lib/view/Comments.js +++ b/apps/common/main/lib/view/Comments.js @@ -1370,7 +1370,7 @@ define([ return Common.Utils.String.ellipsis(Common.Utils.String.htmlEncode(quote), 120, true); }, getUserName: function (username) { - return Common.Utils.String.ellipsis(Common.Utils.String.htmlEncode(username), 22, true); + return Common.Utils.String.htmlEncode(username); }, pickLink: function (message) { diff --git a/apps/common/main/resources/less/chat.less b/apps/common/main/resources/less/chat.less index 150cc3c52..68adc3702 100644 --- a/apps/common/main/resources/less/chat.less +++ b/apps/common/main/resources/less/chat.less @@ -52,22 +52,24 @@ } .color { + position: absolute; + top: 0; + left: 0; + margin-top: 1px; width: 12px; height: 12px; - display: inline-block; - vertical-align: middle; border: 1px solid @gray-dark; } .name { display: block; - padding-left: 16px; + position: relative; + padding: 0 10px 0 16px; margin-top: -2px; white-space: nowrap; text-overflow: ellipsis; + overflow: hidden; font-weight: bold; - vertical-align: middle; - } } @@ -94,6 +96,8 @@ .user { font-weight: bold; white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .message { diff --git a/apps/common/main/resources/less/comments.less b/apps/common/main/resources/less/comments.less index 4cc965474..6fdc89c6f 100644 --- a/apps/common/main/resources/less/comments.less +++ b/apps/common/main/resources/less/comments.less @@ -113,10 +113,9 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - padding: 10px 0px 0 0px; + padding: 10px 65px 0 0px; height: 26px; cursor: default; - max-width: 155px; } .user-name-colored { diff --git a/apps/common/main/resources/less/history.less b/apps/common/main/resources/less/history.less index 340c64b37..7b2289279 100644 --- a/apps/common/main/resources/less/history.less +++ b/apps/common/main/resources/less/history.less @@ -121,8 +121,8 @@ font-size: 12px; cursor: pointer; color: @gray-darker; - max-width: 210px; text-overflow: ellipsis; + padding-right: 35px; } .color {