Skip to content

Commit

Permalink
Release 19.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
BingoRUS committed Oct 30, 2019
1 parent 230d383 commit d22d5e2
Show file tree
Hide file tree
Showing 28 changed files with 525 additions and 125 deletions.
1 change: 1 addition & 0 deletions js/core/set_template_engine.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("./templates/template_engine_registry").setTemplateEngine;
373 changes: 373 additions & 0 deletions js/localization/messages/hu.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion js/ui/draggable.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,10 @@ var Draggable = DOMComponentWithTemplate.inherit({
template = this._getTemplate(template);
result = $(template.render(this._getDragTemplateArgs($element)));
} else if(clone) {
result = $element.clone().outerWidth($element.outerWidth()).appendTo(container);
result = $element.clone().css({
width: $element.css("width"),
height: $element.css("height")
}).appendTo(container);
}

return result.toggleClass(this._addWidgetPrefix(CLONE_CLASS), result.get(0) !== $element.get(0));
Expand Down
56 changes: 26 additions & 30 deletions js/ui/file_manager/file_items_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export default class FileItemsController {

this._currentDirectoryInfo = this._rootDirectoryInfo;

this._defaultIconMap = this._createDefaultIconMap();

this._securityController = new FileSecurityController({
allowedFileExtensions: this._options.allowedFileExtensions,
maxFileSize: this._options.maxUploadFileSize
Expand Down Expand Up @@ -249,9 +251,9 @@ export default class FileItemsController {
this._fileProvider.downloadItems(items);
}

getItemsContent(itemInfos) {
getItemContent(itemInfos) {
const items = itemInfos.map(i => i.fileItem);
return when(this._fileProvider.getItemsContent(items));
return when(this._fileProvider.getItemContent(items));
}

_processEditAction(actionInfo, action, completeAction) {
Expand Down Expand Up @@ -418,34 +420,28 @@ export default class FileItemsController {
}

const extension = fileItem.getExtension();
switch(extension) {
case ".txt":
return "doc"; // TODO change icon
case ".rtf":
case ".doc":
case ".docx":
case ".odt":
return "doc";
case ".xls":
case ".xlsx":
case ".ods":
return "exportxlsx";
case ".ppt":
case ".pptx":
case ".odp":
return "doc"; // TODO change icon
case ".pdf":
return "exportpdf";
case ".png":
case ".gif":
case ".jpg":
case ".jpeg":
case ".ico":
case ".bmp":
return "image";
default:
return "doc"; // TODO change icon
}
const icon = this._defaultIconMap[extension];
return icon || "doc";
}

_createDefaultIconMap() {
const result = {
".txt": "txtfile",
".rtf": "rtffile",
".doc": "docfile",
".docx": "docxfile",
".xls": "xlsfile",
".xlsx": "xlsxfile",
".ppt": "pptfile",
".pptx": "pptxfile",
".pdf": "pdffile"
};

[".png", ".gif", ".jpg", ".jpeg", ".ico", ".bmp"].forEach(extension => {
result[extension] = "image";
});

return result;
}

_createRootDirectory(text) {
Expand Down
2 changes: 1 addition & 1 deletion js/ui/file_manager/file_provider/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default class CustomFileProvider extends FileProvider {
return this._downloadItemsFunction(items);
}

getItemsContent(items) {
getItemContent(items) {
return this._getItemsContentFunction(items);
}

Expand Down
8 changes: 7 additions & 1 deletion js/ui/file_manager/file_provider/file_provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ class FileProvider {
downloadItems(items) {
}

getItemsContent(items) {
/**
* @name FileProviderMethods.getItemContent
* @publicName getItemContent()
* @param1 items:Array<object>
* @return Promise<object>
*/
getItemContent(items) {
}

getFileUploadChunkSize() {
Expand Down
2 changes: 1 addition & 1 deletion js/ui/file_manager/file_provider/remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class RemoteFileProvider extends FileProvider {
setTimeout(() => $form.remove());
}

getItemsContent(items) {
getItemContent(items) {
const args = this._getDownloadArgs(items);

const formData = new window.FormData();
Expand Down
5 changes: 4 additions & 1 deletion js/ui/file_manager/ui.file_manager.command_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,27 @@ export class FileManagerCommandManager {
{
name: "create",
text: "New folder",
icon: "plus",
icon: "newfolder",
enabled: this._permissions.create,
noFileItemRequired: true
},
{
name: "rename",
text: "Rename",
icon: "rename",
enabled: this._permissions.rename,
isSingleFileItemCommand: true
},
{
name: "move",
text: "Move",
icon: "movetofolder",
enabled: this._permissions.move
},
{
name: "copy",
text: "Copy",
icon: "copy",
enabled: this._permissions.copy
},
{
Expand Down
8 changes: 4 additions & 4 deletions js/ui/file_manager/ui.file_manager.editing.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ class FileManagerEditingControl extends Widget {
action: arg => this._download(arg)
},

getItemsContent: {
action: arg => this._getItemsContent(arg)
getItemContent: {
action: arg => this._getItemContent(arg)
}

};
Expand Down Expand Up @@ -303,9 +303,9 @@ class FileManagerEditingControl extends Widget {
return this._controller.downloadItems(itemInfos);
}

_getItemsContent(itemInfos) {
_getItemContent(itemInfos) {
itemInfos = itemInfos || this._model.getMultipleSelectedItems();
return this._controller.getItemsContent(itemInfos);
return this._controller.getItemContent(itemInfos);
}

_completeAction(operationInfo, context) {
Expand Down
3 changes: 3 additions & 0 deletions js/ui/file_manager/ui.file_manager.toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,21 @@ const DEFAULT_ITEM_CONFIGS = {
move: {
location: "before",
compactMode: {
showText: "inMenu",
locateInMenu: "auto"
}
},
copy: {
location: "before",
compactMode: {
showText: "inMenu",
locateInMenu: "auto"
}
},
rename: {
location: "before",
compactMode: {
showText: "inMenu",
locateInMenu: "auto"
}
},
Expand Down
1 change: 1 addition & 0 deletions js/ui/gantt/ui.gantt.dialogs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Popup from "../popup";
import Form from "../form";
import "../tag_box";

export class GanttDialog {
constructor(owner, $element) {
Expand Down
3 changes: 2 additions & 1 deletion js/ui/gantt/ui.gantt.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ class Gantt extends Widget {
}
}
_updateTreeListDataSource() {
this._setTreeListOption("dataSource", this.option("tasks.dataSource"));
const storeArray = this._tasksOption._getStore()._array;
this._setTreeListOption("dataSource", storeArray ? storeArray : this.option("tasks.dataSource"));
}

_getLoadPanel() {
Expand Down
43 changes: 16 additions & 27 deletions js/ui/scheduler/ui.scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,7 @@ const Scheduler = Widget.inherit({
* @type_function_param1_field2 cancel:boolean
* @type_function_param1_field3 itemData:any
* @type_function_param1_field4 itemElement:dxElement
* @type_function_param1_field5 fromIndex:number
* @type_function_param1_field6 fromData:any
* @type_function_param1_field5 fromData:any
*/
/**
* @name dxSchedulerOptions.appointmentDragging.onDragMove
Expand All @@ -616,13 +615,10 @@ const Scheduler = Widget.inherit({
* @type_function_param1_field2 cancel:boolean
* @type_function_param1_field3 itemData:any
* @type_function_param1_field4 itemElement:dxElement
* @type_function_param1_field5 fromIndex:number
* @type_function_param1_field6 toIndex:number
* @type_function_param1_field7 fromComponent:dxSortable|dxDraggable
* @type_function_param1_field8 toComponent:dxSortable|dxDraggable
* @type_function_param1_field9 fromData:any
* @type_function_param1_field10 toData:any
* @type_function_param1_field11 dropInsideItem:boolean
* @type_function_param1_field5 fromComponent:dxSortable|dxDraggable
* @type_function_param1_field6 toComponent:dxSortable|dxDraggable
* @type_function_param1_field7 fromData:any
* @type_function_param1_field8 toData:any
*/
/**
* @name dxSchedulerOptions.appointmentDragging.onDragEnd
Expand All @@ -632,13 +628,10 @@ const Scheduler = Widget.inherit({
* @type_function_param1_field2 cancel:boolean
* @type_function_param1_field3 itemData:any
* @type_function_param1_field4 itemElement:dxElement
* @type_function_param1_field5 fromIndex:number
* @type_function_param1_field6 toIndex:number
* @type_function_param1_field7 fromComponent:dxSortable|dxDraggable
* @type_function_param1_field8 toComponent:dxSortable|dxDraggable
* @type_function_param1_field9 fromData:any
* @type_function_param1_field10 toData:any
* @type_function_param1_field11 dropInsideItem:boolean
* @type_function_param1_field5 fromComponent:dxSortable|dxDraggable
* @type_function_param1_field6 toComponent:dxSortable|dxDraggable
* @type_function_param1_field7 fromData:any
* @type_function_param1_field8 toData:any
*/
/**
* @name dxSchedulerOptions.appointmentDragging.onAdd
Expand All @@ -647,12 +640,10 @@ const Scheduler = Widget.inherit({
* @type_function_param1_field1 event:event
* @type_function_param1_field2 itemData:any
* @type_function_param1_field3 itemElement:dxElement
* @type_function_param1_field4 fromIndex:number
* @type_function_param1_field5 toIndex:number
* @type_function_param1_field6 fromComponent:dxSortable|dxDraggable
* @type_function_param1_field7 toComponent:dxSortable|dxDraggable
* @type_function_param1_field9 fromData:any
* @type_function_param1_field10 toData:any
* @type_function_param1_field4 fromComponent:dxSortable|dxDraggable
* @type_function_param1_field5 toComponent:dxSortable|dxDraggable
* @type_function_param1_field6 fromData:any
* @type_function_param1_field7 toData:any
*/
/**
* @name dxSchedulerOptions.appointmentDragging.onRemove
Expand All @@ -661,11 +652,9 @@ const Scheduler = Widget.inherit({
* @type_function_param1_field1 event:event
* @type_function_param1_field2 itemData:any
* @type_function_param1_field3 itemElement:dxElement
* @type_function_param1_field4 fromIndex:number
* @type_function_param1_field5 toIndex:number
* @type_function_param1_field6 fromComponent:dxSortable|dxDraggable
* @type_function_param1_field7 toComponent:dxSortable|dxDraggable
* @type_function_param1_field8 fromData:any
* @type_function_param1_field4 fromComponent:dxSortable|dxDraggable
* @type_function_param1_field5 toComponent:dxSortable|dxDraggable
* @type_function_param1_field6 fromData:any
*/
showAllDayPanel: true,

Expand Down
3 changes: 3 additions & 0 deletions js/viz/core/themes/generic.carmine.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var themeModule = require("../../themes"),
registerTheme = themeModule.registerTheme,
registerThemeAlias = themeModule.registerThemeAlias,
ACCENT_COLOR = "#f05b41",
BACKGROUND_COLOR = "#fff",
TITLE_COLOR = "#333",
Expand Down Expand Up @@ -131,3 +132,5 @@ registerTheme({
}
}
}, "generic.light");

registerThemeAlias("generic.carmine.compact", "generic.carmine");
6 changes: 2 additions & 4 deletions js/viz/core/themes/generic.contrast.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var themeModule = require("../../themes"),
registerTheme = themeModule.registerTheme,

registerThemeAlias = themeModule.registerThemeAlias,
WHITE = "#ffffff",
BLACK = "#000000",
CONTRAST_ACTIVE = "#cf00da",
Expand Down Expand Up @@ -337,6 +337,4 @@ registerTheme({
}
}, "generic.light");

registerTheme({
name: "generic.contrast.compact"
}, "generic.contrast");
registerThemeAlias("generic.contrast.compact", "generic.contrast");
6 changes: 2 additions & 4 deletions js/viz/core/themes/generic.dark.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var themeModule = require("../../themes"),
registerTheme = themeModule.registerTheme,

registerThemeAlias = themeModule.registerThemeAlias,
WHITE = "#ffffff",
BLACK = "#000000",
SOME_GREY = "#2b2b2b",
Expand Down Expand Up @@ -262,6 +262,4 @@ registerTheme({
}
}, "generic.light");

registerTheme({
name: "generic.dark.compact"
}, "generic.dark");
registerThemeAlias("generic.dark.compact", "generic.dark");
3 changes: 3 additions & 0 deletions js/viz/core/themes/generic.darkmoon.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var themeModule = require("../../themes"),
registerTheme = themeModule.registerTheme,
registerThemeAlias = themeModule.registerThemeAlias,
ACCENT_COLOR = "#3debd3",
BACKGROUND_COLOR = "#465672",
TITLE_COLOR = "#fff",
Expand Down Expand Up @@ -173,3 +174,5 @@ registerTheme({
}
}
}, "generic.dark");

registerThemeAlias("generic.darkmoon.compact", "generic.darkmoon");
3 changes: 3 additions & 0 deletions js/viz/core/themes/generic.darkviolet.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var themeModule = require("../../themes"),
registerTheme = themeModule.registerTheme,
registerThemeAlias = themeModule.registerThemeAlias,
ACCENT_COLOR = "#9c63ff",
BACKGROUND_COLOR = "#17171f",
TITLE_COLOR = "#f5f6f7",
Expand Down Expand Up @@ -156,3 +157,5 @@ registerTheme({
}
}
}, "generic.dark");

registerThemeAlias("generic.darkviolet.compact", "generic.darkviolet");
3 changes: 3 additions & 0 deletions js/viz/core/themes/generic.greenmist.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var themeModule = require("../../themes"),
registerTheme = themeModule.registerTheme,
registerThemeAlias = themeModule.registerThemeAlias,
ACCENT_COLOR = "#3cbab2",
BACKGROUND_COLOR = "#f5f5f5",
TITLE_COLOR = "#28484f",
Expand Down Expand Up @@ -141,3 +142,5 @@ registerTheme({
}
}
}, "generic.light");

registerThemeAlias("generic.greenmist.compact", "generic.greenmist");
7 changes: 3 additions & 4 deletions js/viz/core/themes/generic.light.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ var WHITE = "#ffffff",
OUTSIDE = "outside",

themeModule = require("../../themes"),
registerTheme = themeModule.registerTheme;
registerTheme = themeModule.registerTheme,
registerThemeAlias = themeModule.registerThemeAlias;

registerTheme({
name: "generic.light",
Expand Down Expand Up @@ -1744,6 +1745,4 @@ registerTheme({
}
});

registerTheme({
name: "generic.light.compact"
}, "generic.light");
registerThemeAlias("generic.light.compact", "generic.light");
Loading

0 comments on commit d22d5e2

Please sign in to comment.