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

This commit is contained in:
Herbert Saal Gutierrez
2012-06-18 18:03:31 -04:00
76 changed files with 5744 additions and 4788 deletions

View File

@@ -1140,8 +1140,8 @@ function G_Text( form, element, name)
return true; return true;
break; break;
default: default:
if ( (me.mType == 'currency') || (me.mType == 'percentage') || (me.validate == 'Real') || (me.validate == 'Int') ) { if ( (me.mType == 'date') || (me.mType == 'currency') || (me.mType == 'percentage') || (me.validate == 'Real') || (me.validate == 'Int') ) {
if ( (pressKey >= 48 && pressKey <= 57) || (pressKey == 109 || pressKey == 190 || pressKey == 188) ) { if ( (pressKey >= 96 && pressKey <= 105) || (pressKey >= 48 && pressKey <= 57) || (pressKey == 109 || pressKey == 190 || pressKey == 188) ) {
return true; return true;
} }
else { else {
@@ -1157,9 +1157,11 @@ function G_Text( form, element, name)
if (me.element.readOnly) { if (me.element.readOnly) {
return true; return true;
} }
if (( me.mType != 'currency' && me.mType != 'percentage') && (me.element.value.length > me.element.maxLength - 1)) {
if ((me.mType != 'currency' && me.mType != 'percentage' && me.mType != 'date') && (me.element.value.length > me.element.maxLength - 1)) {
return true; return true;
} }
if (me.validate == 'Any' && me.mask == '') return true; if (me.validate == 'Any' && me.mask == '') return true;
//THIS FUNCTION HANDLE ALL KEYS EXCEPT BACKSPACE AND DELETE //THIS FUNCTION HANDLE ALL KEYS EXCEPT BACKSPACE AND DELETE
//keyCode = event.keyCode; //keyCode = event.keyCode;
@@ -1365,7 +1367,7 @@ function G_Percentage( form, element, name )
var me=this; var me=this;
this.parent = G_Text; this.parent = G_Text;
this.parent( form, element, name); this.parent( form, element, name);
this.validate = 'Int'; //this.validate = 'Int'; //Commented for allow enter the character '.'
this.mType = 'percentage'; this.mType = 'percentage';
this.mask= '###.##'; this.mask= '###.##';
this.comma_separator = "."; this.comma_separator = ".";
@@ -1377,7 +1379,7 @@ function G_Currency( form, element, name )
var me=this; var me=this;
this.parent = G_Text; this.parent = G_Text;
this.parent( form, element, name); this.parent( form, element, name);
//this.validate = 'Int'; //commented for allow enter the character '.' //this.validate = 'Int'; //Commented for allow enter the character '.'
this.mType = 'currency'; this.mType = 'currency';
this.mask= '_###,###,###,###,###;###,###,###,###,###.00'; this.mask= '_###,###,###,###,###;###,###,###,###,###.00';
this.comma_separator = "."; this.comma_separator = ".";
@@ -3234,5 +3236,39 @@ function hideRowsById(aFields){
} }
} }
function dateSetMask(mask) {
if (mask != '') {
mask = stringReplace("%y", "yy", mask);
mask = stringReplace("%Y", "yyyy", mask);
mask = stringReplace("%m", "mm", mask);
mask = stringReplace("%o", "mm", mask);
mask = stringReplace("%d", "dd", mask);
mask = stringReplace("%e", "dd", mask);
//In the function getCleanMask valid characters for an mask that does not
//is currency/percentage are: '0 ',' # ',' d ',' m ',' y ',' Y '.
//For hours, minutes and seconds replace this mask with '#'
mask = stringReplace("%H", "##", mask);
mask = stringReplace("%I", "##", mask);
mask = stringReplace("%k", "##", mask);
mask = stringReplace("%l", "##", mask);
mask = stringReplace("%M", "##", mask);
mask = stringReplace("%S", "##", mask);
mask = stringReplace("%j", "###", mask);
}
return mask;
}
function stringReplace(strSearch, strReplace, str) {
var expression = eval("/" + strSearch + "/g");
return str.replace(expression, strReplace);
}
/* end file */ /* end file */

View File

@@ -60,29 +60,55 @@ var G_Grid = function(oForm, sGridName){
j++; j++;
} }
break; break;
case 'currency': case 'currency':
while (oAux = document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']')) { while (oAux = document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']')) {
this.aElements.push(new G_Currency(oForm, document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']'), this.sGridName + '][' + j + '][' this.aElements.push(new G_Currency(oForm, document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']'), this.sGridName + '][' + j + ']['
+ this.aFields[i].sFieldName)); + this.aFields[i].sFieldName));
if (aFields[i].oProperties) {
this.aElements[this.aElements.length - 1].mask = aFields[i].oProperties.mask; if (this.aFields[i].oProperties) {
if (this.aFields[i].oProperties.comma_separator) {
this.aElements[this.aElements.length - 1].comma_separator = this.aFields[i].oProperties.comma_separator;
} }
this.aElements[this.aElements.length - 1].mask = this.aFields[i].oProperties.mask;
}
j++; j++;
} }
break; break;
case 'percentage': case 'percentage':
while (oAux = document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']')) { while (oAux = document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']')) {
this.aElements.push(new G_Percentage(oForm, document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']'), this.sGridName + '][' + j this.aElements.push(new G_Percentage(oForm, document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']'), this.sGridName + '][' + j
+ '][' + this.aFields[i].sFieldName)); + '][' + this.aFields[i].sFieldName));
if (this.aFields[i].oProperties) {
if (this.aFields[i].oProperties.comma_separator) {
this.aElements[this.aElements.length - 1].comma_separator = this.aFields[i].oProperties.comma_separator;
}
this.aElements[this.aElements.length - 1].mask = this.aFields[i].oProperties.mask;
}
j++;
}
break;
case 'dropdown':
while (oAux = document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']')) {
this.aElements.push(new G_DropDown(oForm, document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']'), this.sGridName + '][' + j + ']['
+ this.aFields[i].sFieldName));
if (aFields[i].oProperties) { if (aFields[i].oProperties) {
this.aElements[this.aElements.length - 1].mask = aFields[i].oProperties.mask; this.aElements[this.aElements.length - 1].mask = aFields[i].oProperties.sMask;
} }
j++; j++;
} }
break; break;
case 'dropdown':
default:
while (oAux = document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']')) { while (oAux = document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']')) {
this.aElements.push(new G_DropDown(oForm, document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']'), this.sGridName + '][' + j + '][' this.aElements.push(new G_Field(oForm, document.getElementById('form[' + this.sGridName + '][' + j + '][' + this.aFields[i].sFieldName + ']'), this.sGridName + '][' + j + ']['
+ this.aFields[i].sFieldName)); + this.aFields[i].sFieldName));
if (aFields[i].oProperties) { if (aFields[i].oProperties) {
this.aElements[this.aElements.length - 1].mask = aFields[i].oProperties.sMask; this.aElements[this.aElements.length - 1].mask = aFields[i].oProperties.sMask;

View File

@@ -987,7 +987,7 @@ class G
} }
/* Fix to prevent use uxs skin outside siplified interface, /* Fix to prevent use uxs skin outside siplified interface,
because that skin is not compatible with others interfaces*/ because that skin is not compatible with others interfaces*/
if ($SYS_SKIN == 'uxs' && $SYS_COLLECTION !== 'home') { if ($SYS_SKIN == 'uxs' && $SYS_COLLECTION != 'home' && $SYS_COLLECTION != 'cases') {
$SYS_SKIN = 'classic'; $SYS_SKIN = 'classic';
} }

View File

