Merge branch 'pm_wysiwyg'

This commit is contained in:
Gustavo Cruz
2012-12-07 15:39:37 -04:00
25 changed files with 648 additions and 437 deletions

View File

@@ -51,8 +51,6 @@ $html .= '<label for="variables_label">Search</label>';
$html .= '</td>';
$html .= '</tr>';
//$html = '<form action="uploader.php?'.$_SERVER["QUERY_STRING"].'&q=upload" method="post" enctype="multipart/form-data" onsubmit="">';
$html .= '<tr>';
$html .= '<td width="25%">';
$html .= '<select name="type_variables" id="type_variables">';
@@ -63,7 +61,6 @@ $html .= '</select> &nbsp;&nbsp;&nbsp;&nbsp;';
$html .= '</td>';
$html .= '<td width="25%">';
//$html .= '<select name="prefix" id="prefix" onChange="Seleccionar(this);">';
$html .= '<select name="prefix" id="prefix">';
$html .= '<option value="ID_TO_STRING">@@</option>';
@@ -72,14 +69,7 @@ $html .= '<option value="ID_TO_INTEGER">@%</option>';
$html .= '<option value="ID_TO_URL">@?</option>';
$html .= '<option value="ID_SQL_ESCAPE">@$</option>';
$html .= '<option value="ID_REPLACE_WITHOUT_CHANGES">@=</option>';
/*
$html .= '<option value="@@">@@</option>';
$html .= '<option value="@#">@#</option>';
$html .= '<option value="@%">@%</option>';
$html .= '<option value="@?">@?</option>';
$html .= '<option value="@$">@$</option>';
$html .= '<option value="@=">@=</option>';
*/
$html .= '</select> &nbsp;&nbsp;&nbsp;&nbsp;';
$html .= '</td>';
@@ -90,14 +80,12 @@ $html .= '</tr>';
$html .= '<tr>';
$html .= '<tr><td><label for="prefix_label">Variables</label></td></tr>';
$html .= '<tr>';
//onChange="Seleccionar(this);
$html .= '<td colspan="3">';
G::LoadClass( 'xmlfield_InputPM' );
$aFields = getDynaformsVars( $_REQUEST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
//$html .= '<select name="_Var_Form_" id="_Var_Form_" size="' . count( $aFields ) . '" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">';
$displayOption = '';
if (isset($_REQUEST['displayOption'])){
$displayOption = 'displayOption="'.$_REQUEST['displayOption'].'"';
@@ -143,7 +131,7 @@ $html .= '</div>';
$html .= '</form>';
$display = 'raw';
$display = 'raw';
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
@@ -159,66 +147,3 @@ if (isset($_REQUEST['displayOption'])) {
echo $html;
G::RenderPage( 'publish', $display );
/*
$alll = '<script type="text/javascript" language="javascript">';
$alll .= 'function Seleccionar(combo){';
$alll .= 'alert(combo.value);';
$alll .= '}';
$alll .= '</script>';
echo $alll;
*/
//echo var_dump($aFields);
/*
$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) {
$html .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';
}
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
);
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']
);
}
$html .= '</select>';
$html .= '</td>';
$html .= '</tr>';
$html .= '</table>';
$html .= '</div>';
$html .= '<br>';
$html .= '<div id="desc_variables">';
$html .= '<table border="1" width="90%" align="center">';
$html .= '<tr width="40%">';
$html .= '<td>Result</td>';
$html .= '<td>@#SYS_LANG</td>';
$html .= '</tr>';
$html .= '<tr width="60%">';
$html .= '<td>Description</td>';
$html .= '<td>Description @#SYS_LANG</td>';
$html .= '</tr>';
$html .= '</table>';
$html .= '</div>';
$html .= '<br>';
$html .= '<div id="desc_variables">';
$html .= '<table width="90%" align="center">';
$html .= '<tr><td>';
$html .= '<label for="desc_prefix">' . G::LoadTranslation( 'ID_TO_FLOAT' ) . '</label>';
$html .= '</td></tr>';
$html .= '</div>';
$html .= '</form>';
echo $html;
G::RenderPage( 'publish', 'raw' );
/*$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
G::RenderPage( 'publish', 'raw' );
*/

View File

@@ -1,71 +0,0 @@
<?php
/**
* groups.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
$access = $RBAC->userCanAccess( 'PM_USERS' );
if ($access != 1) {
switch ($access) {
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
default:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
}
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'GROUPS';
$G_PUBLISH = new Publisher();
G::LoadClass( 'configuration' );
$c = new Configurations();
$configPage = $c->getConfiguration( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$configEnv = $c->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
//$oHeadPublisher->addExtJsScript( 'groups/groupsList', false ); //adding a javascript file .js
//$oHeadPublisher->clearScripts();
$oHeadPublisher->addScriptFile( '/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js' );
//$oHeadPublisher->addScriptFile( '/js/jquery/jquery-1.8.2.min.js' );
//$oHeadPublisher->addScriptFile( '/js/jquery/jquery-1.7.1.min.js' );
//$oHeadPublisher->addScriptFile( '/js/tinymce/pmScripts/editorEmailTemplate.js' );
$G_PUBLISH->addContent( 'view', 'outputdocs/testOut' ); //adding a html file .html.
G::RenderPage( 'publish', 'blank' );

View File

@@ -522,6 +522,9 @@ try {
case 'events':
$oProcessMap->eventsList( $oData->pro_uid, $oData->type );
break;
/**
* returns an array with all Dynaforms Fields
*/
case 'getVariableList':
G::LoadClass('xmlfield_InputPM');
$proUid= isset( $_REQUEST['process'] )?$_REQUEST['process']:'';
@@ -548,10 +551,48 @@ try {
}
echo Bootstrap::json_encode( $aVariables );
break;
/**
* returns the prefix mean
*
*/
case 'getVariablePrefix':
$_REQUEST['prefix'] = $_REQUEST['prefix']!=null?$_REQUEST['prefix']:'ID_TO_STRING';
echo G::LoadTranslation($_REQUEST['prefix']);
break;
/**
* return an array with all Variables of Grid type
*/
case 'getGridList':
G::LoadClass('xmlfield_InputPM');
$proUid= isset( $_REQUEST['PRO_UID'] )?$_REQUEST['PRO_UID']:'';
$aFields = getGridsVars( $proUid );
$aVariables = array();
foreach ($aFields as $key => $value){
$aVariables[] = $aFields[$key];
}
echo Bootstrap::json_encode( $aVariables );
break;
/**
* return an array with all Grid Variables according to Grid
*/
case 'getVariableGrid':
G::LoadClass('xmlfield_InputPM');
$proUid= isset( $_REQUEST['PRO_UID'] )?$_REQUEST['PRO_UID']:'';
$dynUid= isset( $_REQUEST['DYN_UID'] )?$_REQUEST['DYN_UID']:'';
$aFields = getVarsGrid($proUid, $dynUid);
$aVariables = array();
foreach ($aFields as $key => $value) {
$aVariables[] = $key;
}
echo Bootstrap::json_encode( $aVariables );
break;
/*
case 'saveFile':
global $G_PUBLISH;