Merge remote branch 'upstream/master' into BUG-10852

This commit is contained in:
Hector Cortez
2013-04-17 12:05:44 -04:00
5 changed files with 138 additions and 93 deletions

View File

@@ -28,7 +28,9 @@
/**
*
* @method Executes a Talend Web Service..
* @method
*
* Executes a Talend Web Service..
*
* @name executeTalendWebservice
* @label Executes a Talend Web Service.

View File

@@ -363,8 +363,9 @@ class Installer extends Controller
*/
public function createWorkspace ()
{
if (file_exists($this->path_shared . 'partner.info')) {
$_REQUEST['PARTNER_FLAG'] = true;
$pathSharedPartner = trim( $_REQUEST['pathShared'] );
if (file_exists($pathSharedPartner.'partner.info')) {
$_REQUEST['PARTNER_FLAG'] = true;
}
$this->setResponseType( 'json' );
if ($_REQUEST['db_engine'] == 'mysql') {
@@ -821,26 +822,36 @@ class Installer extends Controller
G::loadClass( 'system' );
$envFile = PATH_CONFIG . 'env.ini';
//writting for new installtions to use the classic skin
$updatedConf['default_skin'] = 'classic';
$info->uri = '/sys' . $_REQUEST['workspace'] . '/en/classic/login/login';
try {
G::update_php_ini( $envFile, $updatedConf );
} catch (Exception $e) {
$info->result = false;
$info->message = G::LoadTranslation('ID_PROCESSMAKER_WRITE_CONFIG_INDEX', SYS_LANG, Array($envFile));
$info->message .= G::LoadTranslation('ID_PROCESSMAKER_UI_NOT_INSTALL');
$this->installLog( G::LoadTranslation('ID_INSTALL_BUT_ERROR', SYS_LANG, Array('env.ini')));
return $info;
}
// getting configuration from env.ini
$sysConf = System::getSystemConfiguration( $envFile );
$langUri = 'en';
if (isset($sysConf['default_lang'])) {
$langUri = $sysConf['default_lang'];
}
$skinUri = 'classic';
if (isset($sysConf['default_skin'])) {
$skinUri = $sysConf['default_skin'];
}
$updatedConf['default_lang'] = $langUri;
$updatedConf['default_skin'] = $skinUri;
$info->uri = PATH_SEP . 'sys' . $_REQUEST['workspace'] . PATH_SEP . $langUri . PATH_SEP . $skinUri . PATH_SEP . 'login' . PATH_SEP . 'login';
if (defined('PARTNER_FLAG') || isset($_REQUEST['PARTNER_FLAG'])) {
$this->buildParternExtras($db_username, $db_password, $_REQUEST['workspace'], SYS_LANG);
$this->buildParternExtras($adminUsername, $adminPassword, $_REQUEST['workspace'], SYS_LANG);
} else {
try {
G::update_php_ini( $envFile, $updatedConf );
} catch (Exception $e) {
$info->result = false;
$info->message = G::LoadTranslation('ID_PROCESSMAKER_WRITE_CONFIG_INDEX', SYS_LANG, Array($envFile));
$info->message .= G::LoadTranslation('ID_PROCESSMAKER_UI_NOT_INSTALL');
$this->installLog( G::LoadTranslation('ID_INSTALL_BUT_ERROR', SYS_LANG, Array('env.ini')));
return $info;
}
try {
// update the main index file
$indexFileUpdated = System::updateIndexFile(array('lang' => 'en','skin' => $updatedConf['default_skin']));
@@ -1336,9 +1347,9 @@ class Installer extends Controller
$user = urlencode($username);
$pass = urlencode($password);
$lang = urlencode($lang);
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "$serv/sys{$workspace}/{$lang}/classic/login/authentication");
curl_setopt($ch, CURLOPT_HEADER, 0);
@@ -1349,7 +1360,7 @@ class Installer extends Controller
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "form[USR_USERNAME]=$user&form[USR_PASSWORD]=$pass&form[USER_LANG]=$lang");
curl_setopt($ch, CURLOPT_TIMEOUT, 90);
$output = curl_exec($ch);
curl_close($ch);
@@ -1358,10 +1369,11 @@ class Installer extends Controller
*/
$ch = curl_init();
$postData = array();
// File to upload/post
$postData['form[LANGUAGE_FILENAME]'] = "@".PATH_CORE."content/translations/processmaker.$lang.po";
curl_setopt($ch, CURLOPT_URL, "$serv/sys{$workspace}/{$lang}/classic/setup/languages_Import");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
@@ -1372,26 +1384,29 @@ class Installer extends Controller
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_TIMEOUT, 90);
$output = curl_exec($ch);
curl_close($ch);
/**
* Upload plugin file
* Upload skin file
*/
$ch = curl_init();
$postData = array();
// resolv the plugin name
$plugins = glob(PATH_CORE."plugins/*.tar");
if (count($plugins) > 0) {
$pluginName = $plugins[0];
$skins = glob(PATH_CORE."data/partner/*.tar");
if (count($skins) > 0) {
$skin = $skins[0];
$postData['overwrite_files'] = "on";
$postData['workspace'] = "global";
$postData['option'] = "standardupload";
$postData['action'] = "importSkin";
// File to upload/post
$postData['form[PLUGIN_FILENAME]'] = "@{$pluginName}";
//http://pmos/sysworkflow/en/classic/setup/skin_Ajax
curl_setopt($ch, CURLOPT_URL, "$serv/sys{$workspace}/{$lang}/classic/setup/pluginsImportFile");
$postData['uploadedFile'] = "@".$skin;
curl_setopt($ch, CURLOPT_URL, "$serv/sys{$workspace}/{$lang}/classic/setup/skin_Ajax");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile);
@@ -1404,22 +1419,22 @@ class Installer extends Controller
$output = curl_exec($ch);
curl_close($ch);
}
}
/**
* Upload plugin file
*/
$ch = curl_init();
$postData = array();
// resolv the plugin name
$plugins = glob(PATH_CORE."plugins/*.tar");
if (count($plugins) > 0) {
$pluginName = $plugins[0];
$skins = glob(PATH_CORE."data/partner/*.tar");
if (count($skins) > 0) {
$skin = $skins[0];
$postData['overwrite_files'] = "on";
$postData['workspace'] = "global";
$postData['option'] = "standardupload";
$postData['action'] = "importSkin";
// File to upload/post
$postData['uploadedFile'] = "@".$skin;
curl_setopt($ch, CURLOPT_URL, "$serv/sys{$workspace}/{$lang}/classic/setup/skin_Ajax");
$postData['form[PLUGIN_FILENAME]'] = "@{$pluginName}";
curl_setopt($ch, CURLOPT_URL, "$serv/sys{$workspace}/{$lang}/classic/setup/pluginsImportFile");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile);
@@ -1428,13 +1443,13 @@ class Installer extends Controller
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_TIMEOUT, 90);
echo $output = curl_exec($ch);
curl_setopt($ch, CURLOPT_TIMEOUT, 90);
$output = curl_exec($ch);
curl_close($ch);
}
}
}

