Changeset 862

Show
Ignore:
Timestamp:
04/04/08 14:49:15 (8 months ago)
Author:
laurentj
Message:

remove the use of the engine attribute on htmleditor tag, and fixed some little bug on some jforms plugins

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/manifests/jelix-lib.mn

    r842 r862  
    565565  icons.png 
    566566cd lib/jelix-www/wymeditor/config 
    567 c simple.js 
     567c default.js 
    568568cd lib/jelix-www/jquery 
    569569  GPL-LICENSE.txt 
  • trunk/build/manifests/jelix-lib.mn

    r842 r862  
    565565  icons.png 
    566566cd lib/jelix-www/wymeditor/config 
    567 c simple.js 
     567c default.js 
    568568cd lib/jelix-www/jquery 
    569569  GPL-LICENSE.txt 
  • trunk/build/manifests/jelix-lib.mn

    r842 r862  
    565565  icons.png 
    566566cd lib/jelix-www/wymeditor/config 
    567 c simple.js 
     567c default.js 
    568568cd lib/jelix-www/jquery 
    569569  GPL-LICENSE.txt 
  • trunk/lib/jelix-www/js/jforms.js

    r859 r862  
    4343    declareForm : function(aForm){ 
    4444        this._forms[aForm.name]=aForm; 
     45        var elem = document.getElementById(aForm.name); 
     46 
     47        if (elem.addEventListener) { 
     48            elem.addEventListener("submit", function (ev) { if(!jForms.verifyForm(elem)) {ev.preventDefault(); ev.stopPropagation(); return false;} return true; }, false); 
     49        } else if (elem.attachEvent) { 
     50            elem.attachEvent("onsubmit", function (ev) { if(!jForms.verifyForm(elem)) { window.event.cancelBubble = true ; window.event.returnValue = false; return false;} return true;}); 
     51        } 
    4552    }, 
    4653 
  • trunk/lib/jelix-www/js/jforms.js

    r859 r862  
    4343    declareForm : function(aForm){ 
    4444        this._forms[aForm.name]=aForm; 
     45        var elem = document.getElementById(aForm.name); 
     46 
     47        if (elem.addEventListener) { 
     48            elem.addEventListener("submit", function (ev) { if(!jForms.verifyForm(elem)) {ev.preventDefault(); ev.stopPropagation(); return false;} return true; }, false); 
     49        } else if (elem.attachEvent) { 
     50            elem.attachEvent("onsubmit", function (ev) { if(!jForms.verifyForm(elem)) { window.event.cancelBubble = true ; window.event.returnValue = false; return false;} return true;}); 
     51        } 
    4552    }, 
    4653 
  • trunk/lib/jelix-www/js/jforms.js

    r859 r862  
    4343    declareForm : function(aForm){ 
    4444        this._forms[aForm.name]=aForm; 
     45        var elem = document.getElementById(aForm.name); 
     46 
     47        if (elem.addEventListener) { 
     48            elem.addEventListener("submit", function (ev) { if(!jForms.verifyForm(elem)) {ev.preventDefault(); ev.stopPropagation(); return false;} return true; }, false); 
     49        } else if (elem.attachEvent) { 
     50            elem.attachEvent("onsubmit", function (ev) { if(!jForms.verifyForm(elem)) { window.event.cancelBubble = true ; window.event.returnValue = false; return false;} return true;}); 
     51        } 
    4552    }, 
    4653 
  • trunk/lib/jelix-www/wymeditor/config/default.js

    r841 r862  
    11 
    2 function jelix_wymeditor_simple(id) { 
     2function jelix_wymeditor_default(id) { 
    33 
    44  jQuery(function() { 
  • trunk/lib/jelix-www/wymeditor/config/default.js

    r841 r862  
    11 
    2 function jelix_wymeditor_simple(id) { 
     2function jelix_wymeditor_default(id) { 
    33 
    44  jQuery(function() { 
  • trunk/lib/jelix-www/wymeditor/config/default.js

    r841 r862  
    11 
    2 function jelix_wymeditor_simple(id) { 
     2function jelix_wymeditor_default(id) { 
    33 
    44  jQuery(function() { 
  • trunk/lib/jelix/core/defaultconfig.ini.php

    r843 r862  
    221221 
    222222[htmleditors] 
    223 wymeditor[]        = jelix/jquery/jquery.js 
    224 wymeditor[]        = jelix/wymeditor/jquery.wymeditor.js 
    225 wymeditor.config.simple = jelix/wymeditor/config/simple.js 
    226 wymeditor.skin.default  = jelix/wymeditor/skins/default/screen.css 
    227  
     223default.engine.name = wymeditor 
     224default.engine.file[] = jelix/jquery/jquery.js 
     225default.engine.file[] = jelix/wymeditor/jquery.wymeditor.js 
     226default.config = jelix/wymeditor/config/default.js 
     227default.skin.default  = jelix/wymeditor/skins/default/screen.css 
     228 
  • trunk/lib/jelix/core/defaultconfig.ini.php

    r843 r862  
    221221 
    222222[htmleditors] 
    223 wymeditor[]        = jelix/jquery/jquery.js 
    224 wymeditor[]        = jelix/wymeditor/jquery.wymeditor.js 
    225 wymeditor.config.simple = jelix/wymeditor/config/simple.js 
    226 wymeditor.skin.default  = jelix/wymeditor/skins/default/screen.css 
    227  
     223default.engine.name = wymeditor 
     224default.engine.file[] = jelix/jquery/jquery.js 
     225default.engine.file[] = jelix/wymeditor/jquery.wymeditor.js 
     226default.config = jelix/wymeditor/config/default.js 
     227default.skin.default  = jelix/wymeditor/skins/default/screen.css 
     228 
  • trunk/lib/jelix/core/defaultconfig.ini.php

    r843 r862  
    221221 
    222222[htmleditors] 
    223 wymeditor[]        = jelix/jquery/jquery.js 
    224 wymeditor[]        = jelix/wymeditor/jquery.wymeditor.js 
    225 wymeditor.config.simple = jelix/wymeditor/config/simple.js 
    226 wymeditor.skin.default  = jelix/wymeditor/skins/default/screen.css 
    227  
     223default.engine.name = wymeditor 
     224default.engine.file[] = jelix/jquery/jquery.js 
     225default.engine.file[] = jelix/wymeditor/jquery.wymeditor.js 
     226default.config = jelix/wymeditor/config/default.js 
     227default.skin.default  = jelix/wymeditor/skins/default/screen.css 
     228 
  • trunk/lib/jelix/forms/jFormsControl.class.php

    r841 r862  
    8888    public $rows=5; 
    8989    public $cols=40; 
    90     public $engine='wymeditor'; 
    91     public $config='simple'; 
     90    public $config='default'; 
    9291    public $skin='default'; 
    9392    function __construct($ref){ 
  • trunk/lib/jelix/forms/jFormsControl.class.php

    r841 r862  
    8888    public $rows=5; 
    8989    public $cols=40; 
    90     public $engine='wymeditor'; 
    91     public $config='simple'; 
     90    public $config='default'; 
    9291    public $skin='default'; 
    9392    function __construct($ref){ 
  • trunk/lib/jelix/forms/jFormsControl.class.php

    r841 r862  
    8888    public $rows=5; 
    8989    public $cols=40; 
    90     public $engine='wymeditor'; 
    91     public $config='simple'; 
     90    public $config='default'; 
    9291    public $skin='default'; 
    9392    function __construct($ref){ 
  • trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php

    r841 r862  
    2525    public function outputHeader($params){ 
    2626        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    27         echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
     27        echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'"'; 
    2828        if($this->_form->hasUpload()) 
    2929            echo ' enctype="multipart/form-data">'; 
     
    214214            break; 
    215215        case 'htmleditor': 
     216            $engine = $GLOBALS['gJConfig']->htmleditors[$ctrl->config.'.engine.name']; 
    216217            echo '<script type="text/javascript"> 
    217218            //<![CDATA[ 
    218             jelix_',$ctrl->engine,'_',$ctrl->config.'("',$this->_name,'_',$ctrl->ref,'"); 
     219            jelix_',$engine,'_',$ctrl->config.'("',$this->_name,'_',$ctrl->ref,'"); 
    219220            //]]> 
    220221            </script>'; 
  • trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php

    r841 r862  
    2525    public function outputHeader($params){ 
    2626        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    27         echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
     27        echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'"'; 
    2828        if($this->_form->hasUpload()) 
    2929            echo ' enctype="multipart/form-data">'; 
     
    214214            break; 
    215215        case 'htmleditor': 
     216            $engine = $GLOBALS['gJConfig']->htmleditors[$ctrl->config.'.engine.name']; 
    216217            echo '<script type="text/javascript"> 
    217218            //<![CDATA[ 
    218             jelix_',$ctrl->engine,'_',$ctrl->config.'("',$this->_name,'_',$ctrl->ref,'"); 
     219            jelix_',$engine,'_',$ctrl->config.'("',$this->_name,'_',$ctrl->ref,'"); 
    219220            //]]> 
    220221            </script>'; 
  • trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php

    r841 r862  
    2525    public function outputHeader($params){ 
    2626        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    27         echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
     27        echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'"'; 
    2828        if($this->_form->hasUpload()) 
    2929            echo ' enctype="multipart/form-data">'; 
     
    214214            break; 
    215215        case 'htmleditor': 
     216            $engine = $GLOBALS['gJConfig']->htmleditors[$ctrl->config.'.engine.name']; 
    216217            echo '<script type="text/javascript"> 
    217218            //<![CDATA[ 
    218             jelix_',$ctrl->engine,'_',$ctrl->config.'("',$this->_name,'_',$ctrl->ref,'"); 
     219            jelix_',$engine,'_',$ctrl->config.'("',$this->_name,'_',$ctrl->ref,'"); 
    219220            //]]> 
    220221            </script>'; 
  • trunk/lib/jelix/plugins/tpl/html/block.form.php

    r843 r862  
    7676        if($v instanceof jFormsBase && count($edlist = $v->getHtmlEditors())) { 
    7777            foreach($edlist as $ed) { 
    78                 if(isset($gJConfig->htmleditors[$ed->engine])){ 
    79                     if(is_array($gJConfig->htmleditors[$ed->engine])){ 
    80                         foreach($gJConfig->htmleditors[$ed->engine] as $url) { 
     78                if(isset($gJConfig->htmleditors[$ed->config.\'.engine.file\'])){ 
     79                    if(is_array($gJConfig->htmleditors[$ed->config.\'.engine.file\'])){ 
     80                        foreach($gJConfig->htmleditors[$ed->config.\'.engine.file\'] as $url) { 
    8181                            $gJCoord->response->addJSLink($bp.$url); 
    8282                        } 
    8383                    }else 
    84                         $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->engine]); 
     84                        $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.engine.file\']); 
    8585                } 
    86                 if(isset($gJConfig->htmleditors[$ed->engine.\'.config.\'.$ed->config])) 
    87                     $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->engine.\'.config.\'.$ed->config]); 
    88                 if(isset($gJConfig->htmleditors[$ed->engine.\'.skin.\'.$ed->skin])) 
    89                     $gJCoord->response->addCSSLink($bp.$gJConfig->htmleditors[$ed->engine.\'.skin.\'.$ed->skin]); 
     86                if(isset($gJConfig->htmleditors[$ed->config.\'.config\'])) 
     87                    $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.config\']); 
     88                if(isset($gJConfig->htmleditors[$ed->config.\'.skin.\'.$ed->skin])) 
     89                    $gJCoord->response->addCSSLink($bp.$gJConfig->htmleditors[$ed->config.\'.skin.\'.$ed->skin]); 
    9090            } 
    9191        } 
  • trunk/lib/jelix/plugins/tpl/html/block.form.php

    r843 r862  
    7676        if($v instanceof jFormsBase && count($edlist = $v->getHtmlEditors())) { 
    7777            foreach($edlist as $ed) { 
    78                 if(isset($gJConfig->htmleditors[$ed->engine])){ 
    79                     if(is_array($gJConfig->htmleditors[$ed->engine])){ 
    80                         foreach($gJConfig->htmleditors[$ed->engine] as $url) { 
     78                if(isset($gJConfig->htmleditors[$ed->config.\'.engine.file\'])){ 
     79                    if(is_array($gJConfig->htmleditors[$ed->config.\'.engine.file\'])){ 
     80                        foreach($gJConfig->htmleditors[$ed->config.\'.engine.file\'] as $url) { 
    8181                            $gJCoord->response->addJSLink($bp.$url); 
    8282                        } 
    8383                    }else 
    84                         $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->engine]); 
     84                        $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.engine.file\']); 
    8585                } 
    86                 if(isset($gJConfig->htmleditors[$ed->engine.\'.config.\'.$ed->config])) 
    87                     $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->engine.\'.config.\'.$ed->config]); 
    88                 if(isset($gJConfig->htmleditors[$ed->engine.\'.skin.\'.$ed->skin])) 
    89                     $gJCoord->response->addCSSLink($bp.$gJConfig->htmleditors[$ed->engine.\'.skin.\'.$ed->skin]); 
     86                if(isset($gJConfig->htmleditors[$ed->config.\'.config\'])) 
     87                    $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.config\']); 
     88                if(isset($gJConfig->htmleditors[$ed->config.\'.skin.\'.$ed->skin])) 
     89                    $gJCoord->response->addCSSLink($bp.$gJConfig->htmleditors[$ed->config.\'.skin.\'.$ed->skin]); 
    9090            } 
    9191        } 
  • trunk/lib/jelix/plugins/tpl/html/block.form.php

    r843 r862  
    7676        if($v instanceof jFormsBase && count($edlist = $v->getHtmlEditors())) { 
    7777            foreach($edlist as $ed) { 
    78                 if(isset($gJConfig->htmleditors[$ed->engine])){ 
    79                     if(is_array($gJConfig->htmleditors[$ed->engine])){ 
    80                         foreach($gJConfig->htmleditors[$ed->engine] as $url) { 
     78                if(isset($gJConfig->htmleditors[$ed->config.\'.engine.file\'])){ 
     79                    if(is_array($gJConfig->htmleditors[$ed->config.\'.engine.file\'])){ 
     80                        foreach($gJConfig->htmleditors[$ed->config.\'.engine.file\'] as $url) { 
    8181                            $gJCoord->response->addJSLink($bp.$url); 
    8282                        } 
    8383                    }else 
    84                         $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->engine]); 
     84                        $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.engine.file\']); 
    8585                } 
    86                 if(isset($gJConfig->htmleditors[$ed->engine.\'.config.\'.$ed->config])) 
    87                     $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->engine.\'.config.\'.$ed->config]); 
    88                 if(isset($gJConfig->htmleditors[$ed->engine.\'.skin.\'.$ed->skin])) 
    89                     $gJCoord->response->addCSSLink($bp.$gJConfig->htmleditors[$ed->engine.\'.skin.\'.$ed->skin]); 
     86                if(isset($gJConfig->htmleditors[$ed->config.\'.config\'])) 
     87                    $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.config\']); 
     88                if(isset($gJConfig->htmleditors[$ed->config.\'.skin.\'.$ed->skin])) 
     89                    $gJCoord->response->addCSSLink($bp.$gJConfig->htmleditors[$ed->config.\'.skin.\'.$ed->skin]); 
    9090            } 
    9191        } 
  • trunk/lib/jelix/plugins/tpl/html/cfunction.formfull.php

    r831 r862  
    3333    } 
    3434 
    35     $compiler->addMetaContent('if($GLOBALS[\'gJCoord\']->response!= null){ 
    36         $GLOBALS[\'gJCoord\']->response->addJSLink($GLOBALS[\'gJConfig\']->urlengine[\'jelixWWWPath\'].\'js/jforms.js\'); 
    37         $GLOBALS[\'gJCoord\']->response->addCSSLink($GLOBALS[\'gJConfig\']->urlengine[\'jelixWWWPath\'].\'design/jform.css\'); 
     35    $compiler->addMetaContent('global $gJCoord, $gJConfig; 
     36        if($gJCoord->response!= null){ 
     37            $www =$gJConfig->urlengine[\'jelixWWWPath\']; 
     38            $bp =$gJConfig->urlengine[\'basePath\']; 
     39            $gJCoord->response->addJSLink($www.\'js/jforms.js\'); 
     40            $gJCoord->response->addCSSLink($www.\'design/jform.css\'); 
     41            foreach($t->_vars as $k=>$v){ 
     42                if($v instanceof jFormsBase && count($edlist = $v->getHtmlEditors())) { 
     43                    foreach($edlist as $ed) { 
     44                        if(isset($gJConfig->htmleditors[$ed->config.\'.engine.file\'])){ 
     45                            if(is_array($gJConfig->htmleditors[$ed->config.\'.engine.file\'])){ 
     46                                foreach($gJConfig->htmleditors[$ed->config.\'.engine.file\'] as $url) { 
     47                                    $gJCoord->response->addJSLink($bp.$url); 
     48                                } 
     49                            }else 
     50                                $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.engine.file\']); 
     51                        } 
     52                        if(isset($gJConfig->htmleditors[$ed->config.\'.config\'])) 
     53                            $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.config\']); 
     54                        if(isset($gJConfig->htmleditors[$ed->config.\'.skin.\'.$ed->skin])) 
     55                            $gJCoord->response->addCSSLink($bp.$gJConfig->htmleditors[$ed->config.\'.skin.\'.$ed->skin]); 
     56                    } 
     57                } 
     58            } 
     59        } 
    3860    } 
    3961    '); 
  • trunk/lib/jelix/plugins/tpl/html/cfunction.formfull.php

    r831 r862  
    3333    } 
    3434 
    35     $compiler->addMetaContent('if($GLOBALS[\'gJCoord\']->response!= null){ 
    36         $GLOBALS[\'gJCoord\']->response->addJSLink($GLOBALS[\'gJConfig\']->urlengine[\'jelixWWWPath\'].\'js/jforms.js\'); 
    37         $GLOBALS[\'gJCoord\']->response->addCSSLink($GLOBALS[\'gJConfig\']->urlengine[\'jelixWWWPath\'].\'design/jform.css\'); 
     35    $compiler->addMetaContent('global $gJCoord, $gJConfig; 
     36        if($gJCoord->response!= null){ 
     37            $www =$gJConfig->urlengine[\'jelixWWWPath\']; 
     38            $bp =$gJConfig->urlengine[\'basePath\']; 
     39            $gJCoord->response->addJSLink($www.\'js/jforms.js\'); 
     40            $gJCoord->response->addCSSLink($www.\'design/jform.css\'); 
     41            foreach($t->_vars as $k=>$v){ 
     42                if($v instanceof jFormsBase && count($edlist = $v->getHtmlEditors())) { 
     43                    foreach($edlist as $ed) { 
     44                        if(isset($gJConfig->htmleditors[$ed->config.\'.engine.file\'])){ 
     45                            if(is_array($gJConfig->htmleditors[$ed->config.\'.engine.file\'])){ 
     46                                foreach($gJConfig->htmleditors[$ed->config.\'.engine.file\'] as $url) { 
     47                                    $gJCoord->response->addJSLink($bp.$url); 
     48                                } 
     49                            }else 
     50                                $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.engine.file\']); 
     51                        } 
     52                        if(isset($gJConfig->htmleditors[$ed->config.\'.config\'])) 
     53                            $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.config\']); 
     54                        if(isset($gJConfig->htmleditors[$ed->config.\'.skin.\'.$ed->skin])) 
     55                            $gJCoord->response->addCSSLink($bp.$gJConfig->htmleditors[$ed->config.\'.skin.\'.$ed->skin]); 
     56                    } 
     57                } 
     58            } 
     59        } 
    3860    } 
    3961    '); 
  • trunk/lib/jelix/plugins/tpl/html/cfunction.formfull.php

    r831 r862  
    3333    } 
    3434 
    35     $compiler->addMetaContent('if($GLOBALS[\'gJCoord\']->response!= null){ 
    36         $GLOBALS[\'gJCoord\']->response->addJSLink($GLOBALS[\'gJConfig\']->urlengine[\'jelixWWWPath\'].\'js/jforms.js\'); 
    37         $GLOBALS[\'gJCoord\']->response->addCSSLink($GLOBALS[\'gJConfig\']->urlengine[\'jelixWWWPath\'].\'design/jform.css\'); 
     35    $compiler->addMetaContent('global $gJCoord, $gJConfig; 
     36        if($gJCoord->response!= null){ 
     37            $www =$gJConfig->urlengine[\'jelixWWWPath\']; 
     38            $bp =$gJConfig->urlengine[\'basePath\']; 
     39            $gJCoord->response->addJSLink($www.\'js/jforms.js\'); 
     40            $gJCoord->response->addCSSLink($www.\'design/jform.css\'); 
     41            foreach($t->_vars as $k=>$v){ 
     42                if($v instanceof jFormsBase && count($edlist = $v->getHtmlEditors())) { 
     43                    foreach($edlist as $ed) { 
     44                        if(isset($gJConfig->htmleditors[$ed->config.\'.engine.file\'])){ 
     45                            if(is_array($gJConfig->htmleditors[$ed->config.\'.engine.file\'])){ 
     46                                foreach($gJConfig->htmleditors[$ed->config.\'.engine.file\'] as $url) { 
     47                                    $gJCoord->response->addJSLink($bp.$url); 
     48                                } 
     49                            }else 
     50                                $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.engine.file\']); 
     51                        } 
     52                        if(isset($gJConfig->htmleditors[$ed->config.\'.config\'])) 
     53                            $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.config\']); 
     54                        if(isset($gJConfig->htmleditors[$ed->config.\'.skin.\'.$ed->skin])) 
     55                            $gJCoord->response->addCSSLink($bp.$gJConfig->htmleditors[$ed->config.\'.skin.\'.$ed->skin]); 
     56                    } 
     57                } 
     58            } 
     59        } 
    3860    } 
    3961    '); 
  • trunk/lib/jelix/plugins/tpl/html/function.formdatafull.php

    r840 r862  
    3737            } 
    3838            echo substr($s, 1); 
     39        }elseif($ctrl->datatype instanceof jDatatypeHtml) { 
     40            echo $value; 
    3941        }else 
    4042            echo htmlspecialchars($value); 
  • trunk/lib/jelix/plugins/tpl/html/function.formdatafull.php

    r840 r862  
    3737            } 
    3838            echo substr($s, 1); 
     39        }elseif($ctrl->datatype instanceof jDatatypeHtml) { 
     40            echo $value; 
    3941        }else 
    4042            echo htmlspecialchars($value); 
  • trunk/lib/jelix/plugins/tpl/html/function.formdatafull.php

    r840 r862  
    3737            } 
    3838            echo substr($s, 1); 
     39        }elseif($ctrl->datatype instanceof jDatatypeHtml) { 
     40            echo $value; 
    3941        }else 
    4042            echo htmlspecialchars($value); 
  • trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php

    r841 r862  
    299299</captcha>', 
    30030072=>'<htmleditor ref="contenu" xmlns="http://jelix.org/ns/forms/1.0"> 
     301    <label>Texte</label> 
     302</htmleditor>', 
     30373=>'<htmleditor ref="contenu" config="simple" xmlns="http://jelix.org/ns/forms/1.0"> 
    301304    <label>Texte</label> 
    302305</htmleditor>', 
     
    676679$ctrl->label=\'Texte\'; 
    677680$this->addControl($ctrl);', 
     68173=>'$ctrl= new jFormsControlhtmleditor(\'contenu\'); 
     682$ctrl->label=\'Texte\'; 
     683$ctrl->config=\'simple\'; 
     684$this->addControl($ctrl);', 
    678685); 
    679686 
     
    10511058$js.="jForms.tForm.addControl( jForms.tControl);\n";', 
    1052105972=>'$label = \'Texte\'; 
     1060$js.="jForms.tControl = new jFormsControl(\'contenu\', \'".str_replace("\'","\\\'",$label)."\', \'string\');\n"; 
     1061$js.="jForms.tControl.errRequired=\'".str_replace("\'","\\\'",jLocale::get(\'jelix~formserr.js.err.required\',$label))."\';\n"; 
     1062$js.="jForms.tControl.errInvalid =\'".str_replace("\'","\\\'",jLocale::get(\'jelix~formserr.js.err.invalid\', $label))."\';\n"; 
     1063$js.="jForms.tForm.addControl( jForms.tControl);\n";', 
     106473=>'$label = \'Texte\'; 
    10531065$js.="jForms.tControl = new jFormsControl(\'contenu\', \'".str_replace("\'","\\\'",$label)."\', \'string\');\n"; 
    10541066$js.="jForms.tControl.errRequired=\'".str_replace("\'","\\\'",jLocale::get(\'jelix~formserr.js.err.required\',$label))."\';\n"; 
  • trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php

    r841 r862  
    299299</captcha>', 
    30030072=>'<htmleditor ref="contenu" xmlns="http://jelix.org/ns/forms/1.0"> 
     301    <label>Texte</label> 
     302</htmleditor>', 
     30373=>'<htmleditor ref="contenu" config="simple" xmlns="http://jelix.org/ns/forms/1.0"> 
    301304    <label>Texte</label> 
    302305</htmleditor>', 
     
    676679$ctrl->label=\'Texte\'; 
    677680$this->addControl($ctrl);', 
     68173=>'$ctrl= new jFormsControlhtmleditor(\'contenu\'); 
     682$ctrl->label=\'Texte\'; 
     683$ctrl->config=\'simple\'; 
     684$this->addControl($ctrl);', 
    678685); 
    679686 
     
    10511058$js.="jForms.tForm.addControl( jForms.tControl);\n";', 
    1052105972=>'$label = \'Texte\'; 
     1060$js.="jForms.tControl = new jFormsControl(\'contenu\', \'".str_replace("\'","\\\'",$label)."\', \'string\');\n"; 
     1061$js.="jForms.tControl.errRequired=\'".str_replace("\'","\\\'",jLocale::get(\'jelix~formserr.js.err.required\',$label))."\';\n"; 
     1062$js.="jForms.tControl.errInvalid =\'".str_replace("\'","\\\'",jLocale::get(\'jelix~formserr.js.err.invalid\', $label))."\';\n"; 
     1063$js.="jForms.tForm.addControl( jForms.tControl);\n";', 
     106473=>'$label = \'Texte\'; 
    10531065$js.="jForms.tControl = new jFormsControl(\'contenu\', \'".str_replace("\'","\\\'",$label)."\', \'string\');\n"; 
    10541066$js.="jForms.tControl.errRequired=\'".str_replace("\'","\\\'",jLocale::get(\'jelix~formserr.js.err.required\',$label))."\';\n"; 
  • trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php

    r841 r862  
    299299</captcha>', 
    30030072=>'<htmleditor ref="contenu" xmlns="http://jelix.org/ns/forms/1.0"> 
     301    <label>Texte</label> 
     302</htmleditor>', 
     30373=>'<htmleditor ref="contenu" config="simple" xmlns="http://jelix.org/ns/forms/1.0"> 
    301304    <label>Texte</label> 
    302305</htmleditor>', 
     
    676679$ctrl->label=\'Texte\'; 
    677680$this->addControl($ctrl);', 
     68173=>'$ctrl= new jFormsControlhtmleditor(\'contenu\'); 
     682$ctrl->label=\'Texte\'; 
     683$ctrl->config=\'simple\'; 
     684$this->addControl($ctrl);', 
    678685); 
    679686 
     
    10511058$js.="jForms.tForm.addControl( jForms.tControl);\n";', 
    1052105972=>'$label = \'Texte\'; 
     1060$js.="jForms.tControl = new jFormsControl(\'contenu\', \'".str_replace("\'","\\\'",$label)."\', \'string\');\n"; 
     1061$js.="jForms.tControl.errRequired=\'".str_replace("\'","\\\'",jLocale::get(\'jelix~formserr.js.err.required\',$label))."\';\n"; 
     1062$js.="jForms.tControl.errInvalid =\'".str_replace("\'","\\\'",jLocale::get(\'jelix~formserr.js.err.invalid\', $label))."\';\n"; 
     1063$js.="jForms.tForm.addControl( jForms.tControl);\n";', 
     106473=>'$label = \'Texte\'; 
    10531065$js.="jForms.tControl = new jFormsControl(\'contenu\', \'".str_replace("\'","\\\'",$label)."\', \'string\');\n"; 
    10541066$js.="jForms.tControl.errRequired=\'".str_replace("\'","\\\'",jLocale::get(\'jelix~formserr.js.err.required\',$label))."\';\n"; 
  • trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html_cli.php

    r843 r862  
    8989        $builder->outputHeader(array('','','post')); 
    9090        $out = ob_get_clean(); 
    91         $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$formname.'" onsubmit="return jForms.verifyForm(this)"><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> 
     91        $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$formname.'"><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> 
    9292<input type="hidden" name="action" value="urlsig:url1"/> 
    9393</div><script type="text/javascript"> 
     
    103103        $builder->outputHeader(array('','','get')); 
    104104        $out = ob_get_clean(); 
    105         $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="get" id="'.$formname.'" onsubmit="return jForms.verifyForm(this)"><div class="jforms-hiddens"><input type="hidden" name="foo" value="b&gt;ar"/> 
     105        $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="get" id="'.$formname.'"><div class="jforms-hiddens"><input type="hidden" name="foo" value="b&gt;ar"/> 
    106106<input type="hidden" name="module" value="jelix_tests"/> 
    107107<input type="hidden" name="action" value="urlsig:url1"/> 
     
    670670        $builder->outputHeader(array('','','post')); 
    671671        $out = ob_get_clean(); 
    672         $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$formname.'" onsubmit="return jForms.verifyForm(this)"><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> 
     672        $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$formname.'"><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> 
    673673<input type="hidden" name="action" value="urlsig:url1"/> 
    674674<input type="hidden" name="nom" id="'.$formname.'_nom" value=""/> 
     
    688688        $builder->outputHeader(array('','','post')); 
    689689        $out = ob_get_clean(); 
    690         $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$formname.'" onsubmit="return jForms.verifyForm(this)"><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> 
     690        $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$formname.'"><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> 
    691691<input type="hidden" name="action" value="urlsig:url1"/> 
    692692<input type="hidden" name="nom" id="'.$formname.'_nom" value="toto"/> 
     
    743743        $this->assertEqualOrDiff('<script type="text/javascript"> 
    744744            //<![CDATA[ 
    745             jelix_wymeditor_simple("'.$this->formname.'_contenu"); 
     745            jelix_wymeditor_default("'.$this->formname.'_contenu"); 
    746746            //]]> 
    747747            </script><textarea name="contenu" id="'.$this->formname.'_contenu" rows="5" cols="40">&lt;p&gt;Ceci est un contenu&lt;/p&gt;</textarea>', $out); 
     
    751751        $this->assertEqualOrDiff('<script type="text/javascript"> 
    752752            //<![CDATA[ 
    753             jelix_wymeditor_simple("'.$this->formname.'_contenu"); 
     753            jelix_wymeditor_default("'.$this->formname.'_contenu"); 
    754754            //]]> 
    755755            </script><textarea name="contenu" id="'.$this->formname.'_contenu" readonly="readonly" rows="5" cols="40">&lt;p&gt;Ceci est un contenu&lt;/p&gt;</textarea>', $out); 
     
    762762        $this->assertEqualOrDiff('<script type="text/javascript"> 
    763763            //<![CDATA[ 
    764             jelix_wymeditor_simple("'.$this->formname.'_contenu"); 
     764            jelix_wymeditor_default("'.$this->formname.'_contenu"); 
    765765            //]]> 
    766766            </script><textarea name="contenu" id="'.$this->formname.'_contenu" readonly="readonly" title="ceci est un tooltip" rows="5" cols="40">&lt;p&gt;Ceci est un contenu&lt;/p&gt;</textarea>', $out); 
     
    770770        $this->assertEqualOrDiff('<script type="text/javascript"> 
    771771            //<![CDATA[ 
    772             jelix_wymeditor_simple("'.$this->formname.'_contenu"); 
     772            jelix_wymeditor_default("'.$this->formname.'_contenu"); 
    773773            //]]> 
    774774            </script><textarea name="contenu" id="'.$this->formname.'_contenu" readonly="readonly" title="ceci est un tooltip" rows="20" cols="40">&lt;p&gt;Ceci est un contenu&lt;/p&gt;</textarea>', $out); 
     
    778778        $this->assertEqualOrDiff('<script type="text/javascript"> 
    779779            //<![CDATA[ 
    780             jelix_wymeditor_simple("'.$this->formname.'_contenu"); 
     780            jelix_wymeditor_default("'.$this->formname.'_contenu"); 
    781781            //]]> 
    782782            </script><textarea name="contenu" id="'.$this->formname.'_contenu" readonly="readonly" title="ceci est un tooltip" rows="20" cols="60">&lt;p&gt;Ceci est un contenu&lt;/p&gt;</textarea>', $out); 
  • trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html_cli.php

    r843 r862  
    8989        $builder->outputHeader(array('','','post')); 
    9090        $out = ob_get_clean(); 
    91         $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$formname.'" onsubmit="return jForms.verifyForm(this)"><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> 
     91        $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$formname.'"><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> 
    9292<input type="hidden" name="action" value="urlsig:url1"/> 
    9393</div><script type="text/javascript"> 
     
    103103        $builder->outputHeader(array('','','get')); 
    104104        $out = ob_get_clean(); 
    105         $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="get" id="'.$formname.'" onsubmit="return jForms.verifyForm(this)"><div class="jforms-hiddens"><input type="hidden" name="foo" value="b&gt;ar"/> 
     105        $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="get" id="'.$formname.'"><div class="jforms-hiddens"><input type="hidden" name="foo" value="b&gt;ar"/> 
    106106<input type="hidden" name="module" value="jelix_tests"/> 
    107107<input type="hidden" name="action" value="urlsig:url1"/> 
     
    670670        $builder->outputHeader(array('','','post')); 
    671671        $out = ob_get_clean(); 
    672         $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$formname.'" onsubmit="return jForms.verifyForm(this)"><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> 
     672        $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$formname.'"><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> 
    673673<input type="hidden" name="action" value="urlsig:url1"/> 
    674674<input type="hidden" name="nom" id="'.$formname.'_nom" value=""/> 
     
    688688        $builder->outputHeader(array('','','post')); 
    689689        $out = ob_get_clean(); 
    690         $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$formname.'" onsubmit="return jForms.verifyForm(this)"><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> 
     690        $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$formname.'"><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> 
    691691<input type="hidden" name="action" value="urlsig:url1"/> 
    692692<input type="hidden" name="nom" id="'.$formname.'_nom" value="toto"/> 
     
    743743        $this->assertEqualOrDiff('<script type="text/javascript"> 
    744