@@ -304,7 +304,7 @@ class headPublisher {
function getExtJsStylesheets($skinName){ function getExtJsStylesheets($skinName){
$script = " <link rel='stylesheet' type='text/css' href='/css/$skinName.css' />\n"; $script = " <link rel='stylesheet' type='text/css' href='/css/$skinName.css' />\n";
$script .= " <script type='text/javascript' src='/js/ext/translation.en.js'></script>\n"; $script .= " <script type='text/javascript' src='/js/ext/translation.".SYS_LANG.".js'></script>\n";
/* /*
$script .= " <link rel='stylesheet' type='text/css' href='/skins/ext/ext-all-notheme.css' />\n"; $script .= " <link rel='stylesheet' type='text/css' href='/skins/ext/ext-all-notheme.css' />\n";
$script .= " <link rel='stylesheet' type='text/css' href='/skins/ext/" . $this->extJsSkin.".css' />\n"; $script .= " <link rel='stylesheet' type='text/css' href='/skins/ext/" . $this->extJsSkin.".css' />\n";

View File

@@ -583,7 +583,6 @@ class PHPMailer {
if ($this->exceptions) { if ($this->exceptions) {
throw $e; throw $e;
} }
echo $e->getMessage()."\n";
return false; return false;
} }
} }

View File

@@ -92,7 +92,10 @@ class MysqlPlatform extends DefaultPlatform {
* @return string * @return string
*/ */
public function escapeText($text) { public function escapeText($text) {
return mysql_real_escape_string($text); $search = array("\x00", "\n", "\r", "\\", "'", "\"", "\x1a");
$replace = array("\\x00", "\\n", "\\r", "\\\\" ,"\'", "\\\"", "\\\x1a");
return str_replace($search, $replace, $text);
//return mysql_real_escape_string($text);
} }
/** /**

View File

@@ -147,37 +147,18 @@ class LDAP
$sKeyword .= '*'; $sKeyword .= '*';
} }
} }
$sFilter = '(&'; $sFilter = '(&(|(objectClass=*))';
if (count($aAuthSource['AUTH_SOURCE_OBJECT_CLASSES']) > 0) {
$sFilter .= '(|'; if ( isset( $aAuthSource['AUTH_SOURCE_DATA']['LDAP_TYPE']) && $aAuthSource['AUTH_SOURCE_DATA']['LDAP_TYPE'] == 'ad' ) {
$aObjects = explode("\n", $aAuthSource['AUTH_SOURCE_OBJECT_CLASSES']); $sFilter = "(&(|(objectClass=*))(|(samaccountname=$sKeyword)(userprincipalname=$sKeyword))(objectCategory=person))";
foreach ($aObjects as $sObject) {
$sFilter .= '(objectClass=' . trim($sObject) . ')';
} }
$sFilter .= ')'; else
} $sFilter = "(&(|(objectClass=*))(|(uid=$sKeyword)(cn=$sKeyword)))";
if (count($aAuthSource['AUTH_SOURCE_ATTRIBUTES']) > 0) {
$sFilter .= '(|';
$aAttributes = explode("\n", $aAuthSource['AUTH_SOURCE_ATTRIBUTES']);
foreach ($aAttributes as $sObject) {
$sObject = trim($sObject);
if ($sObject != '') {
$sFilter .= '(' . trim($sObject) . '=' . $sKeyword . ')';
}
}
$sFilter .= ')';
}
// note added by gustavo cruz gustavo-at-colosa.com
// code added in order to add the data of the aditional filter field
// the nature of the filter and the correct use will be explained in a
// future blog post
$sFilter .= isset($aAuthSource['AUTH_SOURCE_DATA']['AUTH_SOURCE_ADDITIONAL_FILTER'])
? $aAuthSource['AUTH_SOURCE_DATA']['AUTH_SOURCE_ADDITIONAL_FILTER'] :'' ;
$sFilter .= ')';
//G::pr($sFilter); //G::pr($sFilter);
$aUsers = array(); $aUsers = array();
$oSearch = @ldap_search($oLink, $aAuthSource['AUTH_SOURCE_BASE_DN'], $sFilter); $oSearch = @ldap_search($oLink, $aAuthSource['AUTH_SOURCE_BASE_DN'], $sFilter, array('dn','uid','samaccountname', 'cn','givenname','sn','mail','userprincipalname','objectcategory', 'manager'));
if ($oError = @ldap_errno($oLink)) { if ($oError = @ldap_errno($oLink)) {
return $aUsers; return $aUsers;
} }

View File

@@ -265,6 +265,7 @@ class dynaformEditor extends WebResource
var DYNAFORM_URL="'.$Parameters['URL'].'"; var DYNAFORM_URL="'.$Parameters['URL'].'";
leimnud.event.add(window,"load",function(){ loadEditor(); }); leimnud.event.add(window,"load",function(){ loadEditor(); });
'); ');
$oHeadPublisher->addScriptCode(' var jsMeta;');
G::RenderPage( "publish", 'blank' ); G::RenderPage( "publish", 'blank' );
} }
@@ -664,8 +665,12 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax
* @param string $sCode * @param string $sCode
* @return array * @return array
*/ */
function set_javascript($A,$fieldName,$sCode) function set_javascript($A,$fieldName,$sCode,$meta)
{ {
if ($fieldName == '___pm_boot_strap___') {
return 0;
}
$sCode = urldecode($sCode) ; $sCode = urldecode($sCode) ;
try { try {
$sCode = rtrim($sCode); $sCode = rtrim($sCode);
@@ -678,7 +683,7 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax
G::LoadSystem('dynaformhandler'); G::LoadSystem('dynaformhandler');
$dynaform = new dynaFormHandler(PATH_DYNAFORM."{$file}.xml"); $dynaform = new dynaFormHandler(PATH_DYNAFORM."{$file}.xml");
$dynaform->replace($fieldName, $fieldName, Array('type'=>'javascript', '#cdata'=>$sCode)); $dynaform->replace($fieldName, $fieldName, Array('type'=>'javascript', 'meta'=>$meta, '#cdata'=>$sCode));
return 0; return 0;
} catch(Exception $e) { } catch(Exception $e) {

View File

@@ -395,7 +395,7 @@ class NET
@oci_close($link); @oci_close($link);
} }
else { else {
$this->error = "the user $this->db_user doesn't has privileges to run queries!"; $this->error = "the user $this->db_user doesn't have privileges to run queries!";
$this->errstr = "NET::ORACLE->Couldn't execute any query on this server!"; $this->errstr = "NET::ORACLE->Couldn't execute any query on this server!";
$this->errno = 40010; $this->errno = 40010;
} }

View File

@@ -254,18 +254,17 @@ function pauseCase($sApplicationUID = '', $iDelegation = 0, $sUserUID = '', $sUn
* @return array or string | $Resultquery | Result | Result of the query | If executing a SELECT statement, it returns an array of associative arrays * @return array or string | $Resultquery | Result | Result of the query | If executing a SELECT statement, it returns an array of associative arrays
* *
*/ */
function executeQuery($SqlStatement, $DBConnectionUID = 'workflow') { function executeQuery($SqlStatement, $DBConnectionUID = 'workflow', $aParameter = array()) {
$con = Propel::getConnection($DBConnectionUID);
$con->begin();
try { try {
$statement = trim($SqlStatement); $statement = trim($SqlStatement);
$statement = str_replace('(', '', $statement); $statement = str_replace('(', '', $statement);
$con = Propel::getConnection($DBConnectionUID);
$con->begin();
$result = false; $result = false;
if (getEngineDataBaseName($con) != 'oracle' ) {
switch(true) { switch(true) {
case preg_match("/^SELECT\s/i", $statement): case preg_match("/^(SELECT|EXECUTE|EXEC|SHOW|DESCRIBE|EXPLAIN|BEGIN)\s/i", $statement):
case preg_match("/^EXECUTE\s/i", $statement):
$rs = $con->executeQuery($SqlStatement); $rs = $con->executeQuery($SqlStatement);
$con->commit(); $con->commit();
@@ -292,6 +291,10 @@ function executeQuery($SqlStatement, $DBConnectionUID = 'workflow') {
$result = $con->getUpdateCount(); $result = $con->getUpdateCount();
break; break;
} }
}
else {
$result = executeQueryOci($SqlStatement, $con, $aParameter);
}
return $result; return $result;
} catch (SQLException $sqle) { } catch (SQLException $sqle) {

View File

@@ -631,3 +631,108 @@ function registerError($iType, $sError, $iLine, $sCode)
$sType = ($iType == 1 ? 'ERROR' : 'FATAL'); $sType = ($iType == 1 ? 'ERROR' : 'FATAL');
$_SESSION['TRIGGER_DEBUG']['ERRORS'][][$sType] = $sError . ($iLine > 0 ? ' (line ' . $iLine . ')' : '') . ':<br /><br />' . $sCode; $_SESSION['TRIGGER_DEBUG']['ERRORS'][][$sType] = $sError . ($iLine > 0 ? ' (line ' . $iLine . ')' : '') . ':<br /><br />' . $sCode;
} }
/**
* Obtain engine Data Base name
*
* @param type $connection
* @return type
*/
function getEngineDataBaseName($connection)
{
$aDNS = $connection->getDSN();
return $aDNS["phptype"];
}
/**
* Execute Queries for Oracle Database
*
* @param type $sql
* @param type $connection
*/
function executeQueryOci($sql, $connection, $aParameter = array())
{
$aDNS = $connection->getDSN();
$sUsername = $aDNS["username"];
$sPassword = $aDNS["password"];
$sHostspec = $aDNS["hostspec"];
$sDatabse = $aDNS["database"];
$sPort = $aDNS["port"];
if ($sPort != "1521") { // if not default port
$conn = oci_connect($sUsername, $sPassword, $sHostspec . ":" . $sPort . "/" . $sDatabse);
}
else {
$conn = oci_connect($sUsername, $sPassword, $sHostspec . "/" . $sDatabse);
}
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
return $e;
}
switch(true) {
case preg_match("/^(SELECT|SHOW|DESCRIBE|DESC)\s/i", $sql):
$stid = oci_parse($conn, $sql);
if (count($aParameter) > 0) {
foreach ($aParameter as $key => $val) {
oci_bind_by_name($stid, $key, $val);
}
}
oci_execute($stid, OCI_DEFAULT);
$result = Array();
$i = 1;
while ($row = oci_fetch_array($stid, OCI_ASSOC + OCI_RETURN_NULLS)) {
$result[$i++] = $row;
}
oci_free_statement($stid);
oci_close($conn);
return $result;
break;
case preg_match("/^(INSERT|UPDATE|DELETE)\s/i", $sql):
$stid = oci_parse($conn, $sql);
$isValid = true;
if (count($aParameter) > 0){
foreach ($aParameter as $key => $val) {
oci_bind_by_name($stid, $key, $val);
}
}
$objExecute = oci_execute($stid, OCI_DEFAULT);
if ($objExecute) {
oci_commit($conn);
}
else {
oci_rollback($conn);
$isValid = false;
}
oci_free_statement($stid);
oci_close($conn);
if ($isValid) {
return true;
}
else {
return oci_error();
}
break;
default:
// Stored procedures
$stid = oci_parse($conn, $sql);
$aParameterRet = array();
if (count($aParameter) > 0){
foreach ($aParameter as $key => $val) {
$aParameterRet[$key] = $val;
// The third parameter ($aParameterRet[$key]) returned a value by reference.
oci_bind_by_name($stid, $key, $aParameterRet[$key]);
}
}
$objExecute = oci_execute($stid, OCI_DEFAULT);
oci_free_statement($stid);
oci_close($conn);
return $aParameterRet;
break;
}
}

View File

@@ -104,11 +104,11 @@ class PmTable
default: default:
require_once 'classes/model/DbSource.php'; require_once 'classes/model/DbSource.php';
$dbSource = DbSource::load($this->dataSource); $oDBSource = new DbSource();
if (!is_object($dbSource)) { $proUid = $oDBSource->getValProUid($this->dataSource);
throw new Exception("Db source with id $dbsUid does not exist!"); $dbSource = $oDBSource->load($this->dataSource, $proUid);
}
if (is_object($dbSource)) {
$this->dbConfig->adapter= $dbSource->getDbsType(); $this->dbConfig->adapter= $dbSource->getDbsType();
$this->dbConfig->host = $dbSource->getDbsServer(); $this->dbConfig->host = $dbSource->getDbsServer();
$this->dbConfig->name = $dbSource->getDbsDatabaseName(); $this->dbConfig->name = $dbSource->getDbsDatabaseName();
@@ -116,6 +116,18 @@ class PmTable
$this->dbConfig->passwd = $dbSource->getDbsPassword(); $this->dbConfig->passwd = $dbSource->getDbsPassword();
$this->dbConfig->port = $dbSource->getDbsPort(); $this->dbConfig->port = $dbSource->getDbsPort();
} }
if (is_array($dbSource)) {
$this->dbConfig->adapter= $dbSource['DBS_TYPE'];
$this->dbConfig->host = $dbSource['DBS_SERVER'];
$this->dbConfig->name = $dbSource['DBS_DATABASE_NAME'];
$this->dbConfig->user = $dbSource['DBS_USERNAME'];
$this->dbConfig->passwd = $dbSource['DBS_PASSWORD'] ;
$this->dbConfig->port = $dbSource['DBS_PORT'];
}
else {
throw new Exception("Db source with id $dbsUid does not exist!");
}
}
} }
/** /**
@@ -394,8 +406,59 @@ class PmTable
$lines = file($this->dataDir . $this->dbConfig->adapter . PATH_SEP . 'schema.sql'); $lines = file($this->dataDir . $this->dbConfig->adapter . PATH_SEP . 'schema.sql');
$previous = NULL; $previous = NULL;
$queryStack = array(); $queryStack = array();
$aDNS = $con->getDSN();
$dbEngine = $aDNS["phptype"];
foreach ($lines as $j => $line) { foreach ($lines as $j => $line) {
switch($dbEngine) {
case 'mysql' :
$line = trim($line); // Remove comments from the script
if (strpos($line, "--") === 0) {
$line = substr($line, 0, strpos($line, "--"));
}
if (empty($line)) {
continue;
}
if (strpos($line, "#") === 0) {
$line = substr($line, 0, strpos($line, "#"));
}
if (empty($line)) {
continue;
}
// Concatenate the previous line, if any, with the current
if ($previous) {
$line = $previous . " " . $line;
}
$previous = NULL;
// If the current line doesnt end with ; then put this line together
// with the next one, thus supporting multi-line statements.
if (strrpos($line, ";") != strlen($line) - 1) {
$previous = $line;
continue;
}
$line = substr($line, 0, strrpos($line, ";"));
// just execute the drop and create table for target table nad not for others
if (stripos($line, 'CREATE TABLE') !== false || stripos($line, 'DROP TABLE') !== false) {
$isCreateForCurrentTable = preg_match('/CREATE\sTABLE\s[\[\'\"\`]{1}' . $this->tableName . '[\]\'\"\`]{1}/i', $line, $match);
if ($isCreateForCurrentTable) {
$queryStack['create'] = $line;
}
else {
$isDropForCurrentTable = preg_match('/DROP TABLE.*[\[\'\"\`]{1}' . $this->tableName . '[\]\'\"\`]{1}/i', $line, $match);
if ($isDropForCurrentTable) {
$queryStack['drop'] = $line;
}
}
}
break;
case 'mssql' :
$line = trim($line); // Remove comments from the script $line = trim($line); // Remove comments from the script
if (strpos($line, "--") === 0) { if (strpos($line, "--") === 0) {
@@ -429,22 +492,87 @@ class PmTable
$line = substr($line, 0, strrpos($line, ";")); $line = substr($line, 0, strrpos($line, ";"));
// just execute the drop and create table for target table nad not for others if (strpos($line, $this->tableName) == false) {
if (stripos($line, 'CREATE TABLE') !== false || stripos($line, 'DROP TABLE') !== false) { continue;
$isCreateForCurrentTable = preg_match('/CREATE\sTABLE\s[\'\"\`]{1}' . $this->tableName . '[\'\"\`]{1}/i', $line, $match); }
if ($isCreateForCurrentTable) {
$queryStack['create'] = $line; $auxCreate = explode('CREATE', $line);
$auxDrop = explode('IF EXISTS', $auxCreate['0']);
$queryStack['drop'] = 'IF EXISTS' . $auxDrop['1'];
$queryStack['create'] = 'CREATE' . $auxCreate['1'];
break;
case 'oracle' :
$line = trim($line);
if (empty($line)) {
continue;
}
switch(true) {
case preg_match("/^CREATE TABLE\s/i", $line):
if (strpos($line, $this->tableName) == true) {
$inCreate = true;
$lineCreate .= $line . ' ';
}
break;
case preg_match("/ALTER TABLE\s/i", $line):
if (strpos($line, $this->tableName) == true) {
$inAlter = true;
$lineAlter .= $line . ' ';
}
break;
case preg_match("/^DROP TABLE\s/i", $line):
if (strpos($line, $this->tableName) == true) {
$inDrop = true;
$lineDrop .= $line . ' ';
if (strrpos($line, ";") > 0) {
$queryStack['drop'] = $lineDrop;
$inDrop = false;
}
}
break;
default :
if ($inCreate) {
$lineCreate .= $line . ' ';
if (strrpos($line, ";") > 0) {
$queryStack['create'] = $lineCreate;
$inCreate = false;
}
}
if ($inAlter) {
$lineAlter .= $line . ' ';
if (strrpos($line, ";") > 0) {
$queryStack['alter'] = $lineAlter;
$inAlter = false;
}
}
if ($inDrop) {
$lineDrop .= $line . ' ';
if (strrpos($line, ";")>0) {
$queryStack['drop'] = $lineDrop;
$inDrop = false;
}
}
}
break;
}
}
if ($dbEngine == 'oracle') {
$queryStack['drop'] = substr($queryStack['drop'], 0, strrpos($queryStack['drop'], ";"));
$queryStack['create'] = substr($queryStack['create'], 0, strrpos($queryStack['create'], ";"));
$queryStack['alter'] = substr($queryStack['alter'], 0, strrpos($queryStack['alter'], ";"));
$queryIfExistTable = "SELECT TABLE_NAME FROM USER_TABLES WHERE TABLE_NAME = '" . $this->tableName . "'";
$rs = $stmt->executeQuery($queryIfExistTable);
if ($rs->next()) {
$stmt->executeQuery($queryStack['drop']);
}
$stmt->executeQuery($queryStack['create']);
$stmt->executeQuery($queryStack['alter']);
} }
else { else {
$isDropForCurrentTable = preg_match('/DROP TABLE.*[\'\"\`]{1}' . $this->tableName . '[\'\"\`]{1}/i', $line, $match);
if ($isDropForCurrentTable) {
$queryStack['drop'] = $line;
}
}
}
}
if (isset($queryStack['create'])) { if (isset($queryStack['create'])) {
// first at all we need to verify if we have a valid schema defined, // first at all we need to verify if we have a valid schema defined,
// so we verify that creating a dummy table // so we verify that creating a dummy table
@@ -464,8 +592,7 @@ class PmTable
$stmt->executeQuery($queryStack['drop']); $stmt->executeQuery($queryStack['drop']);
$stmt->executeQuery($queryStack['create']); $stmt->executeQuery($queryStack['create']);
} }
}
} }
public function upgradeDatabaseFor($dataSource, $tablesList = array()) public function upgradeDatabaseFor($dataSource, $tablesList = array())

View File

@@ -542,7 +542,6 @@ class propelTable
$template = PATH_CORE . 'templates' . PATH_SEP . $menu->type . '.html'; $template = PATH_CORE . 'templates' . PATH_SEP . $menu->type . '.html';
$menu->setValues($this->xmlForm->values); $menu->setValues($this->xmlForm->values);
$menu->setValues(array( 'PAGED_TABLE_ID' => $this->id )); $menu->setValues(array( 'PAGED_TABLE_ID' => $this->id ));
$menu->setValues(array( 'PAGED_TABLE_FAST_SEARCH' => $this->fastSearch ));
if (isset($filterForm->name)) { if (isset($filterForm->name)) {
$menu->setValues(array('SEARCH_FILTER_FORM' => $filterForm->name)); $menu->setValues(array('SEARCH_FILTER_FORM' => $filterForm->name));
} }

View File

@@ -654,6 +654,7 @@ class wsBase
if (!file_exists($fileTemplate)) { if (!file_exists($fileTemplate)) {
$data['FILE_TEMPLATE'] = $fileTemplate; $data['FILE_TEMPLATE'] = $fileTemplate;
$result = new wsResponse(28, G::LoadTranslation('ID_TEMPLATE_FILE_NOT_EXIST', SYS_LANG, $data)); $result = new wsResponse(28, G::LoadTranslation('ID_TEMPLATE_FILE_NOT_EXIST', SYS_LANG, $data));
return $result; return $result;
} }
@@ -661,8 +662,9 @@ class wsBase
$Fields = $oldFields['APP_DATA']; $Fields = $oldFields['APP_DATA'];
} }
else { else {
$Fields = $appFields; $Fields = array_merge($oldFields['APP_DATA'], $appFields);
} }
$templateContents = file_get_contents($fileTemplate); $templateContents = file_get_contents($fileTemplate);
//$sContent = G::unhtmlentities($sContent); //$sContent = G::unhtmlentities($sContent);
@@ -1246,6 +1248,16 @@ class wsBase
*/ */
public function newCase($processId, $userId, $taskId, $variables) { public function newCase($processId, $userId, $taskId, $variables) {
try { try {
//GET, POST & $_SESSION Vars
//Unset any variable, because we are starting a new case
if (isset($_SESSION['APPLICATION'])) unset($_SESSION['APPLICATION']);
if (isset($_SESSION['PROCESS'])) unset($_SESSION['PROCESS']);
if (isset($_SESSION['TASK'])) unset($_SESSION['TASK']);
if (isset($_SESSION['INDEX'])) unset($_SESSION['INDEX']);
if (isset($_SESSION['USER_LOGGED'])) unset($_SESSION['USER_LOGGED']);
//if (isset($_SESSION['USR_USERNAME'])) unset($_SESSION['USR_USERNAME']);
//if (isset($_SESSION['STEP_POSITION'])) unset($_SESSION['STEP_POSITION']);
$Fields = array(); $Fields = array();
if ( is_array($variables) && count($variables)>0 ) { if ( is_array($variables) && count($variables)>0 ) {
$Fields = $variables; $Fields = $variables;
@@ -1286,6 +1298,15 @@ class wsBase
} }
$case = $oCase->startCase($taskId, $userId); $case = $oCase->startCase($taskId, $userId);
$_SESSION['APPLICATION'] = $case['APPLICATION'];
$_SESSION['PROCESS'] = $case['PROCESS'];
$_SESSION['TASK'] = $taskId;
$_SESSION['INDEX'] = $case['INDEX'];
$_SESSION['USER_LOGGED'] = $userId;
//$_SESSION['USR_USERNAME'] = $case['USR_USERNAME'];
//$_SESSION['STEP_POSITION'] = 0;
$caseId = $case['APPLICATION']; $caseId = $case['APPLICATION'];
$caseNr = $case['CASE_NUMBER']; $caseNr = $case['CASE_NUMBER'];

View File

@@ -89,9 +89,11 @@ class AppCacheView extends BaseAppCacheView {
else { else {
$Criteria = $this->addPMFieldsToCriteria('todo'); $Criteria = $this->addPMFieldsToCriteria('todo');
} }
$Criteria->addSelectColumn(AppCacheViewPeer::TAS_UID);
$Criteria->addSelectColumn(AppCacheViewPeer::PRO_UID);
$Criteria->add (AppCacheViewPeer::APP_STATUS, "TO_DO" , CRITERIA::EQUAL ); $Criteria->add (AppCacheViewPeer::APP_STATUS, "TO_DO" , CRITERIA::EQUAL );
$Criteria->add (AppCacheViewPeer::USR_UID, $userUid); $Criteria->add (AppCacheViewPeer::USR_UID, $userUid);
$Criteria->add (AppCacheViewPeer::DEL_FINISH_DATE, null, Criteria::ISNULL); $Criteria->add (AppCacheViewPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
$Criteria->add (AppCacheViewPeer::APP_THREAD_STATUS, 'OPEN'); $Criteria->add (AppCacheViewPeer::APP_THREAD_STATUS, 'OPEN');
$Criteria->add (AppCacheViewPeer::DEL_THREAD_STATUS, 'OPEN'); $Criteria->add (AppCacheViewPeer::DEL_THREAD_STATUS, 'OPEN');

View File

@@ -103,6 +103,18 @@ class DbSource extends BaseDbSource
} }
} }
public function getValProUid($Uid)
{
$oCriteria = new Criteria('workflow');
$oCriteria->clearSelectColumns();
$oCriteria->addSelectColumn(DbSourcePeer::PRO_UID);
$oCriteria->add(DbSourcePeer::DBS_UID, $Uid);
$result = DbSourcePeer::doSelectRS($oCriteria);
$result->next();
$aRow = $result->getRow();
return $aRow[0];
}
function Exists ( $Uid, $ProUID ) { function Exists ( $Uid, $ProUID ) {
try { try {
$oPro = DbSourcePeer::retrieveByPk( $Uid, $ProUID ); $oPro = DbSourcePeer::retrieveByPk( $Uid, $ProUID );

View File

@@ -1,8 +1,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ProcessMaker (Branch 2.0-testing) dummy-119-g6a8c61e\n" "Project-Id-Version: ProcessMaker (Branch 2.0-experimental) dummy-126-g6fb2f2d\n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: 2012-05-16 15:56:38\n" "PO-Revision-Date: 2012-05-31 19:14:21\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: Colosa Developers Team <developers@colosa.com>\n" "Language-Team: Colosa Developers Team <developers@colosa.com>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@@ -3856,8 +3856,8 @@ msgstr "Field \"table\" is required"
# TRANSLATION # TRANSLATION
# JAVASCRIPT/ID_ASSIGN_RULES # JAVASCRIPT/ID_ASSIGN_RULES
#: JAVASCRIPT/ID_ASSIGN_RULES #: JAVASCRIPT/ID_ASSIGN_RULES
msgid "Error: There is a problem with next tasks of this process, one of them have manual assignment. Manual assignment shouldn't be used with subprocesses" msgid "Error: There is a problem with the next tasks of this process. One of them has manual assignment. Manual assignment shouldn't be used with subprocesses"
msgstr "Error: There is a problem with next tasks of this process, one of them have manual assignment. Manual assignment shouldn't be used with subprocesses" msgstr "Error: There is a problem with the next tasks of this process. One of them has manual assignment. Manual assignment shouldn't be used with subprocesses"
# TRANSLATION # TRANSLATION
# LABEL/ID_FIELD_INVALID # LABEL/ID_FIELD_INVALID
@@ -3880,8 +3880,8 @@ msgstr "Saved"
# TRANSLATION # TRANSLATION
# LABEL/ID_ASSIGN_RULES # LABEL/ID_ASSIGN_RULES
#: LABEL/ID_ASSIGN_RULES #: LABEL/ID_ASSIGN_RULES
msgid "Error: There is a problem with next tasks of this process, one of them have manual assignment. Manual assignment shouldn't be used with subprocesses" msgid "[LABEL/ID_ASSIGN_RULES] Error: There is a problem with the next tasks of this process. One of them has manual assignment. Manual assignment shouldn't be used with subprocesses"
msgstr "Error: There is a problem with next tasks of this process, one of them have manual assignment. Manual assignment shouldn't be used with subprocesses" msgstr "Error: There is a problem with the next tasks of this process. One of them has manual assignment. Manual assignment shouldn't be used with subprocesses"
# TRANSLATION # TRANSLATION
# LABEL/ID_SELECT_OPTION_TABLE # LABEL/ID_SELECT_OPTION_TABLE
@@ -5572,8 +5572,8 @@ msgstr "Do you want to delete all selected processes?"
# TRANSLATION # TRANSLATION
# LABEL/ID_PROCESS_CANT_DELETE # LABEL/ID_PROCESS_CANT_DELETE
#: LABEL/ID_PROCESS_CANT_DELETE #: LABEL/ID_PROCESS_CANT_DELETE
msgid "You can't delete the process \"{0}\" because has {1} cases." msgid "You can't delete the process \"{0}\" because it has {1} cases."
msgstr "You can't delete the process \"{0}\" because has {1} cases." msgstr "You can't delete the process \"{0}\" because it has {1} cases."
# TRANSLATION # TRANSLATION
# LABEL/ID_FILE # LABEL/ID_FILE
@@ -5812,8 +5812,8 @@ msgstr "The root password has been updated successfully!"
# TRANSLATION # TRANSLATION
# LABEL/ID_MESSAGE_ROOT_CHANGE_FAILURE # LABEL/ID_MESSAGE_ROOT_CHANGE_FAILURE
#: LABEL/ID_MESSAGE_ROOT_CHANGE_FAILURE #: LABEL/ID_MESSAGE_ROOT_CHANGE_FAILURE
msgid "The root password has can't be updated !" msgid "The root password can't be updated!"
msgstr "The root password has can't be updated !" msgstr "The root password can't be updated!"
# TRANSLATION # TRANSLATION
# LABEL/ID_LAN_TRANSLATOR # LABEL/ID_LAN_TRANSLATOR
@@ -13498,7 +13498,7 @@ msgstr "Yes"
# authSources/ldapEdit.xml?AUTH_SOURCE_SEARCH_USER # authSources/ldapEdit.xml?AUTH_SOURCE_SEARCH_USER
# authSources/ldapEdit.xml # authSources/ldapEdit.xml
#: text - AUTH_SOURCE_SEARCH_USER #: text - AUTH_SOURCE_SEARCH_USER
msgid "Search User" msgid "[authSources/ldapEdit.xml?AUTH_SOURCE_SEARCH_USER] Search User"
msgstr "Search User" msgstr "Search User"
# authSources/ldapEdit.xml?AUTH_SOURCE_PASSWORD # authSources/ldapEdit.xml?AUTH_SOURCE_PASSWORD
@@ -15543,7 +15543,7 @@ msgstr "DATE"
# cases/cases_MessagesView.xml?APP_MSG_BODY # cases/cases_MessagesView.xml?APP_MSG_BODY
# cases/cases_MessagesView.xml # cases/cases_MessagesView.xml
#: html - APP_MSG_BODY #: text - APP_MSG_BODY
msgid "[cases/cases_MessagesView.xml?APP_MSG_BODY] " msgid "[cases/cases_MessagesView.xml?APP_MSG_BODY] "
msgstr "" msgstr ""
@@ -21539,6 +21539,42 @@ msgstr "Send Request"
msgid "[login/forgotPassword.xml?BCANCEL] Cancel" msgid "[login/forgotPassword.xml?BCANCEL] Cancel"
msgstr "Cancel" msgstr "Cancel"
# login/login (copy).xml?TITLE
# login/login (copy).xml
#: title - TITLE
msgid "[login/login (copy).xml?TITLE] Login"
msgstr "Login"
# login/login (copy).xml?USR_USERNAME
# login/login (copy).xml
#: text - USR_USERNAME
msgid "[login/login (copy).xml?USR_USERNAME] User"
msgstr "User"
# login/login (copy).xml?USR_PASSWORD
# login/login (copy).xml
#: password - USR_PASSWORD
msgid "[login/login (copy).xml?USR_PASSWORD] Password"
msgstr "Password"
# login/login (copy).xml?USER_LANG
# login/login (copy).xml
#: dropdown - USER_LANG
msgid "[login/login (copy).xml?USER_LANG] Language"
msgstr "Language"
# login/login (copy).xml?BSUBMIT
# login/login (copy).xml
#: submit - BSUBMIT
msgid "[login/login (copy).xml?BSUBMIT] Login"
msgstr "Login"
# login/login (copy).xml?FORGOT_PASWORD_LINK
# login/login (copy).xml
#: link - FORGOT_PASWORD_LINK
msgid "[login/login (copy).xml?FORGOT_PASWORD_LINK] Forgot Password"
msgstr "Forgot Password"
# login/login.xml?TITLE # login/login.xml?TITLE
# login/login.xml # login/login.xml
#: title - TITLE #: title - TITLE

View File

@@ -346,6 +346,38 @@ class adminProxy extends HttpProxyController
G::LoadClass('net'); G::LoadClass('net');
G::LoadThirdParty('phpmailer', 'class.smtp'); G::LoadThirdParty('phpmailer', 'class.smtp');
if ($_POST['typeTest'] == 'MAIL')
{
define("SUCCESSFUL", 'SUCCESSFUL');
define("FAILED", 'FAILED');
$mail_to = $_POST['mail_to'];
$send_test_mail = $_POST['send_test_mail'];
$_POST['FROM_NAME'] = $mail_to;
$_POST['FROM_EMAIL'] = $mail_to;
$_POST['MESS_ENGINE'] = 'MAIL';
$_POST['MESS_SERVER'] = 'localhost';
$_POST['MESS_PORT'] = 25;
$_POST['MESS_ACCOUNT'] = $mail_to;
$_POST['MESS_PASSWORD'] = '';
$_POST['TO'] = $mail_to;
$_POST['SMTPAuth'] = true;
try {
$resp = $this->sendTestMail();
} catch (Exception $error) {
$resp = new stdclass();
$reps->status = false;
$resp->msg = $error->getMessage();
}
if($resp->status){
echo '{"sendMail":true, "msg":"' . $resp->msg . '"}';
} else {
echo '{"sendMail":false, "msg":"' . $resp->msg . '"}';
}
die;
}
$step = $_POST['step']; $step = $_POST['step'];
$server = $_POST['server']; $server = $_POST['server'];
$user = $_POST['user']; $user = $_POST['user'];
@@ -962,14 +994,22 @@ class adminProxy extends HttpProxyController
$namefile = $formf['name']; $namefile = $formf['name'];
$typefile = $formf['type']; $typefile = $formf['type'];
$errorfile = $formf['error']; $errorfile = $formf['error'];
$tpnfile = $formf['tmp_name']; $tmpFile = $formf['tmp_name'];
$aMessage1 = array(); $aMessage1 = array();
$fileName = trim(str_replace(' ', '_', $namefile)); $fileName = trim(str_replace(' ', '_', $namefile));
$fileName = self::changeNamelogo($fileName); $fileName = self::changeNamelogo($fileName);
G::uploadFile( $tpnfile, $dir . '/', 'tmp' . $fileName );
G::uploadFile($tmpFile, $dir, 'tmp' . $fileName);
try { try {
if (extension_loaded('exif')) {
$typeMime = exif_imagetype($dir . '/'. 'tmp'.$fileName); $typeMime = exif_imagetype($dir . '/'. 'tmp'.$fileName);
}
else {
$arrayInfo = getimagesize($dir . '/' . 'tmp' . $fileName);
$typeMime = $arrayInfo[2];
}
if ($typeMime == $allowedTypeArray['index' . base64_encode($_FILES['img']['type'])]) { if ($typeMime == $allowedTypeArray['index' . base64_encode($_FILES['img']['type'])]) {
$error = false; $error = false;
try { try {
@@ -989,7 +1029,6 @@ class adminProxy extends HttpProxyController
catch (Exception $e) { catch (Exception $e) {
$failed = "3"; $failed = "3";
} }
} }
else { else {
$failed = "2"; $failed = "2";

View File

@@ -86,7 +86,6 @@ class Home extends Controller
G::loadClass('system'); G::loadClass('system');
$sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini'); $sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini');
//Get ProcessStatistics Info //Get ProcessStatistics Info
$start = 0; $start = 0;
$limit = ''; $limit = '';
@@ -102,6 +101,33 @@ class Home extends Controller
unset($processList[0]); unset($processList[0]);
//Get simplified options
global $G_TMP_MENU;
$mnu = new Menu();
$mnu->load('simplified');
$arrayMnuOption = array();
$mnuNewCase = array();
if (!empty($mnu->Options)) {
foreach ($mnu->Options as $index => $value) {
$option = array(
'id' => $mnu->Id[$index],
'url' => $mnu->Options[$index],
'label' => $mnu->Labels[$index],
'icon' => $mnu->Icons[$index],
'class' => $mnu->ElementClass[$index]
);
if ($mnu->Id[$index] != 'S_NEW_CASE') {
$arrayMnuOption[] = $option;
}
else {
$mnuNewCase = $option;
}
}
}
$this->setView('home/index'); $this->setView('home/index');
$this->setVar('usrUid', $this->userID); $this->setVar('usrUid', $this->userID);
@@ -111,6 +137,8 @@ class Home extends Controller
$this->setVar('userUxType', $this->userUxType); $this->setVar('userUxType', $this->userUxType);
$this->setVar('clientBrowser', $this->clientBrowser['name']); $this->setVar('clientBrowser', $this->clientBrowser['name']);
$this->setVar('switchLink', $switchLink); $this->setVar('switchLink', $switchLink);
$this->setVar('arrayMnuOption', $arrayMnuOption);
$this->setVar('mnuNewCase', $mnuNewCase);
$this->render(); $this->render();
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -182,7 +182,7 @@ var showProcessMap = function ()
scs.evalScript(); scs.evalScript();
oLeyendsPanel = new leimnud.module.panel(); oLeyendsPanel = new leimnud.module.panel();
oLeyendsPanel.options = { oLeyendsPanel.options = {
size :{w:160,h:140}, size :{w:160,h:155},
position:{x:((document.body.clientWidth * 95) / 100) - ((document.body.clientWidth * 95) / 100 - (((document.body.clientWidth * 95) / 100) - 160)),y:45,center:false}, position:{x:((document.body.clientWidth * 95) / 100) - ((document.body.clientWidth * 95) / 100 - (((document.body.clientWidth * 95) / 100) - 160)),y:45,center:false},
title :G_STRINGS.ID_COLOR_LEYENDS, title :G_STRINGS.ID_COLOR_LEYENDS,
theme :"processmaker", theme :"processmaker",

View File

@@ -165,10 +165,11 @@ var dynaformEditor={
{ {
var field=getField("JS_LIST","dynaforms_JSEditor"); var field=getField("JS_LIST","dynaforms_JSEditor");
var code=this.getJSCode(); var code=this.getJSCode();
var meta=jsMeta;
if (field.value) if (field.value)
{ {
var res = this.ajax.set_javascript(this.A,field.value, encodeURIComponent(code)); var res = this.ajax.set_javascript(this.A,field.value, encodeURIComponent(code), meta);
if (typeof(res["*message"])==="string") if (typeof(res["*message"])==="string")
{ {
G.alert(res["*message"]); G.alert(res["*message"]);

View File

@@ -398,7 +398,7 @@ var Conditional = function(DYN_UID){
if(this.canSave){ if(this.canSave){
if( saving != true ){ if( saving != true ){
bResult = (result)? 'TRUE': 'FALSE'; bResult = (result)? _('ID_TRUE'): _('ID_FALSE');
oResultDiv = document.getElementById("ResultMessageTD"); oResultDiv = document.getElementById("ResultMessageTD");
oResultDiv.style.display = 'block'; oResultDiv.style.display = 'block';
oResultDiv.style.backgroundColor = '#BFCCC5'; oResultDiv.style.backgroundColor = '#BFCCC5';

View File

@@ -90,9 +90,11 @@
//alert( "Data Saved: " + httpResponse ); //alert( "Data Saved: " + httpResponse );
} }
}); });
fieldsHandlerSaveHidden();
} }
function fieldsHandlerSaveHidden(){ function fieldsHandlerSaveHidden(){
var responseMeta;
e = $('input:checkbox'); e = $('input:checkbox');
hidden_elements = ''; hidden_elements = '';
for(i=0; i<e.length; i++){ for(i=0; i<e.length; i++){
@@ -105,11 +107,14 @@
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "fieldsHandlerAjax", url: "fieldsHandlerAjax",
async: false,
data: "request=saveHidden&hidden="+hidden_elements, data: "request=saveHidden&hidden="+hidden_elements,
success: function(httpResponse){ success: function(httpResponse){
//alert( "Data Saved: " + httpResponse ); responseMeta = httpResponse;
} }
}); });
return responseMeta;
} }
function backImage(oImg,p){ function backImage(oImg,p){

View File

@@ -919,6 +919,7 @@ var processmap=function(){
if(deri.type===5 || deri.type===8) if(deri.type===5 || deri.type===8)
{ {
var toTask = this.data.db.task[this.tools.getIndexOfUid(deri.to[i].task)]; var toTask = this.data.db.task[this.tools.getIndexOfUid(deri.to[i].task)];
if (typeof(toTask) != 'undefined') {
toTask.object.inJoin = toTask.object.inJoin-1; toTask.object.inJoin = toTask.object.inJoin-1;
if(toTask.object.inJoin===0) if(toTask.object.inJoin===0)
{ {
@@ -930,6 +931,7 @@ var processmap=function(){
} }
} }
} }
}
this.parent.dom.setStyle(task.object.elements.derivation,{ this.parent.dom.setStyle(task.object.elements.derivation,{
background:"" background:""
}); });
@@ -2207,7 +2209,7 @@ var processmap=function(){
iHeight = 350; iHeight = 350;
break; break;
case 4: case 4:
iWidth = 500; iWidth = 600;
iHeight = 350; iHeight = 350;
break; break;
case 5: case 5:
@@ -2227,7 +2229,7 @@ var processmap=function(){
position:{x:50,y:50,center:true}, position:{x:50,y:50,center:true},
title :G_STRINGS.ID_PROCESSMAP_WORKFLOW_PATTERNS+": "+task.label, title :G_STRINGS.ID_PROCESSMAP_WORKFLOW_PATTERNS+": "+task.label,
theme :this.options.theme, theme :this.options.theme,
control :{close:true,resize:false}, control :{close:true,resize:true},
fx :{modal:true} fx :{modal:true}
}; };
panel.make(); panel.make();

View File

@@ -0,0 +1,10 @@
<?php
global $G_TMP_MENU;
global $RBAC;
$G_TMP_MENU->AddIdRawOption("S_HOME", "home/appList?t=todo", G::LoadTranslation("ID_HOME"), "/images/simplified/in-set-grey.png", null, null, null);
if ($RBAC->userCanAccess("PM_CASES") == 1) {
$G_TMP_MENU->AddIdRawOption("S_DRAFT", "home/appList?t=draft", G::LoadTranslation("ID_DRAFT"), "/images/simplified/folder-grey.png", null, null, null);
$G_TMP_MENU->AddIdRawOption("S_NEW_CASE", "#", G::LoadTranslation("ID_NEW_CASE"), "/images/simplified/plus-set-grey.png", null, null, null);
}

View File

@@ -95,11 +95,11 @@ try {
global $G_PUBLISH; global $G_PUBLISH;
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
if ($aFields['AUTH_SOURCE_PROVIDER'] != 'ldap') { if ($aFields['AUTH_SOURCE_PROVIDER'] != 'ldap') {
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'authSources/ldapSearchResults', $oCriteria,' ',array('Checkbox' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER'))); $G_PUBLISH->AddContent('propeltable', 'pagedTableLdap', 'authSources/ldapSearchResults', $oCriteria,' ',array('Checkbox' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER')));
} }
else { else {
if (file_exists(PATH_XMLFORM . 'authSources/' . $aFields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml')) { if (file_exists(PATH_XMLFORM . 'authSources/' . $aFields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml')) {
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'authSources/' . $aFields['AUTH_SOURCE_PROVIDER'] . 'SearchResults', $oCriteria,' ',array('Checkbox' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER'))); $G_PUBLISH->AddContent('propeltable', 'pagedTableLdap', 'authSources/' . $aFields['AUTH_SOURCE_PROVIDER'] . 'SearchResults', $oCriteria,' ',array('Checkbox' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER')));
} }
else { else {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => 'File: ' . $aFields['AUTH_SOURCE_PROVIDER'] . 'SearchResults.xml' . ' doesn\'t exist.')); $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => 'File: ' . $aFields['AUTH_SOURCE_PROVIDER'] . 'SearchResults.xml' . ' doesn\'t exist.'));

View File

@@ -41,4 +41,3 @@ $oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('authSources/authSourceskindof', true); //adding a javascript file .js $oHeadPublisher->addExtJsScript('authSources/authSourceskindof', true); //adding a javascript file .js
$oHeadPublisher->assign('sprovider', $_GET['sprovider']); $oHeadPublisher->assign('sprovider', $_GET['sprovider']);
G::RenderPage('publish', 'extJs'); G::RenderPage('publish', 'extJs');
G::RenderPage('publish','blank');

View File

@@ -275,7 +275,7 @@ class Ajax
oLeyendsPanel = new leimnud.module.panel(); oLeyendsPanel = new leimnud.module.panel();
oLeyendsPanel.options = { oLeyendsPanel.options = {
size :{w:160,h:140}, size :{w:160,h:155},
position:{x:((document.body.clientWidth * 95) / 100) - ((document.body.clientWidth * 95) / 100 - (((document.body.clientWidth * 95) / 100) - 160)),y:45,center:false}, position:{x:((document.body.clientWidth * 95) / 100) - ((document.body.clientWidth * 95) / 100 - (((document.body.clientWidth * 95) / 100) - 160)),y:45,center:false},
title :G_STRINGS.ID_COLOR_LEYENDS, title :G_STRINGS.ID_COLOR_LEYENDS,
theme :"processmaker", theme :"processmaker",

View File

@@ -88,8 +88,9 @@
if( $o->nodeExists('___pm_boot_strap___') ){ if( $o->nodeExists('___pm_boot_strap___') ){
$o->remove('___pm_boot_strap___'); $o->remove('___pm_boot_strap___');
} }
$o->add('___pm_boot_strap___', Array('type'=>'javascript', "meta"=>G::encrypt($hidden_items_tmp, 'dynafieldsHandler')), "/*$msg*/ $hStr"); $metaEncrypt = G::encrypt($hidden_items_tmp, 'dynafieldsHandler');
$o->add('___pm_boot_strap___', Array('type'=>'javascript', "meta"=>$metaEncrypt), "/*$msg*/ $hStr");
echo $metaEncrypt;
} else { //we must to remove the boot strap node; } else { //we must to remove the boot strap node;
$o->remove('___pm_boot_strap___'); $o->remove('___pm_boot_strap___');
} }

View File

@@ -32,11 +32,13 @@
if (isset($_FILES) && $_FILES['ATTACH_FILE']['error'] == 0) { if (isset($_FILES) && $_FILES['ATTACH_FILE']['error'] == 0) {
try{ try{
G::loadClass('case'); G::LoadClass('case');
$folderId = $fileTags = "";
if ( isset($_POST['DOC_UID']) && $_POST['DOC_UID'] != - 1) {
/* the document is of an Specific Input Document. Get path and Tag information*/
$folderId = '';
$fileTags = '';
if (isset($_POST['DOC_UID']) && $_POST['DOC_UID'] != -1) {
//The document is of an Specific Input Document. Get path and Tag information
require_once ('classes/model/AppFolder.php'); require_once ('classes/model/AppFolder.php');
require_once ('classes/model/InputDocument.php'); require_once ('classes/model/InputDocument.php');
@@ -52,7 +54,9 @@ if (isset($_FILES) && $_FILES['ATTACH_FILE']['error'] == 0) {
} }
$oAppDocument = new AppDocument(); $oAppDocument = new AppDocument();
if (isset($_POST['APP_DOC_UID']) && trim($_POST['APP_DOC_UID']) != '') { //is update
if (isset($_POST['APP_DOC_UID']) && trim($_POST['APP_DOC_UID']) != '') {
//Update
echo '[update]'; echo '[update]';
$aFields['APP_DOC_UID'] = $_POST['APP_DOC_UID']; $aFields['APP_DOC_UID'] = $_POST['APP_DOC_UID'];
$aFields['DOC_VERSION'] = $_POST['DOC_VERSION']; $aFields['DOC_VERSION'] = $_POST['DOC_VERSION'];
@@ -68,17 +72,16 @@ if (isset($_FILES) && $_FILES['ATTACH_FILE']['error'] == 0) {
$aFields['DOC_UID'] = $_POST['DOC_UID']; $aFields['DOC_UID'] = $_POST['DOC_UID'];
if (isset($_POST['APP_DOC_TYPE'])) if (isset($_POST['APP_DOC_TYPE']))
$aFields['APP_DOC_TYPE']= $_POST['APP_DOC_TYPE']; $aFields['APP_DOC_TYPE']= $_POST['APP_DOC_TYPE'];
$aFields['APP_DOC_CREATE_DATE'] = date('Y-m-d H:i:s');
$aFields['APP_DOC_CREATE_DATE'] = date('Y-m-d H:i:s');
$aFields['APP_DOC_COMMENT'] = isset($_POST['COMMENT'])? $_POST['COMMENT'] : ''; $aFields['APP_DOC_COMMENT'] = isset($_POST['COMMENT'])? $_POST['COMMENT'] : '';
$aFields['APP_DOC_TITLE'] = isset($_POST['TITLE'])? $_POST['TITLE'] : ''; $aFields['APP_DOC_TITLE'] = isset($_POST['TITLE'])? $_POST['TITLE'] : '';
//$aFields['FOLDER_UID'] = $folderId, //$aFields['FOLDER_UID'] = $folderId,
//$aFields['APP_DOC_TAGS']= $fileTags //$aFields['APP_DOC_TAGS']= $fileTags
}
$oAppDocument->create($aFields); else {
//New record
} else { //new record
$aFields = array( $aFields = array(
'APP_UID' => $_POST['APPLICATION'], 'APP_UID' => $_POST['APPLICATION'],
'DEL_INDEX' => $_POST['INDEX'], 'DEL_INDEX' => $_POST['INDEX'],
@@ -92,35 +95,62 @@ if (isset($_FILES) && $_FILES['ATTACH_FILE']['error'] == 0) {
'FOLDER_UID' => $folderId, 'FOLDER_UID' => $folderId,
'APP_DOC_TAGS' => $fileTags 'APP_DOC_TAGS' => $fileTags
); );
}
$oAppDocument->create($aFields); $oAppDocument->create($aFields);
}
$sAppUid = $oAppDocument->getAppUid(); $sAppUid = $oAppDocument->getAppUid();
$sAppDocUid = $oAppDocument->getAppDocUid(); $sAppDocUid = $oAppDocument->getAppDocUid();
$iDocVersion = $oAppDocument->getDocVersion(); $iDocVersion = $oAppDocument->getDocVersion();
$info = pathinfo($oAppDocument->getAppDocFilename()); $info = pathinfo($oAppDocument->getAppDocFilename());
$ext = (isset($info['extension']) ? $info['extension'] : ''); $ext = isset($info['extension'])? $info['extension'] : '';
//save the file //Save the file
echo $sPathName = PATH_DOCUMENT . $sAppUid . PATH_SEP; echo $sPathName = PATH_DOCUMENT . $sAppUid . PATH_SEP;
echo $sFileName = $sAppDocUid . '_' . $iDocVersion . '.' . $ext; echo $sFileName = $sAppDocUid . '_' . $iDocVersion . '.' . $ext;
print G::uploadFile($_FILES['ATTACH_FILE']['tmp_name'], $sPathName, $sFileName); print G::uploadFile($_FILES['ATTACH_FILE']['tmp_name'], $sPathName, $sFileName);
print("* The file {$_FILES['ATTACH_FILE']['name']} was uploaded successfully in case {$sAppUid} as input document..\n"); print("* The file {$_FILES['ATTACH_FILE']['name']} was uploaded successfully in case {$sAppUid} as input document..\n");
//Get current Application Fields
$application = new Application();
$appFields = $application->Load($_POST['APPLICATION']);
$appFields = unserialize($appFields['APP_DATA']);
$_SESSION['APPLICATION'] = $appFields['APPLICATION'];
$_SESSION['PROCESS'] = $appFields['PROCESS'];
$_SESSION['TASK'] = $appFields['TASK'];
$_SESSION['INDEX'] = $appFields['INDEX'];
$_SESSION['USER_LOGGED'] = $appFields['USER_LOGGED']; //$_POST['USR_UID']
//$_SESSION['USR_USERNAME'] = $appFields['USR_USERNAME'];
//$_SESSION['STEP_POSITION'] = 0;
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document //Plugin Hook PM_UPLOAD_DOCUMENT for upload document
$oPluginRegistry = &PMPluginRegistry::getSingleton(); $oPluginRegistry = &PMPluginRegistry::getSingleton();
if ($oPluginRegistry->existsTrigger(PM_UPLOAD_DOCUMENT) && class_exists('uploadDocumentData')) {
$oData['APP_UID'] = $_POST['APPLICATION'];
$documentData = new uploadDocumentData($_POST['APPLICATION'], $_POST['USR_UID'], $sPathName . $sFileName, $aFields['APP_DOC_FILENAME'], $sAppDocUid);
$oPluginRegistry->executeTriggers(PM_UPLOAD_DOCUMENT, $documentData); if ($oPluginRegistry->existsTrigger(PM_UPLOAD_DOCUMENT) && class_exists("uploadDocumentData")) {
$triggerDetail = $oPluginRegistry->getTriggerInfo(PM_UPLOAD_DOCUMENT);
$documentData = new uploadDocumentData($_POST["APPLICATION"], $_POST["USR_UID"], $sPathName . $sFileName, $aFields["APP_DOC_FILENAME"], $sAppDocUid, $iDocVersion);
$uploadReturn = $oPluginRegistry->executeTriggers(PM_UPLOAD_DOCUMENT, $documentData);
if ($uploadReturn) {
$aFields["APP_DOC_PLUGIN"] = $triggerDetail->sNamespace;
if (!isset($aFields["APP_DOC_UID"])) {
$aFields["APP_DOC_UID"] = $sAppDocUid;
}
if (!isset($aFields["DOC_VERSION"])) {
$aFields["DOC_VERSION"] = $iDocVersion;
}
$oAppDocument->update($aFields);
unlink($sPathName . $sFileName); unlink($sPathName . $sFileName);
} }
/*end plugin*/ }
} catch ( Exception $e) { //End plugin
}
catch (Exception $e) {
print($e->getMessage()); print($e->getMessage());
} }
} }

View File

@@ -511,5 +511,58 @@ switch($_POST['action'])
} }
print(G::json_encode($rowsCasesMenu)); print(G::json_encode($rowsCasesMenu));
break; break;
case 'testPassword';
require_once 'classes/model/UsersProperties.php';
$oUserProperty = new UsersProperties();
$aFields = array();
$color = '';
$img = '';
$dateNow = date('Y-m-d H:i:s');
$aErrors = $oUserProperty->validatePassword($_POST['PASSWORD_TEXT'], $dateNow, $dateNow);
if (!empty($aErrors)) {
$img = '/images/delete.png';
$color = 'red';
if (!defined('NO_DISPLAY_USERNAME')) {
define('NO_DISPLAY_USERNAME', 1);
}
$aFields = array();
$aFields['DESCRIPTION'] = G::LoadTranslation('ID_POLICY_ALERT').':<br />';
foreach ($aErrors as $sError) {
switch ($sError) {
case 'ID_PPP_MINIMUM_LENGTH':
$aFields['DESCRIPTION'] .= ' - ' . G::LoadTranslation($sError).': ' . PPP_MINIMUM_LENGTH . '<br />';
$aFields[substr($sError, 3)] = PPP_MINIMUM_LENGTH;
break;
case 'ID_PPP_MAXIMUM_LENGTH':
$aFields['DESCRIPTION'] .= ' - ' . G::LoadTranslation($sError).': ' . PPP_MAXIMUM_LENGTH . '<br />';
$aFields[substr($sError, 3)] = PPP_MAXIMUM_LENGTH;
break;
case 'ID_PPP_EXPIRATION_IN':
$aFields['DESCRIPTION'] .= ' - ' . G::LoadTranslation($sError).' ' . PPP_EXPIRATION_IN . ' ' . G::LoadTranslation('ID_DAYS') . '<br />';
$aFields[substr($sError, 3)] = PPP_EXPIRATION_IN;
break;
default:
$aFields['DESCRIPTION'] .= ' - ' . G::LoadTranslation($sError).'<br />';
$aFields[substr($sError, 3)] = 1;
break;
}
}
$aFields['DESCRIPTION'] .= G::LoadTranslation('ID_PLEASE_CHANGE_PASSWORD_POLICY') . '</span>';
$aFields['STATUS'] = false;
} else {
$color = 'green';
$img = '/images/dialog-ok-apply.png';
$aFields['DESCRIPTION'] .= G::LoadTranslation('ID_PASSWORD_COMPLIES_POLICIES') . '</span>';
$aFields['STATUS'] = true;
}
$span = '<span style="color: ' . $color . '; font: 9px tahoma,arial,helvetica,sans-serif;">';
$gif = '<img width="13" height="13" border="0" src="' . $img . '">';
$aFields['DESCRIPTION'] = $span . $gif . $aFields['DESCRIPTION'];
print(G::json_encode($aFields));
break;
} }

View File

@@ -162,9 +162,9 @@ class SkinEngine
switch ($e->getCode()) { switch ($e->getCode()) {
case SE_LAYOUT_NOT_FOUND: case SE_LAYOUT_NOT_FOUND:
$data['exception_type'] = 'Skin Engine Exception'; $data['exception_type'] = G::LoadTranslation('ID_SKIN_EXCEPTION');
$data['exception_title'] = 'Layout not Found'; $data['exception_title'] = G::LoadTranslation('ID_SKIN_LAYOUT_NOT_FOUND');
$data['exception_message'] = 'You\'re trying to get a resource from a incorrent skin, please verify you url.'; $data['exception_message'] = G::LoadTranslation('ID_SKIN_INCORRECT_VERIFY_URL');
$data['exception_list'] = array(); $data['exception_list'] = array();
if (substr($this->mainSkin, 0, 2) != 'ux') { if (substr($this->mainSkin, 0, 2) != 'ux') {
$url = '../login/login'; $url = '../login/login';
@@ -175,7 +175,7 @@ class SkinEngine
$link = '<a href="'.$url.'">Try Now</a>'; $link = '<a href="'.$url.'">Try Now</a>';
$data['exception_notes'][] = ' The System can try redirect to correct url. ' . $link; $data['exception_notes'][] = G::LoadTranslation('ID_REDIRECT_URL'). $link;
G::renderTemplate(PATH_TPL . 'exception', $data); G::renderTemplate(PATH_TPL . 'exception', $data);
break; break;

View File

@@ -23,7 +23,7 @@
<table class="x-pm-headerbar"> <table class="x-pm-headerbar">
<tr> <tr>
<td width="50%" valign="middle"> <td width="50%" valign="middle">
<img src="{$logo_company}" width="180" height="24"/> <img src="{$logo_company}" width="250" height="40"/>
</td> </td>
<td align="right" valign="top"> <td align="right" valign="top">
@@ -38,7 +38,11 @@
</td> </td>
<td height="12" valign="middle" align="right" valign="top"> <td height="12" valign="middle" align="right" valign="top">
<a href="#" id="options-tool" class="options-tool"> <a href="#" id="options-tool" class="options-tool">
{$userfullname}<br /> {$userfullname}
<span>
<img src="/images/classic/roll.static.gif" width="10px" headerRightSection="10px"/>
</span>
<br />
<span style="font-size:9px">{$rolename}</span> <span style="font-size:9px">{$rolename}</span>
</a> </a>
</td> </td>

View File

@@ -700,7 +700,6 @@ Ext.onReady( function() {
new Ext.Viewport({ new Ext.Viewport({
autoScroll : true,
layout: 'fit', layout: 'fit',
items: [ items: [
{ {

View File

@@ -8,19 +8,50 @@ Ext.onReady(function(){
listeners: { listeners: {
check: function(EnableEmailNotifications, checked) { check: function(EnableEmailNotifications, checked) {
if(checked) { if(checked) {
loadfields();
combo.setVisible(true); combo.setVisible(true);
combo.getEl().up('.x-form-item').setDisplayed(true); // show label combo.getEl().up('.x-form-item').setDisplayed(true); // show label
if (Ext.getCmp('EmailEngine').getValue()== 'MAIL') {
Ext.getCmp('Server').setVisible(false);
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(false); // hide label
Ext.getCmp('Port').setVisible(false);
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(false);
Ext.getCmp('RequireAuthentication').setVisible(false);
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(false);
Ext.getCmp('AccountFrom').setVisible(false);
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
Ext.getCmp('Password').setVisible(false);
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
Ext.getCmp('UseSecureConnection').setVisible(false);
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
} else {
Ext.getCmp('Server').setVisible(true); Ext.getCmp('Server').setVisible(true);
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(true); // show label Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(true); // hide label
Ext.getCmp('Port').setVisible(true); Ext.getCmp('Port').setVisible(true);
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(true); Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(true);
Ext.getCmp('RequireAuthentication').setVisible(true); Ext.getCmp('RequireAuthentication').setVisible(true);
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(true); Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(true);
Ext.getCmp('AccountFrom').setVisible(true); Ext.getCmp('AccountFrom').setVisible(true);
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(true); Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(true);
if (Ext.getCmp('RequireAuthentication').getValue() === true)
{
Ext.getCmp('Password').setVisible(true);
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(true);
} else {
Ext.getCmp('Password').setVisible(false); Ext.getCmp('Password').setVisible(false);
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false); Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
}
if(!Ext.getCmp('UseSecureConnection').getValue()) {
Ext.getCmp('UseSecureConnection').setValue('No');
}
Ext.getCmp('UseSecureConnection').setVisible(true);
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(true);
}
Ext.getCmp('SendaTestMail').setVisible(true); Ext.getCmp('SendaTestMail').setVisible(true);
Ext.getCmp('SendaTestMail').getEl().up('.x-form-item').setDisplayed(true); Ext.getCmp('SendaTestMail').getEl().up('.x-form-item').setDisplayed(true);
@@ -34,12 +65,6 @@ Ext.onReady(function(){
Ext.getCmp('eMailto').setValue(' '); Ext.getCmp('eMailto').setValue(' ');
} }
if(!Ext.getCmp('UseSecureConnection').getValue()) {
Ext.getCmp('UseSecureConnection').setValue('No');
}
Ext.getCmp('UseSecureConnection').setVisible(true);
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(true);
} }
else { else {
combo.setVisible(false); combo.setVisible(false);
@@ -98,6 +123,7 @@ Ext.onReady(function(){
displayField:'EmailEngine', displayField:'EmailEngine',
mode: 'local', mode: 'local',
triggerAction: 'all', triggerAction: 'all',
value: 'PHPMAILER',
disabled : true, disabled : true,
listeners: { listeners: {
select: function(combo, value) { select: function(combo, value) {
@@ -112,8 +138,10 @@ Ext.onReady(function(){
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false); Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
Ext.getCmp('Password').setVisible(false); Ext.getCmp('Password').setVisible(false);
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false); Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
}
else { Ext.getCmp('UseSecureConnection').setVisible(false);
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
} else {
Ext.getCmp('Server').setVisible(true); Ext.getCmp('Server').setVisible(true);
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(true); // hide label Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(true); // hide label
Ext.getCmp('Port').setVisible(true); Ext.getCmp('Port').setVisible(true);
@@ -122,9 +150,23 @@ Ext.onReady(function(){
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(true); Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(true);
Ext.getCmp('AccountFrom').setVisible(true); Ext.getCmp('AccountFrom').setVisible(true);
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(true); Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(true);
if (Ext.getCmp('RequireAuthentication').getValue() === true)
{
Ext.getCmp('Password').setVisible(true);
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(true);
} else {
Ext.getCmp('Password').setVisible(false); Ext.getCmp('Password').setVisible(false);
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false); Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
} }
if(!Ext.getCmp('UseSecureConnection').getValue()) {
Ext.getCmp('UseSecureConnection').setValue('No');
}
Ext.getCmp('UseSecureConnection').setVisible(true);
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(true);
}
} }
} }
}); });
@@ -216,8 +258,7 @@ Ext.onReady(function(){
if (this.checked) { if (this.checked) {
Ext.getCmp('Password').setVisible(true); Ext.getCmp('Password').setVisible(true);
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(true); Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(true);
} } else {
else {
Ext.getCmp('Password').setVisible(false); Ext.getCmp('Password').setVisible(false);
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false); Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
Ext.getCmp('Password').setValue(''); Ext.getCmp('Password').setValue('');
@@ -322,12 +363,62 @@ Ext.onReady(function(){
if (res.success) { if (res.success) {
Ext.getCmp('EnableEmailNotifications').setValue(res.data.MESS_ENABLED); Ext.getCmp('EnableEmailNotifications').setValue(res.data.MESS_ENABLED);
Ext.getCmp('EmailEngine').setValue(res.data.MESS_ENGINE); Ext.getCmp('EmailEngine').setValue(res.data.MESS_ENGINE);
if (Ext.getCmp('EmailEngine').getValue()== 'MAIL') {
Ext.getCmp('Server').setVisible(false);
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(false); // hide label
Ext.getCmp('Port').setVisible(false);
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(false);
Ext.getCmp('RequireAuthentication').setVisible(false);
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(false);
Ext.getCmp('AccountFrom').setVisible(false);
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
Ext.getCmp('Password').setVisible(false);
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
Ext.getCmp('UseSecureConnection').setVisible(false);
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
} else {
Ext.getCmp('Server').setVisible(true);
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(true); // hide label
Ext.getCmp('Port').setVisible(true);
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(true);
Ext.getCmp('RequireAuthentication').setVisible(true);
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(true);
Ext.getCmp('AccountFrom').setVisible(true);
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(true);
if (Ext.getCmp('RequireAuthentication').getValue() === true)
{
Ext.getCmp('Password').setVisible(true);
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(true);
} else {
Ext.getCmp('Password').setVisible(false);
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
}
if(!Ext.getCmp('UseSecureConnection').getValue()) {
Ext.getCmp('UseSecureConnection').setValue('No');
}
Ext.getCmp('UseSecureConnection').setVisible(true);
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(true);
Ext.getCmp('Server').setValue(res.data.MESS_SERVER); Ext.getCmp('Server').setValue(res.data.MESS_SERVER);
Ext.getCmp('Port').setValue(res.data.MESS_PORT); Ext.getCmp('Port').setValue(res.data.MESS_PORT);
Ext.getCmp('RequireAuthentication').setValue(res.data.MESS_RAUTH); Ext.getCmp('RequireAuthentication').setValue(res.data.MESS_RAUTH);
Ext.getCmp('AccountFrom').setValue(res.data.MESS_ACCOUNT); Ext.getCmp('AccountFrom').setValue(res.data.MESS_ACCOUNT);
Ext.getCmp('Password').setValue(res.data.MESS_PASSWORD); Ext.getCmp('Password').setValue(res.data.MESS_PASSWORD);
Ext.getCmp('PasswordHide').setValue(Ext.getCmp('Password').getValue()); Ext.getCmp('PasswordHide').setValue(Ext.getCmp('Password').getValue());
if (res.data.SMTPSecure == 'none') {
Ext.getCmp('UseSecureConnection').setValue('No');
}
else {
Ext.getCmp('UseSecureConnection').setValue(res.data.SMTPSecure);
}
}
Ext.getCmp('SendaTestMail').setValue(res.data.MESS_TRY_SEND_INMEDIATLY); Ext.getCmp('SendaTestMail').setValue(res.data.MESS_TRY_SEND_INMEDIATLY);
if(!res.data.MAIL_TO) { if(!res.data.MAIL_TO) {
@@ -336,13 +427,6 @@ Ext.onReady(function(){
else { else {
Ext.getCmp('eMailto').setValue(res.data.MAIL_TO); Ext.getCmp('eMailto').setValue(res.data.MAIL_TO);
} }
if (res.data.SMTPSecure == 'none') {
Ext.getCmp('UseSecureConnection').setValue('No');
}
else {
Ext.getCmp('UseSecureConnection').setValue(res.data.SMTPSecure);
}
} }
} }
}); });
@@ -496,9 +580,9 @@ var testConnForm = new Ext.FormPanel({
var testEmailWindow = new Ext.Window({ var testEmailWindow = new Ext.Window({
width: 470, width: 470,
closable:false, closable:false,
plain: true,
autoHeight: true, autoHeight: true,
layout: 'fit', layout: 'fit',
plain: true,
y: 82, y: 82,
items: testConnForm items: testConnForm
}); });
@@ -546,6 +630,67 @@ var UnEditMethod = function()
} }
var testMethod = function() var testMethod = function()
{ {
var typeTest = Ext.getCmp('EmailEngine').getValue();
switch (typeTest)
{
case 'MAIL':
Ext.MessageBox.show({
msg: _('ID_LOADING'),
progressText: 'Saving...',
width:300,
wait:true,
waitConfig: {interval:200},
animEl: 'mb7'
});
params = {
typeTest : 'MAIL',
request : 'mailTestMail_Show',
mail_to : Ext.getCmp('eMailto').getValue(),
send_test_mail : 'yes'
};
Ext.Ajax.request({
url: '../adminProxy/testConnection',
method:'POST',
params: params,
waitMsg: _('ID_LOADING'),
success: function(r,o) {
Ext.MessageBox.hide();
var resp = Ext.util.JSON.decode(r.responseText);
if (resp.sendMail === true) {
Ext.MessageBox.show({
title: 'Correct test mail',
msg: resp.msg,
buttons: Ext.MessageBox.OK,
animEl: 'mb9',
icon: Ext.MessageBox.INFO
});
Ext.getCmp('SaveChanges').enable();
} else {
Ext.MessageBox.show({
title: 'Error',
msg: resp.msg,
buttons: Ext.MessageBox.OK,
animEl: 'mb9',
icon: Ext.MessageBox.ERROR
});
Ext.getCmp('SaveChanges').disable();
}
},
failure: function () {
Ext.MessageBox.show({
title: 'Error',
msg: 'Error in connection',
buttons: Ext.MessageBox.OK,
animEl: 'mb9',
icon: Ext.MessageBox.ERROR
});
Ext.getCmp('SaveChanges').disable();
}
});
break;
case 'PHPMAILER':
if((Ext.getCmp('Port').getValue()==null)||(Ext.getCmp('Port').getValue()=='')) { if((Ext.getCmp('Port').getValue()==null)||(Ext.getCmp('Port').getValue()=='')) {
Ext.getCmp('Port').setValue('25'); Ext.getCmp('Port').setValue('25');
} }
@@ -564,6 +709,7 @@ var testMethod = function()
var create=true; var create=true;
params = { params = {
typeTest : 'PHPMAILER',
server : Ext.getCmp('Server').getValue(), server : Ext.getCmp('Server').getValue(),
user : Ext.getCmp('AccountFrom').getValue(), user : Ext.getCmp('AccountFrom').getValue(),
passwd : Ext.getCmp('Password').getValue(), passwd : Ext.getCmp('Password').getValue(),
@@ -596,12 +742,15 @@ var testMethod = function()
Ext.getCmp('done').enable(); Ext.getCmp('done').enable();
Ext.getCmp('SaveChanges').disable(); Ext.getCmp('SaveChanges').disable();
Ext.getCmp('EMailFields').disable();
testEmailWindow.show(); testEmailWindow.show();
Ext.getCmp('EMailFields').enable();
execTest(1); execTest(1);
break;
return true;
} }
return true;
};
function execTest(step) { function execTest(step) {

View File

@@ -122,13 +122,19 @@ Ext.onReady(function() {
name: 'processName', name: 'processName',
allowBlank:false, allowBlank:false,
value: '', value: '',
labelStyle: 'font-weight:bold;', labelStyle : 'font-size:11px;',
style : {
fontSize:'11px'
},
id:"processName" id:"processName"
}, },
{ {
xtype: 'compositefield', xtype: 'compositefield',
fieldLabel: TRANSLATIONS.ID_TASK, fieldLabel: TRANSLATIONS.ID_TASK,
labelStyle: 'font-weight:bold;', labelStyle : 'font-size:11px;',
style : {
fontSize:'11px'
},
items: [ items: [
{ {
xtype : 'button', xtype : 'button',
@@ -160,21 +166,30 @@ Ext.onReady(function() {
name: 'processDescription', name: 'processDescription',
value: '', value: '',
readOnly: true, readOnly: true,
labelStyle: 'font-weight:bold;', labelStyle : 'font-size:11px;',
style : {
fontSize:'11px'
},
id:"processDescription" id:"processDescription"
},{ },{
fieldLabel: TRANSLATIONS.ID_CATEGORY, fieldLabel: TRANSLATIONS.ID_CATEGORY,
name: 'processCategory', name: 'processCategory',
value: '', value: '',
readOnly: true, readOnly: true,
labelStyle: 'font-weight:bold;', labelStyle : 'font-size:11px;',
style : {
fontSize:'11px'
},
id:"processCategory" id:"processCategory"
}, },
{ {
xtype: 'grid', xtype: 'grid',
fieldLabel: ' ', fieldLabel: ' ',
labelSeparator : '', labelSeparator : '',
labelStyle: 'font-color:white;', labelStyle : 'font-size:11px;',
style : {
fontSize:'11px'
},
ds: processNumbers, ds: processNumbers,
cm: new Ext.grid.ColumnModel([ cm: new Ext.grid.ColumnModel([
{id:'inbox',header: TRANSLATIONS.ID_INBOX, width:70, sortable: false, locked:true, dataIndex: 'CASES_COUNT_TO_DO'}, {id:'inbox',header: TRANSLATIONS.ID_INBOX, width:70, sortable: false, locked:true, dataIndex: 'CASES_COUNT_TO_DO'},
@@ -190,7 +205,10 @@ Ext.onReady(function() {
{ {
fieldLabel: TRANSLATIONS.ID_CALENDAR, fieldLabel: TRANSLATIONS.ID_CALENDAR,
name: 'calendarName', name: 'calendarName',
labelStyle: 'font-weight:bold;', labelStyle : 'font-size:11px;',
style : {
fontSize:'11px'
},
id:"calendarName" id:"calendarName"
}, },
{ {
@@ -200,7 +218,10 @@ Ext.onReady(function() {
disabled: true, disabled: true,
readOnly: true, readOnly: true,
disabledClass:"", disabledClass:"",
labelStyle: 'font-weight:bold', labelStyle : 'font-size:11px;',
style : {
fontSize:'11px'
},
id:"calendarWorkDays", id:"calendarWorkDays",
columns: 7, columns: 7,
items: [ items: [
@@ -217,7 +238,10 @@ Ext.onReady(function() {
xtype:'checkbox', xtype:'checkbox',
fieldLabel: TRANSLATIONS.ID_DEBUG_MODE, fieldLabel: TRANSLATIONS.ID_DEBUG_MODE,
name: 'processDebug', name: 'processDebug',
labelStyle: 'font-weight:bold;', labelStyle : 'font-size:11px;',
style : {
fontSize:'11px'
},
disabled: true, disabled: true,
readOnly: true, readOnly: true,
id:"processDebug", id:"processDebug",

View File

@@ -85,7 +85,7 @@ Ext.onReady(function(){
switch(data[i].id) { switch(data[i].id) {
case 'STEPS': case 'STEPS':
Ext.getCmp('casesStepTree').root.reload(); Ext.getCmp('casesStepTree').root.reload();
Ext.getCmp('stepsMenu').show(); Ext.getCmp('stepsMenu').enable();
break; break;
case 'NOTES': case 'NOTES':
Ext.getCmp('caseNotes').show(); Ext.getCmp('caseNotes').show();
@@ -137,6 +137,10 @@ Ext.onReady(function(){
tb.add(menu); tb.add(menu);
} }
} }
if (Ext.getCmp('stepsMenu').disabled === true) {
Ext.getCmp('stepsMenu').hide();
}
}, },
failure: function ( result, request) { failure: function ( result, request) {
Ext.MessageBox.alert('Failed', result.responseText); Ext.MessageBox.alert('Failed', result.responseText);
@@ -266,7 +270,8 @@ Ext.onReady(function(){
text:_('ID_SHOW_HIDE_CASES_STEPS') text:_('ID_SHOW_HIDE_CASES_STEPS')
}, },
iconCls: 'ICON_STEPS', iconCls: 'ICON_STEPS',
toggleHandler: togglePreview toggleHandler: togglePreview,
disabled: true
}, { }, {
id: 'informationMenu', id: 'informationMenu',
text: _('ID_INFORMATION'), text: _('ID_INFORMATION'),
@@ -302,7 +307,7 @@ Ext.onReady(function(){
}); });
Ext.getCmp('stepsMenu').hide(); // Ext.getCmp('stepsMenu').hide();
Ext.getCmp('caseNotes').hide(); Ext.getCmp('caseNotes').hide();
Ext.getCmp('informationMenu').hide(); Ext.getCmp('informationMenu').hide();
Ext.getCmp('actionMenu').hide(); Ext.getCmp('actionMenu').hide();

View File

@@ -74,6 +74,12 @@
//echo $hidden_fields; //echo $hidden_fields;
$hidden_fields_list = explode(',', $hidden_fields); $hidden_fields_list = explode(',', $hidden_fields);
unset($elements[$node_name]); unset($elements[$node_name]);
?>
<script>
parent.jsMeta = "<? echo $boot_strap['__ATTRIBUTES__']['meta'] ?>";
</script>
<?php
} }
} }
?> ?>
@@ -112,7 +118,7 @@
<tr> <tr>
<td width="7%"> <td width="7%">
<?php if($node['__ATTRIBUTES__']['type'] != 'javascript' && $dynaformType != 'grid') {?> <?php if($node['__ATTRIBUTES__']['type'] != 'javascript' && $dynaformType != 'grid') {?>
<input id="chk@<?php echo $node_name?>" type="checkbox" onclick="fieldsHandlerSaveHidden()" <?php echo $checked?> /> <input id="chk@<?php echo $node_name?>" type="checkbox" onclick="parent.jsMeta = fieldsHandlerSaveHidden();" <?php echo $checked?> />
<?php } else {?> <?php } else {?>
&nbsp; &nbsp;
<?php }?> <?php }?>

View File

@@ -86,29 +86,37 @@
<!-- <a href="" title="_title / Home" accesskey="1" id="logo">_title</a> --> <!-- <a href="" title="_title / Home" accesskey="1" id="logo">_title</a> -->
<ul class="nav primary-nav"> <ul class="nav primary-nav">
<!--
<li class="account"> <li class="account">
<a class="menu user-actions active" href="#" onclick="redirect('home/appList?t=todo');" title="My Inbox"> <a class="menu user-actions active" href="#" onclick="redirect('home/appList?t=todo');" title="My Inbox">
<img alt="" src="/images/simplified/in-set-grey.png" id="inboxOp" /> <img alt="" src="/images/simplified/in-set-grey.png" id="inboxOp" />
-->
<!-- <span class="menu-label screen-name">new cases</span> --> <!-- <span class="menu-label screen-name">new cases</span> -->
<!--
</a> </a>
</li> </li>
-->
{if $canStartCase neq false} {if count($arrayMnuOption) > 0}
{foreach from=$arrayMnuOption key=index item=option}
<li class="account"> <li class="account">
<a class="menu user-actions" href="#" onclick="redirect('home/appList?t=draft');" title="My Drafts"> <a class="menu user-actions" href="javascript:;" onclick="redirect('{$option.url}');" title="{$option.label}">
<img alt="" src="/images/simplified/folder-grey.png" /> <img src="{$option.icon}" alt="" />
</a> </a>
</li> </li>
{/foreach}
{/if}
{if $canStartCase neq false && count($mnuNewCase) > 0}
<li class="account"> <li class="account">
<a class="menu user-actions" href="#" title="New Case" id="_new"> <a class="menu user-actions" href="javascript:;" title="{$mnuNewCase.label}" id="_new">
<img alt="" src="/images/simplified/plus-set-grey.png"/> <img src="{$mnuNewCase.icon}" alt="" />
</a> </a>
<ul class="menu-dropdown" style="width: 360px"> <ul class="menu-dropdown" style="width: 360px">
{foreach from=$processList key=id item=proc} {foreach from=$processList key=id item=proc}
<li> <li>
<a href="#" onclick="appStart('{$proc.uid}', '{$proc.value}')" accesskey="s" title="" id="settings_link">{$proc.value}</a> <a href="javascript:;" onclick="appStart('{$proc.uid}', '{$proc.value}')" accesskey="s" title="" id="settings_link">{$proc.value}</a>
</li> </li>
{/foreach} {/foreach}
</ul> </ul>
@@ -118,7 +126,7 @@
<ul class="nav secondary-nav"> <ul class="nav secondary-nav">
<li class="account"> <li class="account">
<a class="menu user-photo" href="#"> <a class="menu user-photo" href="javascript:;">
<img alt="user_avatar_mini" height="24" src="users/users_ViewPhotoGrid?pUID={$usrUid}" width="24" /> <img alt="user_avatar_mini" height="24" src="users/users_ViewPhotoGrid?pUID={$usrUid}" width="24" />
<span class="menu-label screen-name">{$userName}</span> <span class="menu-label screen-name">{$userName}</span>
</a> </a>

View File

@@ -43,21 +43,7 @@
function setCurrent(id) function setCurrent(id)
{ {
fireEvent(document.getElementById(id), 'click'); $('#' + id).trigger('click');
}
function fireEvent(element,event){
if (document.createEventObject){
// dispatch for IE
var evt = document.createEventObject();
return element.fireEvent('on'+event,evt)
}
else{
// dispatch for firefox + others
var evt = document.createEvent("HTMLEvents");
evt.initEvent(event, true, true ); // event type,bubbling,cancelable
return !element.dispatchEvent(evt);
}
} }
</script> </script>
@@ -92,7 +78,6 @@
{literal} {literal}
<script type="text/javascript"> <script type="text/javascript">
console.log($(window).width());
$(document).ready(function() { $(document).ready(function() {
$('#breadcrumbs-1').xBreadcrumbs({ collapsible: ($(window).width() < 500 ? true : false)}); $('#breadcrumbs-1').xBreadcrumbs({ collapsible: ($(window).width() < 500 ? true : false)});
}); });

View File

@@ -511,7 +511,9 @@ Ext.onReady(function(){
listeners: { listeners: {
show: function() { show: function() {
setTimeout(function(){ setTimeout(function(){
wizard.onClientValidation(2, false); var iAgree = Ext.getCmp('agreeCheckbox').getValue();
wizard.onClientValidation(2, iAgree);
}, 100); }, 100);
} }
} }

View File

@@ -0,0 +1,144 @@
<!-- START BLOCK : headBlock -->
<table cellpadding="0" cellspacing="0" border="0"><tr><td>
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
<div class="pagedTableDefault">
<table id="pagedtable[{pagedTable_Id}]" name="pagedtable[{pagedTable_Name}]" border="0" cellspacing="0" cellpadding="0" class="Default">
<tr >
<td valign="top">
<div class='subtitle'>{title}</div>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<!-- START BLOCK : headerBlock -->
<tr><td class="headerContent">{content}</td></tr>
<!-- END BLOCK : headerBlock -->
</table>
<table id="table[{pagedTable_Id}]" name="table[{pagedTable_Name}]" cellspacing="0" cellpadding="0" width="100%" class="pagedTable">
<!-- END BLOCK : headBlock -->
<!-- START BLOCK : contentBlock -->
<script type="text/javascript">{pagedTable_JS}</script>
<tr>
<!-- START BLOCK : headers -->
<td class="pagedTableHeader"><img style="{displaySeparator}" src="/js/maborak/core/images/separatorTable.gif" /></td>
<td width="{width}" style="{align}" class="pagedTableHeader" >
<a href="{href}" onclick="{onclick}{onsort}">{header}</a>
</td>
<!-- END BLOCK : headers -->
</tr>
<!-- START BLOCK : row -->
<!-- START BLOCK : rowMaster -->
<tr class='{masterRowClass}' id="{masterRowName}">
<!-- START BLOCK : fieldMaster -->
<td class="pagedTableHeader1"><a href="#" ><img src="/images/minus.gif" onclick="toggleMasterDetailGroup('table[{pagedTable_Name}]','{masterRowName}',this);return false;" border="0"></a><b>{value1}</b></td><td class="pagedTableHeader1" {alignAttr}><b>{value}</b>&nbsp;</td>
<!-- END BLOCK : fieldMaster -->
</tr>
<!-- END BLOCK : rowMaster -->
<tr class='{class}' onmouseover="setRowClass(this, 'RowPointer' )" onmouseout="setRowClass(this, '{class}')" name="{rowName}" id="{rowName}">
<!-- START BLOCK : field -->
<td{classAttr}></td><td{classAttr}{alignAttr}>{value}</td>
<!-- END BLOCK : field -->
</tr>
<!-- END BLOCK : row -->
<!-- START BLOCK : rowTag -->
<!-- END BLOCK : rowTag -->
<!-- START BLOCK : norecords -->
<tr class='Row2'>
<td nowrap colspan="{columnCount}" align='center' >&nbsp;
{noRecordsFound}<br>&nbsp;
</td>
</tr>
<!-- END BLOCK : norecords -->
<!-- START BLOCK : bottomFooter -->
<tr>
<td nowrap colspan="{columnCount}">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="pagedTableFooter">
<td width="110px" style="{indexStyle}">
{labels:ID_ROWS}&nbsp;{firstRow}-{lastRow}/{totalRows}&nbsp;
</td>
<!--<td style="text-align:center;{fastSearchStyle}"><!--{labels:ID_SEARCH}
<input type="text" class="FormField" onkeypress="if (event.keyCode===13){pagedTableId}.doFastSearch(this.value);if (event.keyCode===13)return false;" value="{fastSearchValue}" onfocus="this.select();" size="10" style="{fastSearchStyle}"/>
</td>-->
<td style="text-align:center;">
{first}&nbsp;{prev}&nbsp;{next}&nbsp;{last}
</td>
<td width="60px" style="text-align:right;padding-right:8px;{indexStyle}">{labels:ID_PAGE}&nbsp;{currentPage}/{totalPages}</td>
</tr>
</table>
</td>
</tr>
<!-- END BLOCK : bottomFooter -->
<!-- END BLOCK : contentBlock -->
<!-- START BLOCK : closeBlock -->
</table>
</td>
</tr>
</table>
</div>
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
</td></tr></table>
<!-- END BLOCK : closeBlock -->
<!-- START IGNORE -->
<script type="text/javascript">
if (typeof(document.getElementById("form[SelectAll]")) != undefined) {
document.getElementById("form[SelectAll]").innerHTML = '[SELECT-ALL]';
}
function toggleMasterDetailGroup(tablename,groupName,imgicon){
alert("ingresa");
groupNameArray=groupName.split(",");
table=getElementByName(tablename);
var rows = table.getElementsByTagName('tr');
for(i=0;i<rows.length;i++){
if(rows[i].id!=""){
currentRowArray=rows[i].id.split(",");
sw=false;
//alert(groupNameArray);
//alert(currentRowArray);
tempVar=currentRowArray[0].split("_MD_");
if(tempVar[0]==""){
if(currentRowArray.length>groupNameArray.length){
currentRowArray[0]=tempVar[1];
}
}
for(j=0;j<groupNameArray.length;j++){
if(currentRowArray[j]==groupNameArray[j]){
sw=true;
}else{
sw=false;
}
}
//alert(sw);
if(sw){
if (rows[i].style.display == '') {
rows[i].style.display = 'none';
imgicon.src="/images/plus_red.gif";
}else{
rows[i].style.display = '';
imgicon.src="/images/minus.gif";
}
}
}
}
}
</script>
<!-- END IGNORE -->

View File

@@ -30,9 +30,21 @@
if ($result->status_code == 0) { if ($result->status_code == 0) {
$caseId = $result->caseId; $caseId = $result->caseId;
$caseNr = $result->caseNumber; $caseNr = $result->caseNumber;
{USR_VAR} {USR_VAR}
#save files if ($USR_UID == -1) {
G::LoadClass("sessions");
global $sessionId;
$sessions = new Sessions();
$session = $sessions->getSessionUser($sessionId);
$USR_UID = $session["USR_UID"];
}
//Save files
if ( isset($_FILES['form']) ) { if ( isset($_FILES['form']) ) {
foreach ($_FILES['form']['name'] as $sFieldName => $vValue) { foreach ($_FILES['form']['name'] as $sFieldName => $vValue) {
if ( $_FILES['form']['error'][$sFieldName] == 0 ){ if ( $_FILES['form']['error'][$sFieldName] == 0 ){

View File

@@ -78,6 +78,7 @@ Ext.onReady(function(){
if(uploader.getForm().isValid()){ if(uploader.getForm().isValid()){
uploader.getForm().submit({ uploader.getForm().submit({
url: 'languages_Import', url: 'languages_Import',
waitTitle:'',
waitMsg: _('ID_UPLOADING_TRANSLATION_FILE'), waitMsg: _('ID_UPLOADING_TRANSLATION_FILE'),
success: function(o, resp){ success: function(o, resp){
w.close(); w.close();

View File

@@ -10,6 +10,7 @@ var infoMode;
var global = {}; var global = {};
var readMode; var readMode;
var canEdit = true; var canEdit = true;
var flagPoliciesPassword = false;
//var rendeToPage='document.body'; //var rendeToPage='document.body';
global.IC_UID = ''; global.IC_UID = '';
global.IS_UID = ''; global.IS_UID = '';
@@ -449,7 +450,63 @@ Ext.onReady(function() {
xtype : 'textfield', xtype : 'textfield',
inputType : 'password', inputType : 'password',
width : 260, width : 260,
allowBlank : allowBlackStatus allowBlank : allowBlackStatus,
listeners: {
blur : function(ob)
{
var spanAjax = '<span style="font: 9px tahoma,arial,helvetica,sans-serif;">';
var imageAjax = '<img width="13" height="13" border="0" src="/images/ajax-loader.gif">';
var labelAjax = _('ID_PASSWORD_TESTING');
Ext.getCmp('passwordReview').setText(spanAjax + imageAjax + labelAjax + '</span>', false);
Ext.getCmp('passwordReview').setVisible(true);
var passwordText = this.getValue();
Ext.Ajax.request({
url : 'usersAjax',
method:'POST',
params : {
'action' : 'testPassword',
'PASSWORD_TEXT' : passwordText
},
success: function(r,o){
var resp = Ext.util.JSON.decode(r.responseText);
if (resp.STATUS) {
flagPoliciesPassword = true;
} else {
flagPoliciesPassword = false;
}
Ext.getCmp('passwordReview').setText(resp.DESCRIPTION, false);
},
failure: function () {
Ext.MessageBox.show({
title: 'Error',
msg: 'Failed to store data',
buttons: Ext.MessageBox.OK,
animEl: 'mb9',
icon: Ext.MessageBox.ERROR
});
}
});
Ext.getCmp('passwordReview').setVisible(true);
if (Ext.getCmp('USR_CNF_PASS').getValue() != '') {
userExecuteEvent(document.getElementById('USR_CNF_PASS'), 'blur');
}
}
}
},
{
xtype: 'label',
fieldLabel: ' ',
id:'passwordReview',
width: 300,
labelSeparator: ''
}, },
{ {
id : 'USR_CNF_PASS', id : 'USR_CNF_PASS',
@@ -457,7 +514,32 @@ Ext.onReady(function() {
xtype : 'textfield', xtype : 'textfield',
inputType : 'password', inputType : 'password',
width : 260, width : 260,
allowBlank : allowBlackStatus allowBlank : allowBlackStatus,
listeners: {
blur : function(ob)
{
var passwordText = Ext.getCmp('USR_NEW_PASS').getValue();
var passwordConfirm = this.getValue();
if (passwordText != passwordConfirm) {
var spanErrorConfirm = '<span style="color: red; font: 9px tahoma,arial,helvetica,sans-serif;">';
var imageErrorConfirm = '<img width="13" height="13" border="0" src="/images/delete.png">';
var labelErrorConfirm = _('ID_NEW_PASS_SAME_OLD_PASS');
Ext.getCmp('passwordConfirm').setText(spanErrorConfirm + imageErrorConfirm + labelErrorConfirm + '</span>', false);
Ext.getCmp('passwordConfirm').setVisible(true);
} else {
Ext.getCmp('passwordConfirm').setVisible(false);
}
}
}
},
{
xtype: 'label',
fieldLabel: ' ',
id:'passwordConfirm',
width: 300,
labelSeparator: ''
} }
] ]
@@ -777,6 +859,14 @@ Ext.onReady(function() {
frmDetails.render(document.body); frmDetails.render(document.body);
} }
Ext.getCmp('passwordReview').setVisible(false);
Ext.getCmp('passwordConfirm').setVisible(false);
var spanAjax = '<span style="font: 9px tahoma,arial,helvetica,sans-serif;">';
var imageAjax = '<img width="13" height="13" border="0" src="/images/ajax-loader.gif">';
var labelAjax = _('ID_PASSWORD_TESTING');
Ext.getCmp('passwordReview').setText(spanAjax + imageAjax + labelAjax + '</span>', false);
}); });
function defineUserPanel() function defineUserPanel()
@@ -815,6 +905,10 @@ function editUser()
} }
function saveUser() function saveUser()
{ {
if (flagPoliciesPassword != true) {
Ext.Msg.alert( _('ID_ERROR'), Ext.getCmp('passwordReview').html);
return false;
}
var newPass = frmDetails.getForm().findField('USR_NEW_PASS').getValue(); var newPass = frmDetails.getForm().findField('USR_NEW_PASS').getValue();
var confPass = frmDetails.getForm().findField('USR_CNF_PASS').getValue(); var confPass = frmDetails.getForm().findField('USR_CNF_PASS').getValue();
@@ -1049,4 +1143,15 @@ function loadUserView()
} }
function userExecuteEvent (element,event) {
if ( document.createEventObject ) {
// IE
var evt = document.createEventObject();
return element.fireEvent('on'+event,evt)
} else {
// firefox + others
var evt = document.createEvent("HTMLEvents");
evt.initEvent(event, true, true ); // event type,bubbling,cancelable
return !element.dispatchEvent(evt);
}
}

View File

@@ -133,7 +133,9 @@
{elseif ($field->type==='date')} {elseif ($field->type==='date')}
myForm.aElements[i] = new G_Date(myForm, myForm.element.elements['form[{$name}]'],'{$name}'); myForm.aElements[i] = new G_Date(myForm, myForm.element.elements['form[{$name}]'],'{$name}');
myForm.aElements[i].setAttributes({$field->getAttributes()}); myForm.aElements[i].setAttributes({$field->getAttributes()});
myForm.aElements[i].mask = 'yyyy-mm-dd'; if (myForm.aElements[i].mask) {literal}{{/literal}
myForm.aElements[i].mask = dateSetMask(myForm.aElements[i].mask);
{literal}}{/literal}
{$field->attachEvents("myForm.aElements[i].element")} {$field->attachEvents("myForm.aElements[i].element")}
{elseif ($field->type==='hidden')} {elseif ($field->type==='hidden')}
myForm.aElements[i] = new G_Text(myForm, myForm.element.elements['form[{$name}]'],'{$name}'); myForm.aElements[i] = new G_Text(myForm, myForm.element.elements['form[{$name}]'],'{$name}');

View File

@@ -24,7 +24,4 @@
<PAGED_TABLE_ID type="private"/> <PAGED_TABLE_ID type="private"/>
<JS type="javascript">
getField('PAGED_TABLE_FAST_SEARCH').value = '';
</JS>
</dynaForm> </dynaForm>

View File

@@ -16,7 +16,4 @@
<PAGED_TABLE_ID type="private"/> <PAGED_TABLE_ID type="private"/>
<JS type="javascript">
getField('PAGED_TABLE_FAST_SEARCH').value = '';
</JS>
</dynaForm> </dynaForm>

View File

@@ -24,9 +24,6 @@
<tr> <tr>
<td valign='top'> <td valign='top'>
<table cellspacing="0" cellpadding="0" border="0" width="95%"> <table cellspacing="0" cellpadding="0" border="0" width="95%">
<tr>
<td align="left" valign="baseline">&nbsp; &nbsp; {$form.CheckboxSelectAll} <span id="AgeLabel"><span> </td>
</tr>
<tr> <tr>
<td align="center"> <td align="center">
<span id="spanUsers" /> <span id="spanUsers" />

View File

@@ -23,12 +23,7 @@
<en>Cancel</en> <en>Cancel</en>
</BTN_CANCEL> </BTN_CANCEL>
<CheckboxSelectAll type="Checkbox">
<en></en>
</CheckboxSelectAll>
<JS type="javascript"><![CDATA[ <JS type="javascript"><![CDATA[
getField('CheckboxSelectAll').style.visibility = 'hidden';
function disableEnterKey(e) function disableEnterKey(e)
{ {
@@ -52,54 +47,36 @@ function disableEnterKey(e)
} }
} }
getField('btnImport').style.visibility = 'hidden';
var searchUsers = function() { var searchUsers = function() {
var oRPC = new leimnud.module.rpc.xmlhttp({ var oRPC = new leimnud.module.rpc.xmlhttp({
url : 'authSources_Ajax', url : 'authSources_Ajax',
args: 'action=searchUsers&sUID=' + getField('AUTH_SOURCE_UID').value + '&sKeyword=' + getField('KEYWORD').value args : 'action=searchUsers&sUID=' + getField('AUTH_SOURCE_UID').value + "&sKeyword=" + getField('KEYWORD').value
}); });
oRPC.callback = function(rpc){ oRPC.callback = function(rpc){
document.getElementById('spanUsers').innerHTML = rpc.xmlhttp.responseText; document.getElementById('spanUsers').innerHTML = rpc.xmlhttp.responseText;
if (document.getElementById('aUsers[0]')) {
getField('btnImport').style.visibility = 'visible';
getField('CheckboxSelectAll').style.visibility = 'visible';
document.getElementById("AgeLabel").innerHTML = '[SELECT-ALL]';
}
else {
getField('btnImport').style.visibility = 'hidden';
}
var scs = rpc.xmlhttp.responseText.extractScript(); var scs = rpc.xmlhttp.responseText.extractScript();
scs.evalScript(); scs.evalScript();
}.extend(this); }.extend(this);
oRPC.make(); oRPC.make();
}; };
function checkInfo() {
var input_obj = document.getElementsByTagName("input");
for (i = 0; i < input_obj.length; i++) {
if (input_obj.item(i).type == 'checkbox' && input_obj.item(i).checked == true)
{
return true;
}
}
return false;
}
var importUsers = function(oForm) { var importUsers = function(oForm) {
var bContinue = false; if (checkInfo()) {
var i = 0;
var oAux;
while (oAux = document.getElementById('aUsers[' + i + ']')) {
if (oAux.checked) {
bContinue = true;
}
i++;
}
if (bContinue) {
oForm.submit(); oForm.submit();
} }
else { else {
//alert(666); alert(_('ID_NO_SELECTION_WARNING'));
}
};
var selectAll = function(bChecked) {
var oAux;
var i = 0;
while (oAux = document.getElementById('aUsers[' + i + ']')) {
oAux.checked = true;
i++;
} }
}; };
@@ -110,26 +87,6 @@ function cancel(){
leimnud.event.add(getField('KEYWORD'), 'keypress', function(event) { leimnud.event.add(getField('KEYWORD'), 'keypress', function(event) {
return disableEnterKey(event); return disableEnterKey(event);
}); });
leimnud.event.add(getField('CheckboxSelectAll'), 'click', function() {
var oAux;
var i = 0;
if (document.getElementById('form[CheckboxSelectAll]').checked)
{
document.getElementById("AgeLabel").innerHTML = '[DESELECT-ALL]';
while (oAux = document.getElementById('aUsers[' + i + ']')) {
oAux.checked = true;
i++;
}
}
else
{
document.getElementById("AgeLabel").innerHTML = '[SELECT-ALL]';
while (oAux = document.getElementById('aUsers[' + i + ']')) {
oAux.checked = false;
i++;
}
}
});
]]></JS> ]]></JS>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm type="xmlmenu">
<SelectAll type="link" value='[SELECT-ALL]' link="#" onclick="selectAll(); return false;" colAlign="left" colWidth="100">
<en></en>
</SelectAll>
<PAGE type="hidden" value="1"/>
<PAGED_TABLE_ID type="private"/>
<js type="javascript" replaceTags="1"><![CDATA[
function selectAll(){
var oAux;
var i = 0;
var input_obj = document.getElementsByTagName("input");
if (document.getElementById("form[SelectAll]").innerHTML == '[SELECT-ALL]') {
document.getElementById("form[SelectAll]").innerHTML = '[DESELECT-ALL]';
for (i = 0; i < input_obj.length; i++) {
if (input_obj.item(i).type == 'checkbox')
{
input_obj.item(i).checked = true;
}
}
}
else
{
document.getElementById("form[SelectAll]").innerHTML = '[SELECT-ALL]';
for (i = 0; i < input_obj.length; i++) {
if (input_obj.item(i).type == 'checkbox')
{
input_obj.item(i).checked = false;
}
}
}
}
]]></js>
</dynaForm>

View File

@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<dynaForm width="90%" rowsPerPage="1000"> <dynaForm menu="authSources/authSources_SearchUsersMenu" width="90%" rowsPerPage="1000">
<Checkbox type="text" titleAlign="center" align="left" enableHtml="1" onclick="return false;"> <Checkbox type="text" titleAlign="center" align="left" colWidth="20%" enableHtml="1" onclick="return false;">
<en><![CDATA[<span id="spanSelectAll"></span>]]></en> <en><![CDATA[<span id="spanSelectAll"></span>]]></en>
</Checkbox> </Checkbox>
<FullName type="text" colWidth="20%" titleAlign="center" align="left"> <FullName type="text" colWidth="15%" titleAlign="center" align="left">
<en>Name</en> <en>Name</en>
</FullName> </FullName>
<Email type="text" colWidth="20%" titleAlign="center" align="left"> <Email type="text" colWidth="15%" titleAlign="center" align="left">
<en><![CDATA[<span style="width:40px; display:block;">E-Mail</span>]]></en> <en><![CDATA[<span style="width:40px; display:block;">E-Mail</span>]]></en>
</Email> </Email>

View File

@@ -29,7 +29,6 @@
</MNU_SEARCH>--> </MNU_SEARCH>-->
<JS type="javascript"> <JS type="javascript">
<![CDATA[ <![CDATA[
getField('PAGED_TABLE_FAST_SEARCH').value = '';
function casesDelete(app) { function casesDelete(app) {
ajax_function('cases_Delete','','APP_UID='+encodeURIComponent(app)); ajax_function('cases_Delete','','APP_UID='+encodeURIComponent(app));
@#PAGED_TABLE_ID.refresh(); @#PAGED_TABLE_ID.refresh();

View File

@@ -54,7 +54,6 @@
</MNU_SEARCH>--> </MNU_SEARCH>-->
<JS type="javascript"> <JS type="javascript">
<![CDATA[ <![CDATA[
getField('PAGED_TABLE_FAST_SEARCH').value = '';
param = getURLParam("filtertit"); param = getURLParam("filtertit");
selectionHighlight(param); selectionHighlight(param);

View File

@@ -43,7 +43,6 @@
</MNU_SEARCH>--> </MNU_SEARCH>-->
<JS type="javascript"> <JS type="javascript">
<![CDATA[ <![CDATA[
getField('PAGED_TABLE_FAST_SEARCH').value = '';
param = getURLParam("filter"); param = getURLParam("filter");
selectionHighlight(param); selectionHighlight(param);

View File

@@ -21,7 +21,6 @@
<JS type="javascript"><![CDATA[ <JS type="javascript"><![CDATA[
getField('PAGED_TABLE_FAST_SEARCH').value = '';
function $_GET(q,s) { function $_GET(q,s) {
s = (s) ? s : self.location.search; s = (s) ? s : self.location.search;
var re = new RegExp('&'+q+'=([^&]*)','i'); var re = new RegExp('&'+q+'=([^&]*)','i');

View File

@@ -14,7 +14,7 @@
SELECT XMLNODE_NAME, TYPE FROM dynaForm WHERE XMLNODE_NAME = @@PME_XMLNODE_NAME SELECT XMLNODE_NAME, TYPE FROM dynaForm WHERE XMLNODE_NAME = @@PME_XMLNODE_NAME
</PME_VALIDATE_NAME> </PME_VALIDATE_NAME>
<PME_CODE type="textarea" cols="47" rows="12" defaultvalue="" style="overflow:scroll"> <PME_CODE type="textarea" cols="47" rows="11" defaultvalue="" style="overflow:scroll">
<en>Code</en> <en>Code</en>
</PME_CODE> </PME_CODE>
@@ -28,6 +28,18 @@ SELECT XMLNODE_NAME, TYPE FROM dynaForm WHERE XMLNODE_NAME = @@PME_XMLNODE_NAME
<PME_JS type="javascript"><![CDATA[ <PME_JS type="javascript"><![CDATA[
getField('PME_CODE').style.font='8pt Courier'; getField('PME_CODE').style.font='8pt Courier';
if (navigator.appName != "Microsoft Internet Explorer") {
try {
var oAllPs = document.querySelectorAll("div.panel_content___processmaker");
oAllPs[1].style.height = "330px";
}
catch(e) {
// nothing to do
}
}
var fieldForm="javascript"; var fieldForm="javascript";
var fieldName=getField("PME_XMLNODE_NAME",fieldForm); var fieldName=getField("PME_XMLNODE_NAME",fieldForm);
var savedFieldName=fieldName.value; var savedFieldName=fieldName.value;
@@ -39,8 +51,8 @@ function cancel(){
} }
var jsEditorPrompt = CodeMirror.fromTextArea('form[PME_CODE]', { var jsEditorPrompt = CodeMirror.fromTextArea('form[PME_CODE]', {
height: "200px", height: "170px",
width: "440px", width: "430px",
parserfile: ["tokenizejavascript.js", "parsejavascript.js"], parserfile: ["tokenizejavascript.js", "parsejavascript.js"],
stylesheet: ["css/jscolors.css"], stylesheet: ["css/jscolors.css"],
path: "js/", path: "js/",

View File

@@ -10,7 +10,6 @@
<fields_Order type="private" defaultValue="../dynaforms/fields_Order"/> <fields_Order type="private" defaultValue="../dynaforms/fields_Order"/>
<js type="javascript" replaceTags="1"> <js type="javascript" replaceTags="1">
<![CDATA[ <![CDATA[
getField('PAGED_TABLE_FAST_SEARCH').value = '';
var validatingForm; var validatingForm;
function fieldsAdd( type ){ function fieldsAdd( type ){
popupWindow('@G::LoadTranslation(ID_ADD) ' + type , '@G::encryptlink(@#fields_Edit)?A=@%URL&TYPE='+encodeURIComponent(type) , 510, 650, null,false,true); popupWindow('@G::LoadTranslation(ID_ADD) ' + type , '@G::encryptlink(@#fields_Edit)?A=@%URL&TYPE='+encodeURIComponent(type) , 510, 650, null,false,true);

View File

@@ -5,7 +5,5 @@
<PAGED_TABLE_ID type="private"/> <PAGED_TABLE_ID type="private"/>
<PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/> <PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/>
<JS type="javascript">
getField('PAGED_TABLE_FAST_SEARCH').value = '';
</JS>
</dynaForm> </dynaForm>

View File

@@ -6,7 +6,5 @@
<en>Advanced Search</en> <en>Advanced Search</en>
</MNU_SEARCH>--> </MNU_SEARCH>-->
<SEARCH_FILTER_FORM type="private"/> <SEARCH_FILTER_FORM type="private"/>
<JS type="javascript">
getField('PAGED_TABLE_FAST_SEARCH').value = '';
</JS>
</dynaForm> </dynaForm>

View File

@@ -10,7 +10,6 @@
<messages_Delete type="private" defaultValue="../messages/messages_Delete"/> <messages_Delete type="private" defaultValue="../messages/messages_Delete"/>
<PAGED_TABLE_ID type="private"/> <PAGED_TABLE_ID type="private"/>
<js type="javascript" replaceTags="1"><![CDATA[ <js type="javascript" replaceTags="1"><![CDATA[
getField('PAGED_TABLE_FAST_SEARCH').value = '';
var currentPagedTable = @#PAGED_TABLE_ID; var currentPagedTable = @#PAGED_TABLE_ID;
function messagesAdd(){ function messagesAdd(){
popupWindow('@G::LoadTranslation(ID_ADD_MESSAGE)', '@G::encryptlink(@#messages_Edit)?PRO_UID=@%PRO_UID' , 500, 300 ); popupWindow('@G::LoadTranslation(ID_ADD_MESSAGE)', '@G::encryptlink(@#messages_Edit)?PRO_UID=@%PRO_UID' , 500, 300 );

View File

@@ -39,6 +39,7 @@ leimnud.event.add(getField('ROU_NEXT_TASK'), 'change', modified);
//leimnud.event.add(getField('ROU_TO_LAST_USER'), 'change', modified); //leimnud.event.add(getField('ROU_TO_LAST_USER'), 'change', modified);
Pm.tmp.derivationsPanel.events.remove = function() { Pm.tmp.derivationsPanel.events.remove = function() {
if (bModified) { if (bModified) {
Pm.tmp.derivationsPanel.inRemove = false;
Pm.tmp.derivationsPanel.cancelClose=true; Pm.tmp.derivationsPanel.cancelClose=true;
new leimnud.module.app.confirm().make({ new leimnud.module.app.confirm().make({
label: G_STRINGS.ID_SAVE_DERIVATION_RULES_BEFORE_CLOSING, label: G_STRINGS.ID_SAVE_DERIVATION_RULES_BEFORE_CLOSING,
@@ -46,7 +47,7 @@ Pm.tmp.derivationsPanel.events.remove = function() {
Pm.tmp.derivationsPanel.cancelClose=false; Pm.tmp.derivationsPanel.cancelClose=false;
bModified = false; bModified = false;
getField('SAVE').onclick(); getField('SAVE').onclick();
}.extend(this), },
cancel: function() { cancel: function() {
Pm.tmp.derivationsPanel.cancelClose=false; Pm.tmp.derivationsPanel.cancelClose=false;
bModified = false; bModified = false;

View File

@@ -41,6 +41,7 @@ leimnud.event.add(getField('ROU_NEXT_TASK'), 'change', modified);
//leimnud.event.add(getField('ROU_TO_LAST_USER'), 'change', modified); //leimnud.event.add(getField('ROU_TO_LAST_USER'), 'change', modified);
Pm.tmp.derivationsPanel.events.remove = function() { Pm.tmp.derivationsPanel.events.remove = function() {
if (bModified) { if (bModified) {
Pm.tmp.derivationsPanel.inRemove = false;
Pm.tmp.derivationsPanel.cancelClose=true; Pm.tmp.derivationsPanel.cancelClose=true;
new leimnud.module.app.confirm().make({ new leimnud.module.app.confirm().make({
label: G_STRINGS.ID_SAVE_DERIVATION_RULES_BEFORE_CLOSING, label: G_STRINGS.ID_SAVE_DERIVATION_RULES_BEFORE_CLOSING,
@@ -48,7 +49,7 @@ Pm.tmp.derivationsPanel.events.remove = function() {
Pm.tmp.derivationsPanel.cancelClose=false; Pm.tmp.derivationsPanel.cancelClose=false;
bModified = false; bModified = false;
getField('SAVE').onclick(); getField('SAVE').onclick();
}.extend(this), },
cancel: function() { cancel: function() {
Pm.tmp.derivationsPanel.cancelClose=false; Pm.tmp.derivationsPanel.cancelClose=false;
bModified = false; bModified = false;

View File

@@ -27,9 +27,20 @@ var uploadFilesScreen = function(PRO_UID, MAIN_DIRECTORY, CURRENT_DIRECTORY) {
var swNavigator; var swNavigator;
if(navigator.appName=='Microsoft Internet Explorer'){ if(navigator.appName=='Microsoft Internet Explorer'){
swNavigator='ie' var rv = '';
wd=350; if (new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null) {
hg=200; rv = parseFloat(RegExp.$1);
}
if (rv >= 9) {
swNavigator='ie9+';
}
else {
swNavigator='ie';
}
wd = 420;
hg = 170;
} else { } else {
swNavigator='wknormal'; swNavigator='wknormal';
wd=420; wd=420;

View File

@@ -18,7 +18,6 @@
<SEARCH_FILTER_FORM type="private"/> <SEARCH_FILTER_FORM type="private"/>
<JS type="javascript" replacetags="1"><![CDATA[ <JS type="javascript" replacetags="1"><![CDATA[
getField('PAGED_TABLE_FAST_SEARCH').value = '';
var panel; var panel;
var panDel=function(link,uid) var panDel=function(link,uid)
{ {

View File

@@ -4,7 +4,5 @@
> >
<PAGED_TABLE_ID type="private"/> <PAGED_TABLE_ID type="private"/>
<PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/> <PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/>
<JS type="javascript">
getField('PAGED_TABLE_FAST_SEARCH').value = '';
</JS>
</dynaForm> </dynaForm>

View File

@@ -14,9 +14,6 @@
<CONFIRM type="private"/> <CONFIRM type="private"/>
<JS type="javascript"><![CDATA[ <JS type="javascript"><![CDATA[
getField('PAGED_TABLE_FAST_SEARCH').value = '';
PROCESS_REQUEST_FILE = '../roles/roles_Ajax'; PROCESS_REQUEST_FILE = '../roles/roles_Ajax';
PROCESS_REQUEST_FILE_USER = '../roles/roles_AddUser'; PROCESS_REQUEST_FILE_USER = '../roles/roles_AddUser';

View File

@@ -5,7 +5,5 @@
<PAGED_TABLE_ID type="private"/> <PAGED_TABLE_ID type="private"/>
<PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/> <PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/>
<JS type="javascript">
getField('PAGED_TABLE_FAST_SEARCH').value = '';
</JS>
</dynaForm> </dynaForm>

View File

@@ -7,8 +7,6 @@
<PAGED_TABLE_ID type="private"/> <PAGED_TABLE_ID type="private"/>
<JS type="javascript" replaceTags="1"> <JS type="javascript" replaceTags="1">
getField('PAGED_TABLE_FAST_SEARCH').value = '';
function editCondition(uid, sStepTitle) function editCondition(uid, sStepTitle)
{ {
popupWindow('@G::LoadTranslation(ID_EDIT_CONDITIONS_OF_STEP)' + ': ' + sStepTitle, '@G::encryptLink(@#URL_CONDITIONS_EDIT)?UID='+ uid , 500, 216); popupWindow('@G::LoadTranslation(ID_EDIT_CONDITIONS_OF_STEP)' + ': ' + sStepTitle, '@G::encryptLink(@#URL_CONDITIONS_EDIT)?UID='+ uid , 500, 216);

View File

@@ -34,7 +34,6 @@
<JS type="javascript" replaceTags="1"> <JS type="javascript" replaceTags="1">
<![CDATA[ <![CDATA[
getField('PAGED_TABLE_FAST_SEARCH').value = '';
/* /*
document.onkeypress=function(e){ document.onkeypress=function(e){
var esIE=(document.all); var esIE=(document.all);

View File

@@ -14,7 +14,6 @@
<CONFIRM type="private"/> <CONFIRM type="private"/>
<JS type="javascript"><![CDATA[ <JS type="javascript"><![CDATA[
getField('PAGED_TABLE_FAST_SEARCH').value = '';
var simpleUserDelete = function(sUser) { var simpleUserDelete = function(sUser) {
new leimnud.module.app.confirm().make({ new leimnud.module.app.confirm().make({
label:'@#CONFIRM', label:'@#CONFIRM',

View File

@@ -5,7 +5,5 @@
<PAGED_TABLE_ID type="private"/> <PAGED_TABLE_ID type="private"/>
<PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/> <PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/>
<JS type="javascript">
getField('PAGED_TABLE_FAST_SEARCH').value = '';
</JS>
</dynaForm> </dynaForm>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB