WYSIWYG EDITOR Variable picker.js

WYSIWYG EDITOR Variable picker.js
This commit is contained in:
norahmollo
2012-11-26 16:08:09 +00:00
parent adb1ae1c34
commit 52461ddc8c
3 changed files with 19 additions and 16 deletions

View File

@@ -44,7 +44,11 @@ leimnud.event.add(document.getElementById('search'), 'keypress', function(e) {
} }
}); });
leimnud.event.add(document.getElementById('type_variables'), 'change', function(event) { var generateListValues = function(){
console.log('Dropdown Type of Variables');
}); var combo = document.getElementById("_Var_Form_");
var option = document.createElement('option');
combo.options.add(option, 0);
combo.options[0].value = "valor";
combo.options[0].text = "Textojjjjj";
}

View File

@@ -21,12 +21,18 @@
* 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.
*/ */
$html = '<form action="uploader.php?'.$_SERVER["QUERY_STRING"].'&q=upload" method="post" enctype="multipart/form-data" onsubmit="">'; $html = '<form action="uploader.php?'.$_SERVER["QUERY_STRING"].'&q=upload" method="post" enctype="multipart/form-data" onsubmit="">';
$html .= '<div id="d_variables">'; $html .= '<div id="d_variables">';
$html .= '<table width="90%" align="center">'; $html .= '<table width="90%" align="center">';
$html .= '<tr>';
$html .= '<td colspan="3">';
$html .= '<input type="hidden" id="process" value="'.$_POST['sProcess'].'">';
$html .= '</td>';
$html .= '</tr>';
$html .= '<tr>'; $html .= '<tr>';
$html .= '<td width="50%">'; $html .= '<td width="50%">';
$html .= '<label for="type_label">Type Variable</label>'; $html .= '<label for="type_label">Type Variable</label>';
@@ -41,14 +47,7 @@ $html .= '<label for="variables_label">Search</label>';
$html .= '</td>'; $html .= '</td>';
$html .= '</tr>'; $html .= '</tr>';
$html = '<form action="uploader.php?'.$_SERVER["QUERY_STRING"].'&q=upload" method="post" enctype="multipart/form-data" onsubmit="">'; //$html = '<form action="uploader.php?'.$_SERVER["QUERY_STRING"].'&q=upload" method="post" enctype="multipart/form-data" onsubmit="">';
$html .= '<div id="d_variables">';
$html .= '<table width="90%" align="center">';
$html .= '<tr>';
$html .= '<td width="50%">';
$html .= '<label for="type_label">Type Variable</label>';
$html .= '</td>';
$html .= '<tr>'; $html .= '<tr>';
$html .= '<td width="25%">'; $html .= '<td width="25%">';
@@ -71,7 +70,7 @@ $html .= '<option value="ID_REPLACE_WITHOUT_CHANGES">@=</option>';
$html .= '</select> &nbsp;&nbsp;&nbsp;&nbsp;'; $html .= '</select> &nbsp;&nbsp;&nbsp;&nbsp;';
$html .= '</td>'; $html .= '</td>';
$html .= '<td width="20%" valign="top">'; $html .= '<td width="25%" valign="top">';
$html .= '<input type="text" id="search" size="15">'; $html .= '<input type="text" id="search" size="15">';
$html .= '</td>'; $html .= '</td>';
$html .= '</tr>'; $html .= '</tr>';
@@ -91,7 +90,7 @@ $aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSel
//$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);">'; //$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);">';
$html .= '<select name="_Var_Form_" id="_Var_Form_" size="4" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:50%;' : '') . '" ondblclick="getValue(this);">'; $html .= '<select name="_Var_Form_" id="_Var_Form_" size="8" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:50%;' : '') . '" ondblclick="getValue(this);">';
foreach ($aFields as $aField) { foreach ($aFields as $aField) {
$html .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>'; $html .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';

View File

@@ -24,7 +24,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel(); _oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = { _oVarsPanel_.options = {
limit : true, limit : true,
size : {w:600,h:340}, size : {w:600,h:440},
position : {x:0,y:0,center:true}, position : {x:0,y:0,center:true},
title : '', title : '',
theme : 'processmaker', theme : 'processmaker',