├── test_app ├── log │ └── .keep ├── app │ ├── mailers │ │ └── .keep │ ├── models │ │ ├── .keep │ │ └── concerns │ │ │ └── .keep │ ├── assets │ │ ├── images │ │ │ └── .keep │ │ ├── stylesheets │ │ │ ├── application.scss │ │ │ └── welcome.scss │ │ └── javascripts │ │ │ ├── lightbox_bootstraped.coffee │ │ │ ├── welcome.coffee │ │ │ └── application.js │ ├── controllers │ │ ├── concerns │ │ │ └── .keep │ │ ├── welcome_controller.rb │ │ └── application_controller.rb │ ├── helpers │ │ ├── welcome_helper.rb │ │ └── application_helper.rb │ └── views │ │ ├── layouts │ │ └── application.html.erb │ │ └── welcome │ │ └── index.html.erb ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ └── .keep ├── public │ ├── favicon.ico │ ├── system │ │ └── uploads │ │ │ ├── bear.jpg │ │ │ ├── duck.jpg │ │ │ ├── tiger.jpg │ │ │ ├── leopard.jpg │ │ │ └── chimpanzee.jpg │ ├── robots.txt │ ├── 500.html │ ├── 422.html │ └── 404.html ├── test │ ├── fixtures │ │ └── .keep │ ├── helpers │ │ └── .keep │ ├── mailers │ │ └── .keep │ ├── models │ │ └── .keep │ ├── controllers │ │ ├── .keep │ │ └── welcome_controller_test.rb │ ├── integration │ │ └── .keep │ └── test_helper.rb ├── .ruby-version ├── vendor │ └── assets │ │ ├── javascripts │ │ └── .keep │ │ └── stylesheets │ │ └── .keep ├── bin │ ├── rake │ ├── bundle │ ├── rails │ ├── spring │ ├── update │ └── setup ├── config │ ├── boot.rb │ ├── spring.rb │ ├── environment.rb │ ├── cable.yml │ ├── initializers │ │ ├── session_store.rb │ │ ├── mime_types.rb │ │ ├── application_controller_renderer.rb │ │ ├── filter_parameter_logging.rb │ │ ├── cookies_serializer.rb │ │ ├── backtrace_silencers.rb │ │ ├── assets.rb │ │ ├── wrap_parameters.rb │ │ ├── inflections.rb │ │ └── new_framework_defaults.rb │ ├── routes.rb │ ├── application.rb │ ├── database.yml │ ├── locales │ │ └── en.yml │ ├── secrets.yml │ ├── environments │ │ ├── test.rb │ │ ├── development.rb │ │ └── production.rb │ └── puma.rb ├── config.ru ├── Rakefile ├── db │ └── seeds.rb ├── .gitignore ├── README.rdoc ├── Gemfile └── Gemfile.lock ├── Rakefile ├── vendor └── assets │ ├── javascripts │ └── lightbox-bootstrap │ │ ├── index.js │ │ ├── ekko-lightbox.min.js │ │ ├── ekko-lightbox.min.js.map │ │ ├── ekko-lightbox.js │ │ └── ekko-lightbox.js.map │ └── stylesheets │ ├── lightbox-bootstrap.scss │ ├── ekko-lightbox.min.css.map │ └── lightbox-bootstrap │ ├── ekko-lightbox.min.css.map │ ├── ekko-lightbox.min.css │ └── ekko-lightbox.css ├── Gemfile ├── .gitignore ├── bin ├── setup └── console ├── lib └── lightbox │ └── bootstrap │ ├── rails │ └── version.rb │ └── rails.rb ├── LICENSE.txt ├── lightbox-bootstrap-rails.gemspec └── README.md /test_app/log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/app/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/app/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/test/fixtures/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/test/helpers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/test/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/test/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.4.0 2 | -------------------------------------------------------------------------------- /test_app/app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/test/controllers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/test/integration/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require "bundler/gem_tasks" 2 | -------------------------------------------------------------------------------- /test_app/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test_app/app/helpers/welcome_helper.rb: -------------------------------------------------------------------------------- 1 | module WelcomeHelper 2 | end 3 | -------------------------------------------------------------------------------- /test_app/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/lightbox-bootstrap/index.js: -------------------------------------------------------------------------------- 1 | //= require ./ekko-lightbox.min -------------------------------------------------------------------------------- /vendor/assets/stylesheets/lightbox-bootstrap.scss: -------------------------------------------------------------------------------- 1 | @import "lightbox-bootstrap/ekko-lightbox.min"; 2 | -------------------------------------------------------------------------------- /test_app/app/assets/stylesheets/application.scss: -------------------------------------------------------------------------------- 1 | @import "bootstrap"; 2 | @import "lightbox-bootstrap" 3 | -------------------------------------------------------------------------------- /test_app/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # Specify your gem's dependencies in lightbox-bootstrap-rails.gemspec 4 | gemspec 5 | -------------------------------------------------------------------------------- /test_app/app/controllers/welcome_controller.rb: -------------------------------------------------------------------------------- 1 | class WelcomeController < ApplicationController 2 | def index 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.bundle/ 2 | /.yardoc 3 | /Gemfile.lock 4 | /_yardoc/ 5 | /coverage/ 6 | /doc/ 7 | /pkg/ 8 | /spec/reports/ 9 | /tmp/ 10 | -------------------------------------------------------------------------------- /bin/setup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | IFS=$'\n\t' 4 | 5 | bundle install 6 | 7 | # Do any other automated setup that you need to do here 8 | -------------------------------------------------------------------------------- /test_app/public/system/uploads/bear.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luciuschoi/lightbox-bootstrap-rails/HEAD/test_app/public/system/uploads/bear.jpg -------------------------------------------------------------------------------- /test_app/public/system/uploads/duck.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luciuschoi/lightbox-bootstrap-rails/HEAD/test_app/public/system/uploads/duck.jpg -------------------------------------------------------------------------------- /test_app/public/system/uploads/tiger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luciuschoi/lightbox-bootstrap-rails/HEAD/test_app/public/system/uploads/tiger.jpg -------------------------------------------------------------------------------- /test_app/public/system/uploads/leopard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luciuschoi/lightbox-bootstrap-rails/HEAD/test_app/public/system/uploads/leopard.jpg -------------------------------------------------------------------------------- /lib/lightbox/bootstrap/rails/version.rb: -------------------------------------------------------------------------------- 1 | module Lightbox 2 | module Bootstrap 3 | module Rails 4 | VERSION = "5.1.0.1" 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test_app/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /test_app/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /test_app/config/spring.rb: -------------------------------------------------------------------------------- 1 | %w( 2 | .ruby-version 3 | .rbenv-vars 4 | tmp/restart.txt 5 | tmp/caching-dev.txt 6 | ).each { |path| Spring.watch(path) } 7 | -------------------------------------------------------------------------------- /test_app/public/system/uploads/chimpanzee.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luciuschoi/lightbox-bootstrap-rails/HEAD/test_app/public/system/uploads/chimpanzee.jpg -------------------------------------------------------------------------------- /test_app/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../config/application', __dir__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /test_app/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative 'application' 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test_app/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /test_app/config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: async 6 | 7 | production: 8 | adapter: redis 9 | url: redis://localhost:6379/1 10 | -------------------------------------------------------------------------------- /test_app/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_test_app_session' 4 | -------------------------------------------------------------------------------- /test_app/app/assets/javascripts/lightbox_bootstraped.coffee: -------------------------------------------------------------------------------- 1 | $(document).delegate '*[data-toggle="lightbox"]', 'click', (event) -> 2 | event.preventDefault() 3 | $(this).ekkoLightbox() 4 | return -------------------------------------------------------------------------------- /test_app/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | 3 | root "welcome#index" 4 | # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html 5 | end 6 | -------------------------------------------------------------------------------- /test_app/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /test_app/app/assets/stylesheets/welcome.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the welcome controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /lib/lightbox/bootstrap/rails.rb: -------------------------------------------------------------------------------- 1 | require "lightbox/bootstrap/rails/version" 2 | 3 | module Lightbox 4 | module Bootstrap 5 | module Rails 6 | class Engine < ::Rails::Engine 7 | end 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /test_app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test_app/config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # ApplicationController.renderer.defaults.merge!( 4 | # http_host: 'example.org', 5 | # https: false 6 | # ) 7 | -------------------------------------------------------------------------------- /test_app/test/controllers/welcome_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class WelcomeControllerTest < ActionController::TestCase 4 | test "should get index" do 5 | get :index 6 | assert_response :success 7 | end 8 | 9 | end 10 | -------------------------------------------------------------------------------- /test_app/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /test_app/app/assets/javascripts/welcome.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /test_app/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /test_app/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /test_app/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Specify a serializer for the signed and encrypted cookie jars. 4 | # Valid options are :json, :marshal, and :hybrid. 5 | Rails.application.config.action_dispatch.cookies_serializer = :json 6 | -------------------------------------------------------------------------------- /test_app/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /test_app/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV['RAILS_ENV'] ||= 'test' 2 | require File.expand_path('../../config/environment', __FILE__) 3 | require 'rails/test_help' 4 | 5 | class ActiveSupport::TestCase 6 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 7 | fixtures :all 8 | 9 | # Add more helper methods to be used by all tests here... 10 | end 11 | -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require "bundler/setup" 4 | require "lightbox/bootstrap/rails" 5 | 6 | # You can add fixtures and/or initialization code here to make experimenting 7 | # with your gem easier. You can also use a different console, if you like. 8 | 9 | # (If you use this, don't forget to add pry to your Gemfile!) 10 | # require "pry" 11 | # Pry.start 12 | 13 | require "irb" 14 | IRB.start 15 | -------------------------------------------------------------------------------- /test_app/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TestApp 5 | <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> 6 | <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> 7 | <%= csrf_meta_tags %> 8 | 9 | 10 | 11 |
12 | <%= yield %> 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /test_app/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /test_app/bin/spring: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # This file loads spring without using Bundler, in order to be fast. 4 | # It gets overwritten when you run the `spring binstub` command. 5 | 6 | unless defined?(Spring) 7 | require "rubygems" 8 | require "bundler" 9 | 10 | if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m) 11 | Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq } 12 | gem "spring", match[1] 13 | require "spring/binstub" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /test_app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | 14 | # Ignore all logfiles and tempfiles. 15 | /log/* 16 | !/log/.keep 17 | /tmp 18 | -------------------------------------------------------------------------------- /test_app/config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Version of your assets, change this if you want to expire all your assets. 4 | Rails.application.config.assets.version = '1.0' 5 | 6 | # Add additional assets to the asset load path 7 | # Rails.application.config.assets.paths << Emoji.images_path 8 | 9 | # Precompile additional assets. 10 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 11 | # Rails.application.config.assets.precompile += %w( search.js ) 12 | -------------------------------------------------------------------------------- /test_app/config/application.rb: -------------------------------------------------------------------------------- 1 | require_relative 'boot' 2 | 3 | require 'rails/all' 4 | 5 | # Require the gems listed in Gemfile, including any gems 6 | # you've limited to :test, :development, or :production. 7 | Bundler.require(*Rails.groups) 8 | 9 | module TestApp 10 | class Application < Rails::Application 11 | # Settings in config/environments/* take precedence over those specified here. 12 | # Application configuration should go into files in config/initializers 13 | # -- all .rb files in that directory are automatically loaded. 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /test_app/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /test_app/README.rdoc: -------------------------------------------------------------------------------- 1 | == README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | 26 | 27 | Please feel free to use a different markup language if you do not plan to run 28 | rake doc:app. 29 | -------------------------------------------------------------------------------- /test_app/config/database.yml: -------------------------------------------------------------------------------- 1 | # SQLite version 3.x 2 | # gem install sqlite3 3 | # 4 | # Ensure the SQLite 3 gem is defined in your Gemfile 5 | # gem 'sqlite3' 6 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /test_app/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /test_app/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /test_app/app/assets/javascripts/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 any plugin's vendor/assets/javascripts directory 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 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery 14 | //= require tether 15 | //= require bootstrap 16 | //= require lightbox-bootstrap 17 | //= require jquery_ujs 18 | //= require turbolinks 19 | //= require_tree . 20 | -------------------------------------------------------------------------------- /test_app/bin/update: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'pathname' 3 | require 'fileutils' 4 | include FileUtils 5 | 6 | # path to your application root. 7 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) 8 | 9 | def system!(*args) 10 | system(*args) || abort("\n== Command #{args} failed ==") 11 | end 12 | 13 | chdir APP_ROOT do 14 | # This script is a way to update your development environment automatically. 15 | # Add necessary update steps to this file. 16 | 17 | puts '== Installing dependencies ==' 18 | system! 'gem install bundler --conservative' 19 | system('bundle check') || system!('bundle install') 20 | 21 | puts "\n== Updating database ==" 22 | system! 'bin/rails db:migrate' 23 | 24 | puts "\n== Removing old logs and tempfiles ==" 25 | system! 'bin/rails log:clear tmp:clear' 26 | 27 | puts "\n== Restarting application server ==" 28 | system! 'bin/rails restart' 29 | end 30 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/ekko-lightbox.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["ekko-lightbox.css"],"names":[],"mappings":"AAgDC,mCAZA,oCAcC,QAAA,EAlDF,yBACE,SAAA,SACD,gDAEC,SAAA,SAAmB,IAAA,EACZ,KAAA,EACC,OAAA,EACE,MAAA,EACD,MAAA,KAEV,sBAEC,MAAA,KAAY,OAAA,KAEb,2BAEC,QAAA,EAAa,SAAA,SACM,IAAA,EACZ,KAAA,EACC,MAAA,KACI,OAAA,KACC,QAAA,YACb,QAAA,KACD,6BAEC,SAAA,EAAA,KAAA,EAAQ,QAAA,YACR,QAAA,KAAc,eAAA,OACd,YAAA,OAAoB,QAAA,EACT,WAAA,QAAA,IACc,MAAA,KACb,UAAA,KACI,QAAA,EAEjB,+BAEC,kBAAA,EAAA,UAAA,EAID,kCAEC,QAAA,EAAA,KACD,6CAEC,WAAA,MACD,mCAEC,gBAAA,KAID,uBAEC,QAAA,EAAW,gBAAA,KAEZ,6BAEC,QAAA,KACD,4BAEC,YAAA,MACD,6BAEC,cAAA,MAAA,gBAAA,MACD,sBAEC,SAAA,SAAmB,IAAA,EACZ,KAAA,EACC,OAAA,EACE,MAAA,EACD,MAAA,KACG,QAAA,YACZ,QAAA,KAAc,mBAAA,OAEd,eAAA,OAAuB,cAAA,OAEvB,gBAAA,OAAwB,eAAA,OAExB,YAAA,OACD,0BAEC,MAAA,KAAY,OAAA,KACC,SAAA,SACM,WAAA,OAEpB,8BAEC,MAAA,KAAY,OAAA,KACC,cAAA,IACM,iBAAA,KACI,QAAA,GACV,SAAA,SACM,IAAA,EACZ,KAAA,EACC,UAAA,EAAA,GAAA,SAAA,YAET,yCAEC,gBAAA,IACD,4CAEC,iBAAA,KACD,aAWC,GAAA,GAEE,UAAA,SAAoB,kBAAA,SAErB,IAEC,UAAA,SAAoB,kBAAA"} 2 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/lightbox-bootstrap/ekko-lightbox.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["ekko-lightbox.css"],"names":[],"mappings":"AAgDC,mCAZA,oCAcC,QAAA,EAlDF,yBACE,SAAA,SACD,gDAEC,SAAA,SAAmB,IAAA,EACZ,KAAA,EACC,OAAA,EACE,MAAA,EACD,MAAA,KAEV,sBAEC,MAAA,KAAY,OAAA,KAEb,2BAEC,QAAA,EAAa,SAAA,SACM,IAAA,EACZ,KAAA,EACC,MAAA,KACI,OAAA,KACC,QAAA,YACb,QAAA,KACD,6BAEC,SAAA,EAAA,KAAA,EAAQ,QAAA,YACR,QAAA,KAAc,eAAA,OACd,YAAA,OAAoB,QAAA,EACT,WAAA,QAAA,IACc,MAAA,KACb,UAAA,KACI,QAAA,EAEjB,+BAEC,kBAAA,EAAA,UAAA,EAID,kCAEC,QAAA,EAAA,KACD,6CAEC,WAAA,MACD,mCAEC,gBAAA,KAID,uBAEC,QAAA,EAAW,gBAAA,KAEZ,6BAEC,QAAA,KACD,4BAEC,YAAA,MACD,6BAEC,cAAA,MAAA,gBAAA,MACD,sBAEC,SAAA,SAAmB,IAAA,EACZ,KAAA,EACC,OAAA,EACE,MAAA,EACD,MAAA,KACG,QAAA,YACZ,QAAA,KAAc,mBAAA,OAEd,eAAA,OAAuB,cAAA,OAEvB,gBAAA,OAAwB,eAAA,OAExB,YAAA,OACD,0BAEC,MAAA,KAAY,OAAA,KACC,SAAA,SACM,WAAA,OAEpB,8BAEC,MAAA,KAAY,OAAA,KACC,cAAA,IACM,iBAAA,KACI,QAAA,GACV,SAAA,SACM,IAAA,EACZ,KAAA,EACC,UAAA,EAAA,GAAA,SAAA,YAET,yCAEC,gBAAA,IACD,4CAEC,iBAAA,KACD,aAWC,GAAA,GAEE,UAAA,SAAoB,kBAAA,SAErB,IAEC,UAAA,SAAoB,kBAAA"} -------------------------------------------------------------------------------- /test_app/app/views/welcome/index.html.erb: -------------------------------------------------------------------------------- 1 |

