[DRE-commits] [ruby-simplecov-html] 01/06: Imported Upstream version 0.10.0
Antonio Terceiro
terceiro at moszumanska.debian.org
Tue Sep 15 14:58:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository ruby-simplecov-html.
commit 65cc2e2c0dd1e4c5df3b0a6aac6c67fc9cefe0b6
Author: Antonio Terceiro <terceiro at debian.org>
Date: Tue Sep 15 11:30:58 2015 -0300
Imported Upstream version 0.10.0
---
.gitignore | 5 +-
.rubocop.yml | 50 +
.travis.yml | 27 +
Gemfile | 29 +-
Guardfile | 8 +-
LICENSE | 2 +-
README.md | 2 +-
Rakefile | 29 +-
assets/javascripts/application.js | 89 +-
assets/javascripts/plugins/jquery.colorbox.js | 1090 +++++++++++++++++
.../plugins/jquery.fancybox-1.3.1.pack.js | 44 -
assets/stylesheets/plugins/jquery.colorbox.css | 52 +
.../stylesheets/plugins/jquery.fancybox-1.3.1.css | 363 ------
lib/simplecov-html.rb | 192 +--
lib/simplecov-html/version.rb | 24 +-
metadata.yml | 111 +-
public/application.css | 415 +------
public/application.js | 1225 ++++++++++++++++++--
public/colorbox/border.png | Bin 0 -> 163 bytes
public/colorbox/controls.png | Bin 0 -> 2033 bytes
public/colorbox/loading.gif | Bin 0 -> 9427 bytes
public/colorbox/loading_background.png | Bin 0 -> 166 bytes
public/fancybox/blank.gif | Bin 43 -> 0 bytes
public/fancybox/fancy_close.png | Bin 1517 -> 0 bytes
public/fancybox/fancy_loading.png | Bin 10195 -> 0 bytes
public/fancybox/fancy_nav_left.png | Bin 1446 -> 0 bytes
public/fancybox/fancy_nav_right.png | Bin 1454 -> 0 bytes
public/fancybox/fancy_shadow_e.png | Bin 107 -> 0 bytes
public/fancybox/fancy_shadow_n.png | Bin 106 -> 0 bytes
public/fancybox/fancy_shadow_ne.png | Bin 347 -> 0 bytes
public/fancybox/fancy_shadow_nw.png | Bin 324 -> 0 bytes
public/fancybox/fancy_shadow_s.png | Bin 111 -> 0 bytes
public/fancybox/fancy_shadow_se.png | Bin 352 -> 0 bytes
public/fancybox/fancy_shadow_sw.png | Bin 340 -> 0 bytes
public/fancybox/fancy_shadow_w.png | Bin 103 -> 0 bytes
public/fancybox/fancy_title_left.png | Bin 503 -> 0 bytes
public/fancybox/fancy_title_main.png | Bin 96 -> 0 bytes
public/fancybox/fancy_title_over.png | Bin 70 -> 0 bytes
public/fancybox/fancy_title_right.png | Bin 506 -> 0 bytes
public/fancybox/fancybox-x.png | Bin 203 -> 0 bytes
public/fancybox/fancybox-y.png | Bin 176 -> 0 bytes
public/fancybox/fancybox.png | Bin 15287 -> 0 bytes
simplecov-html.gemspec | 41 +-
test/helper.rb | 13 +-
test/test_simple_cov-html.rb | 2 +-
45 files changed, 2708 insertions(+), 1105 deletions(-)
diff --git a/.gitignore b/.gitignore
index 840ecdf..a179c73 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,10 +17,11 @@ tmtags
## VIM
*.swp
+## RUBYMINE
+.idea
+
## PROJECT::GENERAL
coverage
rdoc
pkg
.sass-cache
-
-## PROJECT::SPECIFIC
\ No newline at end of file
diff --git a/.rubocop.yml b/.rubocop.yml
new file mode 100644
index 0000000..c3e0b46
--- /dev/null
+++ b/.rubocop.yml
@@ -0,0 +1,50 @@
+Metrics/BlockNesting:
+ Max: 2
+
+Metrics/LineLength:
+ AllowURI: true
+ Enabled: false
+
+Metrics/MethodLength:
+ CountComments: false
+ Max: 10
+
+Metrics/ParameterLists:
+ Max: 4
+ CountKeywordArgs: true
+
+Style/AccessModifierIndentation:
+ EnforcedStyle: outdent
+
+Style/CollectionMethods:
+ PreferredMethods:
+ map: 'collect'
+ reduce: 'inject'
+ find: 'detect'
+ find_all: 'select'
+
+Style/Documentation:
+ Enabled: false
+
+Style/DoubleNegation:
+ Enabled: false
+
+Style/FileName:
+ Exclude:
+ - 'lib/simplecov-html.rb'
+ - 'test/test_simple_cov-html.rb'
+
+Style/HashSyntax:
+ EnforcedStyle: hash_rockets
+
+Style/RegexpLiteral:
+ Enabled: false
+
+Style/SpaceInsideHashLiteralBraces:
+ EnforcedStyle: no_space
+
+Style/StringLiterals:
+ EnforcedStyle: double_quotes
+
+Style/TrailingComma:
+ EnforcedStyleForMultiline: 'comma'
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..14e55b3
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,27 @@
+language: ruby
+
+before_install:
+ - gem install bundler
+
+bundler_args: --without development --jobs=3 --retry=3
+
+cache: bundler
+
+sudo: false
+
+rvm:
+ - 1.8.7
+ - 1.9.3
+ - 2.0.0
+ - 2.1
+ - 2.2
+ - ruby-head
+ - jruby
+ - rbx-2
+
+matrix:
+ allow_failures:
+ - rvm: ruby-head
+ - rvm: jruby
+ - rvm: rbx-2
+ fast_finish: true
diff --git a/Gemfile b/Gemfile
index 59ca8b9..3f4533c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,15 +1,22 @@
-source :rubygems
+source "https://rubygems.org"
gemspec
+gem "rake"
+
+# Use local copy of simplecov in development when checked out, fetch from git otherwise
+if File.directory?(File.dirname(__FILE__) + "/../simplecov")
+ gem "simplecov", :path => File.dirname(__FILE__) + "/../simplecov"
+else
+ gem "simplecov", :git => "https://github.com/colszowka/simplecov"
+end
+
+group :test do
+ gem "test-unit"
+end
+
group :development do
- # Use local copy of simplecov in development when checked out, fetch from git otherwise
- if File.directory?(File.dirname(__FILE__) + '/../simplecov')
- gem 'simplecov', :path => File.dirname(__FILE__) + '/../simplecov'
- else
- gem 'simplecov', :git => 'https://github.com/colszowka/simplecov'
- end
-
- gem 'guard-bundler'
- gem 'guard-rake'
-end
\ No newline at end of file
+ gem "rubocop"
+ gem "sass"
+ gem "sprockets"
+end
diff --git a/Guardfile b/Guardfile
index 8f86f76..db3c57e 100644
--- a/Guardfile
+++ b/Guardfile
@@ -1,12 +1,12 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
-guard 'bundler' do
- watch('Gemfile')
+guard "bundler" do
+ watch("Gemfile")
# Uncomment next line if Gemfile contain `gemspec' command
# watch(/^.+\.gemspec/)
end
-guard 'rake', :task => 'assets:compile' do
+guard "rake", :task => "assets:compile" do
watch(%r{^assets\/})
-end
\ No newline at end of file
+end
diff --git a/LICENSE b/LICENSE
index 6092a30..8da4125 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2010-2011 Christoph Olszowka
+Copyright (c) 2010-2013 Christoph Olszowka
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/README.md b/README.md
index 3ca5355..30e3d60 100644
--- a/README.md
+++ b/README.md
@@ -27,4 +27,4 @@ your changes will not be included in your coverage reports.
Copyright
---------
-Copyright (c) 2011 Christoph Olszowka. See LICENSE for details.
+Copyright (c) 2010-2013 Christoph Olszowka. See LICENSE for details.
diff --git a/Rakefile b/Rakefile
index 229f815..1938153 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,4 +1,4 @@
-require 'bundler'
+require "bundler"
Bundler::GemHelper.install_tasks
# See https://github.com/colszowka/simplecov/issues/171
@@ -9,24 +9,33 @@ end
# Enforce proper permissions on each build
Rake::Task[:build].prerequisites.unshift :fix_permissions
-require 'rake/testtask'
+require "rake/testtask"
Rake::TestTask.new(:test) do |test|
- test.libs << 'lib' << 'test'
- test.pattern = 'test/**/test_*.rb'
+ test.libs << "lib" << "test"
+ test.pattern = "test/**/test_*.rb"
test.verbose = true
end
-task :default => :test
+begin
+ require "rubocop/rake_task"
+ RuboCop::RakeTask.new
+rescue LoadError
+ task :rubocop do
+ $stderr.puts "Rubocop is disabled"
+ end
+end
+
+task :default => [:test, :rubocop]
namespace :assets do
desc "Compiles all assets"
task :compile do
puts "Compiling assets"
- require 'sprockets'
+ require "sprockets"
assets = Sprockets::Environment.new
- assets.append_path 'assets/javascripts'
- assets.append_path 'assets/stylesheets'
- assets['application.js'].write_to('public/application.js')
- assets['application.css'].write_to('public/application.css')
+ assets.append_path "assets/javascripts"
+ assets.append_path "assets/stylesheets"
+ assets["application.js"].write_to("public/application.js")
+ assets["application.css"].write_to("public/application.css")
end
end
diff --git a/assets/javascripts/application.js b/assets/javascripts/application.js
index da81352..1f8e010 100644
--- a/assets/javascripts/application.js
+++ b/assets/javascripts/application.js
@@ -9,60 +9,90 @@ $(document).ready(function() {
"bPaginate": false,
"bJQueryUI": true,
"aoColumns": [
- null,
- { "sType": "percent" },
- null,
- null,
- null,
- null,
+ null,
+ { "sType": "percent" },
+ null,
+ null,
+ null,
+ null,
null
- ]
+ ]
});
-
+
// Syntax highlight all files up front - deactivated
// $('.source_table pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')});
-
+
// Syntax highlight source files on first toggle of the file view popup
$("a.src_link").click(function() {
// Get the source file element that corresponds to the clicked element
var source_table = $($(this).attr('href'));
-
+
// If not highlighted yet, do it!
if (!source_table.hasClass('highlighted')) {
source_table.find('pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')});
source_table.addClass('highlighted');
};
});
-
+
+ var prev_anchor;
+ var curr_anchor;
+
// Set-up of popup for source file views
- $("a.src_link").fancybox({
- 'hideOnContentClick': true,
- 'centerOnScroll': true,
- 'width': '90%',
- 'padding': 0,
- 'transitionIn': 'elastic'
+ $("a.src_link").colorbox({
+ transition: "none",
+ inline: true,
+ opacity: 1,
+ width: "95%",
+ height: "95%",
+ onLoad: function() {
+ prev_anchor = curr_anchor ? curr_anchor : jQuery.url.attr('anchor');
+ curr_anchor = this.href.split('#')[1];
+ window.location.hash = curr_anchor;
+ },
+ onCleanup: function() {
+ if (prev_anchor && prev_anchor != curr_anchor) {
+ $('a[href="#'+prev_anchor+'"]').click();
+ curr_anchor = prev_anchor;
+ } else {
+ $('.group_tabs a:first').click();
+ prev_anchor = curr_anchor;
+ curr_anchor = "#_AllFiles";
+ }
+ window.location.hash = curr_anchor;
+ }
});
-
- // Hide src files and file list container after load
+
+ window.onpopstate = function(event){
+ if (location.hash.substring(0,2) == "#_") {
+ $.colorbox.close();
+ curr_anchor = jQuery.url.attr('anchor');
+ } else {
+ if ($('#colorbox').is(':hidden')) {
+ $('a.src_link[href="'+location.hash+'"]').colorbox({ open: true });
+ }
+ }
+ };
+
+ // Hide src files and file list container after load
$('.source_files').hide();
$('.file_list_container').hide();
-
+
// Add tabs based upon existing file_list_containers
$('.file_list_container h2').each(function(){
var container_id = $(this).parent().attr('id');
var group_name = $(this).find('.group_name').first().html();
var covered_percent = $(this).find('.covered_percent').first().html();
-
+
$('.group_tabs').append('<li><a href="#' + container_id + '">' + group_name + ' ('+ covered_percent +')</a></li>');
});
$('.group_tabs a').each( function() {
$(this).addClass($(this).attr('href').replace('#', ''));
});
-
+
// Make sure tabs don't get ugly focus borders when active
$('.group_tabs a').live('focus', function() { $(this).blur(); });
-
+
var favicon_path = $('link[rel="shortcut icon"]').attr('href');
$('.group_tabs a').live('click', function(){
if (!$(this).parent().hasClass('active')) {
@@ -71,7 +101,7 @@ $(document).ready(function() {
$('.file_list_container').hide();
$(".file_list_container" + $(this).attr('href')).show();
window.location.href = window.location.href.split('#')[0] + $(this).attr('href').replace('#', '#_');
-
+
// Force favicon reload - otherwise the location change containing anchor would drop the favicon...
// Works only on firefox, but still... - Anyone know a better solution to force favicon on local file?
$('link[rel="shortcut icon"]').remove();
@@ -79,13 +109,18 @@ $(document).ready(function() {
};
return false;
});
-
+
if (jQuery.url.attr('anchor')) {
- $('.group_tabs a.'+jQuery.url.attr('anchor').replace('_', '')).click();
+ var anchor = jQuery.url.attr('anchor')
+ if (anchor.length == 40) {
+ $('a.src_link[href=#' + anchor + ']').click();
+ } else {
+ $('.group_tabs a.'+anchor.replace('_', '')).click();
+ }
} else {
$('.group_tabs a:first').click();
};
-
+
$("abbr.timeago").timeago();
$('#loading').fadeOut();
$('#wrapper').show();
diff --git a/assets/javascripts/plugins/jquery.colorbox.js b/assets/javascripts/plugins/jquery.colorbox.js
new file mode 100644
index 0000000..f50427d
--- /dev/null
+++ b/assets/javascripts/plugins/jquery.colorbox.js
@@ -0,0 +1,1090 @@
+/*!
+ Colorbox v1.5.13 - 2014-08-04
+ jQuery lightbox and modal window plugin
+ (c) 2014 Jack Moore - http://www.jacklmoore.com/colorbox
+ license: http://www.opensource.org/licenses/mit-license.php
+ */
+(function ($, document, window) {
+ var
+ // Default settings object.
+ // See http://jacklmoore.com/colorbox for details.
+ defaults = {
+ // data sources
+ html: false,
+ photo: false,
+ iframe: false,
+ inline: false,
+
+ // behavior and appearance
+ transition: "elastic",
+ speed: 300,
+ fadeOut: 300,
+ width: false,
+ initialWidth: "600",
+ innerWidth: false,
+ maxWidth: false,
+ height: false,
+ initialHeight: "450",
+ innerHeight: false,
+ maxHeight: false,
+ scalePhotos: true,
+ scrolling: true,
+ opacity: 0.9,
+ preloading: true,
+ className: false,
+ overlayClose: true,
+ escKey: true,
+ arrowKey: true,
+ top: false,
+ bottom: false,
+ left: false,
+ right: false,
+ fixed: false,
+ data: undefined,
+ closeButton: true,
+ fastIframe: true,
+ open: false,
+ reposition: true,
+ loop: true,
+ slideshow: false,
+ slideshowAuto: true,
+ slideshowSpeed: 2500,
+ slideshowStart: "start slideshow",
+ slideshowStop: "stop slideshow",
+ photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
+
+ // alternate image paths for high-res displays
+ retinaImage: false,
+ retinaUrl: false,
+ retinaSuffix: '@2x.$1',
+
+ // internationalization
+ current: "image {current} of {total}",
+ previous: "previous",
+ next: "next",
+ close: "close",
+ xhrError: "This content failed to load.",
+ imgError: "This image failed to load.",
+
+ // accessbility
+ returnFocus: true,
+ trapFocus: true,
+
+ // callbacks
+ onOpen: false,
+ onLoad: false,
+ onComplete: false,
+ onCleanup: false,
+ onClosed: false,
+
+ rel: function() {
+ return this.rel;
+ },
+ href: function() {
+ // using this.href would give the absolute url, when the href may have been inteded as a selector (e.g. '#container')
+ return $(this).attr('href');
+ },
+ title: function() {
+ return this.title;
+ }
+ },
+
+ // Abstracting the HTML and event identifiers for easy rebranding
+ colorbox = 'colorbox',
+ prefix = 'cbox',
+ boxElement = prefix + 'Element',
+
+ // Events
+ event_open = prefix + '_open',
+ event_load = prefix + '_load',
+ event_complete = prefix + '_complete',
+ event_cleanup = prefix + '_cleanup',
+ event_closed = prefix + '_closed',
+ event_purge = prefix + '_purge',
+
+ // Cached jQuery Object Variables
+ $overlay,
+ $box,
+ $wrap,
+ $content,
+ $topBorder,
+ $leftBorder,
+ $rightBorder,
+ $bottomBorder,
+ $related,
+ $window,
+ $loaded,
+ $loadingBay,
+ $loadingOverlay,
+ $title,
+ $current,
+ $slideshow,
+ $next,
+ $prev,
+ $close,
+ $groupControls,
+ $events = $('<a/>'), // $({}) would be prefered, but there is an issue with jQuery 1.4.2
+
+ // Variables for cached values or use across multiple functions
+ settings,
+ interfaceHeight,
+ interfaceWidth,
+ loadedHeight,
+ loadedWidth,
+ index,
+ photo,
+ open,
+ active,
+ closing,
+ loadingTimer,
+ publicMethod,
+ div = "div",
+ requests = 0,
+ previousCSS = {},
+ init;
+
+ // ****************
+ // HELPER FUNCTIONS
+ // ****************
+
+ // Convenience function for creating new jQuery objects
+ function $tag(tag, id, css) {
+ var element = document.createElement(tag);
+
+ if (id) {
+ element.id = prefix + id;
+ }
+
+ if (css) {
+ element.style.cssText = css;
+ }
+
+ return $(element);
+ }
+
+ // Get the window height using innerHeight when available to avoid an issue with iOS
+ // http://bugs.jquery.com/ticket/6724
+ function winheight() {
+ return window.innerHeight ? window.innerHeight : $(window).height();
+ }
+
+ function Settings(element, options) {
+ if (options !== Object(options)) {
+ options = {};
+ }
+
+ this.cache = {};
+ this.el = element;
+
+ this.value = function(key) {
+ var dataAttr;
+
+ if (this.cache[key] === undefined) {
+ dataAttr = $(this.el).attr('data-cbox-'+key);
+
+ if (dataAttr !== undefined) {
+ this.cache[key] = dataAttr;
+ } else if (options[key] !== undefined) {
+ this.cache[key] = options[key];
+ } else if (defaults[key] !== undefined) {
+ this.cache[key] = defaults[key];
+ }
+ }
+
+ return this.cache[key];
+ };
+
+ this.get = function(key) {
+ var value = this.value(key);
+ return $.isFunction(value) ? value.call(this.el, this) : value;
+ };
+ }
+
+ // Determine the next and previous members in a group.
+ function getIndex(increment) {
+ var
+ max = $related.length,
+ newIndex = (index + increment) % max;
+
+ return (newIndex < 0) ? max + newIndex : newIndex;
+ }
+
+ // Convert '%' and 'px' values to integers
+ function setSize(size, dimension) {
+ return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));
+ }
+
+ // Checks an href to see if it is a photo.
+ // There is a force photo option (photo: true) for hrefs that cannot be matched by the regex.
+ function isImage(settings, url) {
+ return settings.get('photo') || settings.get('photoRegex').test(url);
+ }
+
+ function retinaUrl(settings, url) {
+ return settings.get('retinaUrl') && window.devicePixelRatio > 1 ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url;
+ }
+
+ function trapFocus(e) {
+ if ('contains' in $box[0] && !$box[0].contains(e.target) && e.target !== $overlay[0]) {
+ e.stopPropagation();
+ $box.focus();
+ }
+ }
+
+ function setClass(str) {
+ if (setClass.str !== str) {
+ $box.add($overlay).removeClass(setClass.str).addClass(str);
+ setClass.str = str;
+ }
+ }
+
+ function getRelated(rel) {
+ index = 0;
+
+ if (rel && rel !== false && rel !== 'nofollow') {
+ $related = $('.' + boxElement).filter(function () {
+ var options = $.data(this, colorbox);
+ var settings = new Settings(this, options);
+ return (settings.get('rel') === rel);
+ });
+ index = $related.index(settings.el);
+
+ // Check direct calls to Colorbox.
+ if (index === -1) {
+ $related = $related.add(settings.el);
+ index = $related.length - 1;
+ }
+ } else {
+ $related = $(settings.el);
+ }
+ }
+
+ function trigger(event) {
+ // for external use
+ $(document).trigger(event);
+ // for internal use
+ $events.triggerHandler(event);
+ }
+
+ var slideshow = (function(){
+ var active,
+ className = prefix + "Slideshow_",
+ click = "click." + prefix,
+ timeOut;
+
+ function clear () {
+ clearTimeout(timeOut);
+ }
+
+ function set() {
+ if (settings.get('loop') || $related[index + 1]) {
+ clear();
+ timeOut = setTimeout(publicMethod.next, settings.get('slideshowSpeed'));
+ }
+ }
+
+ function start() {
+ $slideshow
+ .html(settings.get('slideshowStop'))
+ .unbind(click)
+ .one(click, stop);
+
+ $events
+ .bind(event_complete, set)
+ .bind(event_load, clear);
+
+ $box.removeClass(className + "off").addClass(className + "on");
+ }
+
+ function stop() {
+ clear();
+
+ $events
+ .unbind(event_complete, set)
+ .unbind(event_load, clear);
+
+ $slideshow
+ .html(settings.get('slideshowStart'))
+ .unbind(click)
+ .one(click, function () {
+ publicMethod.next();
+ start();
+ });
+
+ $box.removeClass(className + "on").addClass(className + "off");
+ }
+
+ function reset() {
+ active = false;
+ $slideshow.hide();
+ clear();
+ $events
+ .unbind(event_complete, set)
+ .unbind(event_load, clear);
+ $box.removeClass(className + "off " + className + "on");
+ }
+
+ return function(){
+ if (active) {
+ if (!settings.get('slideshow')) {
+ $events.unbind(event_cleanup, reset);
+ reset();
+ }
+ } else {
+ if (settings.get('slideshow') && $related[1]) {
+ active = true;
+ $events.one(event_cleanup, reset);
+ if (settings.get('slideshowAuto')) {
+ start();
+ } else {
+ stop();
+ }
+ $slideshow.show();
+ }
+ }
+ };
+
+ }());
+
+
+ function launch(element) {
+ var options;
+
+ if (!closing) {
+
+ options = $(element).data(colorbox);
+
+ settings = new Settings(element, options);
+
+ getRelated(settings.get('rel'));
+
+ if (!open) {
+ open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
+
+ setClass(settings.get('className'));
+
+ // Show colorbox so the sizes can be calculated in older versions of jQuery
+ $box.css({visibility:'hidden', display:'block', opacity:''});
+
+ $loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden; visibility:hidden');
+ $content.css({width:'', height:''}).append($loaded);
+
+ // Cache values needed for size calculations
+ interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();
+ interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
+ loadedHeight = $loaded.outerHeight(true);
+ loadedWidth = $loaded.outerWidth(true);
+
+ // Opens inital empty Colorbox prior to content being loaded.
+ var initialWidth = setSize(settings.get('initialWidth'), 'x');
+ var initialHeight = setSize(settings.get('initialHeight'), 'y');
+ var maxWidth = settings.get('maxWidth');
+ var maxHeight = settings.get('maxHeight');
+
+ settings.w = (maxWidth !== false ? Math.min(initialWidth, setSize(maxWidth, 'x')) : initialWidth) - loadedWidth - interfaceWidth;
+ settings.h = (maxHeight !== false ? Math.min(initialHeight, setSize(maxHeight, 'y')) : initialHeight) - loadedHeight - interfaceHeight;
+
+ $loaded.css({width:'', height:settings.h});
+ publicMethod.position();
+
+ trigger(event_open);
+ settings.get('onOpen');
+
+ $groupControls.add($title).hide();
+
+ $box.focus();
+
+ if (settings.get('trapFocus')) {
+ // Confine focus to the modal
+ // Uses event capturing that is not supported in IE8-
+ if (document.addEventListener) {
+
+ document.addEventListener('focus', trapFocus, true);
+
+ $events.one(event_closed, function () {
+ document.removeEventListener('focus', trapFocus, true);
+ });
+ }
+ }
+
+ // Return focus on closing
+ if (settings.get('returnFocus')) {
+ $events.one(event_closed, function () {
+ $(settings.el).focus();
+ });
+ }
+ }
+
+ var opacity = parseFloat(settings.get('opacity'));
+ $overlay.css({
+ opacity: opacity === opacity ? opacity : '',
+ cursor: settings.get('overlayClose') ? 'pointer' : '',
+ visibility: 'visible'
+ }).show();
+
+ if (settings.get('closeButton')) {
+ $close.html(settings.get('close')).appendTo($content);
+ } else {
+ $close.appendTo('<div/>'); // replace with .detach() when dropping jQuery < 1.4
+ }
+
+ load();
+ }
+ }
+
+ // Colorbox's markup needs to be added to the DOM prior to being called
+ // so that the browser will go ahead and load the CSS background images.
+ function appendHTML() {
+ if (!$box && document.body) {
+ init = false;
+ $window = $(window);
+ $box = $tag(div).attr({
+ id: colorbox,
+ 'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS.
+ role: 'dialog',
+ tabindex: '-1'
+ }).hide();
+ $overlay = $tag(div, "Overlay").hide();
+ $loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]);
+ $wrap = $tag(div, "Wrapper");
+ $content = $tag(div, "Content").append(
+ $title = $tag(div, "Title"),
+ $current = $tag(div, "Current"),
+ $prev = $('<button type="button"/>').attr({id:prefix+'Previous'}),
+ $next = $('<button type="button"/>').attr({id:prefix+'Next'}),
+ $slideshow = $tag('button', "Slideshow"),
+ $loadingOverlay
+ );
+
+ $close = $('<button type="button"/>').attr({id:prefix+'Close'});
+
+ $wrap.append( // The 3x3 Grid that makes up Colorbox
+ $tag(div).append(
+ $tag(div, "TopLeft"),
+ $topBorder = $tag(div, "TopCenter"),
+ $tag(div, "TopRight")
+ ),
+ $tag(div, false, 'clear:left').append(
+ $leftBorder = $tag(div, "MiddleLeft"),
+ $content,
+ $rightBorder = $tag(div, "MiddleRight")
+ ),
+ $tag(div, false, 'clear:left').append(
+ $tag(div, "BottomLeft"),
+ $bottomBorder = $tag(div, "BottomCenter"),
+ $tag(div, "BottomRight")
+ )
+ ).find('div div').css({'float': 'left'});
+
+ $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;');
+
+ $groupControls = $next.add($prev).add($current).add($slideshow);
+
+ $(document.body).append($overlay, $box.append($wrap, $loadingBay));
+ }
+ }
+
+ // Add Colorbox's event bindings
+ function addBindings() {
+ function clickHandler(e) {
+ // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
+ // See: http://jacklmoore.com/notes/click-events/
+ if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ launch(this);
+ }
+ }
+
+ if ($box) {
+ if (!init) {
+ init = true;
+
+ // Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
+ $next.click(function () {
+ publicMethod.next();
+ });
+ $prev.click(function () {
+ publicMethod.prev();
+ });
+ $close.click(function () {
+ publicMethod.close();
+ });
+ $overlay.click(function () {
+ if (settings.get('overlayClose')) {
+ publicMethod.close();
+ }
+ });
+
+ // Key Bindings
+ $(document).bind('keydown.' + prefix, function (e) {
+ var key = e.keyCode;
+ if (open && settings.get('escKey') && key === 27) {
+ e.preventDefault();
+ publicMethod.close();
+ }
+ if (open && settings.get('arrowKey') && $related[1] && !e.altKey) {
+ if (key === 37) {
+ e.preventDefault();
+ $prev.click();
+ } else if (key === 39) {
+ e.preventDefault();
+ $next.click();
+ }
+ }
+ });
+
+ if ($.isFunction($.fn.on)) {
+ // For jQuery 1.7+
+ $(document).on('click.'+prefix, '.'+boxElement, clickHandler);
+ } else {
+ // For jQuery 1.3.x -> 1.6.x
+ // This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed.
+ // This is not here for jQuery 1.9, it's here for legacy users.
+ $('.'+boxElement).live('click.'+prefix, clickHandler);
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+
+ // Don't do anything if Colorbox already exists.
+ if ($[colorbox]) {
+ return;
+ }
+
+ // Append the HTML when the DOM loads
+ $(appendHTML);
+
+
+ // ****************
+ // PUBLIC FUNCTIONS
+ // Usage format: $.colorbox.close();
+ // Usage from within an iframe: parent.jQuery.colorbox.close();
+ // ****************
+
+ publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
+ var settings;
+ var $obj = this;
+
+ options = options || {};
+
+ if ($.isFunction($obj)) { // assume a call to $.colorbox
+ $obj = $('<a/>');
+ options.open = true;
+ } else if (!$obj[0]) { // colorbox being applied to empty collection
+ return $obj;
+ }
+
+
+ if (!$obj[0]) { // colorbox being applied to empty collection
+ return $obj;
+ }
+
+ appendHTML();
+
+ if (addBindings()) {
+
+ if (callback) {
+ options.onComplete = callback;
+ }
+
+ $obj.each(function () {
+ var old = $.data(this, colorbox) || {};
+ $.data(this, colorbox, $.extend(old, options));
+ }).addClass(boxElement);
+
+ settings = new Settings($obj[0], options);
+
+ if (settings.get('open')) {
+ launch($obj[0]);
+ }
+ }
+
+ return $obj;
+ };
+
+ publicMethod.position = function (speed, loadedCallback) {
+ var
+ css,
+ top = 0,
+ left = 0,
+ offset = $box.offset(),
+ scrollTop,
+ scrollLeft;
+
+ $window.unbind('resize.' + prefix);
+
+ // remove the modal so that it doesn't influence the document width/height
+ $box.css({top: -9e4, left: -9e4});
+
+ scrollTop = $window.scrollTop();
+ scrollLeft = $window.scrollLeft();
+
+ if (settings.get('fixed')) {
+ offset.top -= scrollTop;
+ offset.left -= scrollLeft;
+ $box.css({position: 'fixed'});
+ } else {
+ top = scrollTop;
+ left = scrollLeft;
+ $box.css({position: 'absolute'});
+ }
+
+ // keeps the top and left positions within the browser's viewport.
+ if (settings.get('right') !== false) {
+ left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.get('right'), 'x'), 0);
+ } else if (settings.get('left') !== false) {
+ left += setSize(settings.get('left'), 'x');
+ } else {
+ left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
+ }
+
+ if (settings.get('bottom') !== false) {
+ top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.get('bottom'), 'y'), 0);
+ } else if (settings.get('top') !== false) {
+ top += setSize(settings.get('top'), 'y');
+ } else {
+ top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
+ }
+
+ $box.css({top: offset.top, left: offset.left, visibility:'visible'});
+
+ // this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
+ // but it has to be shrank down around the size of div#colorbox when it's done. If not,
+ // it can invoke an obscure IE bug when using iframes.
+ $wrap[0].style.width = $wrap[0].style.height = "9999px";
+
+ function modalDimensions() {
+ $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px';
+ $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px';
+ }
+
+ css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left};
+
+ // setting the speed to 0 if the content hasn't changed size or position
+ if (speed) {
+ var tempSpeed = 0;
+ $.each(css, function(i){
+ if (css[i] !== previousCSS[i]) {
+ tempSpeed = speed;
+ return;
+ }
+ });
+ speed = tempSpeed;
+ }
+
+ previousCSS = css;
+
+ if (!speed) {
+ $box.css(css);
+ }
+
+ $box.dequeue().animate(css, {
+ duration: speed || 0,
+ complete: function () {
+ modalDimensions();
+
+ active = false;
+
+ // shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
+ $wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
+ $wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
+
+ if (settings.get('reposition')) {
+ setTimeout(function () { // small delay before binding onresize due to an IE8 bug.
+ $window.bind('resize.' + prefix, publicMethod.position);
+ }, 1);
+ }
+
+ if ($.isFunction(loadedCallback)) {
+ loadedCallback();
+ }
+ },
+ step: modalDimensions
+ });
+ };
+
+ publicMethod.resize = function (options) {
+ var scrolltop;
+
+ if (open) {
+ options = options || {};
+
+ if (options.width) {
+ settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
+ }
+
+ if (options.innerWidth) {
+ settings.w = setSize(options.innerWidth, 'x');
+ }
+
+ $loaded.css({width: settings.w});
+
+ if (options.height) {
+ settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
+ }
+
+ if (options.innerHeight) {
+ settings.h = setSize(options.innerHeight, 'y');
+ }
+
+ if (!options.innerHeight && !options.height) {
+ scrolltop = $loaded.scrollTop();
+ $loaded.css({height: "auto"});
+ settings.h = $loaded.height();
+ }
+
+ $loaded.css({height: settings.h});
+
+ if(scrolltop) {
+ $loaded.scrollTop(scrolltop);
+ }
+
+ publicMethod.position(settings.get('transition') === "none" ? 0 : settings.get('speed'));
+ }
+ };
+
+ publicMethod.prep = function (object) {
+ if (!open) {
+ return;
+ }
+
+ var callback, speed = settings.get('transition') === "none" ? 0 : settings.get('speed');
+
+ $loaded.remove();
+
+ $loaded = $tag(div, 'LoadedContent').append(object);
+
+ function getWidth() {
+ settings.w = settings.w || $loaded.width();
+ settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
+ return settings.w;
+ }
+ function getHeight() {
+ settings.h = settings.h || $loaded.height();
+ settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
+ return settings.h;
+ }
+
+ $loaded.hide()
+ .appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
+ .css({width: getWidth(), overflow: settings.get('scrolling') ? 'auto' : 'hidden'})
+ .css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
+ .prependTo($content);
+
+ $loadingBay.hide();
+
+ // floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
+
+ $(photo).css({'float': 'none'});
+
+ setClass(settings.get('className'));
+
+ callback = function () {
+ var total = $related.length,
+ iframe,
+ complete;
+
+ if (!open) {
+ return;
+ }
+
+ function removeFilter() { // Needed for IE8 in versions of jQuery prior to 1.7.2
+ if ($.support.opacity === false) {
+ $box[0].style.removeAttribute('filter');
+ }
+ }
+
+ complete = function () {
+ clearTimeout(loadingTimer);
+ $loadingOverlay.hide();
+ trigger(event_complete);
+ settings.get('onComplete');
+ };
+
+
+ $title.html(settings.get('title')).show();
+ $loaded.show();
+
+ if (total > 1) { // handle grouping
+ if (typeof settings.get('current') === "string") {
+ $current.html(settings.get('current').replace('{current}', index + 1).replace('{total}', total)).show();
+ }
+
+ $next[(settings.get('loop') || index < total - 1) ? "show" : "hide"]().html(settings.get('next'));
+ $prev[(settings.get('loop') || index) ? "show" : "hide"]().html(settings.get('previous'));
+
+ slideshow();
+
+ // Preloads images within a rel group
+ if (settings.get('preloading')) {
+ $.each([getIndex(-1), getIndex(1)], function(){
+ var img,
+ i = $related[this],
+ settings = new Settings(i, $.data(i, colorbox)),
+ src = settings.get('href');
+
+ if (src && isImage(settings, src)) {
+ src = retinaUrl(settings, src);
+ img = document.createElement('img');
+ img.src = src;
+ }
+ });
+ }
+ } else {
+ $groupControls.hide();
+ }
+
+ if (settings.get('iframe')) {
+ iframe = document.createElement('iframe');
+
+ if ('frameBorder' in iframe) {
+ iframe.frameBorder = 0;
+ }
+
+ if ('allowTransparency' in iframe) {
+ iframe.allowTransparency = "true";
+ }
+
+ if (!settings.get('scrolling')) {
+ iframe.scrolling = "no";
+ }
+
+ $(iframe)
+ .attr({
+ src: settings.get('href'),
+ name: (new Date()).getTime(), // give the iframe a unique name to prevent caching
+ 'class': prefix + 'Iframe',
+ allowFullScreen : true // allow HTML5 video to go fullscreen
+ })
+ .one('load', complete)
+ .appendTo($loaded);
+
+ $events.one(event_purge, function () {
+ iframe.src = "//about:blank";
+ });
+
+ if (settings.get('fastIframe')) {
+ $(iframe).trigger('load');
+ }
+ } else {
+ complete();
+ }
+
+ if (settings.get('transition') === 'fade') {
+ $box.fadeTo(speed, 1, removeFilter);
+ } else {
+ removeFilter();
+ }
+ };
+
+ if (settings.get('transition') === 'fade') {
+ $box.fadeTo(speed, 0, function () {
+ publicMethod.position(0, callback);
+ });
+ } else {
+ publicMethod.position(speed, callback);
+ }
+ };
+
+ function load () {
+ var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
+
+ active = true;
+
+ photo = false;
+
+ trigger(event_purge);
+ trigger(event_load);
+ settings.get('onLoad');
+
+ settings.h = settings.get('height') ?
+ setSize(settings.get('height'), 'y') - loadedHeight - interfaceHeight :
+ settings.get('innerHeight') && setSize(settings.get('innerHeight'), 'y');
+
+ settings.w = settings.get('width') ?
+ setSize(settings.get('width'), 'x') - loadedWidth - interfaceWidth :
+ settings.get('innerWidth') && setSize(settings.get('innerWidth'), 'x');
+
+ // Sets the minimum dimensions for use in image scaling
+ settings.mw = settings.w;
+ settings.mh = settings.h;
+
+ // Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
+ // If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
+ if (settings.get('maxWidth')) {
+ settings.mw = setSize(settings.get('maxWidth'), 'x') - loadedWidth - interfaceWidth;
+ settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
+ }
+ if (settings.get('maxHeight')) {
+ settings.mh = setSize(settings.get('maxHeight'), 'y') - loadedHeight - interfaceHeight;
+ settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
+ }
+
+ href = settings.get('href');
+
+ loadingTimer = setTimeout(function () {
+ $loadingOverlay.show();
+ }, 100);
+
+ if (settings.get('inline')) {
+ var $target = $(href);
+ // Inserts an empty placeholder where inline content is being pulled from.
+ // An event is bound to put inline content back when Colorbox closes or loads new content.
+ $inline = $('<div>').hide().insertBefore($target);
+
+ $events.one(event_purge, function () {
+ $inline.replaceWith($target);
+ });
+
+ prep($target);
+ } else if (settings.get('iframe')) {
+ // IFrame element won't be added to the DOM until it is ready to be displayed,
+ // to avoid problems with DOM-ready JS that might be trying to run in that iframe.
+ prep(" ");
+ } else if (settings.get('html')) {
+ prep(settings.get('html'));
+ } else if (isImage(settings, href)) {
+
+ href = retinaUrl(settings, href);
+
+ photo = new Image();
+
+ $(photo)
+ .addClass(prefix + 'Photo')
+ .bind('error',function () {
+ prep($tag(div, 'Error').html(settings.get('imgError')));
+ })
+ .one('load', function () {
+ if (request !== requests) {
+ return;
+ }
+
+ // A small pause because some browsers will occassionaly report a
+ // img.width and img.height of zero immediately after the img.onload fires
+ setTimeout(function(){
+ var percent;
+
+ $.each(['alt', 'longdesc', 'aria-describedby'], function(i,val){
+ var attr = $(settings.el).attr(val) || $(settings.el).attr('data-'+val);
+ if (attr) {
+ photo.setAttribute(val, attr);
+ }
+ });
+
+ if (settings.get('retinaImage') && window.devicePixelRatio > 1) {
+ photo.height = photo.height / window.devicePixelRatio;
+ photo.width = photo.width / window.devicePixelRatio;
+ }
+
+ if (settings.get('scalePhotos')) {
+ setResize = function () {
+ photo.height -= photo.height * percent;
+ photo.width -= photo.width * percent;
+ };
+ if (settings.mw && photo.width > settings.mw) {
+ percent = (photo.width - settings.mw) / photo.width;
+ setResize();
+ }
+ if (settings.mh && photo.height > settings.mh) {
+ percent = (photo.height - settings.mh) / photo.height;
+ setResize();
+ }
+ }
+
+ if (settings.h) {
+ photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px';
+ }
+
+ if ($related[1] && (settings.get('loop') || $related[index + 1])) {
+ photo.style.cursor = 'pointer';
+ photo.onclick = function () {
+ publicMethod.next();
+ };
+ }
+
+ photo.style.width = photo.width + 'px';
+ photo.style.height = photo.height + 'px';
+ prep(photo);
+ }, 1);
+ });
+
+ photo.src = href;
+
+ } else if (href) {
+ $loadingBay.load(href, settings.get('data'), function (data, status) {
+ if (request === requests) {
+ prep(status === 'error' ? $tag(div, 'Error').html(settings.get('xhrError')) : $(this).contents());
+ }
+ });
+ }
+ }
+
+ // Navigates to the next page/image in a set.
+ publicMethod.next = function () {
+ if (!active && $related[1] && (settings.get('loop') || $related[index + 1])) {
+ index = getIndex(1);
+ launch($related[index]);
+ }
+ };
+
+ publicMethod.prev = function () {
+ if (!active && $related[1] && (settings.get('loop') || index)) {
+ index = getIndex(-1);
+ launch($related[index]);
+ }
+ };
+
+ // Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close();
+ publicMethod.close = function () {
+ if (open && !closing) {
+
+ closing = true;
+ open = false;
+ trigger(event_cleanup);
+ settings.get('onCleanup');
+ $window.unbind('.' + prefix);
+ $overlay.fadeTo(settings.get('fadeOut') || 0, 0);
+
+ $box.stop().fadeTo(settings.get('fadeOut') || 0, 0, function () {
+ $box.hide();
+ $overlay.hide();
+ trigger(event_purge);
+ $loaded.remove();
+
+ setTimeout(function () {
+ closing = false;
+ trigger(event_closed);
+ settings.get('onClosed');
+ }, 1);
+ });
+ }
+ };
+
+ // Removes changes Colorbox made to the document, but does not remove the plugin.
+ publicMethod.remove = function () {
+ if (!$box) { return; }
+
+ $box.stop();
+ $[colorbox].close();
+ $box.stop(false, true).remove();
+ $overlay.remove();
+ closing = false;
+ $box = null;
+ $('.' + boxElement)
+ .removeData(colorbox)
+ .removeClass(boxElement);
+
+ $(document).unbind('click.'+prefix).unbind('keydown.'+prefix);
+ };
+
+ // A method for fetching the current element Colorbox is referencing.
+ // returns a jQuery object.
+ publicMethod.element = function () {
+ return $(settings.el);
+ };
+
+ publicMethod.settings = defaults;
+
+}(jQuery, document, window));
diff --git a/assets/javascripts/plugins/jquery.fancybox-1.3.1.pack.js b/assets/javascripts/plugins/jquery.fancybox-1.3.1.pack.js
deleted file mode 100644
index 8421d53..0000000
--- a/assets/javascripts/plugins/jquery.fancybox-1.3.1.pack.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * FancyBox - jQuery Plugin
- * Simple and fancy lightbox alternative
- *
- * Examples and documentation at: http://fancybox.net
- *
- * Copyright (c) 2008 - 2010 Janis Skarnelis
- *
- * Version: 1.3.1 (05/03/2010)
- * Requires: jQuery v1.3+
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
-
-(function(b){var m,u,x,g,D,i,z,A,B,p=0,e={},q=[],n=0,c={},j=[],E=null,s=new Image,G=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,S=/[^\.]\.(swf)\s*$/i,H,I=1,k,l,h=false,y=b.extend(b("<div/>")[0],{prop:0}),v=0,O=!b.support.opacity&&!window.XMLHttpRequest,J=function(){u.hide();s.onerror=s.onload=null;E&&E.abort();m.empty()},P=function(){b.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>',{scrolling:"no",padding:20,transitionIn:"none",transition [...]
-K=function(){return[b(window).width(),b(window).height(),b(document).scrollLeft(),b(document).scrollTop()]},T=function(){var a=K(),d={},f=c.margin,o=c.autoScale,t=(20+f)*2,w=(20+f)*2,r=c.padding*2;if(c.width.toString().indexOf("%")>-1){d.width=a[0]*parseFloat(c.width)/100-40;o=false}else d.width=c.width+r;if(c.height.toString().indexOf("%")>-1){d.height=a[1]*parseFloat(c.height)/100-40;o=false}else d.height=c.height+r;if(o&&(d.width>a[0]-t||d.height>a[1]-w))if(e.type=="image"||e.type=="s [...]
-w+=r;o=Math.min(Math.min(a[0]-t,c.width)/c.width,Math.min(a[1]-w,c.height)/c.height);d.width=Math.round(o*(d.width-r))+r;d.height=Math.round(o*(d.height-r))+r}else{d.width=Math.min(d.width,a[0]-t);d.height=Math.min(d.height,a[1]-w)}d.top=a[3]+(a[1]-(d.height+40))*0.5;d.left=a[2]+(a[0]-(d.width+40))*0.5;if(c.autoScale===false){d.top=Math.max(a[3]+f,d.top);d.left=Math.max(a[2]+f,d.left)}return d},U=function(a){if(a&&a.length)switch(c.titlePosition){case "inside":return a;case "over":return [...]
-a+"</span>";default:return'<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">'+a+'</span><span id="fancybox-title-right"></span></span>'}return false},V=function(){var a=c.title,d=l.width-c.padding*2,f="fancybox-title-"+c.titlePosition;b("#fancybox-title").remove();v=0;if(c.titleShow!==false){a=b.isFunction(c.titleFormat)?c.titleFormat(a,j,n,c):U(a);if(!(!a||a==="")){b('<div id="fancybox-title" class="'+f+'" />').css({width:d,paddingLeft: [...]
-paddingRight:c.padding}).html(a).appendTo("body");switch(c.titlePosition){case "inside":v=b("#fancybox-title").outerHeight(true)-c.padding;l.height+=v;break;case "over":b("#fancybox-title").css("bottom",c.padding);break;default:b("#fancybox-title").css("bottom",b("#fancybox-title").outerHeight(true)*-1);break}b("#fancybox-title").appendTo(D).hide()}}},W=function(){b(document).unbind("keydown.fb").bind("keydown.fb",function(a){if(a.keyCode==27&&c.enableEscapeButton){a.preventDefault();b.f [...]
-37){a.preventDefault();b.fancybox.prev()}else if(a.keyCode==39){a.preventDefault();b.fancybox.next()}});if(b.fn.mousewheel){g.unbind("mousewheel.fb");j.length>1&&g.bind("mousewheel.fb",function(a,d){a.preventDefault();h||d===0||(d>0?b.fancybox.prev():b.fancybox.next())})}if(c.showNavArrows){if(c.cyclic&&j.length>1||n!==0)A.show();if(c.cyclic&&j.length>1||n!=j.length-1)B.show()}},X=function(){var a,d;if(j.length-1>n){a=j[n+1].href;if(typeof a!=="undefined"&&a.match(G)){d=new Image;d.src=a [...]
-j[n-1].href;if(typeof a!=="undefined"&&a.match(G)){d=new Image;d.src=a}}},L=function(){i.css("overflow",c.scrolling=="auto"?c.type=="image"||c.type=="iframe"||c.type=="swf"?"hidden":"auto":c.scrolling=="yes"?"auto":"visible");if(!b.support.opacity){i.get(0).style.removeAttribute("filter");g.get(0).style.removeAttribute("filter")}b("#fancybox-title").show();c.hideOnContentClick&&i.one("click",b.fancybox.close);c.hideOnOverlayClick&&x.one("click",b.fancybox.close);c.showCloseButton&&z.show [...]
-b.fancybox.center);c.centerOnScroll?b(window).bind("scroll.fb",b.fancybox.center):b(window).unbind("scroll.fb");b.isFunction(c.onComplete)&&c.onComplete(j,n,c);h=false;X()},M=function(a){var d=Math.round(k.width+(l.width-k.width)*a),f=Math.round(k.height+(l.height-k.height)*a),o=Math.round(k.top+(l.top-k.top)*a),t=Math.round(k.left+(l.left-k.left)*a);g.css({width:d+"px",height:f+"px",top:o+"px",left:t+"px"});d=Math.max(d-c.padding*2,0);f=Math.max(f-(c.padding*2+v*a),0);i.css({width:d+"px [...]
-"px"});if(typeof l.opacity!=="undefined")g.css("opacity",a<0.5?0.5:a)},Y=function(a){var d=a.offset();d.top+=parseFloat(a.css("paddingTop"))||0;d.left+=parseFloat(a.css("paddingLeft"))||0;d.top+=parseFloat(a.css("border-top-width"))||0;d.left+=parseFloat(a.css("border-left-width"))||0;d.width=a.width();d.height=a.height();return d},Q=function(){var a=e.orig?b(e.orig):false,d={};if(a&&a.length){a=Y(a);d={width:a.width+c.padding*2,height:a.height+c.padding*2,top:a.top-c.padding-20,left:a.l [...]
-20}}else{a=K();d={width:1,height:1,top:a[3]+a[1]*0.5,left:a[2]+a[0]*0.5}}return d},N=function(){u.hide();if(g.is(":visible")&&b.isFunction(c.onCleanup))if(c.onCleanup(j,n,c)===false){b.event.trigger("fancybox-cancel");h=false;return}j=q;n=p;c=e;i.get(0).scrollTop=0;i.get(0).scrollLeft=0;if(c.overlayShow){O&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="i [...]
-x.css({"background-color":c.overlayColor,opacity:c.overlayOpacity}).unbind().show()}l=T();V();if(g.is(":visible")){b(z.add(A).add(B)).hide();var a=g.position(),d;k={top:a.top,left:a.left,width:g.width(),height:g.height()};d=k.width==l.width&&k.height==l.height;i.fadeOut(c.changeFade,function(){var f=function(){i.html(m.contents()).fadeIn(c.changeFade,L)};b.event.trigger("fancybox-change");i.empty().css("overflow","hidden");if(d){i.css({top:c.padding,left:c.padding,width:Math.max(l.width- [...]
-2,1),height:Math.max(l.height-c.padding*2-v,1)});f()}else{i.css({top:c.padding,left:c.padding,width:Math.max(k.width-c.padding*2,1),height:Math.max(k.height-c.padding*2,1)});y.prop=0;b(y).animate({prop:1},{duration:c.changeSpeed,easing:c.easingChange,step:M,complete:f})}})}else{g.css("opacity",1);if(c.transitionIn=="elastic"){k=Q();i.css({top:c.padding,left:c.padding,width:Math.max(k.width-c.padding*2,1),height:Math.max(k.height-c.padding*2,1)}).html(m.contents());g.css(k).show();if(c.op [...]
-0;y.prop=0;b(y).animate({prop:1},{duration:c.speedIn,easing:c.easingIn,step:M,complete:L})}else{i.css({top:c.padding,left:c.padding,width:Math.max(l.width-c.padding*2,1),height:Math.max(l.height-c.padding*2-v,1)}).html(m.contents());g.css(l).fadeIn(c.transitionIn=="none"?0:c.speedIn,L)}}},F=function(){m.width(e.width);m.height(e.height);if(e.width=="auto")e.width=m.width();if(e.height=="auto")e.height=m.height();N()},Z=function(){h=true;e.width=s.width;e.height=s.height;b("<img />").attr [...]
-src:s.src,alt:e.title}).appendTo(m);N()},C=function(){J();var a=q[p],d,f,o,t,w;e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));o=a.title||b(a).title||e.title||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(o===""&&e.orig)o=e.orig.attr("alt");d=a.nodeName&&/^(?:javascript|#)/i.test(a.href)?e.href||null:e.href||a.href||null;if(e.type){f=e.type;if(!d)d=e.content}else if(e.content)f [...]
-"image";else if(d.match(S))f="swf";else if(b(a).hasClass("iframe"))f="iframe";else if(d.match(/#/)){a=d.substr(d.indexOf("#"));f=b(a).length>0?"inline":"ajax"}else f="ajax";else f="inline";e.type=f;e.href=d;e.title=o;if(e.autoDimensions&&e.type!=="iframe"&&e.type!=="swf"){e.width="auto";e.height="auto"}if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=false;e.enableEscapeButton=false;e.showCloseButton=false}if(b.isFunction(e.onStart))if(e.onStart(q,p,e)===fal [...]
-return}m.css("padding",20+e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(i.children())});switch(f){case "html":m.html(e.content);F();break;case "inline":b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(i.children())}).bind("fancybox-cancel",function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fa [...]
-s=new Image;s.onerror=function(){P()};s.onload=function(){s.onerror=null;s.onload=null;Z()};s.src=d;break;case "swf":t='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+d+'"></param>';w="";b.each(e.swf,function(r,R){t+='<param name="'+r+'" value="'+R+'"></param>';w+=" "+r+'="'+R+'"'});t+='<embed src="'+d+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+w+"></embed></object [...]
-F();break;case "ajax":a=d.split("#",2);f=e.ajax.data||{};if(a.length>1){d=a[0];if(typeof f=="string")f+="&selector="+a[1];else f.selector=a[1]}h=false;b.fancybox.showActivity();E=b.ajax(b.extend(e.ajax,{url:d,data:f,error:P,success:function(r){if(E.status==200){m.html(r);F()}}}));break;case "iframe":b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+e.scrolling+'" src="'+e.href+'"></iframe>').appendTo(m);N();break}},$=func [...]
-u).css("top",I*-40+"px");I=(I+1)%12}else clearInterval(H)},aa=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),u=b('<div id="fancybox-loading"><div></div></div>'),x=b('<div id="fancybox-overlay"></div>'),g=b('<div id="fancybox-wrap"></div>'));if(!b.support.opacity){g.addClass("fancybox-ie");u.addClass("fancybox-ie")}D=b('<div id="fancybox-outer"></div>').append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg- [...]
-D.append(i=b('<div id="fancybox-inner"></div>'),z=b('<a id="fancybox-close"></a>'),A=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),B=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));z.click(b.fancybox.close);u.click(b.fancybox.cancel);A.click(function(a){a.preventDefault();b.fancybox.prev()});B.click(function(a){a.preventDefault();b.fancybox.next()});if(O){x.get(0).styl [...]
-"document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");u.get(0).style.setExpression("top","(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");D.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" [...]
-b.fn.fancybox=function(a){b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(d){d.preventDefault();if(!h){h=true;b(this).blur();q=[];p=0;d=b(this).attr("rel")||"";if(!d||d==""||d==="nofollow")q.push(this);else{q=b("a[rel="+d+"], area[rel="+d+"]");p=q.index(this)}C();return false}});return this};b.fancybox=function(a,d){if(!h){h=true;d=typeof d!=="undefined"?d:{};q=[];p=d.index||0;if(b.isArray(a)){for(var f=0,o=a.length;f<o [...]
-"object")b(a[f]).data("fancybox",b.extend({},d,a[f]));else a[f]=b({}).data("fancybox",b.extend({content:a[f]},d));q=jQuery.merge(q,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},d,a));else a=b({}).data("fancybox",b.extend({content:a},d));q.push(a)}if(p>q.length||p<0)p=0;C()}};b.fancybox.showActivity=function(){clearInterval(H);u.show();H=setInterval($,66)};b.fancybox.hideActivity=function(){u.hide()};b.fancybox.next=function(){return b.fancybox.pos(n+1)};b.fancybox.prev=f [...]
-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a,10);if(a>-1&&j.length>a){p=a;C()}if(c.cyclic&&j.length>1&&a<0){p=j.length-1;C()}if(c.cyclic&&j.length>1&&a>=j.length){p=0;C()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");J();e&&b.isFunction(e.onCancel)&&e.onCancel(q,p,e);h=false}};b.fancybox.close=function(){function a(){x.fadeOut("fast");g.hide();b.event.trigger("fancybox-cleanup");i.empty();b.isFunction(c.onClosed)&&c.onClosed(j,n,c);j=e=[];n=p=0;c= [...]
-if(!(h||g.is(":hidden"))){h=true;if(c&&b.isFunction(c.onCleanup))if(c.onCleanup(j,n,c)===false){h=false;return}J();b(z.add(A).add(B)).hide();b("#fancybox-title").remove();g.add(i).add(x).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");i.css("overflow","hidden");if(c.transitionOut=="elastic"){k=Q();var d=g.position();l={top:d.top,left:d.left,width:g.width(),height:g.height()};if(c.opacity)l.opacity=1;y.prop=1;b(y).animate({prop:0},{duration:c.speedOut,eas [...]
-step:M,complete:a})}else g.fadeOut(c.transitionOut=="none"?0:c.speedOut,a)}};b.fancybox.resize=function(){var a,d;if(!(h||g.is(":hidden"))){h=true;a=i.wrapInner("<div style='overflow:auto'></div>").children();d=a.height();g.css({height:d+c.padding*2+v});i.css({height:d});a.replaceWith(a.children());b.fancybox.center()}};b.fancybox.center=function(){h=true;var a=K(),d=c.margin,f={};f.top=a[3]+(a[1]-(g.height()-v+40))*0.5;f.left=a[2]+(a[0]-(g.width()+40))*0.5;f.top=Math.max(a[3]+d,f.top);f [...]
-d,f.left);g.css(f);h=false};b.fn.fancybox.defaults={padding:10,margin:20,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.3,overlayColor:"#666",titleShow:true,titlePosition:"outside",titleFormat:null,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFad [...]
-easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,onStart:null,onCancel:null,onComplete:null,onCleanup:null,onClosed:null};b(document).ready(function(){aa()})})(jQuery);
\ No newline at end of file
diff --git a/assets/stylesheets/plugins/jquery.colorbox.css b/assets/stylesheets/plugins/jquery.colorbox.css
new file mode 100644
index 0000000..4b38bde
--- /dev/null
+++ b/assets/stylesheets/plugins/jquery.colorbox.css
@@ -0,0 +1,52 @@
+/*
+ ColorBox Core Style:
+ The following CSS is consistent between example themes and should not be altered.
+*/
+#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
+#cboxOverlay{position:fixed; width:100%; height:100%;}
+#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
+#cboxContent{position:relative;}
+#cboxLoadedContent{overflow:auto;}
+#cboxTitle{margin:0;}
+#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
+#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
+.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;}
+.cboxIframe{width:100%; height:100%; display:block; border:0;}
+#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box;}
+
+/*
+ User Style:
+ Change the following styles to modify the appearance of ColorBox. They are
+ ordered & tabbed in a way that represents the nesting of the generated HTML.
+*/
+#cboxOverlay{background:#000;}
+#colorbox{}
+ #cboxTopLeft{width:14px; height:14px; background:url(colorbox/controls.png) no-repeat 0 0;}
+ #cboxTopCenter{height:14px; background:url(colorbox/border.png) repeat-x top left;}
+ #cboxTopRight{width:14px; height:14px; background:url(colorbox/controls.png) no-repeat -36px 0;}
+ #cboxBottomLeft{width:14px; height:43px; background:url(colorbox/controls.png) no-repeat 0 -32px;}
+ #cboxBottomCenter{height:43px; background:url(colorbox/border.png) repeat-x bottom left;}
+ #cboxBottomRight{width:14px; height:43px; background:url(colorbox/controls.png) no-repeat -36px -32px;}
+ #cboxMiddleLeft{width:14px; background:url(colorbox/controls.png) repeat-y -175px 0;}
+ #cboxMiddleRight{width:14px; background:url(colorbox/controls.png) repeat-y -211px 0;}
+ #cboxContent{background:#fff; overflow:visible;}
+ .cboxIframe{background:#fff;}
+ #cboxError{padding:50px; border:1px solid #ccc;}
+ #cboxLoadedContent{margin-bottom:5px;}
+ #cboxLoadingOverlay{background:url(colorbox/loading_background.png) no-repeat center center;}
+ #cboxLoadingGraphic{background:url(colorbox/loading.gif) no-repeat center center;}
+ #cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;}
+ #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;}
+
+ #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(colorbox/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
+ #cboxPrevious{left:0px; background-position: -51px -25px;}
+ #cboxPrevious:hover{background-position:-51px 0px;}
+ #cboxNext{left:27px; background-position:-75px -25px;}
+ #cboxNext:hover{background-position:-75px 0px;}
+ #cboxClose{right:0; background-position:-100px -25px;}
+ #cboxClose:hover{background-position:-100px 0px;}
+
+ .cboxSlideshow_on #cboxSlideshow{background-position:-125px 0px; right:27px;}
+ .cboxSlideshow_on #cboxSlideshow:hover{background-position:-150px 0px;}
+ .cboxSlideshow_off #cboxSlideshow{background-position:-150px -25px; right:27px;}
+ .cboxSlideshow_off #cboxSlideshow:hover{background-position:-125px 0px;}
diff --git a/assets/stylesheets/plugins/jquery.fancybox-1.3.1.css b/assets/stylesheets/plugins/jquery.fancybox-1.3.1.css
deleted file mode 100644
index 28bbb13..0000000
--- a/assets/stylesheets/plugins/jquery.fancybox-1.3.1.css
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * FancyBox - jQuery Plugin
- * Simple and fancy lightbox alternative
- *
- * Examples and documentation at: http://fancybox.net
- *
- * Copyright (c) 2008 - 2010 Janis Skarnelis
- *
- * Version: 1.3.1 (05/03/2010)
- * Requires: jQuery v1.3+
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
-
-#fancybox-loading {
- position: fixed;
- top: 50%;
- left: 50%;
- height: 40px;
- width: 40px;
- margin-top: -20px;
- margin-left: -20px;
- cursor: pointer;
- overflow: hidden;
- z-index: 1104;
- display: none;
-}
-
-* html #fancybox-loading { /* IE6 */
- position: absolute;
- margin-top: 0;
-}
-
-#fancybox-loading div {
- position: absolute;
- top: 0;
- left: 0;
- width: 40px;
- height: 480px;
- background-image: url('fancybox.png');
-}
-
-#fancybox-overlay {
- position: fixed;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- background: #000;
- z-index: 1100;
- display: none;
-}
-
-* html #fancybox-overlay { /* IE6 */
- position: absolute;
- width: 100%;
-}
-
-#fancybox-tmp {
- padding: 0;
- margin: 0;
- border: 0;
- overflow: auto;
- display: none;
-}
-
-#fancybox-wrap {
- position: absolute;
- top: 0;
- left: 0;
- margin: 0;
- padding: 20px;
- z-index: 1101;
- display: none;
-}
-
-#fancybox-outer {
- position: relative;
- width: 100%;
- height: 100%;
- background: #FFF;
-}
-
-#fancybox-inner {
- position: absolute;
- top: 0;
- left: 0;
- width: 1px;
- height: 1px;
- padding: 0;
- margin: 0;
- outline: none;
- overflow: hidden;
-}
-
-#fancybox-hide-sel-frame {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: transparent;
-}
-
-#fancybox-close {
- position: absolute;
- top: -15px;
- right: -15px;
- width: 30px;
- height: 30px;
- background-image: url('fancybox.png');
- background-position: -40px 0px;
- cursor: pointer;
- z-index: 1103;
- display: none;
-}
-
-#fancybox_error {
- color: #444;
- font: normal 12px/20px Arial;
- padding: 7px;
- margin: 0;
-}
-
-#fancybox-content {
- height: auto;
- width: auto;
- padding: 0;
- margin: 0;
-}
-
-#fancybox-img {
- width: 100%;
- height: 100%;
- padding: 0;
- margin: 0;
- border: none;
- outline: none;
- line-height: 0;
- vertical-align: top;
- -ms-interpolation-mode: bicubic;
-}
-
-#fancybox-frame {
- position: relative;
- width: 100%;
- height: 100%;
- border: none;
- display: block;
-}
-
-#fancybox-title {
- position: absolute;
- bottom: 0;
- left: 0;
- font-family: Arial;
- font-size: 12px;
- z-index: 1102;
-}
-
-.fancybox-title-inside {
- padding: 10px 0;
- text-align: center;
- color: #333;
-}
-
-.fancybox-title-outside {
- padding-top: 5px;
- color: #FFF;
- text-align: center;
- font-weight: bold;
-}
-
-.fancybox-title-over {
- color: #FFF;
- text-align: left;
-}
-
-#fancybox-title-over {
- padding: 10px;
- background-image: url('fancy_title_over.png');
- display: block;
-}
-
-#fancybox-title-wrap {
- display: inline-block;
-}
-
-#fancybox-title-wrap span {
- height: 32px;
- float: left;
-}
-
-#fancybox-title-left {
- padding-left: 15px;
- background-image: url('fancybox.png');
- background-position: -40px -90px;
- background-repeat: no-repeat;
-}
-
-#fancybox-title-main {
- font-weight: bold;
- line-height: 29px;
- background-image: url('fancybox-x.png');
- background-position: 0px -40px;
- color: #FFF;
-}
-
-#fancybox-title-right {
- padding-left: 15px;
- background-image: url('fancybox.png');
- background-position: -55px -90px;
- background-repeat: no-repeat;
-}
-
-#fancybox-left, #fancybox-right {
- position: absolute;
- bottom: 0px;
- height: 100%;
- width: 35%;
- cursor: pointer;
- outline: none;
- background-image: url('blank.gif');
- z-index: 1102;
- display: none;
-}
-
-#fancybox-left {
- left: 0px;
-}
-
-#fancybox-right {
- right: 0px;
-}
-
-#fancybox-left-ico, #fancybox-right-ico {
- position: absolute;
- top: 50%;
- left: -9999px;
- width: 30px;
- height: 30px;
- margin-top: -15px;
- cursor: pointer;
- z-index: 1102;
- display: block;
-}
-
-#fancybox-left-ico {
- background-image: url('fancybox.png');
- background-position: -40px -30px;
-}
-
-#fancybox-right-ico {
- background-image: url('fancybox.png');
- background-position: -40px -60px;
-}
-
-#fancybox-left:hover, #fancybox-right:hover {
- visibility: visible; /* IE6 */
-}
-
-#fancybox-left:hover span {
- left: 20px;
-}
-
-#fancybox-right:hover span {
- left: auto;
- right: 20px;
-}
-
-.fancy-bg {
- position: absolute;
- padding: 0;
- margin: 0;
- border: 0;
- width: 20px;
- height: 20px;
- z-index: 1001;
-}
-
-#fancy-bg-n {
- top: -20px;
- left: 0;
- width: 100%;
- background-image: url('fancybox-x.png');
-}
-
-#fancy-bg-ne {
- top: -20px;
- right: -20px;
- background-image: url('fancybox.png');
- background-position: -40px -162px;
-}
-
-#fancy-bg-e {
- top: 0;
- right: -20px;
- height: 100%;
- background-image: url('fancybox-y.png');
- background-position: -20px 0px;
-}
-
-#fancy-bg-se {
- bottom: -20px;
- right: -20px;
- background-image: url('fancybox.png');
- background-position: -40px -182px;
-}
-
-#fancy-bg-s {
- bottom: -20px;
- left: 0;
- width: 100%;
- background-image: url('fancybox-x.png');
- background-position: 0px -20px;
-}
-
-#fancy-bg-sw {
- bottom: -20px;
- left: -20px;
- background-image: url('fancybox.png');
- background-position: -40px -142px;
-}
-
-#fancy-bg-w {
- top: 0;
- left: -20px;
- height: 100%;
- background-image: url('fancybox-y.png');
-}
-
-#fancy-bg-nw {
- top: -20px;
- left: -20px;
- background-image: url('fancybox.png');
- background-position: -40px -122px;
-}
-
-/* IE */
-
-#fancybox-loading.fancybox-ie div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
-.fancybox-ie #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
-
-.fancybox-ie #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
-.fancybox-ie #fancybox-title-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
-.fancybox-ie #fancybox-title-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
-.fancybox-ie #fancybox-title-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
-
-.fancybox-ie #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
-.fancybox-ie #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
-
-.fancybox-ie .fancy-bg { background: transparent !important; }
-
-.fancybox-ie #fancy-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
diff --git a/lib/simplecov-html.rb b/lib/simplecov-html.rb
index 76f3de4..1b979e9 100644
--- a/lib/simplecov-html.rb
+++ b/lib/simplecov-html.rb
@@ -1,100 +1,110 @@
-require 'erb'
-require 'cgi'
-require 'fileutils'
-require 'digest/sha1'
-require 'time'
+require "erb"
+require "cgi"
+require "fileutils"
+require "digest/sha1"
+require "time"
# Ensure we are using a compatible version of SimpleCov
-if Gem::Version.new(SimpleCov::VERSION) < Gem::Version.new("0.7.1")
- raise RuntimeError, "The version of SimpleCov you are using is too old. Please update with `gem install simplecov` or `bundle update simplecov`"
+major, minor, patch = SimpleCov::VERSION.scan(/\d+/).first(3).map(&:to_i)
+if major < 0 || minor < 9 || patch < 0
+ fail "The version of SimpleCov you are using is too old. "\
+ "Please update with `gem install simplecov` or `bundle update simplecov`"
end
-class SimpleCov::Formatter::HTMLFormatter
- def format(result)
- Dir[File.join(File.dirname(__FILE__), '../public/*')].each do |path|
- FileUtils.cp_r(path, asset_output_path)
+module SimpleCov
+ module Formatter
+ class HTMLFormatter
+ def format(result)
+ Dir[File.join(File.dirname(__FILE__), "../public/*")].each do |path|
+ FileUtils.cp_r(path, asset_output_path)
+ end
+
+ File.open(File.join(output_path, "index.html"), "wb") do |file|
+ file.puts template("layout").result(binding)
+ end
+ puts output_message(result)
+ end
+
+ def output_message(result)
+ "Coverage report generated for #{result.command_name} to #{output_path}. #{result.covered_lines} / #{result.total_lines} LOC (#{result.covered_percent.round(2)}%) covered."
+ end
+
+ private
+
+ # Returns the an erb instance for the template of given name
+ def template(name)
+ ERB.new(File.read(File.join(File.dirname(__FILE__), "../views/", "#{name}.erb")))
+ end
+
+ def output_path
+ SimpleCov.coverage_path
+ end
+
+ def asset_output_path
+ return @asset_output_path if defined?(@asset_output_path) && @asset_output_path
+ @asset_output_path = File.join(output_path, "assets", SimpleCov::Formatter::HTMLFormatter::VERSION)
+ FileUtils.mkdir_p(@asset_output_path)
+ @asset_output_path
+ end
+
+ def assets_path(name)
+ File.join("./assets", SimpleCov::Formatter::HTMLFormatter::VERSION, name)
+ end
+
+ # Returns the html for the given source_file
+ def formatted_source_file(source_file)
+ template("source_file").result(binding)
+ end
+
+ # Returns a table containing the given source files
+ def formatted_file_list(title, source_files)
+ title_id = title.gsub(/^[^a-zA-Z]+/, "").gsub(/[^a-zA-Z0-9\-\_]/, "")
+ # Silence a warning by using the following variable to assign to itself:
+ # "warning: possibly useless use of a variable in void context"
+ # The variable is used by ERB via binding.
+ title_id = title_id
+ template("file_list").result(binding)
+ end
+
+ def coverage_css_class(covered_percent)
+ if covered_percent > 90
+ "green"
+ elsif covered_percent > 80
+ "yellow"
+ else
+ "red"
+ end
+ end
+
+ def strength_css_class(covered_strength)
+ if covered_strength > 1
+ "green"
+ elsif covered_strength == 1
+ "yellow"
+ else
+ "red"
+ end
+ end
+
+ # Return a (kind of) unique id for the source file given. Uses SHA1 on path for the id
+ def id(source_file)
+ Digest::SHA1.hexdigest(source_file.filename)
+ end
+
+ def timeago(time)
+ "<abbr class=\"timeago\" title=\"#{time.iso8601}\">#{time.iso8601}</abbr>"
+ end
+
+ def shortened_filename(source_file)
+ source_file.filename.gsub(SimpleCov.root, ".").gsub(/^\.\//, "")
+ end
+
+ def link_to_source_file(source_file)
+ %(<a href="##{id source_file}" class="src_link" title="#{shortened_filename source_file}">#{shortened_filename source_file}</a>)
+ end
end
-
- File.open(File.join(output_path, "index.html"), "w+") do |file|
- file.puts template('layout').result(binding)
- end
- puts output_message(result)
- end
-
- def output_message(result)
- "Coverage report generated for #{result.command_name} to #{output_path}. #{result.covered_lines} / #{result.total_lines} LOC (#{result.covered_percent.round(2)}%) covered."
- end
-
- private
-
- # Returns the an erb instance for the template of given name
- def template(name)
- ERB.new(File.read(File.join(File.dirname(__FILE__), '../views/', "#{name}.erb")))
- end
-
- def output_path
- SimpleCov.coverage_path
- end
-
- def asset_output_path
- return @asset_output_path if defined? @asset_output_path and @asset_output_path
- @asset_output_path = File.join(output_path, 'assets', SimpleCov::Formatter::HTMLFormatter::VERSION)
- FileUtils.mkdir_p(@asset_output_path)
- @asset_output_path
- end
-
- def assets_path(name)
- File.join('./assets', SimpleCov::Formatter::HTMLFormatter::VERSION, name)
- end
-
- # Returns the html for the given source_file
- def formatted_source_file(source_file)
- template('source_file').result(binding)
- end
-
- # Returns a table containing the given source files
- def formatted_file_list(title, source_files)
- title_id = title.gsub(/^[^a-zA-Z]+/, '').gsub(/[^a-zA-Z0-9\-\_]/, '')
- template('file_list').result(binding)
- end
-
- def coverage_css_class(covered_percent)
- if covered_percent > 90
- 'green'
- elsif covered_percent > 80
- 'yellow'
- else
- 'red'
- end
- end
-
- def strength_css_class(covered_strength)
- if covered_strength > 1
- 'green'
- elsif covered_strength == 1
- 'yellow'
- else
- 'red'
- end
- end
-
- # Return a (kind of) unique id for the source file given. Uses SHA1 on path for the id
- def id(source_file)
- Digest::SHA1.hexdigest(source_file.filename)
- end
-
- def timeago(time)
- "<abbr class=\"timeago\" title=\"#{time.iso8601}\">#{time.iso8601}</abbr>"
- end
-
- def shortened_filename(source_file)
- source_file.filename.gsub(SimpleCov.root, '.').gsub(/^\.\//, '')
- end
-
- def link_to_source_file(source_file)
- %Q(<a href="##{id source_file}" class="src_link" title="#{shortened_filename source_file}">#{shortened_filename source_file}</a>)
end
end
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__)))
-require 'simplecov-html/version'
+require "simplecov-html/version"
diff --git a/lib/simplecov-html/version.rb b/lib/simplecov-html/version.rb
index dc13a5d..ef008db 100644
--- a/lib/simplecov-html/version.rb
+++ b/lib/simplecov-html/version.rb
@@ -1,7 +1,27 @@
module SimpleCov
module Formatter
class HTMLFormatter
- VERSION = "0.7.1"
+ VERSION = "0.10.0"
+
+ def VERSION.to_a
+ split(".").map(&:to_i)
+ end
+
+ def VERSION.major
+ to_a[0]
+ end
+
+ def VERSION.minor
+ to_a[1]
+ end
+
+ def VERSION.patch
+ to_a[2]
+ end
+
+ def VERSION.pre
+ to_a[3]
+ end
end
end
-end
\ No newline at end of file
+end
diff --git a/metadata.yml b/metadata.yml
index d71025e..7a8692e 100644
--- a/metadata.yml
+++ b/metadata.yml
@@ -1,64 +1,29 @@
--- !ruby/object:Gem::Specification
name: simplecov-html
version: !ruby/object:Gem::Version
- version: 0.7.1
- prerelease:
+ version: 0.10.0
platform: ruby
authors:
- Christoph Olszowka
autorequire:
bindir: bin
cert_chain: []
-date: 2012-10-12 00:00:00.000000000 Z
+date: 2015-04-18 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
- name: rake
+ name: bundler
requirement: !ruby/object:Gem::Requirement
- none: false
requirements:
- - - ! '>='
+ - - "~>"
- !ruby/object:Gem::Version
- version: '0'
+ version: '1.9'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
- none: false
requirements:
- - - ! '>='
+ - - "~>"
- !ruby/object:Gem::Version
- version: '0'
-- !ruby/object:Gem::Dependency
- name: sprockets
- requirement: !ruby/object:Gem::Requirement
- none: false
- requirements:
- - - ! '>='
- - !ruby/object:Gem::Version
- version: '0'
- type: :development
- prerelease: false
- version_requirements: !ruby/object:Gem::Requirement
- none: false
- requirements:
- - - ! '>='
- - !ruby/object:Gem::Version
- version: '0'
-- !ruby/object:Gem::Dependency
- name: sass
- requirement: !ruby/object:Gem::Requirement
- none: false
- requirements:
- - - ! '>='
- - !ruby/object:Gem::Version
- version: '0'
- type: :development
- prerelease: false
- version_requirements: !ruby/object:Gem::Requirement
- none: false
- requirements:
- - - ! '>='
- - !ruby/object:Gem::Version
- version: '0'
+ version: '1.9'
description: Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+
email:
- christoph at olszowka de
@@ -66,8 +31,10 @@ executables: []
extensions: []
extra_rdoc_files: []
files:
-- .document
-- .gitignore
+- ".document"
+- ".gitignore"
+- ".rubocop.yml"
+- ".travis.yml"
- Gemfile
- Guardfile
- LICENSE
@@ -76,40 +43,24 @@ files:
- assets/javascripts/application.js
- assets/javascripts/libraries/jquery-1.6.2.min.js
- assets/javascripts/plugins/highlight.pack.js
+- assets/javascripts/plugins/jquery.colorbox.js
- assets/javascripts/plugins/jquery.dataTables.min.js
-- assets/javascripts/plugins/jquery.fancybox-1.3.1.pack.js
- assets/javascripts/plugins/jquery.timeago.js
- assets/javascripts/plugins/jquery.url.js
- assets/stylesheets/application.css
- assets/stylesheets/plugins/highlight.css
- assets/stylesheets/plugins/jquery-ui-1.8.4.custom.css
-- assets/stylesheets/plugins/jquery.fancybox-1.3.1.css
+- assets/stylesheets/plugins/jquery.colorbox.css
- assets/stylesheets/reset.css
- assets/stylesheets/screen.css.sass
- lib/simplecov-html.rb
- lib/simplecov-html/version.rb
- public/application.css
- public/application.js
-- public/fancybox/blank.gif
-- public/fancybox/fancy_close.png
-- public/fancybox/fancy_loading.png
-- public/fancybox/fancy_nav_left.png
-- public/fancybox/fancy_nav_right.png
-- public/fancybox/fancy_shadow_e.png
-- public/fancybox/fancy_shadow_n.png
-- public/fancybox/fancy_shadow_ne.png
-- public/fancybox/fancy_shadow_nw.png
-- public/fancybox/fancy_shadow_s.png
-- public/fancybox/fancy_shadow_se.png
-- public/fancybox/fancy_shadow_sw.png
-- public/fancybox/fancy_shadow_w.png
-- public/fancybox/fancy_title_left.png
-- public/fancybox/fancy_title_main.png
-- public/fancybox/fancy_title_over.png
-- public/fancybox/fancy_title_right.png
-- public/fancybox/fancybox-x.png
-- public/fancybox/fancybox-y.png
-- public/fancybox/fancybox.png
+- public/colorbox/border.png
+- public/colorbox/controls.png
+- public/colorbox/loading.gif
+- public/colorbox/loading_background.png
- public/favicon_green.png
- public/favicon_red.png
- public/favicon_yellow.png
@@ -135,33 +86,29 @@ files:
- views/layout.erb
- views/source_file.erb
homepage: https://github.com/colszowka/simplecov-html
-licenses: []
+licenses:
+- MIT
+metadata: {}
post_install_message:
rdoc_options: []
require_paths:
- lib
required_ruby_version: !ruby/object:Gem::Requirement
- none: false
requirements:
- - - ! '>='
+ - - ">="
- !ruby/object:Gem::Version
- version: '0'
- segments:
- - 0
- hash: -2029583534345238650
+ version: 1.8.7
required_rubygems_version: !ruby/object:Gem::Requirement
- none: false
requirements:
- - - ! '>='
+ - - ">="
- !ruby/object:Gem::Version
version: '0'
- segments:
- - 0
- hash: -2029583534345238650
requirements: []
-rubyforge_project: simplecov-html
-rubygems_version: 1.8.24
+rubyforge_project:
+rubygems_version: 2.4.5
signing_key:
-specification_version: 3
+specification_version: 4
summary: Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+
-test_files: []
+test_files:
+- test/helper.rb
+- test/test_simple_cov-html.rb
diff --git a/public/application.css b/public/application.css
index 1674a02..d865604 100644
--- a/public/application.css
+++ b/public/application.css
@@ -528,369 +528,58 @@ pre .tex .formula {
/* Overlays */
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
-/*
- * FancyBox - jQuery Plugin
- * Simple and fancy lightbox alternative
- *
- * Examples and documentation at: http://fancybox.net
- *
- * Copyright (c) 2008 - 2010 Janis Skarnelis
- *
- * Version: 1.3.1 (05/03/2010)
- * Requires: jQuery v1.3+
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
-
-#fancybox-loading {
- position: fixed;
- top: 50%;
- left: 50%;
- height: 40px;
- width: 40px;
- margin-top: -20px;
- margin-left: -20px;
- cursor: pointer;
- overflow: hidden;
- z-index: 1104;
- display: none;
-}
-
-* html #fancybox-loading { /* IE6 */
- position: absolute;
- margin-top: 0;
-}
-
-#fancybox-loading div {
- position: absolute;
- top: 0;
- left: 0;
- width: 40px;
- height: 480px;
- background-image: url('fancybox.png');
-}
-
-#fancybox-overlay {
- position: fixed;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- background: #000;
- z-index: 1100;
- display: none;
-}
-
-* html #fancybox-overlay { /* IE6 */
- position: absolute;
- width: 100%;
-}
-
-#fancybox-tmp {
- padding: 0;
- margin: 0;
- border: 0;
- overflow: auto;
- display: none;
-}
-
-#fancybox-wrap {
- position: absolute;
- top: 0;
- left: 0;
- margin: 0;
- padding: 20px;
- z-index: 1101;
- display: none;
-}
-
-#fancybox-outer {
- position: relative;
- width: 100%;
- height: 100%;
- background: #FFF;
-}
-
-#fancybox-inner {
- position: absolute;
- top: 0;
- left: 0;
- width: 1px;
- height: 1px;
- padding: 0;
- margin: 0;
- outline: none;
- overflow: hidden;
-}
-
-#fancybox-hide-sel-frame {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: transparent;
-}
-
-#fancybox-close {
- position: absolute;
- top: -15px;
- right: -15px;
- width: 30px;
- height: 30px;
- background-image: url('fancybox.png');
- background-position: -40px 0px;
- cursor: pointer;
- z-index: 1103;
- display: none;
-}
-
-#fancybox_error {
- color: #444;
- font: normal 12px/20px Arial;
- padding: 7px;
- margin: 0;
-}
-
-#fancybox-content {
- height: auto;
- width: auto;
- padding: 0;
- margin: 0;
-}
-
-#fancybox-img {
- width: 100%;
- height: 100%;
- padding: 0;
- margin: 0;
- border: none;
- outline: none;
- line-height: 0;
- vertical-align: top;
- -ms-interpolation-mode: bicubic;
-}
-
-#fancybox-frame {
- position: relative;
- width: 100%;
- height: 100%;
- border: none;
- display: block;
-}
-
-#fancybox-title {
- position: absolute;
- bottom: 0;
- left: 0;
- font-family: Arial;
- font-size: 12px;
- z-index: 1102;
-}
-
-.fancybox-title-inside {
- padding: 10px 0;
- text-align: center;
- color: #333;
-}
-
-.fancybox-title-outside {
- padding-top: 5px;
- color: #FFF;
- text-align: center;
- font-weight: bold;
-}
-
-.fancybox-title-over {
- color: #FFF;
- text-align: left;
-}
-
-#fancybox-title-over {
- padding: 10px;
- background-image: url('fancy_title_over.png');
- display: block;
-}
-
-#fancybox-title-wrap {
- display: inline-block;
-}
-
-#fancybox-title-wrap span {
- height: 32px;
- float: left;
-}
-
-#fancybox-title-left {
- padding-left: 15px;
- background-image: url('fancybox.png');
- background-position: -40px -90px;
- background-repeat: no-repeat;
-}
-
-#fancybox-title-main {
- font-weight: bold;
- line-height: 29px;
- background-image: url('fancybox-x.png');
- background-position: 0px -40px;
- color: #FFF;
-}
-
-#fancybox-title-right {
- padding-left: 15px;
- background-image: url('fancybox.png');
- background-position: -55px -90px;
- background-repeat: no-repeat;
-}
-
-#fancybox-left, #fancybox-right {
- position: absolute;
- bottom: 0px;
- height: 100%;
- width: 35%;
- cursor: pointer;
- outline: none;
- background-image: url('blank.gif');
- z-index: 1102;
- display: none;
-}
-
-#fancybox-left {
- left: 0px;
-}
-
-#fancybox-right {
- right: 0px;
-}
-
-#fancybox-left-ico, #fancybox-right-ico {
- position: absolute;
- top: 50%;
- left: -9999px;
- width: 30px;
- height: 30px;
- margin-top: -15px;
- cursor: pointer;
- z-index: 1102;
- display: block;
-}
-
-#fancybox-left-ico {
- background-image: url('fancybox.png');
- background-position: -40px -30px;
-}
-
-#fancybox-right-ico {
- background-image: url('fancybox.png');
- background-position: -40px -60px;
-}
-
-#fancybox-left:hover, #fancybox-right:hover {
- visibility: visible; /* IE6 */
-}
-
-#fancybox-left:hover span {
- left: 20px;
-}
-
-#fancybox-right:hover span {
- left: auto;
- right: 20px;
-}
-
-.fancy-bg {
- position: absolute;
- padding: 0;
- margin: 0;
- border: 0;
- width: 20px;
- height: 20px;
- z-index: 1001;
-}
-
-#fancy-bg-n {
- top: -20px;
- left: 0;
- width: 100%;
- background-image: url('fancybox-x.png');
-}
-
-#fancy-bg-ne {
- top: -20px;
- right: -20px;
- background-image: url('fancybox.png');
- background-position: -40px -162px;
-}
-
-#fancy-bg-e {
- top: 0;
- right: -20px;
- height: 100%;
- background-image: url('fancybox-y.png');
- background-position: -20px 0px;
-}
-
-#fancy-bg-se {
- bottom: -20px;
- right: -20px;
- background-image: url('fancybox.png');
- background-position: -40px -182px;
-}
-
-#fancy-bg-s {
- bottom: -20px;
- left: 0;
- width: 100%;
- background-image: url('fancybox-x.png');
- background-position: 0px -20px;
-}
-
-#fancy-bg-sw {
- bottom: -20px;
- left: -20px;
- background-image: url('fancybox.png');
- background-position: -40px -142px;
-}
-
-#fancy-bg-w {
- top: 0;
- left: -20px;
- height: 100%;
- background-image: url('fancybox-y.png');
-}
-
-#fancy-bg-nw {
- top: -20px;
- left: -20px;
- background-image: url('fancybox.png');
- background-position: -40px -122px;
-}
-
-/* IE */
-
-#fancybox-loading.fancybox-ie div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
-.fancybox-ie #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
-
-.fancybox-ie #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
-.fancybox-ie #fancybox-title-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
-.fancybox-ie #fancybox-title-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
-.fancybox-ie #fancybox-title-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
-
-.fancybox-ie #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
-.fancybox-ie #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
-
-.fancybox-ie .fancy-bg { background: transparent !important; }
-
-.fancybox-ie #fancy-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
-.fancybox-ie #fancy-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
+/*
+ ColorBox Core Style:
+ The following CSS is consistent between example themes and should not be altered.
+*/
+#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
+#cboxOverlay{position:fixed; width:100%; height:100%;}
+#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
+#cboxContent{position:relative;}
+#cboxLoadedContent{overflow:auto;}
+#cboxTitle{margin:0;}
+#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
+#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
+.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;}
+.cboxIframe{width:100%; height:100%; display:block; border:0;}
+#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box;}
+
+/*
+ User Style:
+ Change the following styles to modify the appearance of ColorBox. They are
+ ordered & tabbed in a way that represents the nesting of the generated HTML.
+*/
+#cboxOverlay{background:#000;}
+#colorbox{}
+ #cboxTopLeft{width:14px; height:14px; background:url(colorbox/controls.png) no-repeat 0 0;}
+ #cboxTopCenter{height:14px; background:url(colorbox/border.png) repeat-x top left;}
+ #cboxTopRight{width:14px; height:14px; background:url(colorbox/controls.png) no-repeat -36px 0;}
+ #cboxBottomLeft{width:14px; height:43px; background:url(colorbox/controls.png) no-repeat 0 -32px;}
+ #cboxBottomCenter{height:43px; background:url(colorbox/border.png) repeat-x bottom left;}
+ #cboxBottomRight{width:14px; height:43px; background:url(colorbox/controls.png) no-repeat -36px -32px;}
+ #cboxMiddleLeft{width:14px; background:url(colorbox/controls.png) repeat-y -175px 0;}
+ #cboxMiddleRight{width:14px; background:url(colorbox/controls.png) repeat-y -211px 0;}
+ #cboxContent{background:#fff; overflow:visible;}
+ .cboxIframe{background:#fff;}
+ #cboxError{padding:50px; border:1px solid #ccc;}
+ #cboxLoadedContent{margin-bottom:5px;}
+ #cboxLoadingOverlay{background:url(colorbox/loading_background.png) no-repeat center center;}
+ #cboxLoadingGraphic{background:url(colorbox/loading.gif) no-repeat center center;}
+ #cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;}
+ #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;}
+
+ #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(colorbox/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
+ #cboxPrevious{left:0px; background-position: -51px -25px;}
+ #cboxPrevious:hover{background-position:-51px 0px;}
+ #cboxNext{left:27px; background-position:-75px -25px;}
+ #cboxNext:hover{background-position:-75px 0px;}
+ #cboxClose{right:0; background-position:-100px -25px;}
+ #cboxClose:hover{background-position:-100px 0px;}
+
+ .cboxSlideshow_on #cboxSlideshow{background-position:-125px 0px; right:27px;}
+ .cboxSlideshow_on #cboxSlideshow:hover{background-position:-150px 0px;}
+ .cboxSlideshow_off #cboxSlideshow{background-position:-150px -25px; right:27px;}
+ .cboxSlideshow_off #cboxSlideshow:hover{background-position:-125px 0px;}
#loading {
position: fixed;
left: 40%;
diff --git a/public/application.js b/public/application.js
index cb2076d..fe65d88 100644
--- a/public/application.js
+++ b/public/application.js
@@ -18,6 +18,1097 @@
shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.tar [...]
)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(v [...]
var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/</gm,"<")}function c(q,p,o){return RegExp(p,"m"+(q.cI?"i":"")+(o?"g":""))}function i(q){for(var o=0;o<q.childNodes.length;o++){var p=q.childNodes[o];if(p.nodeName=="CODE"){return p}if(!(p.nodeType==3&&p.nodeValue.match(/\s+/))){break}}}function g(s,r){var q="";for(var p=0;p<s.childNodes.length;p++){if(s.childNodes[p].nodeType==3){var o=s.childNodes[p].nodeValue;if(r){o=o.replace(/\n/g,"")}q+=o}else{if(s.chi [...]
+/*!
+ Colorbox v1.5.13 - 2014-08-04
+ jQuery lightbox and modal window plugin
+ (c) 2014 Jack Moore - http://www.jacklmoore.com/colorbox
+ license: http://www.opensource.org/licenses/mit-license.php
+ */
+
+(function ($, document, window) {
+ var
+ // Default settings object.
+ // See http://jacklmoore.com/colorbox for details.
+ defaults = {
+ // data sources
+ html: false,
+ photo: false,
+ iframe: false,
+ inline: false,
+
+ // behavior and appearance
+ transition: "elastic",
+ speed: 300,
+ fadeOut: 300,
+ width: false,
+ initialWidth: "600",
+ innerWidth: false,
+ maxWidth: false,
+ height: false,
+ initialHeight: "450",
+ innerHeight: false,
+ maxHeight: false,
+ scalePhotos: true,
+ scrolling: true,
+ opacity: 0.9,
+ preloading: true,
+ className: false,
+ overlayClose: true,
+ escKey: true,
+ arrowKey: true,
+ top: false,
+ bottom: false,
+ left: false,
+ right: false,
+ fixed: false,
+ data: undefined,
+ closeButton: true,
+ fastIframe: true,
+ open: false,
+ reposition: true,
+ loop: true,
+ slideshow: false,
+ slideshowAuto: true,
+ slideshowSpeed: 2500,
+ slideshowStart: "start slideshow",
+ slideshowStop: "stop slideshow",
+ photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
+
+ // alternate image paths for high-res displays
+ retinaImage: false,
+ retinaUrl: false,
+ retinaSuffix: '@2x.$1',
+
+ // internationalization
+ current: "image {current} of {total}",
+ previous: "previous",
+ next: "next",
+ close: "close",
+ xhrError: "This content failed to load.",
+ imgError: "This image failed to load.",
+
+ // accessbility
+ returnFocus: true,
+ trapFocus: true,
+
+ // callbacks
+ onOpen: false,
+ onLoad: false,
+ onComplete: false,
+ onCleanup: false,
+ onClosed: false,
+
+ rel: function() {
+ return this.rel;
+ },
+ href: function() {
+ // using this.href would give the absolute url, when the href may have been inteded as a selector (e.g. '#container')
+ return $(this).attr('href');
+ },
+ title: function() {
+ return this.title;
+ }
+ },
+
+ // Abstracting the HTML and event identifiers for easy rebranding
+ colorbox = 'colorbox',
+ prefix = 'cbox',
+ boxElement = prefix + 'Element',
+
+ // Events
+ event_open = prefix + '_open',
+ event_load = prefix + '_load',
+ event_complete = prefix + '_complete',
+ event_cleanup = prefix + '_cleanup',
+ event_closed = prefix + '_closed',
+ event_purge = prefix + '_purge',
+
+ // Cached jQuery Object Variables
+ $overlay,
+ $box,
+ $wrap,
+ $content,
+ $topBorder,
+ $leftBorder,
+ $rightBorder,
+ $bottomBorder,
+ $related,
+ $window,
+ $loaded,
+ $loadingBay,
+ $loadingOverlay,
+ $title,
+ $current,
+ $slideshow,
+ $next,
+ $prev,
+ $close,
+ $groupControls,
+ $events = $('<a/>'), // $({}) would be prefered, but there is an issue with jQuery 1.4.2
+
+ // Variables for cached values or use across multiple functions
+ settings,
+ interfaceHeight,
+ interfaceWidth,
+ loadedHeight,
+ loadedWidth,
+ index,
+ photo,
+ open,
+ active,
+ closing,
+ loadingTimer,
+ publicMethod,
+ div = "div",
+ requests = 0,
+ previousCSS = {},
+ init;
+
+ // ****************
+ // HELPER FUNCTIONS
+ // ****************
+
+ // Convenience function for creating new jQuery objects
+ function $tag(tag, id, css) {
+ var element = document.createElement(tag);
+
+ if (id) {
+ element.id = prefix + id;
+ }
+
+ if (css) {
+ element.style.cssText = css;
+ }
+
+ return $(element);
+ }
+
+ // Get the window height using innerHeight when available to avoid an issue with iOS
+ // http://bugs.jquery.com/ticket/6724
+ function winheight() {
+ return window.innerHeight ? window.innerHeight : $(window).height();
+ }
+
+ function Settings(element, options) {
+ if (options !== Object(options)) {
+ options = {};
+ }
+
+ this.cache = {};
+ this.el = element;
+
+ this.value = function(key) {
+ var dataAttr;
+
+ if (this.cache[key] === undefined) {
+ dataAttr = $(this.el).attr('data-cbox-'+key);
+
+ if (dataAttr !== undefined) {
+ this.cache[key] = dataAttr;
+ } else if (options[key] !== undefined) {
+ this.cache[key] = options[key];
+ } else if (defaults[key] !== undefined) {
+ this.cache[key] = defaults[key];
+ }
+ }
+
+ return this.cache[key];
+ };
+
+ this.get = function(key) {
+ var value = this.value(key);
+ return $.isFunction(value) ? value.call(this.el, this) : value;
+ };
+ }
+
+ // Determine the next and previous members in a group.
+ function getIndex(increment) {
+ var
+ max = $related.length,
+ newIndex = (index + increment) % max;
+
+ return (newIndex < 0) ? max + newIndex : newIndex;
+ }
+
+ // Convert '%' and 'px' values to integers
+ function setSize(size, dimension) {
+ return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));
+ }
+
+ // Checks an href to see if it is a photo.
+ // There is a force photo option (photo: true) for hrefs that cannot be matched by the regex.
+ function isImage(settings, url) {
+ return settings.get('photo') || settings.get('photoRegex').test(url);
+ }
+
+ function retinaUrl(settings, url) {
+ return settings.get('retinaUrl') && window.devicePixelRatio > 1 ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url;
+ }
+
+ function trapFocus(e) {
+ if ('contains' in $box[0] && !$box[0].contains(e.target) && e.target !== $overlay[0]) {
+ e.stopPropagation();
+ $box.focus();
+ }
+ }
+
+ function setClass(str) {
+ if (setClass.str !== str) {
+ $box.add($overlay).removeClass(setClass.str).addClass(str);
+ setClass.str = str;
+ }
+ }
+
+ function getRelated(rel) {
+ index = 0;
+
+ if (rel && rel !== false && rel !== 'nofollow') {
+ $related = $('.' + boxElement).filter(function () {
+ var options = $.data(this, colorbox);
+ var settings = new Settings(this, options);
+ return (settings.get('rel') === rel);
+ });
+ index = $related.index(settings.el);
+
+ // Check direct calls to Colorbox.
+ if (index === -1) {
+ $related = $related.add(settings.el);
+ index = $related.length - 1;
+ }
+ } else {
+ $related = $(settings.el);
+ }
+ }
+
+ function trigger(event) {
+ // for external use
+ $(document).trigger(event);
+ // for internal use
+ $events.triggerHandler(event);
+ }
+
+ var slideshow = (function(){
+ var active,
+ className = prefix + "Slideshow_",
+ click = "click." + prefix,
+ timeOut;
+
+ function clear () {
+ clearTimeout(timeOut);
+ }
+
+ function set() {
+ if (settings.get('loop') || $related[index + 1]) {
+ clear();
+ timeOut = setTimeout(publicMethod.next, settings.get('slideshowSpeed'));
+ }
+ }
+
+ function start() {
+ $slideshow
+ .html(settings.get('slideshowStop'))
+ .unbind(click)
+ .one(click, stop);
+
+ $events
+ .bind(event_complete, set)
+ .bind(event_load, clear);
+
+ $box.removeClass(className + "off").addClass(className + "on");
+ }
+
+ function stop() {
+ clear();
+
+ $events
+ .unbind(event_complete, set)
+ .unbind(event_load, clear);
+
+ $slideshow
+ .html(settings.get('slideshowStart'))
+ .unbind(click)
+ .one(click, function () {
+ publicMethod.next();
+ start();
+ });
+
+ $box.removeClass(className + "on").addClass(className + "off");
+ }
+
+ function reset() {
+ active = false;
+ $slideshow.hide();
+ clear();
+ $events
+ .unbind(event_complete, set)
+ .unbind(event_load, clear);
+ $box.removeClass(className + "off " + className + "on");
+ }
+
+ return function(){
+ if (active) {
+ if (!settings.get('slideshow')) {
+ $events.unbind(event_cleanup, reset);
+ reset();
+ }
+ } else {
+ if (settings.get('slideshow') && $related[1]) {
+ active = true;
+ $events.one(event_cleanup, reset);
+ if (settings.get('slideshowAuto')) {
+ start();
+ } else {
+ stop();
+ }
+ $slideshow.show();
+ }
+ }
+ };
+
+ }());
+
+
+ function launch(element) {
+ var options;
+
+ if (!closing) {
+
+ options = $(element).data(colorbox);
+
+ settings = new Settings(element, options);
+
+ getRelated(settings.get('rel'));
+
+ if (!open) {
+ open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
+
+ setClass(settings.get('className'));
+
+ // Show colorbox so the sizes can be calculated in older versions of jQuery
+ $box.css({visibility:'hidden', display:'block', opacity:''});
+
+ $loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden; visibility:hidden');
+ $content.css({width:'', height:''}).append($loaded);
+
+ // Cache values needed for size calculations
+ interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();
+ interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
+ loadedHeight = $loaded.outerHeight(true);
+ loadedWidth = $loaded.outerWidth(true);
+
+ // Opens inital empty Colorbox prior to content being loaded.
+ var initialWidth = setSize(settings.get('initialWidth'), 'x');
+ var initialHeight = setSize(settings.get('initialHeight'), 'y');
+ var maxWidth = settings.get('maxWidth');
+ var maxHeight = settings.get('maxHeight');
+
+ settings.w = (maxWidth !== false ? Math.min(initialWidth, setSize(maxWidth, 'x')) : initialWidth) - loadedWidth - interfaceWidth;
+ settings.h = (maxHeight !== false ? Math.min(initialHeight, setSize(maxHeight, 'y')) : initialHeight) - loadedHeight - interfaceHeight;
+
+ $loaded.css({width:'', height:settings.h});
+ publicMethod.position();
+
+ trigger(event_open);
+ settings.get('onOpen');
+
+ $groupControls.add($title).hide();
+
+ $box.focus();
+
+ if (settings.get('trapFocus')) {
+ // Confine focus to the modal
+ // Uses event capturing that is not supported in IE8-
+ if (document.addEventListener) {
+
+ document.addEventListener('focus', trapFocus, true);
+
+ $events.one(event_closed, function () {
+ document.removeEventListener('focus', trapFocus, true);
+ });
+ }
+ }
+
+ // Return focus on closing
+ if (settings.get('returnFocus')) {
+ $events.one(event_closed, function () {
+ $(settings.el).focus();
+ });
+ }
+ }
+
+ var opacity = parseFloat(settings.get('opacity'));
+ $overlay.css({
+ opacity: opacity === opacity ? opacity : '',
+ cursor: settings.get('overlayClose') ? 'pointer' : '',
+ visibility: 'visible'
+ }).show();
+
+ if (settings.get('closeButton')) {
+ $close.html(settings.get('close')).appendTo($content);
+ } else {
+ $close.appendTo('<div/>'); // replace with .detach() when dropping jQuery < 1.4
+ }
+
+ load();
+ }
+ }
+
+ // Colorbox's markup needs to be added to the DOM prior to being called
+ // so that the browser will go ahead and load the CSS background images.
+ function appendHTML() {
+ if (!$box && document.body) {
+ init = false;
+ $window = $(window);
+ $box = $tag(div).attr({
+ id: colorbox,
+ 'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS.
+ role: 'dialog',
+ tabindex: '-1'
+ }).hide();
+ $overlay = $tag(div, "Overlay").hide();
+ $loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]);
+ $wrap = $tag(div, "Wrapper");
+ $content = $tag(div, "Content").append(
+ $title = $tag(div, "Title"),
+ $current = $tag(div, "Current"),
+ $prev = $('<button type="button"/>').attr({id:prefix+'Previous'}),
+ $next = $('<button type="button"/>').attr({id:prefix+'Next'}),
+ $slideshow = $tag('button', "Slideshow"),
+ $loadingOverlay
+ );
+
+ $close = $('<button type="button"/>').attr({id:prefix+'Close'});
+
+ $wrap.append( // The 3x3 Grid that makes up Colorbox
+ $tag(div).append(
+ $tag(div, "TopLeft"),
+ $topBorder = $tag(div, "TopCenter"),
+ $tag(div, "TopRight")
+ ),
+ $tag(div, false, 'clear:left').append(
+ $leftBorder = $tag(div, "MiddleLeft"),
+ $content,
+ $rightBorder = $tag(div, "MiddleRight")
+ ),
+ $tag(div, false, 'clear:left').append(
+ $tag(div, "BottomLeft"),
+ $bottomBorder = $tag(div, "BottomCenter"),
+ $tag(div, "BottomRight")
+ )
+ ).find('div div').css({'float': 'left'});
+
+ $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;');
+
+ $groupControls = $next.add($prev).add($current).add($slideshow);
+
+ $(document.body).append($overlay, $box.append($wrap, $loadingBay));
+ }
+ }
+
+ // Add Colorbox's event bindings
+ function addBindings() {
+ function clickHandler(e) {
+ // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
+ // See: http://jacklmoore.com/notes/click-events/
+ if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ launch(this);
+ }
+ }
+
+ if ($box) {
+ if (!init) {
+ init = true;
+
+ // Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
+ $next.click(function () {
+ publicMethod.next();
+ });
+ $prev.click(function () {
+ publicMethod.prev();
+ });
+ $close.click(function () {
+ publicMethod.close();
+ });
+ $overlay.click(function () {
+ if (settings.get('overlayClose')) {
+ publicMethod.close();
+ }
+ });
+
+ // Key Bindings
+ $(document).bind('keydown.' + prefix, function (e) {
+ var key = e.keyCode;
+ if (open && settings.get('escKey') && key === 27) {
+ e.preventDefault();
+ publicMethod.close();
+ }
+ if (open && settings.get('arrowKey') && $related[1] && !e.altKey) {
+ if (key === 37) {
+ e.preventDefault();
+ $prev.click();
+ } else if (key === 39) {
+ e.preventDefault();
+ $next.click();
+ }
+ }
+ });
+
+ if ($.isFunction($.fn.on)) {
+ // For jQuery 1.7+
+ $(document).on('click.'+prefix, '.'+boxElement, clickHandler);
+ } else {
+ // For jQuery 1.3.x -> 1.6.x
+ // This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed.
+ // This is not here for jQuery 1.9, it's here for legacy users.
+ $('.'+boxElement).live('click.'+prefix, clickHandler);
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+
+ // Don't do anything if Colorbox already exists.
+ if ($[colorbox]) {
+ return;
+ }
+
+ // Append the HTML when the DOM loads
+ $(appendHTML);
+
+
+ // ****************
+ // PUBLIC FUNCTIONS
+ // Usage format: $.colorbox.close();
+ // Usage from within an iframe: parent.jQuery.colorbox.close();
+ // ****************
+
+ publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
+ var settings;
+ var $obj = this;
+
+ options = options || {};
+
+ if ($.isFunction($obj)) { // assume a call to $.colorbox
+ $obj = $('<a/>');
+ options.open = true;
+ } else if (!$obj[0]) { // colorbox being applied to empty collection
+ return $obj;
+ }
+
+
+ if (!$obj[0]) { // colorbox being applied to empty collection
+ return $obj;
+ }
+
+ appendHTML();
+
+ if (addBindings()) {
+
+ if (callback) {
+ options.onComplete = callback;
+ }
+
+ $obj.each(function () {
+ var old = $.data(this, colorbox) || {};
+ $.data(this, colorbox, $.extend(old, options));
+ }).addClass(boxElement);
+
+ settings = new Settings($obj[0], options);
+
+ if (settings.get('open')) {
+ launch($obj[0]);
+ }
+ }
+
+ return $obj;
+ };
+
+ publicMethod.position = function (speed, loadedCallback) {
+ var
+ css,
+ top = 0,
+ left = 0,
+ offset = $box.offset(),
+ scrollTop,
+ scrollLeft;
+
+ $window.unbind('resize.' + prefix);
+
+ // remove the modal so that it doesn't influence the document width/height
+ $box.css({top: -9e4, left: -9e4});
+
+ scrollTop = $window.scrollTop();
+ scrollLeft = $window.scrollLeft();
+
+ if (settings.get('fixed')) {
+ offset.top -= scrollTop;
+ offset.left -= scrollLeft;
+ $box.css({position: 'fixed'});
+ } else {
+ top = scrollTop;
+ left = scrollLeft;
+ $box.css({position: 'absolute'});
+ }
+
+ // keeps the top and left positions within the browser's viewport.
+ if (settings.get('right') !== false) {
+ left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.get('right'), 'x'), 0);
+ } else if (settings.get('left') !== false) {
+ left += setSize(settings.get('left'), 'x');
+ } else {
+ left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
+ }
+
+ if (settings.get('bottom') !== false) {
+ top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.get('bottom'), 'y'), 0);
+ } else if (settings.get('top') !== false) {
+ top += setSize(settings.get('top'), 'y');
+ } else {
+ top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
+ }
+
+ $box.css({top: offset.top, left: offset.left, visibility:'visible'});
+
+ // this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
+ // but it has to be shrank down around the size of div#colorbox when it's done. If not,
+ // it can invoke an obscure IE bug when using iframes.
+ $wrap[0].style.width = $wrap[0].style.height = "9999px";
+
+ function modalDimensions() {
+ $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px';
+ $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px';
+ }
+
+ css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left};
+
+ // setting the speed to 0 if the content hasn't changed size or position
+ if (speed) {
+ var tempSpeed = 0;
+ $.each(css, function(i){
+ if (css[i] !== previousCSS[i]) {
+ tempSpeed = speed;
+ return;
+ }
+ });
+ speed = tempSpeed;
+ }
+
+ previousCSS = css;
+
+ if (!speed) {
+ $box.css(css);
+ }
+
+ $box.dequeue().animate(css, {
+ duration: speed || 0,
+ complete: function () {
+ modalDimensions();
+
+ active = false;
+
+ // shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
+ $wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
+ $wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
+
+ if (settings.get('reposition')) {
+ setTimeout(function () { // small delay before binding onresize due to an IE8 bug.
+ $window.bind('resize.' + prefix, publicMethod.position);
+ }, 1);
+ }
+
+ if ($.isFunction(loadedCallback)) {
+ loadedCallback();
+ }
+ },
+ step: modalDimensions
+ });
+ };
+
+ publicMethod.resize = function (options) {
+ var scrolltop;
+
+ if (open) {
+ options = options || {};
+
+ if (options.width) {
+ settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
+ }
+
+ if (options.innerWidth) {
+ settings.w = setSize(options.innerWidth, 'x');
+ }
+
+ $loaded.css({width: settings.w});
+
+ if (options.height) {
+ settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
+ }
+
+ if (options.innerHeight) {
+ settings.h = setSize(options.innerHeight, 'y');
+ }
+
+ if (!options.innerHeight && !options.height) {
+ scrolltop = $loaded.scrollTop();
+ $loaded.css({height: "auto"});
+ settings.h = $loaded.height();
+ }
+
+ $loaded.css({height: settings.h});
+
+ if(scrolltop) {
+ $loaded.scrollTop(scrolltop);
+ }
+
+ publicMethod.position(settings.get('transition') === "none" ? 0 : settings.get('speed'));
+ }
+ };
+
+ publicMethod.prep = function (object) {
+ if (!open) {
+ return;
+ }
+
+ var callback, speed = settings.get('transition') === "none" ? 0 : settings.get('speed');
+
+ $loaded.remove();
+
+ $loaded = $tag(div, 'LoadedContent').append(object);
+
+ function getWidth() {
+ settings.w = settings.w || $loaded.width();
+ settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
+ return settings.w;
+ }
+ function getHeight() {
+ settings.h = settings.h || $loaded.height();
+ settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
+ return settings.h;
+ }
+
+ $loaded.hide()
+ .appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
+ .css({width: getWidth(), overflow: settings.get('scrolling') ? 'auto' : 'hidden'})
+ .css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
+ .prependTo($content);
+
+ $loadingBay.hide();
+
+ // floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
+
+ $(photo).css({'float': 'none'});
+
+ setClass(settings.get('className'));
+
+ callback = function () {
+ var total = $related.length,
+ iframe,
+ complete;
+
+ if (!open) {
+ return;
+ }
+
+ function removeFilter() { // Needed for IE8 in versions of jQuery prior to 1.7.2
+ if ($.support.opacity === false) {
+ $box[0].style.removeAttribute('filter');
+ }
+ }
+
+ complete = function () {
+ clearTimeout(loadingTimer);
+ $loadingOverlay.hide();
+ trigger(event_complete);
+ settings.get('onComplete');
+ };
+
+
+ $title.html(settings.get('title')).show();
+ $loaded.show();
+
+ if (total > 1) { // handle grouping
+ if (typeof settings.get('current') === "string") {
+ $current.html(settings.get('current').replace('{current}', index + 1).replace('{total}', total)).show();
+ }
+
+ $next[(settings.get('loop') || index < total - 1) ? "show" : "hide"]().html(settings.get('next'));
+ $prev[(settings.get('loop') || index) ? "show" : "hide"]().html(settings.get('previous'));
+
+ slideshow();
+
+ // Preloads images within a rel group
+ if (settings.get('preloading')) {
+ $.each([getIndex(-1), getIndex(1)], function(){
+ var img,
+ i = $related[this],
+ settings = new Settings(i, $.data(i, colorbox)),
+ src = settings.get('href');
+
+ if (src && isImage(settings, src)) {
+ src = retinaUrl(settings, src);
+ img = document.createElement('img');
+ img.src = src;
+ }
+ });
+ }
+ } else {
+ $groupControls.hide();
+ }
+
+ if (settings.get('iframe')) {
+ iframe = document.createElement('iframe');
+
+ if ('frameBorder' in iframe) {
+ iframe.frameBorder = 0;
+ }
+
+ if ('allowTransparency' in iframe) {
+ iframe.allowTransparency = "true";
+ }
+
+ if (!settings.get('scrolling')) {
+ iframe.scrolling = "no";
+ }
+
+ $(iframe)
+ .attr({
+ src: settings.get('href'),
+ name: (new Date()).getTime(), // give the iframe a unique name to prevent caching
+ 'class': prefix + 'Iframe',
+ allowFullScreen : true // allow HTML5 video to go fullscreen
+ })
+ .one('load', complete)
+ .appendTo($loaded);
+
+ $events.one(event_purge, function () {
+ iframe.src = "//about:blank";
+ });
+
+ if (settings.get('fastIframe')) {
+ $(iframe).trigger('load');
+ }
+ } else {
+ complete();
+ }
+
+ if (settings.get('transition') === 'fade') {
+ $box.fadeTo(speed, 1, removeFilter);
+ } else {
+ removeFilter();
+ }
+ };
+
+ if (settings.get('transition') === 'fade') {
+ $box.fadeTo(speed, 0, function () {
+ publicMethod.position(0, callback);
+ });
+ } else {
+ publicMethod.position(speed, callback);
+ }
+ };
+
+ function load () {
+ var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
+
+ active = true;
+
+ photo = false;
+
+ trigger(event_purge);
+ trigger(event_load);
+ settings.get('onLoad');
+
+ settings.h = settings.get('height') ?
+ setSize(settings.get('height'), 'y') - loadedHeight - interfaceHeight :
+ settings.get('innerHeight') && setSize(settings.get('innerHeight'), 'y');
+
+ settings.w = settings.get('width') ?
+ setSize(settings.get('width'), 'x') - loadedWidth - interfaceWidth :
+ settings.get('innerWidth') && setSize(settings.get('innerWidth'), 'x');
+
+ // Sets the minimum dimensions for use in image scaling
+ settings.mw = settings.w;
+ settings.mh = settings.h;
+
+ // Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
+ // If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
+ if (settings.get('maxWidth')) {
+ settings.mw = setSize(settings.get('maxWidth'), 'x') - loadedWidth - interfaceWidth;
+ settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
+ }
+ if (settings.get('maxHeight')) {
+ settings.mh = setSize(settings.get('maxHeight'), 'y') - loadedHeight - interfaceHeight;
+ settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
+ }
+
+ href = settings.get('href');
+
+ loadingTimer = setTimeout(function () {
+ $loadingOverlay.show();
+ }, 100);
+
+ if (settings.get('inline')) {
+ var $target = $(href);
+ // Inserts an empty placeholder where inline content is being pulled from.
+ // An event is bound to put inline content back when Colorbox closes or loads new content.
+ $inline = $('<div>').hide().insertBefore($target);
+
+ $events.one(event_purge, function () {
+ $inline.replaceWith($target);
+ });
+
+ prep($target);
+ } else if (settings.get('iframe')) {
+ // IFrame element won't be added to the DOM until it is ready to be displayed,
+ // to avoid problems with DOM-ready JS that might be trying to run in that iframe.
+ prep(" ");
+ } else if (settings.get('html')) {
+ prep(settings.get('html'));
+ } else if (isImage(settings, href)) {
+
+ href = retinaUrl(settings, href);
+
+ photo = new Image();
+
+ $(photo)
+ .addClass(prefix + 'Photo')
+ .bind('error',function () {
+ prep($tag(div, 'Error').html(settings.get('imgError')));
+ })
+ .one('load', function () {
+ if (request !== requests) {
+ return;
+ }
+
+ // A small pause because some browsers will occassionaly report a
+ // img.width and img.height of zero immediately after the img.onload fires
+ setTimeout(function(){
+ var percent;
+
+ $.each(['alt', 'longdesc', 'aria-describedby'], function(i,val){
+ var attr = $(settings.el).attr(val) || $(settings.el).attr('data-'+val);
+ if (attr) {
+ photo.setAttribute(val, attr);
+ }
+ });
+
+ if (settings.get('retinaImage') && window.devicePixelRatio > 1) {
+ photo.height = photo.height / window.devicePixelRatio;
+ photo.width = photo.width / window.devicePixelRatio;
+ }
+
+ if (settings.get('scalePhotos')) {
+ setResize = function () {
+ photo.height -= photo.height * percent;
+ photo.width -= photo.width * percent;
+ };
+ if (settings.mw && photo.width > settings.mw) {
+ percent = (photo.width - settings.mw) / photo.width;
+ setResize();
+ }
+ if (settings.mh && photo.height > settings.mh) {
+ percent = (photo.height - settings.mh) / photo.height;
+ setResize();
+ }
+ }
+
+ if (settings.h) {
+ photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px';
+ }
+
+ if ($related[1] && (settings.get('loop') || $related[index + 1])) {
+ photo.style.cursor = 'pointer';
+ photo.onclick = function () {
+ publicMethod.next();
+ };
+ }
+
+ photo.style.width = photo.width + 'px';
+ photo.style.height = photo.height + 'px';
+ prep(photo);
+ }, 1);
+ });
+
+ photo.src = href;
+
+ } else if (href) {
+ $loadingBay.load(href, settings.get('data'), function (data, status) {
+ if (request === requests) {
+ prep(status === 'error' ? $tag(div, 'Error').html(settings.get('xhrError')) : $(this).contents());
+ }
+ });
+ }
+ }
+
+ // Navigates to the next page/image in a set.
+ publicMethod.next = function () {
+ if (!active && $related[1] && (settings.get('loop') || $related[index + 1])) {
+ index = getIndex(1);
+ launch($related[index]);
+ }
+ };
+
+ publicMethod.prev = function () {
+ if (!active && $related[1] && (settings.get('loop') || index)) {
+ index = getIndex(-1);
+ launch($related[index]);
+ }
+ };
+
+ // Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close();
+ publicMethod.close = function () {
+ if (open && !closing) {
+
+ closing = true;
+ open = false;
+ trigger(event_cleanup);
+ settings.get('onCleanup');
+ $window.unbind('.' + prefix);
+ $overlay.fadeTo(settings.get('fadeOut') || 0, 0);
+
+ $box.stop().fadeTo(settings.get('fadeOut') || 0, 0, function () {
+ $box.hide();
+ $overlay.hide();
+ trigger(event_purge);
+ $loaded.remove();
+
+ setTimeout(function () {
+ closing = false;
+ trigger(event_closed);
+ settings.get('onClosed');
+ }, 1);
+ });
+ }
+ };
+
+ // Removes changes Colorbox made to the document, but does not remove the plugin.
+ publicMethod.remove = function () {
+ if (!$box) { return; }
+
+ $box.stop();
+ $[colorbox].close();
+ $box.stop(false, true).remove();
+ $overlay.remove();
+ closing = false;
+ $box = null;
+ $('.' + boxElement)
+ .removeData(colorbox)
+ .removeClass(boxElement);
+
+ $(document).unbind('click.'+prefix).unbind('keydown.'+prefix);
+ };
+
+ // A method for fetching the current element Colorbox is referencing.
+ // returns a jQuery object.
+ publicMethod.element = function () {
+ return $(settings.el);
+ };
+
+ publicMethod.settings = defaults;
+
+}(jQuery, document, window));
/*
* File: jquery.dataTables.min.js
* Version: 1.7.0
@@ -172,51 +1263,6 @@ jQuery.fn.dataTableExt.oSort['percent-desc'] = function(a,b) {
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
};
/*
- * FancyBox - jQuery Plugin
- * Simple and fancy lightbox alternative
- *
- * Examples and documentation at: http://fancybox.net
- *
- * Copyright (c) 2008 - 2010 Janis Skarnelis
- *
- * Version: 1.3.1 (05/03/2010)
- * Requires: jQuery v1.3+
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
-
-
-(function(b){var m,u,x,g,D,i,z,A,B,p=0,e={},q=[],n=0,c={},j=[],E=null,s=new Image,G=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,S=/[^\.]\.(swf)\s*$/i,H,I=1,k,l,h=false,y=b.extend(b("<div/>")[0],{prop:0}),v=0,O=!b.support.opacity&&!window.XMLHttpRequest,J=function(){u.hide();s.onerror=s.onload=null;E&&E.abort();m.empty()},P=function(){b.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>',{scrolling:"no",padding:20,transitionIn:"none",transition [...]
-K=function(){return[b(window).width(),b(window).height(),b(document).scrollLeft(),b(document).scrollTop()]},T=function(){var a=K(),d={},f=c.margin,o=c.autoScale,t=(20+f)*2,w=(20+f)*2,r=c.padding*2;if(c.width.toString().indexOf("%")>-1){d.width=a[0]*parseFloat(c.width)/100-40;o=false}else d.width=c.width+r;if(c.height.toString().indexOf("%")>-1){d.height=a[1]*parseFloat(c.height)/100-40;o=false}else d.height=c.height+r;if(o&&(d.width>a[0]-t||d.height>a[1]-w))if(e.type=="image"||e.type=="s [...]
-w+=r;o=Math.min(Math.min(a[0]-t,c.width)/c.width,Math.min(a[1]-w,c.height)/c.height);d.width=Math.round(o*(d.width-r))+r;d.height=Math.round(o*(d.height-r))+r}else{d.width=Math.min(d.width,a[0]-t);d.height=Math.min(d.height,a[1]-w)}d.top=a[3]+(a[1]-(d.height+40))*0.5;d.left=a[2]+(a[0]-(d.width+40))*0.5;if(c.autoScale===false){d.top=Math.max(a[3]+f,d.top);d.left=Math.max(a[2]+f,d.left)}return d},U=function(a){if(a&&a.length)switch(c.titlePosition){case "inside":return a;case "over":return [...]
-a+"</span>";default:return'<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">'+a+'</span><span id="fancybox-title-right"></span></span>'}return false},V=function(){var a=c.title,d=l.width-c.padding*2,f="fancybox-title-"+c.titlePosition;b("#fancybox-title").remove();v=0;if(c.titleShow!==false){a=b.isFunction(c.titleFormat)?c.titleFormat(a,j,n,c):U(a);if(!(!a||a==="")){b('<div id="fancybox-title" class="'+f+'" />').css({width:d,paddingLeft: [...]
-paddingRight:c.padding}).html(a).appendTo("body");switch(c.titlePosition){case "inside":v=b("#fancybox-title").outerHeight(true)-c.padding;l.height+=v;break;case "over":b("#fancybox-title").css("bottom",c.padding);break;default:b("#fancybox-title").css("bottom",b("#fancybox-title").outerHeight(true)*-1);break}b("#fancybox-title").appendTo(D).hide()}}},W=function(){b(document).unbind("keydown.fb").bind("keydown.fb",function(a){if(a.keyCode==27&&c.enableEscapeButton){a.preventDefault();b.f [...]
-37){a.preventDefault();b.fancybox.prev()}else if(a.keyCode==39){a.preventDefault();b.fancybox.next()}});if(b.fn.mousewheel){g.unbind("mousewheel.fb");j.length>1&&g.bind("mousewheel.fb",function(a,d){a.preventDefault();h||d===0||(d>0?b.fancybox.prev():b.fancybox.next())})}if(c.showNavArrows){if(c.cyclic&&j.length>1||n!==0)A.show();if(c.cyclic&&j.length>1||n!=j.length-1)B.show()}},X=function(){var a,d;if(j.length-1>n){a=j[n+1].href;if(typeof a!=="undefined"&&a.match(G)){d=new Image;d.src=a [...]
-j[n-1].href;if(typeof a!=="undefined"&&a.match(G)){d=new Image;d.src=a}}},L=function(){i.css("overflow",c.scrolling=="auto"?c.type=="image"||c.type=="iframe"||c.type=="swf"?"hidden":"auto":c.scrolling=="yes"?"auto":"visible");if(!b.support.opacity){i.get(0).style.removeAttribute("filter");g.get(0).style.removeAttribute("filter")}b("#fancybox-title").show();c.hideOnContentClick&&i.one("click",b.fancybox.close);c.hideOnOverlayClick&&x.one("click",b.fancybox.close);c.showCloseButton&&z.show [...]
-b.fancybox.center);c.centerOnScroll?b(window).bind("scroll.fb",b.fancybox.center):b(window).unbind("scroll.fb");b.isFunction(c.onComplete)&&c.onComplete(j,n,c);h=false;X()},M=function(a){var d=Math.round(k.width+(l.width-k.width)*a),f=Math.round(k.height+(l.height-k.height)*a),o=Math.round(k.top+(l.top-k.top)*a),t=Math.round(k.left+(l.left-k.left)*a);g.css({width:d+"px",height:f+"px",top:o+"px",left:t+"px"});d=Math.max(d-c.padding*2,0);f=Math.max(f-(c.padding*2+v*a),0);i.css({width:d+"px [...]
-"px"});if(typeof l.opacity!=="undefined")g.css("opacity",a<0.5?0.5:a)},Y=function(a){var d=a.offset();d.top+=parseFloat(a.css("paddingTop"))||0;d.left+=parseFloat(a.css("paddingLeft"))||0;d.top+=parseFloat(a.css("border-top-width"))||0;d.left+=parseFloat(a.css("border-left-width"))||0;d.width=a.width();d.height=a.height();return d},Q=function(){var a=e.orig?b(e.orig):false,d={};if(a&&a.length){a=Y(a);d={width:a.width+c.padding*2,height:a.height+c.padding*2,top:a.top-c.padding-20,left:a.l [...]
-20}}else{a=K();d={width:1,height:1,top:a[3]+a[1]*0.5,left:a[2]+a[0]*0.5}}return d},N=function(){u.hide();if(g.is(":visible")&&b.isFunction(c.onCleanup))if(c.onCleanup(j,n,c)===false){b.event.trigger("fancybox-cancel");h=false;return}j=q;n=p;c=e;i.get(0).scrollTop=0;i.get(0).scrollLeft=0;if(c.overlayShow){O&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="i [...]
-x.css({"background-color":c.overlayColor,opacity:c.overlayOpacity}).unbind().show()}l=T();V();if(g.is(":visible")){b(z.add(A).add(B)).hide();var a=g.position(),d;k={top:a.top,left:a.left,width:g.width(),height:g.height()};d=k.width==l.width&&k.height==l.height;i.fadeOut(c.changeFade,function(){var f=function(){i.html(m.contents()).fadeIn(c.changeFade,L)};b.event.trigger("fancybox-change");i.empty().css("overflow","hidden");if(d){i.css({top:c.padding,left:c.padding,width:Math.max(l.width- [...]
-2,1),height:Math.max(l.height-c.padding*2-v,1)});f()}else{i.css({top:c.padding,left:c.padding,width:Math.max(k.width-c.padding*2,1),height:Math.max(k.height-c.padding*2,1)});y.prop=0;b(y).animate({prop:1},{duration:c.changeSpeed,easing:c.easingChange,step:M,complete:f})}})}else{g.css("opacity",1);if(c.transitionIn=="elastic"){k=Q();i.css({top:c.padding,left:c.padding,width:Math.max(k.width-c.padding*2,1),height:Math.max(k.height-c.padding*2,1)}).html(m.contents());g.css(k).show();if(c.op [...]
-0;y.prop=0;b(y).animate({prop:1},{duration:c.speedIn,easing:c.easingIn,step:M,complete:L})}else{i.css({top:c.padding,left:c.padding,width:Math.max(l.width-c.padding*2,1),height:Math.max(l.height-c.padding*2-v,1)}).html(m.contents());g.css(l).fadeIn(c.transitionIn=="none"?0:c.speedIn,L)}}},F=function(){m.width(e.width);m.height(e.height);if(e.width=="auto")e.width=m.width();if(e.height=="auto")e.height=m.height();N()},Z=function(){h=true;e.width=s.width;e.height=s.height;b("<img />").attr [...]
-src:s.src,alt:e.title}).appendTo(m);N()},C=function(){J();var a=q[p],d,f,o,t,w;e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));o=a.title||b(a).title||e.title||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(o===""&&e.orig)o=e.orig.attr("alt");d=a.nodeName&&/^(?:javascript|#)/i.test(a.href)?e.href||null:e.href||a.href||null;if(e.type){f=e.type;if(!d)d=e.content}else if(e.content)f [...]
-"image";else if(d.match(S))f="swf";else if(b(a).hasClass("iframe"))f="iframe";else if(d.match(/#/)){a=d.substr(d.indexOf("#"));f=b(a).length>0?"inline":"ajax"}else f="ajax";else f="inline";e.type=f;e.href=d;e.title=o;if(e.autoDimensions&&e.type!=="iframe"&&e.type!=="swf"){e.width="auto";e.height="auto"}if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=false;e.enableEscapeButton=false;e.showCloseButton=false}if(b.isFunction(e.onStart))if(e.onStart(q,p,e)===fal [...]
-return}m.css("padding",20+e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(i.children())});switch(f){case "html":m.html(e.content);F();break;case "inline":b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(i.children())}).bind("fancybox-cancel",function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fa [...]
-s=new Image;s.onerror=function(){P()};s.onload=function(){s.onerror=null;s.onload=null;Z()};s.src=d;break;case "swf":t='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+d+'"></param>';w="";b.each(e.swf,function(r,R){t+='<param name="'+r+'" value="'+R+'"></param>';w+=" "+r+'="'+R+'"'});t+='<embed src="'+d+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+w+"></embed></object [...]
-F();break;case "ajax":a=d.split("#",2);f=e.ajax.data||{};if(a.length>1){d=a[0];if(typeof f=="string")f+="&selector="+a[1];else f.selector=a[1]}h=false;b.fancybox.showActivity();E=b.ajax(b.extend(e.ajax,{url:d,data:f,error:P,success:function(r){if(E.status==200){m.html(r);F()}}}));break;case "iframe":b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+e.scrolling+'" src="'+e.href+'"></iframe>').appendTo(m);N();break}},$=func [...]
-u).css("top",I*-40+"px");I=(I+1)%12}else clearInterval(H)},aa=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),u=b('<div id="fancybox-loading"><div></div></div>'),x=b('<div id="fancybox-overlay"></div>'),g=b('<div id="fancybox-wrap"></div>'));if(!b.support.opacity){g.addClass("fancybox-ie");u.addClass("fancybox-ie")}D=b('<div id="fancybox-outer"></div>').append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg- [...]
-D.append(i=b('<div id="fancybox-inner"></div>'),z=b('<a id="fancybox-close"></a>'),A=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),B=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));z.click(b.fancybox.close);u.click(b.fancybox.cancel);A.click(function(a){a.preventDefault();b.fancybox.prev()});B.click(function(a){a.preventDefault();b.fancybox.next()});if(O){x.get(0).styl [...]
-"document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");u.get(0).style.setExpression("top","(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");D.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" [...]
-b.fn.fancybox=function(a){b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(d){d.preventDefault();if(!h){h=true;b(this).blur();q=[];p=0;d=b(this).attr("rel")||"";if(!d||d==""||d==="nofollow")q.push(this);else{q=b("a[rel="+d+"], area[rel="+d+"]");p=q.index(this)}C();return false}});return this};b.fancybox=function(a,d){if(!h){h=true;d=typeof d!=="undefined"?d:{};q=[];p=d.index||0;if(b.isArray(a)){for(var f=0,o=a.length;f<o [...]
-"object")b(a[f]).data("fancybox",b.extend({},d,a[f]));else a[f]=b({}).data("fancybox",b.extend({content:a[f]},d));q=jQuery.merge(q,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},d,a));else a=b({}).data("fancybox",b.extend({content:a},d));q.push(a)}if(p>q.length||p<0)p=0;C()}};b.fancybox.showActivity=function(){clearInterval(H);u.show();H=setInterval($,66)};b.fancybox.hideActivity=function(){u.hide()};b.fancybox.next=function(){return b.fancybox.pos(n+1)};b.fancybox.prev=f [...]
-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a,10);if(a>-1&&j.length>a){p=a;C()}if(c.cyclic&&j.length>1&&a<0){p=j.length-1;C()}if(c.cyclic&&j.length>1&&a>=j.length){p=0;C()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");J();e&&b.isFunction(e.onCancel)&&e.onCancel(q,p,e);h=false}};b.fancybox.close=function(){function a(){x.fadeOut("fast");g.hide();b.event.trigger("fancybox-cleanup");i.empty();b.isFunction(c.onClosed)&&c.onClosed(j,n,c);j=e=[];n=p=0;c= [...]
-if(!(h||g.is(":hidden"))){h=true;if(c&&b.isFunction(c.onCleanup))if(c.onCleanup(j,n,c)===false){h=false;return}J();b(z.add(A).add(B)).hide();b("#fancybox-title").remove();g.add(i).add(x).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");i.css("overflow","hidden");if(c.transitionOut=="elastic"){k=Q();var d=g.position();l={top:d.top,left:d.left,width:g.width(),height:g.height()};if(c.opacity)l.opacity=1;y.prop=1;b(y).animate({prop:0},{duration:c.speedOut,eas [...]
-step:M,complete:a})}else g.fadeOut(c.transitionOut=="none"?0:c.speedOut,a)}};b.fancybox.resize=function(){var a,d;if(!(h||g.is(":hidden"))){h=true;a=i.wrapInner("<div style='overflow:auto'></div>").children();d=a.height();g.css({height:d+c.padding*2+v});i.css({height:d});a.replaceWith(a.children());b.fancybox.center()}};b.fancybox.center=function(){h=true;var a=K(),d=c.margin,f={};f.top=a[3]+(a[1]-(g.height()-v+40))*0.5;f.left=a[2]+(a[0]-(g.width()+40))*0.5;f.top=Math.max(a[3]+d,f.top);f [...]
-d,f.left);g.css(f);h=false};b.fn.fancybox.defaults={padding:10,margin:20,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.3,overlayColor:"#666",titleShow:true,titlePosition:"outside",titleFormat:null,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFad [...]
-easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,onStart:null,onCancel:null,onComplete:null,onCleanup:null,onClosed:null};b(document).ready(function(){aa()})})(jQuery);
-/*
* timeago: a jQuery plugin, version: 0.9 (2010-06-21)
* @requires jQuery v1.2.3 or later
*
@@ -543,60 +1589,90 @@ $(document).ready(function() {
"bPaginate": false,
"bJQueryUI": true,
"aoColumns": [
- null,
- { "sType": "percent" },
- null,
- null,
- null,
- null,
+ null,
+ { "sType": "percent" },
+ null,
+ null,
+ null,
+ null,
null
- ]
+ ]
});
-
+
// Syntax highlight all files up front - deactivated
// $('.source_table pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')});
-
+
// Syntax highlight source files on first toggle of the file view popup
$("a.src_link").click(function() {
// Get the source file element that corresponds to the clicked element
var source_table = $($(this).attr('href'));
-
+
// If not highlighted yet, do it!
if (!source_table.hasClass('highlighted')) {
source_table.find('pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')});
source_table.addClass('highlighted');
};
});
-
+
+ var prev_anchor;
+ var curr_anchor;
+
// Set-up of popup for source file views
- $("a.src_link").fancybox({
- 'hideOnContentClick': true,
- 'centerOnScroll': true,
- 'width': '90%',
- 'padding': 0,
- 'transitionIn': 'elastic'
+ $("a.src_link").colorbox({
+ transition: "none",
+ inline: true,
+ opacity: 1,
+ width: "95%",
+ height: "95%",
+ onLoad: function() {
+ prev_anchor = curr_anchor ? curr_anchor : jQuery.url.attr('anchor');
+ curr_anchor = this.href.split('#')[1];
+ window.location.hash = curr_anchor;
+ },
+ onCleanup: function() {
+ if (prev_anchor && prev_anchor != curr_anchor) {
+ $('a[href="#'+prev_anchor+'"]').click();
+ curr_anchor = prev_anchor;
+ } else {
+ $('.group_tabs a:first').click();
+ prev_anchor = curr_anchor;
+ curr_anchor = "#_AllFiles";
+ }
+ window.location.hash = curr_anchor;
+ }
});
-
- // Hide src files and file list container after load
+
+ window.onpopstate = function(event){
+ if (location.hash.substring(0,2) == "#_") {
+ $.colorbox.close();
+ curr_anchor = jQuery.url.attr('anchor');
+ } else {
+ if ($('#colorbox').is(':hidden')) {
+ $('a.src_link[href="'+location.hash+'"]').colorbox({ open: true });
+ }
+ }
+ };
+
+ // Hide src files and file list container after load
$('.source_files').hide();
$('.file_list_container').hide();
-
+
// Add tabs based upon existing file_list_containers
$('.file_list_container h2').each(function(){
var container_id = $(this).parent().attr('id');
var group_name = $(this).find('.group_name').first().html();
var covered_percent = $(this).find('.covered_percent').first().html();
-
+
$('.group_tabs').append('<li><a href="#' + container_id + '">' + group_name + ' ('+ covered_percent +')</a></li>');
});
$('.group_tabs a').each( function() {
$(this).addClass($(this).attr('href').replace('#', ''));
});
-
+
// Make sure tabs don't get ugly focus borders when active
$('.group_tabs a').live('focus', function() { $(this).blur(); });
-
+
var favicon_path = $('link[rel="shortcut icon"]').attr('href');
$('.group_tabs a').live('click', function(){
if (!$(this).parent().hasClass('active')) {
@@ -605,7 +1681,7 @@ $(document).ready(function() {
$('.file_list_container').hide();
$(".file_list_container" + $(this).attr('href')).show();
window.location.href = window.location.href.split('#')[0] + $(this).attr('href').replace('#', '#_');
-
+
// Force favicon reload - otherwise the location change containing anchor would drop the favicon...
// Works only on firefox, but still... - Anyone know a better solution to force favicon on local file?
$('link[rel="shortcut icon"]').remove();
@@ -613,13 +1689,18 @@ $(document).ready(function() {
};
return false;
});
-
+
if (jQuery.url.attr('anchor')) {
- $('.group_tabs a.'+jQuery.url.attr('anchor').replace('_', '')).click();
+ var anchor = jQuery.url.attr('anchor')
+ if (anchor.length == 40) {
+ $('a.src_link[href=#' + anchor + ']').click();
+ } else {
+ $('.group_tabs a.'+anchor.replace('_', '')).click();
+ }
} else {
$('.group_tabs a:first').click();
};
-
+
$("abbr.timeago").timeago();
$('#loading').fadeOut();
$('#wrapper').show();
diff --git a/public/colorbox/border.png b/public/colorbox/border.png
new file mode 100644
index 0000000..df13bb6
Binary files /dev/null and b/public/colorbox/border.png differ
diff --git a/public/colorbox/controls.png b/public/colorbox/controls.png
new file mode 100644
index 0000000..65cfd1d
Binary files /dev/null and b/public/colorbox/controls.png differ
diff --git a/public/colorbox/loading.gif b/public/colorbox/loading.gif
new file mode 100644
index 0000000..b4695d8
Binary files /dev/null and b/public/colorbox/loading.gif differ
diff --git a/public/colorbox/loading_background.png b/public/colorbox/loading_background.png
new file mode 100644
index 0000000..9de11f4
Binary files /dev/null and b/public/colorbox/loading_background.png differ
diff --git a/public/fancybox/blank.gif b/public/fancybox/blank.gif
deleted file mode 100644
index 35d42e8..0000000
Binary files a/public/fancybox/blank.gif and /dev/null differ
diff --git a/public/fancybox/fancy_close.png b/public/fancybox/fancy_close.png
deleted file mode 100644
index 0703530..0000000
Binary files a/public/fancybox/fancy_close.png and /dev/null differ
diff --git a/public/fancybox/fancy_loading.png b/public/fancybox/fancy_loading.png
deleted file mode 100644
index 2503017..0000000
Binary files a/public/fancybox/fancy_loading.png and /dev/null differ
diff --git a/public/fancybox/fancy_nav_left.png b/public/fancybox/fancy_nav_left.png
deleted file mode 100644
index ebaa6a4..0000000
Binary files a/public/fancybox/fancy_nav_left.png and /dev/null differ
diff --git a/public/fancybox/fancy_nav_right.png b/public/fancybox/fancy_nav_right.png
deleted file mode 100644
index 873294e..0000000
Binary files a/public/fancybox/fancy_nav_right.png and /dev/null differ
diff --git a/public/fancybox/fancy_shadow_e.png b/public/fancybox/fancy_shadow_e.png
deleted file mode 100644
index 2eda089..0000000
Binary files a/public/fancybox/fancy_shadow_e.png and /dev/null differ
diff --git a/public/fancybox/fancy_shadow_n.png b/public/fancybox/fancy_shadow_n.png
deleted file mode 100644
index 69aa10e..0000000
Binary files a/public/fancybox/fancy_shadow_n.png and /dev/null differ
diff --git a/public/fancybox/fancy_shadow_ne.png b/public/fancybox/fancy_shadow_ne.png
deleted file mode 100644
index 79f6980..0000000
Binary files a/public/fancybox/fancy_shadow_ne.png and /dev/null differ
diff --git a/public/fancybox/fancy_shadow_nw.png b/public/fancybox/fancy_shadow_nw.png
deleted file mode 100644
index 7182cd9..0000000
Binary files a/public/fancybox/fancy_shadow_nw.png and /dev/null differ
diff --git a/public/fancybox/fancy_shadow_s.png b/public/fancybox/fancy_shadow_s.png
deleted file mode 100644
index d8858bf..0000000
Binary files a/public/fancybox/fancy_shadow_s.png and /dev/null differ
diff --git a/public/fancybox/fancy_shadow_se.png b/public/fancybox/fancy_shadow_se.png
deleted file mode 100644
index 541e3ff..0000000
Binary files a/public/fancybox/fancy_shadow_se.png and /dev/null differ
diff --git a/public/fancybox/fancy_shadow_sw.png b/public/fancybox/fancy_shadow_sw.png
deleted file mode 100644
index b451689..0000000
Binary files a/public/fancybox/fancy_shadow_sw.png and /dev/null differ
diff --git a/public/fancybox/fancy_shadow_w.png b/public/fancybox/fancy_shadow_w.png
deleted file mode 100644
index 8a4e4a8..0000000
Binary files a/public/fancybox/fancy_shadow_w.png and /dev/null differ
diff --git a/public/fancybox/fancy_title_left.png b/public/fancybox/fancy_title_left.png
deleted file mode 100644
index 6049223..0000000
Binary files a/public/fancybox/fancy_title_left.png and /dev/null differ
diff --git a/public/fancybox/fancy_title_main.png b/public/fancybox/fancy_title_main.png
deleted file mode 100644
index 8044271..0000000
Binary files a/public/fancybox/fancy_title_main.png and /dev/null differ
diff --git a/public/fancybox/fancy_title_over.png b/public/fancybox/fancy_title_over.png
deleted file mode 100644
index d9f458f..0000000
Binary files a/public/fancybox/fancy_title_over.png and /dev/null differ
diff --git a/public/fancybox/fancy_title_right.png b/public/fancybox/fancy_title_right.png
deleted file mode 100644
index e36d9db..0000000
Binary files a/public/fancybox/fancy_title_right.png and /dev/null differ
diff --git a/public/fancybox/fancybox-x.png b/public/fancybox/fancybox-x.png
deleted file mode 100644
index c2130f8..0000000
Binary files a/public/fancybox/fancybox-x.png and /dev/null differ
diff --git a/public/fancybox/fancybox-y.png b/public/fancybox/fancybox-y.png
deleted file mode 100644
index 7ef399b..0000000
Binary files a/public/fancybox/fancybox-y.png and /dev/null differ
diff --git a/public/fancybox/fancybox.png b/public/fancybox/fancybox.png
deleted file mode 100644
index 65e14f6..0000000
Binary files a/public/fancybox/fancybox.png and /dev/null differ
diff --git a/simplecov-html.gemspec b/simplecov-html.gemspec
index bc49bc3..7eb8f82 100644
--- a/simplecov-html.gemspec
+++ b/simplecov-html.gemspec
@@ -1,25 +1,22 @@
-# -*- encoding: utf-8 -*-
-$:.push File.expand_path("../lib", __FILE__)
-require 'simplecov-html/version'
+$LOAD_PATH.push File.expand_path("../lib", __FILE__)
+require "simplecov-html/version"
-Gem::Specification.new do |s|
- s.name = "simplecov-html"
- s.version = SimpleCov::Formatter::HTMLFormatter::VERSION
- s.platform = Gem::Platform::RUBY
- s.authors = ["Christoph Olszowka"]
- s.email = ["christoph at olszowka de"]
- s.homepage = "https://github.com/colszowka/simplecov-html"
- s.summary = %Q{Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+}
- s.description = %Q{Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+}
+Gem::Specification.new do |gem|
+ gem.name = "simplecov-html"
+ gem.version = SimpleCov::Formatter::HTMLFormatter::VERSION
+ gem.platform = Gem::Platform::RUBY
+ gem.authors = ["Christoph Olszowka"]
+ gem.email = ["christoph at olszowka de"]
+ gem.homepage = "https://github.com/colszowka/simplecov-html"
+ gem.description = %(Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+)
+ gem.summary = gem.description
+ gem.license = "MIT"
- s.rubyforge_project = "simplecov-html"
-
- s.add_development_dependency 'rake'
- s.add_development_dependency 'sprockets'
- s.add_development_dependency 'sass'
+ gem.required_ruby_version = ">= 1.8.7"
+ gem.add_development_dependency "bundler", "~> 1.9"
- s.files = `git ls-files`.split("\n")
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
- s.require_paths = ["lib"]
-end
\ No newline at end of file
+ gem.files = `git ls-files`.split("\n")
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
+ gem.require_paths = ["lib"]
+end
diff --git a/test/helper.rb b/test/helper.rb
index 4fcf56d..f046d2e 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -1,9 +1,4 @@
-require 'rubygems'
-require 'bundler/setup'
-require 'simplecov'
-require 'simplecov-html'
-
-require 'test/unit'
-
-class Test::Unit::TestCase
-end
+require "bundler/setup"
+require "simplecov"
+require "simplecov-html"
+require "test/unit"
diff --git a/test/test_simple_cov-html.rb b/test/test_simple_cov-html.rb
index 69e2f3b..e5a831d 100644
--- a/test/test_simple_cov-html.rb
+++ b/test/test_simple_cov-html.rb
@@ -1,4 +1,4 @@
-require 'helper'
+require "helper"
class TestSimpleCovHtml < Test::Unit::TestCase
def test_defined
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-simplecov-html.git
More information about the Pkg-ruby-extras-commits
mailing list