Skip to content

Commit

Permalink
Merge pull request #3131 from ONLYOFFICE/fix/dh-refactoring
Browse files Browse the repository at this point in the history
Fix/dh refactoring
  • Loading branch information
JuliaRadzhabova authored Aug 19, 2024
2 parents 7ef0a40 + 9b3c9e0 commit 2570eca
Show file tree
Hide file tree
Showing 253 changed files with 96,930 additions and 16,909 deletions.
10 changes: 9 additions & 1 deletion apps/common/main/lib/controller/LaunchController.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
define([
], function () {
const launchController = function () {
let _all_scripts_loaded = false;

const init = function (api) {
this.api = api;
Common.NotificationCenter.on('app:ready', on_app_ready.bind(this));
Expand All @@ -51,6 +53,7 @@ define([
if (!!Common.UI.ScreenReaderFocusManager) {
Common.UI.ScreenReaderFocusManager.init(me.api);
}
_all_scripts_loaded = true;

if ( !!window.less ) { // detect development mode
Common.NotificationCenter.trigger('script:loaded');
Expand All @@ -64,8 +67,13 @@ define([

const on_hide_loader = function (config) {}

const is_script_loaded = function () {
return _all_scripts_loaded;
}

return {
init: init
init: init,
isScriptLoaded: is_script_loaded
};
}

Expand Down
69 changes: 0 additions & 69 deletions apps/common/main/lib/util/define.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,62 +549,6 @@ define(function(){ 'use strict';
}
})(), Common.define.chartData || {});

Common.define.conditionalData = _.extend( new(function() {
return {
textDate: 'Date',
textYesterday: 'Yesterday',
textToday: 'Today',
textTomorrow: 'Tomorrow',
textLast7days: 'In the last 7 days',
textLastWeek: 'Last week',
textThisWeek: 'This week',
textNextWeek: 'Next week',
textLastMonth: 'Last month',
textThisMonth: 'This month',
textNextMonth: 'Next month',
textText: 'Text',
textContains: 'Contains',
textNotContains: 'Does not contain',
textBegins: 'Begins with',
textEnds: 'Ends with',
textAverage: 'Average',
textAbove: 'Above',
textBelow: 'Below',
textEqAbove: 'Equal to or above',
textEqBelow: 'Equal to or below',
text1Above: '1 std dev above',
text1Below: '1 std dev below',
text2Above: '2 std dev above',
text2Below: '2 std dev below',
text3Above: '3 std dev above',
text3Below: '3 std dev below',
textGreater: 'Greater than',
textGreaterEq: 'Greater than or equal to',
textLess: 'Less than',
textLessEq: 'Less than or equal to',
textEqual: 'Equal to',
textNotEqual: 'Not equal to',
textBetween: 'Between',
textNotBetween: 'Not between',
textTop: 'Top',
textBottom: 'Bottom',
textBlank: 'Blank',
textError: 'Error',
textBlanks: 'Contains blanks',
textNotBlanks: 'Does not contain blanks',
textErrors: 'Contains errors',
textNotErrors: 'Does not contain errors',
textDuplicate: 'Duplicate',
textUnique: 'Unique',
textDataBar: 'Data bar',
textIconSets: 'Icon sets',
textFormula: 'Formula',
exampleText: 'AaBbCcYyZz',
noFormatText: 'No format set',
textValue: 'Value is'
}
})(), Common.define.conditionalData || {});

Common.define.smartArt = _.extend( new(function() {
return {
textList: 'List',
Expand Down Expand Up @@ -1074,17 +1018,4 @@ define(function(){ 'use strict';
},
}
})(), Common.define.smartArt || {});

Common.define.simpleColorsConfig = {
colors: [
'1755A0', 'D43230', 'F5C346', 'EA3368', '12A489', '552F8B', '9D1F87', 'BB2765', '479ED2', '67C9FA',
'3D8A44', '80CA3D', '1C19B4', '7F4B0F', 'FF7E07', 'FFFFFF', 'D3D3D4', '879397', '575757', '000000'
],
dynamiccolors: 5,
themecolors: 0,
effects: 0,
columns: 5,
cls: 'palette-large',
paletteWidth: 174
};
});
32 changes: 32 additions & 0 deletions apps/common/main/lib/util/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,25 @@ define([], function () {
}
}
return clr;
},

selectPickerColorByEffect: function(color, picker) {
if (!color)
picker.clearSelection();
else {
if ( typeof(color) == 'object' ) {
var isselected = false;
for (var i=0; i<10; i++) {
if ( Common.Utils.ThemeColor.ThemeValues[i] == color.effectValue ) {
picker.select(color, true);
isselected = true;
break;
}
}
if (!isselected) picker.clearSelection();
} else
picker.select(color,true);
}
}
}
})();
Expand Down Expand Up @@ -1478,4 +1497,17 @@ define([], function () {
};
}
}

Common.UI.simpleColorsConfig = {
colors: [
'1755A0', 'D43230', 'F5C346', 'EA3368', '12A489', '552F8B', '9D1F87', 'BB2765', '479ED2', '67C9FA',
'3D8A44', '80CA3D', '1C19B4', '7F4B0F', 'FF7E07', 'FFFFFF', 'D3D3D4', '879397', '575757', '000000'
],
dynamiccolors: 5,
themecolors: 0,
effects: 0,
columns: 5,
cls: 'palette-large',
paletteWidth: 174
};
});
Loading

0 comments on commit 2570eca

Please sign in to comment.