View File

@@ -865,7 +865,7 @@ Ext.onReady ( function() {
var comboProcess = new Ext.form.ComboBox({
width : 180,
boxMaxWidth : 200,
editable : true,
editable : false,
displayField : 'APP_PRO_TITLE',
valueField : 'PRO_UID',
forceSelection: false,
@@ -941,7 +941,7 @@ Ext.onReady ( function() {
var comboCategory = new Ext.form.ComboBox({
width : 180,
boxMaxWidth : 200,
editable : true,
editable : false,
displayField : 'CATEGORY_NAME',
valueField : 'CATEGORY_UID',
forceSelection : false,
@@ -1108,7 +1108,7 @@ Ext.onReady ( function() {
triggerAction : 'all',
emptyText : _('ID_ALL_USERS'),
selectOnFocus : true,
editable : true,
editable : false,
width: 180,
allowBlank : true,
autocomplete: true,
@@ -1500,6 +1500,7 @@ Ext.onReady ( function() {
id:'dateFrom',
format: 'Y-m-d',
width: 120,
editable: false,
value: ''
});
@@ -1507,6 +1508,7 @@ Ext.onReady ( function() {
id:'dateTo',
format: 'Y-m-d',
width: 120,
editable: false,
value: ''
});

View File

@@ -90,6 +90,11 @@ Ext.onReady(function(){
_fields.push({name: _idProperty});
for (i=0;i<tableDef.FIELDS.length; i++) {
if (tableDef.FIELDS[i].FLD_KEY==1) {
blank=false;
} else{
blank=true;
};
switch (tableDef.FIELDS[i].FLD_TYPE) {
case 'DATE':
columnRenderer = function (value) {
@@ -104,7 +109,7 @@ Ext.onReady(function(){
columnEditor = {
xtype : 'datefield',
format : 'Y-m-d',
allowBlank : true
allowBlank : blank
};
break;
@@ -114,7 +119,7 @@ Ext.onReady(function(){
columnEditor = {
xtype : 'numberfield',
decimalPrecision : 8,
allowBlank : true
allowBlank : blank
};
break;
@@ -123,7 +128,7 @@ Ext.onReady(function(){
columnAlign = 'left';
columnEditor = {
xtype : 'textfield',
allowBlank : true
allowBlank : blank
};
}
@@ -182,13 +187,13 @@ Ext.onReady(function(){
editor = new Ext.ux.grid.RowEditor({
saveText : _("ID_UPDATE"),
listeners : {
afteredit : {
fn:function(rowEditor, obj, data, rowIndex ){
if (data.phantom === true) {
//store.reload(); // only if it is an insert
}
}
}
afteredit : {
fn:function(rowEditor, obj, data, rowIndex ){
if (data.phantom === true) {
//store.reload(); // only if it is an insert
}
}
}
}
});
}
@@ -396,12 +401,30 @@ NewPMTableRow = function(){
var row = new PMRow(new props);
len = infoGrid.getStore().data.length;
editor.stopEditing();
store.insert(len, row);
infoGrid.getView().refresh();
infoGrid.getSelectionModel().selectRow(len);
editor.startEditing(len);
if (len>0) {
var emptyrow=0;
for (var i = 0; i < tableDef.FIELDS.length; i++) {
if (infoGrid.store.getAt(len-1).data[tableDef.FIELDS[i].FLD_NAME]=="") {
emptyrow++;
};
};
if (emptyrow==tableDef.FIELDS.length) {
PMExt.error( _('ID_ERROR'), _('ID_EMPTY_ROW'));
store.load();
} else{
editor.stopEditing();
store.insert(len, row);
infoGrid.getView().refresh();
infoGrid.getSelectionModel().selectRow(len);
editor.startEditing(len);
}
} else{
editor.stopEditing();
store.insert(len, row);
infoGrid.getView().refresh();
infoGrid.getSelectionModel().selectRow(len);
editor.startEditing(len);
}
};
//Load PM Table Edition Row Form

View File

@@ -1249,31 +1249,6 @@ function loadUserData()
//
}
storeCountry.load();
storeRegion.load({
params: {
IC_UID : data.user.USR_COUNTRY
}
});
storeLocation.load({
params: {
IC_UID : data.user.USR_COUNTRY,
IS_UID : data.user.USR_CITY
}
});
storeReplacedBy.load();
storeCalendar.load();
storeRole.load();
storeDefaultMainMenuOption.load();
storeDefaultCasesMenuOption.load();
comboCountry.store.on("load", function(store) {
comboCountry.setValue(data.user.USR_COUNTRY);
});
@@ -1306,12 +1281,15 @@ function loadUserData()
if (infoMode) {
comboDefaultMainMenuOption.store.on("load", function (store) {
comboDefaultMainMenuOption.setValue(data.user.PREF_DEFAULT_MENUSELECTED);
storeDefaultCasesMenuOption.load();
});
comboDefaultCasesMenuOption.store.on("load", function (store) {
if (comboDefaultMainMenuOption.getValue() == 'PM_CASES') {
comboDefaultCasesMenuOption.enable();
}
comboDefaultCasesMenuOption.setValue(data.user.PREF_DEFAULT_CASES_MENUSELECTED);
});
} else {
@@ -1325,6 +1303,31 @@ function loadUserData()
}
previousUsername = Ext.getCmp("USR_USERNAME").getValue();
storeCountry.load();
storeRegion.load({
params: {
IC_UID : data.user.USR_COUNTRY
}
});
storeLocation.load({
params: {
IC_UID : data.user.USR_COUNTRY,
IS_UID : data.user.USR_CITY
}
});
storeReplacedBy.load();
storeCalendar.load();
storeRole.load();
storeDefaultMainMenuOption.load();
//storeDefaultCasesMenuOption.load();
},
failure: function (r, o) {
//viewport.getEl().unmask();