Web Entry compatibility fixes with Designer 1.1

This commit is contained in:
Enrique Ponce de Leon
2011-03-03 21:24:42 +00:00
parent 1ec5c0fde8
commit 4f17add70d
2 changed files with 70 additions and 62 deletions

View File

@@ -2,7 +2,7 @@
class webEntryProxy extends HttpProxyController
{
//Delete Web Entry
function deleteWebEntry($params){
function delete($params){
require_once 'classes/model/Event.php';
$pro_uid = $params->PRO_UID;
$filename = $params->FILE_NAME;
@@ -108,7 +108,7 @@ class webEntryProxy extends HttpProxyController
$this->msg = $message;
}
//Save New WebEntry
function saveWebEntry($params){
function save($params){
require_once 'classes/model/Event.php';
global $G_FORM;
$sPRO_UID = $params->pro_uid;
@@ -235,4 +235,13 @@ class webEntryProxy extends HttpProxyController
$this->DYN_TITLE = $dynTitle;
$this->USR_UID = $sWS_USER;
}
function load($params){
G::LoadClass('processMap');
$oProcessMap = new processMap(new DBConnection);
$PRO_UID = $params->PRO_UID;
$EVN_UID = $params->EVN_UID;
$sOutput = $oProcessMap->listNewWebEntry($PRO_UID,$EVN_UID);
return $sOutput;
}
} //End webEntryProxy

View File

@@ -58,6 +58,7 @@ pmosExt.prototype.popWebEntry= function(_5678)
handler: function(){
webForm.hide();
editForm.getForm().reset();
Ext.getCmp('frameEdit').setTitle = _('ID_NEW_WEB_ENTRY');
editForm.getForm().findField('pro_uid').setValue(pro_uid);
editForm.getForm().findField('evn_uid').setValue(evn_uid);
editForm.getForm().findField('dynaform').setValue('');
@@ -73,12 +74,13 @@ pmosExt.prototype.popWebEntry= function(_5678)
hidden: true,
handler: function(){
webForm.hide();
editForm.title = _('ID_EDIT_WEB_ENTRY');
editForm.getForm().reset();
Ext.getCmp('frameEdit').setTitle = _('ID_EDIT_WEB_ENTRY');
editForm.getForm().findField('pro_uid').setValue(pro_uid);
editForm.getForm().findField('evn_uid').setValue(evn_uid);
editForm.getForm().findField('dynaform').setValue(webEntryList.data[0].DYN_TITLE);
editForm.getForm().findField('username').setValue(webEntryList.data[0].USR_UID);
editForm.getForm().findField('initDyna').setValue(webEntryList.data[0].DYN_UID);
editForm.getForm().findField('dynaform').setValue(webEntryList.data.DYN_TITLE);
editForm.getForm().findField('username').setValue(webEntryList.data.USR_UID);
editForm.getForm().findField('initDyna').setValue(webEntryList.data.DYN_UID);
editForm.show();
editButton.disable();
deleteButton.disable();
@@ -94,7 +96,7 @@ pmosExt.prototype.popWebEntry= function(_5678)
if (btn=='yes'){
var file_name = webForm.getForm().findField('dynaform').getValue();
Ext.Ajax.request({
url: '../webEntryProxy/deleteWebEntry',
url: 'webEntryProxy/delete',
params: {PRO_UID: pro_uid, EVN_UID: evn_uid, FILE_NAME: file_name},
success: function (r,o){
response = Ext.util.JSON.decode(r.responseText);
@@ -140,32 +142,32 @@ pmosExt.prototype.popWebEntry= function(_5678)
var pass = editForm.getForm().findField('password').getValue();
Ext.Ajax.request({
url: '../webEntryProxy/checkCredentials',
url: 'webEntryProxy/checkCredentials',
params: {PRO_UID: pro_uid, EVN_UID: evn_uid, WS_USER: user, WS_PASS: pass},
success: function(r,o){
var resp = Ext.util.JSON.decode(r.responseText);
if (resp.success){
editForm.getForm().submit({
success: function(f,a){
var rs = Ext.util.JSON.decode(a.response.responseText);
if (rs.success){
newButton.hide();
editButton.show();
deleteButton.show();
webForm.getForm().findField('link').setValue(rs.W_LINK);
webForm.getForm().findField('task').setValue(rs.TAS_TITLE);
webForm.getForm().findField('dynaform').setValue(rs.DYN_TITLE);
webForm.getForm().findField('user').setValue(rs.USR_UID);
goToWebEntry.enable();
webForm.show();
editForm.hide();
newButton.enable();
editButton.enable();
deleteButton.enable();
PMExt.notify(_('ID_WEB_ENTRY'),rs.msg);
}else{
PMExt.error(_('ID_WEB_ENTRY'),rs.msg);
}
var rs = Ext.util.JSON.decode(a.response.responseText);
if (rs.success){
newButton.hide();
editButton.show();
deleteButton.show();
webForm.getForm().findField('link').setValue(rs.W_LINK);
webForm.getForm().findField('task').setValue(rs.TAS_TITLE);
webForm.getForm().findField('dynaform').setValue(rs.DYN_TITLE);
webForm.getForm().findField('user').setValue(rs.USR_UID);
goToWebEntry.enable();
webForm.show();
editForm.hide();
newButton.enable();
editButton.enable();
deleteButton.enable();
PMExt.notify(_('ID_WEB_ENTRY'),rs.msg);
}else{
PMExt.error(_('ID_WEB_ENTRY'),rs.msg);
}
},
failure: function(f,r){
PMExt.notify( _('ID_STATUS') , _('ID_LOAD_FAILED') );
@@ -231,7 +233,7 @@ pmosExt.prototype.popWebEntry= function(_5678)
autoHeight : true,
defaultType : 'textfield',
buttonAlign : 'center',
url : '../webEntryProxy/saveWebEntry',
url : 'webEntryProxy/save',
items: [
{xtype: 'hidden', name: 'pro_uid', hidden: true},
{xtype: 'hidden', name: 'evn_uid', hidden: true},
@@ -241,6 +243,7 @@ pmosExt.prototype.popWebEntry= function(_5678)
title : _('ID_NEW_WEB_ENTRY'),
collapsible: false,
autoHeight :true,
id : 'frameEdit',
buttonAlign: 'center',
defaults : {width: 210},
items: [
@@ -252,14 +255,14 @@ pmosExt.prototype.popWebEntry= function(_5678)
allowBlank : false,
triggerAction : 'all',
fieldLabel : _('ID_INITIAL_DYNAFORM'),
name : 'initDyna',
hiddenName : 'initDyna',
displayField : 'name',
valueField : 'value',
store : new Ext.data.JsonStore({
fields : ['name', 'value'],
data :oDyna
})
name : 'initDyna',
hiddenName : 'initDyna',
displayField : 'name',
valueField : 'value',
store : new Ext.data.JsonStore({
fields : ['name', 'value'],
data :oDyna
})
},
{xtype: 'textfield', fieldLabel: _('ID_USER'), name: 'username', width: 200, allowBlank: false},
{xtype: 'textfield', fieldLabel: _('ID_PASSWORD'), name: 'password', width: 200, inputType: 'password', allowBlank: false}
@@ -273,12 +276,8 @@ pmosExt.prototype.popWebEntry= function(_5678)
var webEntryWindow = new Ext.Window({
title:_('ID_START_MESSAGE_EVENT_WEB_ENTRY'),
//autoScroll: true,
collapsible: false,
//maximizable: true,
width: 600,
//bodyStyle : 'padding:8px 0 0 8px;',
//autoHeight: true,
autoHeight: true,
layout: 'fit',
plain: true,
@@ -293,19 +292,19 @@ pmosExt.prototype.popWebEntry= function(_5678)
var evn_uid = workflow.currentSelection.id;
Ext.Ajax.request({
url: 'bpmn/processes_Ajax.php',
params:{action:'webEntry', data: '{"uid":"'+ pro_uid +'","evn_uid":"'+evn_uid+'"}'},
url: 'webEntryProxy/load',
params:{PRO_UID: pro_uid, EVN_UID: evn_uid},
success: function(r,o){
webEntryList = Ext.util.JSON.decode(r.responseText);
if (webEntryList.success){
if (webEntryList.data[0].W_LINK !=''){
if (webEntryList.data.W_LINK !=''){
newButton.hide();
editButton.show();
deleteButton.show();
webForm.getForm().findField('link').setValue(webEntryList.data[0].W_LINK);
webForm.getForm().findField('task').setValue(webEntryList.data[0].TAS_TITLE);
webForm.getForm().findField('dynaform').setValue(webEntryList.data[0].DYN_TITLE);
webForm.getForm().findField('user').setValue(webEntryList.data[0].USR_UID);
webForm.getForm().findField('link').setValue(webEntryList.data.W_LINK);
webForm.getForm().findField('task').setValue(webEntryList.data.TAS_TITLE);
webForm.getForm().findField('dynaform').setValue(webEntryList.data.DYN_TITLE);
webForm.getForm().findField('user').setValue(webEntryList.data.USR_UID);
goToWebEntry.enable();
webForm.show();
}else{
@@ -1483,7 +1482,7 @@ pmosExt.prototype.loadWebEntry=function()
var evn_uid = workflow.currentSelection.id;
var urlparams = '?action=webEntry&data={"uid":"'+ pro_uid +'","evn_uid":"'+evn_uid+'"}';
Ext.Ajax.request({
url: "bpmn/processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
workflow.webEntryList = Ext.util.JSON.decode(response.responseText);
},