Commit 4aa7998c authored by Frank Bergmann's avatar Frank Bergmann

- Display of operations in Sync store now with editor for operation

- Now using a table to determine sync action
parent 9de80c31
......@@ -16,7 +16,6 @@
/* Load Electron inter process communication (IPC) */
const {ipcRenderer} = require('electron')
// fraber 2019-08-17
Ext.Loader.setPath('POSync', '.');
Ext.Loader.setConfig({disableCaching: false});
......@@ -124,14 +123,45 @@ Ext.define('POSync.view.Viewport', {
itemId: 'operations',
store: Ext.create('POSync.store.Operations', {storeId: 'operations2'}),
emptyText: 'No operations, or all operations already executed',
selType: 'cellmodel',
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
],
columns: [
// {text: 'Project', dataIndex: 'project_id', flex: 1},
{text: 'Operation', dataIndex: 'op', width: 80},
{text: 'Operation', dataIndex: 'op', width: 80, editor: {
xtype: 'combobox',
forceSelection: true,
allowBlank: false,
editable: false,
store: Ext.create('Ext.data.Store', {
fields: ['action', 'pretty'],
data: [
// {action: "download", pretty: "Download from Remote Server"},
// {action: "upload", pretty: "Upload to Remote Server"}
{action: "download", pretty: "Download"},
{action: "upload", pretty: "Upload"}
]
}),
displayField: 'pretty',
valueField: 'action',
flex: 1
}, renderer: function(value) {
switch (value) {
case "conflict": return "Conflict";
case "upload": return "Upload";
case "download": return "Download";
default: return value;
}
}},
{text: 'Path', dataIndex: 'file_path', flex: 2},
{text: 'Name', dataIndex: 'file_name', flex: 3},
{text: 'Status', dataIndex: 'status', width: 50},
{text: 'Msg', dataIndex: 'err_msg', flex: 4},
// {text: 'Comment', dataIndex: 'comment', flex: 5}
{text: 'Comment', dataIndex: 'comment', flex: 5}
]
}
}, {
......
This diff is collapsed.
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