knitkit 3.0.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/{public → app/assets}/images/check.png +0 -0
  3. data/{public → app/assets}/images/credit_card.png +0 -0
  4. data/{public → app/assets}/images/inline_edit/close.png +0 -0
  5. data/{public → app/assets}/images/knitkit/icons/document.png +0 -0
  6. data/{public → app/assets}/images/knitkit/icons/multi_doc.png +0 -0
  7. data/{public → app/assets}/images/knitkit/logo.png +0 -0
  8. data/{public → app/assets}/images/knitkit/splash/images/add-site.png +0 -0
  9. data/app/assets/images/knitkit/splash/images/add_website_105x105-active.png +0 -0
  10. data/app/assets/images/knitkit/splash/images/add_website_105x105.png +0 -0
  11. data/{public → app/assets}/images/knitkit/splash/images/adjust-site.png +0 -0
  12. data/{public → app/assets}/images/knitkit/splash/images/browse-site.png +0 -0
  13. data/app/assets/images/knitkit/splash/images/browse_db_105x105-active.png +0 -0
  14. data/app/assets/images/knitkit/splash/images/browse_db_105x105.png +0 -0
  15. data/app/assets/images/knitkit/splash/images/console_105x105-active.png +0 -0
  16. data/app/assets/images/knitkit/splash/images/console_105x105.png +0 -0
  17. data/{public → app/assets}/images/knitkit/splash/images/find-themes.png +0 -0
  18. data/app/assets/images/knitkit/splash/images/find_themes_105x105-active.png +0 -0
  19. data/app/assets/images/knitkit/splash/images/find_themes_105x105.png +0 -0
  20. data/app/assets/images/knitkit/splash/images/learn_more_105x105-active.png +0 -0
  21. data/app/assets/images/knitkit/splash/images/learn_more_105x105.png +0 -0
  22. data/{public → app/assets}/images/knitkit/splash/images/settings.png +0 -0
  23. data/{public → app/assets}/images/knitkit/splash/images/tutorials.png +0 -0
  24. data/app/assets/images/knitkit/splash/splash.png +0 -0
  25. data/app/assets/images/widgets/manage_profile/contact_information.png +0 -0
  26. data/app/assets/images/widgets/manage_profile/password.png +0 -0
  27. data/app/assets/images/widgets/manage_profile/user_information.png +0 -0
  28. data/app/assets/javascripts/erp_app/desktop/applications/knitkit/app.js +24 -0
  29. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/articles_grid_panel.js +15 -12
  30. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/center_region.js +69 -48
  31. data/app/assets/javascripts/erp_app/desktop/applications/knitkit/comments_grid_panel.js +214 -0
  32. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/east_region.js +0 -0
  33. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/file_assets_panel.js +17 -19
  34. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/image_assets_data_view.js +13 -3
  35. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/image_assets_panel.js +59 -48
  36. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/widgets_panel.js +0 -0
  37. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/inquiries_grid_panel.js +2 -2
  38. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/module.js +2 -2
  39. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/publish_window.js +0 -0
  40. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/published_grid_panel.js +1 -1
  41. data/app/assets/javascripts/erp_app/desktop/applications/knitkit/splash_screen.js +268 -0
  42. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/top_menu/main_menu.js +85 -33
  43. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/top_menu/websites_combo.js +0 -0
  44. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/versions_grid_panel.js +5 -28
  45. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/article.js +22 -8
  46. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/document.js +143 -25
  47. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/host.js +5 -1
  48. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/menu.js +2 -0
  49. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/section.js +181 -65
  50. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/website_nav_items.js +0 -0
  51. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/hosts_tree_panel.js +0 -0
  52. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/menu_tree_panel.js +0 -0
  53. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/site_contents_tree_panel.js +121 -116
  54. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/themes_tree_panel.js +101 -10
  55. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/west_region.js +9 -5
  56. data/app/assets/javascripts/knitkit-web.js +22 -0
  57. data/app/assets/javascripts/knitkit/additional-methods.min.js +4 -0
  58. data/app/assets/javascripts/knitkit/bootstrap.min.js +7 -0
  59. data/app/assets/javascripts/knitkit/captcha.js +154 -0
  60. data/{public → app/assets}/javascripts/knitkit/confirm-bootstrap.js +1 -1
  61. data/{public → app/assets}/javascripts/knitkit/inline_editing.js +1 -1
  62. data/{public → app/assets}/javascripts/knitkit/jquery.maskedinput.min.js +0 -0
  63. data/app/assets/javascripts/knitkit/jquery.validate.min.js +4 -0
  64. data/app/assets/javascripts/knitkit/js.cookie.js +145 -0
  65. data/{public → app/assets}/javascripts/knitkit/theme.js +0 -0
  66. data/app/assets/stylesheets/erp_app/desktop/applications/knitkit/app.css +12 -0
  67. data/{public → app/assets}/stylesheets/erp_app/desktop/applications/knitkit/knitkit.css +23 -33
  68. data/app/assets/stylesheets/erp_app/shared/knitkit_shared.css +21 -0
  69. data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.eot +0 -0
  70. data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.svg +288 -0
  71. data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.ttf +0 -0
  72. data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.woff +0 -0
  73. data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  74. data/app/assets/stylesheets/knitkit-web.css +16 -0
  75. data/app/assets/stylesheets/knitkit/bootstrap.min.css +5 -0
  76. data/app/assets/stylesheets/knitkit/captcha.css +59 -0
  77. data/app/assets/stylesheets/knitkit/custom.css +144 -0
  78. data/{public → app/assets}/stylesheets/knitkit/inline_editing.css +0 -0
  79. data/app/assets/stylesheets/knitkit/submenu.css +93 -0
  80. data/app/controllers/api/v1/websites_controller.rb +14 -0
  81. data/app/controllers/captcha_controller.rb +53 -0
  82. data/app/controllers/knitkit/base_controller.rb +1 -5
  83. data/app/controllers/knitkit/erp_app/desktop/app_controller.rb +2 -9
  84. data/app/controllers/knitkit/erp_app/desktop/articles_controller.rb +20 -7
  85. data/app/controllers/knitkit/erp_app/desktop/file_assets_controller.rb +38 -28
  86. data/app/controllers/knitkit/erp_app/desktop/image_assets_controller.rb +16 -9
  87. data/app/controllers/knitkit/erp_app/desktop/online_document_sections_controller.rb +69 -15
  88. data/app/controllers/knitkit/erp_app/desktop/position_controller.rb +45 -58
  89. data/app/controllers/knitkit/erp_app/desktop/theme_controller.rb +64 -29
  90. data/app/controllers/knitkit/erp_app/desktop/website_controller.rb +36 -13
  91. data/app/controllers/knitkit/erp_app/desktop/website_host_controller.rb +12 -0
  92. data/app/controllers/knitkit/erp_app/desktop/website_nav_controller.rb +4 -11
  93. data/app/controllers/knitkit/erp_app/desktop/website_nav_item_controller.rb +2 -9
  94. data/app/controllers/knitkit/erp_app/desktop/website_section_controller.rb +56 -20
  95. data/app/controllers/knitkit/online_document_sections_controller.rb +9 -3
  96. data/app/mailers/website_inquiry_mailer.rb +11 -3
  97. data/app/models/content.rb +16 -6
  98. data/app/models/documented_item.rb +12 -1
  99. data/app/models/online_document_section.rb +54 -20
  100. data/app/models/published_website.rb +16 -0
  101. data/app/models/theme.rb +53 -47
  102. data/app/models/website.rb +172 -191
  103. data/app/models/website_section.rb +64 -30
  104. data/app/views/knitkit/blogs/show.html.erb +5 -2
  105. data/app/views/layouts/knitkit/base.html.erb +54 -51
  106. data/app/views/menus/knitkit/_default_menu.html.erb +11 -11
  107. data/app/views/menus/knitkit/_default_section_menu.html.erb +2 -2
  108. data/app/views/menus/knitkit/_default_sub_menu.erb +27 -0
  109. data/app/views/menus/knitkit/_default_sub_section_menu.html.erb +30 -0
  110. data/app/views/website_inquiry_mailer/inquiry.html.erb +266 -0
  111. data/app/widgets/contact_us/base.rb +26 -16
  112. data/app/widgets/contact_us/javascript/contact_us.js +1 -1
  113. data/app/widgets/contact_us/views/error.html.erb +7 -3
  114. data/app/widgets/contact_us/views/index.html.erb +36 -28
  115. data/app/widgets/google_map/javascript/google_map.js +1 -1
  116. data/app/widgets/google_map/views/index.html.erb +1 -1
  117. data/app/widgets/login/javascript/login.js +1 -1
  118. data/app/widgets/login/views/index.html.erb +1 -1
  119. data/app/widgets/manage_profile/base.rb +141 -112
  120. data/app/widgets/manage_profile/javascript/manage_profile.js +2 -2
  121. data/app/widgets/manage_profile/views/_password_form.html.erb +1 -1
  122. data/app/widgets/manage_profile/views/_user_information_form.html.erb +1 -30
  123. data/app/widgets/manage_profile/views/index.html.erb +42 -40
  124. data/app/widgets/reset_password/base.rb +39 -8
  125. data/app/widgets/reset_password/javascript/reset_password.js +1 -1
  126. data/app/widgets/reset_password/views/index.html.erb +3 -3
  127. data/app/widgets/reset_password/views/invalid_reset_token.html.erb +7 -0
  128. data/app/widgets/reset_password/views/layouts/base.html.erb +1 -1
  129. data/app/widgets/reset_password/views/reset_password.html.erb +39 -0
  130. data/app/widgets/reset_password/views/reset_success.html.erb +5 -0
  131. data/app/widgets/search/base.rb +5 -5
  132. data/app/widgets/search/javascript/search.js +6 -6
  133. data/app/widgets/search/views/_inline_search_form.html.erb +23 -12
  134. data/app/widgets/search/views/_search_form.html.erb +34 -30
  135. data/app/widgets/search/views/layouts/base.html.erb +6 -1
  136. data/app/widgets/signup/base.rb +73 -30
  137. data/app/widgets/signup/javascript/signup.js +1 -1
  138. data/app/widgets/signup/views/_signup_form.html.erb +2 -1
  139. data/app/widgets/signup/views/layouts/base.html.erb +1 -1
  140. data/app/widgets/signup/views/success.html.erb +2 -3
  141. data/config/routes.rb +25 -4
  142. data/db/data_migrations/20110509223702_add_publisher_role.rb +0 -2
  143. data/db/data_migrations/20110816153456_add_knitkit_application.rb +7 -15
  144. data/db/data_migrations/20120127150505_create_website_default_configuration.rb +63 -3
  145. data/db/data_migrations/20150118180450_add_website_member_roles.rb +12 -0
  146. data/db/data_migrations/20150414150359_nest_knitkit_security_roles.rb +35 -0
  147. data/db/data_migrations/20150414173437_move_website_roles_under_website_builder.rb +19 -0
  148. data/db/migrate/20110211002317_setup_knitkit.rb +86 -39
  149. data/lib/knitkit.rb +8 -2
  150. data/lib/knitkit/config.rb +2 -3
  151. data/lib/knitkit/engine.rb +35 -4
  152. data/lib/knitkit/extensions.rb +2 -1
  153. data/lib/knitkit/extensions/action_controller/theme_support/acts_as_themed_controller.rb +1 -1
  154. data/lib/knitkit/extensions/action_mailer/theme_support/acts_as_themed_mailer.rb +1 -1
  155. data/lib/knitkit/extensions/compass_ae/mailers/user_mailer.rb +31 -0
  156. data/lib/knitkit/extensions/compass_ae/widgets/base.rb +1 -1
  157. data/lib/knitkit/extensions/railties/action_controller/captcha_helper.rb +43 -0
  158. data/lib/knitkit/extensions/railties/action_view/helpers/content_helper.rb +1 -1
  159. data/lib/knitkit/extensions/railties/action_view/helpers/menu_helper.rb +11 -1
  160. data/lib/knitkit/extensions/railties/theme_support/asset_tag_helper.rb +83 -0
  161. data/lib/knitkit/routing_filter/section_router.rb +24 -14
  162. data/lib/knitkit/version.rb +1 -1
  163. data/lib/tasks/knitkit_tasks.rake +89 -4
  164. data/lib/tasks/theme_parser.rake +85 -0
  165. data/public/fonts/glyphicons-halflings-regular.eot +0 -0
  166. data/public/fonts/glyphicons-halflings-regular.svg +288 -0
  167. data/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  168. data/public/fonts/glyphicons-halflings-regular.woff +0 -0
  169. data/public/fonts/glyphicons-halflings-regular.woff2 +0 -0
  170. data/public/paypal-button.min.js +7 -0
  171. metadata +161 -82
  172. data/app/assets/javascripts/knitkit/application.js +0 -9
  173. data/app/assets/stylesheets/knitkit/application.css +0 -7
  174. data/app/mailers/document_mailer.rb +0 -10
  175. data/app/views/document_mailer/email_document.html.erb +0 -12
  176. data/app/views/knitkit/mobile/index.html.erb +0 -162
  177. data/app/views/knitkit/online_document_sections/index.html.erb +0 -279
  178. data/app/views/layouts/knitkit/online_document_sections.html.erb +0 -80
  179. data/app/views/website_inquiry_mailer/inquiry.erb +0 -24
  180. data/db/data_migrations/20120127150506_add_primary_host_to_website_configuration.rb +0 -33
  181. data/db/data_migrations/20120316150424_add_is_template_to_default_website_config.rb +0 -16
  182. data/db/data_migrations/20120809020508_update_website_and_configuration.rb +0 -82
  183. data/db/data_migrations/20121129185611_upgrade_website_role_iid.rb +0 -20
  184. data/db/migrate/20130405184234_add_use_markdown_to_section.rb +0 -19
  185. data/db/migrate/20131112013052_add_knitkit_missing_indexes.rb +0 -33
  186. data/db/migrate/20140622212723_update_website_inquiries.rb +0 -22
  187. data/db/migrate/20140911185022_add_publishing_to_website.rb +0 -5
  188. data/db/migrate/20141013073349_add_custom_fields_to_documents.rb +0 -12
  189. data/db/migrate/20141016101936_upgrade_remove_dynamic_attributes.rb +0 -13
  190. data/lib/knitkit/extensions/railties/theme_support/theme_file_resolver.rb +0 -49
  191. data/public/images/knitkit/close_window.png +0 -0
  192. data/public/images/knitkit/splash/splash.png +0 -0
  193. data/public/javascripts/erp_app/desktop/applications/knitkit/comments_grid_panel.js +0 -215
  194. data/public/javascripts/erp_app/desktop/applications/knitkit/select_roles_window.js +0 -108
  195. data/public/javascripts/erp_app/desktop/applications/knitkit/splash_screen.js +0 -170
  196. data/public/javascripts/knitkit/bootstrap-datepicker.js +0 -474
  197. data/public/javascripts/knitkit/bootstrap.min.js +0 -7
  198. data/public/javascripts/knitkit/mobile/app/view/Main.js +0 -108
  199. data/public/javascripts/knitkit/mobile/ux/slidenavigation/View.js +0 -734
  200. data/public/stylesheets/knitkit/bootstrap-responsive.min.css +0 -10
  201. data/public/stylesheets/knitkit/bootstrap.min.css +0 -7
  202. data/public/stylesheets/knitkit/custom.css +0 -122
  203. data/public/stylesheets/knitkit/datepicker.css +0 -182
