Changeset 862
- Timestamp:
- 04/04/08 14:49:15 (8 months ago)
- Files:
-
- trunk/build/manifests/jelix-lib.mn (modified) (1 diff)
- trunk/build/manifests/jelix-lib.mn (modified) (1 diff)
- trunk/build/manifests/jelix-lib.mn (modified) (1 diff)
- trunk/lib/jelix-www/js/jforms.js (modified) (1 diff)
- trunk/lib/jelix-www/js/jforms.js (modified) (1 diff)
- trunk/lib/jelix-www/js/jforms.js (modified) (1 diff)
- trunk/lib/jelix-www/wymeditor/config/default.js (moved) (moved from trunk/lib/jelix-www/wymeditor/config/simple.js) (1 diff)
- trunk/lib/jelix-www/wymeditor/config/default.js (moved) (moved from trunk/lib/jelix-www/wymeditor/config/simple.js) (1 diff)
- trunk/lib/jelix-www/wymeditor/config/default.js (moved) (moved from trunk/lib/jelix-www/wymeditor/config/simple.js) (1 diff)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (1 diff)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (1 diff)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (1 diff)
- trunk/lib/jelix/forms/jFormsControl.class.php (modified) (1 diff)
- trunk/lib/jelix/forms/jFormsControl.class.php (modified) (1 diff)
- trunk/lib/jelix/forms/jFormsControl.class.php (modified) (1 diff)
- trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php (modified) (2 diffs)
- trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php (modified) (2 diffs)
- trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php (modified) (2 diffs)
- trunk/lib/jelix/plugins/tpl/html/block.form.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/block.form.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/block.form.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/cfunction.formfull.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/cfunction.formfull.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/cfunction.formfull.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/function.formdatafull.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/function.formdatafull.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/function.formdatafull.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php (modified) (3 diffs)
- trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php (modified) (3 diffs)
- trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php (modified) (3 diffs)
- trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html_cli.php (modified) (9 diffs)
- trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html_cli.php (modified) (9 diffs)
- trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html_cli.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/manifests/jelix-lib.mn
r842 r862 565 565 icons.png 566 566 cd lib/jelix-www/wymeditor/config 567 c simple.js567 c default.js 568 568 cd lib/jelix-www/jquery 569 569 GPL-LICENSE.txt trunk/build/manifests/jelix-lib.mn
r842 r862 565 565 icons.png 566 566 cd lib/jelix-www/wymeditor/config 567 c simple.js567 c default.js 568 568 cd lib/jelix-www/jquery 569 569 GPL-LICENSE.txt trunk/build/manifests/jelix-lib.mn
r842 r862 565 565 icons.png 566 566 cd lib/jelix-www/wymeditor/config 567 c simple.js567 c default.js 568 568 cd lib/jelix-www/jquery 569 569 GPL-LICENSE.txt trunk/lib/jelix-www/js/jforms.js
r859 r862 43 43 declareForm : function(aForm){ 44 44 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 } 45 52 }, 46 53 trunk/lib/jelix-www/js/jforms.js
r859 r862 43 43 declareForm : function(aForm){ 44 44 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 } 45 52 }, 46 53 trunk/lib/jelix-www/js/jforms.js
r859 r862 43 43 declareForm : function(aForm){ 44 44 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 } 45 52 }, 46 53 trunk/lib/jelix-www/wymeditor/config/default.js
r841 r862 1 1 2 function jelix_wymeditor_ simple(id) {2 function jelix_wymeditor_default(id) { 3 3 4 4 jQuery(function() { trunk/lib/jelix-www/wymeditor/config/default.js
r841 r862 1 1 2 function jelix_wymeditor_ simple(id) {2 function jelix_wymeditor_default(id) { 3 3 4 4 jQuery(function() { trunk/lib/jelix-www/wymeditor/config/default.js
r841 r862 1 1 2 function jelix_wymeditor_ simple(id) {2 function jelix_wymeditor_default(id) { 3 3 4 4 jQuery(function() { trunk/lib/jelix/core/defaultconfig.ini.php
r843 r862 221 221 222 222 [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 223 default.engine.name = wymeditor 224 default.engine.file[] = jelix/jquery/jquery.js 225 default.engine.file[] = jelix/wymeditor/jquery.wymeditor.js 226 default.config = jelix/wymeditor/config/default.js 227 default.skin.default = jelix/wymeditor/skins/default/screen.css 228 trunk/lib/jelix/core/defaultconfig.ini.php
r843 r862 221 221 222 222 [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 223 default.engine.name = wymeditor 224 default.engine.file[] = jelix/jquery/jquery.js 225 default.engine.file[] = jelix/wymeditor/jquery.wymeditor.js 226 default.config = jelix/wymeditor/config/default.js 227 default.skin.default = jelix/wymeditor/skins/default/screen.css 228 trunk/lib/jelix/core/defaultconfig.ini.php
r843 r862 221 221 222 222 [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 223 default.engine.name = wymeditor 224 default.engine.file[] = jelix/jquery/jquery.js 225 default.engine.file[] = jelix/wymeditor/jquery.wymeditor.js 226 default.config = jelix/wymeditor/config/default.js 227 default.skin.default = jelix/wymeditor/skins/default/screen.css 228 trunk/lib/jelix/forms/jFormsControl.class.php
r841 r862 88 88 public $rows=5; 89 89 public $cols=40; 90 public $engine='wymeditor'; 91 public $config='simple'; 90 public $config='default'; 92 91 public $skin='default'; 93 92 function __construct($ref){ trunk/lib/jelix/forms/jFormsControl.class.php
r841 r862 88 88 public $rows=5; 89 89 public $cols=40; 90 public $engine='wymeditor'; 91 public $config='simple'; 90 public $config='default'; 92 91 public $skin='default'; 93 92 function __construct($ref){ trunk/lib/jelix/forms/jFormsControl.class.php
r841 r862 88 88 public $rows=5; 89 89 public $cols=40; 90 public $engine='wymeditor'; 91 public $config='simple'; 90 public $config='default'; 92 91 public $skin='default'; 93 92 function __construct($ref){ trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php
r841 r862 25 25 public function outputHeader($params){ 26 26 $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,'"'; 28 28 if($this->_form->hasUpload()) 29 29 echo ' enctype="multipart/form-data">'; … … 214 214 break; 215 215 case 'htmleditor': 216 $engine = $GLOBALS['gJConfig']->htmleditors[$ctrl->config.'.engine.name']; 216 217 echo '<script type="text/javascript"> 217 218 //<![CDATA[ 218 jelix_',$ ctrl->engine,'_',$ctrl->config.'("',$this->_name,'_',$ctrl->ref,'");219 jelix_',$engine,'_',$ctrl->config.'("',$this->_name,'_',$ctrl->ref,'"); 219 220 //]]> 220 221 </script>'; trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php
r841 r862 25 25 public function outputHeader($params){ 26 26 $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,'"'; 28 28 if($this->_form->hasUpload()) 29 29 echo ' enctype="multipart/form-data">'; … … 214 214 break; 215 215 case 'htmleditor': 216 $engine = $GLOBALS['gJConfig']->htmleditors[$ctrl->config.'.engine.name']; 216 217 echo '<script type="text/javascript"> 217 218 //<![CDATA[ 218 jelix_',$ ctrl->engine,'_',$ctrl->config.'("',$this->_name,'_',$ctrl->ref,'");219 jelix_',$engine,'_',$ctrl->config.'("',$this->_name,'_',$ctrl->ref,'"); 219 220 //]]> 220 221 </script>'; trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php
r841 r862 25 25 public function outputHeader($params){ 26 26 $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,'"'; 28 28 if($this->_form->hasUpload()) 29 29 echo ' enctype="multipart/form-data">'; … … 214 214 break; 215 215 case 'htmleditor': 216 $engine = $GLOBALS['gJConfig']->htmleditors[$ctrl->config.'.engine.name']; 216 217 echo '<script type="text/javascript"> 217 218 //<![CDATA[ 218 jelix_',$ ctrl->engine,'_',$ctrl->config.'("',$this->_name,'_',$ctrl->ref,'");219 jelix_',$engine,'_',$ctrl->config.'("',$this->_name,'_',$ctrl->ref,'"); 219 220 //]]> 220 221 </script>'; trunk/lib/jelix/plugins/tpl/html/block.form.php
r843 r862 76 76 if($v instanceof jFormsBase && count($edlist = $v->getHtmlEditors())) { 77 77 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) { 81 81 $gJCoord->response->addJSLink($bp.$url); 82 82 } 83 83 }else 84 $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed-> engine]);84 $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.engine.file\']); 85 85 } 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]); 90 90 } 91 91 } trunk/lib/jelix/plugins/tpl/html/block.form.php
r843 r862 76 76 if($v instanceof jFormsBase && count($edlist = $v->getHtmlEditors())) { 77 77 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) { 81 81 $gJCoord->response->addJSLink($bp.$url); 82 82 } 83 83 }else 84 $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed-> engine]);84 $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.engine.file\']); 85 85 } 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]); 90 90 } 91 91 } trunk/lib/jelix/plugins/tpl/html/block.form.php
r843 r862 76 76 if($v instanceof jFormsBase && count($edlist = $v->getHtmlEditors())) { 77 77 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) { 81 81 $gJCoord->response->addJSLink($bp.$url); 82 82 } 83 83 }else 84 $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed-> engine]);84 $gJCoord->response->addJSLink($bp.$gJConfig->htmleditors[$ed->config.\'.engine.file\']); 85 85 } 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]); 90 90 } 91 91 } trunk/lib/jelix/plugins/tpl/html/cfunction.formfull.php
r831 r862 33 33 } 34 34 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 } 38 60 } 39 61 '); trunk/lib/jelix/plugins/tpl/html/cfunction.formfull.php
r831 r862 33 33 } 34 34 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 } 38 60 } 39 61 '); trunk/lib/jelix/plugins/tpl/html/cfunction.formfull.php
r831 r862 33 33 } 34 34 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 } 38 60 } 39 61 '); trunk/lib/jelix/plugins/tpl/html/function.formdatafull.php
r840 r862 37 37 } 38 38 echo substr($s, 1); 39 }elseif($ctrl->datatype instanceof jDatatypeHtml) { 40 echo $value; 39 41 }else 40 42 echo htmlspecialchars($value); trunk/lib/jelix/plugins/tpl/html/function.formdatafull.php
r840 r862 37 37 } 38 38 echo substr($s, 1); 39 }elseif($ctrl->datatype instanceof jDatatypeHtml) { 40 echo $value; 39 41 }else 40 42 echo htmlspecialchars($value); trunk/lib/jelix/plugins/tpl/html/function.formdatafull.php
r840 r862 37 37 } 38 38 echo substr($s, 1); 39 }elseif($ctrl->datatype instanceof jDatatypeHtml) { 40 echo $value; 39 41 }else 40 42 echo htmlspecialchars($value); trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php
r841 r862 299 299 </captcha>', 300 300 72=>'<htmleditor ref="contenu" xmlns="http://jelix.org/ns/forms/1.0"> 301 <label>Texte</label> 302 </htmleditor>', 303 73=>'<htmleditor ref="contenu" config="simple" xmlns="http://jelix.org/ns/forms/1.0"> 301 304 <label>Texte</label> 302 305 </htmleditor>', … … 676 679 $ctrl->label=\'Texte\'; 677 680 $this->addControl($ctrl);', 681 73=>'$ctrl= new jFormsControlhtmleditor(\'contenu\'); 682 $ctrl->label=\'Texte\'; 683 $ctrl->config=\'simple\'; 684 $this->addControl($ctrl);', 678 685 ); 679 686 … … 1051 1058 $js.="jForms.tForm.addControl( jForms.tControl);\n";', 1052 1059 72=>'$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";', 1064 73=>'$label = \'Texte\'; 1053 1065 $js.="jForms.tControl = new jFormsControl(\'contenu\', \'".str_replace("\'","\\\'",$label)."\', \'string\');\n"; 1054 1066 $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 299 299 </captcha>', 300 300 72=>'<htmleditor ref="contenu" xmlns="http://jelix.org/ns/forms/1.0"> 301 <label>Texte</label> 302 </htmleditor>', 303 73=>'<htmleditor ref="contenu" config="simple" xmlns="http://jelix.org/ns/forms/1.0"> 301 304 <label>Texte</label> 302 305 </htmleditor>', … … 676 679 $ctrl->label=\'Texte\'; 677 680 $this->addControl($ctrl);', 681 73=>'$ctrl= new jFormsControlhtmleditor(\'contenu\'); 682 $ctrl->label=\'Texte\'; 683 $ctrl->config=\'simple\'; 684 $this->addControl($ctrl);', 678 685 ); 679 686 … … 1051 1058 $js.="jForms.tForm.addControl( jForms.tControl);\n";', 1052 1059 72=>'$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";', 1064 73=>'$label = \'Texte\'; 1053 1065 $js.="jForms.tControl = new jFormsControl(\'contenu\', \'".str_replace("\'","\\\'",$label)."\', \'string\');\n"; 1054 1066 $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 299 299 </captcha>', 300 300 72=>'<htmleditor ref="contenu" xmlns="http://jelix.org/ns/forms/1.0"> 301 <label>Texte</label> 302 </htmleditor>', 303 73=>'<htmleditor ref="contenu" config="simple" xmlns="http://jelix.org/ns/forms/1.0"> 301 304 <label>Texte</label> 302 305 </htmleditor>', … … 676 679 $ctrl->label=\'Texte\'; 677 680 $this->addControl($ctrl);', 681 73=>'$ctrl= new jFormsControlhtmleditor(\'contenu\'); 682 $ctrl->label=\'Texte\'; 683 $ctrl->config=\'simple\'; 684 $this->addControl($ctrl);', 678 685 ); 679 686 … … 1051 1058 $js.="jForms.tForm.addControl( jForms.tControl);\n";', 1052 1059 72=>'$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";', 1064 73=>'$label = \'Texte\'; 1053 1065 $js.="jForms.tControl = new jFormsControl(\'contenu\', \'".str_replace("\'","\\\'",$label)."\', \'string\');\n"; 1054 1066 $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 89 89 $builder->outputHeader(array('','','post')); 90 90 $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"/> 92 92 <input type="hidden" name="action" value="urlsig:url1"/> 93 93 </div><script type="text/javascript"> … … 103 103 $builder->outputHeader(array('','','get')); 104 104 $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>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>ar"/> 106 106 <input type="hidden" name="module" value="jelix_tests"/> 107 107 <input type="hidden" name="action" value="urlsig:url1"/> … … 670 670 $builder->outputHeader(array('','','post')); 671 671 $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"/> 673 673 <input type="hidden" name="action" value="urlsig:url1"/> 674 674 <input type="hidden" name="nom" id="'.$formname.'_nom" value=""/> … … 688 688 $builder->outputHeader(array('','','post')); 689 689 $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"/> 691 691 <input type="hidden" name="action" value="urlsig:url1"/> 692 692 <input type="hidden" name="nom" id="'.$formname.'_nom" value="toto"/> … … 743 743 $this->assertEqualOrDiff('<script type="text/javascript"> 744 744 //<![CDATA[ 745 jelix_wymeditor_ simple("'.$this->formname.'_contenu");745 jelix_wymeditor_default("'.$this->formname.'_contenu"); 746 746 //]]> 747 747 </script><textarea name="contenu" id="'.$this->formname.'_contenu" rows="5" cols="40"><p>Ceci est un contenu</p></textarea>', $out); … … 751 751 $this->assertEqualOrDiff('<script type="text/javascript"> 752 752 //<![CDATA[ 753 jelix_wymeditor_ simple("'.$this->formname.'_contenu");753 jelix_wymeditor_default("'.$this->formname.'_contenu"); 754 754 //]]> 755 755 </script><textarea name="contenu" id="'.$this->formname.'_contenu" readonly="readonly" rows="5" cols="40"><p>Ceci est un contenu</p></textarea>', $out); … … 762 762 $this->assertEqualOrDiff('<script type="text/javascript"> 763 763 //<![CDATA[ 764 jelix_wymeditor_ simple("'.$this->formname.'_contenu");764 jelix_wymeditor_default("'.$this->formname.'_contenu"); 765 765 //]]> 766 766 </script><textarea name="contenu" id="'.$this->formname.'_contenu" readonly="readonly" title="ceci est un tooltip" rows="5" cols="40"><p>Ceci est un contenu</p></textarea>', $out); … … 770 770 $this->assertEqualOrDiff('<script type="text/javascript"> 771 771 //<![CDATA[ 772 jelix_wymeditor_ simple("'.$this->formname.'_contenu");772 jelix_wymeditor_default("'.$this->formname.'_contenu"); 773 773 //]]> 774 774 </script><textarea name="contenu" id="'.$this->formname.'_contenu" readonly="readonly" title="ceci est un tooltip" rows="20" cols="40"><p>Ceci est un contenu</p></textarea>', $out); … … 778 778 $this->assertEqualOrDiff('<script type="text/javascript"> 779 779 //<![CDATA[ 780 jelix_wymeditor_ simple("'.$this->formname.'_contenu");780 jelix_wymeditor_default("'.$this->formname.'_contenu"); 781 781 //]]> 782 782 </script><textarea name="contenu" id="'.$this->formname.'_contenu" readonly="readonly" title="ceci est un tooltip" rows="20" cols="60"><p>Ceci est un contenu</p></textarea>', $out); trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html_cli.php
r843 r862 89 89 $builder->outputHeader(array('','','post')); 90 90 $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"/> 92 92 <input type="hidden" name="action" value="urlsig:url1"/> 93 93 </div><script type="text/javascript"> … … 103 103 $builder->outputHeader(array('','','get')); 104 104 $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>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>ar"/> 106 106 <input type="hidden" name="module" value="jelix_tests"/> 107 107 <input type="hidden" name="action" value="urlsig:url1"/> … … 670 670 $builder->outputHeader(array('','','post')); 671 671 $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"/> 673 673 <input type="hidden" name="action" value="urlsig:url1"/> 674 674 <input type="hidden" name="nom" id="'.$formname.'_nom" value=""/> … … 688 688 $builder->outputHeader(array('','','post')); 689 689 $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"/> 691 691 <input type="hidden" name="action" value="urlsig:url1"/> 692 692 <input type="hidden" name="nom" id="'.$formname.'_nom" value="toto"/> … … 743 743 $this->assertEqualOrDiff('<script type="text/javascript"> 744
