diff --git a/js/app/views/CatalogUI.js b/js/app/views/CatalogUI.js index a73a193..648e644 100644 --- a/js/app/views/CatalogUI.js +++ b/js/app/views/CatalogUI.js @@ -20,7 +20,7 @@ Ext.define('amdaUI.CatalogUI', { 'amdaUI.OperationsTT', 'Ext.grid.plugin.BufferedRenderer', 'amdaUI.StatisticalPlug', -+ 'amdaDesktop.AmdaStateProvider' + 'amdaDesktop.AmdaStateProvider' ], isCatalog: true, @@ -1281,19 +1281,26 @@ Ext.define('amdaUI.CatalogUI', { this.formPanel = Ext.create('Ext.form.Panel', { region: 'center', + me:this, layout: 'hbox', - overflowY:'auto', model: 'amdaModel.Catalog', trackResetOnLoad: true, // reset to the last loaded record bodyStyle: {background: '#dfe8f6'}, defaults: {border: false, align: 'stretch', bodyStyle: {background: '#dfe8f6'}, padding: '3'}, fieldDefaults: {labelWidth: 80, labelAlign: 'top'}, items: [{ + xtype:'panel', + overflowY:true, + height:530, + layout:'hbox', + defaults: {border: false, align: 'stretch',bodyStyle: {background: '#dfe8f6',padding: '1'}}, + flex: 1, + items:[{ xtype: 'form', flex: 1, buttonAlign: 'left', // title : 'Information', - layout: {type: 'vbox', pack: 'start', align: 'stretch'}, + layout: {type: 'vbox', pack:'start',align: 'stretch'}, items: [ this.fieldName, { @@ -1322,6 +1329,8 @@ Ext.define('amdaUI.CatalogUI', { emptyText: 'YYYY/MM/DDThh:mm:ss.fff', format: 'Y-m-d\\TH:i:s.u', enforceMaxLength: true, + disabled: true, + hideTrigger: true, maxLength: 25, labelWidth: 60, labelAlign: 'left', @@ -1336,12 +1345,12 @@ Ext.define('amdaUI.CatalogUI', { return value; } }, - listeners: { - change: this.onChangeStartField, - focus: function(field) { - this.activeField = 'surveyStart'; - }, - } + // listeners: { + // change: this.onChangeStartField, + // focus: function(field) { + // this.activeField = 'surveyStart'; + // }, + // } }, { fieldLabel: 'Stop Time', name: 'surveyStop', @@ -1349,16 +1358,18 @@ Ext.define('amdaUI.CatalogUI', { format: 'Y-m-d\\TH:i:s.u', labelAlign: 'left', enforceMaxLength: true, + disabled: true, + hideTrigger: true, maxLength: 25, labelWidth: 60, align: 'left', - listeners: { - change: this.onChangeStopField, - focus: function(field) { - this.activeField = 'surveyStop'; - }, - } - }] + // listeners: { + // change: this.onChangeStopField, + // focus: function(field) { + // this.activeField = 'surveyStop'; + // }, + // } + }] }, { xtype: 'textarea', @@ -1367,139 +1378,158 @@ Ext.define('amdaUI.CatalogUI', { height:50 }, { - xtype: 'textarea', - name: 'description', - fieldLabel: 'Description', - height: 150 + xtype:'panel', + resizable:true, + height: 165, + bodyStyle: {background: '#dfe8f6',padding: '1'}, + border:false, + layout:'fit', + items:[{ + xtype: 'htmleditor', + align:'stretch', + enableFont:false, + enableAlignments: false, + enableColors:false, + name: 'description', + fieldLabel: 'Description', + }], }, { xtype: 'operationsTT', margin:'5 0 0 0', collapsible: true, - collapsed:true, + collapsed:false, parent: this, isCat:true, id: 'operationCat' - },], - dockedItems: [ - { - xtype: 'toolbar', - dock: 'bottom', - ui: 'footer', - height: 50, + }, + ], + + }], - items: [ - { - type: 'button', - text: 'Save', - width: 50, - scope: this, - handler: function () - { - this.saveCatalog(); - } - }, { - type: 'button', - text: 'Reset', - width: 50, - scope: this, - handler: function () { - var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); - // module.createLinkedNode(); - // module.createObject(); - this.setObject(module.getLinkedNode().get('object'), true); - } - }, - { - type: 'button', - text: 'Create New Catalog', - width: 120, - scope: this, - handler: function () - { - var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); + }, + { + xtype: 'form', + bodyStyle: {background: '#dfe8f6'}, + //padding: '3', + flex: 2, + items: [this.TTGrid] + } + ], + dockedItems: [ + { + xtype: 'toolbar', + dock: 'bottom', + ui: 'footer', + height: 35, - if (!module) - return; + items: [ + { + type: 'button', + text: 'Save', + width: 50, + scope: this, + handler: function () + { + this.saveCatalog(); + } + }, { + type: 'button', + text: 'Reset', + width: 50, + scope: this, + handler: function () { + var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); + // module.createLinkedNode(); + // module.createObject(); + this.setObject(module.getLinkedNode().get('object'), true); + } + }, + { + type: 'button', + text: 'Create New Catalog', + width: 120, + scope: this, + handler: function () + { + var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); - module.createLinkedNode(); - module.createObject(); + if (!module) + return; - var obj = module.linkedNode.get('object'); + module.createLinkedNode(); + module.createObject(); - var me = this; + var obj = module.linkedNode.get('object'); - Ext.Msg.prompt('Create catalog', 'Enter the number of columns:', function (btn, text) { - if (btn == 'ok') { - module.createLinkedNode(); - module.createObject(); - var obj = module.linkedNode.get('object'); + var me = this; - var nbParam = parseInt(text); - if ((nbParam <= 0) || (nbParam > 100)) { - nbParam = 1; - } + Ext.Msg.prompt('Create catalog', 'Enter the number of columns:', function (btn, text) { + if (btn == 'ok') { + module.createLinkedNode(); + module.createObject(); + var obj = module.linkedNode.get('object'); - obj.set('nbParameters', nbParam); - me.setObject(obj, true); - } - }, this); + var nbParam = parseInt(text); + if ((nbParam <= 0) || (nbParam > 100)) { + nbParam = 1; + } + obj.set('nbParameters', nbParam); + me.setObject(obj, true); } - }] + }, this); + + } }, - //statistical info - { - xtype: 'toolbar', - dock: 'bottom', - ui: 'footer', - items: [{ - xtype: 'button', - text: 'Statistical info', - scope: this, - //dock: 'bottom', - //ui: 'footer', - handler: function () { - this.fireEvent('info', 'catalogUI'); - } - }, - { - type: 'button', - text: 'Visualize', - scope: this, - handler: function () { - var me = this; - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.visu.id, true, function (module) { - module.visualize(me.object); - }); - } - }, - ] + //statistical info + { + xtype: 'toolbar', + dock: 'bottom', + ui: 'footer', + items: [{ + xtype: 'button', + text: 'Statistical info', + scope: this, + //dock: 'bottom', + //ui: 'footer', + handler: function () { + this.fireEvent('info', 'catalogUI'); + } }, { - xtype: 'toolbar', - dock: 'bottom', - ui: 'footer', - items: [{ - xtype: 'button', - text: 'Generate Time Table', - scope: this, - //dock: 'bottom', - //ui: 'footer', - handler: function () { - this.generateTT(this.object.get('id')); - } - }]}, - ], - + type: 'button', + text: 'Visualize', + scope: this, + handler: function () { + var me = this; + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.visu.id, true, function (module) { + module.visualize(me.object); + }); + } + }, + ] }, { - xtype: 'form', - bodyStyle: {background: '#dfe8f6'}, - //padding: '3', - flex: 2, - items: [this.TTGrid] - }] + xtype: 'toolbar', + dock: 'bottom', + ui: 'footer', + items: [{ + xtype: 'button', + text: 'Generate Time Table', + scope: this, + //dock: 'bottom', + //ui: 'footer', + handler: function () { + this.generateTT(this.object.get('id')); + } + }] + },] + }, + + + + ], }); this.TTGrid.getSelectionModel().on('selectionchange', function (selModel, selections) { diff --git a/js/app/views/OperationsTT.js b/js/app/views/OperationsTT.js index 785ce6d..1115c30 100644 --- a/js/app/views/OperationsTT.js +++ b/js/app/views/OperationsTT.js @@ -179,7 +179,8 @@ Ext.define('amdaUI.OperationsTT', { var config = { title:'Operations on Intervals', - style: { borderWidth: '2px' }, + style: this.isCat ? '' :{ borderWidth: '2px' }, + border: this.isCat ? false:'', items: [ {xtype: 'splitter', width: 5}, this.formExtend, -- libgit2 0.21.2