how_to 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +56 -0
- data/Rakefile +40 -0
- data/app/assets/javascripts/how_to/application.js +21 -0
- data/app/assets/javascripts/how_to/chosen.jquery.min.js +10 -0
- data/app/assets/javascripts/how_to/jquery.localScroll.min.js +7 -0
- data/app/assets/javascripts/how_to/jquery.scrollTo.min.js +7 -0
- data/app/assets/javascripts/how_to/jquery.treeview.js +256 -0
- data/app/assets/stylesheets/how_to/application.css.scss +28 -0
- data/app/assets/stylesheets/how_to/bootstrap_and_overrides.css.scss +3 -0
- data/app/assets/stylesheets/how_to/chosen-sprite.png +0 -0
- data/app/assets/stylesheets/how_to/chosen-sprite@2x.png +0 -0
- data/app/assets/stylesheets/how_to/chosen.css +440 -0
- data/app/assets/stylesheets/how_to/images/ajax-loader.gif +0 -0
- data/app/assets/stylesheets/how_to/images/file.gif +0 -0
- data/app/assets/stylesheets/how_to/images/folder-closed.gif +0 -0
- data/app/assets/stylesheets/how_to/images/folder.gif +0 -0
- data/app/assets/stylesheets/how_to/images/minus.gif +0 -0
- data/app/assets/stylesheets/how_to/images/plus.gif +0 -0
- data/app/assets/stylesheets/how_to/images/treeview-black-line.gif +0 -0
- data/app/assets/stylesheets/how_to/images/treeview-black.gif +0 -0
- data/app/assets/stylesheets/how_to/images/treeview-default-line.gif +0 -0
- data/app/assets/stylesheets/how_to/images/treeview-default.gif +0 -0
- data/app/assets/stylesheets/how_to/images/treeview-famfamfam-line.gif +0 -0
- data/app/assets/stylesheets/how_to/images/treeview-famfamfam.gif +0 -0
- data/app/assets/stylesheets/how_to/images/treeview-gray-line.gif +0 -0
- data/app/assets/stylesheets/how_to/images/treeview-gray.gif +0 -0
- data/app/assets/stylesheets/how_to/images/treeview-red-line.gif +0 -0
- data/app/assets/stylesheets/how_to/images/treeview-red.gif +0 -0
- data/app/assets/stylesheets/how_to/jquery.treeview.css +74 -0
- data/app/controllers/how_to/application_controller.rb +18 -0
- data/app/controllers/how_to/contents_controller.rb +67 -0
- data/app/controllers/how_to/faq_controller.rb +12 -0
- data/app/controllers/how_to/sections_controller.rb +69 -0
- data/app/helpers/how_to/application_helper.rb +4 -0
- data/app/helpers/how_to/faq_helper.rb +73 -0
- data/app/models/how_to/admin_user.rb +13 -0
- data/app/models/how_to/content.rb +32 -0
- data/app/models/how_to/section.rb +29 -0
- data/app/models/how_to/translation_util.rb +70 -0
- data/app/views/how_to/contents/_form.html.erb +84 -0
- data/app/views/how_to/contents/edit.html.erb +1 -0
- data/app/views/how_to/contents/index.html.erb +24 -0
- data/app/views/how_to/contents/new.html.erb +1 -0
- data/app/views/how_to/contents/show.html.erb +22 -0
- data/app/views/how_to/faq/show.html.erb +294 -0
- data/app/views/how_to/sections/_form.html.erb +33 -0
- data/app/views/how_to/sections/edit.html.erb +1 -0
- data/app/views/how_to/sections/index.html.erb +24 -0
- data/app/views/how_to/sections/new.html.erb +1 -0
- data/app/views/how_to/sections/show.html.erb +18 -0
- data/app/views/layouts/how_to/_messages.html.erb +8 -0
- data/app/views/layouts/how_to/_navigation.html.erb +13 -0
- data/app/views/layouts/how_to/application.html.erb +37 -0
- data/config/routes.rb +6 -0
- data/db/migrate/20130602053453_create_how_to_sections.rb +24 -0
- data/db/migrate/20130602054608_create_how_to_contents.rb +19 -0
- data/lib/generators/how_to/config_generator.rb +16 -0
- data/lib/generators/how_to/layout_generator.rb +18 -0
- data/lib/generators/how_to/templates/how_to_config.rb +22 -0
- data/lib/generators/how_to/view_generator.rb +18 -0
- data/lib/how_to/config.rb +28 -0
- data/lib/how_to/engine.rb +6 -0
- data/lib/how_to/version.rb +3 -0
- data/lib/how_to.rb +5 -0
- data/lib/tasks/how_to_tasks.rake +4 -0
- data/test/dummy/Gemfile +10 -0
- data/test/dummy/Gemfile.lock +99 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/javascripts/mercury.js +452 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +11 -0
- data/test/dummy/app/controllers/mercury/images_controller.rb +19 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/mercury/image.rb +20 -0
- data/test/dummy/app/views/layouts/application.html.erb +24 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/how_to_config.rb +24 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +10 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20130603072752_create_mercury_images.rb +11 -0
- data/test/dummy/db/schema.rb +72 -0
- data/test/dummy/log/development.log +106646 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/system/images/1/medium/Screen_Shot_2013-05-06_at_6.29.38_PM.png +0 -0
- data/test/dummy/public/system/images/1/original/Screen_Shot_2013-05-06_at_6.29.38_PM.png +0 -0
- data/test/dummy/public/system/images/1/thumb/Screen_Shot_2013-05-06_at_6.29.38_PM.png +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/tmp/cache/assets/C19/4E0/sprockets%2F219d43b8396c33bb4240973157007f24 +0 -0
- data/test/dummy/tmp/cache/assets/C19/D70/sprockets%2F95f2176b2b35403940711067337fbc45 +0 -0
- data/test/dummy/tmp/cache/assets/C1C/A50/sprockets%2Fb27680619545e2251675251c81add803 +0 -0
- data/test/dummy/tmp/cache/assets/C1C/DC0/sprockets%2F31508f01060b491632f88871b8e623b5 +0 -0
- data/test/dummy/tmp/cache/assets/C26/080/sprockets%2F1f84666985c2e58230720b6a0816690c +0 -0
- data/test/dummy/tmp/cache/assets/C40/E80/sprockets%2F2af83092b21ef2934135b7a236125337 +0 -0
- data/test/dummy/tmp/cache/assets/C5E/2B0/sprockets%2Fd9466820c7fe7b5560267047c99d3043 +0 -0
- data/test/dummy/tmp/cache/assets/C5F/100/sprockets%2F3d006c41992dfd6b18734767a3996373 +0 -0
- data/test/dummy/tmp/cache/assets/C65/E00/sprockets%2F59263637894c92e6b5984a836a070a7d +0 -0
- data/test/dummy/tmp/cache/assets/C73/F80/sprockets%2F4a349df390e3102cd0541f5134691f16 +0 -0
- data/test/dummy/tmp/cache/assets/C77/6C0/sprockets%2F60816c23d175e00efa553a243858e443 +0 -0
- data/test/dummy/tmp/cache/assets/C78/EB0/sprockets%2Fc40031016afbe9392d5f83a338784531 +0 -0
- data/test/dummy/tmp/cache/assets/C7D/5D0/sprockets%2F4f93b9638caa8a81d618613101425c74 +0 -0
- data/test/dummy/tmp/cache/assets/C80/F10/sprockets%2F9811065040254626554af8fec7ea457a +0 -0
- data/test/dummy/tmp/cache/assets/C82/830/sprockets%2F0395cf08d0467ef31121a7979af25436 +0 -0
- data/test/dummy/tmp/cache/assets/C86/3B0/sprockets%2Ff15dd1dd27696f7053014106759d668a +0 -0
- data/test/dummy/tmp/cache/assets/C87/D80/sprockets%2Ff5bda9c45df08608635772529b415154 +0 -0
- data/test/dummy/tmp/cache/assets/C89/7F0/sprockets%2Fc583d687e94a56de8691613ed0351150 +0 -0
- data/test/dummy/tmp/cache/assets/C8A/220/sprockets%2Fa8cb84f1d3139717fbf4320472268895 +0 -0
- data/test/dummy/tmp/cache/assets/C8E/8A0/sprockets%2F2859bc809b0094247ec3cd482e689390 +0 -0
- data/test/dummy/tmp/cache/assets/C8F/7A0/sprockets%2Fcc8c34273d89b401cff4990772633729 +0 -0
- data/test/dummy/tmp/cache/assets/C91/2F0/sprockets%2F75f0576480e07f18eed6c6671711c946 +0 -0
- data/test/dummy/tmp/cache/assets/C92/F30/sprockets%2F8f6219673767447080fc0efd6837ec21 +0 -0
- data/test/dummy/tmp/cache/assets/C93/790/sprockets%2F73e658930537ca3695f247d1796cda90 +0 -0
- data/test/dummy/tmp/cache/assets/C9A/F20/sprockets%2F47d314d4a124d8df321042640ae162e7 +0 -0
- data/test/dummy/tmp/cache/assets/C9C/A10/sprockets%2F3d157be7033780a2681b47a0c0a216f6 +0 -0
- data/test/dummy/tmp/cache/assets/CA3/7B0/sprockets%2Fc06c2308ed51865841aac2562e1183b7 +0 -0
- data/test/dummy/tmp/cache/assets/CA7/9D0/sprockets%2F346d658742432c01098b017cdead8e13 +0 -0
- data/test/dummy/tmp/cache/assets/CAA/530/sprockets%2F02678dc075a24de22c644a2f5c513885 +0 -0
- data/test/dummy/tmp/cache/assets/CAA/780/sprockets%2F6418dd350766c5327a5538ba29cf2d01 +0 -0
- data/test/dummy/tmp/cache/assets/CAC/510/sprockets%2Fee216f5da81567402757fa740f85102a +0 -0
- data/test/dummy/tmp/cache/assets/CAC/9F0/sprockets%2Fc74a3cab8e935c54233d8122e0673646 +0 -0
- data/test/dummy/tmp/cache/assets/CAD/580/sprockets%2Fca67d461bd7507f34290b3e262b12977 +0 -0
- data/test/dummy/tmp/cache/assets/CAE/F60/sprockets%2Fb84b1272be65b7016604b945bd8283f5 +0 -0
- data/test/dummy/tmp/cache/assets/CB0/040/sprockets%2F6f1a127a70682749ea6d65135cf043e7 +0 -0
- data/test/dummy/tmp/cache/assets/CB0/530/sprockets%2F629149bb093bf3b14d197a1849d25d17 +0 -0
- data/test/dummy/tmp/cache/assets/CB0/E90/sprockets%2F28229c2b33d707cb5084cd17074299df +0 -0
- data/test/dummy/tmp/cache/assets/CB1/8C0/sprockets%2F20ba4b3d3899d258dc04e616385380c8 +0 -0
- data/test/dummy/tmp/cache/assets/CB2/A60/sprockets%2F9225dcc755785a254297f337cbe70a11 +0 -0
- data/test/dummy/tmp/cache/assets/CB2/C50/sprockets%2Faf6f5310506c59177b8c0ca4c7366917 +0 -0
- data/test/dummy/tmp/cache/assets/CB4/DF0/sprockets%2Fc0c187e7658863ae3e056d931350a4f5 +0 -0
- data/test/dummy/tmp/cache/assets/CB6/310/sprockets%2F3f74fb22bf27e70821446f15c055f777 +0 -0
- data/test/dummy/tmp/cache/assets/CB6/FC0/sprockets%2F16d4a7a322b8c356d4e97292d63692b6 +0 -0
- data/test/dummy/tmp/cache/assets/CB9/F40/sprockets%2F8c62e211ca115ece7bc6424897578719 +0 -0
- data/test/dummy/tmp/cache/assets/CBA/210/sprockets%2F1288fd75a2b7b5e9943d246071c09e65 +0 -0
- data/test/dummy/tmp/cache/assets/CBA/C80/sprockets%2F738b5f665b7408415da744199ae39a2c +0 -0
- data/test/dummy/tmp/cache/assets/CBE/030/sprockets%2Fde3c5979a7711c289575916e06be090b +0 -0
- data/test/dummy/tmp/cache/assets/CBE/6C0/sprockets%2F57c012343b1cc841a231b47ea61f20f1 +0 -0
- data/test/dummy/tmp/cache/assets/CBE/D20/sprockets%2F84482670bf9dc49d3982a749a72b2d32 +0 -0
- data/test/dummy/tmp/cache/assets/CBF/560/sprockets%2F47e4b9569d894e6a160679ca12d26e24 +0 -0
- data/test/dummy/tmp/cache/assets/CC9/5A0/sprockets%2Febdbd594563090002d0b6d21a80812d6 +0 -0
- data/test/dummy/tmp/cache/assets/CC9/F00/sprockets%2F09011a5a5890132ed38a61728cec30ac +0 -0
- data/test/dummy/tmp/cache/assets/CD2/7D0/sprockets%2F1c4d4beb82ca5d2211896f45242a1853 +0 -0
- data/test/dummy/tmp/cache/assets/CD4/FB0/sprockets%2F22b1c3474a0c4fbc10fd2865d7134949 +0 -0
- data/test/dummy/tmp/cache/assets/CD9/950/sprockets%2Fa024d6a654485447e12890bb3dc26ef2 +0 -0
- data/test/dummy/tmp/cache/assets/CDA/910/sprockets%2F2e8a211d7650278fdb6504966da3dc22 +0 -0
- data/test/dummy/tmp/cache/assets/CDC/B80/sprockets%2F31864fd74a2c488ce17be25d681410a4 +0 -0
- data/test/dummy/tmp/cache/assets/CDF/400/sprockets%2Fc72a9c317b7870b1d4a01fd67381c839 +0 -0
- data/test/dummy/tmp/cache/assets/CE1/650/sprockets%2Faa5aa69a0201992aff34899149ad2927 +0 -0
- data/test/dummy/tmp/cache/assets/CE1/9D0/sprockets%2F08e626399f6a85ef9f4a2a2521b3025c +0 -0
- data/test/dummy/tmp/cache/assets/CE3/360/sprockets%2F19b4fe2a24fb82254d2934f529a6d528 +0 -0
- data/test/dummy/tmp/cache/assets/CE3/AA0/sprockets%2Fef572aa9492f27c67f25161b8c70a263 +0 -0
- data/test/dummy/tmp/cache/assets/CE6/C80/sprockets%2Ff54768d25a1ce9035375563fb5f055bd +0 -0
- data/test/dummy/tmp/cache/assets/CE8/C70/sprockets%2F04f07c880491b5881494de2eb7c1f3d7 +0 -0
- data/test/dummy/tmp/cache/assets/CE9/8D0/sprockets%2Ffc05468c91598ab083f7860d7008bac8 +0 -0
- data/test/dummy/tmp/cache/assets/CEF/880/sprockets%2F5329c6bd6b3986d35f6934c036a6f39b +0 -0
- data/test/dummy/tmp/cache/assets/CF2/1F0/sprockets%2F21189c17343cf9583a89e75c9bdf815a +0 -0
- data/test/dummy/tmp/cache/assets/CF3/7F0/sprockets%2F779e5c8015f96f42cfe5ba6137168f44 +0 -0
- data/test/dummy/tmp/cache/assets/CF4/C70/sprockets%2F7d363a475fecc464e416948ce68178d2 +0 -0
- data/test/dummy/tmp/cache/assets/CF5/060/sprockets%2F03bb9f125e33948ee6b8e69429d8c708 +0 -0
- data/test/dummy/tmp/cache/assets/CF6/860/sprockets%2F2799c7b491e5a0149a39b765fe45f8b7 +0 -0
- data/test/dummy/tmp/cache/assets/CF6/DE0/sprockets%2F7eaf598cda47949602e7f7c287054a36 +0 -0
- data/test/dummy/tmp/cache/assets/CF9/740/sprockets%2Fb5b5f5309bfe151c2a28a435af126070 +0 -0
- data/test/dummy/tmp/cache/assets/CF9/930/sprockets%2F2210dd6a1511207bb4e61f3ce1bf9377 +0 -0
- data/test/dummy/tmp/cache/assets/CFB/4F0/sprockets%2F13616d2836c5aec01d6260bc49c32aa7 +0 -0
- data/test/dummy/tmp/cache/assets/CFE/5D0/sprockets%2F63226a4062fd6fdc4319bb3a6401b73e +0 -0
- data/test/dummy/tmp/cache/assets/CFF/240/sprockets%2F889fc9f46e9cb651766ab26b893f9060 +0 -0
- data/test/dummy/tmp/cache/assets/D00/250/sprockets%2F12356cfd31282724abc0cc493a1eb857 +0 -0
- data/test/dummy/tmp/cache/assets/D02/C80/sprockets%2F4b3b22c952d1de0ad7110f5e5722f666 +0 -0
- data/test/dummy/tmp/cache/assets/D04/B20/sprockets%2F7d319bae1ba417a95081b73bc097f081 +0 -0
- data/test/dummy/tmp/cache/assets/D06/3D0/sprockets%2Fe47dc30626d282db3c850409c21ac68d +0 -0
- data/test/dummy/tmp/cache/assets/D07/AD0/sprockets%2F6174c7254e03cd00ac4aade79b036878 +0 -0
- data/test/dummy/tmp/cache/assets/D08/6A0/sprockets%2F538321dc4ffa82fd62efb84120417e14 +0 -0
- data/test/dummy/tmp/cache/assets/D08/9E0/sprockets%2Fa035aeb2b9038f49f151a55903385ebe +0 -0
- data/test/dummy/tmp/cache/assets/D08/A60/sprockets%2F07a473b660322e92b5ceb7413cc738de +0 -0
- data/test/dummy/tmp/cache/assets/D0A/710/sprockets%2F70e0cf21aa4e94d8bdd8021858775d01 +0 -0
- data/test/dummy/tmp/cache/assets/D0C/640/sprockets%2F962c22956d6be2f4eba2156a3221c6f9 +0 -0
- data/test/dummy/tmp/cache/assets/D0C/7B0/sprockets%2F768bf4d31279b53e73a7822aa1fd412d +0 -0
- data/test/dummy/tmp/cache/assets/D0E/D90/sprockets%2F5197654422a76f8ef2312e82acccd4e0 +0 -0
- data/test/dummy/tmp/cache/assets/D10/500/sprockets%2Fd119ef73f5d6356b01352d55d3d6c9c2 +0 -0
- data/test/dummy/tmp/cache/assets/D13/B20/sprockets%2F8b44b16dd9005d5195ae17b5c65f5c94 +0 -0
- data/test/dummy/tmp/cache/assets/D14/010/sprockets%2Fe6f6d530f81136b68a256d92561ddeb4 +0 -0
- data/test/dummy/tmp/cache/assets/D14/F80/sprockets%2Fe9729d268ac7fd290cbe273d13b71831 +0 -0
- data/test/dummy/tmp/cache/assets/D15/BC0/sprockets%2F62ed7a4437b3e4e130fbb2d98865087d +0 -0
- data/test/dummy/tmp/cache/assets/D1A/760/sprockets%2F421df6566f30e58c9ec27f299a253a7a +0 -0
- data/test/dummy/tmp/cache/assets/D1B/490/sprockets%2F146ae9c91901216fdf695e6f43b9f2e1 +0 -0
- data/test/dummy/tmp/cache/assets/D1C/E70/sprockets%2Fab3e336cb533413d7f9485ed7b7a2998 +0 -0
- data/test/dummy/tmp/cache/assets/D1D/980/sprockets%2Fc88999219c9bc03d27ebe274eac64163 +0 -0
- data/test/dummy/tmp/cache/assets/D1D/9C0/sprockets%2F7579376387c4322f20ac8ffeed428bf1 +0 -0
- data/test/dummy/tmp/cache/assets/D20/570/sprockets%2Fe099d4a84148fb36663d4fc8f30fa945 +0 -0
- data/test/dummy/tmp/cache/assets/D20/F30/sprockets%2F8565cdd915ebadb92064a616c48958e7 +0 -0
- data/test/dummy/tmp/cache/assets/D2A/1D0/sprockets%2Ff5cd64f262a3110b37e34f1f3b43d04c +0 -0
- data/test/dummy/tmp/cache/assets/D2C/8F0/sprockets%2F1208ed6391ad3bc37bdf31615bdd2208 +0 -0
- data/test/dummy/tmp/cache/assets/D2C/F10/sprockets%2Ff36c41fa2eda291c9b33a432626b206d +0 -0
- data/test/dummy/tmp/cache/assets/D2E/040/sprockets%2F6cb9add4c9f3641326f694779de627e9 +0 -0
- data/test/dummy/tmp/cache/assets/D2E/650/sprockets%2F0d67cb76087efa67994fffd9793071f1 +0 -0
- data/test/dummy/tmp/cache/assets/D2F/2F0/sprockets%2Fd07408b77ae5c2231b2141be7ebc46d6 +0 -0
- data/test/dummy/tmp/cache/assets/D2F/C10/sprockets%2F178727baa262704eac250ef151daef80 +0 -0
- data/test/dummy/tmp/cache/assets/D2F/D80/sprockets%2F61235e4d441fa4da47b21fc662a2a7f4 +0 -0
- data/test/dummy/tmp/cache/assets/D30/1E0/sprockets%2Fc4e01ba5e33d851a9b7bc41091047f9a +0 -0
- data/test/dummy/tmp/cache/assets/D30/DB0/sprockets%2F535542facc4af3c31124f0509f5f1cd6 +0 -0
- data/test/dummy/tmp/cache/assets/D30/E00/sprockets%2Ffe7a64b00672333d2b01b9a1ee9df514 +0 -0
- data/test/dummy/tmp/cache/assets/D31/4B0/sprockets%2Fd022f4cf49e041cea91006350728bdfe +0 -0
- data/test/dummy/tmp/cache/assets/D31/E00/sprockets%2F23f1eaa83e9b40d52a3377e21fa3830f +0 -0
- data/test/dummy/tmp/cache/assets/D33/E50/sprockets%2F9a359b1d99b79e9d7952f795bd5e5b06 +0 -0
- data/test/dummy/tmp/cache/assets/D35/360/sprockets%2Faf10ebca1f8b40ce10246f28963581f6 +0 -0
- data/test/dummy/tmp/cache/assets/D38/440/sprockets%2F3ac356e5e9cd5373bbd3bf243091c274 +0 -0
- data/test/dummy/tmp/cache/assets/D39/D10/sprockets%2Ffd85d145bb32d7f8a0b73100d7a5e477 +0 -0
- data/test/dummy/tmp/cache/assets/D3D/280/sprockets%2Faf336a0b0473f04edbc123f8699836ce +0 -0
- data/test/dummy/tmp/cache/assets/D3D/AA0/sprockets%2Fb825a60ecf93219bbfa59426e1b0e674 +0 -0
- data/test/dummy/tmp/cache/assets/D3D/C50/sprockets%2F6f6bb68a571ad0ed0875a3f345650ae6 +0 -0
- data/test/dummy/tmp/cache/assets/D3D/F00/sprockets%2Ffa77735b526e77cb3e1a145df3b4b517 +0 -0
- data/test/dummy/tmp/cache/assets/D3F/B00/sprockets%2Fd64ddc718febf7a96600502e0740b6e6 +0 -0
- data/test/dummy/tmp/cache/assets/D41/CC0/sprockets%2F4b494edf3456a1266d4c5e9abb1853b7 +0 -0
- data/test/dummy/tmp/cache/assets/D41/CD0/sprockets%2F7a5d516096ee20b5ff6c9c0f57111d9c +0 -0
- data/test/dummy/tmp/cache/assets/D42/310/sprockets%2F5f7f69d60191bd603a22d8f35e8d71ab +0 -0
- data/test/dummy/tmp/cache/assets/D44/B60/sprockets%2F50bf1119f3805ad80a9669a8d7b93eea +0 -0
- data/test/dummy/tmp/cache/assets/D46/950/sprockets%2F5034fd78ad2bf870e6921b13e57cf74e +0 -0
- data/test/dummy/tmp/cache/assets/D4A/150/sprockets%2F58302ee8b45e99ec96257f37da3b3b2b +0 -0
- data/test/dummy/tmp/cache/assets/D4A/FD0/sprockets%2F7697ec3a4ad7f6c93a24b7c83b82c580 +0 -0
- data/test/dummy/tmp/cache/assets/D4B/500/sprockets%2F8d48b5392af0d5f62f68bdb4179073ed +0 -0
- data/test/dummy/tmp/cache/assets/D4B/940/sprockets%2F45f9087a16a889bd5c27b4c4dda587a4 +0 -0
- data/test/dummy/tmp/cache/assets/D4B/C90/sprockets%2Fd2dd2dcb1021a01638e42a7ae704f10d +0 -0
- data/test/dummy/tmp/cache/assets/D4E/6C0/sprockets%2F95e5bebb058da8680eaf07f6d7918434 +0 -0
- data/test/dummy/tmp/cache/assets/D53/360/sprockets%2F68fbda37095347e98c362f714aa6edf9 +0 -0
- data/test/dummy/tmp/cache/assets/D55/240/sprockets%2F9fd8685c40d809fab9102fe5f719c57d +0 -0
- data/test/dummy/tmp/cache/assets/D58/6B0/sprockets%2Fb4fa1b036a2ad06a7096ce6f34bc3155 +0 -0
- data/test/dummy/tmp/cache/assets/D5E/F10/sprockets%2F2493e3c20ccf117a2bc238f4265e4cdb +0 -0
- data/test/dummy/tmp/cache/assets/D5E/F70/sprockets%2Fd7f0775ce102b67c00f6cabd460c414e +0 -0
- data/test/dummy/tmp/cache/assets/D5F/360/sprockets%2F52a905ac9d5d2c285bbda75a18602cd1 +0 -0
- data/test/dummy/tmp/cache/assets/D63/D50/sprockets%2F6fe911e989a26eba56e87885c7e671fd +0 -0
- data/test/dummy/tmp/cache/assets/D66/3A0/sprockets%2F5290b688cc391fe427bddd150d3ba0e4 +0 -0
- data/test/dummy/tmp/cache/assets/D6F/BD0/sprockets%2F8d42e5b5aae95a6a71065729db319cbf +0 -0
- data/test/dummy/tmp/cache/assets/D6F/C70/sprockets%2F45b57c525f8b6cb60d972c337afab1d7 +0 -0
- data/test/dummy/tmp/cache/assets/D72/F00/sprockets%2F567d23ca5a48504bef5d9d3275fd8c2a +0 -0
- data/test/dummy/tmp/cache/assets/D75/1E0/sprockets%2Fb0426b4c9b3b35e89c6f8c1a117fe9b9 +0 -0
- data/test/dummy/tmp/cache/assets/D75/6B0/sprockets%2Fd5677267caad996b0c5910cacb78d8a3 +0 -0
- data/test/dummy/tmp/cache/assets/D75/D10/sprockets%2F998b7cb098c93b0f5cfa24b7a72bc705 +0 -0
- data/test/dummy/tmp/cache/assets/D76/380/sprockets%2F3dba07871e3815c9dbd014fcfec07989 +0 -0
- data/test/dummy/tmp/cache/assets/D76/F20/sprockets%2F544c1d52dbde4cea686745fea23966d4 +0 -0
- data/test/dummy/tmp/cache/assets/D79/320/sprockets%2F3eb7bbd968328afa2598bdf60be92273 +0 -0
- data/test/dummy/tmp/cache/assets/D7A/2B0/sprockets%2Fb1811d164159d4b8943ffed88a83febc +0 -0
- data/test/dummy/tmp/cache/assets/D7A/590/sprockets%2F488fda9ec61cc67cd66a40d4db686901 +0 -0
- data/test/dummy/tmp/cache/assets/D7B/250/sprockets%2Fab742f73049dce9be4a83bdd88e92363 +0 -0
- data/test/dummy/tmp/cache/assets/D7C/0D0/sprockets%2F1f8acfbfd2566fe79d2e03963b7e7125 +0 -0
- data/test/dummy/tmp/cache/assets/D7D/3D0/sprockets%2Ff43fd77613099ab4944e3beac67fd63e +0 -0
- data/test/dummy/tmp/cache/assets/D7F/4B0/sprockets%2Fc8b034851786e1dce4f89cfad8f03a78 +0 -0
- data/test/dummy/tmp/cache/assets/D80/D40/sprockets%2F7f47a88d4fc00badb7c392566a6ef994 +0 -0
- data/test/dummy/tmp/cache/assets/D82/C50/sprockets%2Ffc86c95bb48e4ecc57191b530ec66e79 +0 -0
- data/test/dummy/tmp/cache/assets/D8F/270/sprockets%2Face0ae5e25b4442c51c79146cbd4f3d2 +0 -0
- data/test/dummy/tmp/cache/assets/D90/A50/sprockets%2F0b141b5a5dafb84ddad1a55d068675e4 +0 -0
- data/test/dummy/tmp/cache/assets/D91/930/sprockets%2Ffd1b885c1b51d472cce3a18ac16b790a +0 -0
- data/test/dummy/tmp/cache/assets/D91/D80/sprockets%2F2efaa6861f042ee4e7040c0afb7175af +0 -0
- data/test/dummy/tmp/cache/assets/D93/2B0/sprockets%2Feab7ab6d37ca58dd8ab709041182b4d3 +0 -0
- data/test/dummy/tmp/cache/assets/D93/950/sprockets%2Fb1100cf24e57d3af1e37fd3cf5e6245d +0 -0
- data/test/dummy/tmp/cache/assets/D96/2F0/sprockets%2F41d318f17fd0bcb940cd0c5af8ad6862 +0 -0
- data/test/dummy/tmp/cache/assets/D96/610/sprockets%2Fc41fbdb656d4ba12e71643fb85f2cc62 +0 -0
- data/test/dummy/tmp/cache/assets/D99/F70/sprockets%2Fa0faa921b67c3185b3fdd384ffec3048 +0 -0
- data/test/dummy/tmp/cache/assets/D9A/8B0/sprockets%2F63d2a2dafb03dbe806f4941d2197d8fb +0 -0
- data/test/dummy/tmp/cache/assets/D9B/EA0/sprockets%2F585c1d3a2eb19360c66ba2aa786cede9 +0 -0
- data/test/dummy/tmp/cache/assets/D9D/0C0/sprockets%2F48defbce081e0e0d6b5800b8408ea89c +0 -0
- data/test/dummy/tmp/cache/assets/D9D/ED0/sprockets%2Ff6aeb0532c9f84c2d95b9c0ce22c285b +0 -0
- data/test/dummy/tmp/cache/assets/D9E/EB0/sprockets%2F2d2454a997d027c2ab4caea88beb728f +0 -0
- data/test/dummy/tmp/cache/assets/DA0/2E0/sprockets%2F51b8a2fec0b5f837f33fdd753047ecd4 +0 -0
- data/test/dummy/tmp/cache/assets/DA0/B70/sprockets%2Fa1ca1dfb58231884f75ad7fc7bfd1096 +0 -0
- data/test/dummy/tmp/cache/assets/DA1/D00/sprockets%2F3199bbdf805ad7e168f063b4c7d64bbc +0 -0
- data/test/dummy/tmp/cache/assets/DA1/EE0/sprockets%2F6ae1f85194f8f27c543edb3d6ca2ac27 +0 -0
- data/test/dummy/tmp/cache/assets/DA6/9D0/sprockets%2F537cb5de3f5a28db9b7d70f43f5146fc +0 -0
- data/test/dummy/tmp/cache/assets/DA7/9F0/sprockets%2Fc8e9d843fc40c2fbc9c634872cb4fc42 +0 -0
- data/test/dummy/tmp/cache/assets/DAA/290/sprockets%2F2b6eeff463c1c6c858d0e25a99cd571e +0 -0
- data/test/dummy/tmp/cache/assets/DAF/D30/sprockets%2F68639fcdb72c88ba936171cc8c7edd2c +0 -0
- data/test/dummy/tmp/cache/assets/DB0/890/sprockets%2F22ee8c94ae2f1f7c1dd864613e96be9f +0 -0
- data/test/dummy/tmp/cache/assets/DB1/1F0/sprockets%2F7bc0ae4c8f2cff29bc5665c497ce3966 +0 -0
- data/test/dummy/tmp/cache/assets/DB1/770/sprockets%2F4c6cdd1f99fd63d4381f8f6d914cb8a3 +0 -0
- data/test/dummy/tmp/cache/assets/DB2/190/sprockets%2Ffa0a00fbc0566cc15efb1e4b550c7b43 +0 -0
- data/test/dummy/tmp/cache/assets/DB5/670/sprockets%2Fbbe79f5c6b52ff7b5999439f9e10d2ba +0 -0
- data/test/dummy/tmp/cache/assets/DBB/310/sprockets%2F8801a53aae3a5cfbbf6afb4911b6e250 +0 -0
- data/test/dummy/tmp/cache/assets/DBF/090/sprockets%2Fa1d06161a5549a5beb04c1ecf1ee7b8f +0 -0
- data/test/dummy/tmp/cache/assets/DC1/2E0/sprockets%2F1aced1e5c45bedc05f7f356b7c04c333 +0 -0
- data/test/dummy/tmp/cache/assets/DC6/E80/sprockets%2Fa26bc43d806fbe14e3c98d1aaac7c187 +0 -0
- data/test/dummy/tmp/cache/assets/DC7/160/sprockets%2Ffabb219b45f7a15ecdfe00e9b72e1717 +0 -0
- data/test/dummy/tmp/cache/assets/DC9/1E0/sprockets%2F0cac86d268bd53b4fd345523eff0fd2c +0 -0
- data/test/dummy/tmp/cache/assets/DCB/D50/sprockets%2F6f9bf42abcffccbf79934c153a03f303 +0 -0
- data/test/dummy/tmp/cache/assets/DCC/CC0/sprockets%2F0bda2b37991f01ed84bb1f92dfc4b8e6 +0 -0
- data/test/dummy/tmp/cache/assets/DCD/2C0/sprockets%2F17cc84d7a4feca214ba059e862d72efc +0 -0
- data/test/dummy/tmp/cache/assets/DCF/B30/sprockets%2F4c59ef59af3722cc5fcab32c62cd3f27 +0 -0
- data/test/dummy/tmp/cache/assets/DD0/3A0/sprockets%2F4d4a71b06bdee794a208f465bde37cfe +0 -0
- data/test/dummy/tmp/cache/assets/DD4/690/sprockets%2Fec8e6f146d1f849cfd14d332d6abb36f +0 -0
- data/test/dummy/tmp/cache/assets/DD4/BE0/sprockets%2F4f8c298525c055dbf1dfaa6ecd5a786a +0 -0
- data/test/dummy/tmp/cache/assets/DD5/850/sprockets%2F684493b4fc6bb5cea1ed78cdc17169da +0 -0
- data/test/dummy/tmp/cache/assets/DD9/4B0/sprockets%2Ff5cced904e06e098959fd6ebb40ca47b +0 -0
- data/test/dummy/tmp/cache/assets/DD9/8B0/sprockets%2Fbf4630cdd5ef3bf43759f28c2a8fa9e3 +0 -0
- data/test/dummy/tmp/cache/assets/DDF/0A0/sprockets%2F35947cd516192ee5cedee8d2edb99ca4 +0 -0
- data/test/dummy/tmp/cache/assets/DE6/8B0/sprockets%2F22934a7eedd3cc615d252a41dbcbab0f +0 -0
- data/test/dummy/tmp/cache/assets/DEC/C40/sprockets%2Ffed907f747c5ddcc7ed1b5d9e7457b97 +0 -0
- data/test/dummy/tmp/cache/assets/DEF/5C0/sprockets%2F817fa2addeaef84032a5ae5f1a3c417d +0 -0
- data/test/dummy/tmp/cache/assets/DEF/D00/sprockets%2Fad3dc3d3f115e20c7ed4fc227bdc719a +0 -0
- data/test/dummy/tmp/cache/assets/DF1/580/sprockets%2F67e2edad1baaad15747d50b8e0960ceb +0 -0
- data/test/dummy/tmp/cache/assets/DF3/1B0/sprockets%2F2f8ca9ace0f2870bce4a5a265ffea330 +0 -0
- data/test/dummy/tmp/cache/assets/DF4/B60/sprockets%2F1c2e39610dab9505becde018fdade8e3 +0 -0
- data/test/dummy/tmp/cache/assets/DF6/9F0/sprockets%2F95ab91d0f1ec24fcd2ec65d81ece53a1 +0 -0
- data/test/dummy/tmp/cache/assets/DF8/550/sprockets%2F2af2ff76b6cd2da28d970cda7b1e64a2 +0 -0
- data/test/dummy/tmp/cache/assets/DF9/070/sprockets%2Fe9ac9b1acfd404246d5c1b99c82acfd1 +0 -0
- data/test/dummy/tmp/cache/assets/DF9/1B0/sprockets%2Fb9ead2a8c07c3aebd9d378536344bbda +0 -0
- data/test/dummy/tmp/cache/assets/DFA/C20/sprockets%2F25cf85f1a6ba24ee7d7ab1e4562aee4e +0 -0
- data/test/dummy/tmp/cache/assets/DFA/D60/sprockets%2F3f2d96bcba0351e5a51dfca709bce98e +0 -0
- data/test/dummy/tmp/cache/assets/DFB/380/sprockets%2Fcaa936ba0a3b34d83f9cd1798e1efed0 +0 -0
- data/test/dummy/tmp/cache/assets/DFB/620/sprockets%2Fae2a55e9dc2dbc0c06a8ac9b9559f4a4 +0 -0
- data/test/dummy/tmp/cache/assets/DFB/CB0/sprockets%2Fcec172552ae2ee5d3ea9f01db4359cff +0 -0
- data/test/dummy/tmp/cache/assets/DFE/230/sprockets%2F6b16bd95c7aea403dccc2cbd8a4889c6 +0 -0
- data/test/dummy/tmp/cache/assets/DFE/7A0/sprockets%2F471d58fbea73f2bb45fc9a5cbbf5622d +0 -0
- data/test/dummy/tmp/cache/assets/DFE/FD0/sprockets%2F9c107bd8a32fdea8dde8ea4f616313cf +0 -0
- data/test/dummy/tmp/cache/assets/E00/EE0/sprockets%2Fb2a8dc4198d7b8a7856ae6fca2b3a4dd +0 -0
- data/test/dummy/tmp/cache/assets/E0B/150/sprockets%2Feabd48d3cde859438fdfb4bd5c470c76 +0 -0
- data/test/dummy/tmp/cache/assets/E0C/010/sprockets%2Fcfc8c66eac1dc87e162327f9ba9e53ef +0 -0
- data/test/dummy/tmp/cache/assets/E0C/5B0/sprockets%2Fff82de3396c9e151ebc5bcc7cec49e27 +0 -0
- data/test/dummy/tmp/cache/assets/E0C/760/sprockets%2Fbc38ff5ba7465efe72f62cfff08e912a +0 -0
- data/test/dummy/tmp/cache/assets/E0D/EB0/sprockets%2Fd1dfbec7746948ef547ec405cfc61ccf +0 -0
- data/test/dummy/tmp/cache/assets/E18/550/sprockets%2Ffb1e05fd387cb16eeda010d001ded7ce +0 -0
- data/test/dummy/tmp/cache/assets/E24/520/sprockets%2Fbd16acd2525dbd537dfceb3dc3606f5d +0 -0
- data/test/dummy/tmp/cache/assets/E27/5D0/sprockets%2Fa74dfa521b6fc1b408446efbfde1b8eb +0 -0
- data/test/dummy/tmp/cache/assets/E2D/520/sprockets%2Fedded9a73a49058ddaac0feb501a876f +0 -0
- data/test/dummy/tmp/cache/assets/E7A/ED0/sprockets%2F06aed41ad28cf0c1dc8efdeecdc01f22 +0 -0
- data/test/dummy/tmp/cache/assets/E7E/C20/sprockets%2F2aedb288b2bcdce1bd9a982aff00ae5a +0 -0
- data/test/dummy/tmp/cache/sass/3fdb360d4d93587da931a45430309bf6099edb9d/bootstrap-responsive.scssc +0 -0
- data/test/dummy/tmp/cache/sass/3fdb360d4d93587da931a45430309bf6099edb9d/bootstrap.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_accordion.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_alerts.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_breadcrumbs.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_button-groups.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_buttons.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_carousel.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_close.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_code.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_component-animations.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_dropdowns.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_forms.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_grid.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_hero-unit.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_labels-badges.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_layouts.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_media.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_mixins.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_modals.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_navbar.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_navs.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_pager.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_pagination.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_popovers.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_progress-bars.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_reset.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_responsive-1200px-min.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_responsive-767px-max.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_responsive-768px-979px.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_responsive-navbar.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_responsive-utilities.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_scaffolding.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_sprites.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_tables.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_thumbnails.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_tooltip.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_type.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_utilities.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_variables.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/_wells.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/bootstrap.scssc +0 -0
- data/test/dummy/tmp/cache/sass/9b321e8af54768180e20e746ee5d44bf1cd3b0f9/responsive.scssc +0 -0
- data/test/dummy/tmp/cache/sass/a1ca19fc2b3afb4a167a105e195117650bf09684/application.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/a1ca19fc2b3afb4a167a105e195117650bf09684/bootstrap_and_overrides.css.scssc +0 -0
- data/test/fixtures/how_to/admin_users.yml +11 -0
- data/test/fixtures/how_to/contents.yml +11 -0
- data/test/fixtures/how_to/sections.yml +11 -0
- data/test/functional/how_to/faq_controller_test.rb +11 -0
- data/test/how_to_test.rb +7 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- data/test/unit/helpers/how_to/faq_helper_test.rb +6 -0
- data/test/unit/how_to/admin_user_test.rb +9 -0
- data/test/unit/how_to/content_test.rb +9 -0
- data/test/unit/how_to/section_test.rb +9 -0
- metadata +805 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2013 YOURNAME
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
= HowTo
|
2
|
+
|
3
|
+
Rails engine that makes managing faq/manual easy and simple.
|
4
|
+
|
5
|
+
===Usage
|
6
|
+
======Include the gem in your Gemfile and bundle to install the gem.
|
7
|
+
|
8
|
+
gem 'how_to'
|
9
|
+
|
10
|
+
===== Install the migrations
|
11
|
+
rake how_to:install:migrations
|
12
|
+
|
13
|
+
|
14
|
+
===== You can also get the configuration file and overrides by running the config generator.
|
15
|
+
rails g how_to:config
|
16
|
+
|
17
|
+
Details are documented in config file, so please read the config file carefully.
|
18
|
+
|
19
|
+
===== Sample helper methods you may need to define them in your application controller
|
20
|
+
|
21
|
+
def authorize_to_manage_how_to! #you can set the method name in config file
|
22
|
+
redirect_to :root, :notice => t('notifications.admin_section_access_error') unless admin?
|
23
|
+
end
|
24
|
+
|
25
|
+
def allowed_to_view_how_to #you can set the method name in config file
|
26
|
+
redirect_to main_app.root_path, :notice => t('notifications.admin_section_access_error') unless current_user
|
27
|
+
end
|
28
|
+
|
29
|
+
def permitted_to_manage_how_to? #you can set the method name in config file
|
30
|
+
admin?
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
===== Optionaly you can customise the layout and view page using:
|
35
|
+
======this will generate layout and associated partials under views/layouts/how_to/
|
36
|
+
rails g how_to:layout
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
======this will generate the public page for faq/manual under views/how_to/
|
41
|
+
rails g how_to:view
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
=== If you want to use rich text editor to manage your content HowTo uses Mercury gem for it. Just install mercury gem and configure as per your requirements. Visit https://github.com/jejacks0n/mercury for more details
|
47
|
+
Then set
|
48
|
+
config.rich_text_enabled = true
|
49
|
+
in initializers/how_to_config.rb file
|
50
|
+
|
51
|
+
|
52
|
+
====For any issues feel free to contact with me or use issue tracker. Drop me a line to ahmed2tul@gmail.com
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
This project rocks and uses MIT-LICENSE.
|
data/Rakefile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'HowTo'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
24
|
+
load 'rails/tasks/engine.rake'
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
Bundler::GemHelper.install_tasks
|
29
|
+
|
30
|
+
require 'rake/testtask'
|
31
|
+
|
32
|
+
Rake::TestTask.new(:test) do |t|
|
33
|
+
t.libs << 'lib'
|
34
|
+
t.libs << 'test'
|
35
|
+
t.pattern = 'test/**/*_test.rb'
|
36
|
+
t.verbose = false
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
task :default => :test
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require bootstrap
|
16
|
+
//= require how_to/chosen.jquery.min
|
17
|
+
//= require_self
|
18
|
+
|
19
|
+
$(document).ready(function(){
|
20
|
+
$('[chosen-enabled="true"]').chosen();
|
21
|
+
})
|
@@ -0,0 +1,10 @@
|
|
1
|
+
// Chosen, a Select Box Enhancer for jQuery and Prototype
|
2
|
+
// by Patrick Filler for Harvest, http://getharvest.com
|
3
|
+
//
|
4
|
+
// Version 0.9.14
|
5
|
+
// Full source at https://github.com/harvesthq/chosen
|
6
|
+
// Copyright (c) 2011 Harvest http://getharvest.com
|
7
|
+
|
8
|
+
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
9
|
+
// This file is generated by `cake build`, do not edit it by hand.
|
10
|
+
(function(){var e;e=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return e.nodeName.toUpperCase()==="OPTGROUP"?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,r,i,s,o;t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,children:0,disabled:e.disabled}),s=e.childNodes,o=[];for(r=0,i=s.length;r<i;r++)n=s[r],o.push(this.add_option(n,t,e.disabled));return o},e.prototype.add_option=function(e,t,n){if(e.nodeName.toUpperCase()==="OPTION")return e.text!==""?(t!=null&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:n===!0?n:e.disabled,group_array_index:t,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e}(),e.select_to_array=function(t){var n,r,i,s,o;r=new e,o=t.childNodes;for(i=0,s=o.length;i<s;i++)n=o[i],r.add_node(n);return r.parsed},this.SelectParser=e}).call(this),function(){var e,t;t=this,e=function(){function e(t,n){this.form_field=t,this.options=n!=null?n:{};if(!e.browser_is_supported())return;this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup()}return e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=this.options.allow_single_deselect!=null&&this.form_field.options[0]!=null&&this.form_field.options[0].text===""?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=this.options.enable_split_word_search!=null?this.options.enable_split_word_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=this.options.single_backstroke_delete||!1,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||e.default_no_result_text},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){var t=this;if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(){return t.blur_test()},100)},e.prototype.result_add_option=function(e){var t,n;return e.disabled?"":(e.dom_id=this.container_id+"_o_"+e.array_index,t=e.selected&&this.is_multiple?[]:["active-result"],e.selected&&t.push("result-selected"),e.group_array_index!=null&&t.push("group-option"),e.classes!==""&&t.push(e.classes),n=e.style.cssText!==""?' style="'+e.style+'"':"",'<li id="'+e.dom_id+'" class="'+t.join(" ")+'"'+n+">"+e.html+"</li>")},e.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.choices_count=function(){var e,t,n,r;if(this.selected_option_count!=null)return this.selected_option_count;this.selected_option_count=0,r=this.form_field.options;for(t=0,n=r.length;t<n;t++)e=r[t],e.selected&&(this.selected_option_count+=1);return this.selected_option_count},e.prototype.choices_click=function(e){e.preventDefault();if(!this.results_showing)return this.results_show()},e.prototype.keyup_checker=function(e){var t,n;t=(n=e.which)!=null?n:e.keyCode,this.search_field_scale();switch(t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:e.preventDefault();if(this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.generate_field_id=function(){var e;return e=this.generate_random_id(),this.form_field.id=e,e},e.prototype.generate_random_char=function(){var e,t,n;return e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=Math.floor(Math.random()*e.length),t=e.substring(n,n+1)},e.prototype.container_width=function(){return this.options.width!=null?this.options.width:""+this.form_field.offsetWidth+"px"},e.browser_is_supported=function(){var e;return window.navigator.appName==="Microsoft Internet Explorer"?null!==(e=document.documentMode)&&e>=8:!0},e.default_multiple_text="Select Some Options",e.default_single_text="Select an Option",e.default_no_result_text="No results match",e}(),t.AbstractChosen=e}.call(this),function(){var e,t,n,r={}.hasOwnProperty,i=function(e,t){function i(){this.constructor=e}for(var n in t)r.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e};n=this,e=jQuery,e.fn.extend({chosen:function(n){return AbstractChosen.browser_is_supported()?this.each(function(r){var i;i=e(this);if(!i.hasClass("chzn-done"))return i.data("chosen",new t(this,n))}):this}}),t=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return i(r,t),r.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},r.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},r.prototype.set_up_html=function(){var t,n;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/[^\w]/g,"_"):this.generate_field_id(),this.container_id+="_chzn",t=["chzn-container"],t.push("chzn-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chzn-rtl"),n={id:this.container_id,"class":t.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.container=e("<div />",n),this.is_multiple?this.container.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop"><ul class="chzn-results"></ul></div>'):this.container.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chzn-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},r.prototype.register_observers=function(){var e=this;return this.container.mousedown(function(t){e.container_mousedown(t)}),this.container.mouseup(function(t){e.container_mouseup(t)}),this.container.mouseenter(function(t){e.mouse_enter(t)}),this.container.mouseleave(function(t){e.mouse_leave(t)}),this.search_results.mouseup(function(t){e.search_results_mouseup(t)}),this.search_results.mouseover(function(t){e.search_results_mouseover(t)}),this.search_results.mouseout(function(t){e.search_results_mouseout(t)}),this.search_results.bind("mousewheel DOMMouseScroll",function(t){e.search_results_mousewheel(t)}),this.form_field_jq.bind("liszt:updated",function(t){e.results_update_field(t)}),this.form_field_jq.bind("liszt:activate",function(t){e.activate_field(t)}),this.form_field_jq.bind("liszt:open",function(t){e.container_mousedown(t)}),this.search_field.blur(function(t){e.input_blur(t)}),this.search_field.keyup(function(t){e.keyup_checker(t)}),this.search_field.keydown(function(t){e.keydown_checker(t)}),this.search_field.focus(function(t){e.input_focus(t)}),this.is_multiple?this.search_choices.click(function(t){e.choices_click(t)}):this.container.click(function(e){e.preventDefault()})},r.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled)return this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field();this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1;if(!this.is_multiple)return this.selected_item.bind("focus",this.activate_action)},r.prototype.container_mousedown=function(t){if(!this.is_disabled){t&&t.type==="mousedown"&&!this.results_showing&&t.preventDefault();if(t==null||!e(t.target).hasClass("search-choice-close"))return this.active_field?!this.is_multiple&&t&&(e(t.target)[0]===this.selected_item[0]||e(t.target).parents("a.chzn-single").length)&&(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(document).click(this.click_test_action),this.results_show()),this.activate_field()}},r.prototype.container_mouseup=function(e){if(e.target.nodeName==="ABBR"&&!this.is_disabled)return this.results_reset(e)},r.prototype.search_results_mousewheel=function(e){var t,n,r;t=-((n=e.originalEvent)!=null?n.wheelDelta:void 0)||((r=e.originialEvent)!=null?r.detail:void 0);if(t!=null)return e.preventDefault(),e.type==="DOMMouseScroll"&&(t*=40),this.search_results.scrollTop(t+this.search_results.scrollTop())},r.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},r.prototype.close_field=function(){return e(document).unbind("click",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},r.prototype.activate_field=function(){return this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},r.prototype.test_active_click=function(t){return e(t.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},r.prototype.results_build=function(){var e,t,r,i,s;this.parsing=!0,this.selected_option_count=null,this.results_data=n.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices_count()>0?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.selected_item.addClass("chzn-default").find("span").text(this.default_text),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),e="",s=this.results_data;for(r=0,i=s.length;r<i;r++)t=s[r],t.group?e+=this.result_add_group(t):t.empty||(e+=this.result_add_option(t),t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(t.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(e),this.parsing=!1},r.prototype.result_add_group=function(t){return t.disabled?"":(t.dom_id=this.container_id+"_g_"+t.array_index,'<li id="'+t.dom_id+'" class="group-result">'+e("<div />").text(t.label).html()+"</li>")},r.prototype.result_do_highlight=function(e){var t,n,r,i,s;if(e.length){this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),r=parseInt(this.search_results.css("maxHeight"),10),s=this.search_results.scrollTop(),i=r+s,n=this.result_highlight.position().top+this.search_results.scrollTop(),t=n+this.result_highlight.outerHeight();if(t>=i)return this.search_results.scrollTop(t-r>0?t-r:0);if(n<s)return this.search_results.scrollTop(n)}},r.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},r.prototype.results_show=function(){if(this.result_single_selected!=null)this.result_do_highlight(this.result_single_selected);else if(this.is_multiple&&this.max_selected_options<=this.choices_count())return this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1;return this.container.addClass("chzn-with-drop"),this.form_field_jq.trigger("liszt:showing_dropdown",{chosen:this}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},r.prototype.results_hide=function(){return this.result_clear_highlight(),this.container.removeClass("chzn-with-drop"),this.form_field_jq.trigger("liszt:hiding_dropdown",{chosen:this}),this.results_showing=!1},r.prototype.set_tab_index=function(e){var t;if(this.form_field_jq.attr("tabindex"))return t=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.search_field.attr("tabindex",t)},r.prototype.set_label_behavior=function(){var t=this;this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=e("label[for="+this.form_field.id+"]"));if(this.form_field_label.length>0)return this.form_field_label.click(function(e){return t.is_multiple?t.container_mousedown(e):t.activate_field()})},r.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},r.prototype.search_results_mouseup=function(t){var n;n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first();if(n.length)return this.result_highlight=n,this.result_select(t),this.search_field.focus()},r.prototype.search_results_mouseover=function(t){var n;n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first();if(n)return this.result_do_highlight(n)},r.prototype.search_results_mouseout=function(t){if(e(t.target).hasClass("active-result"))return this.result_clear_highlight()},r.prototype.choice_build=function(t){var n,r,i=this;return n=e("<li />",{"class":"search-choice"}).html("<span>"+t.html+"</span>"),t.disabled?n.addClass("search-choice-disabled"):(r=e("<a />",{href:"#","class":"search-choice-close",rel:t.array_index}),r.click(function(e){return i.choice_destroy_link_click(e)}),n.append(r)),this.search_container.before(n)},r.prototype.choice_destroy_link_click=function(t){t.preventDefault(),t.stopPropagation();if(!this.is_disabled)return this.choice_destroy(e(t.target))},r.prototype.choice_destroy=function(e){if(this.result_deselect(e.attr("rel")))return this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()},r.prototype.results_reset=function(){this.form_field.options[0].selected=!0,this.selected_option_count=null,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()},r.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},r.prototype.result_select=function(e){var t,n,r,i;if(this.result_highlight)return t=this.result_highlight,n=t.attr("id"),this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1):(this.is_multiple?this.result_deactivate(t):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=t,this.selected_item.removeClass("chzn-default")),t.addClass("result-selected"),i=n.substr(n.lastIndexOf("_")+1),r=this.results_data[i],r.selected=!0,this.form_field.options[r.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(r):(this.selected_item.find("span").first().text(r.text),this.allow_single_deselect&&this.single_deselect_control_build()),(!e.metaKey&&!e.ctrlKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[r.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())},r.prototype.result_activate=function(e){return e.addClass("active-result")},r.prototype.result_deactivate=function(e){return e.removeClass("active-result")},r.prototype.result_deselect=function(t){var n,r;return r=this.results_data[t],this.form_field.options[r.options_index].disabled?!1:(r.selected=!1,this.form_field.options[r.options_index].selected=!1,this.selected_option_count=null,n=e("#"+this.container_id+"_o_"+t),n.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[r.options_index].value}),this.search_field_scale(),!0)},r.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect&&this.selected_item.find("abbr").length<1)return this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>')},r.prototype.winnow_results=function(){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y;this.no_results_clear(),f=0,l=this.search_field.val()===this.default_text?"":e("<div/>").text(e.trim(this.search_field.val())).html(),o=this.search_contains?"":"^",s=new RegExp(o+l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),p=new RegExp(l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),y=this.results_data;for(d=0,m=y.length;d<m;d++){n=y[d];if(!n.disabled&&!n.empty)if(n.group)e("#"+n.dom_id).css("display","none");else if(!this.is_multiple||!n.selected){t=!1,a=n.dom_id,u=e("#"+a);if(s.test(n.html))t=!0,f+=1;else if(this.enable_split_word_search&&(n.html.indexOf(" ")>=0||n.html.indexOf("[")===0)){i=n.html.replace(/\[|\]/g,"").split(" ");if(i.length)for(v=0,g=i.length;v<g;v++)r=i[v],s.test(r)&&(t=!0,f+=1)}t?(l.length?(c=n.html.search(p),h=n.html.substr(0,c+l.length)+"</em>"+n.html.substr(c+l.length),h=h.substr(0,c)+"<em>"+h.substr(c)):h=n.html,u.html(h),this.result_activate(u),n.group_array_index!=null&&e("#"+this.results_data[n.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&a===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(u))}}return f<1&&l.length?this.no_results(l):this.winnow_results_set_highlight()},r.prototype.winnow_results_clear=function(){var t,n,r,i,s;this.search_field.val(""),n=this.search_results.find("li"),s=[];for(r=0,i=n.length;r<i;r++)t=n[r],t=e(t),t.hasClass("group-result")?s.push(t.css("display","auto")):!this.is_multiple||!t.hasClass("result-selected")?s.push(this.result_activate(t)):s.push(void 0);return s},r.prototype.winnow_results_set_highlight=function(){var e,t;if(!this.result_highlight){t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=t.length?t.first():this.search_results.find(".active-result").first();if(e!=null)return this.result_do_highlight(e)}},r.prototype.no_results=function(t){var n;return n=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),n.find("span").first().html(t),this.search_results.append(n)},r.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},r.prototype.keydown_arrow=function(){var t,n;this.result_highlight?this.results_showing&&(n=this.result_highlight.nextAll("li.active-result").first(),n&&this.result_do_highlight(n)):(t=this.search_results.find("li.active-result").first(),t&&this.result_do_highlight(e(t)));if(!this.results_showing)return this.results_show()},r.prototype.keyup_arrow=function(){var e;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())},r.prototype.keydown_backstroke=function(){var e;if(this.pending_backstroke)return this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke();e=this.search_container.siblings("li.search-choice").last();if(e.length&&!e.hasClass("search-choice-disabled"))return this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")},r.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},r.prototype.keydown_checker=function(e){var t,n;t=(n=e.which)!=null?n:e.keyCode,this.search_field_scale(),t!==8&&this.pending_backstroke&&this.clear_backstroke();switch(t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},r.prototype.search_field_scale=function(){var t,n,r,i,s,o,u,a;if(this.is_multiple){n=0,o=0,i="position:absolute; left: -1000px; top: -1000px; display:none;",s=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(u=0,a=s.length;u<a;u++)r=s[u],i+=r+":"+this.search_field.css(r)+";";return t=e("<div />",{style:i}),t.text(this.search_field.val()),e("body").append(t),o=t.width()+25,t.remove(),this.f_width||(this.f_width=this.container.outerWidth()),o>this.f_width-10&&(o=this.f_width-10),this.search_field.css({width:o+"px"})}},r.prototype.generate_random_id=function(){var t;t="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(e("#"+t).length>0)t+=this.generate_random_char();return t},r}(AbstractChosen),n.Chosen=t}.call(this);
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2007-2010 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
|
3
|
+
* Dual licensed under MIT and GPL.
|
4
|
+
* @author Ariel Flesler
|
5
|
+
* @version 1.2.9b
|
6
|
+
*/
|
7
|
+
;(function($){var h=location.href.replace(/#.*/,'');var i=$.localScroll=function(a){$('body').localScroll(a)};i.defaults={duration:1000,axis:'y',event:'click',stop:true,target:window,reset:true};i.hash=function(a){if(location.hash){a=$.extend({},i.defaults,a);a.hash=false;if(a.reset){var d=a.duration;delete a.duration;$(a.target).scrollTo(0,a);a.duration=d}scroll(0,location,a)}};$.fn.localScroll=function(b){b=$.extend({},i.defaults,b);return b.lazy?this.bind(b.event,function(e){var a=$([e.target,e.target.parentNode]).filter(filter)[0];if(a)scroll(e,a,b)}):this.find('a,area').filter(filter).bind(b.event,function(e){scroll(e,this,b)}).end().end();function filter(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==h&&(!b.filter||$(this).is(b.filter))}};function scroll(e,a,b){var c=a.hash.slice(1),elem=document.getElementById(c)||document.getElementsByName(c)[0];if(!elem)return;if(e)e.preventDefault();var d=$(b.target);if(b.lock&&d.is(':animated')||b.onBefore&&b.onBefore(e,elem,d)===false)return;if(b.stop)d._scrollable().stop(true);if(b.hash){var f=b.offset;f=f&&f.top||f||0;var g=elem.id==c?'id':'name',$a=$('<a> </a>').attr(g,c).css({position:'absolute',top:$(window).scrollTop()+f,left:$(window).scrollLeft()});elem[g]='';$('body').prepend($a);location=a.hash;$a.remove();elem[g]=c}d.scrollTo(elem,b).trigger('notify.serialScroll',[elem])}})(jQuery);
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2007-2012 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
|
3
|
+
* Dual licensed under MIT and GPL.
|
4
|
+
* @author Ariel Flesler
|
5
|
+
* @version 1.4.4
|
6
|
+
*/
|
7
|
+
;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
|
@@ -0,0 +1,256 @@
|
|
1
|
+
/*
|
2
|
+
* Treeview 1.5pre - jQuery plugin to hide and show branches of a tree
|
3
|
+
*
|
4
|
+
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
|
5
|
+
* http://docs.jquery.com/Plugins/Treeview
|
6
|
+
*
|
7
|
+
* Copyright (c) 2007 Jörn Zaefferer
|
8
|
+
*
|
9
|
+
* Dual licensed under the MIT and GPL licenses:
|
10
|
+
* http://www.opensource.org/licenses/mit-license.php
|
11
|
+
* http://www.gnu.org/licenses/gpl.html
|
12
|
+
*
|
13
|
+
* Revision: $Id: jquery.treeview.js 5759 2008-07-01 07:50:28Z joern.zaefferer $
|
14
|
+
*
|
15
|
+
*/
|
16
|
+
|
17
|
+
;(function($) {
|
18
|
+
|
19
|
+
// TODO rewrite as a widget, removing all the extra plugins
|
20
|
+
$.extend($.fn, {
|
21
|
+
swapClass: function(c1, c2) {
|
22
|
+
var c1Elements = this.filter('.' + c1);
|
23
|
+
this.filter('.' + c2).removeClass(c2).addClass(c1);
|
24
|
+
c1Elements.removeClass(c1).addClass(c2);
|
25
|
+
return this;
|
26
|
+
},
|
27
|
+
replaceClass: function(c1, c2) {
|
28
|
+
return this.filter('.' + c1).removeClass(c1).addClass(c2).end();
|
29
|
+
},
|
30
|
+
hoverClass: function(className) {
|
31
|
+
className = className || "hover";
|
32
|
+
return this.hover(function() {
|
33
|
+
$(this).addClass(className);
|
34
|
+
}, function() {
|
35
|
+
$(this).removeClass(className);
|
36
|
+
});
|
37
|
+
},
|
38
|
+
heightToggle: function(animated, callback) {
|
39
|
+
animated ?
|
40
|
+
this.animate({ height: "toggle" }, animated, callback) :
|
41
|
+
this.each(function(){
|
42
|
+
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
|
43
|
+
if(callback)
|
44
|
+
callback.apply(this, arguments);
|
45
|
+
});
|
46
|
+
},
|
47
|
+
heightHide: function(animated, callback) {
|
48
|
+
if (animated) {
|
49
|
+
this.animate({ height: "hide" }, animated, callback);
|
50
|
+
} else {
|
51
|
+
this.hide();
|
52
|
+
if (callback)
|
53
|
+
this.each(callback);
|
54
|
+
}
|
55
|
+
},
|
56
|
+
prepareBranches: function(settings) {
|
57
|
+
if (!settings.prerendered) {
|
58
|
+
// mark last tree items
|
59
|
+
this.filter(":last-child:not(ul)").addClass(CLASSES.last);
|
60
|
+
// collapse whole tree, or only those marked as closed, anyway except those marked as open
|
61
|
+
this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide();
|
62
|
+
}
|
63
|
+
// return all items with sublists
|
64
|
+
return this.filter(":has(>ul)");
|
65
|
+
},
|
66
|
+
applyClasses: function(settings, toggler) {
|
67
|
+
// TODO use event delegation
|
68
|
+
this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) {
|
69
|
+
// don't handle click events on children, eg. checkboxes
|
70
|
+
if ( this == event.target )
|
71
|
+
toggler.apply($(this).next());
|
72
|
+
}).add( $("a", this) ).hoverClass();
|
73
|
+
|
74
|
+
if (!settings.prerendered) {
|
75
|
+
// handle closed ones first
|
76
|
+
this.filter(":has(>ul:hidden)")
|
77
|
+
.addClass(CLASSES.expandable)
|
78
|
+
.replaceClass(CLASSES.last, CLASSES.lastExpandable);
|
79
|
+
|
80
|
+
// handle open ones
|
81
|
+
this.not(":has(>ul:hidden)")
|
82
|
+
.addClass(CLASSES.collapsable)
|
83
|
+
.replaceClass(CLASSES.last, CLASSES.lastCollapsable);
|
84
|
+
|
85
|
+
// create hitarea if not present
|
86
|
+
var hitarea = this.find("div." + CLASSES.hitarea);
|
87
|
+
if (!hitarea.length)
|
88
|
+
hitarea = this.prepend("<div class=\"" + CLASSES.hitarea + "\"/>").find("div." + CLASSES.hitarea);
|
89
|
+
hitarea.removeClass().addClass(CLASSES.hitarea).each(function() {
|
90
|
+
var classes = "";
|
91
|
+
$.each($(this).parent().attr("class").split(" "), function() {
|
92
|
+
classes += this + "-hitarea ";
|
93
|
+
});
|
94
|
+
$(this).addClass( classes );
|
95
|
+
})
|
96
|
+
}
|
97
|
+
|
98
|
+
// apply event to hitarea
|
99
|
+
this.find("div." + CLASSES.hitarea).click( toggler );
|
100
|
+
},
|
101
|
+
treeview: function(settings) {
|
102
|
+
|
103
|
+
settings = $.extend({
|
104
|
+
cookieId: "treeview"
|
105
|
+
}, settings);
|
106
|
+
|
107
|
+
if ( settings.toggle ) {
|
108
|
+
var callback = settings.toggle;
|
109
|
+
settings.toggle = function() {
|
110
|
+
return callback.apply($(this).parent()[0], arguments);
|
111
|
+
};
|
112
|
+
}
|
113
|
+
|
114
|
+
// factory for treecontroller
|
115
|
+
function treeController(tree, control) {
|
116
|
+
// factory for click handlers
|
117
|
+
function handler(filter) {
|
118
|
+
return function() {
|
119
|
+
// reuse toggle event handler, applying the elements to toggle
|
120
|
+
// start searching for all hitareas
|
121
|
+
toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() {
|
122
|
+
// for plain toggle, no filter is provided, otherwise we need to check the parent element
|
123
|
+
return filter ? $(this).parent("." + filter).length : true;
|
124
|
+
}) );
|
125
|
+
return false;
|
126
|
+
};
|
127
|
+
}
|
128
|
+
// click on first element to collapse tree
|
129
|
+
$("a:eq(0)", control).click( handler(CLASSES.collapsable) );
|
130
|
+
// click on second to expand tree
|
131
|
+
$("a:eq(1)", control).click( handler(CLASSES.expandable) );
|
132
|
+
// click on third to toggle tree
|
133
|
+
$("a:eq(2)", control).click( handler() );
|
134
|
+
}
|
135
|
+
|
136
|
+
// handle toggle event
|
137
|
+
function toggler() {
|
138
|
+
$(this)
|
139
|
+
.parent()
|
140
|
+
// swap classes for hitarea
|
141
|
+
.find(">.hitarea")
|
142
|
+
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
|
143
|
+
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
|
144
|
+
.end()
|
145
|
+
// swap classes for parent li
|
146
|
+
.swapClass( CLASSES.collapsable, CLASSES.expandable )
|
147
|
+
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
|
148
|
+
// find child lists
|
149
|
+
.find( ">ul" )
|
150
|
+
// toggle them
|
151
|
+
.heightToggle( settings.animated, settings.toggle );
|
152
|
+
if ( settings.unique ) {
|
153
|
+
$(this).parent()
|
154
|
+
.siblings()
|
155
|
+
// swap classes for hitarea
|
156
|
+
.find(">.hitarea")
|
157
|
+
.replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
|
158
|
+
.replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
|
159
|
+
.end()
|
160
|
+
.replaceClass( CLASSES.collapsable, CLASSES.expandable )
|
161
|
+
.replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
|
162
|
+
.find( ">ul" )
|
163
|
+
.heightHide( settings.animated, settings.toggle );
|
164
|
+
}
|
165
|
+
}
|
166
|
+
this.data("toggler", toggler);
|
167
|
+
|
168
|
+
function serialize() {
|
169
|
+
function binary(arg) {
|
170
|
+
return arg ? 1 : 0;
|
171
|
+
}
|
172
|
+
var data = [];
|
173
|
+
branches.each(function(i, e) {
|
174
|
+
data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0;
|
175
|
+
});
|
176
|
+
$.cookie(settings.cookieId, data.join(""), settings.cookieOptions );
|
177
|
+
}
|
178
|
+
|
179
|
+
function deserialize() {
|
180
|
+
var stored = $.cookie(settings.cookieId);
|
181
|
+
if ( stored ) {
|
182
|
+
var data = stored.split("");
|
183
|
+
branches.each(function(i, e) {
|
184
|
+
$(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ]();
|
185
|
+
});
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
// add treeview class to activate styles
|
190
|
+
this.addClass("treeview");
|
191
|
+
|
192
|
+
// prepare branches and find all tree items with child lists
|
193
|
+
var branches = this.find("li").prepareBranches(settings);
|
194
|
+
|
195
|
+
switch(settings.persist) {
|
196
|
+
case "cookie":
|
197
|
+
var toggleCallback = settings.toggle;
|
198
|
+
settings.toggle = function() {
|
199
|
+
serialize();
|
200
|
+
if (toggleCallback) {
|
201
|
+
toggleCallback.apply(this, arguments);
|
202
|
+
}
|
203
|
+
};
|
204
|
+
deserialize();
|
205
|
+
break;
|
206
|
+
case "location":
|
207
|
+
var current = this.find("a").filter(function() {
|
208
|
+
return this.href.toLowerCase() == location.href.toLowerCase();
|
209
|
+
});
|
210
|
+
if ( current.length ) {
|
211
|
+
// TODO update the open/closed classes
|
212
|
+
var items = current.addClass("selected").parents("ul, li").add( current.next() ).show();
|
213
|
+
if (settings.prerendered) {
|
214
|
+
// if prerendered is on, replicate the basic class swapping
|
215
|
+
items.filter("li")
|
216
|
+
.swapClass( CLASSES.collapsable, CLASSES.expandable )
|
217
|
+
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
|
218
|
+
.find(">.hitarea")
|
219
|
+
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
|
220
|
+
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea );
|
221
|
+
}
|
222
|
+
}
|
223
|
+
break;
|
224
|
+
}
|
225
|
+
|
226
|
+
branches.applyClasses(settings, toggler);
|
227
|
+
|
228
|
+
// if control option is set, create the treecontroller and show it
|
229
|
+
if ( settings.control ) {
|
230
|
+
treeController(this, settings.control);
|
231
|
+
$(settings.control).show();
|
232
|
+
}
|
233
|
+
|
234
|
+
return this;
|
235
|
+
}
|
236
|
+
});
|
237
|
+
|
238
|
+
// classes used by the plugin
|
239
|
+
// need to be styled via external stylesheet, see first example
|
240
|
+
$.treeview = {};
|
241
|
+
var CLASSES = ($.treeview.classes = {
|
242
|
+
open: "open",
|
243
|
+
closed: "closed",
|
244
|
+
expandable: "expandable",
|
245
|
+
expandableHitarea: "expandable-hitarea",
|
246
|
+
lastExpandableHitarea: "lastExpandable-hitarea",
|
247
|
+
collapsable: "collapsable",
|
248
|
+
collapsableHitarea: "collapsable-hitarea",
|
249
|
+
lastCollapsableHitarea: "lastCollapsable-hitarea",
|
250
|
+
lastCollapsable: "lastCollapsable",
|
251
|
+
lastExpandable: "lastExpandable",
|
252
|
+
last: "last",
|
253
|
+
hitarea: "hitarea"
|
254
|
+
});
|
255
|
+
|
256
|
+
})(jQuery);
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require how_to/bootstrap_and_overrides
|
12
|
+
*= require how_to/chosen
|
13
|
+
*= require_self
|
14
|
+
*= require_tree .
|
15
|
+
*/
|
16
|
+
|
17
|
+
|
18
|
+
.content {
|
19
|
+
background-color: #eee;
|
20
|
+
padding: 20px;
|
21
|
+
margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */
|
22
|
+
-webkit-border-radius: 0 0 6px 6px;
|
23
|
+
-moz-border-radius: 0 0 6px 6px;
|
24
|
+
border-radius: 0 0 6px 6px;
|
25
|
+
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
26
|
+
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
27
|
+
box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
28
|
+
}
|
Binary file
|
Binary file
|