Photo Library

2 |

Lightbox for Bootstrap 4

3 | 4 | <%= link_to image_tag("/system/uploads/tiger.jpg", height:'100px'), "/system/uploads/tiger.jpg", data:{ title:'title1', footer:'footer1', toggle:'lightbox', gallery:'multiimages' }%> 5 | <%= link_to image_tag("/system/uploads/chimpanzee.jpg", height:'100px'), "/system/uploads/chimpanzee.jpg", data:{ title:'title2', footer:'footer2', toggle:'lightbox', gallery:'multiimages' }%> 6 | <%= link_to image_tag("/system/uploads/bear.jpg", height:'100px'), "/system/uploads/bear.jpg", data:{ title:'title3', footer:'footer3', toggle:'lightbox', gallery:'multiimages' }%> 7 | <%= link_to image_tag("/system/uploads/leopard.jpg", height:'100px'), "/system/uploads/leopard.jpg", data:{ title:'title4', footer:'footer4', toggle:'lightbox', gallery:'multiimages' }%> 8 | <%= link_to image_tag("/system/uploads/duck.jpg", height:'100px'), "/system/uploads/duck.jpg", data:{ title:'title5', footer:'footer5', toggle:'lightbox', gallery:'multiimages' }%> 9 | -------------------------------------------------------------------------------- /test_app/config/secrets.yml: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Your secret key is used for verifying the integrity of signed cookies. 4 | # If you change this key, all old signed cookies will become invalid! 5 | 6 | # Make sure the secret is at least 30 characters and all random, 7 | # no regular words or you'll be exposed to dictionary attacks. 8 | # You can use `rails secret` to generate a secure secret key. 9 | 10 | # Make sure the secrets in this file are kept private 11 | # if you're sharing your code publicly. 12 | 13 | development: 14 | secret_key_base: 6ddb17700392c99d5d039d3c7b0164e87dcc3f9e0e1531d22fc65ccef139e7a1fd0d24a52e0c10009efc5ab43f801cef59742875edd1fee4c6a8287d405b3a1f 15 | 16 | test: 17 | secret_key_base: 923a49b18afb153672873e09d459abad82252f40d3f1edf0d31f4ee1cc0dbd591d0799481a5245814706e53ae5e1bb325d878d5c3d9fd2b6dd04cea1a905d816 18 | 19 | # Do not keep production secrets in the repository, 20 | # instead read values from the environment. 21 | production: 22 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> 23 | -------------------------------------------------------------------------------- /test_app/bin/setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'pathname' 3 | require 'fileutils' 4 | include FileUtils 5 | 6 | # path to your application root. 7 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) 8 | 9 | def system!(*args) 10 | system(*args) || abort("\n== Command #{args} failed ==") 11 | end 12 | 13 | chdir APP_ROOT do 14 | # This script is a starting point to setup your application. 15 | # Add necessary setup steps to this file. 16 | 17 | puts '== Installing dependencies ==' 18 | system! 'gem install bundler --conservative' 19 | system('bundle check') || system!('bundle install') 20 | 21 | # puts "\n== Copying sample files ==" 22 | # unless File.exist?('config/database.yml') 23 | # cp 'config/database.yml.sample', 'config/database.yml' 24 | # end 25 | 26 | puts "\n== Preparing database ==" 27 | system! 'bin/rails db:setup' 28 | 29 | puts "\n== Removing old logs and tempfiles ==" 30 | system! 'bin/rails log:clear tmp:clear' 31 | 32 | puts "\n== Restarting application server ==" 33 | system! 'bin/rails restart' 34 | end 35 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Hyo Seong Choi 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /test_app/config/initializers/new_framework_defaults.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | # 3 | # This file contains migration options to ease your Rails 5.0 upgrade. 4 | # 5 | # Once upgraded flip defaults one by one to migrate to the new default. 6 | # 7 | # Read the Guide for Upgrading Ruby on Rails for more info on each option. 8 | 9 | # Enable per-form CSRF tokens. Previous versions had false. 10 | Rails.application.config.action_controller.per_form_csrf_tokens = false 11 | 12 | # Enable origin-checking CSRF mitigation. Previous versions had false. 13 | Rails.application.config.action_controller.forgery_protection_origin_check = false 14 | 15 | # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. 16 | # Previous versions had false. 17 | ActiveSupport.to_time_preserves_timezone = false 18 | 19 | # Require `belongs_to` associations by default. Previous versions had false. 20 | Rails.application.config.active_record.belongs_to_required_by_default = false 21 | 22 | # Do not halt callback chains when a callback returns false. Previous versions had true. 23 | ActiveSupport.halt_callback_chains_on_return_false = true 24 | -------------------------------------------------------------------------------- /lightbox-bootstrap-rails.gemspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | lib = File.expand_path('../lib', __FILE__) 3 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 4 | require 'lightbox/bootstrap/rails/version' 5 | 6 | Gem::Specification.new do |spec| 7 | spec.name = "lightbox-bootstrap-rails" 8 | spec.version = Lightbox::Bootstrap::Rails::VERSION 9 | spec.authors = ["Hyo Seong Choi"] 10 | spec.email = ["lucius.choi@gmail.com"] 11 | 12 | spec.summary = %q{A gem built for the use of Lightbox for Bootstrap 4 as the rails assets pipeline.} 13 | spec.description = %q{Wrapping the assets of Lightbox for Bootstrap 4 as a ruby gem.} 14 | spec.homepage = "https://github.com/luciuschoi/lightbox-bootstrap-rails" 15 | 16 | # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or 17 | # delete this section to allow pushing this gem to any host. 18 | if spec.respond_to?(:metadata) 19 | spec.metadata['allowed_push_host'] = "https://rubygems.org" 20 | else 21 | raise "RubyGems 2.0 or newer is required to protect against public gem pushes." 22 | end 23 | 24 | spec.files = Dir["{lib,vendor}/**/*"] + ["LICENSE.txt", "README.md"] 25 | spec.require_paths = ["lib"] 26 | spec.add_development_dependency "bundler", "~> 1.9" 27 | spec.add_development_dependency "rake", "~> 10.0" 28 | end 29 | -------------------------------------------------------------------------------- /test_app/public/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | We're sorry, but something went wrong (500) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

We're sorry, but something went wrong.

62 |
63 |

If you are the application owner check the logs for more information.

