diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index be84732cb..2379dab9f 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -12,4 +12,7 @@ jobs:
- name: Build using grunt
run: |
npm install --prefix build
+ cd ..
+ git clone --branch=develop --depth=1 https://github.com/ONLYOFFICE/sdkjs.git
+ cd web-apps
grunt --level=ADVANCED --base build --gruntfile build/Gruntfile.js
diff --git a/apps/api/documents/index.html.desktop b/apps/api/documents/index.html.desktop
index 881868143..8661e9b25 100644
--- a/apps/api/documents/index.html.desktop
+++ b/apps/api/documents/index.html.desktop
@@ -105,6 +105,7 @@
, feedback: {
url: "https://helpdesk.onlyoffice.com/?desktop=true"
}
+ , uiTheme: urlParams["uitheme"]
},
mode : urlParams["mode"] || 'edit',
lang : urlParams["lang"] || 'en',
diff --git a/apps/common/main/lib/controller/Desktop.js b/apps/common/main/lib/controller/Desktop.js
index 8b7e84641..745ba5079 100644
--- a/apps/common/main/lib/controller/Desktop.js
+++ b/apps/common/main/lib/controller/Desktop.js
@@ -41,12 +41,15 @@ define([
], function () {
'use strict';
- var native = window.AscDesktopEditor;
- !!native && native.execCommand('webapps:features', JSON.stringify({
+ var features = {
version: '{{PRODUCT_VERSION}}',
eventloading: true,
- titlebuttons: true
- }));
+ titlebuttons: true,
+ uithemes: true
+ };
+
+ var native = window.AscDesktopEditor;
+ !!native && native.execCommand('webapps:features', JSON.stringify(features));
var Desktop = function () {
var config = {version:'{{PRODUCT_VERSION}}'};
@@ -115,6 +118,9 @@ define([
titlebuttons[obj.action].btn.click();
}
} else
+ if (/theme:changed/.test(cmd)) {
+ Common.UI.Themes.setTheme(param);
+ } else
if (/element:show/.test(cmd)) {
var _mr = /title:(?:(true|show)|(false|hide))/.exec(param);
if ( _mr ) {
@@ -131,7 +137,7 @@ define([
}
}
- native.execCommand('webapps:features', JSON.stringify({version: config.version, eventloading:true, titlebuttons:true}));
+ native.execCommand('webapps:features', JSON.stringify(features));
// hide mask for modal window
var style = document.createElement('style');
@@ -193,8 +199,9 @@ define([
});
Common.NotificationCenter.on('app:face', function (mode) {
- native.execCommand('webapps:features', JSON.stringify(
- {version: config.version, eventloading:true, titlebuttons:true, viewmode:!mode.isEdit, crypted:mode.isCrypted} ));
+ features.viewmode = !mode.isEdit;
+ features.crypted = mode.isCrypted;
+ native.execCommand('webapps:features', JSON.stringify(features));
titlebuttons = {};
if ( mode.isEdit ) {
@@ -235,6 +242,9 @@ define([
Common.NotificationCenter.on({
'modal:show': _onModalDialog.bind(this, 'open'),
'modal:close': _onModalDialog.bind(this, 'close')
+ , 'uitheme:changed' : function (name) {
+ native.execCommand("uitheme:changed", name);
+ }
});
}
},
diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js
index a1139e63e..a9227d93b 100644
--- a/apps/common/main/lib/controller/ReviewChanges.js
+++ b/apps/common/main/lib/controller/ReviewChanges.js
@@ -562,24 +562,27 @@ define([
this.view.turnChanges(true);
} else
if ( this.appConfig.canReview ) {
- var sendMessage = !fromApi;
- var saveToFile = !!global; // save track changes flag (state) to file
- this.api.asc_SetTrackRevisions(!!state, saveToFile, sendMessage);
- Common.Utils.InternalSettings.set(this.view.appPrefix + "track-changes", (state ? 0 : 1) + (global ? 2 : 0));
- this.view.turnChanges(state, global);
+ if (!!global) {
+ this.api.asc_SetLocalTrackRevisions(null);
+ this.api.asc_SetGlobalTrackRevisions(!!state);
+ } else
+ this.api.asc_SetLocalTrackRevisions(!!state);
}
},
- onApiTrackRevisionsChange: function(state, global, userId) {
- // change local or global state
- if (userId && this.getUserName(userId)) {
- if (state)
- this.showTips(Common.Utils.String.format(global ? this.textOnGlobal : this.textOn, this.getUserName(userId)));
- else
- this.showTips(Common.Utils.String.format(global ? this.textOffGlobal : this.textOff, this.getUserName(userId)));
- }
- if (global && Common.Utils.InternalSettings.get(this.view.appPrefix + "track-changes")>1) {
- Common.NotificationCenter.trigger('reviewchanges:turn', state, global, true);
+ onApiTrackRevisionsChange: function(localFlag, globalFlag, userId) {
+ if ( this.appConfig.isReviewOnly ) {
+ this.view.turnChanges(true);
+ } else
+ if ( this.appConfig.canReview ) {
+ var global = (localFlag===null),
+ state = global ? globalFlag : localFlag;
+ Common.Utils.InternalSettings.set(this.view.appPrefix + "track-changes", (state ? 0 : 1) + (global ? 2 : 0));
+ this.view.turnChanges(state, global);
+ if (userId && this.userCollection) {
+ var rec = this.userCollection.findOriginalUser(userId);
+ rec && this.showTips(Common.Utils.String.format(globalFlag ? this.textOnGlobal : this.textOffGlobal, Common.Utils.UserInfoParser.getParsedName(rec.get('username'))));
+ }
}
},
@@ -778,18 +781,20 @@ define([
(new Promise(function (resolve) {
resolve();
})).then(function () {
- function _setReviewStatus(state, global) {
- me.view.turnChanges(state, global);
- me.api.asc_SetTrackRevisions(state);
- Common.Utils.InternalSettings.set(me.view.appPrefix + "track-changes", (state ? 0 : 1) + (global ? 2 : 0));
- };
-
- var trackChanges = typeof (me.appConfig.customization) == 'object' ? me.appConfig.customization.trackChanges : undefined,
- state = config.isReviewOnly || trackChanges===true || (trackChanges!==false) && me.api.asc_IsTrackRevisions(),
- global = !config.isReviewOnly && (trackChanges===undefined);
+ // function _setReviewStatus(state, global) {
+ // me.view.turnChanges(state, global);
+ // !global && me.api.asc_SetLocalTrackRevisions(state);
+ // Common.Utils.InternalSettings.set(me.view.appPrefix + "track-changes", (state ? 0 : 1) + (global ? 2 : 0));
+ // };
+ var trackChanges = typeof (me.appConfig.customization) == 'object' ? me.appConfig.customization.trackChanges : undefined;
+ if (config.isReviewOnly || trackChanges!==undefined)
+ me.api.asc_SetLocalTrackRevisions(config.isReviewOnly || trackChanges===true);
+ else
+ me.onApiTrackRevisionsChange(me.api.asc_GetLocalTrackRevisions(), me.api.asc_GetGlobalTrackRevisions());
me.api.asc_HaveRevisionsChanges() && me.view.markChanges(true);
- _setReviewStatus(state, global);
+
+ // _setReviewStatus(state, global);
if ( typeof (me.appConfig.customization) == 'object' && (me.appConfig.customization.showReviewChanges==true) ) {
me.dlgChanges = (new Common.Views.ReviewChangesDialog({
@@ -848,8 +853,10 @@ define([
offset: 30
});
this.tooltip.on('tooltip:hide', function(cmp){
- clearTimeout(me.tipTimeout);
- (cmp==me.tooltip) && setTimeout(showNextTip, 300);
+ if (cmp==me.tooltip) {
+ clearTimeout(me.tipTimeout);
+ setTimeout(showNextTip, 300);
+ }
});
}
diff --git a/apps/common/main/lib/controller/Themes.js b/apps/common/main/lib/controller/Themes.js
index 1856441a6..3dfdcec9b 100644
--- a/apps/common/main/lib/controller/Themes.js
+++ b/apps/common/main/lib/controller/Themes.js
@@ -76,7 +76,7 @@ define([
}
Common.localStorage.setItem('ui-theme', name);
- Common.NotificationCenter.trigger('uitheme:change', name);
+ Common.NotificationCenter.trigger('uitheme:changed', name);
}
},
diff --git a/apps/common/main/lib/util/htmlutils.js b/apps/common/main/lib/util/htmlutils.js
index f6e5384c3..bbd155a77 100644
--- a/apps/common/main/lib/util/htmlutils.js
+++ b/apps/common/main/lib/util/htmlutils.js
@@ -32,7 +32,10 @@ var params = (function() {
return urlParams;
})();
-var ui_theme_name = params.uitheme || localStorage.getItem("ui-theme");
+if ( !!params.uitheme && localStorage.getItem("ui-theme") != params.uitheme)
+ localStorage.setItem("ui-theme", params.uitheme);
+
+var ui_theme_name = localStorage.getItem("ui-theme");
if ( !!ui_theme_name ) {
document.body.classList.add(ui_theme_name);
}
diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js
index 6123d15f5..8b5dca3b5 100644
--- a/apps/common/main/lib/view/OpenDialog.js
+++ b/apps/common/main/lib/view/OpenDialog.js
@@ -59,7 +59,7 @@ define([
width = 414;
height = 277;
} else {
- width = (options.type !== Common.Utils.importTextType.DRM) ? 340 : (options.warning ? 420 : 262);
+ width = (options.type !== Common.Utils.importTextType.DRM) ? 340 : (options.warning ? 420 : 280);
height = (options.type == Common.Utils.importTextType.CSV || options.type == Common.Utils.importTextType.Paste || options.type == Common.Utils.importTextType.Columns) ? 190 : (options.warning ? 187 : 147);
}
@@ -92,7 +92,7 @@ define([
'',
'<% } else { %>',
'
',
@@ -145,6 +147,7 @@ define([
menuStyle : 'min-width: 234px;max-height: 270px;',
store : new Common.Collections.Fonts(),
recent : 0,
+ takeFocusOnClose: true,
hint : me.tipFontName
}).on('selected', function(combo, record) {
if (me.signObject) {
@@ -160,6 +163,7 @@ define([
menuCls : 'scrollable-menu',
menuStyle: 'min-width: 55px;max-height: 270px;',
hint: this.tipFontSize,
+ takeFocusOnClose: true,
data: [
{ value: 8, displayValue: "8" },
{ value: 9, displayValue: "9" },
@@ -186,11 +190,13 @@ define([
me.font.size = record.value;
});
this.cmbFontSize.setValue(this.font.size);
+ this.cmbFontSize.on('changed:before', _.bind(this.onFontSizeChanged, this, true));
+ this.cmbFontSize.on('changed:after', _.bind(this.onFontSizeChanged, this, false));
me.btnBold = new Common.UI.Button({
parentEl: $('#id-dlg-sign-bold'),
cls: 'btn-toolbar',
- iconCls: 'btn-bold',
+ iconCls: 'toolbar__icon btn-bold',
enableToggle: true,
hint: me.textBold
});
@@ -204,7 +210,7 @@ define([
me.btnItalic = new Common.UI.Button({
parentEl: $('#id-dlg-sign-italic'),
cls: 'btn-toolbar',
- iconCls: 'btn-italic',
+ iconCls: 'toolbar__icon btn-italic',
enableToggle: true,
hint: me.textItalic
});
@@ -241,6 +247,10 @@ define([
me.afterRender();
},
+ getFocusedComponents: function() {
+ return [this.inputPurpose, this.inputName, this.cmbFonts, this.cmbFontSize];
+ },
+
show: function() {
Common.UI.Window.prototype.show.apply(this, arguments);
@@ -301,8 +311,14 @@ define([
_handleInput: function(state) {
if (this.options.handler) {
- if (state == 'ok' && (this.btnOk.isDisabled() || this.signObject && !this.signObject.isValid()))
- return;
+ if (state == 'ok' && (this.btnOk.isDisabled() || this.signObject && !this.signObject.isValid())) {
+ if (!this.btnOk.isDisabled()) {
+ this.inputName.showError([this.textNameError]);
+ this.inputName.focus();
+ }
+ return;
+ }
+
this.options.handler.call(this, this, state);
}
@@ -334,6 +350,39 @@ define([
this.signObject.setText(value, this.font.name, this.font.size, this.font.italic, this.font.bold);
},
+ onFontSizeChanged: function(before, combo, record, e) {
+ var value,
+ me = this;
+
+ if (before) {
+ var item = combo.store.findWhere({
+ displayValue: record.value
+ });
+
+ if (!item) {
+ value = /^\+?(\d*(\.|,)?\d+)$|^\+?(\d+(\.|,)?\d*)$/.exec(record.value);
+
+ if (!value) {
+ value = combo.getValue();
+ combo.setRawValue(value);
+ e.preventDefault();
+ return false;
+ }
+ }
+ } else {
+ var maxvalue = (this.appPrefix=='sse-') ? 409 : 300;
+ value = Common.Utils.String.parseFloat(record.value);
+ value = value > maxvalue ? maxvalue :
+ value < 1 ? 1 : Math.floor((value+0.4)*2)/2;
+
+ combo.setRawValue(value);
+ if (this.signObject) {
+ this.signObject.setText(this.inputName.getValue(), this.font.name, value, this.font.italic, this.font.bold);
+ }
+ this.font.size = value;
+ }
+ },
+
textTitle: 'Sign Document',
textPurpose: 'Purpose for signing this document',
textCertificate: 'Certificate',
@@ -347,7 +396,8 @@ define([
tipFontSize: 'Font Size',
textBold: 'Bold',
textItalic: 'Italic',
- textSelect: 'Select'
+ textSelect: 'Select',
+ textNameError: 'Signer name must not be empty.'
}, Common.Views.SignDialog || {}))
});
\ No newline at end of file
diff --git a/apps/common/main/lib/view/SignSettingsDialog.js b/apps/common/main/lib/view/SignSettingsDialog.js
index d402926ac..74d649b94 100644
--- a/apps/common/main/lib/view/SignSettingsDialog.js
+++ b/apps/common/main/lib/view/SignSettingsDialog.js
@@ -142,13 +142,12 @@ define([
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
},
- show: function() {
- Common.UI.Window.prototype.show.apply(this, arguments);
+ getFocusedComponents: function() {
+ return [this.inputName, this.inputTitle, this.inputEmail, this.textareaInstructions];
+ },
- var me = this;
- _.delay(function(){
- me.inputName.cmpEl.find('input').focus();
- },500);
+ getDefaultFocusableComponent: function () {
+ return this.inputName;
},
setSettings: function (props) {
@@ -164,6 +163,8 @@ define([
value = props.asc_getInstructions();
me.textareaInstructions.val(value ? value : '');
me.chDate.setValue(props.asc_getShowDate());
+
+ me._currentGuid = props.asc_getGuid();
}
},
@@ -176,6 +177,7 @@ define([
props.asc_setEmail(me.inputEmail.getValue());
props.asc_setInstructions(me.textareaInstructions.val());
props.asc_setShowDate(me.chDate.getValue()=='checked');
+ (me._currentGuid!==undefined) && props.asc_setGuid(me._currentGuid);
return props;
},
diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less
index a6579d6fd..b513eba07 100644
--- a/apps/common/main/resources/less/buttons.less
+++ b/apps/common/main/resources/less/buttons.less
@@ -1,5 +1,4 @@
@x-huge-btn-height: 46px;
-@btn-disabled-opacity: .4;
@x-huge-btn-icon-size: 28px;
.btn {
@@ -40,7 +39,7 @@
}
&[disabled] {
- opacity: @btn-disabled-opacity;
+ opacity: @component-disabled-opacity;
}
&:focus {
@@ -432,7 +431,7 @@
&[disabled],
&.disabled {
//color: #000; btn-category has no text
- opacity: @btn-disabled-opacity;
+ opacity: @component-disabled-opacity;
}
}
@@ -502,7 +501,7 @@
}
&[disabled],
&.disabled {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
}
}
@@ -519,7 +518,7 @@
.dropdown-menu {
&.scale-menu {
li.disabled {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
}
}
}
@@ -614,7 +613,7 @@
&[disabled],
&.disabled {
- opacity: 0.35;
+ opacity: @component-disabled-opacity;
}
.color-transparent {
@@ -721,7 +720,7 @@
&[disabled],
&.disabled {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
}
}
@@ -759,7 +758,7 @@
&[disabled],
&.disabled {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
}
}
@@ -798,7 +797,7 @@
&[disabled],
&.disabled {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
}
}
@@ -838,7 +837,7 @@
&[disabled],
&.disabled {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
}
}
@@ -905,7 +904,7 @@
&[disabled],
&.disabled {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
}
}
@@ -943,7 +942,7 @@
}
&[disabled] {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
}
&.custom {
diff --git a/apps/common/main/resources/less/checkbox.less b/apps/common/main/resources/less/checkbox.less
index 9b8b8e320..d74abea46 100644
--- a/apps/common/main/resources/less/checkbox.less
+++ b/apps/common/main/resources/less/checkbox.less
@@ -58,11 +58,9 @@
&.disabled,
&:disabled {
- opacity: .4;
+ label {
&::before {
- opacity: .4;
}
}
}
diff --git a/apps/common/main/resources/less/colors-table-dark.less b/apps/common/main/resources/less/colors-table-dark.less
index c6d00ad0a..15159908d 100644
--- a/apps/common/main/resources/less/colors-table-dark.less
+++ b/apps/common/main/resources/less/colors-table-dark.less
@@ -106,6 +106,7 @@
--image-border-types-filter: invert(100%) brightness(4);
--image-border-types-filter-selected: invert(100%) brightness(4);
--component-normal-icon-filter: invert(100%);
+ --component-disabled-opacity: .3;
--menu-icon-item-checked-offset-x: -20px;
}
diff --git a/apps/common/main/resources/less/colors-table.less b/apps/common/main/resources/less/colors-table.less
index 6d6cca53b..dd743c5cd 100644
--- a/apps/common/main/resources/less/colors-table.less
+++ b/apps/common/main/resources/less/colors-table.less
@@ -120,6 +120,7 @@
--image-border-types-filter: none;
--image-border-types-filter-selected: none;
--component-normal-icon-filter: none;
+ --component-disabled-opacity: .4;
}
// Background
@@ -188,6 +189,7 @@
@button-header-active-icon-offset-x: var(--button-header-active-icon-offset-x, -20px);
@component-normal-icon-filer: var(--component-normal-icon-filter);
+@component-disabled-opacity: var(--component-disabled-opacity, .4);
@menu-icon-item-checked-offset-x: var(--menu-icon-item-checked-offset-x, 0);
diff --git a/apps/common/main/resources/less/combo-dataview.less b/apps/common/main/resources/less/combo-dataview.less
index 63ce7c2df..d3cc6d36a 100644
--- a/apps/common/main/resources/less/combo-dataview.less
+++ b/apps/common/main/resources/less/combo-dataview.less
@@ -62,7 +62,7 @@
}
&.disabled {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
.dataview.inner {
> .item {
diff --git a/apps/common/main/resources/less/common.less b/apps/common/main/resources/less/common.less
index 44b6a116a..50d8faee9 100644
--- a/apps/common/main/resources/less/common.less
+++ b/apps/common/main/resources/less/common.less
@@ -20,7 +20,7 @@ label {
}
&.disabled {
- opacity: 0.5;
+ opacity: @component-disabled-opacity;
}
}
@@ -200,7 +200,7 @@ label {
height: 100%;
&.disabled {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
cursor: default !important;
}
}
diff --git a/apps/common/main/resources/less/dataview.less b/apps/common/main/resources/less/dataview.less
index 3696c10f5..1c4c53fee 100644
--- a/apps/common/main/resources/less/dataview.less
+++ b/apps/common/main/resources/less/dataview.less
@@ -58,7 +58,7 @@
}
&.disabled {
- opacity: 0.5;
+ opacity: @component-disabled-opacity;
}
.box-shadow(0 0 0 @scaled-one-px-value-ie @border-regular-control-ie);
diff --git a/apps/common/main/resources/less/dropdown-menu.less b/apps/common/main/resources/less/dropdown-menu.less
index 3222f9618..325b28de9 100644
--- a/apps/common/main/resources/less/dropdown-menu.less
+++ b/apps/common/main/resources/less/dropdown-menu.less
@@ -1,5 +1,10 @@
.dropdown-menu > .disabled > a {
cursor: default;
+
+ color: @text-normal-ie;
+ color: @text-normal;
+
+ opacity: @component-disabled-opacity;
}
.dropdown-menu {
@@ -89,7 +94,6 @@
&.disabled {
.menu-item-icon {
- opacity: .4;
}
}
diff --git a/apps/common/main/resources/less/header.less b/apps/common/main/resources/less/header.less
index 8e57409a1..a7995b8a8 100644
--- a/apps/common/main/resources/less/header.less
+++ b/apps/common/main/resources/less/header.less
@@ -197,7 +197,7 @@
}
&.disabled {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
pointer-events: none;
}
}
@@ -359,7 +359,7 @@
.btn&[disabled],
&.disabled {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
}
&:hover {
diff --git a/apps/common/main/resources/less/input.less b/apps/common/main/resources/less/input.less
index c3ab2aaf7..d1a6da47a 100644
--- a/apps/common/main/resources/less/input.less
+++ b/apps/common/main/resources/less/input.less
@@ -95,7 +95,7 @@ input.error {
}
.disabled .form-control {
- opacity: 0.65;
+ opacity: @component-disabled-opacity;
cursor: default !important;
}
diff --git a/apps/common/main/resources/less/listview.less b/apps/common/main/resources/less/listview.less
index 6110d76a7..8757d2a25 100644
--- a/apps/common/main/resources/less/listview.less
+++ b/apps/common/main/resources/less/listview.less
@@ -76,7 +76,7 @@
&.disabled {
> .item {
cursor: default;
- opacity: 0.5;
+ opacity: @component-disabled-opacity;
}
}
}
diff --git a/apps/common/main/resources/less/radiobox.less b/apps/common/main/resources/less/radiobox.less
index 980de206d..1c5355ccf 100644
--- a/apps/common/main/resources/less/radiobox.less
+++ b/apps/common/main/resources/less/radiobox.less
@@ -42,11 +42,9 @@
}
&.disabled, &:disabled {
- opacity: .4;
+ label {
&::before {
- opacity: .4;
}
}
}
diff --git a/apps/common/main/resources/less/scroller.less b/apps/common/main/resources/less/scroller.less
index 18cb1de15..8f345eef8 100644
--- a/apps/common/main/resources/less/scroller.less
+++ b/apps/common/main/resources/less/scroller.less
@@ -35,10 +35,10 @@
.border-radius(2px);
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
border: @scaled-one-px-value solid @border-regular-control;
- -o-transition: background-color .5s 0 linear;
- -webkit-transition: background-color .5s 0 linear;
- -moz-transition: background-color .5s 0 linear;
- transition: background-color .5s 0 linear;
+ -o-transition: background-color .2s linear;
+ -webkit-transition: background-color .2s linear;
+ -moz-transition: background-color .2s linear;
+ transition: background-color .2s linear;
}
}
@@ -95,10 +95,10 @@
.border-radius(2px);
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
border: @scaled-one-px-value solid @border-regular-control;
- -o-transition: background-color .5s 0 linear;
- -webkit-transition: background-color .5s 0 linear;
- -moz-transition: background-color .5s 0 linear;
- transition: background-color .5s 0 linear;
+ -o-transition: background-color .2s linear;
+ -webkit-transition: background-color .2s linear;
+ -moz-transition: background-color .2s linear;
+ transition: background-color .2s linear;
}
}
diff --git a/apps/common/main/resources/less/slider.less b/apps/common/main/resources/less/slider.less
index fefd2dfe1..ed156501b 100644
--- a/apps/common/main/resources/less/slider.less
+++ b/apps/common/main/resources/less/slider.less
@@ -39,6 +39,6 @@
}
&.disabled {
- opacity: 0.35;
+ opacity: @component-disabled-opacity;
}
}
\ No newline at end of file
diff --git a/apps/common/main/resources/less/spinner.less b/apps/common/main/resources/less/spinner.less
index 62b2e0e28..73cb0cf4a 100644
--- a/apps/common/main/resources/less/spinner.less
+++ b/apps/common/main/resources/less/spinner.less
@@ -58,7 +58,7 @@
button {
&.disabled {
- opacity: .35;
+ opacity: @component-disabled-opacity;
}
&:hover {
diff --git a/apps/common/main/resources/less/window.less b/apps/common/main/resources/less/window.less
index b612a5e26..87745f2ce 100644
--- a/apps/common/main/resources/less/window.less
+++ b/apps/common/main/resources/less/window.less
@@ -134,7 +134,7 @@
}
&.disabled {
- opacity: 0.3;
+ opacity: @component-disabled-opacity;
cursor: default;
}
}
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index e2a67324f..f4e20e493 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -2364,7 +2364,7 @@ define([
var _disable_ui = function (disable) {
me.disableEditing(disable);
var app = me.getApplication();
- app.getController('DocumentHolder').getView().SetDisabled(disable, true);
+ app.getController('DocumentHolder').getView().SetDisabled(disable);
app.getController('Navigation') && app.getController('Navigation').SetDisabled(disable);
var leftMenu = app.getController('LeftMenu');
diff --git a/apps/documenteditor/main/app/controller/Statusbar.js b/apps/documenteditor/main/app/controller/Statusbar.js
index e57649a4f..b48ee0e7f 100644
--- a/apps/documenteditor/main/app/controller/Statusbar.js
+++ b/apps/documenteditor/main/app/controller/Statusbar.js
@@ -70,7 +70,7 @@ define([
Common.localStorage.setBool('de-hidden-status', status);
Common.NotificationCenter.trigger('layout:changed', 'status');
- Common.NotificationCenter.trigger('edit:complete', this.statusbar);
+ Common.NotificationCenter.trigger('edit:complete', me.statusbar);
}
}
});
@@ -117,7 +117,6 @@ define([
});
Common.NotificationCenter.on('app:ready', me.onAppReady.bind(me));
- Common.NotificationCenter.on('reviewchanges:turn', me.onTurnPreview.bind(me));
},
onAppReady: function (config) {
@@ -137,6 +136,7 @@ define([
if (me.changesTooltip === undefined)
me.changesTooltip = me.createChangesTip(me.textTrackChanges, 'de-track-changes-tip');
+ me.hideTips();
me.changesTooltip.show();
} else {
me.btnTurnReview.updateHint(me.tipReview);
@@ -155,6 +155,7 @@ define([
if (me.newChangesTooltip === undefined)
me.newChangesTooltip = me.createChangesTip(me.textHasChanges, 'de-new-changes');
+ me.hideTips();
me.newChangesTooltip.show();
} else
me.btnTurnReview.updateHint(me.tipReview);
@@ -163,14 +164,21 @@ define([
});
},
- onTurnPreview: function(state, global, fromApi) {
- if (!state && this.changesTooltip && this.changesTooltip.isVisible()) {
- this.changesTooltip.hide();
- this.btnTurnReview.updateHint(this.tipReview);
- } else if (fromApi && state && global ) {
- if (this.globalChangesTooltip === undefined)
- this.globalChangesTooltip = this.createChangesTip(this.textSetTrackChanges);
- !this.globalChangesTooltip.isVisible() && this.globalChangesTooltip.show();
+ onApiTrackRevisionsChange: function(localFlag, globalFlag, userId) {
+ var global = (localFlag===null),
+ state = global ? globalFlag : localFlag;
+ if (this.btnTurnReview) {
+ if (!state) {
+ this.hideTips();
+ this.btnTurnReview.updateHint(this.tipReview);
+ } else if (userId && state && global ) {
+ if (this.globalChangesTooltip === undefined)
+ this.globalChangesTooltip = this.createChangesTip(this.textSetTrackChanges);
+ if (!this.globalChangesTooltip.isVisible()) {
+ this.hideTips();
+ this.globalChangesTooltip.show();
+ }
+ }
}
},
@@ -178,6 +186,7 @@ define([
this.api = api;
this.api.asc_registerCallback('asc_onZoomChange', _.bind(this._onZoomChange, this));
this.api.asc_registerCallback('asc_onTextLanguage', _.bind(this._onTextLanguage, this));
+ this.api.asc_registerCallback('asc_onOnTrackRevisionsChange', _.bind(this.onApiTrackRevisionsChange, this));
this.statusbar.setApi(api);
},
@@ -257,6 +266,12 @@ define([
this.setStatusCaption('');
},
+ hideTips: function () {
+ this.changesTooltip && this.changesTooltip.isVisible() && this.changesTooltip.hide();
+ this.newChangesTooltip && this.newChangesTooltip.isVisible() && this.newChangesTooltip.hide();
+ this.globalChangesTooltip && this.globalChangesTooltip.isVisible() && this.globalChangesTooltip.hide();
+ },
+
createChangesTip: function (text, storage) {
var me = this;
var tip = new Common.UI.SynchronizeTip({
diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js
index 9c3919608..2cb52ded2 100644
--- a/apps/documenteditor/main/app/controller/Toolbar.js
+++ b/apps/documenteditor/main/app/controller/Toolbar.js
@@ -295,6 +295,12 @@ define([
toolbar.mnuMarkerSettings.on('click', _.bind(this.onMarkerSettingsClick, this, 0));
toolbar.mnuNumberSettings.on('click', _.bind(this.onMarkerSettingsClick, this, 1));
toolbar.mnuMultilevelSettings.on('click', _.bind(this.onMarkerSettingsClick, this, 2));
+ toolbar.mnuMarkerChangeLevel && toolbar.mnuMarkerChangeLevel.menu &&
+ toolbar.mnuMarkerChangeLevel.menu.on('show:after', _.bind(this.onChangeLevelShowAfter, this, 0));
+ toolbar.mnuMarkerChangeLevel.menu.on('item:click', _.bind(this.onChangeLevelClick, this, 0));
+ toolbar.mnuNumberChangeLevel && toolbar.mnuNumberChangeLevel.menu &&
+ toolbar.mnuNumberChangeLevel.menu.on('show:after', _.bind(this.onChangeLevelShowAfter, this, 1));
+ toolbar.mnuNumberChangeLevel.menu.on('item:click', _.bind(this.onChangeLevelClick, this, 1));
toolbar.btnHighlightColor.on('click', _.bind(this.onBtnHighlightColor, this));
toolbar.btnFontColor.on('click', _.bind(this.onBtnFontColor, this));
toolbar.btnParagraphColor.on('click', _.bind(this.onBtnParagraphColor, this));
@@ -518,6 +524,7 @@ define([
this.toolbar.mnuMarkersPicker.deselectAll(true);
this.toolbar.mnuMultilevelPicker.deselectAll(true);
this.toolbar.mnuMarkerSettings && this.toolbar.mnuMarkerSettings.setDisabled(this._state.bullets.subtype<0);
+ this.toolbar.mnuMarkerChangeLevel && this.toolbar.mnuMarkerChangeLevel.setDisabled(this._state.bullets.subtype<0);
this.toolbar.mnuMultilevelSettings && this.toolbar.mnuMultilevelSettings.setDisabled(this._state.bullets.subtype<0);
break;
case 1:
@@ -552,6 +559,7 @@ define([
this.toolbar.mnuNumbersPicker.deselectAll(true);
this.toolbar.mnuMultilevelPicker.deselectAll(true);
this.toolbar.mnuNumberSettings && this.toolbar.mnuNumberSettings.setDisabled(idx==0);
+ this.toolbar.mnuNumberChangeLevel && this.toolbar.mnuNumberChangeLevel.setDisabled(idx==0);
this.toolbar.mnuMultilevelSettings && this.toolbar.mnuMultilevelSettings.setDisabled(idx==0);
break;
case 2:
@@ -1398,6 +1406,24 @@ define([
}
},
+ onChangeLevelShowAfter: function(type, menu) {
+ var me = this;
+ var listId = me.api.asc_GetCurrentNumberingId(),
+ level = me.api.asc_GetCurrentNumberingLvl(),
+ props = (listId !== null) ? me.api.asc_GetNumberingPr(listId) : null;
+ if (props) {
+ this.api.SetDrawImagePreviewBulletChangeListLevel(menu.options.previewIds, props);
+ }
+ },
+
+ onChangeLevelClick: function(type, menu, item) {
+ if (this.api) {
+ this.api.asc_SetNumberingLvl(item.options.level);
+ }
+
+ Common.NotificationCenter.trigger('edit:complete', this.toolbar);
+ },
+
onLineSpaceToggle: function(menu, item, state, e) {
if (!!state) {
this._state.linespace = undefined;
@@ -2359,6 +2385,8 @@ define([
this.toolbar.mnuMarkerSettings && this.toolbar.mnuMarkerSettings.setDisabled(true);
this.toolbar.mnuNumberSettings && this.toolbar.mnuNumberSettings.setDisabled(true);
this.toolbar.mnuMultilevelSettings && this.toolbar.mnuMultilevelSettings.setDisabled(true);
+ this.toolbar.mnuMarkerChangeLevel && this.toolbar.mnuMarkerChangeLevel.setDisabled(true);
+ this.toolbar.mnuNumberChangeLevel && this.toolbar.mnuNumberChangeLevel.setDisabled(true);
},
_getApiTextSize: function () {
@@ -3193,7 +3221,7 @@ define([
textEmptyImgUrl : 'You need to specify image URL.',
textWarning : 'Warning',
- textFontSizeErr : 'The entered value is incorrect.
Please enter a numeric value between 1 and 100',
+ textFontSizeErr : 'The entered value is incorrect.
Please enter a numeric value between 1 and 300',
textSymbols : 'Symbols',
textFraction : 'Fraction',
textScript : 'Script',
diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js
index 156f3f8a9..3597aaee3 100644
--- a/apps/documenteditor/main/app/controller/Viewport.js
+++ b/apps/documenteditor/main/app/controller/Viewport.js
@@ -313,21 +313,6 @@ define([
cls : 'btn-toolbar'
})).on('click', _on_btn_zoom.bind(me, 'up'));
- if ( Common.UI.Themes.available() ) {
- var mnuitemDarkTheme = new Common.UI.MenuItem({
- caption: me.header.textDarkTheme,
- checked: Common.UI.Themes.isDarkTheme(),
- checkable: true,
- value: 'theme:dark'
- });
-
-
- me.header.btnOptions.menu.insertItem(7, mnuitemDarkTheme);
- me.header.btnOptions.menu.insertItem(7, {caption:'--'});
- Common.NotificationCenter.on('uitheme:change', function (name) {
- mnuitemDarkTheme.setChecked(Common.UI.Themes.isDarkTheme());
- });
- }
me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this));
}
},
@@ -415,10 +400,6 @@ define([
Common.NotificationCenter.trigger('edit:complete', me.header);
break;
case 'advanced': me.header.fireEvent('file:settings', me.header); break;
- case 'theme:dark':
- if ( item.isChecked() != Common.UI.Themes.isDarkTheme() )
- Common.UI.Themes.toggleTheme();
- break;
}
},
diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template
index b46c630d3..915b1a382 100644
--- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template
+++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template
@@ -20,7 +20,7 @@
<%= scope.strIndentsRightText %>