javascriptmvc 3.0.0.pre15
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/README.markdown +15 -0
- data/Rakefile +17 -0
- data/VERSION +1 -0
- data/bin/jmvc-build +4 -0
- data/bin/jmvc-gen +4 -0
- data/bin/jmvc-get +4 -0
- data/bin/jmvc-init +4 -0
- data/bin/jmvc-update +4 -0
- data/lib/javascriptmvc.rb +97 -0
- data/lib/javascriptmvc/documentjs/README +0 -0
- data/lib/javascriptmvc/documentjs/add.js +76 -0
- data/lib/javascriptmvc/documentjs/application.js +285 -0
- data/lib/javascriptmvc/documentjs/attribute.js +61 -0
- data/lib/javascriptmvc/documentjs/baseclass.js +537 -0
- data/lib/javascriptmvc/documentjs/class.js +141 -0
- data/lib/javascriptmvc/documentjs/constructor.js +145 -0
- data/lib/javascriptmvc/documentjs/directives.js +394 -0
- data/lib/javascriptmvc/documentjs/distance.js +49 -0
- data/lib/javascriptmvc/documentjs/document +21 -0
- data/lib/javascriptmvc/documentjs/documentjs.js +76 -0
- data/lib/javascriptmvc/documentjs/file.js +55 -0
- data/lib/javascriptmvc/documentjs/function.js +112 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/close.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/download.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-off.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-on.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/favicon.ico +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/logo.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/pre.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_222222_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_454545_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_888888_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/video.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/production.js +552 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/style.css +354 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/summary.ejs +134 -0
- data/lib/javascriptmvc/documentjs/json.js +172 -0
- data/lib/javascriptmvc/documentjs/page.js +107 -0
- data/lib/javascriptmvc/documentjs/pair.js +302 -0
- data/lib/javascriptmvc/documentjs/prototype.js +13 -0
- data/lib/javascriptmvc/documentjs/scripts/build.js +6 -0
- data/lib/javascriptmvc/documentjs/static.js +25 -0
- data/lib/javascriptmvc/documentjs/test/docs/Something.json +1 -0
- data/lib/javascriptmvc/documentjs/test/docs/searchData.json +1 -0
- data/lib/javascriptmvc/documentjs/test/something.js +8 -0
- data/lib/javascriptmvc/documentjs/test/test.html +6 -0
- data/lib/javascriptmvc/documentjs/test_doc.html +1 -0
- data/lib/javascriptmvc/documentjs/update +5 -0
- data/lib/javascriptmvc/funcunit/README +17 -0
- data/lib/javascriptmvc/funcunit/autosuggest/auto_suggest.js +495 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.css +24 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.html +26 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.js +17 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest_test.js +14 -0
- data/lib/javascriptmvc/funcunit/autosuggest/funcunit.html +15 -0
- data/lib/javascriptmvc/funcunit/build.js +54 -0
- data/lib/javascriptmvc/funcunit/drivers/selenium.js +129 -0
- data/lib/javascriptmvc/funcunit/drivers/standard.js +169 -0
- data/lib/javascriptmvc/funcunit/envjs +13 -0
- data/lib/javascriptmvc/funcunit/envjs.bat +28 -0
- data/lib/javascriptmvc/funcunit/funcunit.html +20 -0
- data/lib/javascriptmvc/funcunit/funcunit.js +1509 -0
- data/lib/javascriptmvc/funcunit/java/selenium-java-client-driver.jar +0 -0
- data/lib/javascriptmvc/funcunit/java/selenium-server.jar +0 -0
- data/lib/javascriptmvc/funcunit/qunit.html +22 -0
- data/lib/javascriptmvc/funcunit/qunit/qunit.css +119 -0
- data/lib/javascriptmvc/funcunit/qunit/qunit.js +1124 -0
- data/lib/javascriptmvc/funcunit/qunit/rhino/rhino.js +24 -0
- data/lib/javascriptmvc/funcunit/qunit/test/qunit.html +18 -0
- data/lib/javascriptmvc/funcunit/qunit/test/test.js +7 -0
- data/lib/javascriptmvc/funcunit/resources/funcunit.js +31 -0
- data/lib/javascriptmvc/funcunit/resources/jquery.js +6378 -0
- data/lib/javascriptmvc/funcunit/resources/json.js +201 -0
- data/lib/javascriptmvc/funcunit/resources/selenium_start.js +43 -0
- data/lib/javascriptmvc/funcunit/scripts/run.js +36 -0
- data/lib/javascriptmvc/funcunit/scripts/test.js +55 -0
- data/lib/javascriptmvc/funcunit/settings.js +10 -0
- data/lib/javascriptmvc/funcunit/synthetic/browsers.js +151 -0
- data/lib/javascriptmvc/funcunit/synthetic/demo.html +150 -0
- data/lib/javascriptmvc/funcunit/synthetic/demo/record.js +254 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/drag.html +41 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/drag.js +268 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/qunit.html +20 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/drag_test.js +195 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/qunit.js +7 -0
- data/lib/javascriptmvc/funcunit/synthetic/key.js +832 -0
- data/lib/javascriptmvc/funcunit/synthetic/mouse.js +291 -0
- data/lib/javascriptmvc/funcunit/synthetic/qunit.html +22 -0
- data/lib/javascriptmvc/funcunit/synthetic/recorder.html +303 -0
- data/lib/javascriptmvc/funcunit/synthetic/synthetic.html +85 -0
- data/lib/javascriptmvc/funcunit/synthetic/synthetic.js +796 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/key_test.js +391 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/mouse_test.js +233 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/synthetic_test.js +91 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/submit.html +29 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/submitted.html +3 -0
- data/lib/javascriptmvc/funcunit/template.html +18 -0
- data/lib/javascriptmvc/funcunit/test/drag.html +63 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/funcunit_test.js +87 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/open_test.js +28 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/protodrag_test.js +13 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/syn_test.js +41 -0
- data/lib/javascriptmvc/funcunit/test/jquery.event.drag.js +801 -0
- data/lib/javascriptmvc/funcunit/test/jquery.event.drop.js +439 -0
- data/lib/javascriptmvc/funcunit/test/jquery.js +6360 -0
- data/lib/javascriptmvc/funcunit/test/myapp.html +103 -0
- data/lib/javascriptmvc/funcunit/test/myotherapp.html +15 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/dragdrop.js +974 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/effects.js +1123 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/funcunit_test.js +20 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/myapp.html +63 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/prototype.js +4874 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/scriptaculous.js +68 -0
- data/lib/javascriptmvc/funcunit/update +5 -0
- data/lib/javascriptmvc/jquery/README +24 -0
- data/lib/javascriptmvc/jquery/build.js +73 -0
- data/lib/javascriptmvc/jquery/class/class.html +109 -0
- data/lib/javascriptmvc/jquery/class/class.js +627 -0
- data/lib/javascriptmvc/jquery/class/qunit.html +15 -0
- data/lib/javascriptmvc/jquery/class/test/qunit/class_test.js +146 -0
- data/lib/javascriptmvc/jquery/class/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/class/test/qunit/test.html +20 -0
- data/lib/javascriptmvc/jquery/controller/controller.html +89 -0
- data/lib/javascriptmvc/jquery/controller/controller.js +735 -0
- data/lib/javascriptmvc/jquery/controller/history/history.html +44 -0
- data/lib/javascriptmvc/jquery/controller/history/history.js +177 -0
- data/lib/javascriptmvc/jquery/controller/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/scripts/docs.js +6 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.html +56 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.js +27 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/subscribe_test.js +11 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/subscribe_test.js +4 -0
- data/lib/javascriptmvc/jquery/controller/test/qunit/controller_test.js +170 -0
- data/lib/javascriptmvc/jquery/controller/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/controller/view/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/view/test/qunit/controller_view_test.js +15 -0
- data/lib/javascriptmvc/jquery/controller/view/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/controller/view/test/qunit/views/init.micro +1 -0
- data/lib/javascriptmvc/jquery/controller/view/view.js +102 -0
- data/lib/javascriptmvc/jquery/dom/closest/closest.html +23 -0
- data/lib/javascriptmvc/jquery/dom/closest/closest.js +47 -0
- data/lib/javascriptmvc/jquery/dom/closest/funcunit.html +20 -0
- data/lib/javascriptmvc/jquery/dom/closest/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/closest/scripts/compress.js +3 -0
- data/lib/javascriptmvc/jquery/dom/closest/scripts/doc.js +4 -0
- data/lib/javascriptmvc/jquery/dom/closest/scripts/test.js +55 -0
- data/lib/javascriptmvc/jquery/dom/closest/settings.js +40 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/tests/basic.js +11 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/qunit/tests/basic.js +4 -0
- data/lib/javascriptmvc/jquery/dom/compare/compare.html +88 -0
- data/lib/javascriptmvc/jquery/dom/compare/compare.js +67 -0
- data/lib/javascriptmvc/jquery/dom/compare/qunit.html +20 -0
- data/lib/javascriptmvc/jquery/dom/compare/test/qunit/compare_test.js +19 -0
- data/lib/javascriptmvc/jquery/dom/compare/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/dom/cookie/cookie.html +25 -0
- data/lib/javascriptmvc/jquery/dom/cookie/cookie.js +119 -0
- data/lib/javascriptmvc/jquery/dom/cookie/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/dom/cookie/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/cookie_test.js +11 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/cookie_test.js +4 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.html +71 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.js +120 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/curStyles.micro +3 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/cur_styles_test.js +22 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/outer.micro +0 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/curstyles.html +22 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.html +132 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.js +140 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/curStyles.micro +3 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/dimensions_test.js +8 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/outer.micro +0 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/dom.js +7 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixture.html +143 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixture.js +521 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixtures/messages.html +31 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixtures/test.json +3 -0
- data/lib/javascriptmvc/jquery/dom/fixture/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/fixture_test.js +50 -0
- data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/form_params/form_params.html +57 -0
- data/lib/javascriptmvc/jquery/dom/form_params/form_params.js +106 -0
- data/lib/javascriptmvc/jquery/dom/form_params/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/basics.micro +27 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/checkbox.micro +20 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/form_params_test.js +43 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/truthy.micro +8 -0
- data/lib/javascriptmvc/jquery/dom/within/within.js +67 -0
- data/lib/javascriptmvc/jquery/error/background.png +0 -0
- data/lib/javascriptmvc/jquery/error/error.html +31 -0
- data/lib/javascriptmvc/jquery/error/error.js +227 -0
- data/lib/javascriptmvc/jquery/error/setup.js +4 -0
- data/lib/javascriptmvc/jquery/error/test/test.html +23 -0
- data/lib/javascriptmvc/jquery/error/test/test.js +4 -0
- data/lib/javascriptmvc/jquery/event/default/compress.js +7 -0
- data/lib/javascriptmvc/jquery/event/default/default.html +85 -0
- data/lib/javascriptmvc/jquery/event/default/default.js +193 -0
- data/lib/javascriptmvc/jquery/event/default/defaultjquery.html +117 -0
- data/lib/javascriptmvc/jquery/event/default/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/default_test.js +104 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/html.micro +8 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/event/destroyed/destroyed.html +24 -0
- data/lib/javascriptmvc/jquery/event/destroyed/destroyed.js +40 -0
- data/lib/javascriptmvc/jquery/event/destroyed/destroyed_menu.html +96 -0
- data/lib/javascriptmvc/jquery/event/destroyed/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/destroyed_test.js +12 -0
- data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/event/drag/drag.html +105 -0
- data/lib/javascriptmvc/jquery/event/drag/drag.js +466 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/limit.html +74 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/limit.js +56 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/limit_test.js +11 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/limit_test.js +4 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/event/drag/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/event/drag/scroll/scroll.js +120 -0
- data/lib/javascriptmvc/jquery/event/drag/test/qunit/drag_test.js +130 -0
- data/lib/javascriptmvc/jquery/event/drag/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/drop/drop.html +74 -0
- data/lib/javascriptmvc/jquery/event/drop/drop.js +301 -0
- data/lib/javascriptmvc/jquery/event/event.js +6 -0
- data/lib/javascriptmvc/jquery/event/hashchange/hashchange.js +245 -0
- data/lib/javascriptmvc/jquery/event/hover/compress.js +7 -0
- data/lib/javascriptmvc/jquery/event/hover/hover.html +56 -0
- data/lib/javascriptmvc/jquery/event/hover/hover.js +219 -0
- data/lib/javascriptmvc/jquery/event/hover/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/event/hover/test/qunit/hover_test.js +55 -0
- data/lib/javascriptmvc/jquery/event/hover/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/livehack/compress.js +7 -0
- data/lib/javascriptmvc/jquery/event/livehack/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/livehack/livehack.html +25 -0
- data/lib/javascriptmvc/jquery/event/livehack/livehack.js +167 -0
- data/lib/javascriptmvc/jquery/event/offline/funcunit.html +20 -0
- data/lib/javascriptmvc/jquery/event/offline/offline.html +26 -0
- data/lib/javascriptmvc/jquery/event/offline/offline.js +36 -0
- data/lib/javascriptmvc/jquery/event/offline/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/event/offline/scripts/compress.js +3 -0
- data/lib/javascriptmvc/jquery/event/offline/scripts/doc.js +4 -0
- data/lib/javascriptmvc/jquery/event/offline/settings.js +41 -0
- data/lib/javascriptmvc/jquery/event/offline/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/offline/test/funcunit/tests/basic.js +11 -0
- data/lib/javascriptmvc/jquery/event/offline/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/offline/test/qunit/tests/basic.js +4 -0
- data/lib/javascriptmvc/jquery/event/resize/funcunit.html +20 -0
- data/lib/javascriptmvc/jquery/event/resize/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/event/resize/resize.html +23 -0
- data/lib/javascriptmvc/jquery/event/resize/resize.js +50 -0
- data/lib/javascriptmvc/jquery/event/resize/scripts/compress.js +3 -0
- data/lib/javascriptmvc/jquery/event/resize/scripts/doc.js +4 -0
- data/lib/javascriptmvc/jquery/event/resize/scripts/test.js +55 -0
- data/lib/javascriptmvc/jquery/event/resize/settings.js +40 -0
- data/lib/javascriptmvc/jquery/event/resize/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/resize/test/funcunit/tests/basic.js +11 -0
- data/lib/javascriptmvc/jquery/event/resize/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/resize/test/qunit/tests/basic.js +4 -0
- data/lib/javascriptmvc/jquery/event/select/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/event/select/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/event/select/select.html +63 -0
- data/lib/javascriptmvc/jquery/event/select/select.js +65 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/select_test.js +11 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/select_test.js +4 -0
- data/lib/javascriptmvc/jquery/generate/app +23 -0
- data/lib/javascriptmvc/jquery/generate/controller +21 -0
- data/lib/javascriptmvc/jquery/generate/model +26 -0
- data/lib/javascriptmvc/jquery/generate/page +20 -0
- data/lib/javascriptmvc/jquery/generate/plugin +20 -0
- data/lib/javascriptmvc/jquery/generate/scaffold +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).css.ejs +4 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).html.ejs +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).js.ejs +21 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/controllers/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/docs/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/fixtures/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/funcunit.html.ejs +15 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/models/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/qunit.html.ejs +20 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/resources/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/scripts/build.js.ejs +6 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/scripts/clean.js.ejs +6 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/scripts/docs.js.ejs +4 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/(application_name)_test.js.ejs +9 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/funcunit.js.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/(application_name)_test.js.ejs +5 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/qunit.js.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/views/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/controller/controllers/(underscore)_controller.js.ejs +12 -0
- data/lib/javascriptmvc/jquery/generate/templates/model/fixtures.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/model/models.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/model/test/qunit.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/page.ejs +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).html.ejs +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).js.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/fixtures/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/funcunit.html.ejs +15 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/qunit.html.ejs +20 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/resources/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/scripts.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/test.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/views/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/controllers/(underscore)_controller.js.ejs +96 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/fixtures/(plural).json.get.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/models/(underscore).js.ejs +83 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/funcunit/(underscore)_controller_test.js.ejs +63 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/qunit/(underscore)_test.js.ejs +45 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/edit.ejs.ejs +10 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/init.ejs.ejs +26 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/list.ejs.ejs +5 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/show.ejs.ejs +10 -0
- data/lib/javascriptmvc/jquery/jquery.js +6360 -0
- data/lib/javascriptmvc/jquery/lang/json/json.html +25 -0
- data/lib/javascriptmvc/jquery/lang/json/json.js +201 -0
- data/lib/javascriptmvc/jquery/lang/json/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/lang/json/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/json_test.js +11 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/json_test.js +4 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/lang/lang.html +27 -0
- data/lib/javascriptmvc/jquery/lang/lang.js +104 -0
- data/lib/javascriptmvc/jquery/lang/openajax/openajax.js +202 -0
- data/lib/javascriptmvc/jquery/lang/rsplit/rsplit.js +31 -0
- data/lib/javascriptmvc/jquery/lang/vector/vector.js +167 -0
- data/lib/javascriptmvc/jquery/model/associations/associations.html +25 -0
- data/lib/javascriptmvc/jquery/model/associations/associations.js +46 -0
- data/lib/javascriptmvc/jquery/model/associations/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/model/associations/test/qunit/associations_test.js +51 -0
- data/lib/javascriptmvc/jquery/model/associations/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/model/associations/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/model/backup/backup.js +82 -0
- data/lib/javascriptmvc/jquery/model/json_rest/json_rest.js +91 -0
- data/lib/javascriptmvc/jquery/model/list/list.js +148 -0
- data/lib/javascriptmvc/jquery/model/list/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/model/list/test/qunit/list_test.js +58 -0
- data/lib/javascriptmvc/jquery/model/list/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/model/list/test/qunit/run.js +0 -0
- data/lib/javascriptmvc/jquery/model/model.js +537 -0
- data/lib/javascriptmvc/jquery/model/qunit.html +17 -0
- data/lib/javascriptmvc/jquery/model/store/store.js +66 -0
- data/lib/javascriptmvc/jquery/model/test/qunit/model_test.js +71 -0
- data/lib/javascriptmvc/jquery/model/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/qunit.html +15 -0
- data/lib/javascriptmvc/jquery/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/test/funcunit/jquerytest_test.js +11 -0
- data/lib/javascriptmvc/jquery/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/test/qunit/qunit.js +22 -0
- data/lib/javascriptmvc/jquery/update +5 -0
- data/lib/javascriptmvc/jquery/view/compress.js +7 -0
- data/lib/javascriptmvc/jquery/view/ejs/ejs.html +25 -0
- data/lib/javascriptmvc/jquery/view/ejs/ejs.js +489 -0
- data/lib/javascriptmvc/jquery/view/ejs/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/ejs_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/ejs_test.js +4 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/view/fulljslint.js +3774 -0
- data/lib/javascriptmvc/jquery/view/helpers/helpers.js +338 -0
- data/lib/javascriptmvc/jquery/view/jaml/compress.js +7 -0
- data/lib/javascriptmvc/jquery/view/jaml/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/jaml/jaml.html +25 -0
- data/lib/javascriptmvc/jquery/view/jaml/jaml.js +73 -0
- data/lib/javascriptmvc/jquery/view/jaml/node.js +149 -0
- data/lib/javascriptmvc/jquery/view/jaml/template.js +131 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/jaml_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/jaml_test.js +4 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/view/micro/compress.js +7 -0
- data/lib/javascriptmvc/jquery/view/micro/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/micro/micro.html +25 -0
- data/lib/javascriptmvc/jquery/view/micro/micro.js +57 -0
- data/lib/javascriptmvc/jquery/view/micro/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/micro/test/funcunit/micro_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/micro/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/micro_test.js +4 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/view/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/view/test/compression/compression.html +12 -0
- data/lib/javascriptmvc/jquery/view/test/compression/compression.js +11 -0
- data/lib/javascriptmvc/jquery/view/test/compression/run.js +36 -0
- data/lib/javascriptmvc/jquery/view/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/test/funcunit/view_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/nested_plugin.ejs +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/plugin.ejs +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.ejs +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.jaml +3 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.micro +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.tmpl +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/view_test.js +24 -0
- data/lib/javascriptmvc/jquery/view/tmpl/tmpl.js +150 -0
- data/lib/javascriptmvc/jquery/view/view.html +65 -0
- data/lib/javascriptmvc/jquery/view/view.js +296 -0
- data/lib/javascriptmvc/js +56 -0
- data/lib/javascriptmvc/js.bat +57 -0
- data/lib/javascriptmvc/steal/README +26 -0
- data/lib/javascriptmvc/steal/build/apps/apps.js +208 -0
- data/lib/javascriptmvc/steal/build/apps/test.js +4 -0
- data/lib/javascriptmvc/steal/build/build.js +281 -0
- data/lib/javascriptmvc/steal/build/pluginify.js +73 -0
- data/lib/javascriptmvc/steal/build/scripts/compiler.jar +0 -0
- data/lib/javascriptmvc/steal/build/scripts/scripts.js +155 -0
- data/lib/javascriptmvc/steal/build/styles/cssmin.js +17 -0
- data/lib/javascriptmvc/steal/build/styles/styles.js +84 -0
- data/lib/javascriptmvc/steal/build/test/basicpage.html +6 -0
- data/lib/javascriptmvc/steal/build/test/basicproduction.js +1 -0
- data/lib/javascriptmvc/steal/build/test/basicsource.js +6 -0
- data/lib/javascriptmvc/steal/build/test/css/css/css1.css +1 -0
- data/lib/javascriptmvc/steal/build/test/css/css/justin.png +0 -0
- data/lib/javascriptmvc/steal/build/test/css/css2.css +5 -0
- data/lib/javascriptmvc/steal/build/test/css/page.html +9 -0
- data/lib/javascriptmvc/steal/build/test/css/production.css +1 -0
- data/lib/javascriptmvc/steal/build/test/css/test.js +7 -0
- data/lib/javascriptmvc/steal/build/test/css/upload.PNG +0 -0
- data/lib/javascriptmvc/steal/build/test/foreign.html +6 -0
- data/lib/javascriptmvc/steal/build/test/foreign.js +2 -0
- data/lib/javascriptmvc/steal/build/test/removecode.js +11 -0
- data/lib/javascriptmvc/steal/build/test/run.js +57 -0
- data/lib/javascriptmvc/steal/build/test/stealpage.html +10 -0
- data/lib/javascriptmvc/steal/build/test/stealprodpage.html +10 -0
- data/lib/javascriptmvc/steal/build/test/test.js +3 -0
- data/lib/javascriptmvc/steal/buildjs +21 -0
- data/lib/javascriptmvc/steal/clean/beautify.js +1108 -0
- data/lib/javascriptmvc/steal/clean/clean.js +179 -0
- data/lib/javascriptmvc/steal/clean/jslint.js +5662 -0
- data/lib/javascriptmvc/steal/clean/test.js +7 -0
- data/lib/javascriptmvc/steal/cleanjs +5 -0
- data/lib/javascriptmvc/steal/coffee/coffee-script.js +9 -0
- data/lib/javascriptmvc/steal/coffee/coffee.js +56 -0
- data/lib/javascriptmvc/steal/dev/dev.js +83 -0
- data/lib/javascriptmvc/steal/end.js +1 -0
- data/lib/javascriptmvc/steal/generate/app +23 -0
- data/lib/javascriptmvc/steal/generate/ejs.js +470 -0
- data/lib/javascriptmvc/steal/generate/generate.js +211 -0
- data/lib/javascriptmvc/steal/generate/inflector.js +117 -0
- data/lib/javascriptmvc/steal/generate/system.js +33 -0
- data/lib/javascriptmvc/steal/generate/templates/app/(application_name).css.ejs +10 -0
- data/lib/javascriptmvc/steal/generate/templates/app/(application_name).html.ejs +18 -0
- data/lib/javascriptmvc/steal/generate/templates/app/(application_name).js.ejs +10 -0
- data/lib/javascriptmvc/steal/generate/templates/app/docs/.ignore +0 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/.ignore +0 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/example.coffee.ejs +5 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/example.js.ejs +13 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/example.less.ejs +9 -0
- data/lib/javascriptmvc/steal/generate/templates/app/scripts/build.js.ejs +6 -0
- data/lib/javascriptmvc/steal/generate/templates/app/scripts/clean.js.ejs +6 -0
- data/lib/javascriptmvc/steal/generate/templates/app/test/.ignore +0 -0
- data/lib/javascriptmvc/steal/generate/templates/page.ejs +23 -0
- data/lib/javascriptmvc/steal/generate/test/test.js +92 -0
- data/lib/javascriptmvc/steal/get/get.js +163 -0
- data/lib/javascriptmvc/steal/get/gets.json +10 -0
- data/lib/javascriptmvc/steal/get/getter.js +115 -0
- data/lib/javascriptmvc/steal/get/github.js +134 -0
- data/lib/javascriptmvc/steal/get/json.js +172 -0
- data/lib/javascriptmvc/steal/getjs +5 -0
- data/lib/javascriptmvc/steal/js +56 -0
- data/lib/javascriptmvc/steal/js.bat +57 -0
- data/lib/javascriptmvc/steal/less/less.js +117 -0
- data/lib/javascriptmvc/steal/less/less_engine.js +2529 -0
- data/lib/javascriptmvc/steal/rhino/blank.html +6 -0
- data/lib/javascriptmvc/steal/rhino/build.js +31 -0
- data/lib/javascriptmvc/steal/rhino/docs.js +68 -0
- data/lib/javascriptmvc/steal/rhino/empty.html +12 -0
- data/lib/javascriptmvc/steal/rhino/env.js +11537 -0
- data/lib/javascriptmvc/steal/rhino/file.js +299 -0
- data/lib/javascriptmvc/steal/rhino/js.jar +0 -0
- data/lib/javascriptmvc/steal/rhino/loader.js +8 -0
- data/lib/javascriptmvc/steal/rhino/prompt.js +49 -0
- data/lib/javascriptmvc/steal/rhino/steal.js +122 -0
- data/lib/javascriptmvc/steal/rhino/test.js +16 -0
- data/lib/javascriptmvc/steal/steal.js +1317 -0
- data/lib/javascriptmvc/steal/steal.production.js +23 -0
- data/lib/javascriptmvc/steal/test/absoluteurl.html +7 -0
- data/lib/javascriptmvc/steal/test/absoluteurl/absoluteurl.js +1 -0
- data/lib/javascriptmvc/steal/test/absoluteurl/alert.js +1 -0
- data/lib/javascriptmvc/steal/test/another/two.js +2 -0
- data/lib/javascriptmvc/steal/test/one/four.js +1 -0
- data/lib/javascriptmvc/steal/test/one/one.js +6 -0
- data/lib/javascriptmvc/steal/test/qunit/qunit.html +22 -0
- data/lib/javascriptmvc/steal/test/qunit/qunit.js +3 -0
- data/lib/javascriptmvc/steal/test/qunit/steal_test.js +197 -0
- data/lib/javascriptmvc/steal/test/run.js +12 -0
- data/lib/javascriptmvc/steal/test/steal.html +37 -0
- data/lib/javascriptmvc/steal/test/test.js +82 -0
- data/lib/javascriptmvc/steal/test/three.js +3 -0
- data/lib/javascriptmvc/steal/testing/test.html +20 -0
- data/lib/javascriptmvc/steal/testing/testing.js +48 -0
- data/lib/javascriptmvc/steal/update +5 -0
- metadata +622 -0
@@ -0,0 +1,338 @@
|
|
1
|
+
steal.plugins('jquery/view/ejs').then(function($){
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @add jQuery.View.Helpers Prototype additions
|
5
|
+
*/
|
6
|
+
$.extend($.View.EJS.Helpers.prototype, {
|
7
|
+
// treyk 06/11/2009 - Pulled from old MVC.Date plugin for now. Will look for a suitable jQuery Date plugin
|
8
|
+
month_names: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Creates a check box tag
|
12
|
+
* @plugin view/helpers
|
13
|
+
* @param {Object} name
|
14
|
+
* @param {Object} value
|
15
|
+
* @param {Object} options
|
16
|
+
* @param {Object} checked
|
17
|
+
*/
|
18
|
+
check_box_tag: function( name, value, options, checked ) {
|
19
|
+
options = options || {};
|
20
|
+
if(checked) options.checked = "checked";
|
21
|
+
return this.input_field_tag(name, value, 'checkbox', options);
|
22
|
+
},
|
23
|
+
/**
|
24
|
+
* @plugin view/helpers
|
25
|
+
* @param {Object} name
|
26
|
+
* @param {Object} value
|
27
|
+
* @param {Object} html_options
|
28
|
+
*/
|
29
|
+
date_tag: function( name, value , html_options ) {
|
30
|
+
if(! (value instanceof Date)) value = new Date();
|
31
|
+
|
32
|
+
var years = [], months = [], days =[];
|
33
|
+
var year = value.getFullYear(), month = value.getMonth(), day = value.getDate();
|
34
|
+
for(var y = year - 15; y < year+15 ; y++) years.push({value: y, text: y});
|
35
|
+
for(var m = 0; m < 12; m++) months.push({value: (m), text: $View.Helpers.month_names[m]});
|
36
|
+
for(var d = 0; d < 31; d++) days.push({value: (d+1), text: (d+1)});
|
37
|
+
|
38
|
+
var year_select = this.select_tag(name+'[year]', year, years, {id: name+'[year]'} );
|
39
|
+
var month_select = this.select_tag(name+'[month]', month, months, {id: name+'[month]'});
|
40
|
+
var day_select = this.select_tag(name+'[day]', day, days, {id: name+'[day]'});
|
41
|
+
|
42
|
+
return year_select+month_select+day_select;
|
43
|
+
},
|
44
|
+
/**
|
45
|
+
* @plugin view/helpers
|
46
|
+
* @param {Object} name
|
47
|
+
* @param {Object} value
|
48
|
+
* @param {Object} html_options
|
49
|
+
* @param {Object} interval - specified in minutes
|
50
|
+
*/
|
51
|
+
time_tag: function( name, value, html_options, interval ) {
|
52
|
+
var times = [];
|
53
|
+
|
54
|
+
if (interval == null || interval == 0)
|
55
|
+
interval = 60;
|
56
|
+
|
57
|
+
for(var h = 0; h < 24 ; h++)
|
58
|
+
for(var m = 0; m < 60; m+=interval)
|
59
|
+
{
|
60
|
+
var time = (h < 10 ? '0' : '') + h + ':' + (m < 10 ? '0' : '') + m;
|
61
|
+
times.push({ text: time, value: time });
|
62
|
+
}
|
63
|
+
|
64
|
+
return this.select_tag(name, value, times, html_options );
|
65
|
+
},
|
66
|
+
/**
|
67
|
+
* @plugin view/helpers
|
68
|
+
* @param {Object} name
|
69
|
+
* @param {Object} value
|
70
|
+
* @param {Object} html_options
|
71
|
+
*/
|
72
|
+
file_tag: function( name, value, html_options ) {
|
73
|
+
return this.input_field_tag(name+'[file]', value , 'file', html_options);
|
74
|
+
},
|
75
|
+
/**
|
76
|
+
* @plugin view/helpers
|
77
|
+
* @param {Object} url_for_options
|
78
|
+
* @param {Object} html_options
|
79
|
+
*/
|
80
|
+
form_tag: function( url_for_options, html_options ) {
|
81
|
+
html_options = html_options || {};
|
82
|
+
if(html_options.multipart == true) {
|
83
|
+
html_options.method = 'post';
|
84
|
+
html_options.enctype = 'multipart/form-data';
|
85
|
+
}
|
86
|
+
html_options.action = url_for_options;
|
87
|
+
return this.start_tag_for('form', html_options);
|
88
|
+
},
|
89
|
+
/**
|
90
|
+
* @plugin view/helpers
|
91
|
+
*/
|
92
|
+
form_tag_end: function() { return this.tag_end('form'); },
|
93
|
+
/**
|
94
|
+
* @plugin view/helpers
|
95
|
+
* @param {Object} name
|
96
|
+
* @param {Object} value
|
97
|
+
* @param {Object} html_options
|
98
|
+
*/
|
99
|
+
hidden_field_tag: function( name, value, html_options ) {
|
100
|
+
return this.input_field_tag(name, value, 'hidden', html_options);
|
101
|
+
},
|
102
|
+
/**
|
103
|
+
* @plugin view/helpers
|
104
|
+
* @param {Object} name
|
105
|
+
* @param {Object} value
|
106
|
+
* @param {Object} inputType
|
107
|
+
* @param {Object} html_options
|
108
|
+
*/
|
109
|
+
input_field_tag: function( name, value , inputType, html_options ) {
|
110
|
+
html_options = html_options || {};
|
111
|
+
html_options.id = html_options.id || name;
|
112
|
+
html_options.value = value || '';
|
113
|
+
html_options.type = inputType || 'text';
|
114
|
+
html_options.name = name;
|
115
|
+
return this.single_tag_for('input', html_options);
|
116
|
+
},
|
117
|
+
/**
|
118
|
+
* @plugin view/helpers
|
119
|
+
* @param {Object} text
|
120
|
+
* @param {Object} html_options
|
121
|
+
*/
|
122
|
+
label_tag: function( text, html_options ) {
|
123
|
+
html_options = html_options || {};
|
124
|
+
return this.start_tag_for('label', html_options) + text + this.tag_end('label');
|
125
|
+
},
|
126
|
+
/**
|
127
|
+
* @plugin view/helpers
|
128
|
+
* @param {Object} name
|
129
|
+
* @param {Object} url
|
130
|
+
* @param {Object} html_options
|
131
|
+
*/
|
132
|
+
link_to: function( name, url, html_options ) {
|
133
|
+
if(!name) var name = 'null';
|
134
|
+
if(!html_options) var html_options = {};
|
135
|
+
this.set_confirm(html_options);
|
136
|
+
html_options.href=url;
|
137
|
+
return this.start_tag_for('a', html_options)+name+ this.tag_end('a');
|
138
|
+
},
|
139
|
+
/**
|
140
|
+
* @plugin view/helpers
|
141
|
+
* @param {Object} condition
|
142
|
+
* @param {Object} name
|
143
|
+
* @param {Object} url
|
144
|
+
* @param {Object} html_options
|
145
|
+
*/
|
146
|
+
link_to_if: function( condition, name, url, html_options ) {
|
147
|
+
return this.link_to_unless((!condition), name, url, html_options);
|
148
|
+
},
|
149
|
+
/**
|
150
|
+
* @plugin view/helpers
|
151
|
+
* @param {Object} condition
|
152
|
+
* @param {Object} name
|
153
|
+
* @param {Object} url
|
154
|
+
* @param {Object} html_options
|
155
|
+
*/
|
156
|
+
link_to_unless: function( condition, name, url, html_options ) {
|
157
|
+
if(condition) return name;
|
158
|
+
return this.link_to(name, url, html_options);
|
159
|
+
},
|
160
|
+
/**
|
161
|
+
* @plugin view/helpers
|
162
|
+
* @param {Object} html_options
|
163
|
+
*/
|
164
|
+
set_confirm: function( html_options ) {
|
165
|
+
if(html_options.confirm){
|
166
|
+
html_options.onclick = html_options.onclick || '';
|
167
|
+
html_options.onclick = html_options.onclick+
|
168
|
+
"; var ret_confirm = confirm(\""+html_options.confirm+"\"); if(!ret_confirm){ return false;} ";
|
169
|
+
html_options.confirm = null;
|
170
|
+
}
|
171
|
+
},
|
172
|
+
/**
|
173
|
+
* @plugin view/helpers
|
174
|
+
* @param {Object} name
|
175
|
+
* @param {Object} options
|
176
|
+
* @param {Object} html_options
|
177
|
+
* @param {Object} post
|
178
|
+
*/
|
179
|
+
submit_link_to: function( name, options, html_options, post ) {
|
180
|
+
if(!name) var name = 'null';
|
181
|
+
if(!html_options) html_options = {};
|
182
|
+
html_options.type = 'submit';
|
183
|
+
html_options.value = name;
|
184
|
+
this.set_confirm(html_options);
|
185
|
+
html_options.onclick=html_options.onclick+';window.location="'+options+'"; return false;';
|
186
|
+
return this.single_tag_for('input', html_options);
|
187
|
+
},
|
188
|
+
/**
|
189
|
+
* @plugin view/helpers
|
190
|
+
* @param {Object} name
|
191
|
+
* @param {Object} value
|
192
|
+
* @param {Object} html_options
|
193
|
+
*/
|
194
|
+
password_field_tag: function( name, value, html_options ) { return this.input_field_tag(name, value, 'password', html_options); },
|
195
|
+
/**
|
196
|
+
* @plugin view/helpers
|
197
|
+
* @param {Object} name
|
198
|
+
* @param {Object} value
|
199
|
+
* @param {Object} choices
|
200
|
+
* @param {Object} html_options
|
201
|
+
*/
|
202
|
+
select_tag: function( name, value, choices, html_options ) {
|
203
|
+
html_options = html_options || {};
|
204
|
+
html_options.id = html_options.id || name;
|
205
|
+
//html_options.value = value;
|
206
|
+
html_options.name = name;
|
207
|
+
var txt = '';
|
208
|
+
txt += this.start_tag_for('select', html_options);
|
209
|
+
for(var i = 0; i < choices.length; i++)
|
210
|
+
{
|
211
|
+
var choice = choices[i];
|
212
|
+
if(typeof choice == 'string') choice = {value: choice};
|
213
|
+
if(!choice.text) choice.text = choice.value;
|
214
|
+
if(!choice.value) choice.text = choice.text;
|
215
|
+
|
216
|
+
var optionOptions = {value: choice.value};
|
217
|
+
if(choice.value == value)
|
218
|
+
optionOptions.selected ='selected';
|
219
|
+
txt += this.start_tag_for('option', optionOptions )+choice.text+this.tag_end('option');
|
220
|
+
}
|
221
|
+
txt += this.tag_end('select');
|
222
|
+
return txt;
|
223
|
+
},
|
224
|
+
/**
|
225
|
+
* @plugin view/helpers
|
226
|
+
* @param {Object} tag
|
227
|
+
* @param {Object} html_options
|
228
|
+
*/
|
229
|
+
single_tag_for: function( tag, html_options ) { return this.tag(tag, html_options, '/>');},
|
230
|
+
/**
|
231
|
+
* @plugin view/helpers
|
232
|
+
* @param {Object} tag
|
233
|
+
* @param {Object} html_options
|
234
|
+
*/
|
235
|
+
start_tag_for: function( tag, html_options ) { return this.tag(tag, html_options); },
|
236
|
+
/**
|
237
|
+
* @plugin view/helpers
|
238
|
+
* @param {Object} name
|
239
|
+
* @param {Object} html_options
|
240
|
+
*/
|
241
|
+
submit_tag: function( name, html_options ) {
|
242
|
+
html_options = html_options || {};
|
243
|
+
html_options.type = html_options.type || 'submit';
|
244
|
+
html_options.value = name || 'Submit';
|
245
|
+
return this.single_tag_for('input', html_options);
|
246
|
+
},
|
247
|
+
/**
|
248
|
+
* @plugin view/helpers
|
249
|
+
* @param {Object} tag
|
250
|
+
* @param {Object} html_options
|
251
|
+
* @param {Object} end
|
252
|
+
*/
|
253
|
+
tag: function( tag, html_options, end ) {
|
254
|
+
end = end || '>';
|
255
|
+
var txt = ' ';
|
256
|
+
for(var attr in html_options) {
|
257
|
+
if(html_options.hasOwnProperty(attr)){
|
258
|
+
value = html_options[attr] != null ? html_options[attr].toString() : '';
|
259
|
+
|
260
|
+
if(attr == "Class" || attr == "klass") attr = "class";
|
261
|
+
if( value.indexOf("'") != -1 )
|
262
|
+
txt += attr+'=\"'+value+'\" ' ;
|
263
|
+
else
|
264
|
+
txt += attr+"='"+value+"' " ;
|
265
|
+
}
|
266
|
+
}
|
267
|
+
return '<'+tag+txt+end;
|
268
|
+
},
|
269
|
+
/**
|
270
|
+
* @plugin view/helpers
|
271
|
+
* @param {Object} tag
|
272
|
+
*/
|
273
|
+
tag_end: function( tag ) { return '</'+tag+'>'; },
|
274
|
+
/**
|
275
|
+
* @plugin view/helpers
|
276
|
+
* @param {Object} name
|
277
|
+
* @param {Object} value
|
278
|
+
* @param {Object} html_options
|
279
|
+
*/
|
280
|
+
text_area_tag: function( name, value, html_options ) {
|
281
|
+
html_options = html_options || {};
|
282
|
+
html_options.id = html_options.id || name;
|
283
|
+
html_options.name = html_options.name || name;
|
284
|
+
value = value || '';
|
285
|
+
if(html_options.size) {
|
286
|
+
html_options.cols = html_options.size.split('x')[0];
|
287
|
+
html_options.rows = html_options.size.split('x')[1];
|
288
|
+
delete html_options.size;
|
289
|
+
}
|
290
|
+
html_options.cols = html_options.cols || 50;
|
291
|
+
html_options.rows = html_options.rows || 4;
|
292
|
+
return this.start_tag_for('textarea', html_options)+value+this.tag_end('textarea');
|
293
|
+
},
|
294
|
+
/**
|
295
|
+
* @plugin view/helpers
|
296
|
+
* @param {Object} name
|
297
|
+
* @param {Object} value
|
298
|
+
* @param {Object} html_options
|
299
|
+
*/
|
300
|
+
text_field_tag: function( name, value, html_options ) { return this.input_field_tag(name, value, 'text', html_options); },
|
301
|
+
/**
|
302
|
+
* @plugin view/helpers
|
303
|
+
* @param {Object} image_location
|
304
|
+
* @param {Object} options
|
305
|
+
*/
|
306
|
+
img_tag: function( image_location, options ) {
|
307
|
+
options = options || {};
|
308
|
+
options.src = steal.root.join("resources/images/"+image_location);
|
309
|
+
return this.single_tag_for('img', options);
|
310
|
+
}
|
311
|
+
|
312
|
+
});
|
313
|
+
|
314
|
+
$.View.Helpers.prototype.text_tag = $.View.Helpers.prototype.text_area_tag;
|
315
|
+
|
316
|
+
// Private variables (in the (function($){})(jQuery) scope)
|
317
|
+
var data = {};
|
318
|
+
var name = 0;
|
319
|
+
|
320
|
+
$.View.Helpers.link_data = function(store){
|
321
|
+
var functionName = name++;
|
322
|
+
data[functionName] = store;
|
323
|
+
return "_data='"+functionName+"'";
|
324
|
+
};
|
325
|
+
$.View.Helpers.get_data = function(el){
|
326
|
+
if(!el) return null;
|
327
|
+
var dataAt = el.getAttribute('_data');
|
328
|
+
if(!dataAt) return null;
|
329
|
+
return data[parseInt(dataAt)];
|
330
|
+
};
|
331
|
+
$.View.Helpers.prototype.link_data = function(store){
|
332
|
+
return $.View.Helpers.link_data(store)
|
333
|
+
};
|
334
|
+
$.View.Helpers.prototype.get_data = function(el){
|
335
|
+
return $.View.Helpers.get_data(el)
|
336
|
+
};
|
337
|
+
|
338
|
+
});
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<link rel="stylesheet" type="text/css" href="../../../steal/test/qunit/qunit.css" />
|
4
|
+
<style>
|
5
|
+
body {
|
6
|
+
margin: 0px; padding: 0px;
|
7
|
+
}
|
8
|
+
</style>
|
9
|
+
<script type='text/javascript' src='../../../steal/steal.js?steal[app]=jquery/view/jaml/test/funcunit'></script>
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
|
13
|
+
<h1 id="qunit-header">jaml Test Suite</h1>
|
14
|
+
<h2 id="qunit-banner"></h2>
|
15
|
+
<div id="qunit-testrunner-toolbar"></div>
|
16
|
+
<h2 id="qunit-userAgent"></h2>
|
17
|
+
<div id="test-content"></div>
|
18
|
+
<ol id="qunit-tests"></ol>
|
19
|
+
<div id="qunit-test-area"></div>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
2
|
+
"http://www.w3.org/TR/html4/strict.dtd">
|
3
|
+
<html lang="en">
|
4
|
+
<head>
|
5
|
+
<title>jaml</title>
|
6
|
+
<style type='text/css'>
|
7
|
+
body {font-family: verdana}
|
8
|
+
.error {border: solid 1px red;}
|
9
|
+
.error_text { color: red; font-size: 10px;}
|
10
|
+
td {padding: 3px;}
|
11
|
+
</style>
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
<h1>Welcome to JavaScriptMVC 3.0!</h1>
|
15
|
+
<ul>
|
16
|
+
<li>Include plugins and files in <i>jquery/view/jaml/jaml.js</i>.</li>
|
17
|
+
<li>Change to production mode by changing <i>development</i> to <i>production</i> in this file.</li>
|
18
|
+
</ul>
|
19
|
+
<script type='text/javascript'
|
20
|
+
src='../../../steal/steal.js?steal[app]=jquery/view/jaml&steal[env]=development'
|
21
|
+
package='main.js'
|
22
|
+
compress='false'>
|
23
|
+
</script>
|
24
|
+
</body>
|
25
|
+
</html>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
steal.plugins("jquery/view").then(function(){
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
/**
|
6
|
+
* @class Jaml
|
7
|
+
* @author Ed Spencer (http://edspencer.net)
|
8
|
+
* Jaml is a simple JavaScript library which makes HTML generation easy and pleasurable.
|
9
|
+
* Examples: http://edspencer.github.com/jaml
|
10
|
+
* Introduction: http://edspencer.net/2009/11/jaml-beautiful-html-generation-for-javascript.html
|
11
|
+
*/
|
12
|
+
Jaml = function() {
|
13
|
+
return {
|
14
|
+
templates: {},
|
15
|
+
helpers : {},
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Registers a template by name
|
19
|
+
* @param {String} name The name of the template
|
20
|
+
* @param {Function} template The template function
|
21
|
+
*/
|
22
|
+
register: function(name, template ) {
|
23
|
+
this.templates[name] = template;
|
24
|
+
},
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Renders the given template name with an optional data object
|
28
|
+
* @param {String} name The name of the template to render
|
29
|
+
* @param {Object} data Optional data object
|
30
|
+
*/
|
31
|
+
render: function(name, data ) {
|
32
|
+
var template = this.templates[name],
|
33
|
+
renderer = new Jaml.Template(template);
|
34
|
+
|
35
|
+
return renderer.render(data);
|
36
|
+
},
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Registers a helper function
|
40
|
+
* @param {String} name The name of the helper
|
41
|
+
* @param {Function} helperFn The helper function
|
42
|
+
*/
|
43
|
+
registerHelper: function(name, helperFn ) {
|
44
|
+
this.helpers[name] = helperFn;
|
45
|
+
}
|
46
|
+
};
|
47
|
+
}();
|
48
|
+
|
49
|
+
|
50
|
+
$.View.register({
|
51
|
+
suffix : "jaml",
|
52
|
+
get: function(id, url ) {
|
53
|
+
var text = $.ajax({
|
54
|
+
async: false,
|
55
|
+
url: url
|
56
|
+
}).responseText
|
57
|
+
return this.renderer(id, text)
|
58
|
+
},
|
59
|
+
script: function(id, str ) {
|
60
|
+
return "((function(){ Jaml.register("+id+", "+str+"); return function(data){return Jaml.render("+id+", data)} })())"
|
61
|
+
},
|
62
|
+
renderer: function(id, text ) {
|
63
|
+
var func;
|
64
|
+
eval("func = ("+text+")");
|
65
|
+
Jaml.register(id, func);
|
66
|
+
return function(data){
|
67
|
+
return Jaml.render(id, data)
|
68
|
+
}
|
69
|
+
}
|
70
|
+
})
|
71
|
+
|
72
|
+
|
73
|
+
}).then('node','template')
|