64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/lightbox-bootstrap/ekko-lightbox.min.css: -------------------------------------------------------------------------------- 1 | .ekko-lightbox-nav-overlay a:focus,.ekko-lightbox-nav-overlay a>:focus{outline:0}.ekko-lightbox-container{position:relative}.ekko-lightbox-container>div.ekko-lightbox-item{position:absolute;top:0;left:0;bottom:0;right:0;width:100%}.ekko-lightbox iframe{width:100%;height:100%}.ekko-lightbox-nav-overlay{z-index:1;position:absolute;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex}.ekko-lightbox-nav-overlay a{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0;transition:opacity .5s;color:#fff;font-size:30px;z-index:1}.ekko-lightbox-nav-overlay a>*{-ms-flex-positive:1;flex-grow:1}.ekko-lightbox-nav-overlay a span{padding:0 30px}.ekko-lightbox-nav-overlay a:last-child span{text-align:right}.ekko-lightbox-nav-overlay a:hover{text-decoration:none}.ekko-lightbox a:hover{opacity:1;text-decoration:none}.ekko-lightbox .modal-dialog{display:none}.ekko-lightbox .modal-title{line-height:1.2em}.ekko-lightbox .modal-footer{-ms-flex-pack:unset;justify-content:unset}.ekko-lightbox-loader{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.ekko-lightbox-loader>div{width:40px;height:40px;position:relative;text-align:center}.ekko-lightbox-loader>div>div{width:100%;height:100%;border-radius:50%;background-color:#fff;opacity:.6;position:absolute;top:0;left:0;animation:a 2s infinite ease-in-out}.ekko-lightbox-loader>div>div:last-child{animation-delay:-1s}.modal-dialog .ekko-lightbox-loader>div>div{background-color:#333}@keyframes a{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}} 2 | /*# sourceMappingURL=ekko-lightbox.min.css.map */ -------------------------------------------------------------------------------- /test_app/public/422.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The change you wanted was rejected (422) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The change you wanted was rejected.

62 |

Maybe you tried to change something you didn't have access to.

63 |
64 |

If you are the application owner check the logs for more information.

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /test_app/public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The page you were looking for doesn't exist (404) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The page you were looking for doesn't exist.

62 |

You may have mistyped the address or the page may have moved.

63 |
64 |

If you are the application owner check the logs for more information.

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /test_app/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'bootstrap', '~> 4.0.0.alpha6' 4 | source 'https://rails-assets.org' do 5 | gem 'rails-assets-tether', '>= 1.3.3' 6 | end 7 | gem 'lightbox-bootstrap-rails', github: 'luciuschoi/lightbox-bootstrap-rails' 8 | # gem 'lightbox-bootstrap-rails', path: '../' 9 | 10 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 11 | gem 'rails', '5.0.1' 12 | # Use sqlite3 as the database for Active Record 13 | gem 'sqlite3' 14 | # Use SCSS for stylesheets 15 | gem 'sass-rails', '~> 5.0' 16 | # Use Uglifier as compressor for JavaScript assets 17 | gem 'uglifier', '>= 1.3.0' 18 | # Use CoffeeScript for .coffee assets and views 19 | gem 'coffee-rails', '~> 4.1.0' 20 | # See https://github.com/rails/execjs#readme for more supported runtimes 21 | # gem 'therubyracer', platforms: :ruby 22 | 23 | # Use jquery as the JavaScript library 24 | gem 'jquery-rails' 25 | # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks 26 | gem 'turbolinks' 27 | # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 28 | gem 'jbuilder', '~> 2.0' 29 | # bundle exec rake doc:rails generates the API under doc/api. 30 | gem 'sdoc', '~> 0.4.0', group: :doc 31 | 32 | # Use ActiveModel has_secure_password 33 | # gem 'bcrypt', '~> 3.1.7' 34 | 35 | # Use Unicorn as the app server 36 | # gem 'unicorn' 37 | 38 | # Use Capistrano for deployment 39 | # gem 'capistrano-rails', group: :development 40 | 41 | group :development, :test do 42 | # Call 'byebug' anywhere in the code to stop execution and get a debugger console 43 | gem 'byebug' 44 | 45 | # Access an IRB console on exception pages or by using <%= console %> in views 46 | gem 'web-console', '~> 2.0' 47 | 48 | # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 49 | gem 'spring' 50 | end 51 | 52 | -------------------------------------------------------------------------------- /test_app/config/environments/test.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # The test environment is used exclusively to run your application's 5 | # test suite. You never need to work with it otherwise. Remember that 6 | # your test database is "scratch space" for the test suite and is wiped 7 | # and recreated between test runs. Don't rely on the data there! 8 | config.cache_classes = true 9 | 10 | # Do not eager load code on boot. This avoids loading your whole application 11 | # just for the purpose of running a single test. If you are using a tool that 12 | # preloads Rails for running tests, you may have to set it to true. 13 | config.eager_load = false 14 | 15 | # Configure public file server for tests with Cache-Control for performance. 16 | config.public_file_server.enabled = true 17 | config.public_file_server.headers = { 18 | 'Cache-Control' => 'public, max-age=3600' 19 | } 20 | 21 | # Show full error reports and disable caching. 22 | config.consider_all_requests_local = true 23 | config.action_controller.perform_caching = false 24 | 25 | # Raise exceptions instead of rendering exception templates. 26 | config.action_dispatch.show_exceptions = false 27 | 28 | # Disable request forgery protection in test environment. 29 | config.action_controller.allow_forgery_protection = false 30 | config.action_mailer.perform_caching = false 31 | 32 | # Tell Action Mailer not to deliver emails to the real world. 33 | # The :test delivery method accumulates sent emails in the 34 | # ActionMailer::Base.deliveries array. 35 | config.action_mailer.delivery_method = :test 36 | 37 | # Print deprecation notices to the stderr. 38 | config.active_support.deprecation = :stderr 39 | 40 | # Raises error for missing translations 41 | # config.action_view.raise_on_missing_translations = true 42 | end 43 | -------------------------------------------------------------------------------- /test_app/config/environments/development.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # In the development environment your application's code is reloaded on 5 | # every request. This slows down response time but is perfect for development 6 | # since you don't have to restart the web server when you make code changes. 7 | config.cache_classes = false 8 | 9 | # Do not eager load code on boot. 10 | config.eager_load = false 11 | 12 | # Show full error reports. 13 | config.consider_all_requests_local = true 14 | 15 | # Enable/disable caching. By default caching is disabled. 16 | if Rails.root.join('tmp/caching-dev.txt').exist? 17 | config.action_controller.perform_caching = true 18 | 19 | config.cache_store = :memory_store 20 | config.public_file_server.headers = { 21 | 'Cache-Control' => 'public, max-age=172800' 22 | } 23 | else 24 | config.action_controller.perform_caching = false 25 | 26 | config.cache_store = :null_store 27 | end 28 | 29 | # Don't care if the mailer can't send. 30 | config.action_mailer.raise_delivery_errors = false 31 | 32 | config.action_mailer.perform_caching = false 33 | 34 | # Print deprecation notices to the Rails logger. 35 | config.active_support.deprecation = :log 36 | 37 | # Raise an error on page load if there are pending migrations. 38 | config.active_record.migration_error = :page_load 39 | 40 | # Debug mode disables concatenation and preprocessing of assets. 41 | # This option may cause significant delays in view rendering with a large 42 | # number of complex assets. 43 | config.assets.debug = true 44 | 45 | # Suppress logger output for asset requests. 46 | config.assets.quiet = true 47 | 48 | # Raises error for missing translations 49 | # config.action_view.raise_on_missing_translations = true 50 | 51 | # Use an evented file watcher to asynchronously detect changes in source code, 52 | # routes, locales, etc. This feature depends on the listen gem. 53 | # config.file_watcher = ActiveSupport::EventedFileUpdateChecker 54 | end 55 | -------------------------------------------------------------------------------- /test_app/config/puma.rb: -------------------------------------------------------------------------------- 1 | # Puma can serve each request in a thread from an internal thread pool. 2 | # The `threads` method setting takes two numbers a minimum and maximum. 3 | # Any libraries that use thread pools should be configured to match 4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum 5 | # and maximum, this matches the default thread size of Active Record. 6 | # 7 | threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i 8 | threads threads_count, threads_count 9 | 10 | # Specifies the `port` that Puma will listen on to receive requests, default is 3000. 11 | # 12 | port ENV.fetch("PORT") { 3000 } 13 | 14 | # Specifies the `environment` that Puma will run in. 15 | # 16 | environment ENV.fetch("RAILS_ENV") { "development" } 17 | 18 | # Specifies the number of `workers` to boot in clustered mode. 19 | # Workers are forked webserver processes. If using threads and workers together 20 | # the concurrency of the application would be max `threads` * `workers`. 21 | # Workers do not work on JRuby or Windows (both of which do not support 22 | # processes). 23 | # 24 | # workers ENV.fetch("WEB_CONCURRENCY") { 2 } 25 | 26 | # Use the `preload_app!` method when specifying a `workers` number. 27 | # This directive tells Puma to first boot the application and load code 28 | # before forking the application. This takes advantage of Copy On Write 29 | # process behavior so workers use less memory. If you use this option 30 | # you need to make sure to reconnect any threads in the `on_worker_boot` 31 | # block. 32 | # 33 | # preload_app! 34 | 35 | # The code in the `on_worker_boot` will be called if you are using 36 | # clustered mode by specifying a number of `workers`. After each worker 37 | # process is booted this block will be run, if you are using `preload_app!` 38 | # option you will want to use this block to reconnect to any threads 39 | # or connections that may have been created at application boot, Ruby 40 | # cannot share connections between processes. 41 | # 42 | # on_worker_boot do 43 | # ActiveRecord::Base.establish_connection if defined?(ActiveRecord) 44 | # end 45 | 46 | # Allow puma to be restarted by `rails restart` command. 47 | plugin :tmp_restart 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Lightbox for Bootstrap 4 2 | 3 | This gem was built for the use of 'Lightbox for Bootstrap 4' as Rails assets pipeline and you can look for the detailed documents at http://ashleydw.github.io/lightbox/ 4 | 5 | Updated using Bootstrap 4 alpha 6 version 6 | 7 | [![Gem Version](https://badge.fury.io/rb/lightbox-bootstrap-rails.svg)](http://badge.fury.io/rb/lightbox-bootstrap-rails) 8 | 9 | ## Installation 10 | 11 | Add this line to your application's Gemfile: 12 | 13 | ```ruby 14 | gem 'lightbox-bootstrap-rails', '5.1.0.1' 15 | ``` 16 | 17 | And then execute: 18 | 19 | ```bash 20 | $ bundle 21 | ``` 22 | 23 | Or install it yourself as: 24 | 25 | ```bash 26 | $ gem install lightbox-bootstrap-rails 27 | ``` 28 | 29 | ## Usage 30 | 31 | in assets/javascripts/application.js 32 | 33 | ``` javascript 34 | //= ... 35 | //= require lightbox-bootstrap 36 | //= ... 37 | ``` 38 | 39 | in assets/stylesheets/application.scss 40 | 41 | ``` css 42 | ... 43 | @import "bootstrap"; 44 | @import "lightbox-bootstrap"; 45 | ... 46 | ``` 47 | 48 | or in assets/stylesheets/application.css 49 | 50 | ``` css 51 | /*... 52 | *= require lightbox-bootstrap 53 | *= require ... 54 | */ 55 | ``` 56 | 57 | Finally, you should add `assets/javascripts/lightbox_bootstraped.coffee` as follows: 58 | 59 | ``` coffee 60 | $(document).delegate '*[data-toggle="lightbox"]', 'click', (event) -> 61 | event.preventDefault() 62 | $(this).ekkoLightbox() 63 | return 64 | ``` 65 | 66 | ## Test Application 67 | 68 | Among the gem sources, a test application is provided and there you can find how to code in the wild. 69 | 70 | # Changelog 71 | 72 | - v 3.3.0.0 : initially created. 73 | - v 3.3.0.1 : deployed to Rubygems.org 74 | - v 3.3.0.2 : modified @import stylesheet syntax 75 | - v 3.3.0.3 : fixed typos in ekko-lightbox.min.js and ekko-lightbox.js ([lightbox v4.0.2](https://github.com/ashleydw/lightbox/tree/v4.0.2) for Boostrap 3). 76 | - v 5.0.0.0 : updated with [lightbox v5.0.0](https://github.com/ashleydw/lightbox/tree/v5.0.0) for Boostrap 4 alpha 5 77 | - v 5.1.0.0 : updated with [lightbox v5.1.0](https://github.com/ashleydw/lightbox/tree/v5.1.0) for Boostrap 4 alpha 6 78 | - v 5.1.0.1 : fixed modal dialog alignments 79 | 80 | ## Contributing 81 | 82 | 1. Fork it ( https://github.com/[my-github-username]/lightbox-bootstrap-rails/fork ) 83 | 2. Create your feature branch (`git checkout -b my-new-feature`) 84 | 3. Commit your changes (`git commit -am 'Add some feature'`) 85 | 4. Push to the branch (`git push origin my-new-feature`) 86 | 5. Create a new Pull Request 87 | -------------------------------------------------------------------------------- /test_app/config/environments/production.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # Code is not reloaded between requests. 5 | config.cache_classes = true 6 | 7 | # Eager load code on boot. This eager loads most of Rails and 8 | # your application in memory, allowing both threaded web servers 9 | # and those relying on copy on write to perform better. 10 | # Rake tasks automatically ignore this option for performance. 11 | config.eager_load = true 12 | 13 | # Full error reports are disabled and caching is turned on. 14 | config.consider_all_requests_local = false 15 | config.action_controller.perform_caching = true 16 | 17 | # Disable serving static files from the `/public` folder by default since 18 | # Apache or NGINX already handles this. 19 | config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? 20 | 21 | # Compress JavaScripts and CSS. 22 | config.assets.js_compressor = :uglifier 23 | # config.assets.css_compressor = :sass 24 | 25 | # Do not fallback to assets pipeline if a precompiled asset is missed. 26 | config.assets.compile = false 27 | 28 | # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb 29 | 30 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. 31 | # config.action_controller.asset_host = 'http://assets.example.com' 32 | 33 | # Specifies the header that your server uses for sending files. 34 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache 35 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX 36 | 37 | # Mount Action Cable outside main process or domain 38 | # config.action_cable.mount_path = nil 39 | # config.action_cable.url = 'wss://example.com/cable' 40 | # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] 41 | 42 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 43 | # config.force_ssl = true 44 | 45 | # Use the lowest log level to ensure availability of diagnostic information 46 | # when problems arise. 47 | config.log_level = :debug 48 | 49 | # Prepend all log lines with the following tags. 50 | config.log_tags = [ :request_id ] 51 | 52 | # Use a different cache store in production. 53 | # config.cache_store = :mem_cache_store 54 | 55 | # Use a real queuing backend for Active Job (and separate queues per environment) 56 | # config.active_job.queue_adapter = :resque 57 | # config.active_job.queue_name_prefix = "test_app_#{Rails.env}" 58 | config.action_mailer.perform_caching = false 59 | 60 | # Ignore bad email addresses and do not raise email delivery errors. 61 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. 62 | # config.action_mailer.raise_delivery_errors = false 63 | 64 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 65 | # the I18n.default_locale when a translation cannot be found). 66 | config.i18n.fallbacks = true 67 | 68 | # Send deprecation notices to registered listeners. 69 | config.active_support.deprecation = :notify 70 | 71 | # Use default logging formatter so that PID and timestamp are not suppressed. 72 | config.log_formatter = ::Logger::Formatter.new 73 | 74 | # Use a different logger for distributed setups. 75 | # require 'syslog/logger' 76 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') 77 | 78 | if ENV["RAILS_LOG_TO_STDOUT"].present? 79 | logger = ActiveSupport::Logger.new(STDOUT) 80 | logger.formatter = config.log_formatter 81 | config.logger = ActiveSupport::TaggedLogging.new(logger) 82 | end 83 | 84 | # Do not dump schema after migrations. 85 | config.active_record.dump_schema_after_migration = false 86 | end 87 | -------------------------------------------------------------------------------- /test_app/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: https://github.com/luciuschoi/lightbox-bootstrap-rails.git 3 | revision: f73bf06e20e12ae47b5d85532ca84ff734c9a621 4 | specs: 5 | lightbox-bootstrap-rails (5.1.0.0) 6 | 7 | GEM 8 | remote: https://rubygems.org/ 9 | remote: https://rails-assets.org/ 10 | specs: 11 | actioncable (5.0.1) 12 | actionpack (= 5.0.1) 13 | nio4r (~> 1.2) 14 | websocket-driver (~> 0.6.1) 15 | actionmailer (5.0.1) 16 | actionpack (= 5.0.1) 17 | actionview (= 5.0.1) 18 | activejob (= 5.0.1) 19 | mail (~> 2.5, >= 2.5.4) 20 | rails-dom-testing (~> 2.0) 21 | actionpack (5.0.1) 22 | actionview (= 5.0.1) 23 | activesupport (= 5.0.1) 24 | rack (~> 2.0) 25 | rack-test (~> 0.6.3) 26 | rails-dom-testing (~> 2.0) 27 | rails-html-sanitizer (~> 1.0, >= 1.0.2) 28 | actionview (5.0.1) 29 | activesupport (= 5.0.1) 30 | builder (~> 3.1) 31 | erubis (~> 2.7.0) 32 | rails-dom-testing (~> 2.0) 33 | rails-html-sanitizer (~> 1.0, >= 1.0.2) 34 | activejob (5.0.1) 35 | activesupport (= 5.0.1) 36 | globalid (>= 0.3.6) 37 | activemodel (5.0.1) 38 | activesupport (= 5.0.1) 39 | activerecord (5.0.1) 40 | activemodel (= 5.0.1) 41 | activesupport (= 5.0.1) 42 | arel (~> 7.0) 43 | activesupport (5.0.1) 44 | concurrent-ruby (~> 1.0, >= 1.0.2) 45 | i18n (~> 0.7) 46 | minitest (~> 5.1) 47 | tzinfo (~> 1.1) 48 | arel (7.1.4) 49 | autoprefixer-rails (6.7.0) 50 | execjs 51 | binding_of_caller (0.7.2) 52 | debug_inspector (>= 0.0.1) 53 | bootstrap (4.0.0.alpha6) 54 | autoprefixer-rails (>= 6.0.3) 55 | sass (>= 3.4.19) 56 | builder (3.2.3) 57 | byebug (9.0.6) 58 | coffee-rails (4.1.1) 59 | coffee-script (>= 2.2.0) 60 | railties (>= 4.0.0, < 5.1.x) 61 | coffee-script (2.4.1) 62 | coffee-script-source 63 | execjs 64 | coffee-script-source (1.12.2) 65 | concurrent-ruby (1.0.4) 66 | debug_inspector (0.0.2) 67 | erubis (2.7.0) 68 | execjs (2.7.0) 69 | globalid (0.3.7) 70 | activesupport (>= 4.1.0) 71 | i18n (0.7.0) 72 | jbuilder (2.6.1) 73 | activesupport (>= 3.0.0, < 5.1) 74 | multi_json (~> 1.2) 75 | jquery-rails (4.2.2) 76 | rails-dom-testing (>= 1, < 3) 77 | railties (>= 4.2.0) 78 | thor (>= 0.14, < 2.0) 79 | json (1.8.6) 80 | loofah (2.0.3) 81 | nokogiri (>= 1.5.9) 82 | mail (2.6.4) 83 | mime-types (>= 1.16, < 4) 84 | method_source (0.8.2) 85 | mime-types (3.1) 86 | mime-types-data (~> 3.2015) 87 | mime-types-data (3.2016.0521) 88 | mini_portile2 (2.1.0) 89 | minitest (5.10.1) 90 | multi_json (1.12.1) 91 | nio4r (1.2.1) 92 | nokogiri (1.7.0.1) 93 | mini_portile2 (~> 2.1.0) 94 | rack (2.0.1) 95 | rack-test (0.6.3) 96 | rack (>= 1.0) 97 | rails (5.0.1) 98 | actioncable (= 5.0.1) 99 | actionmailer (= 5.0.1) 100 | actionpack (= 5.0.1) 101 | actionview (= 5.0.1) 102 | activejob (= 5.0.1) 103 | activemodel (= 5.0.1) 104 | activerecord (= 5.0.1) 105 | activesupport (= 5.0.1) 106 | bundler (>= 1.3.0, < 2.0) 107 | railties (= 5.0.1) 108 | sprockets-rails (>= 2.0.0) 109 | rails-assets-tether (1.4.0) 110 | rails-dom-testing (2.0.2) 111 | activesupport (>= 4.2.0, < 6.0) 112 | nokogiri (~> 1.6) 113 | rails-html-sanitizer (1.0.3) 114 | loofah (~> 2.0) 115 | railties (5.0.1) 116 | actionpack (= 5.0.1) 117 | activesupport (= 5.0.1) 118 | method_source 119 | rake (>= 0.8.7) 120 | thor (>= 0.18.1, < 2.0) 121 | rake (12.0.0) 122 | rdoc (4.3.0) 123 | sass (3.4.23) 124 | sass-rails (5.0.6) 125 | railties (>= 4.0.0, < 6) 126 | sass (~> 3.1) 127 | sprockets (>= 2.8, < 4.0) 128 | sprockets-rails (>= 2.0, < 4.0) 129 | tilt (>= 1.1, < 3) 130 | sdoc (0.4.2) 131 | json (~> 1.7, >= 1.7.7) 132 | rdoc (~> 4.0) 133 | spring (2.0.1) 134 | activesupport (>= 4.2) 135 | sprockets (3.7.1) 136 | concurrent-ruby (~> 1.0) 137 | rack (> 1, < 3) 138 | sprockets-rails (3.2.0) 139 | actionpack (>= 4.0) 140 | activesupport (>= 4.0) 141 | sprockets (>= 3.0.0) 142 | sqlite3 (1.3.13) 143 | thor (0.19.4) 144 | thread_safe (0.3.5) 145 | tilt (2.0.6) 146 | turbolinks (5.0.1) 147 | turbolinks-source (~> 5) 148 | turbolinks-source (5.0.0) 149 | tzinfo (1.2.2) 150 | thread_safe (~> 0.1) 151 | uglifier (3.0.4) 152 | execjs (>= 0.3.0, < 3) 153 | web-console (2.3.0) 154 | activemodel (>= 4.0) 155 | binding_of_caller (>= 0.7.2) 156 | railties (>= 4.0) 157 | sprockets-rails (>= 2.0, < 4.0) 158 | websocket-driver (0.6.5) 159 | websocket-extensions (>= 0.1.0) 160 | websocket-extensions (0.1.2) 161 | 162 | PLATFORMS 163 | ruby 164 | 165 | DEPENDENCIES 166 | bootstrap (~> 4.0.0.alpha6) 167 | byebug 168 | coffee-rails (~> 4.1.0) 169 | jbuilder (~> 2.0) 170 | jquery-rails 171 | lightbox-bootstrap-rails! 172 | rails (= 5.0.1) 173 | rails-assets-tether (>= 1.3.3)! 174 | sass-rails (~> 5.0) 175 | sdoc (~> 0.4.0) 176 | spring 177 | sqlite3 178 | turbolinks 179 | uglifier (>= 1.3.0) 180 | web-console (~> 2.0) 181 | 182 | BUNDLED WITH 183 | 1.13.6 184 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/lightbox-bootstrap/ekko-lightbox.css: -------------------------------------------------------------------------------- 1 | .ekko-lightbox-container{position:relative}.ekko-lightbox-container>div.ekko-lightbox-item{position:absolute;top:0;left:0;bottom:0;right:0;width:100%}.ekko-lightbox iframe{width:100%;height:100%}.ekko-lightbox-nav-overlay{z-index:1;position:absolute;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex}.ekko-lightbox-nav-overlay a{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0;transition:opacity .5s;color:#fff;font-size:30px;z-index:1}.ekko-lightbox-nav-overlay a>*{-ms-flex-positive:1;flex-grow:1}.ekko-lightbox-nav-overlay a>:focus{outline:none}.ekko-lightbox-nav-overlay a span{padding:0 30px}.ekko-lightbox-nav-overlay a:last-child span{text-align:right}.ekko-lightbox-nav-overlay a:hover{text-decoration:none}.ekko-lightbox-nav-overlay a:focus{outline:none}.ekko-lightbox a:hover{opacity:1;text-decoration:none}.ekko-lightbox .modal-dialog{display:none}.ekko-lightbox .modal-title{line-height:1.2em}.ekko-lightbox .modal-footer{-ms-flex-pack:unset;justify-content:unset}.ekko-lightbox-loader{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.ekko-lightbox-loader>div{width:40px;height:40px;position:relative;text-align:center}.ekko-lightbox-loader>div>div{width:100%;height:100%;border-radius:50%;background-color:#fff;opacity:.6;position:absolute;top:0;left:0;animation:a 2s infinite ease-in-out}.ekko-lightbox-loader>div>div:last-child{animation-delay:-1s}.modal-dialog .ekko-lightbox-loader>div>div{background-color:#333}@keyframes a{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}} 2 | /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVra28tbGlnaHRib3guY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHlCQUNFLGlCQUFtQixDQUNwQixBQUNELGdEQUNFLGtCQUFtQixBQUNuQixNQUFPLEFBQ1AsT0FBUSxBQUNSLFNBQVUsQUFDVixRQUFTLEFBQ1QsVUFBWSxDQUNiLEFBQ0Qsc0JBQ0UsV0FBWSxBQUNaLFdBQWEsQ0FDZCxBQUNELDJCQUNFLFVBQWEsQUFDYixrQkFBbUIsQUFDbkIsTUFBTyxBQUNQLE9BQVEsQUFDUixXQUFZLEFBQ1osWUFBYSxBQUNiLG9CQUFjLEFBQWQsWUFBYyxDQUNmLEFBQ0QsNkJBQ0UsV0FBUSxBQUFSLE9BQVEsQUFDUixvQkFBYyxBQUFkLGFBQWMsQUFDZCxzQkFBb0IsQUFBcEIsbUJBQW9CLEFBQ3BCLFVBQVcsQUFDWCx1QkFBeUIsQUFDekIsV0FBWSxBQUNaLGVBQWdCLEFBQ2hCLFNBQWEsQ0FDZCxBQUNELCtCQUNFLG9CQUFhLEFBQWIsV0FBYSxDQUNkLEFBQ0Qsb0NBQ0UsWUFBYyxDQUNmLEFBQ0Qsa0NBQ0UsY0FBZ0IsQ0FDakIsQUFDRCw2Q0FDRSxnQkFBa0IsQ0FDbkIsQUFDRCxtQ0FDRSxvQkFBc0IsQ0FDdkIsQUFDRCxtQ0FDRSxZQUFjLENBQ2YsQUFDRCx1QkFDRSxVQUFXLEFBQ1gsb0JBQXNCLENBQ3ZCLEFBQ0QsNkJBQ0UsWUFBYyxDQUNmLEFBQ0QsNEJBQ0UsaUJBQW1CLENBQ3BCLEFBQ0QsNkJBQ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7XG59XG4uZWtrby1saWdodGJveC1sb2FkZXIgPiBkaXYgPiBkaXY6bGFzdC1jaGlsZCB7XG4gIGFuaW1hdGlvbi1kZWxheTogLTFzO1xufVxuLm1vZGFsLWRpYWxvZyAuZWtrby1saWdodGJveC1sb2FkZXIgPiBkaXYgPiBkaXYge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjMzMzO1xufVxuQC13ZWJraXQta2V5ZnJhbWVzIHNrLWJvdW5jZSB7XG4gIDAlLFxuICAxMDAlIHtcbiAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGUoMCk7XG4gIH1cbiAgNTAlIHtcbiAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGUoMSk7XG4gIH1cbn1cbkBrZXlmcmFtZXMgc2stYm91bmNlIHtcbiAgMCUsXG4gIDEwMCUge1xuICAgIHRyYW5zZm9ybTogc2NhbGUoMCk7XG4gICAgLXdlYmtpdC10cmFuc2Zvcm06IHNjYWxlKDApO1xuICB9XG4gIDUwJSB7XG4gICAgdHJhbnNmb3JtOiBzY2FsZSgxKTtcbiAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGUoMSk7XG4gIH1cbn1cbiJdfQ== */ -------------------------------------------------------------------------------- /vendor/assets/javascripts/lightbox-bootstrap/ekko-lightbox.min.js: -------------------------------------------------------------------------------- 1 | +function(a){"use strict";function b(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var c=function(){function a(a,b){for(var c=0;c
',leftArrow:"",rightArrow:"",strings:{close:"Close",fail:"Failed to load image:",type:"Could not detect remote target type. Force the type using data-type"},doc:document,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}},g=function(){function d(c,e){var g=this;b(this,d),this._config=a.extend({},f,e),this._$modalArrows=null,this._galleryIndex=0,this._galleryName=null,this._padding=null,this._border=null,this._titleIsShown=!1,this._footerIsShown=!1,this._wantedWidth=0,this._wantedHeight=0,this._modalId="ekkoLightbox-"+Math.floor(1e3*Math.random()+1),this._$element=c instanceof jQuery?c:a(c);var h='',i='",j='',k='";a(this._config.doc.body).append('"),this._$modal=a("#"+this._modalId,this._config.doc),this._$modalDialog=this._$modal.find(".modal-dialog").first(),this._$modalContent=this._$modal.find(".modal-content").first(),this._$modalBody=this._$modal.find(".modal-body").first(),this._$modalHeader=this._$modal.find(".modal-header").first(),this._$modalFooter=this._$modal.find(".modal-footer").first(),this._$lightboxContainer=this._$modalBody.find(".ekko-lightbox-container").first(),this._$lightboxBodyOne=this._$lightboxContainer.find("> div:first-child").first(),this._$lightboxBodyTwo=this._$lightboxContainer.find("> div:last-child").first(),this._border=this._calculateBorders(),this._padding=this._calculatePadding(),this._galleryName=this._$element.data("gallery"),this._galleryName&&(this._$galleryItems=a(document.body).find('*[data-gallery="'+this._galleryName+'"]'),this._galleryIndex=this._$galleryItems.index(this._$element),a(document).on("keydown.ekkoLightbox",this._navigationalBinder.bind(this)),this._config.showArrows&&this._$galleryItems.length>1&&(this._$lightboxContainer.append('
'+this._config.leftArrow+''+this._config.rightArrow+"
"),this._$modalArrows=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay").first(),this._$lightboxContainer.on("click","a:first-child",function(a){return a.preventDefault(),g.navigateLeft()}),this._$lightboxContainer.on("click","a:last-child",function(a){return a.preventDefault(),g.navigateRight()}))),this._$modal.on("show.bs.modal",this._config.onShow.bind(this)).on("shown.bs.modal",function(){return g._toggleLoading(!0),g._handle(),g._config.onShown.call(g)}).on("hide.bs.modal",this._config.onHide.bind(this)).on("hidden.bs.modal",function(){return g._galleryName&&(a(document).off("keydown.ekkoLightbox"),a(window).off("resize.ekkoLightbox")),g._$modal.remove(),g._config.onHidden.call(g)}).modal(this._config),a(window).on("resize.ekkoLightbox",function(){g._resize(g._wantedWidth,g._wantedHeight)})}return c(d,null,[{key:"Default",get:function(){return f}}]),c(d,[{key:"element",value:function(){return this._$element}},{key:"modal",value:function(){return this._$modal}},{key:"navigateTo",value:function(b){return b<0||b>this._$galleryItems.length-1?this:(this._galleryIndex=b,this._$element=a(this._$galleryItems.get(this._galleryIndex)),void this._handle())}},{key:"navigateLeft",value:function(){if(1!==this._$galleryItems.length)return 0===this._galleryIndex?this._galleryIndex=this._$galleryItems.length-1:this._galleryIndex--,this._config.onNavigate.call(this,"left",this._galleryIndex),this.navigateTo(this._galleryIndex)}},{key:"navigateRight",value:function(){if(1!==this._$galleryItems.length)return this._galleryIndex===this._$galleryItems.length-1?this._galleryIndex=0:this._galleryIndex++,this._config.onNavigate.call(this,"right",this._galleryIndex),this.navigateTo(this._galleryIndex)}},{key:"close",value:function(){return this._$modal.modal("hide")}},{key:"_navigationalBinder",value:function(a){return a=a||window.event,39===a.keyCode?this.navigateRight():37===a.keyCode?this.navigateLeft():void 0}},{key:"_detectRemoteType",value:function(a,b){return b=b||!1,!b&&this._isImage(a)&&(b="image"),!b&&this._getYoutubeId(a)&&(b="youtube"),!b&&this._getVimeoId(a)&&(b="vimeo"),!b&&this._getInstagramId(a)&&(b="instagram"),(!b||["image","youtube","vimeo","instagram","video","url"].indexOf(b)<0)&&(b="url"),b}},{key:"_isImage",value:function(a){return a&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)}},{key:"_containerToUse",value:function(){var a=this,b=this._$lightboxBodyTwo,c=this._$lightboxBodyOne;return this._$lightboxBodyTwo.hasClass("in")&&(b=this._$lightboxBodyOne,c=this._$lightboxBodyTwo),c.removeClass("in show"),setTimeout(function(){a._$lightboxBodyTwo.hasClass("in")||a._$lightboxBodyTwo.empty(),a._$lightboxBodyOne.hasClass("in")||a._$lightboxBodyOne.empty()},500),b.addClass("in show"),b}},{key:"_handle",value:function(){var a=this._containerToUse();this._updateTitleAndFooter();var b=this._$element.attr("data-remote")||this._$element.attr("href"),c=this._detectRemoteType(b,this._$element.attr("data-type")||!1);if(["image","youtube","vimeo","instagram","video","url"].indexOf(c)<0)return this._error(this._config.strings.type);switch(c){case"image":this._preloadImage(b,a),this._preloadImageByIndex(this._galleryIndex,3);break;case"youtube":this._showYoutubeVideo(b,a);break;case"vimeo":this._showVimeoVideo(this._getVimeoId(b),a);break;case"instagram":this._showInstagramVideo(this._getInstagramId(b),a);break;case"video":this._showHtml5Video(b,a);break;default:this._loadRemoteContent(b,a)}return this}},{key:"_getYoutubeId",value:function(a){if(!a)return!1;var b=a.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return!(!b||11!==b[2].length)&&b[2]}},{key:"_getVimeoId",value:function(a){return!!(a&&a.indexOf("vimeo")>0)&&a}},{key:"_getInstagramId",value:function(a){return!!(a&&a.indexOf("instagram")>0)&&a}},{key:"_toggleLoading",value:function(b){return b=b||!1,b?(this._$modalDialog.css("display","none"),this._$modal.removeClass("in show"),a(".modal-backdrop").append(this._config.loadingMessage)):(this._$modalDialog.css("display","block"),this._$modal.addClass("in show"),a(".modal-backdrop").find(".ekko-lightbox-loader").remove()),this}},{key:"_calculateBorders",value:function(){return{top:this._totalCssByAttribute("border-top-width"),right:this._totalCssByAttribute("border-right-width"),bottom:this._totalCssByAttribute("border-bottom-width"),left:this._totalCssByAttribute("border-left-width")}}},{key:"_calculatePadding",value:function(){return{top:this._totalCssByAttribute("padding-top"),right:this._totalCssByAttribute("padding-right"),bottom:this._totalCssByAttribute("padding-bottom"),left:this._totalCssByAttribute("padding-left")}}},{key:"_totalCssByAttribute",value:function(a){return parseInt(this._$modalDialog.css(a),10)+parseInt(this._$modalContent.css(a),10)+parseInt(this._$modalBody.css(a),10)}},{key:"_updateTitleAndFooter",value:function(){var a=this._$element.data("title")||"",b=this._$element.data("footer")||"";return this._titleIsShown=!1,a||this._config.alwaysShowClose?(this._titleIsShown=!0,this._$modalHeader.css("display","").find(".modal-title").html(a||" ")):this._$modalHeader.css("display","none"),this._footerIsShown=!1,b?(this._footerIsShown=!0,this._$modalFooter.css("display","").html(b)):this._$modalFooter.css("display","none"),this}},{key:"_showYoutubeVideo",value:function(a,b){var c=this._getYoutubeId(a),d=a.indexOf("&")>0?a.substr(a.indexOf("&")):"",e=this._$element.data("width")||560,f=this._$element.data("height")||e/(560/315);return this._showVideoIframe("//www.youtube.com/embed/"+c+"?badge=0&autoplay=1&html5=1"+d,e,f,b)}},{key:"_showVimeoVideo",value:function(a,b){var c=500,d=this._$element.data("height")||c/(560/315);return this._showVideoIframe(a+"?autoplay=1",c,d,b)}},{key:"_showInstagramVideo",value:function(a,b){var c=this._$element.data("width")||612,d=c+80;return a="/"!==a.substr(-1)?a+"/":a,b.html(''),this._resize(c,d),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showVideoIframe",value:function(a,b,c,d){return c=c||b,d.html('
'),this._resize(b,c),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showHtml5Video",value:function(a,b){var c=this._$element.data("width")||560,d=this._$element.data("height")||c/(560/315);return b.html('
'),this._resize(c,d),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_loadRemoteContent",value:function(b,c){var d=this,e=this._$element.data("width")||560,f=this._$element.data("height")||560,g=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),g||this._isExternal(b)?(c.html(''),this._config.onContentLoaded.call(this)):c.load(b,a.proxy(function(){return d._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(e,f),this}},{key:"_isExternal",value:function(a){var b=a.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof b[1]&&b[1].length>0&&b[1].toLowerCase()!==location.protocol||"string"==typeof b[2]&&b[2].length>0&&b[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}},{key:"_error",value:function(a){return console.error(a),this._containerToUse().html(a),this._resize(300,300),this}},{key:"_preloadImageByIndex",value:function(b,c){if(this._$galleryItems){var d=a(this._$galleryItems.get(b),!1);if("undefined"!=typeof d){var e=d.attr("data-remote")||d.attr("href");return("image"===d.attr("data-type")||this._isImage(e))&&this._preloadImage(e,!1),c>0?this._preloadImageByIndex(b+1,c-1):void 0}}}},{key:"_preloadImage",value:function(b,c){var d=this;c=c||!1;var e=new Image;return c&&!function(){var f=setTimeout(function(){c.append(d._config.loadingMessage)},200);e.onload=function(){f&&clearTimeout(f),f=null;var b=a("");return b.attr("src",e.src),b.addClass("img-fluid"),b.css("width","100%"),c.html(b),d._$modalArrows&&d._$modalArrows.css("display",""),d._resize(e.width,e.height),d._toggleLoading(!1),d._config.onContentLoaded.call(d)},e.onerror=function(){return d._toggleLoading(!1),d._error(d._config.strings.fail+(" "+b))}}(),e.src=b,e}},{key:"_resize",value:function(b,c){c=c||b,this._wantedWidth=b,this._wantedHeight=c;var d=this._padding.left+this._padding.right+this._border.left+this._border.right,e=Math.min(b+d,this._config.doc.body.clientWidth);b+d>e?(c=(e-d)/b*c,b=e):b+=d;var f=0,g=0;this._footerIsShown&&(g=this._$modalFooter.outerHeight(!0)||55),this._titleIsShown&&(f=this._$modalHeader.outerHeight(!0)||67);var h=this._padding.top+this._padding.bottom+this._border.bottom+this._border.top,i=parseFloat(this._$modalDialog.css("margin-top"))+parseFloat(this._$modalDialog.css("margin-bottom")),j=Math.min(c,a(window).height()-h-i-f-g);if(c>j){var k=Math.min(j/c,1);b=Math.ceil(k*b)}this._$lightboxContainer.css("height",j),this._$modalDialog.css("width","auto").css("maxWidth",b);try{this._$modal.data("bs.modal")._handleUpdate()}catch(l){this._$modal.data("bs.modal").handleUpdate()}return this}}],[{key:"_jQueryInterface",value:function(b){var c=this;return b=b||{},this.each(function(){var e=a(c),f=a.extend({},d.Default,e.data(),"object"==typeof b&&b);new d(c,f)})}}]),d}();return a.fn[d]=g._jQueryInterface,a.fn[d].Constructor=g,a.fn[d].noConflict=function(){return a.fn[d]=e,g._jQueryInterface},g})(jQuery)}(jQuery); 2 | //# sourceMappingURL=ekko-lightbox.min.js.map -------------------------------------------------------------------------------- /vendor/assets/javascripts/lightbox-bootstrap/ekko-lightbox.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["ekko-lightbox.js"],"names":["$","_classCallCheck","instance","Constructor","TypeError","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","protoProps","staticProps","prototype","NAME","JQUERY_NO_CONFLICT","fn","Default","title","footer","showArrows","type","alwaysShowClose","loadingMessage","leftArrow","rightArrow","strings","close","fail","doc","document","onShow","onShown","onHide","onHidden","onNavigate","onContentLoaded","Lightbox","$element","config","_this","this","_config","extend","_$modalArrows","_galleryIndex","_galleryName","_padding","_border","_titleIsShown","_footerIsShown","_wantedWidth","_wantedHeight","_modalId","Math","floor","random","_$element","jQuery","header","body","dialog","append","_$modal","_$modalDialog","find","first","_$modalContent","_$modalBody","_$modalHeader","_$modalFooter","_$lightboxContainer","_$lightboxBodyOne","_$lightboxBodyTwo","_calculateBorders","_calculatePadding","data","_$galleryItems","index","on","_navigationalBinder","bind","event","preventDefault","navigateLeft","navigateRight","_toggleLoading","_handle","call","off","window","remove","modal","_resize","get","value","navigateTo","keyCode","src","_isImage","_getYoutubeId","_getVimeoId","_getInstagramId","indexOf","string","match","_this2","$toUse","$current","hasClass","removeClass","setTimeout","empty","addClass","_containerToUse","_updateTitleAndFooter","currentRemote","attr","currentType","_detectRemoteType","_error","_preloadImage","_preloadImageByIndex","_showYoutubeVideo","_showVimeoVideo","_showInstagramVideo","_showHtml5Video","_loadRemoteContent","matches","show","css","top","_totalCssByAttribute","right","bottom","left","attribute","parseInt","caption","html","remote","$containerForElement","id","query","substr","width","height","_showVideoIframe","url","_this3","disableExternalCheck","_isExternal","load","proxy","trigger","toLowerCase","location","protocol","replace","RegExp","http:","https:","host","message","console","error","startIndex","numberOfTimes","next","$containerForImage","_this4","img","Image","loadingTimeout","onload","clearTimeout","image","onerror","widthBorderAndPadding","maxWidth","min","clientWidth","headerHeight","footerHeight","outerHeight","borderPadding","margins","parseFloat","maxHeight","factor","ceil","_handleUpdate","e","handleUpdate","_this5","each","$this","_jQueryInterface","noConflict"],"mappings":"CAMC,SAAUA,GAEX,YAIA,SAASC,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCAFhH,GAAIC,GAAe,WAAe,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,GAAIE,GAAaH,EAAMC,EAAIE,GAAWC,WAAaD,EAAWC,aAAc,EAAOD,EAAWE,cAAe,EAAU,SAAWF,KAAYA,EAAWG,UAAW,GAAMC,OAAOC,eAAeT,EAAQI,EAAWM,IAAKN,IAAiB,MAAO,UAAUR,EAAae,EAAYC,GAAiJ,MAA9HD,IAAYZ,EAAiBH,EAAYiB,UAAWF,GAAiBC,GAAab,EAAiBH,EAAagB,GAAqBhB,OAIlhB,SAAWH,GAEzB,GAAIqB,GAAO,eACPC,EAAqBtB,EAAEuB,GAAGF,GAE1BG,GACHC,MAAO,GACPC,OAAQ,GACRC,YAAY,EACZC,KAAM,KACNC,iBAAiB,EACjBC,eAAgB,4EAChBC,UAAW,wBACXC,WAAY,wBACZC,SACCC,MAAO,QACPC,KAAM,wBACNP,KAAM,uEAEPQ,IAAKC,SACLC,OAAQ,aACRC,QAAS,aACTC,OAAQ,aACRC,SAAU,aACVC,WAAY,aACZC,gBAAiB,cAGdC,EAAW,WA8Bd,QAASA,GAASC,EAAUC,GAC3B,GAAIC,GAAQC,IAEZ/C,GAAgB+C,KAAMJ,GAEtBI,KAAKC,QAAUjD,EAAEkD,UAAW1B,EAASsB,GACrCE,KAAKG,cAAgB,KACrBH,KAAKI,cAAgB,EACrBJ,KAAKK,aAAe,KACpBL,KAAKM,SAAW,KAChBN,KAAKO,QAAU,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B,cAAcmH,aAAY,IAAS,GAE/E,IAAIC,GAAgBhJ,KAAKM,SAASoF,IAAM1F,KAAKM,SAASuF,OAAS7F,KAAKO,QAAQsF,OAAS7F,KAAKO,QAAQmF,IAG9FuD,EAAUC,WAAWlJ,KAAKuB,cAAckE,IAAI,eAAiByD,WAAWlJ,KAAKuB,cAAckE,IAAI,kBAE/F0D,EAAYtI,KAAK8H,IAAIlC,EAAQzJ,EAAEiG,QAAQwD,SAAWuC,EAAgBC,EAAUJ,EAAeC,EAC/F,IAAIrC,EAAS0C,EAAW,CAEvB,GAAIC,GAASvI,KAAK8H,IAAIQ,EAAY1C,EAAQ,EAC1CD,GAAQ3F,KAAKwI,KAAKD,EAAS5C,GAG5BxG,KAAK8B,oBAAoB2D,IAAI,SAAU0D,GACvCnJ,KAAKuB,cAAckE,IAAI,QAAS,QAAQA,IAAI,WAAYe,EAExD,KAECxG,KAAKsB,QAAQa,KAAK,YAAYmH,gBAC7B,MAAOC,GACRvJ,KAAKsB,QAAQa,KAAK,YAAYqH,eAE/B,MAAOxJ,WAGR/B,IAAK,mBACLqF,MAAO,SAA0BxD,GAChC,GAAI2J,GAASzJ,IAGb,OADAF,GAASA,MACFE,KAAK0J,KAAK,WAChB,GAAIC,GAAQ3M,EAAEyM,GACVxJ,EAAUjD,EAAEkD,UAAWN,EAASpB,QAASmL,EAAMxH,OAA0B,gBAAXrC,IAAuBA,EAEzF,IAAIF,GAAS6J,EAAQxJ,SAKjBL,IAUR,OAPA5C,GAAEuB,GAAGF,GAAQuB,EAASgK,iBACtB5M,EAAEuB,GAAGF,GAAMlB,YAAcyC,EACzB5C,EAAEuB,GAAGF,GAAMwL,WAAa,WAEvB,MADA7M,GAAEuB,GAAGF,GAAQC,EACNsB,EAASgK,kBAGVhK,IACLqB,SAGDA","file":"ekko-lightbox.min.js"} -------------------------------------------------------------------------------- /vendor/assets/javascripts/lightbox-bootstrap/ekko-lightbox.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Lightbox for Bootstrap by @ashleydw 3 | * https://github.com/ashleydw/lightbox 4 | * 5 | * License: https://github.com/ashleydw/lightbox/blob/master/LICENSE 6 | */ 7 | +function ($) { 8 | 9 | 'use strict'; 10 | 11 | var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); 12 | 13 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } 14 | 15 | var Lightbox = (function ($) { 16 | 17 | var NAME = 'ekkoLightbox'; 18 | var JQUERY_NO_CONFLICT = $.fn[NAME]; 19 | 20 | var Default = { 21 | title: '', 22 | footer: '', 23 | showArrows: true, //display the left / right arrows or not 24 | type: null, //force the lightbox into image / youtube mode. if null, or not image|youtube|vimeo; detect it 25 | alwaysShowClose: false, //always show the close button, even if there is no title 26 | loadingMessage: '
', // http://tobiasahlin.com/spinkit/ 27 | leftArrow: '', 28 | rightArrow: '', 29 | strings: { 30 | close: 'Close', 31 | fail: 'Failed to load image:', 32 | type: 'Could not detect remote target type. Force the type using data-type' 33 | }, 34 | doc: document, // if in an iframe can specify top.document 35 | onShow: function onShow() {}, 36 | onShown: function onShown() {}, 37 | onHide: function onHide() {}, 38 | onHidden: function onHidden() {}, 39 | onNavigate: function onNavigate() {}, 40 | onContentLoaded: function onContentLoaded() {} 41 | }; 42 | 43 | var Lightbox = (function () { 44 | _createClass(Lightbox, null, [{ 45 | key: 'Default', 46 | 47 | /** 48 | Class properties: 49 | _$element: null -> the element currently being displayed 50 | _$modal: The bootstrap modal generated 51 | _$modalDialog: The .modal-dialog 52 | _$modalContent: The .modal-content 53 | _$modalBody: The .modal-body 54 | _$modalHeader: The .modal-header 55 | _$modalFooter: The .modal-footer 56 | _$lightboxContainerOne: Container of the first lightbox element 57 | _$lightboxContainerTwo: Container of the second lightbox element 58 | _$lightboxBody: First element in the container 59 | _$modalArrows: The overlayed arrows container 60 | _$galleryItems: Other 's available for this gallery 61 | _galleryName: Name of the current data('gallery') showing 62 | _galleryIndex: The current index of the _$galleryItems being shown 63 | _config: {} the options for the modal 64 | _modalId: unique id for the current lightbox 65 | _padding / _border: CSS properties for the modal container; these are used to calculate the available space for the content 66 | */ 67 | 68 | get: function get() { 69 | return Default; 70 | } 71 | }]); 72 | 73 | function Lightbox($element, config) { 74 | var _this = this; 75 | 76 | _classCallCheck(this, Lightbox); 77 | 78 | this._config = $.extend({}, Default, config); 79 | this._$modalArrows = null; 80 | this._galleryIndex = 0; 81 | this._galleryName = null; 82 | this._padding = null; 83 | this._border = null; 84 | this._titleIsShown = false; 85 | this._footerIsShown = false; 86 | this._wantedWidth = 0; 87 | this._wantedHeight = 0; 88 | this._modalId = 'ekkoLightbox-' + Math.floor(Math.random() * 1000 + 1); 89 | this._$element = $element instanceof jQuery ? $element : $($element); 90 | 91 | var header = ''; 92 | var footer = ''; 93 | var body = ''; 94 | var dialog = ''; 95 | $(this._config.doc.body).append(''); 96 | 97 | this._$modal = $('#' + this._modalId, this._config.doc); 98 | this._$modalDialog = this._$modal.find('.modal-dialog').first(); 99 | this._$modalContent = this._$modal.find('.modal-content').first(); 100 | this._$modalBody = this._$modal.find('.modal-body').first(); 101 | this._$modalHeader = this._$modal.find('.modal-header').first(); 102 | this._$modalFooter = this._$modal.find('.modal-footer').first(); 103 | 104 | this._$lightboxContainer = this._$modalBody.find('.ekko-lightbox-container').first(); 105 | this._$lightboxBodyOne = this._$lightboxContainer.find('> div:first-child').first(); 106 | this._$lightboxBodyTwo = this._$lightboxContainer.find('> div:last-child').first(); 107 | 108 | this._border = this._calculateBorders(); 109 | this._padding = this._calculatePadding(); 110 | 111 | this._galleryName = this._$element.data('gallery'); 112 | if (this._galleryName) { 113 | this._$galleryItems = $(document.body).find('*[data-gallery="' + this._galleryName + '"]'); 114 | this._galleryIndex = this._$galleryItems.index(this._$element); 115 | $(document).on('keydown.ekkoLightbox', this._navigationalBinder.bind(this)); 116 | 117 | // add the directional arrows to the modal 118 | if (this._config.showArrows && this._$galleryItems.length > 1) { 119 | this._$lightboxContainer.append('
' + this._config.leftArrow + '' + this._config.rightArrow + '
'); 120 | this._$modalArrows = this._$lightboxContainer.find('div.ekko-lightbox-nav-overlay').first(); 121 | this._$lightboxContainer.on('click', 'a:first-child', function (event) { 122 | event.preventDefault(); 123 | return _this.navigateLeft(); 124 | }); 125 | this._$lightboxContainer.on('click', 'a:last-child', function (event) { 126 | event.preventDefault(); 127 | return _this.navigateRight(); 128 | }); 129 | } 130 | } 131 | 132 | this._$modal.on('show.bs.modal', this._config.onShow.bind(this)).on('shown.bs.modal', function () { 133 | _this._toggleLoading(true); 134 | _this._handle(); 135 | return _this._config.onShown.call(_this); 136 | }).on('hide.bs.modal', this._config.onHide.bind(this)).on('hidden.bs.modal', function () { 137 | if (_this._galleryName) { 138 | $(document).off('keydown.ekkoLightbox'); 139 | $(window).off('resize.ekkoLightbox'); 140 | } 141 | _this._$modal.remove(); 142 | return _this._config.onHidden.call(_this); 143 | }).modal(this._config); 144 | 145 | $(window).on('resize.ekkoLightbox', function () { 146 | _this._resize(_this._wantedWidth, _this._wantedHeight); 147 | }); 148 | } 149 | 150 | _createClass(Lightbox, [{ 151 | key: 'element', 152 | value: function element() { 153 | return this._$element; 154 | } 155 | }, { 156 | key: 'modal', 157 | value: function modal() { 158 | return this._$modal; 159 | } 160 | }, { 161 | key: 'navigateTo', 162 | value: function navigateTo(index) { 163 | 164 | if (index < 0 || index > this._$galleryItems.length - 1) return this; 165 | 166 | this._galleryIndex = index; 167 | 168 | this._$element = $(this._$galleryItems.get(this._galleryIndex)); 169 | this._handle(); 170 | } 171 | }, { 172 | key: 'navigateLeft', 173 | value: function navigateLeft() { 174 | 175 | if (this._$galleryItems.length === 1) return; 176 | 177 | if (this._galleryIndex === 0) this._galleryIndex = this._$galleryItems.length - 1;else //circular 178 | this._galleryIndex--; 179 | 180 | this._config.onNavigate.call(this, 'left', this._galleryIndex); 181 | return this.navigateTo(this._galleryIndex); 182 | } 183 | }, { 184 | key: 'navigateRight', 185 | value: function navigateRight() { 186 | 187 | if (this._$galleryItems.length === 1) return; 188 | 189 | if (this._galleryIndex === this._$galleryItems.length - 1) this._galleryIndex = 0;else //circular 190 | this._galleryIndex++; 191 | 192 | this._config.onNavigate.call(this, 'right', this._galleryIndex); 193 | return this.navigateTo(this._galleryIndex); 194 | } 195 | }, { 196 | key: 'close', 197 | value: function close() { 198 | return this._$modal.modal('hide'); 199 | } 200 | 201 | // helper private methods 202 | }, { 203 | key: '_navigationalBinder', 204 | value: function _navigationalBinder(event) { 205 | event = event || window.event; 206 | if (event.keyCode === 39) return this.navigateRight(); 207 | if (event.keyCode === 37) return this.navigateLeft(); 208 | } 209 | 210 | // type detection private methods 211 | }, { 212 | key: '_detectRemoteType', 213 | value: function _detectRemoteType(src, type) { 214 | 215 | type = type || false; 216 | 217 | if (!type && this._isImage(src)) type = 'image'; 218 | if (!type && this._getYoutubeId(src)) type = 'youtube'; 219 | if (!type && this._getVimeoId(src)) type = 'vimeo'; 220 | if (!type && this._getInstagramId(src)) type = 'instagram'; 221 | 222 | if (!type || ['image', 'youtube', 'vimeo', 'instagram', 'video', 'url'].indexOf(type) < 0) type = 'url'; 223 | 224 | return type; 225 | } 226 | }, { 227 | key: '_isImage', 228 | value: function _isImage(string) { 229 | return string && string.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); 230 | } 231 | }, { 232 | key: '_containerToUse', 233 | value: function _containerToUse() { 234 | var _this2 = this; 235 | 236 | // if currently showing an image, fade it out and remove 237 | var $toUse = this._$lightboxBodyTwo; 238 | var $current = this._$lightboxBodyOne; 239 | 240 | if (this._$lightboxBodyTwo.hasClass('in')) { 241 | $toUse = this._$lightboxBodyOne; 242 | $current = this._$lightboxBodyTwo; 243 | } 244 | 245 | $current.removeClass('in show'); 246 | setTimeout(function () { 247 | if (!_this2._$lightboxBodyTwo.hasClass('in')) _this2._$lightboxBodyTwo.empty(); 248 | if (!_this2._$lightboxBodyOne.hasClass('in')) _this2._$lightboxBodyOne.empty(); 249 | }, 500); 250 | 251 | $toUse.addClass('in show'); 252 | return $toUse; 253 | } 254 | }, { 255 | key: '_handle', 256 | value: function _handle() { 257 | 258 | var $toUse = this._containerToUse(); 259 | this._updateTitleAndFooter(); 260 | 261 | var currentRemote = this._$element.attr('data-remote') || this._$element.attr('href'); 262 | var currentType = this._detectRemoteType(currentRemote, this._$element.attr('data-type') || false); 263 | 264 | if (['image', 'youtube', 'vimeo', 'instagram', 'video', 'url'].indexOf(currentType) < 0) return this._error(this._config.strings.type); 265 | 266 | switch (currentType) { 267 | case 'image': 268 | this._preloadImage(currentRemote, $toUse); 269 | this._preloadImageByIndex(this._galleryIndex, 3); 270 | break; 271 | case 'youtube': 272 | this._showYoutubeVideo(currentRemote, $toUse); 273 | break; 274 | case 'vimeo': 275 | this._showVimeoVideo(this._getVimeoId(currentRemote), $toUse); 276 | break; 277 | case 'instagram': 278 | this._showInstagramVideo(this._getInstagramId(currentRemote), $toUse); 279 | break; 280 | case 'video': 281 | this._showHtml5Video(currentRemote, $toUse); 282 | break; 283 | default: 284 | // url 285 | this._loadRemoteContent(currentRemote, $toUse); 286 | break; 287 | } 288 | 289 | return this; 290 | } 291 | }, { 292 | key: '_getYoutubeId', 293 | value: function _getYoutubeId(string) { 294 | if (!string) return false; 295 | var matches = string.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/); 296 | return matches && matches[2].length === 11 ? matches[2] : false; 297 | } 298 | }, { 299 | key: '_getVimeoId', 300 | value: function _getVimeoId(string) { 301 | return string && string.indexOf('vimeo') > 0 ? string : false; 302 | } 303 | }, { 304 | key: '_getInstagramId', 305 | value: function _getInstagramId(string) { 306 | return string && string.indexOf('instagram') > 0 ? string : false; 307 | } 308 | 309 | // layout private methods 310 | }, { 311 | key: '_toggleLoading', 312 | value: function _toggleLoading(show) { 313 | show = show || false; 314 | if (show) { 315 | this._$modalDialog.css('display', 'none'); 316 | this._$modal.removeClass('in show'); 317 | $('.modal-backdrop').append(this._config.loadingMessage); 318 | } else { 319 | this._$modalDialog.css('display', 'block'); 320 | this._$modal.addClass('in show'); 321 | $('.modal-backdrop').find('.ekko-lightbox-loader').remove(); 322 | } 323 | return this; 324 | } 325 | }, { 326 | key: '_calculateBorders', 327 | value: function _calculateBorders() { 328 | return { 329 | top: this._totalCssByAttribute('border-top-width'), 330 | right: this._totalCssByAttribute('border-right-width'), 331 | bottom: this._totalCssByAttribute('border-bottom-width'), 332 | left: this._totalCssByAttribute('border-left-width') 333 | }; 334 | } 335 | }, { 336 | key: '_calculatePadding', 337 | value: function _calculatePadding() { 338 | return { 339 | top: this._totalCssByAttribute('padding-top'), 340 | right: this._totalCssByAttribute('padding-right'), 341 | bottom: this._totalCssByAttribute('padding-bottom'), 342 | left: this._totalCssByAttribute('padding-left') 343 | }; 344 | } 345 | }, { 346 | key: '_totalCssByAttribute', 347 | value: function _totalCssByAttribute(attribute) { 348 | return parseInt(this._$modalDialog.css(attribute), 10) + parseInt(this._$modalContent.css(attribute), 10) + parseInt(this._$modalBody.css(attribute), 10); 349 | } 350 | }, { 351 | key: '_updateTitleAndFooter', 352 | value: function _updateTitleAndFooter() { 353 | var title = this._$element.data('title') || ""; 354 | var caption = this._$element.data('footer') || ""; 355 | 356 | this._titleIsShown = false; 357 | if (title || this._config.alwaysShowClose) { 358 | this._titleIsShown = true; 359 | this._$modalHeader.css('display', '').find('.modal-title').html(title || " "); 360 | } else this._$modalHeader.css('display', 'none'); 361 | 362 | this._footerIsShown = false; 363 | if (caption) { 364 | this._footerIsShown = true; 365 | this._$modalFooter.css('display', '').html(caption); 366 | } else this._$modalFooter.css('display', 'none'); 367 | 368 | return this; 369 | } 370 | }, { 371 | key: '_showYoutubeVideo', 372 | value: function _showYoutubeVideo(remote, $containerForElement) { 373 | var id = this._getYoutubeId(remote); 374 | var query = remote.indexOf('&') > 0 ? remote.substr(remote.indexOf('&')) : ''; 375 | var width = this._$element.data('width') || 560; 376 | var height = this._$element.data('height') || width / (560 / 315); 377 | return this._showVideoIframe('//www.youtube.com/embed/' + id + '?badge=0&autoplay=1&html5=1' + query, width, height, $containerForElement); 378 | } 379 | }, { 380 | key: '_showVimeoVideo', 381 | value: function _showVimeoVideo(id, $containerForElement) { 382 | var width = 500; 383 | var height = this._$element.data('height') || width / (560 / 315); 384 | return this._showVideoIframe(id + '?autoplay=1', width, height, $containerForElement); 385 | } 386 | }, { 387 | key: '_showInstagramVideo', 388 | value: function _showInstagramVideo(id, $containerForElement) { 389 | // instagram load their content into iframe's so this can be put straight into the element 390 | var width = this._$element.data('width') || 612; 391 | var height = width + 80; 392 | id = id.substr(-1) !== '/' ? id + '/' : id; // ensure id has trailing slash 393 | $containerForElement.html(''); 394 | this._resize(width, height); 395 | this._config.onContentLoaded.call(this); 396 | if (this._$modalArrows) //hide the arrows when showing video 397 | this._$modalArrows.css('display', 'none'); 398 | this._toggleLoading(false); 399 | return this; 400 | } 401 | }, { 402 | key: '_showVideoIframe', 403 | value: function _showVideoIframe(url, width, height, $containerForElement) { 404 | // should be used for videos only. for remote content use loadRemoteContent (data-type=url) 405 | height = height || width; // default to square 406 | $containerForElement.html('
'); 407 | this._resize(width, height); 408 | this._config.onContentLoaded.call(this); 409 | if (this._$modalArrows) this._$modalArrows.css('display', 'none'); //hide the arrows when showing video 410 | this._toggleLoading(false); 411 | return this; 412 | } 413 | }, { 414 | key: '_showHtml5Video', 415 | value: function _showHtml5Video(url, $containerForElement) { 416 | // should be used for videos only. for remote content use loadRemoteContent (data-type=url) 417 | var width = this._$element.data('width') || 560; 418 | var height = this._$element.data('height') || width / (560 / 315); 419 | $containerForElement.html('
'); 420 | this._resize(width, height); 421 | this._config.onContentLoaded.call(this); 422 | if (this._$modalArrows) this._$modalArrows.css('display', 'none'); //hide the arrows when showing video 423 | this._toggleLoading(false); 424 | return this; 425 | } 426 | }, { 427 | key: '_loadRemoteContent', 428 | value: function _loadRemoteContent(url, $containerForElement) { 429 | var _this3 = this; 430 | 431 | var width = this._$element.data('width') || 560; 432 | var height = this._$element.data('height') || 560; 433 | 434 | var disableExternalCheck = this._$element.data('disableExternalCheck') || false; 435 | this._toggleLoading(false); 436 | 437 | // external urls are loading into an iframe 438 | // local ajax can be loaded into the container itself 439 | if (!disableExternalCheck && !this._isExternal(url)) { 440 | $containerForElement.load(url, $.proxy(function () { 441 | return _this3._$element.trigger('loaded.bs.modal');l; 442 | })); 443 | } else { 444 | $containerForElement.html(''); 445 | this._config.onContentLoaded.call(this); 446 | } 447 | 448 | if (this._$modalArrows) //hide the arrows when remote content 449 | this._$modalArrows.css('display', 'none'); 450 | 451 | this._resize(width, height); 452 | return this; 453 | } 454 | }, { 455 | key: '_isExternal', 456 | value: function _isExternal(url) { 457 | var match = url.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/); 458 | if (typeof match[1] === "string" && match[1].length > 0 && match[1].toLowerCase() !== location.protocol) return true; 459 | 460 | if (typeof match[2] === "string" && match[2].length > 0 && match[2].replace(new RegExp(':(' + ({ 461 | "http:": 80, 462 | "https:": 443 463 | })[location.protocol] + ')?$'), "") !== location.host) return true; 464 | 465 | return false; 466 | } 467 | }, { 468 | key: '_error', 469 | value: function _error(message) { 470 | console.error(message); 471 | this._containerToUse().html(message); 472 | this._resize(300, 300); 473 | return this; 474 | } 475 | }, { 476 | key: '_preloadImageByIndex', 477 | value: function _preloadImageByIndex(startIndex, numberOfTimes) { 478 | 479 | if (!this._$galleryItems) return; 480 | 481 | var next = $(this._$galleryItems.get(startIndex), false); 482 | if (typeof next == 'undefined') return; 483 | 484 | var src = next.attr('data-remote') || next.attr('href'); 485 | if (next.attr('data-type') === 'image' || this._isImage(src)) this._preloadImage(src, false); 486 | 487 | if (numberOfTimes > 0) return this._preloadImageByIndex(startIndex + 1, numberOfTimes - 1); 488 | } 489 | }, { 490 | key: '_preloadImage', 491 | value: function _preloadImage(src, $containerForImage) { 492 | var _this4 = this; 493 | 494 | $containerForImage = $containerForImage || false; 495 | 496 | var img = new Image(); 497 | if ($containerForImage) { 498 | (function () { 499 | 500 | // if loading takes > 200ms show a loader 501 | var loadingTimeout = setTimeout(function () { 502 | $containerForImage.append(_this4._config.loadingMessage); 503 | }, 200); 504 | 505 | img.onload = function () { 506 | if (loadingTimeout) clearTimeout(loadingTimeout); 507 | loadingTimeout = null; 508 | var image = $(''); 509 | image.attr('src', img.src); 510 | image.addClass('img-fluid'); 511 | 512 | // backward compatibility for bootstrap v3 513 | image.css('width', '100%'); 514 | 515 | $containerForImage.html(image); 516 | if (_this4._$modalArrows) _this4._$modalArrows.css('display', ''); // remove display to default to css property 517 | 518 | _this4._resize(img.width, img.height); 519 | _this4._toggleLoading(false); 520 | return _this4._config.onContentLoaded.call(_this4); 521 | }; 522 | img.onerror = function () { 523 | _this4._toggleLoading(false); 524 | return _this4._error(_this4._config.strings.fail + (' ' + src)); 525 | }; 526 | })(); 527 | } 528 | 529 | img.src = src; 530 | return img; 531 | } 532 | }, { 533 | key: '_resize', 534 | value: function _resize(width, height) { 535 | 536 | height = height || width; 537 | this._wantedWidth = width; 538 | this._wantedHeight = height; 539 | 540 | // if width > the available space, scale down the expected width and height 541 | var widthBorderAndPadding = this._padding.left + this._padding.right + this._border.left + this._border.right; 542 | var maxWidth = Math.min(width + widthBorderAndPadding, this._config.doc.body.clientWidth); 543 | if (width + widthBorderAndPadding > maxWidth) { 544 | height = (maxWidth - widthBorderAndPadding) / width * height; 545 | width = maxWidth; 546 | } else width = width + widthBorderAndPadding; 547 | 548 | var headerHeight = 0, 549 | footerHeight = 0; 550 | 551 | // as the resize is performed the modal is show, the calculate might fail 552 | // if so, default to the default sizes 553 | if (this._footerIsShown) footerHeight = this._$modalFooter.outerHeight(true) || 55; 554 | 555 | if (this._titleIsShown) headerHeight = this._$modalHeader.outerHeight(true) || 67; 556 | 557 | var borderPadding = this._padding.top + this._padding.bottom + this._border.bottom + this._border.top; 558 | 559 | //calculated each time as resizing the window can cause them to change due to Bootstraps fluid margins 560 | var margins = parseFloat(this._$modalDialog.css('margin-top')) + parseFloat(this._$modalDialog.css('margin-bottom')); 561 | 562 | var maxHeight = Math.min(height, $(window).height() - borderPadding - margins - headerHeight - footerHeight); 563 | if (height > maxHeight) { 564 | // if height > the available height, scale down the width 565 | var factor = Math.min(maxHeight / height, 1); 566 | width = Math.ceil(factor * width); 567 | } 568 | 569 | this._$lightboxContainer.css('height', maxHeight); 570 | this._$modalDialog.css('width', 'auto').css('maxWidth', width); 571 | 572 | try { 573 | // v4 method is mistakenly protected 574 | this._$modal.data('bs.modal')._handleUpdate(); 575 | } catch (e) { 576 | this._$modal.data('bs.modal').handleUpdate(); 577 | } 578 | return this; 579 | } 580 | }], [{ 581 | key: '_jQueryInterface', 582 | value: function _jQueryInterface(config) { 583 | var _this5 = this; 584 | 585 | config = config || {}; 586 | return this.each(function () { 587 | var $this = $(_this5); 588 | var _config = $.extend({}, Lightbox.Default, $this.data(), typeof config === 'object' && config); 589 | 590 | new Lightbox(_this5, _config); 591 | }); 592 | } 593 | }]); 594 | 595 | return Lightbox; 596 | })(); 597 | 598 | $.fn[NAME] = Lightbox._jQueryInterface; 599 | $.fn[NAME].Constructor = Lightbox; 600 | $.fn[NAME].noConflict = function () { 601 | $.fn[NAME] = JQUERY_NO_CONFLICT; 602 | return Lightbox._jQueryInterface; 603 | }; 604 | 605 | return Lightbox; 606 | })(jQuery); 607 | //# sourceMappingURL=ekko-lightbox.js.map 608 | 609 | }(jQuery); 610 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/lightbox-bootstrap/ekko-lightbox.js.map: -------------------------------------------------------------------------------- 1 | {"version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,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAA;AACjC,EAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAM;AAC9B,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,SAAO,QAAQ,CAAC,gBAAgB,CAAA;EAChC,CAAA;;AAED,QAAO,QAAQ,CAAA;CAEf,CAAA,CAAE,MAAM,CAAC,CAAA","file":"ekko-lightbox.js","sourcesContent":["const Lightbox = (($) => {\n\n\tconst NAME = 'ekkoLightbox'\n\tconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\n\tconst Default = {\n\t\ttitle: '',\n\t\tfooter: '',\n\t\tshowArrows: true, //display the left / right arrows or not\n\t\ttype: null, //force the lightbox into image / youtube mode. if null, or not image|youtube|vimeo; detect it\n\t\talwaysShowClose: false, //always show the close button, even if there is no title\n\t\tloadingMessage: '
', // http://tobiasahlin.com/spinkit/\n\t\tleftArrow: '',\n\t\trightArrow: '',\n\t\tstrings: {\n\t\t\tclose: 'Close',\n\t\t\tfail: 'Failed to load image:',\n\t\t\ttype: 'Could not detect remote target type. Force the type using data-type',\n\t\t},\n\t\tdoc: document, // if in an iframe can specify top.document\n\t\tonShow() {},\n\t\tonShown() {},\n\t\tonHide() {},\n\t\tonHidden() {},\n\t\tonNavigate() {},\n\t\tonContentLoaded() {}\n\t}\n\n\tclass Lightbox {\n\n\t\t/**\n\n\t Class properties:\n\n\t\t _$element: null -> the element currently being displayed\n\t\t _$modal: The bootstrap modal generated\n\t\t _$modalDialog: The .modal-dialog\n\t\t _$modalContent: The .modal-content\n\t\t _$modalBody: The .modal-body\n\t\t _$modalHeader: The .modal-header\n\t\t _$modalFooter: The .modal-footer\n\t\t _$lightboxContainerOne: Container of the first lightbox element\n\t\t _$lightboxContainerTwo: Container of the second lightbox element\n\t\t _$lightboxBody: First element in the container\n\t\t _$modalArrows: The overlayed arrows container\n\n\t\t _$galleryItems: Other 's available for this gallery\n\t\t _galleryName: Name of the current data('gallery') showing\n\t\t _galleryIndex: The current index of the _$galleryItems being shown\n\n\t\t _config: {} the options for the modal\n\t\t _modalId: unique id for the current lightbox\n\t\t _padding / _border: CSS properties for the modal container; these are used to calculate the available space for the content\n\n\t\t */\n\n\t\tstatic get Default() {\n\t\t\treturn Default\n\t\t}\n\n\t\tconstructor($element, config) {\n\t\t\tthis._config = $.extend({}, Default, config)\n\t\t\tthis._$modalArrows = null\n\t\t\tthis._galleryIndex = 0\n\t\t\tthis._galleryName = null\n\t\t\tthis._padding = null\n\t\t\tthis._border = null\n\t\t\tthis._titleIsShown = false\n\t\t\tthis._footerIsShown = false\n\t\t\tthis._wantedWidth = 0\n\t\t\tthis._wantedHeight = 0\n\t\t\tthis._modalId = `ekkoLightbox-${Math.floor((Math.random() * 1000) + 1)}`;\n\t\t\tthis._$element = $element instanceof jQuery ? $element : $($element)\n\n\t\t\tlet header = `

${this._config.title || \" \"}

`;\n\t\t\tlet footer = `
${this._config.footer || \" \"}
`;\n\t\t\tlet body = '
'\n\t\t\tlet dialog = `
${header}${body}${footer}
`\n\t\t\t$(this._config.doc.body).append(`
${dialog}
`)\n\n\t\t\tthis._$modal = $(`#${this._modalId}`, this._config.doc)\n\t\t\tthis._$modalDialog = this._$modal.find('.modal-dialog').first()\n\t\t\tthis._$modalContent = this._$modal.find('.modal-content').first()\n\t\t\tthis._$modalBody = this._$modal.find('.modal-body').first()\n\t\t\tthis._$modalHeader = this._$modal.find('.modal-header').first()\n\t\t\tthis._$modalFooter = this._$modal.find('.modal-footer').first()\n\n\t\t\tthis._$lightboxContainer = this._$modalBody.find('.ekko-lightbox-container').first()\n\t\t\tthis._$lightboxBodyOne = this._$lightboxContainer.find('> div:first-child').first()\n\t\t\tthis._$lightboxBodyTwo = this._$lightboxContainer.find('> div:last-child').first()\n\n\t\t\tthis._border = this._calculateBorders()\n\t\t\tthis._padding = this._calculatePadding()\n\n\t\t\tthis._galleryName = this._$element.data('gallery')\n\t\t\tif (this._galleryName) {\n\t\t\t\tthis._$galleryItems = $(document.body).find(`*[data-gallery=\"${this._galleryName}\"]`)\n\t\t\t\tthis._galleryIndex = this._$galleryItems.index(this._$element)\n\t\t\t\t$(document).on('keydown.ekkoLightbox', this._navigationalBinder.bind(this))\n\n\t\t\t\t// add the directional arrows to the modal\n\t\t\t\tif (this._config.showArrows && this._$galleryItems.length > 1) {\n\t\t\t\t\tthis._$lightboxContainer.append(`
${this._config.leftArrow}${this._config.rightArrow}
`)\n\t\t\t\t\tthis._$modalArrows = this._$lightboxContainer.find('div.ekko-lightbox-nav-overlay').first()\n\t\t\t\t\tthis._$lightboxContainer.on('click', 'a:first-child', event => {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn this.navigateLeft()\n\t\t\t\t\t})\n\t\t\t\t\tthis._$lightboxContainer.on('click', 'a:last-child', event => {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn this.navigateRight()\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._$modal\n\t\t\t.on('show.bs.modal', this._config.onShow.bind(this))\n\t\t\t.on('shown.bs.modal', () => {\n\t\t\t\tthis._toggleLoading(true)\n\t\t\t\tthis._handle()\n\t\t\t\treturn this._config.onShown.call(this)\n\t\t\t})\n\t\t\t.on('hide.bs.modal', this._config.onHide.bind(this))\n\t\t\t.on('hidden.bs.modal', () => {\n\t\t\t\tif (this._galleryName) {\n\t\t\t\t\t$(document).off('keydown.ekkoLightbox')\n\t\t\t\t\t$(window).off('resize.ekkoLightbox')\n\t\t\t\t}\n\t\t\t\tthis._$modal.remove()\n\t\t\t\treturn this._config.onHidden.call(this)\n\t\t\t})\n\t\t\t.modal(this._config)\n\n\t\t\t$(window).on('resize.ekkoLightbox', () => {\n\t\t\t\tthis._resize(this._wantedWidth, this._wantedHeight)\n\t\t\t})\n\t\t}\n\n\t\telement() {\n\t\t\treturn this._$element;\n\t\t}\n\n\t\tmodal() {\n\t\t\treturn this._$modal;\n\t\t}\n\n\t\tnavigateTo(index) {\n\n\t\t\tif (index < 0 || index > this._$galleryItems.length-1)\n\t\t\t\treturn this\n\n\t\t\tthis._galleryIndex = index\n\n\t\t\tthis._$element = $(this._$galleryItems.get(this._galleryIndex))\n\t\t\tthis._handle();\n\t\t}\n\n\t\tnavigateLeft() {\n\n\t\t\tif (this._$galleryItems.length === 1)\n\t\t\t\treturn\n\n\t\t\tif (this._galleryIndex === 0)\n\t\t\t\tthis._galleryIndex = this._$galleryItems.length - 1\n\t\t\telse //circular\n\t\t\t\tthis._galleryIndex--\n\n\t\t\tthis._config.onNavigate.call(this, 'left', this._galleryIndex)\n\t\t\treturn this.navigateTo(this._galleryIndex)\n\t\t}\n\n\t\tnavigateRight() {\n\n\t\t\tif (this._$galleryItems.length === 1)\n\t\t\t\treturn\n\n\t\t\tif (this._galleryIndex === this._$galleryItems.length - 1)\n\t\t\t\tthis._galleryIndex = 0\n\t\t\telse //circular\n\t\t\t\tthis._galleryIndex++\n\n\t\t\tthis._config.onNavigate.call(this, 'right', this._galleryIndex)\n\t\t\treturn this.navigateTo(this._galleryIndex)\n\t\t}\n\n\t\tclose() {\n\t\t\treturn this._$modal.modal('hide');\n\t\t}\n\n\t\t// helper private methods\n\t\t_navigationalBinder(event) {\n\t\t\tevent = event || window.event;\n\t\t\tif (event.keyCode === 39)\n\t\t\t\treturn this.navigateRight()\n\t\t\tif (event.keyCode === 37)\n\t\t\t\treturn this.navigateLeft()\n\t\t}\n\n\t\t// type detection private methods\n\t\t_detectRemoteType(src, type) {\n\n\t\t\ttype = type || false;\n\n\t\t\tif(!type && this._isImage(src))\n\t\t\t\ttype = 'image';\n\t\t\tif(!type && this._getYoutubeId(src))\n\t\t\t\ttype = 'youtube';\n\t\t\tif(!type && this._getVimeoId(src))\n\t\t\t\ttype = 'vimeo';\n\t\t\tif(!type && this._getInstagramId(src))\n\t\t\t\ttype = 'instagram';\n\n\t\t\tif(!type || ['image', 'youtube', 'vimeo', 'instagram', 'video', 'url'].indexOf(type) < 0)\n\t\t\t\ttype = 'url';\n\n\t\t\treturn type;\n\t\t}\n\n\t\t_isImage(string) {\n\t\t\treturn string && string.match(/(^data:image\\/.*,)|(\\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\\?|#).*)?$)/i)\n\t\t}\n\n\t\t_containerToUse() {\n\t\t\t// if currently showing an image, fade it out and remove\n\t\t\tlet $toUse = this._$lightboxBodyTwo\n\t\t\tlet $current = this._$lightboxBodyOne\n\n\t\t\tif(this._$lightboxBodyTwo.hasClass('in')) {\n\t\t\t\t$toUse = this._$lightboxBodyOne\n\t\t\t\t$current = this._$lightboxBodyTwo\n\t\t\t}\n\n\t\t\t$current.removeClass('in show')\n\t\t\tsetTimeout(() => {\n\t\t\t\tif(!this._$lightboxBodyTwo.hasClass('in'))\n\t\t\t\t\tthis._$lightboxBodyTwo.empty()\n\t\t\t\tif(!this._$lightboxBodyOne.hasClass('in'))\n\t\t\t\t\tthis._$lightboxBodyOne.empty()\n\t\t\t}, 500)\n\n\t\t\t$toUse.addClass('in show')\n\t\t\treturn $toUse\n\t\t}\n\n\t\t_handle() {\n\n\t\t\tlet $toUse = this._containerToUse()\n\t\t\tthis._updateTitleAndFooter()\n\n\t\t\tlet currentRemote = this._$element.attr('data-remote') || this._$element.attr('href')\n\t\t\tlet currentType = this._detectRemoteType(currentRemote, this._$element.attr('data-type') || false)\n\n\t\t\tif(['image', 'youtube', 'vimeo', 'instagram', 'video', 'url'].indexOf(currentType) < 0)\n\t\t\t\treturn this._error(this._config.strings.type)\n\n\t\t\tswitch(currentType) {\n\t\t\t\tcase 'image':\n\t\t\t\t\tthis._preloadImage(currentRemote, $toUse)\n\t\t\t\t\tthis._preloadImageByIndex(this._galleryIndex, 3)\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'youtube':\n\t\t\t\t\tthis._showYoutubeVideo(currentRemote, $toUse);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'vimeo':\n\t\t\t\t\tthis._showVimeoVideo(this._getVimeoId(currentRemote), $toUse);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'instagram':\n\t\t\t\t\tthis._showInstagramVideo(this._getInstagramId(currentRemote), $toUse);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'video':\n\t\t\t\t\tthis._showHtml5Video(currentRemote, $toUse);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: // url\n\t\t\t\t\tthis._loadRemoteContent(currentRemote, $toUse);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\n\t\t_getYoutubeId(string) {\n\t\t\tif(!string)\n\t\t\t\treturn false;\n\t\t\tlet matches = string.match(/^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|\\&v=)([^#\\&\\?]*).*/)\n\t\t\treturn (matches && matches[2].length === 11) ? matches[2] : false\n\t\t}\n\n\t\t_getVimeoId(string) {\n\t\t\treturn string && string.indexOf('vimeo') > 0 ? string : false\n\t\t}\n\n\t\t_getInstagramId(string) {\n\t\t\treturn string && string.indexOf('instagram') > 0 ? string : false\n\t\t}\n\n\t\t// layout private methods\n\t\t_toggleLoading(show) {\n\t\t\tshow = show || false\n\t\t\tif(show) {\n\t\t\t\tthis._$modalDialog.css('display', 'none')\n\t\t\t\tthis._$modal.removeClass('in show')\n\t\t\t\t$('.modal-backdrop').append(this._config.loadingMessage)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._$modalDialog.css('display', 'block')\n\t\t\t\tthis._$modal.addClass('in show')\n\t\t\t\t$('.modal-backdrop').find('.ekko-lightbox-loader').remove()\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\n\t\t_calculateBorders() {\n\t\t\treturn {\n\t\t\t\ttop: this._totalCssByAttribute('border-top-width'),\n\t\t\t\tright: this._totalCssByAttribute('border-right-width'),\n\t\t\t\tbottom: this._totalCssByAttribute('border-bottom-width'),\n\t\t\t\tleft: this._totalCssByAttribute('border-left-width'),\n\t\t\t}\n\t\t}\n\n\t\t_calculatePadding() {\n\t\t\treturn {\n\t\t\t\ttop: this._totalCssByAttribute('padding-top'),\n\t\t\t\tright: this._totalCssByAttribute('padding-right'),\n\t\t\t\tbottom: this._totalCssByAttribute('padding-bottom'),\n\t\t\t\tleft: this._totalCssByAttribute('padding-left'),\n\t\t\t}\n\t\t}\n\n\t\t_totalCssByAttribute(attribute) {\n\t\t\treturn parseInt(this._$modalDialog.css(attribute), 10) +\n\t\t\t\tparseInt(this._$modalContent.css(attribute), 10) +\n\t\t\t\tparseInt(this._$modalBody.css(attribute), 10)\n\t\t}\n\n\t\t_updateTitleAndFooter() {\n\t\t\tlet title = this._$element.data('title') || \"\"\n\t\t\tlet caption = this._$element.data('footer') || \"\"\n\n\t\t\tthis._titleIsShown = false\n\t\t\tif (title || this._config.alwaysShowClose) {\n\t\t\t\tthis._titleIsShown = true\n\t\t\t\tthis._$modalHeader.css('display', '').find('.modal-title').html(title || \" \")\n\t\t\t}\n\t\t\telse\n\t\t\t\tthis._$modalHeader.css('display', 'none')\n\n\t\t\tthis._footerIsShown = false\n\t\t\tif (caption) {\n\t\t\t\tthis._footerIsShown = true\n\t\t\t\tthis._$modalFooter.css('display', '').html(caption)\n\t\t\t}\n\t\t\telse\n\t\t\t\tthis._$modalFooter.css('display', 'none')\n\n\t\t\treturn this;\n\t\t}\n\n\t\t_showYoutubeVideo(remote, $containerForElement) {\n\t\t\tlet id = this._getYoutubeId(remote)\n\t\t\tlet query = remote.indexOf('&') > 0 ? remote.substr(remote.indexOf('&')) : ''\n\t\t\tlet width = this._$element.data('width') || 560\n\t\t\tlet height = this._$element.data('height') || width / ( 560/315 )\n\t\t\treturn this._showVideoIframe(\n\t\t\t\t`//www.youtube.com/embed/${id}?badge=0&autoplay=1&html5=1${query}`,\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t\t$containerForElement\n\t\t\t);\n\t\t}\n\n\t\t_showVimeoVideo(id, $containerForElement) {\n\t\t\tlet width = 500\n\t\t\tlet height = this._$element.data('height') || width / ( 560/315 )\n\t\t\treturn this._showVideoIframe(id + '?autoplay=1', width, height, $containerForElement)\n\t\t}\n\n\t\t_showInstagramVideo(id, $containerForElement) {\n\t\t\t// instagram load their content into iframe's so this can be put straight into the element\n\t\t\tlet width = this._$element.data('width') || 612\n\t\t\tlet height = width + 80;\n\t\t\tid = id.substr(-1) !== '/' ? id + '/' : id; // ensure id has trailing slash\n\t\t\t$containerForElement.html(``);\n\t\t\tthis._resize(width, height);\n\t\t\tthis._config.onContentLoaded.call(this);\n\t\t\tif (this._$modalArrows) //hide the arrows when showing video\n\t\t\t\tthis._$modalArrows.css('display', 'none');\n\t\t\tthis._toggleLoading(false);\n\t\t\treturn this;\n\t\t}\n\n\t\t_showVideoIframe(url, width, height, $containerForElement) { // should be used for videos only. for remote content use loadRemoteContent (data-type=url)\n\t\t\theight = height || width; // default to square\n\t\t\t$containerForElement.html(`
`);\n\t\t\tthis._resize(width, height);\n\t\t\tthis._config.onContentLoaded.call(this);\n\t\t\tif (this._$modalArrows)\n\t\t\t\tthis._$modalArrows.css('display', 'none'); //hide the arrows when showing video\n\t\t\tthis._toggleLoading(false);\n\t\t\treturn this;\n\t\t}\n\n\t\t_showHtml5Video(url, $containerForElement) { // should be used for videos only. for remote content use loadRemoteContent (data-type=url)\n\t\t\tlet width = this._$element.data('width') || 560\n\t\t\tlet height = this._$element.data('height') || width / ( 560/315 )\n\t\t\t$containerForElement.html(`
`);\n\t\t\tthis._resize(width, height);\n\t\t\tthis._config.onContentLoaded.call(this);\n\t\t\tif (this._$modalArrows)\n\t\t\t\tthis._$modalArrows.css('display', 'none'); //hide the arrows when showing video\n\t\t\tthis._toggleLoading(false);\n\t\t\treturn this;\n\t\t}\n\n\t\t_loadRemoteContent(url, $containerForElement) {\n\t\t\tlet width = this._$element.data('width') || 560;\n\t\t\tlet height = this._$element.data('height') || 560;\n\n\t\t\tlet disableExternalCheck = this._$element.data('disableExternalCheck') || false;\n\t\t\tthis._toggleLoading(false);\n\n\t\t\t// external urls are loading into an iframe\n\t\t\t// local ajax can be loaded into the container itself\n\t\t\tif (!disableExternalCheck && !this._isExternal(url)) {\n\t\t\t\t$containerForElement.load(url, $.proxy(() => {\n\t\t\t\t\treturn this._$element.trigger('loaded.bs.modal');l\n\t\t\t\t}));\n\n\t\t\t} else {\n\t\t\t\t$containerForElement.html(``);\n\t\t\t\tthis._config.onContentLoaded.call(this);\n\t\t\t}\n\n\t\t\tif (this._$modalArrows) //hide the arrows when remote content\n\t\t\t\tthis._$modalArrows.css('display', 'none')\n\n\t\t\tthis._resize(width, height);\n\t\t\treturn this;\n\t\t}\n\n\t\t_isExternal(url) {\n\t\t\tlet match = url.match(/^([^:\\/?#]+:)?(?:\\/\\/([^\\/?#]*))?([^?#]+)?(\\?[^#]*)?(#.*)?/);\n\t\t\tif (typeof match[1] === \"string\" && match[1].length > 0 && match[1].toLowerCase() !== location.protocol)\n\t\t\t\treturn true;\n\n\t\t\tif (typeof match[2] === \"string\" && match[2].length > 0 && match[2].replace(new RegExp(`:(${{\n\t\t\t\t\t\"http:\": 80,\n\t\t\t\t\t\"https:\": 443\n\t\t\t\t}[location.protocol]})?$`), \"\") !== location.host)\n\t\t\t\treturn true;\n\n\t\t\treturn false;\n\t\t}\n\n\t\t_error( message ) {\n\t\t\tconsole.error(message);\n\t\t\tthis._containerToUse().html(message);\n\t\t\tthis._resize(300, 300);\n\t\t\treturn this;\n\t\t}\n\n\t\t_preloadImageByIndex(startIndex, numberOfTimes) {\n\n\t\t\tif(!this._$galleryItems)\n\t\t\t\treturn;\n\n\t\t\tlet next = $(this._$galleryItems.get(startIndex), false)\n\t\t\tif(typeof next == 'undefined')\n\t\t\t\treturn\n\n\t\t\tlet src = next.attr('data-remote') || next.attr('href')\n\t\t\tif (next.attr('data-type') === 'image' || this._isImage(src))\n\t\t\t\tthis._preloadImage(src, false)\n\n\t\t\tif(numberOfTimes > 0)\n\t\t\t\treturn this._preloadImageByIndex(startIndex + 1, numberOfTimes-1);\n\t\t}\n\n\t\t_preloadImage( src, $containerForImage) {\n\n\t\t\t$containerForImage = $containerForImage || false\n\n\t\t\tlet img = new Image();\n\t\t\tif ($containerForImage) {\n\n\t\t\t\t// if loading takes > 200ms show a loader\n\t\t\t\tlet loadingTimeout = setTimeout(() => {\n\t\t\t\t\t$containerForImage.append(this._config.loadingMessage)\n\t\t\t\t}, 200)\n\n\t\t\t\timg.onload = () => {\n\t\t\t\t\tif(loadingTimeout)\n\t\t\t\t\t\tclearTimeout(loadingTimeout)\n\t\t\t\t\tloadingTimeout = null;\n\t\t\t\t\tlet image = $('');\n\t\t\t\t\timage.attr('src', img.src);\n\t\t\t\t\timage.addClass('img-fluid');\n\n\t\t\t\t\t// backward compatibility for bootstrap v3\n\t\t\t\t\timage.css('width', '100%');\n\n\t\t\t\t\t$containerForImage.html(image);\n\t\t\t\t\tif (this._$modalArrows)\n\t\t\t\t\t\tthis._$modalArrows.css('display', '') // remove display to default to css property\n\n\t\t\t\t\tthis._resize(img.width, img.height);\n\t\t\t\t\tthis._toggleLoading(false);\n\t\t\t\t\treturn this._config.onContentLoaded.call(this);\n\t\t\t\t};\n\t\t\t\timg.onerror = () => {\n\t\t\t\t\tthis._toggleLoading(false);\n\t\t\t\t\treturn this._error(this._config.strings.fail+` ${src}`);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\timg.src = src;\n\t\t\treturn img;\n\t\t}\n\n\t\t_resize( width, height ) {\n\n\t\t\theight = height || width\n\t\t\tthis._wantedWidth = width\n\t\t\tthis._wantedHeight = height\n\n\t\t\t// if width > the available space, scale down the expected width and height\n\t\t\tlet widthBorderAndPadding = this._padding.left + this._padding.right + this._border.left + this._border.right\n\t\t\tlet maxWidth = Math.min(width + widthBorderAndPadding, this._config.doc.body.clientWidth)\n\t\t\tif((width + widthBorderAndPadding) > maxWidth) {\n\t\t\t\theight = ((maxWidth - widthBorderAndPadding) / width) * height\n\t\t\t\twidth = maxWidth\n\t\t\t} else\n\t\t\t\twidth = (width + widthBorderAndPadding)\n\n\t\t\tlet headerHeight = 0,\n\t\t\t\tfooterHeight = 0\n\n\t\t\t// as the resize is performed the modal is show, the calculate might fail\n\t\t\t// if so, default to the default sizes\n\t\t\tif (this._footerIsShown)\n\t\t\t\tfooterHeight = this._$modalFooter.outerHeight(true) || 55\n\n\t\t\tif (this._titleIsShown)\n\t\t\t\theaderHeight = this._$modalHeader.outerHeight(true) || 67\n\n\t\t\tlet borderPadding = this._padding.top + this._padding.bottom + this._border.bottom + this._border.top\n\n\t\t\t//calculated each time as resizing the window can cause them to change due to Bootstraps fluid margins\n\t\t\tlet margins = parseFloat(this._$modalDialog.css('margin-top')) + parseFloat(this._$modalDialog.css('margin-bottom'));\n\n\t\t\tlet maxHeight = Math.min(height, $(window).height() - borderPadding - margins - headerHeight - footerHeight);\n\t\t\tif(height > maxHeight) {\n\t\t\t\t// if height > the available height, scale down the width\n\t\t\t\tlet factor = Math.min(maxHeight / height, 1);\n\t\t\t\twidth = Math.ceil(factor * width);\n\t\t\t}\n\n\t\t\tthis._$lightboxContainer.css('height', maxHeight)\n\t\t\tthis._$modalDialog.css('width', 'auto') .css('maxWidth', width);\n\n\t\t\ttry{\n\t\t\t\t// v4 method is mistakenly protected\n\t\t\t\tthis._$modal.data('bs.modal')._handleUpdate();\n\t\t\t}\n\t\t\tcatch(e){\n\t\t\t\tthis._$modal.data('bs.modal').handleUpdate();\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\n\t\tstatic _jQueryInterface(config) {\n\t\t\tconfig = config || {}\n\t\t\treturn this.each(() => {\n\t\t\t\tlet $this = $(this)\n\t\t\t\tlet _config = $.extend(\n\t\t\t\t\t{},\n\t\t\t\t\tLightbox.Default,\n\t\t\t\t\t$this.data(),\n\t\t\t\t\ttypeof config === 'object' && config\n\t\t\t\t)\n\n\t\t\t\tnew Lightbox(this, _config)\n\t\t\t})\n\t\t}\n\t}\n\n\n\n\t$.fn[NAME] = Lightbox._jQueryInterface\n\t$.fn[NAME].Constructor = Lightbox\n\t$.fn[NAME].noConflict = () => {\n\t\t$.fn[NAME] = JQUERY_NO_CONFLICT\n\t\treturn Lightbox._jQueryInterface\n\t}\n\n\treturn Lightbox\n\n})(jQuery)\n\nexport default Lightbox\n"]} --------------------------------------------------------------------------------