summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/classes/wizard_api.php')
-rw-r--r--frontend/classes/wizard_api.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/frontend/classes/wizard_api.php b/frontend/classes/wizard_api.php
index c0d91b0..48fe637 100644
--- a/frontend/classes/wizard_api.php
+++ b/frontend/classes/wizard_api.php
@@ -259,7 +259,9 @@ class wizard_layered_checkbox_array extends wizard_checkbox_array {
public function verify() {
if (($vals=self::get_opt($this->optname)) === null) return false;
$vals=explode($this->delim, $vals);
- return count($this->r_verify($vals, $this->array)) == 0;
+ $r=$this->r_verify($vals, $this->array);
+ debug('wlca', 'got results: '.implode(' ',$r));
+ return count($r) == 0;
}
private function r_output(&$array, $depth=0, $path=null, $name=null) {
static $uid=0, $ucid=0;
@@ -279,7 +281,7 @@ class wizard_layered_checkbox_array extends wizard_checkbox_array {
if (!isset($conf['id'])) {
$conf['id']=self::b36($uid++);
}
- echo 'Search: <input id="'.$conf['id'].'-q" onkeyup="wlca_search(this.value, document.getElementById(\''.$conf['id'].'\'), 0, '.$this->depth.')" /> <a href="javascript:q=document.getElementById(\''.$conf['id'].'-q\'); q.value=\'\'; q.onkeyup()">Clear</a><br/>'."\n";
+ echo 'Search: <input id="'.$conf['id'].'-q" onkeyup="wlca_search(this.value, document.getElementById(\''.$conf['id'].'\'), 0, '.$this->depth.')" /> <a href="javascript:q=document.getElementById(\''.$conf['id'].'-q\'); q.value=\'\'; q.onkeyup()">Clear</a> <a href="javascript:wlca_show_checked(document.getElementById(\''.$conf['id'].'\'), 0, '.$this->depth.'); undefined">Show checked</a><br/>'."\n";
}
echo '<div class="wlca'.(isset($conf['autosize'])?' autosize" style="font-size: '.pow(1.15, $autosize)*100.0.'%':'').'" id="'.$conf['id'].'">'."\n";
foreach ($array as $name => &$val) {
@@ -287,7 +289,7 @@ class wizard_layered_checkbox_array extends wizard_checkbox_array {
$uid++;
}
echo '</div>';
- echo "<script type=\"text/javascript\">\n<!--\nwlca_search(document.getElementById('{$conf['id']}-q').value, document.getElementById('{$conf['id']}'), 0, $this->depth);\n-->\n</script>\n";
+ echo "<script type=\"text/javascript\">\n<!--\nif (wlca_show_checked(document.getElementById('{$conf['id']}'), 0, $this->depth) == 0) wlca_search(document.getElementById('{$conf['id']}-q').value, document.getElementById('{$conf['id']}'), 0, $this->depth);\n-->\n</script>\n";
} else {
$meta=$this->metadata[$depth];
if (isset($meta['tag'])) {
@@ -346,7 +348,7 @@ class wizard_layered_checkbox_array extends wizard_checkbox_array {
$meta=$this->metadata[$depth];
if (isset($meta['checkbox'])) {
$label=$this->format_label($array, $meta['checkbox'], $path, $name);
- if ($i=array_search($label, $vals) !== false) {
+ if (($i=array_search($label, $vals)) !== false) {
unset($vals[$i]);
}
}