Exemple #1
0
 function html_inner()
 {
     $this->text->attributes['value'] = $this->args[$this->context[$this->long_name]['var']];
     $this->text->attributes['onfocus'] = "chse.activatemon({obj:this,objtype:'editor_text',static:" . $this->send . "});this.selectionStart=0;this.selectionEnd=this.value.length;clearTimeout(this.hide_timeout);var st=" . $this->send . ";st.name+='.fo';st.type+='.editor_hidden';chse.send_or_push({static:st,val:encodeURIComponent(this.value),c_id:this.id});";
     $this->text->attributes['onfocus'] .= "\$i('" . js_escape($this->div->id_gen()) . "').tabIndex=1000;";
     $this->text->attributes['onblur'] = "chse.latedeactivate(this);if(this.refresh_timeout)clearTimeout(this.refresh_timeout);this.hide_timeout=setTimeout('\$i(\\'" . js_escape($this->div->id_gen()) . "\\').style.display=\\'none\\';',200);";
     $this->div->attributes['onmousedown'] = 'event.preventDefault();event.stopPropagation();return false;$i(\'' . js_escape($this->text->id_gen()) . '\').focus();';
     $this->text->attributes['onkeypress'] = "editor_text_autosuggest_keypress(this,event,'" . js_escape($this->text->id_gen()) . "','" . js_escape($this->text->id_gen()) . "','" . js_escape($this->div->id_gen()) . "');";
     if (!isset($this->no_restore_focus)) {
         editor_generic::add_focus_restore($this->ed);
     }
     dom_void::html_inner();
 }
Exemple #2
0
 function html()
 {
     global $dom_query_node_noterm;
     $this->rootnode->out('<' . $this->node_name);
     if (isset($this->css_class)) {
         if (is_array($this->css_class)) {
             $css_class = array();
             foreach ($this->css_class as $n => $v) {
                 if (is_object($v) ? $this->rootnode->externals[$v->ref] : $v) {
                     $css_class[] = $n;
                 }
             }
             if (count($css_class) > 0) {
                 $this->rootnode->out(' class="' . htmlspecialchars(implode(' ', $css_class), ENT_QUOTES) . '"');
             }
         } else {
             $this->rootnode->out(' class="' . htmlspecialchars(is_object($this->css_class) ? $this->rootnode->externals[$this->css_class->ref] : $this->css_class, ENT_QUOTES) . '"');
         }
     }
     if (isset($this->css_style)) {
         if (is_array($this->css_style)) {
             $css_style = array();
             foreach ($this->css_style as $n => $v) {
                 $css_style[] = $n . ':' . (is_object($v) ? $this->rootnode->externals[$v->ref] . $v->unit : $v);
             }
             if (count($css_style) > 0) {
                 $this->rootnode->out(' style="' . htmlspecialchars(implode('; ', $css_style), ENT_QUOTES) . '"');
             }
         } else {
             $this->rootnode->out(' style="' . htmlspecialchars(is_object($this->css_style) ? $this->rootnode->externals[$this->css_style->ref] : $this->css_style, ENT_QUOTES) . '"');
         }
     }
     if (is_array($this->attributes)) {
         foreach ($this->attributes as $n => $v) {
             $this->rootnode->out(' ' . $n . '="' . htmlspecialchars(is_object($v) ? $this->rootnode->externals[$v->ref] : $v, ENT_QUOTES) . '"');
         }
     }
     if (!isset($dom_query_node_noterm[$this->node_name])) {
         $this->rootnode->out('>');
         parent::html_inner();
         $this->rootnode->out('</' . $this->node_name . '>');
     } else {
         $this->rootnode->out('/>');
     }
 }