Changeset 7141
- Timestamp:
- 01/22/08 07:25:27 (7 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/ddAccessibleFormPlugin/README
r6993 r7141 25 25 }}} 26 26 27 == jQuery==27 == Javascript == 28 28 29 29 The `cmxform.js` forces `label` tags to use the `inline-box` display style. … … 32 32 `SF_JQUERY_WEB_DIR` setting. 33 33 34 It's not recommended to mix multiple libraries. If you use YUI, moo tools or 34 Alternately you may use the Yahoo User Interface library. For this to work, 35 set `SF_JS_LIB` to `yui` and set `SF_YUI_WEB_DIR` to the proper location. 36 If you are using hosted YUI, you can have a setting like so in your 37 `settings.yml`: 38 39 {{{ 40 yui_web_dir: http://yui.yahooapis.com/2.4.1/build/ 41 }}} 42 43 It's not recommended to mix multiple libraries. If you use dojo, moo tools or 35 44 prototype, it might be wise to create an alternate `cmxform.js` for your 36 45 platform. If you create such a package please let the maintainer (Dave Dash) … … 46 55 47 56 2008-01-07 Updated README 57 2008-01-21 Added YUI support, cleaned up jQuery code. 48 58 49 59 == Todo == 50 60 51 * Impliment in YUI52 61 * Impliment in moo tools 53 62 * Impliment in Prototype 54 63 * Create PEAR package 64 * Impliment in dojo plugins/ddAccessibleFormPlugin/lib/helper/AccessibleFormHelper.php
r6979 r7141 3 3 { 4 4 $response = sfContext::getInstance()->getResponse(); 5 $response->addJavascript(sfConfig::get('sf_jquery_web_dir', '/ddAccessibleFormPlugin').'/js/jquery'); 6 $response->addJavascript('/ddAccessibleFormPlugin/js/cmxform'); 5 if (sfConfig::get('sf_js_lib') == 'yui') 6 { 7 // we need to add the appropriate libs... 8 $response->addJavascript(sfConfig::get('sf_yui_web_dir').'yahoo/yahoo-min.js'); 9 $response->addJavascript(sfConfig::get('sf_yui_web_dir').'selector/selector-beta-min.js'); 10 $response->addJavascript(sfConfig::get('sf_yui_web_dir').'dom/dom-min.js'); 11 12 $response->addJavascript('/ddAccessibleFormPlugin/js/yui.cmxform.js'); 13 } 14 else 15 { 16 $response->addJavascript(sfConfig::get('sf_jquery_web_dir', '/ddAccessibleFormPlugin').'/js/jquery'); 17 $response->addJavascript('/ddAccessibleFormPlugin/js/cmxform'); 18 } 7 19 $response->addStylesheet('/ddAccessibleFormPlugin/css/accessible_form'); 8 20 plugins/ddAccessibleFormPlugin/web/js/cmxform.js
r4100 r7141 1 var $j = jQuery.noConflict();2 1 3 2 if(document.addEventListener) … … 6 5 function cmxform() 7 6 { 7 var $j = jQuery.noConflict(); 8 8 // Hide forms 9 9 $j('form.cmxform').hide().end(); 10 10 11 11 // Processing 12 $j('form.cmxform').find('li /label').not('.nocmx').each( function(i)12 $j('form.cmxform').find('li>label').not('.nocmx').each( function(i) 13 13 { 14 14 var labelContent = this.innerHTML;