BUG 0000 PM TABLES tweaks
- tweaks on Edit report - icons size adjustment - labels
@@ -158,7 +158,7 @@ var processmap=function(){
|
|||||||
}.extend(this),
|
}.extend(this),
|
||||||
reportTables:function(){
|
reportTables:function(){
|
||||||
var panel = this.panels.buildingBlocks;
|
var panel = this.panels.buildingBlocks;
|
||||||
panel.addContentTitle(G_STRINGS.ID_PROCESSMAP_REPORT_TABLES);
|
panel.addContentTitle('');
|
||||||
panel.clearContent();
|
panel.clearContent();
|
||||||
var iframe=document.createElement('iframe');
|
var iframe=document.createElement('iframe');
|
||||||
iframe.setAttribute('id','reportTablesIframe');
|
iframe.setAttribute('id','reportTablesIframe');
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ Ext.onReady(function(){
|
|||||||
})
|
})
|
||||||
}, {
|
}, {
|
||||||
xtype: 'booleancolumn',
|
xtype: 'booleancolumn',
|
||||||
header: 'Null',
|
header: _('ID_NULL'),
|
||||||
dataIndex: 'field_null',
|
dataIndex: 'field_null',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 50,
|
width: 50,
|
||||||
@@ -219,10 +219,10 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
xtype: 'booleancolumn',
|
xtype: 'booleancolumn',
|
||||||
header: 'Primary Key',
|
header: _('ID_PRIMARY_KEY'),
|
||||||
dataIndex: 'field_key',
|
dataIndex: 'field_key',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 50,
|
width: 80,
|
||||||
trueText: 'Yes',
|
trueText: 'Yes',
|
||||||
falseText: 'No',
|
falseText: 'No',
|
||||||
editor: {
|
editor: {
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ Ext.onReady(function(){
|
|||||||
autoWidth : true,
|
autoWidth : true,
|
||||||
stripeRows : true,
|
stripeRows : true,
|
||||||
height : 100,
|
height : 100,
|
||||||
width : '25%',
|
width : 290,
|
||||||
stateful : true,
|
stateful : true,
|
||||||
stateId : 'grid',
|
stateId : 'grid',
|
||||||
enableHdMenu : false,
|
enableHdMenu : false,
|
||||||
@@ -158,13 +158,12 @@ Ext.onReady(function(){
|
|||||||
rowdblclick: AssignFieldsAction
|
rowdblclick: AssignFieldsAction
|
||||||
},
|
},
|
||||||
tbar: [
|
tbar: [
|
||||||
'->',
|
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
id: 'searchTxt',
|
id: 'searchTxt',
|
||||||
ctCls:'pm_search_text_field',
|
ctCls:'pm_search_text_field',
|
||||||
allowBlank: true,
|
allowBlank: true,
|
||||||
width: 150,
|
width: 220,
|
||||||
emptyText: _('ID_ENTER_SEARCH_TERM'),
|
emptyText: _('ID_ENTER_SEARCH_TERM'),
|
||||||
listeners: {
|
listeners: {
|
||||||
specialkey: function(f,e){
|
specialkey: function(f,e){
|
||||||
@@ -454,10 +453,6 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
assignedGrid.getSelectionModel().on('selectionchange', function(sm){
|
|
||||||
//alert('s');
|
|
||||||
});
|
|
||||||
|
|
||||||
// (vertical) selection buttons
|
// (vertical) selection buttons
|
||||||
buttonsPanel = new Ext.Panel({
|
buttonsPanel = new Ext.Panel({
|
||||||
width : 40,
|
width : 40,
|
||||||
@@ -755,19 +750,6 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var tbar = new Array();
|
|
||||||
//if (_plugin_permissions !== false) {
|
|
||||||
if (TABLE !== false && TABLE.ADD_TAB_TAG == 'plugin@simplereport') {
|
|
||||||
tbar = [
|
|
||||||
{
|
|
||||||
text: _plugin_permissions.label,
|
|
||||||
handler: function(){
|
|
||||||
setTimeout(_plugin_permissions.fn, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
var items = new Array();
|
var items = new Array();
|
||||||
if (PRO_UID === false)
|
if (PRO_UID === false)
|
||||||
items.push(processComboBox);
|
items.push(processComboBox);
|
||||||
@@ -812,7 +794,7 @@ Ext.onReady(function(){
|
|||||||
items.push(comboDbConnections);
|
items.push(comboDbConnections);
|
||||||
|
|
||||||
|
|
||||||
var frmDetails = new Ext.FormPanel({
|
var frmDetailsConfig = {
|
||||||
id:'frmDetails',
|
id:'frmDetails',
|
||||||
region: 'north',
|
region: 'north',
|
||||||
labelWidth: 120,
|
labelWidth: 120,
|
||||||
@@ -827,10 +809,19 @@ Ext.onReady(function(){
|
|||||||
msgTarget: 'side',
|
msgTarget: 'side',
|
||||||
align:'center'
|
align:'center'
|
||||||
},
|
},
|
||||||
items: items,
|
items: items
|
||||||
tbar: tbar
|
}
|
||||||
});
|
|
||||||
|
if (TABLE !== false && TABLE.ADD_TAB_TAG == 'plugin@simplereport') {
|
||||||
|
frmDetailsConfig.tbar = [{
|
||||||
|
text: _plugin_permissions.label,
|
||||||
|
handler: function(){
|
||||||
|
setTimeout(_plugin_permissions.fn, 0);
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
var frmDetails = new Ext.FormPanel(frmDetailsConfig);
|
||||||
|
|
||||||
southPanel = new Ext.FormPanel({
|
southPanel = new Ext.FormPanel({
|
||||||
region: 'south',
|
region: 'south',
|
||||||
@@ -869,10 +860,7 @@ Ext.onReady(function(){
|
|||||||
if (TABLE === false) {
|
if (TABLE === false) {
|
||||||
if(TABLE.ADD_TAB_TYPE != 'GRID')
|
if(TABLE.ADD_TAB_TYPE != 'GRID')
|
||||||
loadFieldNormal();
|
loadFieldNormal();
|
||||||
} //else if(typeof avFieldsList != 'undefined')
|
}
|
||||||
//loadAvFieldsFromArray(avFieldsList);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
|
/**
|
||||||
var checkColumn;
|
* Export PM Tables
|
||||||
|
* developed on date 2011-07-20
|
||||||
|
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||||
|
*/
|
||||||
|
|
||||||
var Export = function() {
|
var Export = function() {
|
||||||
return {
|
return {
|
||||||
@@ -10,6 +13,7 @@ var Export = function() {
|
|||||||
// defining components
|
// defining components
|
||||||
targetGrid : {},
|
targetGrid : {},
|
||||||
window : {},
|
window : {},
|
||||||
|
|
||||||
// init
|
// init
|
||||||
init : function() {
|
init : function() {
|
||||||
Ext.form.Field.prototype.msgTarget = 'side';
|
Ext.form.Field.prototype.msgTarget = 'side';
|
||||||
@@ -24,7 +28,9 @@ var Export = function() {
|
|||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CONFIGURE ROUTINES
|
||||||
|
*/
|
||||||
Export.configure = function()
|
Export.configure = function()
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -32,7 +38,7 @@ Export.configure = function()
|
|||||||
*/
|
*/
|
||||||
this.targetGridConfig = {
|
this.targetGridConfig = {
|
||||||
id : 'targetGrid',
|
id : 'targetGrid',
|
||||||
title : 'To Export tables',
|
title : _('ID_TABLES_TO_EXPORT'),
|
||||||
region: 'east',
|
region: 'east',
|
||||||
width : 450,
|
width : 450,
|
||||||
split : true,
|
split : true,
|
||||||
@@ -50,16 +56,15 @@ Export.configure = function()
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
schemaColumn = new Ext.grid.CheckColumn({
|
schemaColumn = new Ext.grid.CheckColumn({
|
||||||
header: 'Schema',
|
header: _('ID_SCHEMA'),
|
||||||
dataIndex: '_SCHEMA',
|
dataIndex: '_SCHEMA',
|
||||||
width: 55,
|
width: 55,
|
||||||
checked: true
|
checked: true
|
||||||
});
|
});
|
||||||
|
|
||||||
dataColumn = new Ext.grid.CheckColumn({
|
dataColumn = new Ext.grid.CheckColumn({
|
||||||
header: 'Data',
|
header: _('ID_DATA'),
|
||||||
dataIndex: '_DATA',
|
dataIndex: '_DATA',
|
||||||
width: 55
|
width: 55
|
||||||
});
|
});
|
||||||
@@ -72,8 +77,8 @@ Export.configure = function()
|
|||||||
columns: [
|
columns: [
|
||||||
new Ext.grid.RowNumberer(),
|
new Ext.grid.RowNumberer(),
|
||||||
{id:'ADD_TAB_UID', dataIndex: 'ADD_TAB_UID', hidden:true, hideable:false},
|
{id:'ADD_TAB_UID', dataIndex: 'ADD_TAB_UID', hidden:true, hideable:false},
|
||||||
{header: _('ID_TABLE'), dataIndex: 'ADD_TAB_NAME', width: 300},
|
{header: _('ID_PMTABLE'), dataIndex: 'ADD_TAB_NAME', width: 300},
|
||||||
{header: _('ID_TYPE'), dataIndex: '_TYPE', width:70},
|
{header: _('ID_TYPE'), dataIndex: '_TYPE', width:100},
|
||||||
schemaColumn,
|
schemaColumn,
|
||||||
dataColumn
|
dataColumn
|
||||||
]
|
]
|
||||||
@@ -87,19 +92,14 @@ Export.configure = function()
|
|||||||
this.windowConfig = {
|
this.windowConfig = {
|
||||||
title: '',
|
title: '',
|
||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
width: 550,
|
width: 570,
|
||||||
height: 400,
|
height: 400,
|
||||||
modal: true,
|
modal: true,
|
||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
maximizable: true,
|
maximizable: true,
|
||||||
closeAction: 'hide',
|
closeAction: 'hide',
|
||||||
maximizable : false,
|
maximizable : false,
|
||||||
items: [],
|
items: []
|
||||||
listeners:{
|
|
||||||
show:function() {
|
|
||||||
this.loadMask = new Ext.LoadMask(this.body, { msg:'Loading. Please wait...' });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.windowConfig.buttons = [{
|
this.windowConfig.buttons = [{
|
||||||
@@ -114,24 +114,26 @@ Export.configure = function()
|
|||||||
|
|
||||||
} //end configure
|
} //end configure
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EXPORT ROUTINE
|
||||||
|
*/
|
||||||
Export.submit = function()
|
Export.submit = function()
|
||||||
{
|
{
|
||||||
|
|
||||||
var rows = Export.targetGrid.getStore();
|
var rows = Export.targetGrid.getStore();
|
||||||
var rowsData = new Array();
|
var rowsData = new Array();
|
||||||
|
|
||||||
for (i=0; i < rows.getCount(); i++) {
|
for (i=0; i < rows.getCount(); i++) {
|
||||||
row = rows.getAt(i);
|
row = rows.getAt(i);
|
||||||
if ( row.data._SCHEMA == false && row.data._DATA == false) {
|
if ( row.data._SCHEMA == false && row.data._DATA == false) {
|
||||||
PMExt.info('INFO', 'From each table you should select Schema/Data to export at least one.');
|
PMExt.info(_('ID_INFO'), _('ID_PMTABLES_NOTICE_EXPORT'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
rowsData.push(row.data);
|
rowsData.push(row.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ext.Msg.show({
|
Ext.Msg.show({
|
||||||
title : '', //TRANSLATIONS.ID_TITLE_START_CASE, //'Start Case',
|
title : '',
|
||||||
msg : 'Processing...',
|
msg : _('ID_PROCESSING'),
|
||||||
wait: true,
|
wait: true,
|
||||||
waitConfig: {interval:500}
|
waitConfig: {interval:500}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -41,19 +41,19 @@ Ext.onReady(function(){
|
|||||||
var newMenuOptions = new Array();
|
var newMenuOptions = new Array();
|
||||||
if (PRO_UID == false) {
|
if (PRO_UID == false) {
|
||||||
newMenuOptions.push({
|
newMenuOptions.push({
|
||||||
text: 'New Table',
|
text: _('ID_NEW_PMATBLE'),
|
||||||
handler: newPMTable
|
handler: newPMTable
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
newMenuOptions.push({
|
newMenuOptions.push({
|
||||||
text: 'New Report Table',
|
text: _('ID_NEW_REPORT_TABLE'),
|
||||||
handler: NewReportTable
|
handler: NewReportTable
|
||||||
});
|
});
|
||||||
|
|
||||||
if (PRO_UID !== false) {
|
if (PRO_UID !== false) {
|
||||||
newMenuOptions.push({
|
newMenuOptions.push({
|
||||||
text: 'New Report Table (Old Version)',
|
text: _('ID_NEW_REPORT_TABLE_OLD'),
|
||||||
handler: NewReportTableOld
|
handler: NewReportTableOld
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,6 @@ Ext.onReady(function(){
|
|||||||
newButton = new Ext.Action({
|
newButton = new Ext.Action({
|
||||||
text: _('ID_NEW'),
|
text: _('ID_NEW'),
|
||||||
icon: '/images/add-table.png',
|
icon: '/images/add-table.png',
|
||||||
|
|
||||||
menu: newMenuOptions
|
menu: newMenuOptions
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -79,13 +78,6 @@ Ext.onReady(function(){
|
|||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
|
|
||||||
// importButton = new Ext.Action({
|
|
||||||
// text: _('ID_IMPORT'),
|
|
||||||
// iconCls: 'silk-add',
|
|
||||||
// icon: '/images/import.gif',
|
|
||||||
// handler: importOption
|
|
||||||
// });
|
|
||||||
|
|
||||||
importButton = new Ext.Action({
|
importButton = new Ext.Action({
|
||||||
text: _('ID_IMPORT'),
|
text: _('ID_IMPORT'),
|
||||||
iconCls: 'silk-add',
|
iconCls: 'silk-add',
|
||||||
@@ -114,10 +106,6 @@ Ext.onReady(function(){
|
|||||||
handler: DoSearch
|
handler: DoSearch
|
||||||
});
|
});
|
||||||
|
|
||||||
// contextMenu = new Ext.menu.Menu({
|
|
||||||
// items: [editButton, deleteButton,'-',dataButton,'-',exportButton]
|
|
||||||
// });
|
|
||||||
|
|
||||||
var contextMenuItems = new Array();
|
var contextMenuItems = new Array();
|
||||||
contextMenuItems.push(editButton);
|
contextMenuItems.push(editButton);
|
||||||
contextMenuItems.push(deleteButton);
|
contextMenuItems.push(deleteButton);
|
||||||
@@ -142,7 +130,6 @@ Ext.onReady(function(){
|
|||||||
items: contextMenuItems
|
items: contextMenuItems
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
searchText = new Ext.form.TextField ({
|
searchText = new Ext.form.TextField ({
|
||||||
id: 'searchTxt',
|
id: 'searchTxt',
|
||||||
ctCls:'pm_search_text_field',
|
ctCls:'pm_search_text_field',
|
||||||
@@ -156,9 +143,9 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
focus: function(f,e) {
|
focus: function(f,e) {
|
||||||
var row = infoGrid.getSelectionModel().getSelected();
|
var row = infoGrid.getSelectionModel().getSelected();
|
||||||
infoGrid.getSelectionModel().deselectRow(infoGrid.getStore().indexOf(row));
|
infoGrid.getSelectionModel().deselectRow(infoGrid.getStore().indexOf(row));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -194,8 +181,6 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
comboPageSize.setValue(pageSize);
|
comboPageSize.setValue(pageSize);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
store = new Ext.data.GroupingStore( {
|
store = new Ext.data.GroupingStore( {
|
||||||
proxy : new Ext.data.HttpProxy({
|
proxy : new Ext.data.HttpProxy({
|
||||||
url: 'pmTablesProxy/getList' + (PRO_UID? '?pro_uid='+PRO_UID: '')
|
url: 'pmTablesProxy/getList' + (PRO_UID? '?pro_uid='+PRO_UID: '')
|
||||||
@@ -264,7 +249,7 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
cmodelColumns.push({header: 'Table Type', dataIndex: 'PRO_UID', width: 120, align:'left', renderer: function(v,p,r){
|
cmodelColumns.push({header: 'Table Type', dataIndex: 'PRO_UID', width: 120, align:'left', renderer: function(v,p,r){
|
||||||
color = r.get('PRO_UID') ? 'blue' : 'green';
|
color = r.get('PRO_UID') ? 'blue' : 'green';
|
||||||
value = r.get('PRO_UID') ? 'Report' : 'Table';
|
value = r.get('PRO_UID') ? _('ID_REPORT_TABLE') : _('ID_PMTABLE');
|
||||||
return '<span style="color:'+color+'">'+value+'</span> ';
|
return '<span style="color:'+color+'">'+value+'</span> ';
|
||||||
}});
|
}});
|
||||||
|
|
||||||
@@ -547,7 +532,7 @@ ExportPMTable = function(){
|
|||||||
toExportRows.push([
|
toExportRows.push([
|
||||||
rows[i].get('ADD_TAB_UID'),
|
rows[i].get('ADD_TAB_UID'),
|
||||||
rows[i].get('ADD_TAB_NAME'),
|
rows[i].get('ADD_TAB_NAME'),
|
||||||
(rows[i].get('PRO_UID') == ''? 'Table': 'Report'),
|
(rows[i].get('PRO_UID') ? _('ID_REPORT_TABLE'): _('ID_PMTABLE')),
|
||||||
true,
|
true,
|
||||||
false
|
false
|
||||||
]);
|
]);
|
||||||
@@ -557,6 +542,7 @@ ExportPMTable = function(){
|
|||||||
|
|
||||||
Export.window.show();
|
Export.window.show();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
iGrid = Ext.getCmp('infoGrid');
|
iGrid = Ext.getCmp('infoGrid');
|
||||||
rowsSelected = iGrid.getSelectionModel().getSelections();
|
rowsSelected = iGrid.getSelectionModel().getSelections();
|
||||||
//location.href = 'additionalTablesToExport?sUID='+RetrieveRowsID(rowsSelected)+'&rand='+Math.random();
|
//location.href = 'additionalTablesToExport?sUID='+RetrieveRowsID(rowsSelected)+'&rand='+Math.random();
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 404 B After Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 568 B |
|
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 512 B |
|
Before Width: | Height: | Size: 726 B After Width: | Height: | Size: 703 B |
|
Before Width: | Height: | Size: 700 B After Width: | Height: | Size: 667 B |