crystal-ext 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +4 -0
- data/Rakefile +66 -0
- data/lib/abstract_interface/controller_helper.rb +30 -0
- data/lib/abstract_interface/form_builders/abstract_form_builder.rb +79 -0
- data/lib/abstract_interface/form_builders/themed_form_builder.rb +46 -0
- data/lib/abstract_interface/form_builders/themed_form_tag_builder.rb +13 -0
- data/lib/abstract_interface/haml_builder.rb +56 -0
- data/lib/abstract_interface/model_stub.rb +20 -0
- data/lib/abstract_interface/support.rb +56 -0
- data/lib/abstract_interface/theme.rb +37 -0
- data/lib/abstract_interface/view_builder.rb +158 -0
- data/lib/abstract_interface/view_helper.rb +31 -0
- data/lib/abstract_interface.rb +78 -0
- data/lib/common_interface/MIT-LICENSE +20 -0
- data/lib/common_interface/README.md +51 -0
- data/lib/common_interface/app/controllers/theme_controller.rb +65 -0
- data/lib/common_interface/app/controllers/theme_site_controller.rb +2 -0
- data/lib/common_interface/app/views/layouts/theme.html.erb +1 -0
- data/lib/common_interface/app/views/layouts/theme.js.erb +11 -0
- data/lib/common_interface/app/views/theme/_dialog.html.haml +7 -0
- data/lib/common_interface/app/views/theme/_popup.html.haml +4 -0
- data/lib/common_interface/app/views/theme/aspects.html.haml +32 -0
- data/lib/common_interface/app/views/theme/basic.html.haml +123 -0
- data/lib/common_interface/app/views/theme/dialog.js.erb +1 -0
- data/lib/common_interface/app/views/theme/folder.html.haml +45 -0
- data/lib/common_interface/app/views/theme/help.html.haml +7 -0
- data/lib/common_interface/app/views/theme/index.html.haml +24 -0
- data/lib/common_interface/app/views/theme/items.html.haml +91 -0
- data/lib/common_interface/app/views/theme/list.html.haml +23 -0
- data/lib/common_interface/app/views/theme/page/_folder.html.haml +10 -0
- data/lib/common_interface/app/views/theme/page/_note.html.haml +4 -0
- data/lib/common_interface/app/views/theme/page/_toolbar.html.haml +5 -0
- data/lib/common_interface/app/views/theme/page.html.haml +19 -0
- data/lib/common_interface/app/views/theme/popup.js.erb +1 -0
- data/lib/common_interface/app/views/theme/selector.html.haml +38 -0
- data/lib/common_interface/app/views/theme/style.html.erb +113 -0
- data/lib/common_interface/app/views/theme/tmp.html.erb +31 -0
- data/lib/common_interface/app/views/theme/user.html.haml +16 -0
- data/lib/common_interface/app/views/theme_shared/_comments.html.haml +11 -0
- data/lib/common_interface/app/views/theme_shared/_core_tools.html.haml +6 -0
- data/lib/common_interface/app/views/theme_shared/_line_previews.html.haml +39 -0
- data/lib/common_interface/app/views/theme_shared/_paginator.html.haml +7 -0
- data/lib/common_interface/app/views/theme_shared/_tools.html.haml +27 -0
- data/lib/common_interface/app/views/theme_shared/_top_navigation_bottom.html.haml +32 -0
- data/lib/common_interface/app/views/theme_site/blog.html.haml +13 -0
- data/lib/common_interface/app/views/theme_site/home.html.haml +9 -0
- data/lib/common_interface/app/views/theme_site/post.html.haml +11 -0
- data/lib/common_interface/app/views/theme_site/style.html.haml +9 -0
- data/lib/common_interface/app/views/themes/default/_application_t.html.haml +29 -0
- data/lib/common_interface/app/views/themes/default/_help_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/aspects/_comment_t.html.haml +14 -0
- data/lib/common_interface/app/views/themes/default/aspects/_controls_t.html.haml +3 -0
- data/lib/common_interface/app/views/themes/default/aspects/_details_t.html.haml +6 -0
- data/lib/common_interface/app/views/themes/default/aspects/_discussion_t.html.haml +9 -0
- data/lib/common_interface/app/views/themes/default/aspects/_paginator_t.html.haml +8 -0
- data/lib/common_interface/app/views/themes/default/aspects/_tag_selector_t.html.haml +11 -0
- data/lib/common_interface/app/views/themes/default/basic/_bottom_panel_t.html.haml +9 -0
- data/lib/common_interface/app/views/themes/default/basic/_dialog_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/basic/_divider_t.html.haml +2 -0
- data/lib/common_interface/app/views/themes/default/basic/_html_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/basic/_inplace_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/basic/_message_t.html.haml +3 -0
- data/lib/common_interface/app/views/themes/default/basic/_more_t.html.haml +5 -0
- data/lib/common_interface/app/views/themes/default/basic/_narrow_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/basic/_navigation_t.html.haml +9 -0
- data/lib/common_interface/app/views/themes/default/basic/_popup_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/basic/_text_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/basic/_title_t.html.haml +3 -0
- data/lib/common_interface/app/views/themes/default/basic/_tool_t.html.haml +4 -0
- data/lib/common_interface/app/views/themes/default/basic/_top_panel_t.html.haml +18 -0
- data/lib/common_interface/app/views/themes/default/components/_basic_list_item_t.html.haml +4 -0
- data/lib/common_interface/app/views/themes/default/components/_basic_list_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/components/_table_row_t.html.haml +5 -0
- data/lib/common_interface/app/views/themes/default/components/_table_t.html.haml +12 -0
- data/lib/common_interface/app/views/themes/default/components/_tabs_item_t.html.haml +4 -0
- data/lib/common_interface/app/views/themes/default/components/_tabs_t.html.haml +4 -0
- data/lib/common_interface/app/views/themes/default/components/_toolbar_t.html.haml +14 -0
- data/lib/common_interface/app/views/themes/default/forms/_begin_t.html.erb +3 -0
- data/lib/common_interface/app/views/themes/default/forms/_end_t.html.erb +3 -0
- data/lib/common_interface/app/views/themes/default/forms/_errors_t.html.haml +5 -0
- data/lib/common_interface/app/views/themes/default/forms/_field_t.html.haml +19 -0
- data/lib/common_interface/app/views/themes/default/forms/_line_t.html.haml +6 -0
- data/lib/common_interface/app/views/themes/default/items/_file_t.html.haml +19 -0
- data/lib/common_interface/app/views/themes/default/items/_folder_t.html.haml +23 -0
- data/lib/common_interface/app/views/themes/default/items/_line_t.html.haml +34 -0
- data/lib/common_interface/app/views/themes/default/items/_list_item_t.html.haml +16 -0
- data/lib/common_interface/app/views/themes/default/items/_list_t.html.haml +35 -0
- data/lib/common_interface/app/views/themes/default/items/_note_t.html.haml +16 -0
- data/lib/common_interface/app/views/themes/default/items/_page_t.html.haml +29 -0
- data/lib/common_interface/app/views/themes/default/items/_selector_t.html.haml +18 -0
- data/lib/common_interface/app/views/themes/default/items/_thumb_t.html.haml +12 -0
- data/lib/common_interface/app/views/themes/default/items/_user_t.html.haml +12 -0
- data/lib/common_interface/app/views/themes/default/layout_templates/_dashboard_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/layout_templates/_default_t.html.haml +11 -0
- data/lib/common_interface/app/views/themes/default/metadata.rb +117 -0
- data/lib/common_interface/app/views/themes/simple_organization/_application_js_t.html.erb +12 -0
- data/lib/common_interface/app/views/themes/simple_organization/_application_t.html.erb +45 -0
- data/lib/common_interface/app/views/themes/simple_organization/_help_t.html.erb +1 -0
- data/lib/common_interface/app/views/themes/simple_organization/aspects/_comment_t.html.haml +21 -0
- data/lib/common_interface/app/views/themes/simple_organization/aspects/_discussion_t.html.haml +14 -0
- data/lib/common_interface/app/views/themes/simple_organization/aspects/_paginator_t.html.haml +5 -0
- data/lib/common_interface/app/views/themes/simple_organization/aspects/_tag_selector_t.html.haml +10 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_bottom_panel_t.html.erb +12 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_divider_t.html.erb +3 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_message_t.html.erb +7 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_more_t.html.haml +5 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_navigation_t.html.erb +15 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_text_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_tool_t.html.erb +9 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_top_panel_t.html.erb +14 -0
- data/lib/common_interface/app/views/themes/simple_organization/items/_line_t.html.haml +17 -0
- data/lib/common_interface/app/views/themes/simple_organization/items/_note_t.html.haml +16 -0
- data/lib/common_interface/app/views/themes/simple_organization/items/_selector_t.html.haml +11 -0
- data/lib/common_interface/app/views/themes/simple_organization/layout_templates/_default_t.html.erb +20 -0
- data/lib/common_interface/app/views/themes/simple_organization/layout_templates/_home_t.html.erb +14 -0
- data/lib/common_interface/app/views/themes/simple_organization/metadata.rb +193 -0
- data/lib/common_interface/asset_packages.yml +89 -0
- data/lib/common_interface/init.rb +21 -0
- data/lib/common_interface/lib/common_interface_helper.rb +49 -0
- data/lib/common_interface/public/common_interface/images/img1.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img1_200.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img1_icon.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img1_thumb.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img2.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img2_200.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img2_icon.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img2_thumb.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img3.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img3_200.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img3_icon.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img3_thumb.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/video_icon.png +0 -0
- data/lib/common_interface/public/common_interface/js/aspects.js +0 -0
- data/lib/common_interface/public/common_interface/js/basic.js +229 -0
- data/lib/common_interface/public/common_interface/js/files_upload.js +115 -0
- data/lib/common_interface/public/common_interface/js/items.js +118 -0
- data/lib/common_interface/public/common_interface/js/style.js +50 -0
- data/lib/common_interface/public/common_interface/lib/jquery.elastic.js +117 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/blank.gif +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_close.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_loading.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_nav_left.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_nav_right.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_e.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_n.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_ne.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_nw.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_s.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_se.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_sw.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_w.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_title_left.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_title_main.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_title_over.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_title_right.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancybox-x.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancybox-y.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancybox.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.easing-1.3.pack.js +72 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.fancybox-1.3.1.js +1077 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.fancybox.css +363 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.fancybox.js +44 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.mousewheel-3.0.2.pack.js +13 -0
- data/lib/common_interface/public/common_interface/lib/jquery.form.js +660 -0
- data/lib/common_interface/public/common_interface/lib/jquery.hoverIntent.js +111 -0
- data/lib/common_interface/public/common_interface/lib/jquery.jgrowl/jquery.jgrowl.css +128 -0
- data/lib/common_interface/public/common_interface/lib/jquery.jgrowl/jquery.jgrowl.js +307 -0
- data/lib/common_interface/public/common_interface/lib/jquery.js +4376 -0
- data/lib/common_interface/public/common_interface/lib/jquery.json.js +178 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/cancel.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/jquery.swfupload.js +64 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/style.css +8 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/swfupload/swfupload.js +980 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/swfupload/swfupload.queue.js +98 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/swfupload/swfupload.swf +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/swfupload/wdp_buttons_upload_61x22.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.template.js +255 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_222222_256x240.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_228ef1_256x240.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_ef8c08_256x240.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_ffd27a_256x240.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_ffffff_256x240.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/jquery.ui.css +406 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/jquery.ui.js +71 -0
- data/lib/common_interface/public/common_interface/themes/default/_aspects.scss +58 -0
- data/lib/common_interface/public/common_interface/themes/default/_basic.scss +228 -0
- data/lib/common_interface/public/common_interface/themes/default/_components.scss +151 -0
- data/lib/common_interface/public/common_interface/themes/default/_custom_reset.scss +12 -0
- data/lib/common_interface/public/common_interface/themes/default/_elastic.scss +72 -0
- data/lib/common_interface/public/common_interface/themes/default/_items.scss +88 -0
- data/lib/common_interface/public/common_interface/themes/default/_mixins.scss +39 -0
- data/lib/common_interface/public/common_interface/themes/default/_special.scss +34 -0
- data/lib/common_interface/public/common_interface/themes/default/_variables.scss +15 -0
- data/lib/common_interface/public/common_interface/themes/default/_yui_reset.scss +127 -0
- data/lib/common_interface/public/common_interface/themes/default/elastic.js +307 -0
- data/lib/common_interface/public/common_interface/themes/default/elastic.print.css +8 -0
- data/lib/common_interface/public/common_interface/themes/default/reset.css +157 -0
- data/lib/common_interface/public/common_interface/themes/default/reset.scss +5 -0
- data/lib/common_interface/public/common_interface/themes/default/style.css +580 -0
- data/lib/common_interface/public/common_interface/themes/default/style.js +84 -0
- data/lib/common_interface/public/common_interface/themes/default/style.scss +11 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/_fixes.scss +130 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/_original.scss +852 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/comment-arrow.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/comment-gravatar.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/comment-reply.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/logo-small.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/logo.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/main-two-columns-left.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/main-two-columns.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/sample-event.jpg +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/sample-gravatar.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/sample-image.jpg +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/sample-thumbnail.jpg +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/archives.html +389 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/comments.html +486 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/empty-page.html +107 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/comment-arrow.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/comment-gravatar.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/comment-reply.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/logo-small.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/logo.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/main-two-columns-left.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/main-two-columns.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/sample-event.jpg +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/sample-gravatar.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/sample-image.jpg +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/sample-thumbnail.jpg +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/index.html +307 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/left-sidebar.html +307 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/no-subnavigation.html +290 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/single-column.html +209 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/style-demo.html +355 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/style.css +658 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/style.css +965 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/style.scss +2 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/tmp/comments.html +486 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/tmp/tmp.html +307 -0
- data/lib/common_interface/spec/controllers/theme_controller_spec.rb +50 -0
- data/lib/common_interface/spec/spec.opts +4 -0
- data/lib/common_interface/spec/spec_helper.rb +1 -0
- data/lib/common_interface/tmp/html.html +39 -0
- data/lib/common_interface/tmp/js.js +78 -0
- data/lib/mongo_mapper_ext/db_config.rb +76 -0
- data/lib/mongo_mapper_ext/hacks/fixes.rb +32 -0
- data/lib/mongo_mapper_ext/hacks/time_measuring.rb +44 -0
- data/lib/mongo_mapper_ext/micelaneous.rb +9 -0
- data/lib/mongo_mapper_ext/migrate.rake +33 -0
- data/lib/mongo_mapper_ext/migration.rb +108 -0
- data/lib/mongo_mapper_ext/mongo_mapper.rb +25 -0
- data/lib/mongo_mapper_ext/plugins/attributes_cache.rb +22 -0
- data/lib/mongo_mapper_ext/plugins/default_scope.rb +76 -0
- data/lib/mongo_mapper_ext/plugins/micelaneous.rb +81 -0
- data/lib/mongo_mapper_ext/spec_helper.rb +10 -0
- data/lib/mongo_mapper_ext/view_helpers.rb +10 -0
- data/lib/mongo_mapper_ext.rb +29 -0
- data/lib/rails_ext/README.markdown +13 -0
- data/lib/rails_ext/action_controller/global_path_prefix.rb +56 -0
- data/lib/rails_ext/action_controller/micelaneous.rb +118 -0
- data/lib/rails_ext/action_controller/persistent_params.rb +96 -0
- data/lib/rails_ext/action_controller/redirect_helper.rb +14 -0
- data/lib/rails_ext/action_controller/reload_page.rb +7 -0
- data/lib/rails_ext/action_controller.rb +19 -0
- data/lib/rails_ext/action_view/common_helper.rb +96 -0
- data/lib/rails_ext/action_view/ruby_template.rb +13 -0
- data/lib/rails_ext/action_view.rb +5 -0
- data/lib/rails_ext/active_record/merge_default_scope/hash_poser.rb +40 -0
- data/lib/rails_ext/active_record/merge_default_scope.rb +16 -0
- data/lib/rails_ext/active_record/micelaneous.rb +14 -0
- data/lib/rails_ext/active_record.rb +7 -0
- data/lib/rails_ext/active_support/micelaneous.rb +7 -0
- data/lib/rails_ext/active_support.rb +1 -0
- data/lib/rails_ext/asset_packager/action_view.rb +47 -0
- data/lib/rails_ext/asset_packager/asset_packager.rb +112 -0
- data/lib/rails_ext/asset_packager/jsmin.rb +205 -0
- data/lib/rails_ext/asset_packager/tasks.rb +27 -0
- data/lib/rails_ext/asset_packager.rb +4 -0
- data/lib/rails_ext/basic/handy_environment.rb +45 -0
- data/lib/rails_ext/basic/user_error.rb +12 -0
- data/lib/rails_ext/basic.rb +6 -0
- data/lib/rails_ext/hacks/ajax_flash.rb +9 -0
- data/lib/rails_ext/hacks/ajax_redirect_to.rb +19 -0
- data/lib/rails_ext/hacks/defer_static_javascripts.rb +18 -0
- data/lib/rails_ext/hacks/global_path_prefix.rb +33 -0
- data/lib/rails_ext/hacks/link_to.rb +105 -0
- data/lib/rails_ext/hacks/merge_default_scope.rb +20 -0
- data/lib/rails_ext/hacks/persistent_params.rb +16 -0
- data/lib/rails_ext/hacks/rjs_layout.rb +2 -0
- data/lib/rails_ext/micelaneous/addressable_uri.rb +45 -0
- data/lib/rails_ext/micelaneous/config_files.rb +18 -0
- data/lib/rails_ext/micelaneous/create_public_symlinks.rb +11 -0
- data/lib/rails_ext/micelaneous/defer_static_javascripts.rb +50 -0
- data/lib/rails_ext/micelaneous/email_config.rb +8 -0
- data/lib/rails_ext/micelaneous/i18n_helper.rb +143 -0
- data/lib/rails_ext/micelaneous/rails_require.rb +4 -0
- data/lib/rails_ext/micelaneous/safe_hash.rb +104 -0
- data/lib/rails_ext/micelaneous.rb +17 -0
- data/lib/rails_ext/public/rails_ext/rails_ext.css +2 -0
- data/lib/rails_ext/public/rails_ext/rails_ext.js +283 -0
- data/lib/rails_ext/spec/mongo_mapper_ext/micelaneous_plugin_spec.rb +56 -0
- data/lib/rails_ext/spec/mongo_mapper_ext/micelaneous_spec.rb +51 -0
- data/lib/rails_ext/spec/mongo_mapper_ext/mongo_mapper_migration_spec.rb +76 -0
- data/lib/rails_ext/spec/mongo_mapper_ext/scope_spec.rb +125 -0
- data/lib/rails_ext/spec/rails_ext/haml_builder_spec.rb +136 -0
- data/lib/rails_ext/spec/rails_ext/safe_hash_spec.rb +71 -0
- data/lib/rails_ext/spec/spec.opts +3 -0
- data/lib/sunspot/mongo_mapper/adapters.rb +79 -0
- data/lib/sunspot/mongo_mapper/searchable.rb +409 -0
- data/lib/sunspot/spec_helper.rb +11 -0
- data/readme.md +1 -0
- data/spec/mongo_mapper_ext/micelaneous_plugin_spec.rb +56 -0
- data/spec/mongo_mapper_ext/micelaneous_spec.rb +51 -0
- data/spec/mongo_mapper_ext/mongo_mapper_migration_spec.rb +76 -0
- data/spec/mongo_mapper_ext/scope_spec.rb +125 -0
- data/spec/rails_ext/haml_builder_spec.rb +136 -0
- data/spec/rails_ext/safe_hash_spec.rb +71 -0
- data/spec/spec.opts +4 -0
- metadata +405 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// Files Upload
|
|
2
|
+
(function($){
|
|
3
|
+
FilesUpload = function(params, opt){
|
|
4
|
+
this.params = params;
|
|
5
|
+
this.opt = opt;
|
|
6
|
+
|
|
7
|
+
var _this = this;
|
|
8
|
+
$.callOnceAfterUpdate('file_upload', function(){_this.initialize()});
|
|
9
|
+
};
|
|
10
|
+
var _this = FilesUpload;
|
|
11
|
+
|
|
12
|
+
_this.prototype = {
|
|
13
|
+
initialize: function(){
|
|
14
|
+
var _this = this;
|
|
15
|
+
|
|
16
|
+
// Escape params
|
|
17
|
+
var params = $.extend({format: 'js', authenticity_token: $.authenticity_token}, this.params)
|
|
18
|
+
|
|
19
|
+
// Initialize flash
|
|
20
|
+
var content = $('._upload_dialog');
|
|
21
|
+
var flashHolder = content.find('._flash_holder');
|
|
22
|
+
|
|
23
|
+
var upload_url = decode_uri(this.opt.upload_url);
|
|
24
|
+
upload_url = (upload_url.indexOf('?') >= 0) ? (upload_url + '&'+$.param(params)) : (upload_url + '?'+$.param(params));
|
|
25
|
+
|
|
26
|
+
var flash_params = {
|
|
27
|
+
upload_url: upload_url,
|
|
28
|
+
file_post_name: 'file[file]',
|
|
29
|
+
// file_size_limit : "1024",
|
|
30
|
+
// file_types : "*.jpg;*.png;*.gif",
|
|
31
|
+
// file_types_description : "Image files",
|
|
32
|
+
file_upload_limit : 20,
|
|
33
|
+
flash_url : '/common_interface/lib/jquery.swfupload/swfupload/swfupload.swf',
|
|
34
|
+
|
|
35
|
+
button_text : this.opt.select_files,
|
|
36
|
+
// button_image_url : sm.serviceUrl('/plugins/jquery.swfupload/swfupload/wdp_buttons_upload_61x22.png'),
|
|
37
|
+
|
|
38
|
+
// button_text : '<span class="btnText">Select Files...</span>',
|
|
39
|
+
// button_text_style : ".btnText { font-size: 10; font-weight: bold; font-family: MS Shell Dlg; }",
|
|
40
|
+
// button_text_top_padding : 3,
|
|
41
|
+
// button_text_left_padding : 100,
|
|
42
|
+
|
|
43
|
+
button_width : 61,
|
|
44
|
+
button_height : 22,
|
|
45
|
+
button_placeholder : content.find('._flash_holder')[0],
|
|
46
|
+
prevent_swf_caching: false,
|
|
47
|
+
debug: false
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var flash_wrapper = flashHolder.swfupload(flash_params);
|
|
51
|
+
|
|
52
|
+
flash_wrapper
|
|
53
|
+
.bind('fileQueued', function(event, file){
|
|
54
|
+
var params = $.extend({}, file, {
|
|
55
|
+
size_in_kb: Math.round(file.size/1024)
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
var t = $.template(content.find('._file_progress_template').val())
|
|
59
|
+
content.find('._queue').append(t, params);
|
|
60
|
+
var fileItem = content.find('._file_'+file.id)
|
|
61
|
+
fileItem.find('._cancel').bind('click', function(){
|
|
62
|
+
// var swfu = $.swfupload.getInstance(vp.wiget + ' ._flash_holder');
|
|
63
|
+
flashHolder.swfupload('cancelUpload', file.id);
|
|
64
|
+
fileItem.slideUp('fast');
|
|
65
|
+
});
|
|
66
|
+
// start the upload since it's queued
|
|
67
|
+
// $(this).swfupload('startUpload');
|
|
68
|
+
})
|
|
69
|
+
.bind('fileQueueError', function(event, file, errorCode, message){
|
|
70
|
+
alert('Size of the file '+file.name+' is greater than limit');
|
|
71
|
+
})
|
|
72
|
+
// .bind('fileDialogComplete', function(event, numFilesSelected, numFilesQueued){
|
|
73
|
+
// $('#queuestatus').text('Files Selected: '+numFilesSelected+' / Queued Files: '+numFilesQueued);
|
|
74
|
+
// })
|
|
75
|
+
.bind('uploadStart', function(event, file){
|
|
76
|
+
var fileItem = content.find('._queue ._file_' + file.id)
|
|
77
|
+
fileItem.find('._progressvalue').text('0%');
|
|
78
|
+
fileItem.find('._cancel').hide();
|
|
79
|
+
})
|
|
80
|
+
.bind('uploadProgress', function(event, file, bytesLoaded){
|
|
81
|
+
var percentage=Math.round((bytesLoaded/file.size)*100);
|
|
82
|
+
var fileItem = content.find('._queue ._file_' + file.id)
|
|
83
|
+
fileItem.find('._progress').css('width', percentage+'%');
|
|
84
|
+
fileItem.find('._progressvalue').text(percentage+'%');
|
|
85
|
+
})
|
|
86
|
+
.bind('uploadSuccess', function(event, file, data){
|
|
87
|
+
var fileItem = content.find('._queue ._file_' + file.id);
|
|
88
|
+
fileItem.find('._progress').css('width', '100%');
|
|
89
|
+
fileItem.find('._progressvalue').text('100%');
|
|
90
|
+
fileItem.slideUp('fast');
|
|
91
|
+
|
|
92
|
+
data = data.replace('<textarea>', '').replace('</textarea>', '');
|
|
93
|
+
eval(data.toString());
|
|
94
|
+
$.refresh_js_css();
|
|
95
|
+
})
|
|
96
|
+
// .bind('uploadComplete', function(event, file){
|
|
97
|
+
// })
|
|
98
|
+
.bind('queueComplete', function(){
|
|
99
|
+
// $.ajax({
|
|
100
|
+
// data: $.param({format: 'js'}),
|
|
101
|
+
// dataType: 'script',
|
|
102
|
+
// type: 'get',
|
|
103
|
+
// url: _this.opt.refresh_url
|
|
104
|
+
// });
|
|
105
|
+
$('._dialog').remove();
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// 'Upload' button
|
|
109
|
+
content.find('._upload').click(function(){
|
|
110
|
+
flashHolder.swfupload('startUpload');
|
|
111
|
+
return false;
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
})(jQuery);
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
//
|
|
2
|
+
// List
|
|
3
|
+
//
|
|
4
|
+
$.callOnceForEvery('list', '._list', function(){
|
|
5
|
+
var maxFinishedTasks = 3;
|
|
6
|
+
|
|
7
|
+
var list = $(this);
|
|
8
|
+
var container = list.find('._container:first');
|
|
9
|
+
var show_more = list.find('._show_more');
|
|
10
|
+
var show_less = list.find('._show_less');
|
|
11
|
+
var hidden_tasks = list.find('._hidden_tasks');
|
|
12
|
+
|
|
13
|
+
// Hide Finished Tasks if ther's more than 3
|
|
14
|
+
var hide_tasks = function(){
|
|
15
|
+
var lastNotFinishedTask = container.find('> ._item:not(._finished):last');
|
|
16
|
+
if(!lastNotFinishedTask.blank()){
|
|
17
|
+
var tasks = container.find('> ._item');
|
|
18
|
+
var lastNotFinishedTaskIndex = tasks.index(lastNotFinishedTask);
|
|
19
|
+
var finishedTasks = tasks.slice(lastNotFinishedTaskIndex, -1);
|
|
20
|
+
|
|
21
|
+
if(finishedTasks.size() > maxFinishedTasks){
|
|
22
|
+
show_more.show();
|
|
23
|
+
var tasksToHide = tasks.slice(lastNotFinishedTaskIndex + maxFinishedTasks, -1);
|
|
24
|
+
tasksToHide.remove().appendTo(hidden_tasks);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
hide_tasks();
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
// Initialize more/less buttons
|
|
32
|
+
show_more.click(function(){
|
|
33
|
+
hidden_tasks.find('._item').appendTo(list.find('._container'));
|
|
34
|
+
show_more.hide();
|
|
35
|
+
show_less.show();
|
|
36
|
+
return false;
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
show_less.click(function(){
|
|
40
|
+
hide_tasks();
|
|
41
|
+
show_less.hide();
|
|
42
|
+
return false;
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
//
|
|
48
|
+
// Sortable
|
|
49
|
+
//
|
|
50
|
+
$.callAfterUpdate('sortable', function(){
|
|
51
|
+
$('._sortable_container').each(function(){
|
|
52
|
+
var container = $(this);
|
|
53
|
+
var opt = {
|
|
54
|
+
item_class: container.dataAttr('item_class'),
|
|
55
|
+
update_order_url: container.dataAttr('update_order_url')
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
container = container.find('._container').not(container.find('._container ._container'));
|
|
59
|
+
|
|
60
|
+
container.sortable({
|
|
61
|
+
handle: '._handle',
|
|
62
|
+
items: '> .' + opt.item_class,
|
|
63
|
+
update: function(event, ui) {
|
|
64
|
+
var item = $(ui.item);
|
|
65
|
+
var index = container.find('.' + opt.item_class).index(item);
|
|
66
|
+
// var url = page.dataAttr('container_order_url')
|
|
67
|
+
if(opt.update_order_url){
|
|
68
|
+
$.post(opt.update_order_url, {index: index, item_id: item.attr('id')})
|
|
69
|
+
}else{
|
|
70
|
+
log("Item '" + item.identify() + "' moved to position '" + index + "'.")
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
//
|
|
79
|
+
// Folder
|
|
80
|
+
//
|
|
81
|
+
// Image View Box
|
|
82
|
+
$.callOnceForEvery('folder_image_box', '._folder', function(){
|
|
83
|
+
var folder = $(this);
|
|
84
|
+
var links = folder.find('a._image_box');
|
|
85
|
+
links.attr('rel', 'images');
|
|
86
|
+
links.fancybox();
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
//
|
|
90
|
+
// Page
|
|
91
|
+
//
|
|
92
|
+
// Toolbars
|
|
93
|
+
$.callAfterUpdate('page_toolbar', function(){
|
|
94
|
+
$('._page').each(function(){
|
|
95
|
+
var page = $(this);
|
|
96
|
+
var container = page.find('._container').first();
|
|
97
|
+
|
|
98
|
+
container.find('._toolbar').remove();
|
|
99
|
+
|
|
100
|
+
var toolbar_html = page.find('._toolbar_template').val();
|
|
101
|
+
container.find('> ._item:visible, > ._inplace').each(function(){
|
|
102
|
+
$(this).after(toolbar_html);
|
|
103
|
+
});
|
|
104
|
+
container.prepend(toolbar_html);
|
|
105
|
+
});
|
|
106
|
+
}, 1);
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
//
|
|
110
|
+
// Checkbox
|
|
111
|
+
//
|
|
112
|
+
// Onclick
|
|
113
|
+
$.callOnceForEvery('onclick_for_checkbox', '._onclick_checkbox', function(){
|
|
114
|
+
var checkbox = $(this);
|
|
115
|
+
checkbox.click(function(){
|
|
116
|
+
$.ajax({data: $.param({target: checkbox.identify()}), type: 'post', url: checkbox.dataAttr('url')});
|
|
117
|
+
});
|
|
118
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Images by default should be alligned to the left (wrapped inside .left div)
|
|
3
|
+
//
|
|
4
|
+
$.callOnceForEvery('left_img_allign', '._markup', function(){
|
|
5
|
+
var markup = $(this);
|
|
6
|
+
var imagesWithoutDiv = markup.find('img').not(markup.find('div img'));
|
|
7
|
+
imagesWithoutDiv.each(function(){
|
|
8
|
+
var e = $(this);
|
|
9
|
+
// image can be wrapped inside link
|
|
10
|
+
while(true){
|
|
11
|
+
var parent = e.parent();
|
|
12
|
+
if(parent.hasClass('_markup') || !(parent.is('a') || parent.is('div') || parent.is('span'))) break;
|
|
13
|
+
e = parent;
|
|
14
|
+
}
|
|
15
|
+
e.wrap($("<div class='left'></div>"));
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
//
|
|
21
|
+
// Image Box inside Markup
|
|
22
|
+
//
|
|
23
|
+
$.callOnceForEvery('markup_image_box', '._markup', function(){
|
|
24
|
+
var markup = $(this);
|
|
25
|
+
|
|
26
|
+
// Images
|
|
27
|
+
markup.find('a:has(img)').not('._video').not('._nobox').attr('rel', 'images').fancybox();
|
|
28
|
+
|
|
29
|
+
// Videos
|
|
30
|
+
markup.find('a._video').click(function() {
|
|
31
|
+
$.fancybox({
|
|
32
|
+
'padding' : 0,
|
|
33
|
+
// 'autoScale' : false,
|
|
34
|
+
'transitionIn': 'none',
|
|
35
|
+
'transitionOut': 'none',
|
|
36
|
+
'title': this.title,
|
|
37
|
+
// 'width' : 680,
|
|
38
|
+
// 'height' : 495,
|
|
39
|
+
'href': this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
|
|
40
|
+
// 'href' : "http://www.youtube.com/watch?v=M-cIjPOJdFM&fs=1".replace(new RegExp("watch\\?v=", "i"), 'v/'),
|
|
41
|
+
'type': 'swf',
|
|
42
|
+
'swf': {
|
|
43
|
+
'wmode': 'transparent',
|
|
44
|
+
'allowfullscreen' : 'true'
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return false;
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name Elastic
|
|
3
|
+
* @descripton Elastic is Jquery plugin that grow and shrink your textareas automaticliy
|
|
4
|
+
* @version 1.6.4
|
|
5
|
+
* @requires Jquery 1.2.6+
|
|
6
|
+
*
|
|
7
|
+
* @author Jan Jarfalk
|
|
8
|
+
* @author-email jan.jarfalk@unwrongest.com
|
|
9
|
+
* @author-website http://www.unwrongest.com
|
|
10
|
+
*
|
|
11
|
+
* @licens MIT License - http://www.opensource.org/licenses/mit-license.php
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
(function(jQuery){
|
|
15
|
+
jQuery.fn.extend({
|
|
16
|
+
elastic: function() {
|
|
17
|
+
|
|
18
|
+
// We will create a div clone of the textarea
|
|
19
|
+
// by copying these attributes from the textarea to the div.
|
|
20
|
+
var mimics = [
|
|
21
|
+
'paddingTop',
|
|
22
|
+
'paddingRight',
|
|
23
|
+
'paddingBottom',
|
|
24
|
+
'paddingLeft',
|
|
25
|
+
'fontSize',
|
|
26
|
+
'lineHeight',
|
|
27
|
+
'fontFamily',
|
|
28
|
+
'width',
|
|
29
|
+
'fontWeight'];
|
|
30
|
+
|
|
31
|
+
return this.each( function() {
|
|
32
|
+
|
|
33
|
+
// Elastic only works on textareas
|
|
34
|
+
if ( this.type != 'textarea' ) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
var $textarea = jQuery(this),
|
|
39
|
+
$twin = jQuery('<div />').css({'position': 'absolute','display':'none','word-wrap':'break-word'}),
|
|
40
|
+
lineHeight = parseInt($textarea.css('line-height'),10) || parseInt($textarea.css('font-size'),'10'),
|
|
41
|
+
minheight = parseInt($textarea.css('height'),10) || lineHeight*3,
|
|
42
|
+
maxheight = parseInt($textarea.css('max-height'),10) || Number.MAX_VALUE,
|
|
43
|
+
goalheight = 0,
|
|
44
|
+
i = 0;
|
|
45
|
+
|
|
46
|
+
// Opera returns max-height of -1 if not set
|
|
47
|
+
if (maxheight < 0) { maxheight = Number.MAX_VALUE; }
|
|
48
|
+
|
|
49
|
+
// Append the twin to the DOM
|
|
50
|
+
// We are going to meassure the height of this, not the textarea.
|
|
51
|
+
$twin.appendTo($textarea.parent());
|
|
52
|
+
|
|
53
|
+
// Copy the essential styles (mimics) from the textarea to the twin
|
|
54
|
+
var i = mimics.length;
|
|
55
|
+
while(i--){
|
|
56
|
+
$twin.css(mimics[i].toString(),$textarea.css(mimics[i].toString()));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
// Sets a given height and overflow state on the textarea
|
|
61
|
+
function setHeightAndOverflow(height, overflow){
|
|
62
|
+
curratedHeight = Math.floor(parseInt(height,10));
|
|
63
|
+
if($textarea.height() != curratedHeight){
|
|
64
|
+
$textarea.css({'height': curratedHeight + 'px','overflow':overflow});
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
// This function will update the height of the textarea if necessary
|
|
71
|
+
function update() {
|
|
72
|
+
|
|
73
|
+
// Get curated content from the textarea.
|
|
74
|
+
var textareaContent = $textarea.val().replace(/&/g,'&').replace(/ /g, ' ').replace(/<|>/g, '>').replace(/\n/g, '<br />');
|
|
75
|
+
|
|
76
|
+
var twinContent = $twin.html();
|
|
77
|
+
|
|
78
|
+
if(textareaContent+' ' != twinContent){
|
|
79
|
+
|
|
80
|
+
// Add an extra white space so new rows are added when you are at the end of a row.
|
|
81
|
+
$twin.html(textareaContent+' ');
|
|
82
|
+
|
|
83
|
+
// Change textarea height if twin plus the height of one line differs more than 3 pixel from textarea height
|
|
84
|
+
if(Math.abs($twin.height()+lineHeight - $textarea.height()) > 3){
|
|
85
|
+
|
|
86
|
+
var goalheight = $twin.height()+lineHeight;
|
|
87
|
+
if(goalheight >= maxheight) {
|
|
88
|
+
setHeightAndOverflow(maxheight,'auto');
|
|
89
|
+
} else if(goalheight <= minheight) {
|
|
90
|
+
setHeightAndOverflow(minheight,'hidden');
|
|
91
|
+
} else {
|
|
92
|
+
setHeightAndOverflow(goalheight,'hidden');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Hide scrollbars
|
|
102
|
+
$textarea.css({'overflow':'hidden'});
|
|
103
|
+
|
|
104
|
+
// Update textarea size on keyup
|
|
105
|
+
$textarea.keyup(function(){ update(); });
|
|
106
|
+
|
|
107
|
+
// And this line is to catch the browser paste event
|
|
108
|
+
$textarea.live('input paste',function(e){ setTimeout( update, 250); });
|
|
109
|
+
|
|
110
|
+
// Run update once when elastic is initialized
|
|
111
|
+
update();
|
|
112
|
+
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
})(jQuery);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.easing-1.3.pack.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
|
3
|
+
*
|
|
4
|
+
* Uses the built in easing capabilities added In jQuery 1.1
|
|
5
|
+
* to offer multiple easing options
|
|
6
|
+
*
|
|
7
|
+
* TERMS OF USE - jQuery Easing
|
|
8
|
+
*
|
|
9
|
+
* Open source under the BSD License.
|
|
10
|
+
*
|
|
11
|
+
* Copyright © 2008 George McGinley Smith
|
|
12
|
+
* All rights reserved.
|
|
13
|
+
*
|
|
14
|
+
* Redistribution and use in source and binary forms, with or without modification,
|
|
15
|
+
* are permitted provided that the following conditions are met:
|
|
16
|
+
*
|
|
17
|
+
* Redistributions of source code must retain the above copyright notice, this list of
|
|
18
|
+
* conditions and the following disclaimer.
|
|
19
|
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
|
20
|
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
|
21
|
+
* provided with the distribution.
|
|
22
|
+
*
|
|
23
|
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
|
24
|
+
* or promote products derived from this software without specific prior written permission.
|
|
25
|
+
*
|
|
26
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
27
|
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
28
|
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
29
|
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
30
|
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
|
31
|
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
32
|
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
33
|
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
34
|
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
// t: current time, b: begInnIng value, c: change In value, d: duration
|
|
39
|
+
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}))
|
|
40
|
+
|
|
41
|
+
/*
|
|
42
|
+
*
|
|
43
|
+
* TERMS OF USE - EASING EQUATIONS
|
|
44
|
+
*
|
|
45
|
+
* Open source under the BSD License.
|
|
46
|
+
*
|
|
47
|
+
* Copyright © 2001 Robert Penner
|
|
48
|
+
* All rights reserved.
|
|
49
|
+
*
|
|
50
|
+
* Redistribution and use in source and binary forms, with or without modification,
|
|
51
|
+
* are permitted provided that the following conditions are met:
|
|
52
|
+
*
|
|
53
|
+
* Redistributions of source code must retain the above copyright notice, this list of
|
|
54
|
+
* conditions and the following disclaimer.
|
|
55
|
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
|
56
|
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
|
57
|
+
* provided with the distribution.
|
|
58
|
+
*
|
|
59
|
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
|
60
|
+
* or promote products derived from this software without specific prior written permission.
|
|
61
|
+
*
|
|
62
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
63
|
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
64
|
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
65
|
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
66
|
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
|
67
|
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
68
|
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
69
|
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
70
|
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
71
|
+
*
|
|
72
|
+
*/
|