From 2a3f006beca2224f161cce8ba23e1eef0c112fe1 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 2 Nov 2017 12:14:53 +0300 Subject: [PATCH] Signature settings refactoring. --- .../main/app/view/SignatureSettings.js | 12 +++++++++--- .../main/resources/less/rightmenu.less | 6 ++++++ .../main/app/view/SignatureSettings.js | 7 +++++-- .../main/resources/less/rightmenu.less | 6 ++++++ .../main/app/view/SignatureSettings.js | 12 +++++++++--- .../main/resources/less/rightmenu.less | 6 ++++++ 6 files changed, 41 insertions(+), 8 deletions(-) diff --git a/apps/documenteditor/main/app/view/SignatureSettings.js b/apps/documenteditor/main/app/view/SignatureSettings.js index 6803cdcb3..9e089fdd0 100644 --- a/apps/documenteditor/main/app/view/SignatureSettings.js +++ b/apps/documenteditor/main/app/view/SignatureSettings.js @@ -86,7 +86,7 @@ define([ '', '<% _.each(signatures, function(item) { %>', '', - '', + '', '', '', '<% }); %>', @@ -100,10 +100,10 @@ define([ '', '<% _.each(signatures, function(item) { %>', '', - '
<%= Common.Utils.String.htmlEncode(item.name) %>
', + '
<%= Common.Utils.String.htmlEncode(item.name) %>
', '', '', - '<%= Common.Utils.String.htmlEncode(item.date) %>', + '', '<% }); %>', '', '' @@ -202,7 +202,13 @@ define([ // this.cntInvalidSign.html(this.templateValid({signatures: [{name: 'Mary White', guid: '111', date: '18/05/2017'}, {name: 'John Black', guid: '456', date: '18/05/2017'}], header: this.strInvalid})); this.$linksSign = $('.signature-sign-link', this.$el); + var width = this.$linksSign.width(); + $('.signature-sign-name', this.cntRequestedSign).css('max-width', 170-width); + this.$linksView = $('.signature-view-link', this.$el); + width = this.$linksView.width(); + $('.signature-sign-name', this.cntValidSign).css('max-width', 170-width); + $('.signature-sign-name', this.cntInvalidSign).css('max-width', 170-width); }, addVisibleSign: function(btn) { diff --git a/apps/documenteditor/main/resources/less/rightmenu.less b/apps/documenteditor/main/resources/less/rightmenu.less index f4ea5aab2..c458f8274 100644 --- a/apps/documenteditor/main/resources/less/rightmenu.less +++ b/apps/documenteditor/main/resources/less/rightmenu.less @@ -269,3 +269,9 @@ button:active:not(.disabled) .btn-change-shape {background-position: -56px - .gradient-radial-center { background-position: -100px -150px; } + +.signature-sign-name { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} \ No newline at end of file diff --git a/apps/presentationeditor/main/app/view/SignatureSettings.js b/apps/presentationeditor/main/app/view/SignatureSettings.js index f0d85fb1d..28b6af1a6 100644 --- a/apps/presentationeditor/main/app/view/SignatureSettings.js +++ b/apps/presentationeditor/main/app/view/SignatureSettings.js @@ -84,10 +84,10 @@ define([ '', '<% _.each(signatures, function(item) { %>', '', - '
<%= Common.Utils.String.htmlEncode(item.name) %>
', + '
<%= Common.Utils.String.htmlEncode(item.name) %>
', '', '', - '<%= Common.Utils.String.htmlEncode(item.date) %>', + '', '<% }); %>', '', '' @@ -172,6 +172,9 @@ define([ // this.cntInvalidSign.html(this.templateValid({signatures: [{name: 'Mary White', guid: '111', date: '18/05/2017'}, {name: 'John Black', guid: '456', date: '18/05/2017'}], header: this.strInvalid})); this.$linksView = $('.signature-view-link', this.$el); + var width = this.$linksView.width(); + $('.signature-sign-name', this.cntValidSign).css('max-width', 170-width); + $('.signature-sign-name', this.cntInvalidSign).css('max-width', 170-width); }, addInvisibleSign: function(btn) { diff --git a/apps/presentationeditor/main/resources/less/rightmenu.less b/apps/presentationeditor/main/resources/less/rightmenu.less index ede64e887..f48935637 100644 --- a/apps/presentationeditor/main/resources/less/rightmenu.less +++ b/apps/presentationeditor/main/resources/less/rightmenu.less @@ -204,4 +204,10 @@ button:active:not(.disabled) .btn-change-shape {background-position: -56px - .gradient-radial-center { background-position: -100px -150px; +} + +.signature-sign-name { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/view/SignatureSettings.js b/apps/spreadsheeteditor/main/app/view/SignatureSettings.js index c11eaf545..4bebf984a 100644 --- a/apps/spreadsheeteditor/main/app/view/SignatureSettings.js +++ b/apps/spreadsheeteditor/main/app/view/SignatureSettings.js @@ -86,7 +86,7 @@ define([ '', '<% _.each(signatures, function(item) { %>', '', - '', + '', '', '', '<% }); %>', @@ -100,10 +100,10 @@ define([ '', '<% _.each(signatures, function(item) { %>', '', - '
<%= Common.Utils.String.htmlEncode(item.name) %>
', + '
<%= Common.Utils.String.htmlEncode(item.name) %>
', '', '', - '<%= Common.Utils.String.htmlEncode(item.date) %>', + '', '<% }); %>', '', '' @@ -202,7 +202,13 @@ define([ // this.cntInvalidSign.html(this.templateValid({signatures: [{name: 'Mary White', guid: '111', date: '18/05/2017'}, {name: 'John Black', guid: '456', date: '18/05/2017'}], header: this.strInvalid})); this.$linksSign = $('.signature-sign-link', this.$el); + var width = this.$linksSign.width(); + $('.signature-sign-name', this.cntRequestedSign).css('max-width', 170-width); + this.$linksView = $('.signature-view-link', this.$el); + width = this.$linksView.width(); + $('.signature-sign-name', this.cntValidSign).css('max-width', 170-width); + $('.signature-sign-name', this.cntInvalidSign).css('max-width', 170-width); }, addVisibleSign: function(btn) { diff --git a/apps/spreadsheeteditor/main/resources/less/rightmenu.less b/apps/spreadsheeteditor/main/resources/less/rightmenu.less index 2d7c0bb6c..2047d2f20 100644 --- a/apps/spreadsheeteditor/main/resources/less/rightmenu.less +++ b/apps/spreadsheeteditor/main/resources/less/rightmenu.less @@ -391,3 +391,9 @@ button:active:not(.disabled) .btn-change-shape {background-position: -56px - display: inline-block; } } + +.signature-sign-name { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} \ No newline at end of file