From 9f3d70bbf0fedb2317a9ce275971c4fb9ac5a14e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 5 Oct 2016 13:40:18 +0300 Subject: [PATCH] Highlight document name when it can be renamed. --- apps/common/main/lib/template/Header.template | 2 +- apps/common/main/lib/view/Header.js | 5 +++-- apps/common/main/resources/less/header.less | 11 ++++++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/apps/common/main/lib/template/Header.template b/apps/common/main/lib/template/Header.template index eb375f8e0..fe5404283 100644 --- a/apps/common/main/lib/template/Header.template +++ b/apps/common/main/lib/template/Header.template @@ -2,6 +2,6 @@
<%= headerCaption %>
-
<%= documentCaption %>
+
<%= documentCaption %>
<%= textBack %>
\ No newline at end of file diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 2974c8971..a0880708f 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -166,7 +166,7 @@ define([ if (!value) value = ''; - var dc = $('#header-documentcaption span'); + var dc = $('#header-documentcaption div'); if (dc) dc.html(Common.Utils.String.htmlEncode(value)); @@ -228,7 +228,7 @@ define([ }, setCanRename: function(rename) { - var dc = $('#header-documentcaption span'); + var dc = $('#header-documentcaption div'); if (rename) { var me = this; dc.tooltip({title: me.txtRename, placement: 'cursor'}); @@ -252,6 +252,7 @@ define([ dc.off('click'); } dc.css('cursor', rename ? 'pointer' : 'default'); + dc.toggleClass('renamed', rename); }, textBack: 'Go to Documents', diff --git a/apps/common/main/resources/less/header.less b/apps/common/main/resources/less/header.less index aa98f5068..16033b322 100644 --- a/apps/common/main/resources/less/header.less +++ b/apps/common/main/resources/less/header.less @@ -80,8 +80,17 @@ overflow: hidden; text-overflow: ellipsis; background-color: @app-header-bg-color; - padding: 0 15px + @app-header-height / 3; + padding: 0 7px + @app-header-height / 3; cursor: default; + + div { + display: inline-block; + padding: 2px 8px; + + &.renamed { + background-color: @app-header-bg-color-dark; + } + } } #header-back {