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,22 +343,34 @@ 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)) {
|
||||
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) {
|
||||
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,15 +1408,15 @@ 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -16,8 +16,125 @@ var CURRENT_MAIN_DIRECTORY;
|
||||
var CURRENT_CURRENT_DIRECTORY;
|
||||
var oUploadFilesPanel;
|
||||
var oUploadFilesPanel;
|
||||
var showPromptLogin = function(lastAction, pro_uid, fileName, fc64) {
|
||||
lastActionPerformed = lastAction;
|
||||
prouid = pro_uid;
|
||||
filename = fileName;
|
||||
fcont = fc64;
|
||||
promptPanel = new leimnud.module.panel();
|
||||
promptPanel.options={
|
||||
statusBarButtons:[{value: _('LOGIN')}],
|
||||
position:{center:true},
|
||||
size:{w:370,h:160},
|
||||
control:{
|
||||
close:false,
|
||||
resize:false
|
||||
},
|
||||
fx:{
|
||||
modal:true
|
||||
}
|
||||
};
|
||||
promptPanel.setStyle={
|
||||
content:{
|
||||
padding:10,
|
||||
paddingBottom:2,
|
||||
textAlign:'left',
|
||||
paddingLeft:24,
|
||||
backgroundRepeat:'no-repeat',
|
||||
backgroundPosition:'10 50%',
|
||||
backgroundColor:'transparent',
|
||||
borderWidth:0
|
||||
}
|
||||
};
|
||||
promptPanel.make();
|
||||
promptPanel.addContent(_('ID_FILES_MANAGER_EDITOR_LOGIN_AGAIN'));
|
||||
promptPanel.addContent('<br />');
|
||||
var label = document.createElement("label");
|
||||
var theUser = document.createElement("input");
|
||||
theUser.title = 'Username';
|
||||
theUser.id = 'theUser';
|
||||
leimnud.dom.setStyle(theUser,{
|
||||
font:'normal 10pt Tahoma,MiscFixed',
|
||||
color:'#000',
|
||||
width:'75%',
|
||||
marginTop:3,
|
||||
backgroundColor:'white',
|
||||
border:'1px solid #919B9C',
|
||||
});
|
||||
label.appendChild(theUser);
|
||||
label.innerHTML = (_('ID_USERNAME')) + ': ';
|
||||
promptPanel.addContent(label);
|
||||
promptPanel.addContent(theUser);
|
||||
theUser.focus();
|
||||
var labelpass = document.createElement("label");
|
||||
var thePassword = document.createElement("input");
|
||||
thePassword.type = 'password';
|
||||
thePassword.id = 'thePassword';
|
||||
leimnud.dom.setStyle(thePassword,{
|
||||
font:'normal 10pt Tahoma,MiscFixed',
|
||||
color:'#000',
|
||||
width:'76%',
|
||||
marginTop:3,
|
||||
backgroundColor:'white',
|
||||
border:'1px solid #919B9C'
|
||||
});
|
||||
labelpass.appendChild(thePassword);
|
||||
labelpass.innerHTML = (_('ID_FIELD_DYNAFORM_PASSWORD')) +': ';
|
||||
promptPanel.addContent(labelpass);
|
||||
promptPanel.addContent(thePassword);
|
||||
thePassword.onkeyup=function(evt)
|
||||
{
|
||||
var evt = (window.event)?window.event:evt;
|
||||
var key = (evt.which)?evt.which:evt.keyCode;
|
||||
if(key == 13) {
|
||||
verifyLogin();
|
||||
}
|
||||
}.extend(this);
|
||||
promptPanel.fixContent();
|
||||
promptPanel.elements.statusBarButtons[0].onmouseup = verifyLogin;
|
||||
};
|
||||
var verifyLogin = function() {
|
||||
if (document.getElementById('thePassword').value.trim() == '') {
|
||||
new leimnud.module.app.alert().make({
|
||||
label: (_('ID_WRONG_USER_PASS'))
|
||||
});
|
||||
return;
|
||||
}
|
||||
var rpc = new leimnud.module.rpc.xmlhttp({
|
||||
url : '../login/authentication',
|
||||
args: 'form[USR_USERNAME]=' + document.getElementById('theUser').value.trim() + '&form[USR_PASSWORD]=' + document.getElementById('thePassword').value.trim() + '&form[USR_LANG]=' + window.location.href.split("/")[4]
|
||||
});
|
||||
rpc.callback = function(rpc) {
|
||||
if (rpc.xmlhttp.responseText.indexOf('form[USR_USERNAME]') == -1) {
|
||||
promptPanel.remove();
|
||||
if(lastActionPerformed=='save'){
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : 'processes_Ajax',
|
||||
args: 'action=saveFile&filename='+filename+'&pro_uid='+prouid+'&MAIN_DIRECTORY='+CURRENT_MAIN_DIRECTORY+'&fcontent='+fcont
|
||||
});
|
||||
oRPC.callback = function(rpc) {
|
||||
};
|
||||
oRPC.make();
|
||||
}
|
||||
lastActionPerformed = '';
|
||||
} else {
|
||||
new leimnud.module.app.alert().make({
|
||||
label: (_('ID_WRONG_USER_PASS'))
|
||||
});
|
||||
}
|
||||
}.extend(this);
|
||||
rpc.make();
|
||||
};
|
||||
var uploadFilesScreen = function(PRO_UID, MAIN_DIRECTORY, CURRENT_DIRECTORY) {
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : 'processes_Ajax',
|
||||
args: 'action=getSessid&filename=filename'
|
||||
});
|
||||
|
||||
oRPC.callback = function(rpc) {
|
||||
if(rpc.xmlhttp.response==0){
|
||||
showPromptLogin('upload','','','');
|
||||
}else{
|
||||
var swNavigator;
|
||||
if(navigator.appName=='Microsoft Internet Explorer'){
|
||||
var rv = '';
|
||||
@@ -63,10 +180,26 @@ var uploadFilesScreen = function(PRO_UID, MAIN_DIRECTORY, CURRENT_DIRECTORY) {
|
||||
oIFrame.style.height = '100%';
|
||||
oIFrame.src = 'processes_UploadFilesForm?PRO_UID=' + PRO_UID + '&MAIN_DIRECTORY=' + MAIN_DIRECTORY + '&CURRENT_DIRECTORY=' + CURRENT_DIRECTORY+'&NAVIGATOR='+swNavigator;
|
||||
oUploadFilesPanel.addContent(oIFrame);
|
||||
}
|
||||
}.extend(this);
|
||||
oRPC.make();
|
||||
};
|
||||
|
||||
var oPanel;
|
||||
function editFile(pro_uid, fileName){
|
||||
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : 'processes_Ajax',
|
||||
args: 'action=getSessid&filename='+fileName
|
||||
});
|
||||
|
||||
oRPC.callback = function(rpc) {
|
||||
if(rpc.xmlhttp.response==0){
|
||||
showPromptLogin('edit','','','');
|
||||
}
|
||||
}.extend(this);
|
||||
oRPC.make();
|
||||
|
||||
var typofile = fileName.split(".");
|
||||
if( typofile[typofile.length-1].toLowerCase() != 'txt' && typofile[typofile.length-1].toLowerCase() != 'html' ){
|
||||
msgBox(G_STRINGS.HTML_FILES,"alert");return;
|
||||
@@ -108,6 +241,19 @@ function saveFile(pro_uid, fileName){
|
||||
fc64 = fc64.replace(/&/g, "@amp@");
|
||||
fc64 = fc64.replace(/\+/g, '%2B');
|
||||
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : 'processes_Ajax',
|
||||
args: 'action=getSessid&filename='+fileName
|
||||
});
|
||||
|
||||
oPanel.loader.show();
|
||||
oRPC.callback = function(rpc) {
|
||||
if(rpc.xmlhttp.response==0){
|
||||
showPromptLogin('save',pro_uid, fileName, fc64);
|
||||
}
|
||||
}.extend(this);
|
||||
oRPC.make();
|
||||
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : 'processes_Ajax',
|
||||
args: 'action=saveFile&filename='+fileName+'&pro_uid='+pro_uid+'&MAIN_DIRECTORY='+CURRENT_MAIN_DIRECTORY+'&fcontent='+fc64
|
||||
@@ -122,6 +268,19 @@ function saveFile(pro_uid, fileName){
|
||||
|
||||
var showCreateEmptyOptionsPanel;
|
||||
function showCreateEmptyOptions(e, MAIN_DIRECTORY){
|
||||
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : 'processes_Ajax',
|
||||
args: 'action=getSessid&filename=filename'
|
||||
});
|
||||
|
||||
oRPC.callback = function(rpc) {
|
||||
if(rpc.xmlhttp.response==0){
|
||||
showPromptLogin('createEmty','','','');
|
||||
}
|
||||
}.extend(this);
|
||||
oRPC.make();
|
||||
|
||||
CURRENT_MAIN_DIRECTORY = MAIN_DIRECTORY;
|
||||
oPanel = new leimnud.module.panel();
|
||||
oPanel.options={
|
||||
|
||||
Reference in New Issue
Block a user