kirgudu_base 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +40 -0
- data/app/assets/images/kirgudu_base/404-fry.png +0 -0
- data/app/assets/images/kirgudu_base/Documents.gif +0 -0
- data/app/assets/images/kirgudu_base/Meetings.gif +0 -0
- data/app/assets/images/kirgudu_base/Repair.gif +0 -0
- data/app/assets/images/kirgudu_base/ajax-loader.gif +0 -0
- data/app/assets/images/kirgudu_base/alpha.png +0 -0
- data/app/assets/images/kirgudu_base/alpha2.png +0 -0
- data/app/assets/images/kirgudu_base/arrow.png +0 -0
- data/app/assets/images/kirgudu_base/box.gif +0 -0
- data/app/assets/images/kirgudu_base/chosen-sprite.png +0 -0
- data/app/assets/images/kirgudu_base/company_pxg.png +0 -0
- data/app/assets/images/kirgudu_base/datatables/back_disabled.png +0 -0
- data/app/assets/images/kirgudu_base/datatables/back_enabled.png +0 -0
- data/app/assets/images/kirgudu_base/datatables/back_enabled_hover.png +0 -0
- data/app/assets/images/kirgudu_base/datatables/forward_disabled.png +0 -0
- data/app/assets/images/kirgudu_base/datatables/forward_enabled.png +0 -0
- data/app/assets/images/kirgudu_base/datatables/forward_enabled_hover.png +0 -0
- data/app/assets/images/kirgudu_base/datatables/sort_asc.png +0 -0
- data/app/assets/images/kirgudu_base/datatables/sort_asc_disabled.png +0 -0
- data/app/assets/images/kirgudu_base/datatables/sort_both.png +0 -0
- data/app/assets/images/kirgudu_base/datatables/sort_desc.png +0 -0
- data/app/assets/images/kirgudu_base/datatables/sort_desc_disabled.png +0 -0
- data/app/assets/images/kirgudu_base/fancybox/blank.gif +0 -0
- data/app/assets/images/kirgudu_base/fancybox/fancybox_buttons.png +0 -0
- data/app/assets/images/kirgudu_base/fancybox/fancybox_loading.gif +0 -0
- data/app/assets/images/kirgudu_base/fancybox/fancybox_overlay.png +0 -0
- data/app/assets/images/kirgudu_base/fancybox/fancybox_sprite.png +0 -0
- data/app/assets/images/kirgudu_base/favicon.png +0 -0
- data/app/assets/images/kirgudu_base/general/clock.png +0 -0
- data/app/assets/images/kirgudu_base/general/clock2.png +0 -0
- data/app/assets/images/kirgudu_base/general/coffee.png +0 -0
- data/app/assets/images/kirgudu_base/general/coffee2.png +0 -0
- data/app/assets/images/kirgudu_base/general/flipchart.png +0 -0
- data/app/assets/images/kirgudu_base/general/flipchart2.png +0 -0
- data/app/assets/images/kirgudu_base/general/sun.png +0 -0
- data/app/assets/images/kirgudu_base/general/sun2.png +0 -0
- data/app/assets/images/kirgudu_base/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/kirgudu_base/glyphicons-halflings.png +0 -0
- data/app/assets/images/kirgudu_base/gradient1.png +0 -0
- data/app/assets/images/kirgudu_base/hue2.png +0 -0
- data/app/assets/images/kirgudu_base/ico_16_4_d.gif +0 -0
- data/app/assets/images/kirgudu_base/ico_18_1010.gif +0 -0
- data/app/assets/images/kirgudu_base/ico_18_112.gif +0 -0
- data/app/assets/images/kirgudu_base/ico_18_2020.gif +0 -0
- data/app/assets/images/kirgudu_base/icon-contacts.gif +0 -0
- data/app/assets/images/kirgudu_base/icon-employees.gif +0 -0
- data/app/assets/images/kirgudu_base/icon-list.gif +0 -0
- data/app/assets/images/kirgudu_base/icon-orders-green.gif +0 -0
- data/app/assets/images/kirgudu_base/icon-orders.gif +0 -0
- data/app/assets/images/kirgudu_base/icon-tenders.gif +0 -0
- data/app/assets/images/kirgudu_base/icons-sa7c41345d9.png +0 -0
- data/app/assets/images/kirgudu_base/login-corner.png +0 -0
- data/app/assets/images/kirgudu_base/login-corner2.png +0 -0
- data/app/assets/images/kirgudu_base/logo.png +0 -0
- data/app/assets/images/kirgudu_base/maps/m1.png +0 -0
- data/app/assets/images/kirgudu_base/maps/m2.png +0 -0
- data/app/assets/images/kirgudu_base/maps/m3.png +0 -0
- data/app/assets/images/kirgudu_base/meeting-schedule.gif +0 -0
- data/app/assets/images/kirgudu_base/menu_icons/calendar.png +0 -0
- data/app/assets/images/kirgudu_base/menu_icons/dashboard.png +0 -0
- data/app/assets/images/kirgudu_base/menu_icons/forms.png +0 -0
- data/app/assets/images/kirgudu_base/menu_icons/gallery.png +0 -0
- data/app/assets/images/kirgudu_base/menu_icons/grid.png +0 -0
- data/app/assets/images/kirgudu_base/menu_icons/maps.png +0 -0
- data/app/assets/images/kirgudu_base/menu_icons/others.png +0 -0
- data/app/assets/images/kirgudu_base/menu_icons/statistics.png +0 -0
- data/app/assets/images/kirgudu_base/menu_icons/tables.png +0 -0
- data/app/assets/images/kirgudu_base/menu_icons/widgets.png +0 -0
- data/app/assets/images/kirgudu_base/menu_top/profile-avatar.png +0 -0
- data/app/assets/images/kirgudu_base/menu_top/profile-messages.png +0 -0
- data/app/assets/images/kirgudu_base/message_avatar1.png +0 -0
- data/app/assets/images/kirgudu_base/message_avatar2.png +0 -0
- data/app/assets/images/kirgudu_base/message_avatar3.png +0 -0
- data/app/assets/images/kirgudu_base/message_avatar4.png +0 -0
- data/app/assets/images/kirgudu_base/message_avatar5.png +0 -0
- data/app/assets/images/kirgudu_base/message_avatar6.png +0 -0
- data/app/assets/images/kirgudu_base/message_avatar7.png +0 -0
- data/app/assets/images/kirgudu_base/news-icon-16.gif +0 -0
- data/app/assets/images/kirgudu_base/operator-def.png +0 -0
- data/app/assets/images/kirgudu_base/patterns/bg_dark.png +0 -0
- data/app/assets/images/kirgudu_base/patterns/bg_dark2.png +0 -0
- data/app/assets/images/kirgudu_base/patterns/bg_dark3.png +0 -0
- data/app/assets/images/kirgudu_base/patterns/whitey.png +0 -0
- data/app/assets/images/kirgudu_base/people-16-16-256.gif +0 -0
- data/app/assets/images/kirgudu_base/sales_24x24 (1).gif +0 -0
- data/app/assets/images/kirgudu_base/sample_avatar_big.jpg +0 -0
- data/app/assets/images/kirgudu_base/saturation2.png +0 -0
- data/app/assets/images/kirgudu_base/search.png +0 -0
- data/app/assets/images/kirgudu_base/toggle.png +0 -0
- data/app/assets/images/kirgudu_base/ui-bg_fine-grain_10_e7e7e7_60x60.png +0 -0
- data/app/assets/images/kirgudu_base/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/kirgudu_base/ui-bg_flat_0_ef4622_40x100.png +0 -0
- data/app/assets/images/kirgudu_base/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/images/kirgudu_base/ui-bg_highlight-hard_100_e1e1e1_1x100.png +0 -0
- data/app/assets/images/kirgudu_base/ui-bg_highlight-hard_100_eeeeee_1x100.png +0 -0
- data/app/assets/images/kirgudu_base/ui-bg_highlight-hard_75_dddddd_1x100.png +0 -0
- data/app/assets/images/kirgudu_base/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
- data/app/assets/images/kirgudu_base/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/kirgudu_base/ui-icons_525d66_256x240.png +0 -0
- data/app/assets/images/kirgudu_base/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/images/kirgudu_base/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/images/kirgudu_base/uploadify-cancel.png +0 -0
- data/app/assets/javascripts/kirgudu_base/ajax_form.js +52 -0
- data/app/assets/javascripts/kirgudu_base/application.js +15 -0
- data/app/assets/javascripts/kirgudu_base/avgrund.js +85 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-alert.js +90 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-button.js +96 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-carousel.js +176 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-collapse.js +158 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-colorpicker.js +520 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-datepicker.js +401 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-dropdown.js +150 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-modal.js +239 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-popover.js +103 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-scrollspy.js +151 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-tab.js +135 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-tooltip.js +275 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-transition.js +60 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-typeahead.js +300 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap-wysihtml5.js +458 -0
- data/app/assets/javascripts/kirgudu_base/bootstrap.js +6 -0
- data/app/assets/javascripts/kirgudu_base/character-limit.js +18 -0
- data/app/assets/javascripts/kirgudu_base/chosen.jquery.min.js +10 -0
- data/app/assets/javascripts/kirgudu_base/client_main.js +1017 -0
- data/app/assets/javascripts/kirgudu_base/delete.js +67 -0
- data/app/assets/javascripts/kirgudu_base/excanvas.compiled.js +35 -0
- data/app/assets/javascripts/kirgudu_base/fileinput.jquery.js +98 -0
- data/app/assets/javascripts/kirgudu_base/fullcalendar.js +5220 -0
- data/app/assets/javascripts/kirgudu_base/gmap3.min.js +39 -0
- data/app/assets/javascripts/kirgudu_base/highcharts.js +246 -0
- data/app/assets/javascripts/kirgudu_base/jdpicker.js +555 -0
- data/app/assets/javascripts/kirgudu_base/jnavigate.jquery.min.js +2 -0
- data/app/assets/javascripts/kirgudu_base/jquery-ui-1.8.23.custom.min.js +125 -0
- data/app/assets/javascripts/kirgudu_base/jquery-ui-1.8.23.custom.min_d9931121.js +125 -0
- data/app/assets/javascripts/kirgudu_base/jquery.blockUI.js +534 -0
- data/app/assets/javascripts/kirgudu_base/jquery.bookblock.js +533 -0
- data/app/assets/javascripts/kirgudu_base/jquery.cookie.js +94 -0
- data/app/assets/javascripts/kirgudu_base/jquery.dataTables.js +12092 -0
- data/app/assets/javascripts/kirgudu_base/jquery.endless-scroll.js +343 -0
- data/app/assets/javascripts/kirgudu_base/jquery.fancybox-buttons.js +121 -0
- data/app/assets/javascripts/kirgudu_base/jquery.fancybox-media.js +196 -0
- data/app/assets/javascripts/kirgudu_base/jquery.fancybox-thumbs.js +162 -0
- data/app/assets/javascripts/kirgudu_base/jquery.fancybox.js +1985 -0
- data/app/assets/javascripts/kirgudu_base/jquery.flot.crosshair.js +167 -0
- data/app/assets/javascripts/kirgudu_base/jquery.flot.js +2599 -0
- data/app/assets/javascripts/kirgudu_base/jquery.flot.pie.js +751 -0
- data/app/assets/javascripts/kirgudu_base/jquery.flot.resize.js +60 -0
- data/app/assets/javascripts/kirgudu_base/jquery.flot.spider.js +314 -0
- data/app/assets/javascripts/kirgudu_base/jquery.flot.stack.js +184 -0
- data/app/assets/javascripts/kirgudu_base/jquery.history.js +1 -0
- data/app/assets/javascripts/kirgudu_base/jquery.jcarousel.min.js +16 -0
- data/app/assets/javascripts/kirgudu_base/jquery.jeditable.js +543 -0
- data/app/assets/javascripts/kirgudu_base/jquery.js +2 -0
- data/app/assets/javascripts/kirgudu_base/jquery.json-2.3.min.js +23 -0
- data/app/assets/javascripts/kirgudu_base/jquery.maskedinput-1.3.js +258 -0
- data/app/assets/javascripts/kirgudu_base/jquery.mousewheel-min.js +12 -0
- data/app/assets/javascripts/kirgudu_base/jquery.peity.min.js +11 -0
- data/app/assets/javascripts/kirgudu_base/jquery.simplemodal-1.4.4.js +716 -0
- data/app/assets/javascripts/kirgudu_base/jquery.slides.min.js +7 -0
- data/app/assets/javascripts/kirgudu_base/jquery.sparkline.min.js +5 -0
- data/app/assets/javascripts/kirgudu_base/jquery.tagsinput.js +354 -0
- data/app/assets/javascripts/kirgudu_base/jquery.tools.min.js +17 -0
- data/app/assets/javascripts/kirgudu_base/jquery.touchdown.js +54 -0
- data/app/assets/javascripts/kirgudu_base/jquery.uniform.min.js +17 -0
- data/app/assets/javascripts/kirgudu_base/jquery.uploadify-3.1.js +975 -0
- data/app/assets/javascripts/kirgudu_base/jquery.uploadify.min.js +16 -0
- data/app/assets/javascripts/kirgudu_base/jquery.url-2.0.js +174 -0
- data/app/assets/javascripts/kirgudu_base/jquery.validate.min.js +4 -0
- data/app/assets/javascripts/kirgudu_base/jquerypp.custom.js +301 -0
- data/app/assets/javascripts/kirgudu_base/justgage.1.0.1.min.js +12 -0
- data/app/assets/javascripts/kirgudu_base/main.js +157 -0
- data/app/assets/javascripts/kirgudu_base/modernizr.custom.32549.js +815 -0
- data/app/assets/javascripts/kirgudu_base/mustache.js +532 -0
- data/app/assets/javascripts/kirgudu_base/popbox.js +57 -0
- data/app/assets/javascripts/kirgudu_base/raphael.2.1.0.min.js +10 -0
- data/app/assets/javascripts/kirgudu_base/scripts.js +1277 -0
- data/app/assets/javascripts/kirgudu_base/scripts_OLD.js +204 -0
- data/app/assets/javascripts/kirgudu_base/sub_select.js +50 -0
- data/app/assets/javascripts/kirgudu_base/swfobject.js +5 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shAutoloader.js +17 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushAS3.js +59 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushAppleScript.js +75 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushBash.js +59 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushCSharp.js +65 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushColdFusion.js +100 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushCpp.js +97 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushCss.js +91 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushDelphi.js +55 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushDiff.js +41 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushErlang.js +52 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushGroovy.js +67 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushJScript.js +52 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushJava.js +57 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushJavaFX.js +58 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushPerl.js +72 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushPhp.js +88 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushPlain.js +33 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushPowerShell.js +74 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushPython.js +64 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushRuby.js +55 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushSass.js +94 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushScala.js +51 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushSql.js +66 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushVb.js +56 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shBrushXml.js +69 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shCore.js +17 -0
- data/app/assets/javascripts/kirgudu_base/syntax-highlighter/shLegacy.js +17 -0
- data/app/assets/javascripts/kirgudu_base/textarea-autogrow.js +55 -0
- data/app/assets/javascripts/kirgudu_base/tiny_mce.js +1 -0
- data/app/assets/javascripts/kirgudu_base/watch.js +81 -0
- data/app/assets/javascripts/kirgudu_base/web/inputPlaceholder.js +82 -0
- data/app/assets/javascripts/kirgudu_base/web/js.js +91 -0
- data/app/assets/javascripts/kirgudu_base/web/navigate.js +20 -0
- data/app/assets/javascripts/kirgudu_base/web/watch.js +1706 -0
- data/app/assets/javascripts/kirgudu_base/wysihtml5-0.3.0.min.js +261 -0
- data/app/assets/stylesheets/kirgudu_base/bootstrap.css +4551 -0
- data/app/assets/stylesheets/kirgudu_base/chosen.css +397 -0
- data/app/assets/stylesheets/kirgudu_base/fullcalendar.css +655 -0
- data/app/assets/stylesheets/kirgudu_base/info-message.css +79 -0
- data/app/assets/stylesheets/kirgudu_base/jdpicker.css +200 -0
- data/app/assets/stylesheets/kirgudu_base/jquery-ui-1.8.23.custom.css +1235 -0
- data/app/assets/stylesheets/kirgudu_base/jquery.fancybox-buttons.css +96 -0
- data/app/assets/stylesheets/kirgudu_base/jquery.fancybox-thumbs.css +54 -0
- data/app/assets/stylesheets/kirgudu_base/jquery.fancybox.css +249 -0
- data/app/assets/stylesheets/kirgudu_base/jquery.tagsinput.css +7 -0
- data/app/assets/stylesheets/kirgudu_base/main.css +1368 -0
- data/app/assets/stylesheets/kirgudu_base/menu.css +159 -0
- data/app/assets/stylesheets/kirgudu_base/popbox.css +58 -0
- data/app/assets/stylesheets/kirgudu_base/responsive.css +2249 -0
- data/app/assets/stylesheets/kirgudu_base/switcher.css +80 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCore.css +226 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreDefault.css +328 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreDjango.css +331 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreEclipse.css +339 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreEmacs.css +324 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreFadeToGrey.css +328 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreMDUltra.css +324 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreMidnight.css +324 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shCoreRDark.css +324 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeDefault.css +117 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeDjango.css +120 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeEclipse.css +128 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeEmacs.css +113 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeFadeToGrey.css +117 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeMDUltra.css +113 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeMidnight.css +113 -0
- data/app/assets/stylesheets/kirgudu_base/syntax-higlignter/shThemeRDark.css +113 -0
- data/app/assets/stylesheets/kirgudu_base/uploadify.css +92 -0
- data/app/controllers/kirgudu_base/admin_controller.rb +91 -0
- data/app/controllers/kirgudu_base/application_controller.rb +676 -0
- data/app/controllers/kirgudu_base/cabinet_controller.rb +93 -0
- data/app/controllers/kirgudu_base/facade_controller.rb +82 -0
- data/app/helpers/kirgudu_base/application_helper.rb +486 -0
- data/app/helpers/kirgudu_base/breadcrumbs_helper.rb +27 -0
- data/app/helpers/kirgudu_base/class_helper.rb +32 -0
- data/app/helpers/kirgudu_base/controllers/basic_actions.rb +625 -0
- data/app/helpers/kirgudu_base/controllers/container_items_management_actions.rb +118 -0
- data/app/helpers/kirgudu_base/controllers/container_items_sorting_actions.rb +64 -0
- data/app/helpers/kirgudu_base/controllers/dynamic_pages.rb +30 -0
- data/app/helpers/kirgudu_base/controllers/obligatory_filters.rb +29 -0
- data/app/helpers/kirgudu_base/controllers/transaction_wrapper.rb +138 -0
- data/app/helpers/kirgudu_base/form_builder.rb +474 -0
- data/app/helpers/kirgudu_base/gui_helper.rb +443 -0
- data/app/helpers/kirgudu_base/models/basic_management_urls.rb +104 -0
- data/app/helpers/kirgudu_base/models/data_filter.rb +236 -0
- data/app/helpers/kirgudu_base/models/exports.rb +167 -0
- data/app/helpers/kirgudu_base/models/filters.rb +32 -0
- data/app/helpers/kirgudu_base/models/form_properties.rb +108 -0
- data/app/helpers/kirgudu_base/models/form_property.rb +335 -0
- data/app/helpers/kirgudu_base/models/methods.rb +64 -0
- data/app/helpers/kirgudu_base/models/scopes.rb +157 -0
- data/app/helpers/kirgudu_base/models/sorting.rb +99 -0
- data/app/helpers/kirgudu_base/models/standard_actions.rb +50 -0
- data/app/helpers/kirgudu_base/models/uncloneable_properties.rb +21 -0
- data/app/helpers/kirgudu_base/old_form_builder.rb +340 -0
- data/app/helpers/kirgudu_base/url_helper.rb +18 -0
- data/app/models/kirgudu_base/base_model.rb +293 -0
- data/app/models/kirgudu_base/dynamic_pages/action_for.rb +78 -0
- data/app/models/kirgudu_base/dynamic_pages/action_for_builder.rb +46 -0
- data/app/models/kirgudu_base/dynamic_pages/data_source.rb +111 -0
- data/app/models/kirgudu_base/dynamic_pages/data_source_builder.rb +79 -0
- data/app/models/kirgudu_base/dynamic_pages/form.rb +99 -0
- data/app/models/kirgudu_base/dynamic_pages/form_builder.rb +85 -0
- data/app/models/kirgudu_base/dynamic_pages/input_type.rb +17 -0
- data/app/models/kirgudu_base/dynamic_pages/on_change.rb +40 -0
- data/app/models/kirgudu_base/dynamic_pages/on_change_builder.rb +38 -0
- data/app/models/kirgudu_base/dynamic_pages/page.rb +55 -0
- data/app/models/kirgudu_base/dynamic_pages/page_builder.rb +63 -0
- data/app/models/kirgudu_base/dynamic_pages/property.rb +185 -0
- data/app/models/kirgudu_base/dynamic_pages/property_builder.rb +123 -0
- data/app/models/kirgudu_base/template.rb +6 -0
- data/app/models/kirgudu_base/template_element.rb +6 -0
- data/app/views/layouts/kirgudu_base/application.html.erb +141 -0
- data/app/views/shared/kirgudu_base/_body_javascripts_files.html.erb +71 -0
- data/app/views/shared/kirgudu_base/_body_javascripts_scripts.html.erb +1099 -0
- data/app/views/shared/kirgudu_base/_breadcrumbs.html.erb +36 -0
- data/app/views/shared/kirgudu_base/_head_javascripts.html.erb +21 -0
- data/app/views/shared/kirgudu_base/_head_stylesheets.html.erb +21 -0
- data/app/views/shared/kirgudu_base/_index_page_filter.html.erb +43 -0
- data/app/views/shared/kirgudu_base/_left_menu_standard_actions.html.erb +57 -0
- data/app/views/shared/kirgudu_base/_services_top_line.html.erb +5 -0
- data/app/views/shared/kirgudu_base/_top_nav_bar.html.erb +58 -0
- data/app/views/shared/kirgudu_base/entry_edit_form_renderer.html.erb +70 -0
- data/app/views/shared/kirgudu_base/entry_index_renderer.html.erb +98 -0
- data/app/views/shared/kirgudu_base/entry_new_form_renderer.html.erb +68 -0
- data/app/views/shared/kirgudu_base/entry_not_found_renderer.html.erb +15 -0
- data/app/views/shared/kirgudu_base/entry_show_renderer.html.erb +28 -0
- data/app/views/shared/kirgudu_base/manage_images/managing_items_index.html.erb +34 -0
- data/app/views/shared/kirgudu_base/manage_images/managing_items_manage.html.erb +72 -0
- data/app/views/shared/kirgudu_base/manage_images/managing_items_sort_index.html.erb +33 -0
- data/app/views/shared/kirgudu_base/manage_items/managing_items_index.html.erb +42 -0
- data/app/views/shared/kirgudu_base/manage_items/managing_items_manage.html.erb +66 -0
- data/app/views/shared/kirgudu_base/manage_items/managing_items_sort_index.html.erb +33 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20131114161828_create_kirgudu_base_templates.rb +17 -0
- data/db/migrate/20131114165013_create_kirgudu_base_template_elements.rb +18 -0
- data/lib/kirgudu_base/engine.rb +6 -0
- data/lib/kirgudu_base/version.rb +4 -0
- data/lib/kirgudu_base.rb +5 -0
- data/lib/tasks/kirgudu_base_tasks.rake +4 -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/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +4 -0
- data/test/dummy/app/helpers/application_helper.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +60 -0
- data/test/dummy/config/boot.rb +11 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +6 -0
- data/test/dummy/config/environments/development.rb +38 -0
- data/test/dummy/config/environments/production.rb +68 -0
- data/test/dummy/config/environments/test.rb +38 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +8 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +6 -0
- data/test/dummy/config/initializers/secret_token.rb +8 -0
- data/test/dummy/config/initializers/session_store.rb +9 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +15 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/config.ru +4 -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/script/rails +6 -0
- data/test/fixtures/kirgudu_base/template_elements.yml +17 -0
- data/test/fixtures/kirgudu_base/templates.yml +15 -0
- data/test/integration/navigation_test.rb +11 -0
- data/test/kirgudu_base_test.rb +8 -0
- data/test/test_helper.rb +16 -0
- data/test/unit/kirgudu_base/template_element_test.rb +10 -0
- data/test/unit/kirgudu_base/template_test.rb +10 -0
- metadata +492 -0
@@ -0,0 +1,343 @@
|
|
1
|
+
// Generated by CoffeeScript 1.3.1
|
2
|
+
/*
|
3
|
+
Endless Scroll plugin for jQuery
|
4
|
+
|
5
|
+
v1.8.0
|
6
|
+
|
7
|
+
Copyright (c) 2008-2012 Fred Wu
|
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
|
+
|
14
|
+
/*
|
15
|
+
Usage:
|
16
|
+
|
17
|
+
// using default options
|
18
|
+
$(window).endlessScroll();
|
19
|
+
|
20
|
+
// using some custom options
|
21
|
+
$("#images").endlessScroll({
|
22
|
+
fireOnce: false,
|
23
|
+
fireDelay: false,
|
24
|
+
loader: '<div class="loading"><div>',
|
25
|
+
callback: function(){
|
26
|
+
alert('test');
|
27
|
+
}
|
28
|
+
});
|
29
|
+
|
30
|
+
Configuration options:
|
31
|
+
|
32
|
+
pagesToKeep integer the number of 'pages' to keep before either end of the scrolling content are discarded,
|
33
|
+
by default (value set to `null`) no content will be discarded
|
34
|
+
inflowPixels integer the number of pixels from the boundary of the element that triggers the event
|
35
|
+
fireOnce boolean only fire once until the execution of the current event is completed
|
36
|
+
fireDelay integer delay the subsequent firing, in milliseconds, 0 or false to disable delay
|
37
|
+
loader string the HTML to be displayed during loading
|
38
|
+
content string|function Plain HTML content to insert after each call, can be either a string or a function
|
39
|
+
that returns a string, when passed as a function it accepts three arguments:
|
40
|
+
<fireSequence> the number of times the event triggered during the current page session
|
41
|
+
<pageSequence> a positive or negative value that represents the scroll direction sequence
|
42
|
+
<scrollDirection> a string of either 'prev' or 'next'
|
43
|
+
insertBefore string jQuery selector syntax: where to put the loader as well as the plain HTML data
|
44
|
+
insertAfter string jQuery selector syntax: where to put the loader as well as the plain HTML data
|
45
|
+
intervalFrequency integer set the frequency of the scroll event checking, the larger the frequency number,
|
46
|
+
the less memory it consumes - but also the less sensitive the event trigger becomes
|
47
|
+
ceaseFireOnEmpty boolean ceases fire automatically when the content is empty, set it to `false` if you are using
|
48
|
+
`callback` instead of `content` for loading content
|
49
|
+
resetCounter function resets the fire sequence counter if the function returns true, this function
|
50
|
+
could also perform hook actions since it is applied at the start of the event
|
51
|
+
callback function callback function, accepts three arguments:
|
52
|
+
<fireSequence> the number of times the event triggered during the current page session
|
53
|
+
<pageSequence> a positive or negative value that represents the scroll direction sequence
|
54
|
+
<scrollDirection> a string of either 'prev' or 'next'
|
55
|
+
ceaseFire function stops the event (no more endless scrolling) if the function returns true,
|
56
|
+
accepts three arguments:
|
57
|
+
<fireSequence> the number of times the event triggered during the current page session
|
58
|
+
<pageSequence> a positive or negative value that represents the scroll direction sequence
|
59
|
+
<scrollDirection> a string of either 'prev' or 'next'
|
60
|
+
*/
|
61
|
+
|
62
|
+
var EndlessScroll;
|
63
|
+
|
64
|
+
EndlessScroll = (function() {
|
65
|
+
var defaults;
|
66
|
+
|
67
|
+
EndlessScroll.name = 'EndlessScroll';
|
68
|
+
|
69
|
+
defaults = {
|
70
|
+
pagesToKeep: null,
|
71
|
+
inflowPixels: 50,
|
72
|
+
fireOnce: true,
|
73
|
+
fireDelay: 150,
|
74
|
+
loader: 'Loading...',
|
75
|
+
content: '',
|
76
|
+
insertBefore: null,
|
77
|
+
insertAfter: null,
|
78
|
+
intervalFrequency: 250,
|
79
|
+
ceaseFireOnEmpty: true,
|
80
|
+
resetCounter: function() {
|
81
|
+
return false;
|
82
|
+
},
|
83
|
+
callback: function() {
|
84
|
+
return true;
|
85
|
+
},
|
86
|
+
ceaseFire: function() {
|
87
|
+
return false;
|
88
|
+
}
|
89
|
+
};
|
90
|
+
|
91
|
+
function EndlessScroll(scope, options) {
|
92
|
+
var _this = this;
|
93
|
+
this.options = $.extend({}, defaults, options);
|
94
|
+
this.pagesStack = [0];
|
95
|
+
this.scrollDirection = 'next';
|
96
|
+
this.firing = true;
|
97
|
+
this.fired = false;
|
98
|
+
this.fireSequence = 0;
|
99
|
+
this.pageSequence = 0;
|
100
|
+
this.nextSequence = 1;
|
101
|
+
this.prevSequence = -1;
|
102
|
+
this.lastScrollTop = 0;
|
103
|
+
this.insertLocation = this.options.insertAfter;
|
104
|
+
this.didScroll = false;
|
105
|
+
this.isScrollable = true;
|
106
|
+
this.target = scope;
|
107
|
+
this.targetId = '';
|
108
|
+
this.content = '';
|
109
|
+
this.lastContent = 'dummy';
|
110
|
+
this.innerWrap = $('.endless_scroll_inner_wrap', this.target);
|
111
|
+
this.handleDeprecatedOptions();
|
112
|
+
this.setInsertPositionsWhenNecessary();
|
113
|
+
$(scope).scroll(function() {
|
114
|
+
_this.detectTarget(scope);
|
115
|
+
return _this.detectScrollDirection();
|
116
|
+
});
|
117
|
+
}
|
118
|
+
|
119
|
+
EndlessScroll.prototype.run = function() {
|
120
|
+
var _this = this;
|
121
|
+
return setInterval((function() {
|
122
|
+
if (!_this.shouldTryFiring()) {
|
123
|
+
return;
|
124
|
+
}
|
125
|
+
if (_this.ceaseFireWhenNecessary()) {
|
126
|
+
return;
|
127
|
+
}
|
128
|
+
if (!_this.shouldBeFiring()) {
|
129
|
+
return;
|
130
|
+
}
|
131
|
+
_this.resetFireSequenceWhenNecessary();
|
132
|
+
_this.acknowledgeFiring();
|
133
|
+
_this.insertLoader();
|
134
|
+
if (_this.hasContent()) {
|
135
|
+
_this.showContent();
|
136
|
+
_this.fireCallback();
|
137
|
+
_this.cleanUpPagesWhenNecessary();
|
138
|
+
_this.delayFiringWhenNecessary();
|
139
|
+
}
|
140
|
+
_this.removeLoader();
|
141
|
+
return _this.lastContent = _this.content;
|
142
|
+
}), this.options.intervalFrequency);
|
143
|
+
};
|
144
|
+
|
145
|
+
EndlessScroll.prototype.handleDeprecatedOptions = function() {
|
146
|
+
if (this.options.data) {
|
147
|
+
this.options.content = this.options.data;
|
148
|
+
}
|
149
|
+
if (this.options.bottomPixels) {
|
150
|
+
return this.options.inflowPixels = this.options.bottomPixels;
|
151
|
+
}
|
152
|
+
};
|
153
|
+
|
154
|
+
EndlessScroll.prototype.setInsertPositionsWhenNecessary = function() {
|
155
|
+
var container;
|
156
|
+
container = "" + this.target.selector + " div.endless_scroll_inner_wrap";
|
157
|
+
if (defaults.insertBefore === null) {
|
158
|
+
this.options.insertBefore = "" + container + " div:first";
|
159
|
+
}
|
160
|
+
if (defaults.insertAfter === null) {
|
161
|
+
return this.options.insertAfter = "" + container + " div:last";
|
162
|
+
}
|
163
|
+
};
|
164
|
+
|
165
|
+
EndlessScroll.prototype.detectTarget = function(scope) {
|
166
|
+
this.target = scope;
|
167
|
+
return this.targetId = $(this.target).attr('id');
|
168
|
+
};
|
169
|
+
|
170
|
+
EndlessScroll.prototype.detectScrollDirection = function() {
|
171
|
+
var currentScrollTop;
|
172
|
+
this.didScroll = true;
|
173
|
+
currentScrollTop = $(this.target).scrollTop();
|
174
|
+
if (currentScrollTop > this.lastScrollTop) {
|
175
|
+
this.scrollDirection = 'next';
|
176
|
+
} else {
|
177
|
+
this.scrollDirection = 'prev';
|
178
|
+
}
|
179
|
+
return this.lastScrollTop = currentScrollTop;
|
180
|
+
};
|
181
|
+
|
182
|
+
EndlessScroll.prototype.shouldTryFiring = function() {
|
183
|
+
var shouldTryOrNot;
|
184
|
+
shouldTryOrNot = this.didScroll && this.firing === true;
|
185
|
+
if (shouldTryOrNot) {
|
186
|
+
this.didScroll = false;
|
187
|
+
}
|
188
|
+
return shouldTryOrNot;
|
189
|
+
};
|
190
|
+
|
191
|
+
EndlessScroll.prototype.ceaseFireWhenNecessary = function() {
|
192
|
+
if (this.options.ceaseFireOnEmpty === true && this.lastContent === '' || this.options.ceaseFire.apply(this.target, [this.fireSequence, this.pageSequence, this.scrollDirection])) {
|
193
|
+
this.firing = false;
|
194
|
+
return true;
|
195
|
+
} else {
|
196
|
+
return false;
|
197
|
+
}
|
198
|
+
};
|
199
|
+
|
200
|
+
EndlessScroll.prototype.wrapContainer = function(target) {
|
201
|
+
if (this.innerWrap.length === 0) {
|
202
|
+
return this.innerWrap = $(target).wrapInner('<div class="endless_scroll_content" data-page="0" />').wrapInner('<div class="endless_scroll_inner_wrap" />').find('.endless_scroll_inner_wrap');
|
203
|
+
}
|
204
|
+
};
|
205
|
+
|
206
|
+
EndlessScroll.prototype.scrollableAreaMargin = function(innerWrap, target) {
|
207
|
+
var margin;
|
208
|
+
switch (this.scrollDirection) {
|
209
|
+
case 'next':
|
210
|
+
margin = innerWrap.height() - $(target).height() <= $(target).scrollTop() + this.options.inflowPixels;
|
211
|
+
if (margin) {
|
212
|
+
target.scrollTop(innerWrap.height() - $(target).height() - this.options.inflowPixels);
|
213
|
+
}
|
214
|
+
break;
|
215
|
+
case 'prev':
|
216
|
+
margin = $(target).scrollTop() <= this.options.inflowPixels;
|
217
|
+
if (margin) {
|
218
|
+
target.scrollTop(this.options.inflowPixels);
|
219
|
+
}
|
220
|
+
}
|
221
|
+
return margin;
|
222
|
+
};
|
223
|
+
|
224
|
+
EndlessScroll.prototype.calculateScrollableCanvas = function() {
|
225
|
+
if (this.target[0] === document || this.target[0] === window) {
|
226
|
+
this.wrapContainer("body");
|
227
|
+
return this.isScrollable = this.scrollableAreaMargin($(document), $(window));
|
228
|
+
} else {
|
229
|
+
this.wrapContainer(this.target);
|
230
|
+
return this.isScrollable = this.innerWrap.length > 0 && this.scrollableAreaMargin(this.innerWrap, this.target);
|
231
|
+
}
|
232
|
+
};
|
233
|
+
|
234
|
+
EndlessScroll.prototype.shouldBeFiring = function() {
|
235
|
+
this.calculateScrollableCanvas();
|
236
|
+
return this.isScrollable && (this.options.fireOnce === false || (this.options.fireOnce === true && this.fired !== true));
|
237
|
+
};
|
238
|
+
|
239
|
+
EndlessScroll.prototype.resetFireSequenceWhenNecessary = function() {
|
240
|
+
if (this.options.resetCounter.apply(this.target) === true) {
|
241
|
+
return this.fireSequence = 0;
|
242
|
+
}
|
243
|
+
};
|
244
|
+
|
245
|
+
EndlessScroll.prototype.acknowledgeFiring = function() {
|
246
|
+
this.fired = true;
|
247
|
+
this.fireSequence++;
|
248
|
+
switch (this.scrollDirection) {
|
249
|
+
case 'next':
|
250
|
+
return this.pageSequence = this.nextSequence++;
|
251
|
+
case 'prev':
|
252
|
+
return this.pageSequence = this.prevSequence--;
|
253
|
+
}
|
254
|
+
};
|
255
|
+
|
256
|
+
EndlessScroll.prototype.insertContent = function(content) {
|
257
|
+
switch (this.scrollDirection) {
|
258
|
+
case 'next':
|
259
|
+
return $(this.options.insertAfter).after(content);
|
260
|
+
case 'prev':
|
261
|
+
return $(this.options.insertBefore).before(content);
|
262
|
+
}
|
263
|
+
};
|
264
|
+
|
265
|
+
EndlessScroll.prototype.insertLoader = function() {
|
266
|
+
return this.insertContent("<div class=\"endless_scroll_loader_" + this.targetId + " endless_scroll_loader\">" + this.options.loader + "</div>");
|
267
|
+
};
|
268
|
+
|
269
|
+
EndlessScroll.prototype.removeLoader = function() {
|
270
|
+
return $('.endless_scroll_loader_' + this.targetId).fadeOut(function() {
|
271
|
+
return $(this).remove();
|
272
|
+
});
|
273
|
+
};
|
274
|
+
|
275
|
+
EndlessScroll.prototype.hasContent = function() {
|
276
|
+
if (typeof this.options.content === 'function') {
|
277
|
+
this.content = this.options.content.apply(this.target, [this.fireSequence, this.pageSequence, this.scrollDirection]);
|
278
|
+
} else {
|
279
|
+
this.content = this.options.content;
|
280
|
+
}
|
281
|
+
return this.content !== false;
|
282
|
+
};
|
283
|
+
|
284
|
+
EndlessScroll.prototype.showContent = function() {
|
285
|
+
$('#endless_scroll_content_current').removeAttr('id');
|
286
|
+
return this.insertContent("<div id=\"endless_scroll_content_current\" class=\"endless_scroll_content\" data-page=\"" + this.pageSequence + "\">" + this.content + "</div>");
|
287
|
+
};
|
288
|
+
|
289
|
+
EndlessScroll.prototype.fireCallback = function() {
|
290
|
+
return this.options.callback.apply(this.target, [this.fireSequence, this.pageSequence, this.scrollDirection]);
|
291
|
+
};
|
292
|
+
|
293
|
+
EndlessScroll.prototype.cleanUpPagesWhenNecessary = function() {
|
294
|
+
var pageToRemove;
|
295
|
+
if (!(this.options.pagesToKeep >= 1)) {
|
296
|
+
return;
|
297
|
+
}
|
298
|
+
switch (this.scrollDirection) {
|
299
|
+
case 'next':
|
300
|
+
this.pagesStack.push(this.pageSequence);
|
301
|
+
break;
|
302
|
+
case 'prev':
|
303
|
+
this.pagesStack.unshift(this.pageSequence);
|
304
|
+
}
|
305
|
+
if (this.pagesStack.length > this.options.pagesToKeep) {
|
306
|
+
switch (this.scrollDirection) {
|
307
|
+
case 'next':
|
308
|
+
pageToRemove = this.prevSequence = this.pagesStack.shift();
|
309
|
+
break;
|
310
|
+
case 'prev':
|
311
|
+
pageToRemove = this.nextSequence = this.pagesStack.pop();
|
312
|
+
}
|
313
|
+
}
|
314
|
+
this.removePage(pageToRemove);
|
315
|
+
return this.calculateScrollableCanvas();
|
316
|
+
};
|
317
|
+
|
318
|
+
EndlessScroll.prototype.removePage = function(page) {
|
319
|
+
return $(".endless_scroll_content[data-page='" + page + "']", this.target).remove();
|
320
|
+
};
|
321
|
+
|
322
|
+
EndlessScroll.prototype.delayFiringWhenNecessary = function() {
|
323
|
+
var _this = this;
|
324
|
+
if (this.options.fireDelay > 0) {
|
325
|
+
$('body').after('<div id="endless_scroll_marker"></div>');
|
326
|
+
return $('#endless_scroll_marker').fadeTo(this.options.fireDelay, 1, function() {
|
327
|
+
$('#endless_scroll_marker').remove();
|
328
|
+
return _this.fired = false;
|
329
|
+
});
|
330
|
+
} else {
|
331
|
+
return this.fired = false;
|
332
|
+
}
|
333
|
+
};
|
334
|
+
|
335
|
+
return EndlessScroll;
|
336
|
+
|
337
|
+
})();
|
338
|
+
|
339
|
+
(function($) {
|
340
|
+
return $.fn.endlessScroll = function(options) {
|
341
|
+
return new EndlessScroll(this, options).run();
|
342
|
+
};
|
343
|
+
})(jQuery);
|
@@ -0,0 +1,121 @@
|
|
1
|
+
/*!
|
2
|
+
* Buttons helper for fancyBox
|
3
|
+
* version: 1.0.5 (Mon, 15 Oct 2012)
|
4
|
+
* @requires fancyBox v2.0 or later
|
5
|
+
*
|
6
|
+
* Usage:
|
7
|
+
* $(".fancybox").fancybox({
|
8
|
+
* helpers : {
|
9
|
+
* buttons: {
|
10
|
+
* position : 'top'
|
11
|
+
* }
|
12
|
+
* }
|
13
|
+
* });
|
14
|
+
*
|
15
|
+
*/
|
16
|
+
(function ($) {
|
17
|
+
//Shortcut for fancyBox object
|
18
|
+
var F = $.fancybox;
|
19
|
+
|
20
|
+
//Add helper object
|
21
|
+
F.helpers.buttons = {
|
22
|
+
defaults : {
|
23
|
+
skipSingle : false, // disables if gallery contains single image
|
24
|
+
position : 'top', // 'top' or 'bottom'
|
25
|
+
tpl : '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:jQuery.fancybox.close();"></a></li></ul></div>'
|
26
|
+
},
|
27
|
+
|
28
|
+
list : null,
|
29
|
+
buttons: null,
|
30
|
+
|
31
|
+
beforeLoad: function (opts, obj) {
|
32
|
+
//Remove self if gallery do not have at least two items
|
33
|
+
|
34
|
+
if (opts.skipSingle && obj.group.length < 2) {
|
35
|
+
obj.helpers.buttons = false;
|
36
|
+
obj.closeBtn = true;
|
37
|
+
|
38
|
+
return;
|
39
|
+
}
|
40
|
+
|
41
|
+
//Increase top margin to give space for buttons
|
42
|
+
obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
|
43
|
+
},
|
44
|
+
|
45
|
+
onPlayStart: function () {
|
46
|
+
if (this.buttons) {
|
47
|
+
this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
|
48
|
+
}
|
49
|
+
},
|
50
|
+
|
51
|
+
onPlayEnd: function () {
|
52
|
+
if (this.buttons) {
|
53
|
+
this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
|
54
|
+
}
|
55
|
+
},
|
56
|
+
|
57
|
+
afterShow: function (opts, obj) {
|
58
|
+
var buttons = this.buttons;
|
59
|
+
|
60
|
+
if (!buttons) {
|
61
|
+
this.list = $(opts.tpl).addClass(opts.position).appendTo('body');
|
62
|
+
|
63
|
+
buttons = {
|
64
|
+
prev : this.list.find('.btnPrev').click( F.prev ),
|
65
|
+
next : this.list.find('.btnNext').click( F.next ),
|
66
|
+
play : this.list.find('.btnPlay').click( F.play ),
|
67
|
+
toggle : this.list.find('.btnToggle').click( F.toggle )
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
//Prev
|
72
|
+
if (obj.index > 0 || obj.loop) {
|
73
|
+
buttons.prev.removeClass('btnDisabled');
|
74
|
+
} else {
|
75
|
+
buttons.prev.addClass('btnDisabled');
|
76
|
+
}
|
77
|
+
|
78
|
+
//Next / Play
|
79
|
+
if (obj.loop || obj.index < obj.group.length - 1) {
|
80
|
+
buttons.next.removeClass('btnDisabled');
|
81
|
+
buttons.play.removeClass('btnDisabled');
|
82
|
+
|
83
|
+
} else {
|
84
|
+
buttons.next.addClass('btnDisabled');
|
85
|
+
buttons.play.addClass('btnDisabled');
|
86
|
+
}
|
87
|
+
|
88
|
+
this.buttons = buttons;
|
89
|
+
|
90
|
+
this.onUpdate(opts, obj);
|
91
|
+
},
|
92
|
+
|
93
|
+
onUpdate: function (opts, obj) {
|
94
|
+
var toggle;
|
95
|
+
|
96
|
+
if (!this.buttons) {
|
97
|
+
return;
|
98
|
+
}
|
99
|
+
|
100
|
+
toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
|
101
|
+
|
102
|
+
//Size toggle button
|
103
|
+
if (obj.canShrink) {
|
104
|
+
toggle.addClass('btnToggleOn');
|
105
|
+
|
106
|
+
} else if (!obj.canExpand) {
|
107
|
+
toggle.addClass('btnDisabled');
|
108
|
+
}
|
109
|
+
},
|
110
|
+
|
111
|
+
beforeClose: function () {
|
112
|
+
if (this.list) {
|
113
|
+
this.list.remove();
|
114
|
+
}
|
115
|
+
|
116
|
+
this.list = null;
|
117
|
+
this.buttons = null;
|
118
|
+
}
|
119
|
+
};
|
120
|
+
|
121
|
+
}(jQuery));
|