@@ -1,7 +0,0 @@
1
- /*!
2
- * Bootstrap v3.0.3 (http://getbootstrap.com)
3
- * Copyright 2013 Twitter, Inc.
4
- * Licensed under http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
-
7
- if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]'),b=!0;if(a.length){var c=this.$element.find("input");"radio"===c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?b=!1:a.find(".active").removeClass("active")),b&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}b&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&i<h.length-1&&i++,~i||(i=0),h.eq(i).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show(),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h<o?"right":d,c.removeClass(k).addClass(d)}var p=this.getCalculatedOffset(d,g,h,i);this.applyPlacement(p,d),this.$element.trigger("shown.bs."+this.type)}},b.prototype.applyPlacement=function(a,b){var c,d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),a.top=a.top+g,a.left=a.left+h,d.offset(a).addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;if("top"==b&&j!=f&&(c=!0,a.top=a.top+f-j),/bottom|top/.test(b)){var k=0;a.left<0&&(k=-2*a.left,a.left=0,d.offset(a),i=d[0].offsetWidth,j=d[0].offsetHeight),this.replaceArrow(k-e+i,i,"left")}else this.replaceArrow(j-f,j,"top");c&&d.offset(a)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach()}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.$element.trigger("hidden.bs."+this.type),this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
@@ -1,108 +0,0 @@
1
- Ext.define("KnitkitMobile.view.Main", {
2
- extend: 'Ext.ux.slidenavigation.View',
3
- itemId: 'slideContainer',
4
-
5
- requires: [
6
- 'Ext.Container',
7
- 'Ext.MessageBox',
8
- 'Ext.Panel',
9
- 'Ext.Toolbar',
10
- 'Ext.event.publisher.Dom'
11
- ],
12
-
13
- config: {
14
- style: 'font-size:14px;',
15
-
16
- fullscreen: true,
17
-
18
- /**
19
- * Any component within the container with an 'x-toolbar' class
20
- * will be draggable. To disable draggin all together, set this
21
- * to false.
22
- */
23
- slideSelector: 'x-container',
24
-
25
- /**
26
- * Time in milliseconds to animate the closing of the container
27
- * after an item has been clicked on in the list.
28
- */
29
- selectSlideDuration: 200,
30
-
31
- /**
32
- * Enable content masking when container is open.
33
- *
34
- * @since 0.2.0
35
- */
36
- itemMask: true,
37
-
38
- /**
39
- * Define the default slide button config. Any item that has
40
- * a `slideButton` value that is either `true` or a button config
41
- * will use these values at the default.
42
- */
43
- slideButtonDefaults: {
44
- selector: 'toolbar'
45
- },
46
-
47
- /**
48
- * This allows us to configure how the actual list container
49
- * looks. Here we've added a custom search field and have
50
- * modified the width.
51
- */
52
- list: {
53
- maxDrag: 400,
54
- //width: (Ext.os.is.iOS ? 300 : 250),
55
- items: [
56
- {
57
- xtype: 'toolbar',
58
- docked: 'top',
59
- ui: 'light',
60
- title: {
61
- title: 'Menu',
62
- centered: true,
63
- width: 200,
64
- left: 0
65
- }
66
- }
67
- ]
68
-
69
- },
70
-
71
- /**
72
- * Example of how to re-order the groups.
73
- */
74
- /*groups: {
75
- 'Pages': 1,
76
- 'Account': 2
77
- },*/
78
-
79
- /**
80
- * These are the default values to apply to the items within the
81
- * container.
82
- */
83
- defaults: {
84
- style: 'background: #fff',
85
- xtype: 'container'
86
- },
87
-
88
- items: [
89
- {
90
- title: 'Intro to Paradine',
91
- slideButton: true,
92
- items: [
93
- {
94
- xtype: 'toolbar',
95
- title: 'Intro to Paradine',
96
- docked: 'top'
97
- },
98
- {
99
- xtype: 'panel',
100
- scrollable: true,
101
- bodyPadding: '5px',
102
- html: 'test'
103
- }
104
- ]
105
- }
106
- ]
107
- }
108
- });
@@ -1,734 +0,0 @@
1
- /**
2
- * {@link Ext.ux.slidenavigation.View} is a subclass of {@link Ext.Container}
3
- * that provides a sliding main view with an underlying navigation list. The
4
- * concept was inspired by Facebook's mobile app.
5
- *
6
- * @version 0.2.0
7
- * @author Weston Nielson <wnielson@github>
8
- */
9
- Ext.define('Ext.ux.slidenavigation.View', {
10
- extend: 'Ext.Container',
11
-
12
- requires: [
13
- 'Ext.Button',
14
- 'Ext.Container',
15
- 'Ext.Function',
16
- 'Ext.Toolbar',
17
- 'Ext.data.Model',
18
- 'Ext.data.ModelManager',
19
- 'Ext.data.Store',
20
- 'Ext.dataview.List'
21
- ],
22
-
23
- xtype: 'slidenavigationview',
24
-
25
- /**
26
- * @event close
27
- * @preventable moveContainer
28
- * Fires whenever the container is closed
29
- * @param {Ext.ux.slidenavigation.View} this The navigation View instance
30
- * @param {Number} position The x-coordinate to which the container will be moved to
31
- * @param {Number} duration The duration of the slide event
32
- */
33
-
34
- /**
35
- * @event open
36
- * @preventable moveContainer
37
- * Fires whenever the container is opened
38
- * @param {Ext.ux.slidenavigation.View} this The navigation View instance
39
- * @param {Number} position The x-coordinate to which the container will be moved to
40
- * @param {Number} duration The duration of the slide event
41
- */
42
-
43
- /**
44
- * @event select
45
- * @preventable setContainerItem
46
- * Fires whenever an item in the menu is selected
47
- * @param {Ext.ux.slidenavigation.View} this The navigation View instance
48
- * @param {Ext.Component} item The selected item
49
- * @param {Integer} index The index of the selected item
50
- */
51
-
52
- /**
53
- * @event slideend
54
- * Fires whenever the user has finished sliding the container. This is fired once the
55
- * animation is complete.
56
- * @param {Ext.ux.slidenavigation.View} this The navigation View instance
57
- */
58
-
59
- /**
60
- * @event slidestart
61
- * Fires whenever the user has started sliding the container. This is fired once the
62
- * animation is complete.
63
- * @param {Ext.ux.slidenavigation.View} this The navigation View instance
64
- */
65
-
66
- /**
67
- * @event opened
68
- * Fires after the container is fully opened.
69
- * @param {Ext.ux.slidenavigation.View} this The navigation View instance
70
- */
71
-
72
- /**
73
- * @event closed
74
- * Fires after the container is fully closed.
75
- * @param {Ext.ux.slidenavigation.View} this The navigation View instance
76
- */
77
-
78
- config: {
79
- /**
80
- * @cfg {Object} list Configuration for the navigation list
81
- */
82
- list: {
83
- width: 250,
84
- maxDrag: null,
85
- itemTpl: '{title}',
86
- grouped: true,
87
- items: [
88
- {
89
- xtype: 'toolbar',
90
- docked: 'top',
91
- ui: 'light'
92
- }
93
- ]
94
- },
95
-
96
- /**
97
- * @cfg {Object} container Configuration for the container
98
- */
99
- container: {},
100
-
101
- /**
102
- * @cfg {Object/Boolean} itemMask Configuration for the mask used to mask
103
- * items when the container is opened. Set to false to disable masking of
104
- * items.
105
- */
106
- itemMask: false,
107
-
108
- /**
109
- * @cfg {Array} items An array of items to put into the navigation list.
110
- * The items can either be Ext components or special objects with a "handler"
111
- * key, which should be a function to execute when selected. Additionally, you
112
- * can define the order of the items by defining an 'order' parameter.
113
- */
114
- items: [],
115
-
116
- /**
117
- * @cfg {Object} groups Mapping of group name to order. For example,
118
- * say you have defined two groups; "Group 1" and "Group 2". By default
119
- * these will be presented in the list in that order, since
120
- * 'Group 1' > 'Group 2'. This option allows you to change the ordering,
121
- * like so:
122
- *
123
- * groups: {
124
- * 'Group 1': 2
125
- * 'Group 2': 1
126
- * }
127
- *
128
- * You should use integers, starting with 1, as the ordering value.
129
- * By default groups are ordered by their name.
130
- */
131
- groups: {},
132
-
133
- /**
134
- * @cfg {Object} defaults An object of default values to apply to any Ext
135
- * components created from those listed in ``items``.
136
- */
137
- defaults: {
138
- layout: 'card'
139
- },
140
-
141
- /**
142
- * @cfg {String} slideSelector Class selector of object (or parent)
143
- * of which dragging should be allowed. Defaults to the entire container.
144
- * For example, this could be set to something like 'x-toolbar' to restrict
145
- * dragging only to a toolbar.
146
- */
147
- slideSelector: '',
148
-
149
- /**
150
- * @cfg {Integer} slideDuration Number of miliseconds to animate the sliding
151
- * of the container when "flicked". By default the animation is disable on
152
- * Android.
153
- */
154
- slideDuration: Ext.os.is('Android') ? 0 : 200,
155
-
156
- /**
157
- * @cfg {Integer} selectSlideDuration Number of miliseconds to animate the sliding
158
- * of the container when list item is selected (if closeOnSelect = true). The default
159
- * value here of 300 gives a much nicer feel. By default the animation is disable on
160
- * Android.
161
- */
162
- selectSlideDuration: Ext.os.is('Android') ? 0 : 300,
163
-
164
- /**
165
- * @cfg {Boolean} closeOnSelect Whether or not to automatically close the container
166
- * when an item in the list is selected. Default is true.
167
- */
168
- closeOnSelect: true,
169
-
170
- /**
171
- * @cfg {String} shadowStyle CSS to use for styling the shadow when the container is
172
- * open. This should be a valid CSS 'box-shadow' argument. Set to false to disable
173
- * it.
174
- */
175
- shadowStyle: '0 0 4px 1px #999'
176
- },
177
-
178
- initConfig: function () {
179
- var me = this;
180
-
181
- me._indexCount = 0;
182
-
183
- // Create the store.
184
- me.store = Ext.create('Ext.data.Store', {
185
- model: me.getModel(),
186
- sorters: 'order',
187
- grouper: {
188
- property: 'group',
189
- sortProperty: 'groupOrder'
190
- }
191
- });
192
-
193
- // Add the items into the list.
194
- me.addItems(me.config.items || []);
195
- delete me.config.items;
196
-
197
- me.callParent(arguments);
198
-
199
- /**
200
- * @private
201
- *
202
- * This stores the instances of the components created.
203
- * TODO: Support 'autoDestroy'.
204
- */
205
- me._cache = {};
206
-
207
-
208
- // Default config values used for creating a slideButton.
209
- me._slideButtonConfig = {
210
- xtype: 'button',
211
- iconMask: true,
212
- iconCls: 'list',
213
- name: 'slidebutton',
214
- listeners: {
215
- release: me.toggleContainer,
216
- tap: function (button, e) {
217
- // Need this to stop auto-selecting any component
218
- // hidden beneath the container.
219
- e.preventDefault();
220
- },
221
- scope: me
222
- }
223
-
224
- /**
225
- * To add the button into a toolbar, you can add the following
226
- * to any item in your navigation list.
227
- */
228
- //selector: ['toolbar']
229
- };
230
-
231
- /**
232
- * Default config for masked items.
233
- */
234
- me.itemMaskDefaults = {
235
- zIndex:1
236
- };
237
- },
238
-
239
- initialize: function () {
240
- this.__init = false;
241
-
242
- this.callParent();
243
-
244
- this.addCls('x-slidenavigation');
245
-
246
- this.list = this.createNavigationList();
247
- this.container = this.createContainer();
248
-
249
- this.add([
250
- this.list,
251
- this.container
252
- ]);
253
-
254
- this.createContainerCSS();
255
-
256
- // TODO: Make this optional, perhaps by defining
257
- // "selected: true" in the items list
258
- this.list.select(0);
259
-
260
- this.__init = true;
261
- },
262
-
263
- /**
264
- * @private
265
- *
266
- * Adds an array of items (or a single item) into the list.
267
- */
268
- addItems: function (items) {
269
- var me = this,
270
- items = Ext.isArray(items) ? items : [items],
271
- groups = me.config.groups;
272
-
273
- Ext.each(items, function (item, index) {
274
- if (!Ext.isDefined(item.index)) {
275
- item.index = me._indexCount;
276
- me._indexCount++;
277
- }
278
- me.store.add(item);
279
- });
280
- },
281
-
282
- /**
283
- * @private
284
- *
285
- * Construct style element for container shadow and insert into the DOM.
286
- */
287
- createContainerCSS: function () {
288
- var shadowStyle = this.getShadowStyle(),
289
- id = this.getId();
290
-
291
- if (shadowStyle) {
292
- if (!document.getElementById(id)) {
293
- style = document.createElement('style');
294
- style.type = 'text/css';
295
- style.id = id;
296
- style.innerHTML = '.x-slidenavigation-container.x-dragging, ' +
297
- '.x-slidenavigation-container.open { ' +
298
- 'box-shadow: ' + shadowStyle + ';' +
299
- '-webkit-box-shadow:' + shadowStyle + ';';
300
- document.getElementsByTagName('head')[0].appendChild(style);
301
- }
302
- }
303
- },
304
-
305
- /**
306
- * @private
307
- *
308
- * Creates a button that can toggle the navigation menu. For an example
309
- * config, see ``slideButtonDefaults``.
310
- */
311
- createSlideButton: function (el, config) {
312
- var me = this,
313
- config = Ext.merge(me.getSlideButtonDefaults(),
314
- Ext.isObject(config) ? config : {}),
315
- parent = el.down(config.selector);
316
-
317
- if (parent) {
318
- return parent.insert(0, Ext.merge(me._slideButtonConfig, config));
319
- }
320
-
321
- return false;
322
- },
323
-
324
- /**
325
- * @private
326
- *
327
- * Gets the configuration for masking items. If masking items is disabled
328
- * this returns false.
329
- */
330
- getMask: function () {
331
- var mask = this.getItemMask();
332
- if (mask != false) {
333
- if (Ext.isBoolean(mask)) {
334
- mask = this.itemMaskDefaults;
335
- }
336
- }
337
-
338
- return mask;
339
- },
340
-
341
- /**
342
- * @private
343
- *
344
- * If item masking is enabled, this method will mask any containers that have
345
- * a ``maskOnOpen`` configuration variable set to ``true``. If masking is
346
- * disabled, this method does nothing.
347
- */
348
- doMaskItem: function (item, mask) {
349
- var maskConfig = this.getMask(),
350
- mask = Ext.isDefined(mask) ? mask : true;
351
-
352
- Ext.each(item.query('component[maskOnOpen=true]'), function (el) {
353
- if (mask) {
354
- el.setMasked(maskConfig);
355
- } else {
356
- el.setMasked(false);
357
- }
358
- });
359
- },
360
-
361
- /**
362
- * @private
363
- *
364
- * Called when an item in the list is tapped.
365
- */
366
-
367
- onItemTap: function (list, index, target, record, e, eOpts) {
368
- e.stopPropagation();
369
- e.preventDefault();
370
-
371
- var me = this;
372
-
373
- if (Ext.isFunction(record.raw.handler) && me.__init) {
374
- me.fireAction('select', [me , me._cache[index], index], record.raw.handler, me);
375
- }
376
- Ext.defer(me.closeContainer, 200, me, [me.config.selectSlideDuration]);
377
- },
378
-
379
- /**
380
- * @private
381
- *
382
- * Called when an item in the list is tapped.
383
- */
384
- onSelect: function (list, item, eOpts) {
385
- var me = this,
386
- store = list.getStore(),
387
- index = item.raw.index,
388
- container = me.container,
389
- func = Ext.emptyFn;
390
-
391
- if (me._cache[index] == undefined) {
392
- // If the object has a handler defined, then we don't need to
393
- // create an Ext object
394
- if (Ext.isFunction(item.raw.handler) && me.__init) {
395
- me._cache[index] = item.raw.handler;
396
- } else {
397
- me._cache[index] = container.add(Ext.merge({}, me.config.defaults, item.raw));
398
-
399
- me.doMaskItem(me._cache[index], true);
400
-
401
- // Wait until the component is painted before closing the container. This makes
402
- // the initial animation much smoother.
403
- if (me.config.closeOnSelect) {
404
- me._cache[index].addListener('painted', function () {
405
- // The slight delay here gives the component enough time to update before
406
- // the close animation starts.
407
- Ext.defer(me.closeContainer, 200, me, [me.config.selectSlideDuration]);
408
- });
409
- }
410
-
411
- // Add a button for controlling the slide, if desired
412
- if ((item.raw.slideButton || false)) {
413
- me.createSlideButton(me._cache[index], item.raw.slideButton);
414
- }
415
- }
416
- }
417
- else if (Ext.isFunction(item.raw.handler) && !Ext.isFunction(me._cache[index])) {
418
- me._cache[index] = item.raw.handler;
419
- }
420
-
421
- if (Ext.isFunction(me._cache[index])) {
422
- func = me._cache[index];
423
- } else {
424
- func = me.setContainerItem;
425
- }
426
-
427
- if (me.__init) {
428
- me.fireAction('select', [me , me._cache[index], index], func, me);
429
- }
430
- },
431
-
432
- /**
433
- * @private
434
- *
435
- * Set the active item in the container.
436
- */
437
- setContainerItem: function (nav, item) {
438
- var container = nav.container;
439
- container.setActiveItem(item);
440
- },
441
-
442
- /**
443
- * @private
444
- *
445
- * Callback function for when the container has started being dragged.
446
- */
447
- onContainerDragstart: function (draggable, e, offset, eOpts) {
448
- if (this.config.slideSelector == false) {
449
- return false;
450
- }
451
-
452
- if (this.config.slideSelector) {
453
- node = e.target;
454
- while (node = node.parentNode) {
455
- if (node.className && node.className.indexOf(this.config.slideSelector) > -1) {
456
- this.fireEvent('dragstart', this);
457
- return true;
458
- }
459
- }
460
- return false;
461
- }
462
- return false;
463
- },
464
-
465
- /**
466
- * @private
467
- *
468
- * Callback function for when the container has finished being dragged. This determines
469
- * which direction to finish moving the container based on its current position and velocity.
470
- */
471
- onContainerDragend: function (draggable, e, eOpts) {
472
- var velocity = Math.abs(e.deltaX / e.deltaTime),
473
- direction = (e.deltaX > 0) ? "right" : "left",
474
- offset = Ext.clone(draggable.offset),
475
- threshold = parseInt(this.config.list.minWidth * .70);
476
-
477
- switch (direction) {
478
- case "right":
479
- offset.x = (velocity > 0.75 || offset.x > threshold) ? this.config.list.minWidth : 0;
480
- break;
481
- case "left":
482
- offset.x = (velocity > 0.75 || offset.x < threshold) ? 0 : this.config.list.minWidth;
483
- break;
484
- }
485
-
486
- this.fireEvent('dragend', this);
487
-
488
- this.moveContainer(this, offset.x);
489
- },
490
-
491
- /**
492
- * @private
493
- *
494
- * Registers the model with Ext.ModelManager, if it hasn't been
495
- * already, and returns the name of the model for use in the store.
496
- */
497
- getModel: function () {
498
- var model = 'SlideNavigationPanelItem',
499
- groups = this.config.groups;
500
-
501
- if (!Ext.ModelManager.get(model)) {
502
- Ext.define(model, {
503
- extend: 'Ext.data.Model',
504
- config: {
505
- idProperty: 'index',
506
- fields: [
507
- 'index', 'title', 'group',
508
- {
509
- name: 'order',
510
- defaultValue: 1
511
- }, {
512
- name: 'groupOrder',
513
- convert: function (value, record) {
514
- // By default we group and order by group name.
515
- group = record.get('group');
516
- return groups[group] || group;
517
- }
518
- }
519
- ]
520
- }
521
- });
522
- }
523
-
524
- return model;
525
- },
526
-
527
- /**
528
- * Closes the container. See {@link #moveContainer} for more details.
529
- */
530
- closeContainer: function (duration) {
531
- var me = this,
532
- duration = duration || this.config.slideDuration;
533
-
534
- if (me.__init) {
535
- me.fireAction('close', [me, 0, duration], 'moveContainer', me);
536
- }
537
- },
538
-
539
- /**
540
- * Opens the container. See {@link #moveContainer} for more details.
541
- */
542
- openContainer: function (duration) {
543
- var me = this,
544
- duration = duration || this.config.slideDuration,
545
- offsetX = this.config.list.minWidth;
546
-
547
- if (me.__init) {
548
- me.fireAction('open', [me, offsetX, duration], 'moveContainer', me);
549
- }
550
- },
551
-
552
- /**
553
- * Toggles the container open or close.
554
- */
555
- toggleContainer: function (duration) {
556
- var duration = Ext.isNumber(duration) ? duration : this.config.slideDuration;
557
- if (this.isClosed()) {
558
- this.openContainer(duration);
559
- } else {
560
- this.closeContainer(duration);
561
- }
562
- },
563
-
564
- /**
565
- * @private
566
- *
567
- * Moves the container to a specified ``offsetX`` pixels. Positive
568
- * integer values move the container that many pixels from the left edge
569
- * of the window. If ``duration`` is provided, it should be an integer
570
- * number of milliseconds to animate the slide effect. If no duration is
571
- * provided, the default in ``config.slideDuration`` is used.
572
- */
573
- moveContainer: function (nav, offsetX, duration) {
574
- var duration = duration || this.config.slideDuration,
575
- draggable = this.container.draggableBehavior.draggable;
576
-
577
- this.container.addCls('open');
578
-
579
- draggable.setOffset(offsetX, 0, {
580
- duration: duration
581
- });
582
- },
583
-
584
- /**
585
- * Returns true if the container is closed, false otherwise. This is a
586
- * computed value based off the current offset position of the container.
587
- *
588
- * @return {Boolean} Whether or not the container is fully closed.
589
- */
590
- isClosed: function () {
591
- return (this.container.draggableBehavior.draggable.offset.x == 0);
592
- },
593
-
594
-
595
- /**
596
- * Returns true if the container is closed, false otherwise. This is a
597
- * computed value based off the current offset position of the container.
598
- *
599
- * @return {Boolean} Whether or not the container is fully open.
600
- */
601
- isOpened: function () {
602
- return (this.container.draggableBehavior.draggable.offset.x == this.config.list.minWidth);
603
- },
604
-
605
- /**
606
- * @private
607
- *
608
- * Sets the container as being closed. This shouldn't ever be called
609
- * directly as it is automatically called by the ``translatable``
610
- * "animationend" event after the container has stopped moving. All this
611
- * really does is set the CSS class for the container.
612
- */
613
- setClosed: function (closed) {
614
- if (closed) {
615
- this.container.removeCls('open');
616
- } else {
617
- this.container.addCls('open');
618
- }
619
- },
620
-
621
- /**
622
- * @private
623
- *
624
- * Generates a new Ext.dataview.List object to be used for displaying
625
- * the navigation items.
626
- */
627
- createNavigationList: function (store) {
628
- var listConfig = this.getList();
629
-
630
- // The width of the list needs to be set to 100%, so we copy
631
- // the width value (if set) to minWidth and then delete it.
632
- if (listConfig.width) {
633
- if (!listConfig.minWidth) {
634
- listConfig.minWidth = listConfig.width;
635
- }
636
- delete listConfig.width;
637
- }
638
-
639
- return Ext.create('Ext.dataview.List', Ext.merge({}, listConfig, {
640
- scrollable: {
641
- direction: 'vertical',
642
- directionLock: true
643
- },
644
- store: this.store,
645
- docked: 'left',
646
- cls: 'x-slidenavigation-list',
647
- style: 'position: absolute; top: 0; left: 0; height: 100%; z-index: 2',
648
- width: '100%',
649
- listeners: {
650
- select: this.onSelect,
651
- itemtap: this.onItemTap,
652
- scope: this
653
- }
654
- }));
655
- },
656
-
657
- /**
658
- * @private
659
- *
660
- * Generates and returns the Ext.Container to be used for displaying
661
- * content. This is the "slideable" container that is positioned above
662
- * the navigation list.
663
- */
664
- createContainer: function () {
665
- var me = this;
666
-
667
- return Ext.create('Ext.Container', Ext.merge({}, me.config.container, {
668
- docked: 'left',
669
- cls: 'x-slidenavigation-container',
670
- style: 'width: 100%; height: 100%; position: absolute; opacity: 1; z-index: 3',
671
- layout: 'card',
672
- draggable: {
673
- direction: 'horizontal',
674
- constraint: {
675
- min: { x: 0, y: 0 },
676
- max: { x: me.config.list.maxDrag || Math.max(screen.width, screen.height), y: 0 }
677
- },
678
- listeners: {
679
- dragstart: {
680
- fn: me.onContainerDragstart,
681
- order: 'before',
682
- scope: me
683
- },
684
- dragend: me.onContainerDragend,
685
- scope: me
686
- },
687
- translatable: {
688
- listeners: {
689
- animationstart: function () {
690
- me.fireEvent('slidestart', me);
691
- },
692
- animationend: function (translatable, b, c) {
693
- // Fire the event now that the animation is done.
694
- if (me.__init) {
695
- me.fireEvent('slideend', me);
696
- }
697
-
698
- if (me.isOpened()) {
699
- me.fireEvent('opened', me);
700
-
701
- me.doMaskItem(me.container.getActiveItem(), true);
702
- }
703
-
704
- else if (me.isClosed()) {
705
- me.fireEvent('closed', me);
706
-
707
- me.doMaskItem(me.container.getActiveItem(), false);
708
- }
709
-
710
- // Remove the class when the animation is finished, but only
711
- // if we're "closed"
712
- me.setClosed(me.isClosed());
713
- },
714
- scope: me // The "x-slidenavigation" container
715
- }
716
- }
717
- }
718
- }));
719
- },
720
-
721
- /**
722
- * Override the default method so that we actually return the active item in the list,
723
- * otherwise this will always return the same thing (the main container, not the
724
- * selected item).
725
- *
726
- * @return {Ext.Component/null} The currently active component.
727
- */
728
- getActiveItem: function () {
729
- var selection = this.list.getSelection();
730
- if (selection) {
731
- return selection[0];
732
- }
733
- }
734
- });