'+
'<% if (this.changeSaturation) { %>'+
'
'+
@@ -106,6 +106,7 @@ define([
refreshUI();
me.trigger('changecolor', me, me.color);
+
};
var refreshUI = function(){
@@ -125,8 +126,7 @@ define([
previewColorText[0].innerHTML = (me.color == 'transparent') ? me.textNoColor : me.color.toUpperCase();
if (arrowSatBrightness.length>0 && arrowHue.length>0) {
- arrowSatBrightness.css('left', saturationVal + '%');
- arrowSatBrightness.css('top', 100 - brightnessVal + '%');
+ arrowSatBrightness.css({'left': saturationVal + '%', 'top': 100 - brightnessVal + '%', 'background-color' : me.color});
arrowHue.css('top', parseInt(hueVal * 100 / 360.0) + '%');
}
};
diff --git a/apps/common/main/lib/controller/Themes.js b/apps/common/main/lib/controller/Themes.js
index 586de4750..39a854755 100644
--- a/apps/common/main/lib/controller/Themes.js
+++ b/apps/common/main/lib/controller/Themes.js
@@ -82,6 +82,7 @@ define([
"text-inverse",
"text-toolbar-header",
"text-contrast-background",
+ "text-alt-key-hint",
"icon-normal",
"icon-normal-pressed",
@@ -117,6 +118,8 @@ define([
"canvas-dark-cell-title-border",
"canvas-dark-cell-title-border-hover",
"canvas-dark-cell-title-border-selected",
+ "canvas-dark-content-background",
+ "canvas-dark-page-border",
"canvas-scroll-thumb",
"canvas-scroll-thumb-hover",
diff --git a/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker.png b/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker.png
index 7f1ed4130..e178f5d2f 100644
Binary files a/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker.png and b/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker.png differ
diff --git a/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@1.25x.png b/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@1.25x.png
new file mode 100644
index 000000000..1e51931d6
Binary files /dev/null and b/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@1.25x.png differ
diff --git a/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@1.5x.png b/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@1.5x.png
index 09e7704a5..f0abef52e 100644
Binary files a/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@1.5x.png and b/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@1.5x.png differ
diff --git a/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@1.75x.png b/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@1.75x.png
new file mode 100644
index 000000000..5a5d5d3d2
Binary files /dev/null and b/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@1.75x.png differ
diff --git a/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@2x.png b/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@2x.png
index efc182356..9a7a3a2c1 100644
Binary files a/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@2x.png and b/apps/common/main/resources/img/hsbcolorpicker/hsb-colorpicker@2x.png differ
diff --git a/apps/common/main/resources/less/asc-mixins.less b/apps/common/main/resources/less/asc-mixins.less
index 44f8f6593..980503c55 100644
--- a/apps/common/main/resources/less/asc-mixins.less
+++ b/apps/common/main/resources/less/asc-mixins.less
@@ -327,11 +327,12 @@
}
}
-@img-colorpicker-width: 205px;
+@img-colorpicker-width: 208px;
.img-colorpicker, .hsb-colorpicker .empty-color:before
{
background-image: if(@icon-src-base64, data-uri(%("%s",'@{common-image-path}/hsbcolorpicker/hsb-colorpicker.png')), ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker.png)");
background-repeat: no-repeat;
+ background-size: @img-colorpicker-width auto;
@media only screen {
@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
@@ -350,6 +351,14 @@
background-size: @img-colorpicker-width auto;
}
}
+
+ .pixel-ratio__1_25 & {
+ background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker@1.25x.png)";
+ }
+
+ .pixel-ratio__1_75 & {
+ background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker@1.75x.png)";
+ }
}
.icon.lang-flag {
diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less
index 8d6164e5d..a2fd1811a 100644
--- a/apps/common/main/resources/less/buttons.less
+++ b/apps/common/main/resources/less/buttons.less
@@ -758,6 +758,10 @@
box-shadow: inset 0 0 0 @scaled-one-px-value-ie @border-control-focus-ie;
box-shadow: inset 0 0 0 @scaled-one-px-value @border-control-focus;
}
+
+ &.border-off {
+ box-shadow: none;
+ }
}
.btn-text-default {
diff --git a/apps/common/main/resources/less/colors-table-classic.less b/apps/common/main/resources/less/colors-table-classic.less
index 50b2dc03a..bde3c12e6 100644
--- a/apps/common/main/resources/less/colors-table-classic.less
+++ b/apps/common/main/resources/less/colors-table-classic.less
@@ -14,6 +14,7 @@
--background-notification-badge: #ffd112;
--background-scrim: fade(#000, 20%);
--background-loader: fade(#000, 65%);
+ --background-contrast-popover: #444444;
--highlight-button-hover: #d8dadc;
--highlight-button-pressed: #7d858c;
diff --git a/apps/common/main/resources/less/colors-table-dark.less b/apps/common/main/resources/less/colors-table-dark.less
index 1772e0277..bdf52de7d 100644
--- a/apps/common/main/resources/less/colors-table-dark.less
+++ b/apps/common/main/resources/less/colors-table-dark.less
@@ -15,6 +15,7 @@
--background-scrim: fade(black, 60%);
--background-loader: fade(#181818, 90%);
--background-alt-key-hint: #FFD938;
+ --background-contrast-popover: #363636;
--highlight-button-hover: #555;
--highlight-button-pressed: #707070;
diff --git a/apps/common/main/resources/less/colors-table.less b/apps/common/main/resources/less/colors-table.less
index 177ab6b13..c4f62364c 100644
--- a/apps/common/main/resources/less/colors-table.less
+++ b/apps/common/main/resources/less/colors-table.less
@@ -25,6 +25,8 @@
--background-scrim: fade(#000, 20%);
--background-loader: fade(#181818, 90%);
--background-alt-key-hint: #FFD938;
+ --background-accent-button: #446995;
+ --background-contrast-popover: #444444;
--highlight-button-hover: #e0e0e0;
--highlight-button-pressed: #cbcbcb;
@@ -34,6 +36,8 @@
--highlight-header-button-pressed: fade(#fff, 25%);
--highlight-toolbar-tab-underline: #444;
--highlight-text-select: #3494fb;
+ --highlight-accent-button-hover: #375478;
+ --highlight-accent-button-pressed: #293F59;
--border-toolbar: #cbcbcb;
--border-divider: #dfdfdf;
@@ -56,6 +60,7 @@
--text-inverse: #fff;
--text-toolbar-header: #fff;
--text-contrast-background: #fff;
+ --text-alt-key-hint: fade(#000, 80%);
--icon-normal: #444;
--icon-normal-pressed: #444;
@@ -93,6 +98,8 @@
--canvas-dark-cell-title-border: #3d3d3d;
--canvas-dark-cell-title-border-hover: #5c5c5c;
--canvas-dark-cell-title-border-selected: #0f0f0f;
+ --canvas-dark-content-background: #3a3a3a;
+ --canvas-dark-page-border: #2a2a2a;
--canvas-scroll-thumb: #f7f7f7;
--canvas-scroll-thumb-hover: #c0c0c0;
@@ -151,6 +158,8 @@
@background-scrim: var(--background-scrim);
@background-loader: var(--background-loader);
@background-alt-key-hint: var(--background-alt-key-hint);
+@background-accent-button: var(--background-accent-button);
+@background-contrast-popover: var(--background-contrast-popover);
// Highlight
// -------------------------
@@ -162,6 +171,8 @@
@highlight-header-button-pressed: var(--highlight-header-button-pressed);
@highlight-toolbar-tab-underline: var(--highlight-toolbar-tab-underline);
@highlight-text-select: var(--highlight-text-select);
+@highlight-accent-button-hover: var(--highlight-accent-button-hover);
+@highlight-accent-button-pressed: var(--highlight-accent-button-pressed);
// Border
// -------------------------
diff --git a/apps/common/main/resources/less/extended-color-picker.less b/apps/common/main/resources/less/extended-color-picker.less
index 823fd17c1..92b809b6e 100644
--- a/apps/common/main/resources/less/extended-color-picker.less
+++ b/apps/common/main/resources/less/extended-color-picker.less
@@ -38,9 +38,8 @@
width: 63px;
height: 20px;
background-color: transparent;
- border: @scaled-one-px-value-ie solid @border-regular-control-ie;
- border: @scaled-one-px-value solid @border-regular-control;
-
+ border: @scaled-one-px-value-ie solid @border-color-shading-ie;
+ border: @scaled-one-px-value solid @border-color-shading;
&.top {
border-bottom: none;
}
diff --git a/apps/common/main/resources/less/hsb-colorpicker.less b/apps/common/main/resources/less/hsb-colorpicker.less
index dfefc37c0..526418eec 100644
--- a/apps/common/main/resources/less/hsb-colorpicker.less
+++ b/apps/common/main/resources/less/hsb-colorpicker.less
@@ -32,12 +32,9 @@
.cnt-hb {
display: inline-block;
- overflow: hidden;
width: 195px;
height: 196px;
position: relative;
- border: @scaled-one-px-value-ie solid @border-regular-control-ie;
- border: @scaled-one-px-value solid @border-regular-control;
background-position: 0 0;
}
@@ -49,7 +46,7 @@
}
.cnt-sat {
- width: 10px;
+ width: 12px;
height: 100%;
position: relative;
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
@@ -58,21 +55,33 @@
}
.cnt-hb-arrow {
- width: 9px;
- height: 9px;
- margin: -4px;
+ display: block;
+ width: 12px;
+ height: 12px;
+ margin: -6px;
position: absolute;
- background-position: 0 -196px;
+ border: @scaled-one-px-value-ie solid #000;
+ border: @scaled-one-px-value solid #000;
+ .border-radius(50%);
+ &:after{
+ content: ' ';
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ border: @scaled-one-px-value-ie solid #fff;
+ border: @scaled-one-px-value solid #fff;
+ .border-radius(50%);
+ }
}
.cnt-sat-arrow {
- width: 14px;
- height: 9px;
- margin-top: -4px;
- margin-left: -3px;
- margin-left: calc(-2px - @scaled-one-px-value);
+ width: 20px;
+ height: 12px;
+ margin-top: -6px;
+ margin-left: -4px;
+ margin-left: calc(-3px - @scaled-one-px-value);
position: absolute;
- background-position: -11px -196px;
+ background-position: -12px -196px;
}
.empty-color {
diff --git a/apps/documenteditor/embed/index.html b/apps/documenteditor/embed/index.html
index 396977aa8..7355d87dd 100644
--- a/apps/documenteditor/embed/index.html
+++ b/apps/documenteditor/embed/index.html
@@ -29,7 +29,7 @@
.loadmask > .brendpanel {
width: 100%;
position: absolute;
- height: 48px;
+ height: 40px;
background-color: #F7F7F7;
-webkit-box-shadow: inset 0 -1px 0 #dbdbdb, inset 0 1px 0 #FAFAFA;
box-shadow: inset 0 -1px 0 #dbdbdb, inset 0 1px 0 #FAFAFA;
@@ -43,14 +43,14 @@
.loadmask > .brendpanel .loading-logo {
max-width: 200px;
- height: 24px;
+ height: 20px;
margin-left: 10px;
text-align: center;
}
.loadmask > .brendpanel .loading-logo > img {
display: inline-block;
- max-width: 124px;
+ max-width: 100px;
max-height: 20px;
opacity: 0;
}
diff --git a/apps/documenteditor/embed/index.html.deploy b/apps/documenteditor/embed/index.html.deploy
index 22746b462..527732ad9 100644
--- a/apps/documenteditor/embed/index.html.deploy
+++ b/apps/documenteditor/embed/index.html.deploy
@@ -27,7 +27,7 @@
.loadmask > .brendpanel {
width: 100%;
position: absolute;
- height: 48px;
+ height: 40px;
background-color: #F7F7F7;
-webkit-box-shadow: inset 0 -1px 0 #dbdbdb, inset 0 1px 0 #FAFAFA;
box-shadow: inset 0 -1px 0 #dbdbdb, inset 0 1px 0 #FAFAFA;
@@ -41,14 +41,14 @@
.loadmask > .brendpanel .loading-logo {
max-width: 200px;
- height: 24px;
+ height: 20px;
margin-left: 10px;
text-align: center;
}
.loadmask > .brendpanel .loading-logo > img {
display: inline-block;
- max-width: 124px;
+ max-width: 100px;
max-height: 20px;
opacity: 0;
}
diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js
index 74d19c922..2de63310e 100644
--- a/apps/documenteditor/embed/js/ApplicationController.js
+++ b/apps/documenteditor/embed/js/ApplicationController.js
@@ -403,7 +403,7 @@ DE.ApplicationController = new(function(){
itemsCount--;
}
- if ( !embedConfig.saveUrl && permissions.print === false || appOptions.canFillForms) {
+ if ( !embedConfig.saveUrl || permissions.download === false || appOptions.canFillForms) {
$('#idt-download').hide();
itemsCount--;
}
@@ -439,7 +439,6 @@ DE.ApplicationController = new(function(){
itemsCount--;
}
- // if ( !embedConfig.saveUrl && permissions.print === false && (!embedConfig.shareUrl || appOptions.canFillForms) && (!embedConfig.embedUrl || appOptions.canFillForms) && !embedConfig.fullscreenUrl && !config.canBackToFolder)
if (itemsCount<1)
$('#box-tools').addClass('hidden');
else if ((!embedConfig.embedUrl || appOptions.canFillForms) && !embedConfig.fullscreenUrl)
@@ -477,11 +476,8 @@ DE.ApplicationController = new(function(){
DE.ApplicationView.tools.get('#idt-download')
.on('click', function(){
- if ( !!embedConfig.saveUrl ){
+ if ( !!embedConfig.saveUrl && permissions.download !== false){
common.utils.openLink(embedConfig.saveUrl);
- } else
- if (api && 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');
@@ -605,9 +601,11 @@ DE.ApplicationController = new(function(){
config.customization && config.customization.logo ) {
var logo = $('#header-logo');
- if (config.customization.logo.imageEmbedded) {
- logo.html('
');
+ if (config.customization.logo.image || config.customization.logo.imageEmbedded) {
+ logo.html('
');
logo.css({'background-image': 'none', width: 'auto', height: 'auto'});
+
+ config.customization.logo.imageEmbedded && console.log("Obsolete: The 'imageEmbedded' parameter of the 'customization.logo' section is deprecated. Please use 'image' parameter instead.");
}
if (config.customization.logo.url) {
diff --git a/apps/documenteditor/forms/app.js b/apps/documenteditor/forms/app.js
index 39125c57e..6ac4557d2 100644
--- a/apps/documenteditor/forms/app.js
+++ b/apps/documenteditor/forms/app.js
@@ -150,6 +150,7 @@ require([
'documenteditor/forms/app/view/ApplicationView',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
+ 'common/main/lib/controller/Themes',
'common/forms/lib/view/modals'
], function() {
app.start();
diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js
index 9f3ca8c68..06aa0aad6 100644
--- a/apps/documenteditor/forms/app/controller/ApplicationController.js
+++ b/apps/documenteditor/forms/app/controller/ApplicationController.js
@@ -58,6 +58,8 @@ define([
'embedded' : true
});
+ Common.UI.Themes.init(this.api);
+
$(window).on('resize', this.onDocumentResize.bind(this));
this.boxSdk = $('#editor_sdk');
@@ -456,9 +458,7 @@ define([
this.appOptions.canFillForms = this.appOptions.canLicense && (this.permissions.fillForms===true) && (this.editorConfig.mode !== 'view');
this.api.asc_setViewMode(!this.appOptions.canFillForms);
- var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType);
- this.appOptions.canDownloadOrigin = this.permissions.download !== false && (type && typeof type[1] === 'string');
- this.appOptions.canDownload = this.permissions.download !== false && (!type || typeof type[1] !== 'string');
+ this.appOptions.canDownload = this.permissions.download !== false;
this.appOptions.canPrint = (this.permissions.print !== false);
this.appOptions.fileKey = this.document.key;
@@ -776,11 +776,11 @@ define([
},
onDownloadAs: function() {
- if ( !this.appOptions.canDownload && !this.appOptions.canDownloadOrigin ) {
+ if ( !this.appOptions.canDownload ) {
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, this.errorAccessDeny);
return;
}
- var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType);
+ var type = /^(?:(pdf|djvu|xps|oxps))$/.exec(this.document.fileType);
if (type && typeof type[1] === 'string')
this.api.asc_DownloadOrigin(true);
else
@@ -1063,28 +1063,49 @@ define([
}
},
+ onThemeClick: function(menu, item) {
+ Common.UI.Themes.setTheme(item.value);
+ },
+
+ onThemeChange: function() {
+ var current = Common.UI.Themes.currentThemeId();
+ _.each(this.view.mnuThemes.items, function(item){
+ item.setChecked(current===item.value, true);
+ });
+ },
+
createDelayedElements: function() {
var me = this,
menuItems = this.view.btnOptions.menu.items,
- itemsCount = menuItems.length-3;
+ itemsCount = menuItems.length-4;
var initMenu = function(menu) {
var last;
+ // print
if (!menuItems[0].isVisible())
menuItems[1].setVisible(false);
else
last = menuItems[1];
+ // download
if (!menuItems[2].isVisible() && !menuItems[3].isVisible() && !menuItems[4].isVisible())
menuItems[5].setVisible(false);
else
last = menuItems[5];
- if (!menuItems[6].isVisible() && !menuItems[7].isVisible())
- menuItems[8].setVisible(false);
+ // theme
+ if (!menuItems[6].isVisible())
+ menuItems[7].setVisible(false);
else
- last = menuItems[8];
+ last = menuItems[7];
- if (!menuItems[9].isVisible() && !menuItems[10].isVisible())
+ // share, location
+ if (!menuItems[8].isVisible() && !menuItems[9].isVisible())
+ menuItems[10].setVisible(false);
+ else
+ last = menuItems[10];
+
+ // embed, fullscreen
+ if (!menuItems[11].isVisible() && !menuItems[12].isVisible())
last && last.setVisible(false);
menu.off('show:after', initMenu);
@@ -1095,7 +1116,7 @@ define([
itemsCount--;
}
- if ( !this.embedConfig.saveUrl && !this.appOptions.canPrint || this.appOptions.canFillForms) {
+ if ( !this.embedConfig.saveUrl || !this.appOptions.canDownload || this.appOptions.canFillForms) {
menuItems[2].setVisible(false);
itemsCount--;
}
@@ -1106,23 +1127,43 @@ define([
itemsCount -= 2;
}
- if ( !this.embedConfig.shareUrl || this.appOptions.canFillForms) {
+ if (Common.UI.Themes.available()) {
+ var current = Common.UI.Themes.currentThemeId();
+ for (var t in Common.UI.Themes.map()) {
+ this.view.mnuThemes.addItem(new Common.UI.MenuItem({
+ caption : Common.UI.Themes.get(t).text,
+ value : t,
+ toggleGroup : 'themes',
+ checkable : true,
+ checked : t===current
+ }));
+ }
+ }
+ if (this.view.mnuThemes.items.length<1) {
menuItems[6].setVisible(false);
itemsCount--;
+ } else {
+ this.view.mnuThemes.on('item:click', _.bind(this.onThemeClick, this));
+ Common.NotificationCenter.on('uitheme:changed', this.onThemeChange.bind(this));
+ }
+
+ if ( !this.embedConfig.shareUrl || this.appOptions.canFillForms) {
+ menuItems[8].setVisible(false);
+ itemsCount--;
}
if (!this.appOptions.canBackToFolder) {
- menuItems[7].setVisible(false);
- itemsCount--;
- }
-
- if ( !this.embedConfig.embedUrl || this.appOptions.canFillForms) {
menuItems[9].setVisible(false);
itemsCount--;
}
+ if ( !this.embedConfig.embedUrl || this.appOptions.canFillForms) {
+ menuItems[11].setVisible(false);
+ itemsCount--;
+ }
+
if ( !this.embedConfig.fullscreenUrl ) {
- menuItems[10].setVisible(false);
+ menuItems[12].setVisible(false);
itemsCount--;
}
if (itemsCount<1)
diff --git a/apps/documenteditor/forms/app/view/ApplicationView.js b/apps/documenteditor/forms/app/view/ApplicationView.js
index 87a0eb765..b25dfde59 100644
--- a/apps/documenteditor/forms/app/view/ApplicationView.js
+++ b/apps/documenteditor/forms/app/view/ApplicationView.js
@@ -23,6 +23,15 @@ define([
{caption: this.txtDownloadDocx, value: 'download-docx', iconCls: 'mi-icon svg-icon download'},
{caption: this.txtDownloadPdf, value: 'download-pdf', iconCls: 'mi-icon'},
{caption: '--'},
+ {caption: this.txtTheme, value: 'theme', iconCls: 'mi-icon',
+ menu : this.mnuThemes = new Common.UI.Menu({
+ cls: 'shifted-right',
+ menuAlign: 'tl-tr',
+ restoreHeight: true,
+ items: []
+ })
+ },
+ {caption: '--'},
{caption: this.txtShare, value: 'share', iconCls: 'mi-icon svg-icon share'},
{caption: this.txtFileLocation, value: 'close', iconCls: 'mi-icon svg-icon go-to-location'},
{caption: '--'},
@@ -81,6 +90,7 @@ define([
txtDownloadPdf: 'Download as pdf',
textNext: 'Next Field',
textClear: 'Clear All Fields',
- textSubmit: 'Submit'
+ textSubmit: 'Submit',
+ txtTheme: 'Interface theme'
});
});
\ No newline at end of file
diff --git a/apps/documenteditor/forms/app_dev.js b/apps/documenteditor/forms/app_dev.js
index 82741e502..33aa736fc 100644
--- a/apps/documenteditor/forms/app_dev.js
+++ b/apps/documenteditor/forms/app_dev.js
@@ -140,6 +140,7 @@ require([
'documenteditor/forms/app/view/ApplicationView',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
+ 'common/main/lib/controller/Themes',
'common/forms/lib/view/modals'
], function() {
window.compareVersions = true;
diff --git a/apps/documenteditor/forms/index.html b/apps/documenteditor/forms/index.html
index dd12004df..4fb826105 100644
--- a/apps/documenteditor/forms/index.html
+++ b/apps/documenteditor/forms/index.html
@@ -14,6 +14,23 @@