BUG 8988 Menu del plugin "ProcessMaker Monitor" desaparece al crear un nuevo...

- El modulo de creacion de ambientes estan en el core y por lo tanto no estaba considerando que se muestren los menus del plugin
- Se adiciono un iframe en el plugin para mostrar el modulo de creaciond e ambientes y se agrego una condicion al momento de redireccionar una vez finalzada la creacion en caso de que haya sido llamada desde ese nuevo iframe (un  parent mas)
This commit is contained in:
Julio Cesar Laura
2012-04-18 18:06:41 -04:00
parent 08e0c45ce4
commit 1328dbfec2

View File

@@ -6,8 +6,8 @@
Ext.onReady(function(){ Ext.onReady(function(){
var fieldNameWS=new Ext.form.TextField({ var fieldNameWS=new Ext.form.TextField({
id: 'NW_TITLE', id: 'NW_TITLE',
fieldLabel: _('ID_NAME'), fieldLabel: _('ID_NAME'),
xtype:'textfield', xtype:'textfield',
value:'sample', value:'sample',
width: 200, width: 200,
@@ -25,23 +25,23 @@ Ext.onReady(function(){
} }
}); });
nameWS = new Ext.form.FieldSet({ nameWS = new Ext.form.FieldSet({
title: 'New Workspace', title: 'New Workspace',
items: [ items: [
fieldNameWS fieldNameWS
] ]
}); });
dbOptionsWS = new Ext.form.FieldSet({ dbOptionsWS = new Ext.form.FieldSet({
title: 'Database Options', title: 'Database Options',
items: [ items: [
{ {
id: 'AO_DB_WF', id: 'AO_DB_WF',
fieldLabel: 'Workflow Database', fieldLabel: 'Workflow Database',
xtype:'textfield', xtype:'textfield',
value:'wf_sample', value:'wf_sample',
width: 200, width: 200,
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '13'}, autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '13'},
allowBlank: false allowBlank: false
}, },
{ {
id: 'AO_DB_RB', id: 'AO_DB_RB',
fieldLabel: 'Rbac Database', fieldLabel: 'Rbac Database',
@@ -53,33 +53,33 @@ Ext.onReady(function(){
}, },
{ {
id: 'AO_DB_RP', id: 'AO_DB_RP',
fieldLabel: 'Report Database', fieldLabel: 'Report Database',
xtype:'textfield', xtype:'textfield',
value:'rp_sample', value:'rp_sample',
width: 200, width: 200,
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '13'}, autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '13'},
allowBlank: false allowBlank: false
}, },
{ {
xtype: 'checkbox', xtype: 'checkbox',
fieldLabel: 'Drop database if exists', fieldLabel: 'Drop database if exists',
name: 'AO_DB_DROP', name: 'AO_DB_DROP',
id: 'id-active' id: 'id-active'
} }
] ]
}); });
wspaceAdmWS = new Ext.form.FieldSet({ wspaceAdmWS = new Ext.form.FieldSet({
title: 'Workspace Administrator', title: 'Workspace Administrator',
items: [ items: [
{ {
id: 'NW_USERNAME', id: 'NW_USERNAME',
fieldLabel: 'Username', fieldLabel: 'Username',
xtype:'textfield', xtype:'textfield',
value:'admin', value:'admin',
width: 200, width: 200,
allowBlank: false allowBlank: false
}, },
{ {
id: 'NW_PASSWORD', id: 'NW_PASSWORD',
fieldLabel: 'Password (admin)(Max. length 20):', fieldLabel: 'Password (admin)(Max. length 20):',
@@ -91,7 +91,7 @@ Ext.onReady(function(){
}, },
{ {
id: 'NW_PASSWORD2', id: 'NW_PASSWORD2',
fieldLabel: 'Re-type Password', fieldLabel: 'Re-type Password',
xtype:'textfield', xtype:'textfield',
inputType:'password', inputType:'password',
value:'admin', value:'admin',
@@ -100,10 +100,10 @@ Ext.onReady(function(){
} }
] ]
}); });
formNewSite = new Ext.FormPanel({ formNewSite = new Ext.FormPanel({
id:'formNewSite', id:'formNewSite',
labelWidth: 250, labelWidth: 250,
labelAlign:'right', labelAlign:'right',
autoScroll: true, autoScroll: true,
@@ -117,7 +117,7 @@ Ext.onReady(function(){
allowBlank: false, allowBlank: false,
resizable: true, resizable: true,
msgTarget: 'side', msgTarget: 'side',
align:'center' align:'center'
}, },
items:[ items:[
nameWS, nameWS,
@@ -128,18 +128,18 @@ Ext.onReady(function(){
{ {
text: 'reset', text: 'reset',
handler: resetfields handler: resetfields
}, },
{ {
text: 'Test', text: 'Test',
handler: TestSite handler: TestSite
} }
] ]
}); });
formNewSite.render(document.body); formNewSite.render(document.body);
}); });
function resetfields(){ function resetfields(){
formNewSite.getForm().reset(); formNewSite.getForm().reset();
@@ -174,8 +174,8 @@ Ext.onReady(function(){
} }
} }
}); });
} }
function createNW(nwTitle, aoDbWf, aoDbRb, aoDbRp, nwUsername, nwPassword, nwPassword2){ function createNW(nwTitle, aoDbWf, aoDbRb, aoDbRp, nwUsername, nwPassword, nwPassword2){
PMExt.confirm(_('ID_CONFIRM'), _('NEW_SITE_CONFIRM_TO_CREATE'), function(){ PMExt.confirm(_('ID_CONFIRM'), _('NEW_SITE_CONFIRM_TO_CREATE'), function(){
var loadMask = new Ext.LoadMask(document.body, {msg:'site creating..'}); var loadMask = new Ext.LoadMask(document.body, {msg:'site creating..'});
@@ -199,8 +199,13 @@ Ext.onReady(function(){
var data = Ext.util.JSON.decode(result.responseText); var data = Ext.util.JSON.decode(result.responseText);
if( data.success ) { if( data.success ) {
PMExt.confirm(_('ID_CONFIRM'), _('NEW_SITE_SUCCESS') +" "+nwTitle+"<br/>"+ _('NEW_SITE_SUCCESS_CONFIRM')+"<br/>"+ _('NEW_SITE_SUCCESS_CONFIRMNOTE'), function(){ PMExt.confirm(_('ID_CONFIRM'), _('NEW_SITE_SUCCESS') +" "+nwTitle+"<br/>"+ _('NEW_SITE_SUCCESS_CONFIRM')+"<br/>"+ _('NEW_SITE_SUCCESS_CONFIRMNOTE'), function(){
nwTitle =formNewSite.getForm().findField('NW_TITLE').getValue(); nwTitle = formNewSite.getForm().findField('NW_TITLE').getValue();
parent.parent.window.location="/sys"+nwTitle+"/en/green/login/login"; if (typeof window.parent.parent.parent != 'undefined') {
parent.parent.parent.window.location="/sys"+nwTitle+"/en/green/login/login";
}
else {
parent.parent.window.location="/sys"+nwTitle+"/en/green/login/login";
}
}); });
} else { } else {
PMExt.error(_('ID_ERROR'), data.msg); PMExt.error(_('ID_ERROR'), data.msg);
@@ -212,10 +217,10 @@ Ext.onReady(function(){
}); });
}); });
} }