CODE STYLE changes
files modified: workflow/engine/methods/controls/buscador.php
workflow/engine/methods/controls/buscador2.php
workflow/engine/methods/controls/calendar.php
workflow/engine/methods/controls/varsAjax.php
workflow/engine/methods/controls/varsAjaxByType.php
This commit is contained in:
@@ -1,52 +1,53 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* buscador.php
|
* buscador.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
$frm = $HTTP_GET_VARS;
|
$frm = $HTTP_GET_VARS;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h1>demo de buscador</h1>
|
<h1>demo de buscador</h1>
|
||||||
<form method=post action="buscador2.php">
|
<form method=post action="buscador2.php">
|
||||||
<input type=hidden name=ticket value="<?php echo $frm['ticket'] ?>"> <input
|
<input type=hidden name=ticket value="<?php echo $frm['ticket'] ?>"> <input
|
||||||
type=hidden name=tipo value="<?php echo $frm['tipo'] ?>">
|
type=hidden name=tipo value="<?php echo $frm['tipo'] ?>">
|
||||||
Buscador tipo : <?php echo $frm['tipo'] ?><br>
|
Buscador tipo : <?php echo $frm['tipo'] ?><br>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>curso</td>
|
<td>curso</td>
|
||||||
<td><select name=curso>
|
<td><select name=curso>
|
||||||
<option value="curso1">Curso 1</option>
|
<option value="curso1">Curso 1</option>
|
||||||
<option value="curso2">Curso 2</option>
|
<option value="curso2">Curso 2</option>
|
||||||
<option value="curso3">Curso 3</option>
|
<option value="curso3">Curso 3</option>
|
||||||
<option value="curso4">Curso 4</4option>
|
<option value="curso4">Curso 4</4option>
|
||||||
|
|
||||||
<option value="curso5">Curso 5</option></td>
|
<option value="curso5">Curso 5</option></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2><input type=submit></td>
|
<td colspan=2><input type=submit></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -18,15 +18,16 @@ this program. If not, see
|
|||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
<?php
|
<?php
|
||||||
$frm = $HTTP_POST_VARS;
|
$frm = $HTTP_POST_VARS;
|
||||||
|
|
||||||
$dbc = new dbconnection();
|
$dbc = new dbconnection();
|
||||||
$ses = new DBSession( $dbc );
|
$ses = new DBSession( $dbc );
|
||||||
$sql = "update tickets set tipo = ' " . $frm['tipo'] . "', resultado = ' " . $frm['curso'] . "' where ticket = '" . $frm['ticket'] . "' ";
|
$sql = "update tickets set tipo = ' " . $frm['tipo'] . "', resultado = ' " . $frm['curso'] . "' where ticket = '" . $frm['ticket'] . "' ";
|
||||||
$ses->Execute( $sql );
|
$ses->Execute( $sql );
|
||||||
?>
|
?>
|
||||||
<script language="JavaScript">
|
<script language="JavaScript">
|
||||||
window.close();
|
window.close();
|
||||||
</script>
|
</script>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -148,12 +148,13 @@ function set_datetime(n_datetime, b_close) {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<script language="JavaScript">
|
<script language="JavaScript">
|
||||||
<?php
|
<?php
|
||||||
// print weekdays titles
|
// print weekdays titles
|
||||||
for ($n = 0; $n < 7; $n ++)
|
for ($n = 0; $n < 7; $n ++) {
|
||||||
print "<td bgcolor='#87cefa' align='center'><font color='#ffffff'>" . $ARR_WEEKDAYS[(NUM_WEEKSTART + n) % 7] . "</font></td>";
|
print "<td bgcolor='#87cefa' align='center'><font color='#ffffff'>" . $ARR_WEEKDAYS[(NUM_WEEKSTART + n) % 7] . "</font></td>";
|
||||||
print "</tr>";
|
}
|
||||||
|
print "</tr>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
// print calendar table
|
// print calendar table
|
||||||
|
|
||||||
@@ -194,10 +195,12 @@ if (obj_caller && obj_caller.time_comp) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</td>
|
</td>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -1,152 +1,152 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* varsAjax.php
|
* varsAjax.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
G::LoadClass( 'xmlfield_InputPM' );
|
G::LoadClass( 'xmlfield_InputPM' );
|
||||||
$aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
|
$aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
|
||||||
|
|
||||||
$sHTML = '<select name="_Var_Form_" id="_Var_Form_" size="' . count( $aFields ) . '" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">';
|
$sHTML = '<select name="_Var_Form_" id="_Var_Form_" size="' . count( $aFields ) . '" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">';
|
||||||
foreach ($aFields as $aField) {
|
foreach ($aFields as $aField) {
|
||||||
$sHTML .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';
|
$sHTML .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
|
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
|
||||||
);
|
);
|
||||||
foreach ($aFields as $aField) {
|
foreach ($aFields as $aField) {
|
||||||
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sHTML .= '</select>';
|
$sHTML .= '</select>';
|
||||||
$sHTML = '';
|
$sHTML = '';
|
||||||
|
|
||||||
if (! isset( $_POST['sNoShowLeyend'] )) {
|
if (! isset( $_POST['sNoShowLeyend'] )) {
|
||||||
$sHTML = '<table width="100%">';
|
$sHTML = '<table width="100%">';
|
||||||
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"><b>Variables cast prefix</b></td></tr>';
|
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"><b>Variables cast prefix</b></td></tr>';
|
||||||
if (isset( $_POST['sType'] )) {
|
if (isset( $_POST['sType'] )) {
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_ESC' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_ESC' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_NONEC' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_NONEC' ) . '</td></tr>';
|
||||||
/*$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EURL') . '</td></tr>';
|
/*$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EURL') . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EVAL') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EVAL') . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCJS') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCJS') . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCSJS') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCSJS') . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_FUNCTION') . '</td></tr>';*/
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_FUNCTION') . '</td></tr>';*/
|
||||||
} else {
|
} else {
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@@</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_STRING' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@@</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_STRING' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@#</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_FLOAT' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@#</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_FLOAT' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@%</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_INTEGER' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@%</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_INTEGER' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@?</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_URL' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@?</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_URL' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@$</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_SQL_ESCAPE' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@$</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_SQL_ESCAPE' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@=</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_REPLACE_WITHOUT_CHANGES' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@=</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_REPLACE_WITHOUT_CHANGES' ) . '</td></tr>';
|
||||||
}
|
}
|
||||||
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"> </td></tr>';
|
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"> </td></tr>';
|
||||||
//$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">' . G::LoadTranslation('ID_DOCLICK') . '</td></tr>';
|
//$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">' . G::LoadTranslation('ID_DOCLICK') . '</td></tr>';
|
||||||
$sHTML .= '</table>';
|
$sHTML .= '</table>';
|
||||||
} else {
|
} else {
|
||||||
// please don't remove this definition if there isn't some sort of html tags before the css styles aren't loaded in IE
|
// please don't remove this definition if there isn't some sort of html tags before the css styles aren't loaded in IE
|
||||||
$sHTML = '<table width="100%">';
|
$sHTML = '<table width="100%">';
|
||||||
$sHTML .= '</table>';
|
$sHTML .= '</table>';
|
||||||
}
|
}
|
||||||
$sStyle = " <style type=\"text/css\">
|
$sStyle = " <style type=\"text/css\">
|
||||||
|
|
||||||
.pm__dynavars a#dynalink{color:#000000;}
|
.pm__dynavars a#dynalink{color:#000000;}
|
||||||
|
|
||||||
/* begin css tabs */
|
/* begin css tabs */
|
||||||
ul#tabnav { /* general settings */
|
ul#tabnav { /* general settings */
|
||||||
text-align: left; /* set to left, right or center */
|
text-align: left; /* set to left, right or center */
|
||||||
margin: 1em 0 1em 0; /* set margins as desired */
|
margin: 1em 0 1em 0; /* set margins as desired */
|
||||||
font: bold 11px verdana, arial, sans-serif; /* set font as desired */
|
font: bold 11px verdana, arial, sans-serif; /* set font as desired */
|
||||||
border-bottom: 1px solid #ccc; /* set border COLOR as desired */
|
border-bottom: 1px solid #ccc; /* set border COLOR as desired */
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 3px 10px 3px 10px; /* THIRD number must change with respect to padding-top (X) below */
|
padding: 3px 10px 3px 10px; /* THIRD number must change with respect to padding-top (X) below */
|
||||||
}
|
}
|
||||||
|
|
||||||
ul#tabnav li { /* do not change */
|
ul#tabnav li { /* do not change */
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#all li.all, div#system li.system, div#process li.process, div#tab4 li.tab4 { /* settings for selected tab */
|
div#all li.all, div#system li.system, div#process li.process, div#tab4 li.tab4 { /* settings for selected tab */
|
||||||
border-bottom: 1px solid #fff; /* set border color to page background color */
|
border-bottom: 1px solid #fff; /* set border color to page background color */
|
||||||
background-color: #fff; /* set background color to match above border color */
|
background-color: #fff; /* set background color to match above border color */
|
||||||
}
|
}
|
||||||
|
|
||||||
div#all li.all a, div#system li.system a, div#process li.process a, div#tab4 li.tab4 a { /* settings for selected tab link */
|
div#all li.all a, div#system li.system a, div#process li.process a, div#tab4 li.tab4 a { /* settings for selected tab link */
|
||||||
background-color: #fff; /* set selected tab background color as desired */
|
background-color: #fff; /* set selected tab background color as desired */
|
||||||
color: #000; /* set selected tab link color as desired */
|
color: #000; /* set selected tab link color as desired */
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 1px;
|
top: 1px;
|
||||||
padding-top: 4px; /* must change with respect to padding (X) above and below */
|
padding-top: 4px; /* must change with respect to padding (X) above and below */
|
||||||
}
|
}
|
||||||
|
|
||||||
ul#tabnav li a { /* settings for all tab links */
|
ul#tabnav li a { /* settings for all tab links */
|
||||||
padding: 3px 4px; /* set padding (tab size) as desired; FIRST number must change with respect to padding-top (X) above */
|
padding: 3px 4px; /* set padding (tab size) as desired; FIRST number must change with respect to padding-top (X) above */
|
||||||
border: 1px solid #aaa; /* set border COLOR as desired; usually matches border color specified in #tabnav */
|
border: 1px solid #aaa; /* set border COLOR as desired; usually matches border color specified in #tabnav */
|
||||||
background-color: #ccc; /* set unselected tab background color as desired */
|
background-color: #ccc; /* set unselected tab background color as desired */
|
||||||
color: #666; /* set unselected tab link color as desired */
|
color: #666; /* set unselected tab link color as desired */
|
||||||
margin-right: 10px; /* set additional spacing between tabs as desired */
|
margin-right: 10px; /* set additional spacing between tabs as desired */
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul#tabnav a:hover { /* settings for hover effect */
|
ul#tabnav a:hover { /* settings for hover effect */
|
||||||
background: #fff; /* set desired hover color */
|
background: #fff; /* set desired hover color */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end css tabs */
|
/* end css tabs */
|
||||||
|
|
||||||
</style>";
|
</style>";
|
||||||
$cssTabs = "<div id=\"all\">
|
$cssTabs = "<div id=\"all\">
|
||||||
<ul id=\"tabnav\">
|
<ul id=\"tabnav\">
|
||||||
<li class=\"all\"><a href=\"#\" onclick=\"changeVariables('all','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">All variables</a></li>
|
<li class=\"all\"><a href=\"#\" onclick=\"changeVariables('all','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">All variables</a></li>
|
||||||
<li class=\"system\"><a href=\"#\" onclick=\"changeVariables('system','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">System</a></li>
|
<li class=\"system\"><a href=\"#\" onclick=\"changeVariables('system','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">System</a></li>
|
||||||
<li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
|
<li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
";
|
";
|
||||||
echo $sHTML;
|
echo $sHTML;
|
||||||
echo $sStyle;
|
echo $sStyle;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
echo "<div id=\"processVariablesContent\">";
|
echo "<div id=\"processVariablesContent\">";
|
||||||
echo $cssTabs;
|
echo $cssTabs;
|
||||||
G::LoadClass( 'ArrayPeer' );
|
G::LoadClass( 'ArrayPeer' );
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray['dynavars'] = $aRows;
|
$_DBArray['dynavars'] = $aRows;
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass( 'ArrayPeer' );
|
G::LoadClass( 'ArrayPeer' );
|
||||||
$oCriteria = new Criteria( 'dbarray' );
|
$oCriteria = new Criteria( 'dbarray' );
|
||||||
$oCriteria->setDBArrayTable( 'dynavars' );
|
$oCriteria->setDBArrayTable( 'dynavars' );
|
||||||
|
|
||||||
$aFields = array ();
|
$aFields = array ();
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptFile( "/jscore/controls/varsAjax.js" );
|
$oHeadPublisher->addScriptFile( "/jscore/controls/varsAjax.js" );
|
||||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
||||||
|
|||||||
@@ -1,66 +1,65 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* varsAjax.php
|
* varsAjax.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the varAjaxByType file as the varAjax.php handle the render of the diferent
|
* the varAjaxByType file as the varAjax.php handle the render of the diferent
|
||||||
* types of dynaform variables there are 3 of them system, process, and the default
|
* types of dynaform variables there are 3 of them system, process, and the default
|
||||||
* that show both system and process variables.
|
* that show both system and process variables.
|
||||||
* uses almost the same variables passed to varsAjax, plus $_POST['type'] that is the
|
* uses almost the same variables passed to varsAjax, plus $_POST['type'] that is the
|
||||||
* type of the variables. Then it render a propel table with all the variables
|
* type of the variables. Then it render a propel table with all the variables
|
||||||
* loaded for that type.
|
* loaded for that type.
|
||||||
*
|
*
|
||||||
* @author Gustavo Cruz gustavo-at-colosa.com
|
* @author Gustavo Cruz gustavo-at-colosa.com
|
||||||
* @param $_POST variables
|
* @param $_POST variables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
G::LoadClass( 'xmlfield_InputPM' );
|
G::LoadClass( 'xmlfield_InputPM' );
|
||||||
$aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
|
$aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
|
||||||
$aType = $_POST['type'];
|
$aType = $_POST['type'];
|
||||||
|
|
||||||
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
|
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char');
|
||||||
);
|
foreach ($aFields as $aField) {
|
||||||
foreach ($aFields as $aField) {
|
switch ($aType) {
|
||||||
switch ($aType) {
|
case "system":
|
||||||
case "system":
|
if ($aField['sType'] == "system") {
|
||||||
if ($aField['sType'] == "system") {
|
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
||||||
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
);
|
||||||
);
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case "process":
|
||||||
case "process":
|
if ($aField['sType'] != "system") {
|
||||||
if ($aField['sType'] != "system") {
|
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
||||||
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
);
|
||||||
);
|
}
|
||||||
}
|
break;
|
||||||
break;
|
default:
|
||||||
default:
|
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
||||||
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
);
|
||||||
);
|
break;
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
|
||||||
// Use and make a load translation variable call to the titles of the tabs
|
// Use and make a load translation variable call to the titles of the tabs
|
||||||
$cssTabs = "<div id=\"" . strtolower( $_POST['type'] ) . "\">
|
$cssTabs = "<div id=\"" . strtolower( $_POST['type'] ) . "\">
|
||||||
<ul id=\"tabnav\">
|
<ul id=\"tabnav\">
|
||||||
@@ -69,21 +68,21 @@ $cssTabs = "<div id=\"" . strtolower( $_POST['type'] ) . "\">
|
|||||||
<li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
|
<li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
";
|
";
|
||||||
|
|
||||||
echo $cssTabs;
|
echo $cssTabs;
|
||||||
G::LoadClass( 'ArrayPeer' );
|
G::LoadClass( 'ArrayPeer' );
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray['dynavars'] = $aRows;
|
$_DBArray['dynavars'] = $aRows;
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass( 'ArrayPeer' );
|
G::LoadClass( 'ArrayPeer' );
|
||||||
$oCriteria = new Criteria( 'dbarray' );
|
$oCriteria = new Criteria( 'dbarray' );
|
||||||
$oCriteria->setDBArrayTable( 'dynavars' );
|
$oCriteria->setDBArrayTable( 'dynavars' );
|
||||||
|
|
||||||
$aFields = array ();
|
$aFields = array ();
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user