@syncfusion/ej2-filemanager 20.1.56 → 20.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/ej2-filemanager.umd.min.js +2 -2
- package/dist/ej2-filemanager.umd.min.js.map +1 -1
- package/dist/es6/ej2-filemanager.es2015.js +43 -13
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +43 -13
- package/dist/es6/ej2-filemanager.es5.js.map +1 -1
- package/dist/global/ej2-filemanager.min.js +2 -2
- package/dist/global/ej2-filemanager.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/file-manager/actions/toolbar.js +6 -1
- package/src/file-manager/base/file-manager.d.ts +1 -0
- package/src/file-manager/base/file-manager.js +3 -0
- package/src/file-manager/base/interface.d.ts +3 -0
- package/src/file-manager/common/utility.d.ts +1 -1
- package/src/file-manager/common/utility.js +24 -3
- package/src/file-manager/layout/details-view.js +3 -3
- package/src/file-manager/layout/large-icons-view.js +3 -3
- package/src/file-manager/layout/navigation-pane.js +4 -3
@@ -1449,7 +1449,7 @@ function sortbyClickHandler(parent, args) {
|
|
1449
1449
|
tick = false;
|
1450
1450
|
}
|
1451
1451
|
if (!tick) {
|
1452
|
-
parent.sortBy = getSortField(args.item.id);
|
1452
|
+
parent.sortBy = getSortField(args.item.id, parent);
|
1453
1453
|
}
|
1454
1454
|
else {
|
1455
1455
|
parent.sortOrder = getSortField(args.item.id);
|
@@ -1475,12 +1475,24 @@ function sortbyClickHandler(parent, args) {
|
|
1475
1475
|
* @returns {string} - returns the sorted fields
|
1476
1476
|
* @private
|
1477
1477
|
*/
|
1478
|
-
function getSortField(id) {
|
1478
|
+
function getSortField(id, parent) {
|
1479
1479
|
var text = id.substring(id.lastIndexOf('_') + 1);
|
1480
1480
|
var field = text;
|
1481
|
+
var column;
|
1482
|
+
if (parent) {
|
1483
|
+
column = parent.detailsViewSettings.columns;
|
1484
|
+
}
|
1481
1485
|
switch (text) {
|
1482
1486
|
case 'date':
|
1483
|
-
|
1487
|
+
for (var i = 0; i < column.length; i++) {
|
1488
|
+
if (column[i].field === 'dateModified' || column[i].field === 'dateCreated') {
|
1489
|
+
field = column[i].field;
|
1490
|
+
break;
|
1491
|
+
}
|
1492
|
+
else {
|
1493
|
+
field = '_fm_modified';
|
1494
|
+
}
|
1495
|
+
}
|
1484
1496
|
break;
|
1485
1497
|
case 'ascending':
|
1486
1498
|
field = 'Ascending';
|
@@ -1558,6 +1570,15 @@ function pasteHandler(parent) {
|
|
1558
1570
|
parent.enablePaste = false;
|
1559
1571
|
parent.notify(hidePaste, {});
|
1560
1572
|
removeBlur(parent);
|
1573
|
+
var result = {
|
1574
|
+
files: null,
|
1575
|
+
error: {
|
1576
|
+
code: '402',
|
1577
|
+
message: getLocaleText(parent, 'Same-Folder-Error'),
|
1578
|
+
fileExists: null
|
1579
|
+
}
|
1580
|
+
};
|
1581
|
+
createDialog(parent, 'Error', result);
|
1561
1582
|
}
|
1562
1583
|
}
|
1563
1584
|
}
|
@@ -3919,9 +3940,9 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
3919
3940
|
altEnter: 'alt+enter',
|
3920
3941
|
esc: 'escape',
|
3921
3942
|
del: 'delete',
|
3922
|
-
ctrlX: 'ctrl+x',
|
3923
|
-
ctrlC: 'ctrl+c',
|
3924
|
-
ctrlV: 'ctrl+v',
|
3943
|
+
ctrlX: this.parent.isMac ? 'cmd+x' : 'ctrl+x',
|
3944
|
+
ctrlC: this.parent.isMac ? 'cmd+c' : 'ctrl+c',
|
3945
|
+
ctrlV: this.parent.isMac ? 'cmd+v' : 'ctrl+v',
|
3925
3946
|
f2: 'f2',
|
3926
3947
|
shiftdel: 'shift+delete',
|
3927
3948
|
back: 'backspace',
|
@@ -6585,6 +6606,8 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6585
6606
|
_this.droppedObjects = [];
|
6586
6607
|
_this.uploadingCount = 0;
|
6587
6608
|
_this.uploadedCount = 0;
|
6609
|
+
//Specifies whether the operating system is MAC or not
|
6610
|
+
_this.isMac = false;
|
6588
6611
|
FileManager_1.Inject(BreadCrumbBar, LargeIconsView, ContextMenu$2);
|
6589
6612
|
return _this;
|
6590
6613
|
}
|
@@ -6694,6 +6717,7 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6694
6717
|
this.allowMultiSelection ? this.selectedItems : this.selectedItems.slice(this.selectedItems.length - 1);
|
6695
6718
|
this.setProperties({ selectedItems: slItems }, true);
|
6696
6719
|
this.fileView = this.view;
|
6720
|
+
this.isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
6697
6721
|
this.setRtl(this.enableRtl);
|
6698
6722
|
this.addEventListeners();
|
6699
6723
|
read(this, (this.path !== this.originalPath) ? initialEnd : finalizeEnd, this.path);
|
@@ -7981,7 +8005,12 @@ var Toolbar$1 = /** @__PURE__ @class */ (function () {
|
|
7981
8005
|
items[itemCount].iconCss = this.parent.sortBy === 'size' ? TB_OPTION_DOT : '';
|
7982
8006
|
}
|
7983
8007
|
else if (items[itemCount].id === this.getPupupId('date')) {
|
7984
|
-
|
8008
|
+
if (this.parent.sortBy === 'dateModified' || this.parent.sortBy === 'dateCreated') {
|
8009
|
+
items[itemCount].iconCss = this.parent.sortBy === this.parent.sortBy ? TB_OPTION_DOT : '';
|
8010
|
+
}
|
8011
|
+
else {
|
8012
|
+
items[itemCount].iconCss = this.parent.sortBy === '_fm_modified' ? TB_OPTION_DOT : '';
|
8013
|
+
}
|
7985
8014
|
}
|
7986
8015
|
else if (items[itemCount].id === this.getPupupId('ascending')) {
|
7987
8016
|
items[itemCount].iconCss = this.parent.sortOrder === 'Ascending' ? TB_OPTION_TICK : '';
|
@@ -8263,6 +8292,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8263
8292
|
* @param {IFileManager} parent - specifies the parent element.
|
8264
8293
|
* @hidden
|
8265
8294
|
*/
|
8295
|
+
/* istanbul ignore next */
|
8266
8296
|
function NavigationPane(parent) {
|
8267
8297
|
this.removeNodes = [];
|
8268
8298
|
this.moveNames = [];
|
@@ -8284,9 +8314,9 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8284
8314
|
altEnter: 'alt+enter',
|
8285
8315
|
esc: 'escape',
|
8286
8316
|
del: 'delete',
|
8287
|
-
ctrlX: 'ctrl+x',
|
8288
|
-
ctrlC: 'ctrl+c',
|
8289
|
-
ctrlV: 'ctrl+v',
|
8317
|
+
ctrlX: this.parent.isMac ? 'cmd+x' : 'ctrl+x',
|
8318
|
+
ctrlC: this.parent.isMac ? 'cmd+c' : 'ctrl+c',
|
8319
|
+
ctrlV: this.parent.isMac ? 'cmd+v' : 'ctrl+v',
|
8290
8320
|
ctrlShiftN: 'ctrl+shift+n',
|
8291
8321
|
shiftF10: 'shift+F10',
|
8292
8322
|
f2: 'f2'
|
@@ -9146,9 +9176,9 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
9146
9176
|
home: 'home',
|
9147
9177
|
moveUp: 'uparrow',
|
9148
9178
|
del: 'delete',
|
9149
|
-
ctrlX: 'ctrl+x',
|
9150
|
-
ctrlC: 'ctrl+c',
|
9151
|
-
ctrlV: 'ctrl+v',
|
9179
|
+
ctrlX: this.parent.isMac ? 'cmd+x' : 'ctrl+x',
|
9180
|
+
ctrlC: this.parent.isMac ? 'cmd+c' : 'ctrl+c',
|
9181
|
+
ctrlV: this.parent.isMac ? 'cmd+v' : 'ctrl+v',
|
9152
9182
|
ctrlShiftN: 'ctrl+shift+n',
|
9153
9183
|
shiftdel: 'shift+delete',
|
9154
9184
|
ctrlD: 'ctrl+d',
|