BUG 0000 Several problems in fields suggest in grids. SOLVED

- Al momento de crear o modificar un campo suggest en grids no mostraba la opción de campos dependientes.
  Cuando un campo suggest tenia campos dependientes agregaba un espacio en blanco al final de cada atributo dependentfields lo cual desplegaba un mensaje de error.
- Adjustments several in the Suggest on grids.
This commit is contained in:
Hector Cortez
2013-08-12 15:19:16 -04:00
parent c30a2ec13f
commit 0116e2ac55
3 changed files with 4 additions and 8 deletions

View File

@@ -196,6 +196,7 @@ $r = 0;
//Set data //Set data
foreach ($dependentFields as $d) { foreach ($dependentFields as $d) {
$d = trim($d);
$sendContent[$r]->name = $d; $sendContent[$r]->name = $d;
$sendContent[$r]->content = null; $sendContent[$r]->content = null;

View File

@@ -3618,7 +3618,7 @@ class XmlForm_Field_Listbox extends XmlForm_Field
$html .= "<option value=\"" . $optionName . "\" " . ((in_array( $optionName . "", $value )) ? "selected=\"selected\"" : "") . ">" . $option . "</option>"; $html .= "<option value=\"" . $optionName . "\" " . ((in_array( $optionName . "", $value )) ? "selected=\"selected\"" : "") . ">" . $option . "</option>";
} }
foreach ($this->sqlOption as $optionName => $option) { foreach ($this->sqlOption as $optionName => $option) {
$html .= "<option value=\"" . $optionName . " \" " . ((in_array( $optionName . "", $value )) ? "selected=\"selected\" " : "") . ">" . $option . "</option>"; $html .= "<option value=\"" . $optionName . "\" " . ((in_array( $optionName . "", $value )) ? "selected=\"selected\" " : "") . ">" . $option . "</option>";
} }
$html .= '</select>'; $html .= '</select>';
@@ -3627,10 +3627,10 @@ class XmlForm_Field_Listbox extends XmlForm_Field
} elseif ($this->mode === 'view') { } elseif ($this->mode === 'view') {
$html = '<select multiple="multiple" id="form[' . $this->name . ']" name="form[' . $this->name . '][]" size="' . $this->size . '" ' . $this->NSFieldType() . ' style="background: none;" disabled="disabled">'; $html = '<select multiple="multiple" id="form[' . $this->name . ']" name="form[' . $this->name . '][]" size="' . $this->size . '" ' . $this->NSFieldType() . ' style="background: none;" disabled="disabled">';
foreach ($this->option as $optionName => $option) { foreach ($this->option as $optionName => $option) {
$html .= "<option value=\"" . $optionName . " \" " . ((in_array( $optionName . "", $value )) ? "class=\"module_ListBoxView\" selected=\"selected\"" : "") . ">" . $option . "</option>"; $html .= "<option value=\"" . $optionName . "\" " . ((in_array( $optionName . "", $value )) ? "class=\"module_ListBoxView\" selected=\"selected\"" : "") . ">" . $option . "</option>";
} }
foreach ($this->sqlOption as $optionName => $option) { foreach ($this->sqlOption as $optionName => $option) {
$html .= "<option value=\"" . $optionName . " \" " . ((in_array( $optionName . "", $value )) ? "class=\"module_ListBoxView\" selected=\"selected\"" : "") . ">" . $option . "</option>"; $html .= "<option value=\"" . $optionName . "\" " . ((in_array( $optionName . "", $value )) ? "class=\"module_ListBoxView\" selected=\"selected\"" : "") . ">" . $option . "</option>";
} }
$html .= '</select>'; $html .= '</select>';
foreach ($this->option as $optionName => $option) { foreach ($this->option as $optionName => $option) {

View File

@@ -154,11 +154,6 @@ select XMLNODE_NAME, XMLNODE_NAME AS NAME FROM dynaForm WHERE XMLNODE_NAME <> @@
var dyntype = "@#PME_DYN_TYPE"; var dyntype = "@#PME_DYN_TYPE";
if (dyntype == 'grid') {
hideRowById('PME_DEPENDENTFIELDS');
} else {
showRowById('PME_DEPENDENTFIELDS');
}
storeNewEntriesOptions(getField("PME_STORE_NEW_ENTRY")); storeNewEntriesOptions(getField("PME_STORE_NEW_ENTRY"));
leimnud.event.add( leimnud.event.add(