Merge remote branch 'pm/master'
This commit is contained in:
@@ -315,19 +315,6 @@ class WebApplication
|
||||
|
||||
$this->rest->setOverridingFormats('JsonFormat', 'UploadFormat');
|
||||
|
||||
$isPluginRequest = strpos($uri, '/plugin-') !== false ? true : false;
|
||||
|
||||
if ($isPluginRequest) {
|
||||
$tmp = explode('/', $uri);
|
||||
array_shift($tmp);
|
||||
$tmp = array_shift($tmp);
|
||||
$tmp = explode('-', $tmp);
|
||||
$pluginName = $tmp[1];
|
||||
$uri = str_replace('/plugin-'.$pluginName, '', $uri);
|
||||
}
|
||||
|
||||
// Override $_SERVER['REQUEST_URI'] to Restler handles the modified url
|
||||
|
||||
// scan all api directory to find api classes
|
||||
$classesList = Util\Common::rglob($apiDir . "/*");
|
||||
|
||||
@@ -356,24 +343,36 @@ class WebApplication
|
||||
}
|
||||
}
|
||||
|
||||
//if (! $isPluginRequest) { // if it is not a request for a plugin endpoint
|
||||
//
|
||||
// Register API Plugins classes
|
||||
$isPluginRequest = strpos($uri, '/plugin-') !== false ? true : false;
|
||||
|
||||
if ($isPluginRequest) {
|
||||
$tmp = explode('/', $uri);
|
||||
array_shift($tmp);
|
||||
$tmp = array_shift($tmp);
|
||||
$tmp = explode('-', $tmp);
|
||||
$pluginName = $tmp[1];
|
||||
$uri = str_replace('plugin-'.$pluginName, strtolower($pluginName), $uri);
|
||||
}
|
||||
|
||||
// hook to get rest api classes from plugins
|
||||
if (class_exists('PMPluginRegistry') && file_exists(PATH_DATA_SITE . 'plugin.singleton')) {
|
||||
$pluginRegistry = \PMPluginRegistry::loadSingleton(PATH_DATA_SITE . 'plugin.singleton');
|
||||
$plugins = $pluginRegistry->getRegisteredRestServices();
|
||||
|
||||
if (! empty($plugins)) {
|
||||
$pluginSourceDir = PATH_PLUGINS . $pluginName . DIRECTORY_SEPARATOR . 'src';
|
||||
foreach ($plugins as $pluginName => $plugin) {
|
||||
$pluginSourceDir = PATH_PLUGINS . $pluginName . DIRECTORY_SEPARATOR . 'src';
|
||||
|
||||
$loader = \Maveriks\Util\ClassLoader::getInstance();
|
||||
$loader->add($pluginSourceDir);
|
||||
|
||||
if (is_array($plugins) && array_key_exists($pluginName, $plugins)) {
|
||||
foreach ($plugins[$pluginName] as $class) {
|
||||
$loader = \Maveriks\Util\ClassLoader::getInstance();
|
||||
$loader->add($pluginSourceDir);
|
||||
|
||||
foreach ($plugin as $class) {
|
||||
if (class_exists($class['namespace'])) {
|
||||
$this->rest->addAPIClass($class['namespace']);
|
||||
}
|
||||
}
|
||||
$this->rest->addAPIClass($class['namespace'], strtolower($pluginName));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -597,3 +596,4 @@ class WebApplication
|
||||
@unlink(PATH_DATA . 'sites' . DS . $workspace . DS . 'api-config.php');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ class actionsByEmailClass extends PMPlugin
|
||||
G::LoadClass("Users");
|
||||
|
||||
$user = new Users();
|
||||
$userDetails = $user->loadDetails($data->USR_UID);
|
||||
$userDetails = $user->loadDetails($data->PREVIOUS_USR_UID);
|
||||
$emailFrom = $userDetails["USR_EMAIL"];
|
||||
|
||||
G::LoadClass('wsBase');
|
||||
|
||||
@@ -62,6 +62,8 @@ class Applications
|
||||
$oAppCache->confCasesList = $confCasesList;
|
||||
}
|
||||
|
||||
$delimiter = DBAdapter::getStringDelimiter();
|
||||
|
||||
// get the action based list
|
||||
switch ($action) {
|
||||
case "draft":
|
||||
@@ -185,14 +187,25 @@ class Applications
|
||||
$CriteriaCount->addAsColumn( 'USR_USERNAME', 'CU.USR_USERNAME' );
|
||||
|
||||
//Current delegation
|
||||
if ($action == "to_reassign") {
|
||||
$Criteria->addAsColumn("APPCVCR_APP_TAS_TITLE", "APP_CACHE_VIEW.APP_TAS_TITLE");
|
||||
$CriteriaCount->addAsColumn("APPCVCR_APP_TAS_TITLE", "APP_CACHE_VIEW.APP_TAS_TITLE");
|
||||
} else {
|
||||
$Criteria->addAsColumn("APPCVCR_APP_TAS_TITLE", "APPCVCR.APP_TAS_TITLE");
|
||||
$CriteriaCount->addAsColumn("APPCVCR_APP_TAS_TITLE", "APPCVCR.APP_TAS_TITLE");
|
||||
$appdelcrTableName = AppCacheViewPeer::TABLE_NAME;
|
||||
$appdelcrAppTasTitle = "APPDELCR.APP_TAS_TITLE";
|
||||
$appdelcrAppTasTitleCount = $appdelcrAppTasTitle;
|
||||
|
||||
switch ($action) {
|
||||
case "sent":
|
||||
$appdelcrTableName = AppDelegationPeer::TABLE_NAME;
|
||||
$appdelcrAppTasTitle = "(SELECT CON_VALUE FROM CONTENT WHERE CON_ID = APPDELCR.TAS_UID AND CON_LANG = " . $delimiter . SYS_LANG . $delimiter . " AND CON_CATEGORY = " . $delimiter . "TAS_TITLE" . $delimiter . ")";
|
||||
$appdelcrAppTasTitleCount = "APPDELCR.TAS_UID";
|
||||
break;
|
||||
case "to_reassign":
|
||||
$appdelcrAppTasTitle = "APP_CACHE_VIEW.APP_TAS_TITLE";
|
||||
$appdelcrAppTasTitleCount = $appdelcrAppTasTitle;
|
||||
break;
|
||||
}
|
||||
|
||||
$Criteria->addAsColumn("APPDELCR_APP_TAS_TITLE", $appdelcrAppTasTitle);
|
||||
$CriteriaCount->addAsColumn("APPDELCR_APP_TAS_TITLE", $appdelcrAppTasTitleCount);
|
||||
|
||||
$Criteria->addAsColumn("USRCR_USR_UID", "USRCR.USR_UID");
|
||||
$Criteria->addAsColumn("USRCR_USR_FIRSTNAME", "USRCR.USR_FIRSTNAME");
|
||||
$Criteria->addAsColumn("USRCR_USR_LASTNAME", "USRCR.USR_LASTNAME");
|
||||
@@ -203,20 +216,20 @@ class Applications
|
||||
$CriteriaCount->addAsColumn("USRCR_USR_LASTNAME", "USRCR.USR_LASTNAME");
|
||||
$CriteriaCount->addAsColumn("USRCR_USR_USERNAME", "USRCR.USR_USERNAME");
|
||||
|
||||
$Criteria->addAlias("APPCVCR", AppCacheViewPeer::TABLE_NAME);
|
||||
$Criteria->addAlias("APPDELCR", $appdelcrTableName);
|
||||
$Criteria->addAlias("USRCR", UsersPeer::TABLE_NAME);
|
||||
|
||||
$CriteriaCount->addAlias("APPCVCR", AppCacheViewPeer::TABLE_NAME);
|
||||
$CriteriaCount->addAlias("APPDELCR", $appdelcrTableName);
|
||||
$CriteriaCount->addAlias("USRCR", UsersPeer::TABLE_NAME);
|
||||
|
||||
$arrayCondition = array();
|
||||
$arrayCondition[] = array(AppCacheViewPeer::APP_UID, "APPCVCR.APP_UID");
|
||||
$arrayCondition[] = array("APPCVCR.DEL_LAST_INDEX", 1);
|
||||
$arrayCondition[] = array(AppCacheViewPeer::APP_UID, "APPDELCR.APP_UID");
|
||||
$arrayCondition[] = array("APPDELCR.DEL_LAST_INDEX", 1);
|
||||
$Criteria->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
||||
$CriteriaCount->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
||||
|
||||
$arrayCondition = array();
|
||||
$arrayCondition[] = array("APPCVCR.USR_UID", "USRCR.USR_UID");
|
||||
$arrayCondition[] = array("APPDELCR.USR_UID", "USRCR.USR_UID");
|
||||
$Criteria->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
||||
$CriteriaCount->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
||||
|
||||
@@ -467,7 +480,7 @@ class Applications
|
||||
$sort = "USRCR_" . $conf->userNameFormatGetFirstFieldByUsersTable();
|
||||
break;
|
||||
case "APP_CACHE_VIEW.APP_TAS_TITLE":
|
||||
$sort = "APPCVCR_APP_TAS_TITLE";
|
||||
$sort = "APPDELCR_APP_TAS_TITLE";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -568,7 +581,7 @@ class Applications
|
||||
//Current delegation (*) || $action == "search" || $action == "to_revise"
|
||||
if (($action == "sent" || $action == "simple_search" || $action == "to_reassign") && ($status != "TO_DO")) {
|
||||
//Current task
|
||||
$aRow["APP_TAS_TITLE"] = $aRow["APPCVCR_APP_TAS_TITLE"];
|
||||
$aRow["APP_TAS_TITLE"] = $aRow["APPDELCR_APP_TAS_TITLE"];
|
||||
|
||||
//Current user
|
||||
//if ($action != "to_reassign" ) {
|
||||
|
||||
@@ -1013,6 +1013,9 @@ class Derivation
|
||||
$sTargetField = str_replace( '$', '', $sTargetField );
|
||||
$sTargetField = str_replace( '=', '', $sTargetField );
|
||||
$aNewFields[$sTargetField] = isset( $appFields['APP_DATA'][$sOriginField] ) ? $appFields['APP_DATA'][$sOriginField] : '';
|
||||
if(isset($aParentCase['APP_DATA'][$sTargetField.'_label'])){
|
||||
$aNewFields[$sTargetField.'_label'] = isset( $appFields['APP_DATA'][$sOriginField.'_label'] ) ? $appFields['APP_DATA'][$sOriginField.'_label'] : '';
|
||||
}
|
||||
}
|
||||
$aParentCase['APP_DATA'] = array_merge( $aParentCase['APP_DATA'], $aNewFields );
|
||||
$oCase->updateCase( $aSA['APP_PARENT'], $aParentCase );
|
||||
|
||||
@@ -1408,16 +1408,16 @@ class PMPluginRegistry
|
||||
|
||||
// Ensure that is registering only existent classes.
|
||||
if (class_exists($ns)) {
|
||||
$this->_restServices[strtolower($sNamespace)][] = array(
|
||||
$this->_restServices[$sNamespace][] = array(
|
||||
"filepath" => $classFile,
|
||||
"namespace" => $ns
|
||||
);
|
||||
|
||||
\Maveriks\WebApplication::purgeRestApiCache(basename(PATH_DATA_SITE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\Maveriks\WebApplication::purgeRestApiCache(basename(PATH_DATA_SITE));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1429,6 +1429,7 @@ class PMPluginRegistry
|
||||
public function unregisterRestService ($sNamespace)
|
||||
{
|
||||
unset($this->_restServices[$sNamespace]);
|
||||
\Maveriks\WebApplication::purgeRestApiCache(basename(PATH_DATA_SITE));
|
||||
}
|
||||
|
||||
public function getRegisteredRestServices()
|
||||
|
||||
@@ -177,6 +177,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
$data->APP_UID = $sAppUid;
|
||||
$data->DEL_INDEX = $delIndex;
|
||||
$data->USR_UID = $sUsrUid;
|
||||
$data->PREVIOUS_USR_UID = $delPreviusUsrUid;
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->executeTriggers(PM_CREATE_NEW_DELEGATION, $data);
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ class Designer extends Controller
|
||||
$this->setVar('prj_readonly', $proReadOnly);
|
||||
$this->setVar('credentials', base64_encode(json_encode($clientToken)));
|
||||
$this->setVar('isDebugMode', $debug);
|
||||
$this->setVar('distribution', file_exists(PATH_CLASSES . "class.pmLicenseManager.php"));
|
||||
|
||||
if ($debug) {
|
||||
if (! file_exists(PATH_HTML . "lib-dev/pmUI/build.cache")) {
|
||||
|
||||
@@ -789,6 +789,13 @@ try {
|
||||
echo 'saved: ' . $sDirectory;
|
||||
}
|
||||
break;
|
||||
case 'getSessid':
|
||||
if(isset($_SESSION['USER_LOGGED'])){
|
||||
echo Bootstrap::json_encode(1);
|
||||
}else{
|
||||
echo Bootstrap::json_encode(0);
|
||||
}
|
||||
break;
|
||||
case 'events':
|
||||
$oProcessMap->eventsList($oData->pro_uid, $oData->type);
|
||||
break;
|
||||
|
||||
@@ -232,18 +232,21 @@ class ProcessPermissions
|
||||
$sObjectUID = '';
|
||||
break;
|
||||
case 'DYNAFORM':
|
||||
$data['DYNAFORMS'] = $data['DYNAFORMS'] == 0 ? '': $data['DYNAFORMS'];
|
||||
if ($data['DYNAFORMS'] != '') {
|
||||
$this->validateDynUid($data['DYNAFORMS']);
|
||||
}
|
||||
$sObjectUID = $data['DYNAFORMS'];
|
||||
break;
|
||||
case 'INPUT':
|
||||
$data['INPUTS'] = $data['INPUTS'] == 0 ? '': $data['INPUTS'];
|
||||
if ($data['INPUTS'] != '') {
|
||||
$this->validateInpUid($data['INPUTS']);
|
||||
}
|
||||
$sObjectUID = $data['INPUTS'];
|
||||
break;
|
||||
case 'OUTPUT':
|
||||
$data['OUTPUTS'] = $data['OUTPUTS'] == 0 ? '': $data['OUTPUTS'];
|
||||
if ($data['OUTPUTS'] != '') {
|
||||
$this->validateOutUid($data['OUTPUTS']);
|
||||
}
|
||||
|
||||
@@ -411,6 +411,8 @@ class Trigger
|
||||
}
|
||||
|
||||
$range = range($iniPos, $finPos);
|
||||
$stepChangeIds = array();
|
||||
$stepChangePos = array();
|
||||
foreach ($aStepTriggers as $dataStep) {
|
||||
if (($dataStep['st_type'] == $typeCompare) && (in_array($dataStep['st_position'], $range)) && ($dataStep['tri_uid'] != $triUid)) {
|
||||
$stepChangeIds[] = $dataStep['tri_uid'];
|
||||
|
||||
@@ -750,7 +750,27 @@ Ext.onReady( function() {
|
||||
xtype : 'textfield' ,
|
||||
width : 200 ,
|
||||
fieldLabel : _('ID_NAME') ,
|
||||
name : 'name'
|
||||
name : 'name' ,
|
||||
msgTarget: 'side',
|
||||
enableKeyEvents: true,
|
||||
listeners: {
|
||||
focus : function(textfield){
|
||||
var element = document.getElementById('dynaformCalendarName');
|
||||
element.setAttribute('maxlength','100');
|
||||
element.onpaste = function (e){
|
||||
var textValue = undefined;
|
||||
if(window.clipboardData && window.clipboardData.getData) {
|
||||
textValue = window.clipboardData.getData('Text');
|
||||
}else if(e.clipboardData && e.clipboardData.getData) {
|
||||
textValue = e.clipboardData.getData('text/plain');
|
||||
}
|
||||
if(textValue.length>99){
|
||||
Ext.MessageBox.alert(_('ID_WARNING'), _("ID_PPP_MAXIMUM_LENGTH")+":100", function(){ return true;});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'dynaformCalendarDescription' ,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
var consolidated = "{$consolidated}";
|
||||
var prj_readonly = "{$prj_readonly}";
|
||||
var credentials = "{$credentials}";
|
||||
var distribution = "{$distribution}";
|
||||
</script>
|
||||
<script type="text/javascript" src="/lib-dev/js/wz_jsgraphics.js"></script>
|
||||
<script type="text/javascript" src="/lib-dev/js/jquery-1.10.2.min.js"></script>
|
||||
@@ -70,6 +71,7 @@
|
||||
var consolidated = "{$consolidated}";
|
||||
var prj_readonly = "{$prj_readonly}";
|
||||
var credentials = "{$credentials}";
|
||||
var distribution = "{$distribution}";
|
||||
</script>
|
||||
<script type="text/javascript" src="/lib/js/mafe-{$buildhash}.js"></script>
|
||||
|
||||
|
||||
@@ -224,7 +224,6 @@ Ext.onReady(function(){
|
||||
};
|
||||
} else {
|
||||
newTypeProcess = {
|
||||
xtype: 'tbsplit',
|
||||
text: _('ID_NEW'),
|
||||
iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||
handler: function (){
|
||||
|
||||
@@ -22,6 +22,18 @@
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
.panel_title___processmaker {
|
||||
background: #3D9DE4 !important;
|
||||
}
|
||||
|
||||
.panel_close___processmaker {
|
||||
background: url("/skins/neoclassic/images/icons_silk/calendar_x_button.png") no-repeat center right;
|
||||
}
|
||||
|
||||
.panel_content___processmaker {
|
||||
border-width: 0 !important;
|
||||
}
|
||||
|
||||
body, table {
|
||||
font-family: tahoma,arial,verdana,sans-serif;
|
||||
}
|
||||
@@ -129,4 +141,3 @@ var saveConfig = function()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -25,11 +25,11 @@ SELECT LANG_ID, LANG_NAME FROM langOptions
|
||||
<en><![CDATA[Forgot Password]]></en>
|
||||
</FORGOT_PASWORD_LINK>
|
||||
<JS type="javascript"><![CDATA[
|
||||
window.onload= function(){
|
||||
window.onload= function(){
|
||||
document.getElementById('form[USR_USERNAME]').placeholder = _('ID_USER');
|
||||
document.getElementById('form[USR_PASSWORD_MASK]').placeholder = _('ID_PASSWORD');
|
||||
document.getElementById('form[BSUBMIT]').classList.remove('module_app_button___gray');
|
||||
document.getElementById('form[BSUBMIT]').classList.add('button-login-success');
|
||||
document.getElementById('form[BSUBMIT]').classList.add('button-login-success');
|
||||
};
|
||||
|
||||
// enable/disable forgot password link
|
||||
@@ -108,20 +108,16 @@ leimnud.event.add(document.getElementById('form[USR_PASSWORD_MASK]'), 'keypress'
|
||||
});
|
||||
|
||||
leimnud.event.add(document.getElementById('form[BSUBMIT]'), 'click', function() {
|
||||
setNestedProperty(this, Array('disabled'), 'true');
|
||||
setNestedProperty(this, Array('value'), @@LOGIN_VERIFY_MSG);
|
||||
setNestedProperty(this, Array("disabled"), "true");
|
||||
setNestedProperty(this, Array("value"), @@LOGIN_VERIFY_MSG);
|
||||
|
||||
var client = getBrowserClient();
|
||||
document.getElementById("form[USR_PASSWORD]").value = document.getElementById("form[USR_PASSWORD_MASK]").value;
|
||||
document.getElementById("form[USR_PASSWORD_MASK]").value = "";
|
||||
document.getElementById("form[USR_PASSWORD_MASK]").setAttribute("type", "text");
|
||||
|
||||
if (client.browser != "firefox") {
|
||||
document.login.submit();
|
||||
}
|
||||
document.getElementById('form[USR_PASSWORD]').value = document.getElementById('form[USR_PASSWORD_MASK]').value;
|
||||
document.getElementById('form[USR_PASSWORD_MASK]').value = '';
|
||||
document.getElementById('form[USR_PASSWORD_MASK]').setAttribute('type', 'text');
|
||||
document.login.submit();
|
||||
//return true;
|
||||
}.extend(document.getElementById('form[BSUBMIT]')));
|
||||
|
||||
]]></JS>
|
||||
</dynaForm>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user