Commit e2320a88 authored by Pavel Mashliakovskiy's avatar Pavel Mashliakovskiy 🤹🏻

Merge remote-tracking branch 'origin/master'

parents c65ef369 3b4c0703
Pipeline #21752 skipped with stage
......@@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Added
- added new attributes `objectID` and `objectEntity` into `udisk_card` for further integration with the `Scriptum` system
- rewritten form opening by double click on file
### Changed
......
......@@ -123,7 +123,8 @@ Ext.define('UDISK.AdminView', {
me.mainTree.on('select', me.onNodeSelect, me)
me.orderList = { '0': {expression: 'isFolder', order: 'desc'} }
me.fieldList = ['ID', 'name', 'parentID', 'isFolder', 'ownerID', 'fsize', 'contentType', 'isTemporary', 'fileData', 'mi_treePath', /* 'permission.accessType', */ 'mi_modifyDate']
me.fieldList = ['ID', 'name', 'parentID', 'isFolder', 'ownerID', 'fsize', 'contentType',
'isTemporary', 'fileData', 'mi_treePath', /* 'permission.accessType', */ 'mi_modifyDate', 'objectID', 'objectEntity']
me.isTempWhere = {
expression: '[isTemporary]',
condition: 'notEqual',
......@@ -516,7 +517,31 @@ Ext.define('UDISK.AdminView', {
me.refreshCurrent()
})
} else {
me.openEditForm()
// me.openEditForm()
me.openObjectForm()
}
},
openObjectForm: function () {
const me = this
let selection = me.fileGrid.getSelectionModel().getSelection()
if (selection.length < 1) {
return
}
const objectID = selection[0].get('objectID')
if (objectID) {
const config = {
cmdType: 'showForm',
instanceID: objectID,
entity: selection[0].get('objectEntity'),
isModal: true,
sender: this
}
config.onClose = function () {
me.reloadFolders()
}
$App.doCommand(config)
}
},
......
......@@ -84,6 +84,19 @@
"description": "file",
"allowNull": true,
"storeName": "udiskStore"
},
{
"name": "objectID",
"dataType": "BigInt",
"caption": "Related object ID",
"defaultView": false
},
{
"name": "objectEntity",
"dataType": "String",
"size": 32,
"caption": "Related object entity name",
"defaultView": false
}
],
"mixins": {
......@@ -102,4 +115,4 @@
"lockEntity": "udisk_card"
}
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment