├── Gemfile ├── Gemfile.lock ├── MIT-LICENSE ├── README.rdoc ├── Rakefile ├── app ├── assets │ ├── images │ │ └── how_to │ │ │ └── .gitkeep │ ├── javascripts │ │ └── how_to │ │ │ ├── application.js │ │ │ ├── bootstrap.js │ │ │ ├── chosen.jquery.min.js │ │ │ ├── jquery.localScroll.min.js │ │ │ ├── jquery.scrollTo.min.js │ │ │ └── jquery.treeview.js │ └── stylesheets │ │ └── how_to │ │ ├── application.css.scss │ │ ├── bootstrap.css │ │ ├── chosen-sprite.png │ │ ├── chosen-sprite@2x.png │ │ ├── chosen.css │ │ ├── images │ │ ├── ajax-loader.gif │ │ ├── file.gif │ │ ├── folder-closed.gif │ │ ├── folder.gif │ │ ├── minus.gif │ │ ├── plus.gif │ │ ├── treeview-black-line.gif │ │ ├── treeview-black.gif │ │ ├── treeview-default-line.gif │ │ ├── treeview-default.gif │ │ ├── treeview-famfamfam-line.gif │ │ ├── treeview-famfamfam.gif │ │ ├── treeview-gray-line.gif │ │ ├── treeview-gray.gif │ │ ├── treeview-red-line.gif │ │ └── treeview-red.gif │ │ └── jquery.treeview.css ├── controllers │ └── how_to │ │ ├── application_controller.rb │ │ ├── contents_controller.rb │ │ ├── faq_controller.rb │ │ └── sections_controller.rb ├── helpers │ └── how_to │ │ ├── application_helper.rb │ │ └── faq_helper.rb ├── models │ └── how_to │ │ ├── content.rb │ │ ├── section.rb │ │ └── translation_util.rb └── views │ ├── how_to │ ├── contents │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── new.html.erb │ │ └── show.html.erb │ ├── faq │ │ └── show.html.erb │ └── sections │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── new.html.erb │ │ └── show.html.erb │ └── layouts │ └── how_to │ ├── _messages.html.erb │ ├── _navigation.html.erb │ └── application.html.erb ├── bin └── rails ├── config └── routes.rb ├── db └── migrate │ ├── 20130602053453_create_how_to_sections.rb │ ├── 20130602054608_create_how_to_contents.rb │ └── 20130906034009_alter_order_column.rb ├── how_to.gemspec ├── lib ├── generators │ └── how_to │ │ ├── config_generator.rb │ │ ├── layout_generator.rb │ │ ├── templates │ │ └── how_to_config.rb │ │ └── view_generator.rb ├── how_to.rb ├── how_to │ ├── config.rb │ ├── engine.rb │ └── version.rb └── tasks │ └── how_to_tasks.rake └── test ├── dummy ├── README.rdoc ├── Rakefile ├── app │ ├── assets │ │ ├── images │ │ │ └── .keep │ │ ├── javascripts │ │ │ └── application.js │ │ └── stylesheets │ │ │ └── application.css │ ├── controllers │ │ ├── application_controller.rb │ │ └── concerns │ │ │ └── .keep │ ├── helpers │ │ └── application_helper.rb │ ├── mailers │ │ └── .keep │ ├── models │ │ ├── .keep │ │ └── concerns │ │ │ └── .keep │ └── views │ │ └── layouts │ │ └── application.html.erb ├── bin │ ├── bundle │ ├── rails │ └── rake ├── config.ru ├── config │ ├── application.rb │ ├── boot.rb │ ├── database.yml │ ├── environment.rb │ ├── environments │ │ ├── development.rb │ │ ├── production.rb │ │ └── test.rb │ ├── initializers │ │ ├── assets.rb │ │ ├── backtrace_silencers.rb │ │ ├── cookies_serializer.rb │ │ ├── filter_parameter_logging.rb │ │ ├── inflections.rb │ │ ├── mime_types.rb │ │ ├── session_store.rb │ │ └── wrap_parameters.rb │ ├── locales │ │ └── en.yml │ ├── routes.rb │ └── secrets.yml ├── db │ └── development.sqlite3 ├── lib │ └── assets │ │ └── .keep ├── log │ ├── .keep │ └── development.log └── public │ ├── 404.html │ ├── 422.html │ ├── 500.html │ └── favicon.ico ├── how_to_test.rb ├── integration └── navigation_test.rb └── test_helper.rb /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | # Declare your gem's dependencies in how_to.gemspec. 4 | # Bundler will treat runtime dependencies like base dependencies, and 5 | # development dependencies will be added by default to the :development group. 6 | gemspec 7 | 8 | # Declare any dependencies that are still in development here instead of in 9 | # your gemspec. These might include edge Rails or gems from your path or 10 | # Git. Remember to move these dependencies to your gemspec before releasing 11 | # your gem to rubygems.org. 12 | 13 | # To use debugger 14 | # gem 'debugger' 15 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | PATH 2 | remote: . 3 | specs: 4 | how_to (1.0.3) 5 | awesome_nested_set (~> 3.0) 6 | globalize 7 | rails (~> 4.0) 8 | 9 | GEM 10 | remote: https://rubygems.org/ 11 | specs: 12 | actionmailer (4.2.7.1) 13 | actionpack (= 4.2.7.1) 14 | actionview (= 4.2.7.1) 15 | activejob (= 4.2.7.1) 16 | mail (~> 2.5, >= 2.5.4) 17 | rails-dom-testing (~> 1.0, >= 1.0.5) 18 | actionpack (4.2.7.1) 19 | actionview (= 4.2.7.1) 20 | activesupport (= 4.2.7.1) 21 | rack (~> 1.6) 22 | rack-test (~> 0.6.2) 23 | rails-dom-testing (~> 1.0, >= 1.0.5) 24 | rails-html-sanitizer (~> 1.0, >= 1.0.2) 25 | actionview (4.2.7.1) 26 | activesupport (= 4.2.7.1) 27 | builder (~> 3.1) 28 | erubis (~> 2.7.0) 29 | rails-dom-testing (~> 1.0, >= 1.0.5) 30 | rails-html-sanitizer (~> 1.0, >= 1.0.2) 31 | activejob (4.2.7.1) 32 | activesupport (= 4.2.7.1) 33 | globalid (>= 0.3.0) 34 | activemodel (4.2.7.1) 35 | activesupport (= 4.2.7.1) 36 | builder (~> 3.1) 37 | activerecord (4.2.7.1) 38 | activemodel (= 4.2.7.1) 39 | activesupport (= 4.2.7.1) 40 | arel (~> 6.0) 41 | activesupport (4.2.7.1) 42 | i18n (~> 0.7) 43 | json (~> 1.7, >= 1.7.7) 44 | minitest (~> 5.1) 45 | thread_safe (~> 0.3, >= 0.3.4) 46 | tzinfo (~> 1.1) 47 | arel (6.0.3) 48 | awesome_nested_set (3.1.1) 49 | activerecord (>= 4.0.0, < 5.1) 50 | builder (3.2.2) 51 | concurrent-ruby (1.0.3) 52 | erubis (2.7.0) 53 | globalid (0.3.7) 54 | activesupport (>= 4.1.0) 55 | globalize (5.0.1) 56 | activemodel (>= 4.2.0, < 4.3) 57 | activerecord (>= 4.2.0, < 4.3) 58 | i18n (0.7.0) 59 | json (1.8.3) 60 | loofah (2.0.3) 61 | nokogiri (>= 1.5.9) 62 | mail (2.6.4) 63 | mime-types (>= 1.16, < 4) 64 | mime-types (3.1) 65 | mime-types-data (~> 3.2015) 66 | mime-types-data (3.2016.0521) 67 | mini_portile2 (2.1.0) 68 | minitest (5.10.1) 69 | nokogiri (1.6.8.1) 70 | mini_portile2 (~> 2.1.0) 71 | rack (1.6.5) 72 | rack-test (0.6.3) 73 | rack (>= 1.0) 74 | rails (4.2.7.1) 75 | actionmailer (= 4.2.7.1) 76 | actionpack (= 4.2.7.1) 77 | actionview (= 4.2.7.1) 78 | activejob (= 4.2.7.1) 79 | activemodel (= 4.2.7.1) 80 | activerecord (= 4.2.7.1) 81 | activesupport (= 4.2.7.1) 82 | bundler (>= 1.3.0, < 2.0) 83 | railties (= 4.2.7.1) 84 | sprockets-rails 85 | rails-deprecated_sanitizer (1.0.3) 86 | activesupport (>= 4.2.0.alpha) 87 | rails-dom-testing (1.0.7) 88 | activesupport (>= 4.2.0.beta, < 5.0) 89 | nokogiri (~> 1.6.0) 90 | rails-deprecated_sanitizer (>= 1.0.1) 91 | rails-html-sanitizer (1.0.3) 92 | loofah (~> 2.0) 93 | railties (4.2.7.1) 94 | actionpack (= 4.2.7.1) 95 | activesupport (= 4.2.7.1) 96 | rake (>= 0.8.7) 97 | thor (>= 0.18.1, < 2.0) 98 | rake (12.0.0) 99 | sprockets (3.7.1) 100 | concurrent-ruby (~> 1.0) 101 | rack (> 1, < 3) 102 | sprockets-rails (3.2.0) 103 | actionpack (>= 4.0) 104 | activesupport (>= 4.0) 105 | sprockets (>= 3.0.0) 106 | sqlite3 (1.3.10) 107 | thor (0.19.4) 108 | thread_safe (0.3.5) 109 | tzinfo (1.2.2) 110 | thread_safe (~> 0.1) 111 | 112 | PLATFORMS 113 | ruby 114 | 115 | DEPENDENCIES 116 | how_to! 117 | sqlite3 118 | 119 | BUNDLED WITH 120 | 1.13.7 121 | -------------------------------------------------------------------------------- /MIT-LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014 YOURNAME 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.rdoc: -------------------------------------------------------------------------------- 1 | = HowTo 2 | 3 | Rails engine that makes managing faq/manual easy and simple. Multilingual CMS for managing faq, question/answer, manual etc. 4 | 5 | =begin 6 | {Live Demo}[http://how-to-demo.herokuapp.com] 7 | 8 | {Live demo source code}[https://github.com/railscash/how_to_demo] 9 | =end 10 | 11 | ===Usage 12 | ======Include the gem in your Gemfile and bundle to install the gem. 13 | 14 | gem 'how_to' 15 | 16 | ====You may need to add the following gems if you want to use default layout for how_to. See layout customization section for more details 17 | 18 | gem "jquery-rails" 19 | gem 'bootstrap-sass' 20 | gem 'sass-rails', '~> 3.2.5' 21 | 22 | 23 | ===== Install the migrations 24 | rake how_to:install:migrations 25 | 26 | ===== Run db migrations 27 | rake db:migrate 28 | 29 | 30 | ===== Mount in your application's route 31 | mount HowTo::Engine => "/how_to" 32 | 33 | ===== You can also get the configuration file and overrides by running the config generator. 34 | rails g how_to:config 35 | 36 | Details are documented in config file, so please read the config file carefully. 37 | 38 | ====== rake db:migrate and visit mounted location, e.g. 39 | 40 | localhost:3000/how_to 41 | 42 | You should see the public page. You should also see two links on head section named sections and contents. if you override the authorization methods (described in later section) make sure you have permissions to access those pages. 43 | 44 | ===Modules 45 | Two models are there. 46 | 47 | ==== Section 48 | You can have multilevel section. You can consider this as category. Sections are hierarchical, but only leaves are eligible to have contents 49 | 50 | 51 | ==== Content 52 | You can create content as question/answer or faq under a specific section. If you love rich text editor for content then see the last section of Readme. 53 | 54 | 55 | ===== Sample helper methods you may need to define them in your application controller 56 | 57 | def authorize_to_manage_how_to! #you can set the method name in config file 58 | redirect_to :root, :notice => t('notifications.admin_section_access_error') unless admin? 59 | end 60 | 61 | def allowed_to_view_how_to #you can set the method name in config file 62 | redirect_to main_app.root_path, :notice => t('notifications.admin_section_access_error') unless current_user 63 | end 64 | 65 | def permitted_to_manage_how_to? #you can set the method name in config file 66 | admin? 67 | end 68 | 69 | 70 | ===== Optionaly you can customise the layout and view page using: 71 | ======this will generate layout and associated partials under views/layouts/how_to/ 72 | rails g how_to:layout 73 | 74 | 75 | 76 | ======this will generate the public page for faq/manual under views/how_to/ 77 | rails g how_to:view 78 | 79 | 80 | 81 | 82 | === If you want to use rich text editor to manage your content HowTo uses Mercury gem for it. Just install mercury gem and configure as per your requirements. Visit https://github.com/jejacks0n/mercury for more details 83 | Then set 84 | config.rich_text_enabled = true 85 | in initializers/how_to_config.rb file 86 | 87 | 88 | ====For any issues feel free to contact with me or use issue tracker. Drop me a line to ahmed2tul@gmail.com 89 | 90 | This project rocks and uses MIT-LICENSE. 91 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | begin 2 | require 'bundler/setup' 3 | rescue LoadError 4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks' 5 | end 6 | 7 | require 'rdoc/task' 8 | 9 | RDoc::Task.new(:rdoc) do |rdoc| 10 | rdoc.rdoc_dir = 'rdoc' 11 | rdoc.title = 'HowTo' 12 | rdoc.options << '--line-numbers' 13 | rdoc.rdoc_files.include('README.rdoc') 14 | rdoc.rdoc_files.include('lib/**/*.rb') 15 | end 16 | 17 | APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) 18 | load 'rails/tasks/engine.rake' 19 | 20 | 21 | 22 | Bundler::GemHelper.install_tasks 23 | 24 | require 'rake/testtask' 25 | 26 | Rake::TestTask.new(:test) do |t| 27 | t.libs << 'lib' 28 | t.libs << 'test' 29 | t.pattern = 'test/**/*_test.rb' 30 | t.verbose = false 31 | end 32 | 33 | 34 | task default: :test 35 | -------------------------------------------------------------------------------- /app/assets/images/how_to/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amuntasim/how_to/3c3a5ee677a2c5ca7e819f83078ade3db2f886c2/app/assets/images/how_to/.gitkeep -------------------------------------------------------------------------------- /app/assets/javascripts/how_to/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // the compiled file. 9 | // 10 | // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD 11 | // GO AFTER THE REQUIRES BELOW. 12 | // 13 | //= require jquery 14 | //= require jquery_ujs 15 | //= require_tree . 16 | 17 | $(document).ready(function(){ 18 | $('[chosen-enabled="true"]').chosen(); 19 | }) -------------------------------------------------------------------------------- /app/assets/javascripts/how_to/bootstrap.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.2.0 (http://getbootstrap.com) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript 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]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",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(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().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("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),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.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()},c.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},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));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]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.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]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.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?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('