Commit fa4fb8c3
Changed files (8)
app
assets
javascripts
stylesheets
vendor
assets
javascripts
stylesheets
app/assets/javascripts/application.js
@@ -14,8 +14,6 @@
//= require jquery-migrate
//= require jquery_ujs
//= require jquery.ui.all
-//= require jquery.color
-//= require jquery.colorbox
//= require jquery.validate
//= require jquery.masonry
//= require jquery-fileupload
app/assets/stylesheets/application.css.scss
@@ -8,7 +8,6 @@
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
- *= require colorbox
*= require jquery.fileupload-ui
*= require_self
*= require jquery.tagit
vendor/assets/javascripts/jquery.colorbox.js
@@ -1,953 +0,0 @@
-/*
- jQuery ColorBox v1.3.30
- (c) 2013 Jack Moore - jacklmoore.com/colorbox
- updated: 2013-01-25
- license: http://www.opensource.org/licenses/mit-license.php
-*/
-(function ($, document, window) {
- var
- // Default settings object.
- // See http://jacklmoore.com/colorbox for details.
- defaults = {
- transition: "elastic",
- speed: 300,
- width: false,
- initialWidth: "600",
- innerWidth: false,
- maxWidth: false,
- height: false,
- initialHeight: "450",
- innerHeight: false,
- maxHeight: false,
- scalePhotos: true,
- scrolling: true,
- inline: false,
- html: false,
- iframe: false,
- fastIframe: true,
- photo: false,
- href: false,
- title: false,
- rel: false,
- opacity: 0.9,
- preloading: true,
- className: false,
-
- current: "image {current} of {total}",
- previous: "previous",
- next: "next",
- close: "close",
- xhrError: "This content failed to load.",
- imgError: "This image failed to load.",
-
- open: false,
- returnFocus: true,
- reposition: true,
- loop: true,
- slideshow: false,
- slideshowAuto: true,
- slideshowSpeed: 2500,
- slideshowStart: "start slideshow",
- slideshowStop: "stop slideshow",
- onOpen: false,
- onLoad: false,
- onComplete: false,
- onCleanup: false,
- onClosed: false,
- overlayClose: true,
- escKey: true,
- arrowKey: true,
- top: false,
- bottom: false,
- left: false,
- right: false,
- fixed: false,
- data: undefined
- },
-
- // 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',
-
- // Special Handling for IE
- isIE = !$.support.leadingWhitespace, // IE6 to IE8
- isIE6 = isIE && !window.XMLHttpRequest, // IE6
- event_ie6 = prefix + '_IE6',
-
- // Cached jQuery Object Variables
- $overlay,
- $box,
- $wrap,
- $content,
- $topBorder,
- $leftBorder,
- $rightBorder,
- $bottomBorder,
- $related,
- $window,
- $loaded,
- $loadingBay,
- $loadingOverlay,
- $title,
- $current,
- $slideshow,
- $next,
- $prev,
- $close,
- $groupControls,
-
- // Variables for cached values or use across multiple functions
- settings,
- interfaceHeight,
- interfaceWidth,
- loadedHeight,
- loadedWidth,
- element,
- index,
- photo,
- open,
- active,
- closing,
- loadingTimer,
- publicMethod,
- div = "div",
- className,
- init;
-
- // ****************
- // HELPER FUNCTIONS
- // ****************
-
- // Convience 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);
- }
-
- // 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() : $window.height()) / 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 this regex.
- function isImage(url) {
- return settings.photo || /\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i.test(url);
- }
-
- // Assigns function results to their respective properties
- function makeSettings() {
- var i,
- data = $.data(element, colorbox);
-
- if (data == null) {
- settings = $.extend({}, defaults);
- if (console && console.log) {
- console.log('Error: cboxElement missing settings object');
- }
- } else {
- settings = $.extend({}, data);
- }
-
- for (i in settings) {
- if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.
- settings[i] = settings[i].call(element);
- }
- }
-
- settings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow';
- settings.href = settings.href || $(element).attr('href');
- settings.title = settings.title || element.title;
-
- if (typeof settings.href === "string") {
- settings.href = $.trim(settings.href);
- }
- }
-
- function trigger(event, callback) {
- $(document).trigger(event);
- $('*', $box).trigger(event);
- if (callback) {
- callback.call(element);
- }
- }
-
- // Slideshow functionality
- function slideshow() {
- var
- timeOut,
- className = prefix + "Slideshow_",
- click = "click." + prefix,
- start,
- stop;
-
- if (settings.slideshow && $related[1]) {
- start = function () {
- $slideshow
- .html(settings.slideshowStop)
- .unbind(click)
- .bind(event_complete, function () {
- if (settings.loop || $related[index + 1]) {
- timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
- }
- })
- .bind(event_load, function () {
- clearTimeout(timeOut);
- })
- .one(click + ' ' + event_cleanup, stop);
- $box.removeClass(className + "off").addClass(className + "on");
- timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
- };
-
- stop = function () {
- clearTimeout(timeOut);
- $slideshow
- .html(settings.slideshowStart)
- .unbind([event_complete, event_load, event_cleanup, click].join(' '))
- .one(click, function () {
- publicMethod.next();
- start();
- });
- $box.removeClass(className + "on").addClass(className + "off");
- };
-
- if (settings.slideshowAuto) {
- start();
- } else {
- stop();
- }
- } else {
- $box.removeClass(className + "off " + className + "on");
- }
- }
-
- function launch(target) {
- if (!closing) {
-
- element = target;
-
- makeSettings();
-
- $related = $(element);
-
- index = 0;
-
- if (settings.rel !== 'nofollow') {
- $related = $('.' + boxElement).filter(function () {
- var data = $.data(this, colorbox),
- relRelated;
-
- if (data) {
- relRelated = $(this).data('rel') || data.rel || this.rel;
- }
-
- return (relRelated === settings.rel);
- });
- index = $related.index(element);
-
- // Check direct calls to ColorBox.
- if (index === -1) {
- $related = $related.add(element);
- index = $related.length - 1;
- }
- }
-
- if (!open) {
- open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
-
- // Show colorbox so the sizes can be calculated in older versions of jQuery
- $box.css({visibility:'hidden', display:'block'});
- $loaded.css({width:0, height:0});
-
- // Cache values needed for size calculations
- interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();//Subtraction needed for IE6
- interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
- loadedHeight = $loaded.outerHeight(true);
- loadedWidth = $loaded.outerWidth(true);
-
- if (settings.returnFocus) {
- $(element).blur();
- $(document).one(event_closed, function () {
- $(element).focus();
- });
- }
-
- $overlay.css({
- opacity: parseFloat(settings.opacity),
- cursor: settings.overlayClose ? "pointer" : "auto",
- visibility: 'visible'
- }).show();
-
- // Opens inital empty ColorBox prior to content being loaded.
- settings.w = setSize(settings.initialWidth, 'x');
- settings.h = setSize(settings.initialHeight, 'y');
- publicMethod.position();
-
- if (isIE6) {
- $window.bind('resize.' + event_ie6 + ' scroll.' + event_ie6, function () {
- $overlay.css({width: $window.width(), height: $window.height(), top: $window.scrollTop(), left: $window.scrollLeft()});
- }).trigger('resize.' + event_ie6);
- }
-
- trigger(event_open, settings.onOpen);
-
- $groupControls.add($title).hide();
-
- $close.html(settings.close).show();
- }
-
- publicMethod.load(true);
- }
- }
-
- // 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': isIE ? prefix + (isIE6 ? 'IE6' : 'IE') : ''}).hide();
- $overlay = $tag(div, "Overlay", isIE6 ? 'position:absolute' : '').hide();
- $loadingOverlay = $tag(div, "LoadingOverlay").add($tag(div, "LoadingGraphic"));
- $wrap = $tag(div, "Wrapper");
- $content = $tag(div, "Content").append(
- $loaded = $tag(div, "LoadedContent", 'width:0; height:0; overflow:hidden'),
- $title = $tag(div, "Title"),
- $current = $tag(div, "Current"),
- $next = $tag(div, "Next"),
- $prev = $tag(div, "Previous"),
- $slideshow = $tag(div, "Slideshow").bind(event_open, slideshow),
- $close = $tag(div, "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');
-
- $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.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.overlayClose) {
- publicMethod.close();
- }
- });
-
- // Key Bindings
- $(document).bind('keydown.' + prefix, function (e) {
- var key = e.keyCode;
- if (open && settings.escKey && key === 27) {
- e.preventDefault();
- publicMethod.close();
- }
- if (open && settings.arrowKey && $related[1]) {
- if (key === 37) {
- e.preventDefault();
- $prev.click();
- } else if (key === 39) {
- e.preventDefault();
- $next.click();
- }
- }
- });
-
- if ($.isFunction($.fn.on)) {
- $(document).on('click.'+prefix, '.'+boxElement, clickHandler);
- } else { // For jQuery 1.3.x -> 1.6.x
- $('.'+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: $.fn.colorbox.close();
- // Usage from within an iframe: parent.$.fn.colorbox.close();
- // ****************
-
- publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
- var $this = this;
-
- options = options || {};
-
- appendHTML();
-
- if (addBindings()) {
- if ($.isFunction($this)) { // assume a call to $.colorbox
- $this = $('<a/>');
- options.open = true;
- } else if (!$this[0]) { // colorbox being applied to empty collection
- return $this;
- }
-
- if (callback) {
- options.onComplete = callback;
- }
-
- $this.each(function () {
- $.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options));
- }).addClass(boxElement);
-
- if (($.isFunction(options.open) && options.open.call($this)) || options.open) {
- launch($this[0]);
- }
- }
-
- return $this;
- };
-
- 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.fixed && !isIE6) {
- 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.right !== false) {
- left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0);
- } else if (settings.left !== false) {
- left += setSize(settings.left, 'x');
- } else {
- left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
- }
-
- if (settings.bottom !== false) {
- top += Math.max($window.height() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0);
- } else if (settings.top !== false) {
- top += setSize(settings.top, 'y');
- } else {
- top += Math.round(Math.max($window.height() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
- }
-
- $box.css({top: offset.top, left: offset.left, visibility:'visible'});
-
- // setting the speed to 0 to reduce the delay between same-sized content.
- speed = ($box.width() === settings.w + loadedWidth && $box.height() === settings.h + loadedHeight) ? 0 : speed || 0;
-
- // 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(that) {
- $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt(that.style.width,10) - interfaceWidth)+'px';
- $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt(that.style.height,10) - interfaceHeight)+'px';
- }
-
- css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left};
-
- if(speed===0){ // temporary workaround to side-step jQuery-UI 1.8 bug (http://bugs.jquery.com/ticket/12273)
- $box.css(css);
- }
- $box.dequeue().animate(css, {
- duration: speed,
- complete: function () {
- modalDimensions(this);
-
- 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.reposition) {
- setTimeout(function () { // small delay before binding onresize due to an IE8 bug.
- $window.bind('resize.' + prefix, publicMethod.position);
- }, 1);
- }
-
- if (loadedCallback) {
- loadedCallback();
- }
- },
- step: function () {
- modalDimensions(this);
- }
- });
- };
-
- publicMethod.resize = function (options) {
- 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) {
- $loaded.css({height: "auto"});
- settings.h = $loaded.height();
- }
- $loaded.css({height: settings.h});
-
- publicMethod.position(settings.transition === "none" ? 0 : settings.speed);
- }
- };
-
- publicMethod.prep = function (object) {
- if (!open) {
- return;
- }
-
- var callback, speed = settings.transition === "none" ? 0 : settings.speed;
-
- $loaded.empty().remove(); // Using empty first may prevent some IE7 issues.
-
- $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.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', marginLeft: 'auto', marginRight: 'auto'});
-
- $(photo).css({'float': 'none'});
-
-
- callback = function () {
- var total = $related.length,
- iframe,
- frameBorder = 'frameBorder',
- allowTransparency = 'allowTransparency',
- complete;
-
- if (!open) {
- return;
- }
-
- function removeFilter() {
- if (isIE) {
- $box[0].style.removeAttribute('filter');
- }
- }
-
- complete = function () {
- clearTimeout(loadingTimer);
- $loadingOverlay.remove();
- trigger(event_complete, settings.onComplete);
- };
-
- if (isIE) {
- //This fadeIn helps the bicubic resampling to kick-in.
- if (photo) {
- $loaded.fadeIn(100);
- }
- }
-
- $title.html(settings.title).add($loaded).show();
-
- if (total > 1) { // handle grouping
- if (typeof settings.current === "string") {
- $current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show();
- }
-
- $next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next);
- $prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous);
-
- if (settings.slideshow) {
- $slideshow.show();
- }
-
- // Preloads images within a rel group
- if (settings.preloading) {
- $.each([getIndex(-1), getIndex(1)], function(){
- var src,
- img,
- i = $related[this],
- data = $.data(i, colorbox);
-
- if (data && data.href) {
- src = data.href;
- if ($.isFunction(src)) {
- src = src.call(i);
- }
- } else {
- src = i.href;
- }
-
- if (isImage(src)) {
- img = new Image();
- img.src = src;
- }
- });
- }
- } else {
- $groupControls.hide();
- }
-
- if (settings.iframe) {
- iframe = $tag('iframe')[0];
-
- if (frameBorder in iframe) {
- iframe[frameBorder] = 0;
- }
-
- if (allowTransparency in iframe) {
- iframe[allowTransparency] = "true";
- }
-
- if (!settings.scrolling) {
- iframe.scrolling = "no";
- }
-
- $(iframe)
- .attr({
- src: settings.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
- webkitAllowFullScreen : true,
- mozallowfullscreen : true
- })
- .one('load', complete)
- .appendTo($loaded);
-
- $(document).one(event_purge, function () {
- iframe.src = "//about:blank";
- });
-
- if (settings.fastIframe) {
- $(iframe).trigger('load');
- }
- } else {
- complete();
- }
-
- if (settings.transition === 'fade') {
- $box.fadeTo(speed, 1, removeFilter);
- } else {
- removeFilter();
- }
- };
-
- if (settings.transition === 'fade') {
- $box.fadeTo(speed, 0, function () {
- publicMethod.position(0, callback);
- });
- } else {
- publicMethod.position(speed, callback);
- }
- };
-
- publicMethod.load = function (launched) {
- var href, setResize, prep = publicMethod.prep, $inline;
-
- active = true;
-
- photo = false;
-
- element = $related[index];
-
- if (!launched) {
- makeSettings();
- }
-
- if (className) {
- $box.add($overlay).removeClass(className);
- }
- if (settings.className) {
- $box.add($overlay).addClass(settings.className);
- }
- className = settings.className;
-
- trigger(event_purge);
-
- trigger(event_load, settings.onLoad);
-
- settings.h = settings.height ?
- setSize(settings.height, 'y') - loadedHeight - interfaceHeight :
- settings.innerHeight && setSize(settings.innerHeight, 'y');
-
- settings.w = settings.width ?
- setSize(settings.width, 'x') - loadedWidth - interfaceWidth :
- settings.innerWidth && setSize(settings.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.maxWidth) {
- settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth;
- settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
- }
- if (settings.maxHeight) {
- settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight;
- settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
- }
-
- href = settings.href;
-
- loadingTimer = setTimeout(function () {
- $loadingOverlay.appendTo($content);
- }, 100);
-
- if (settings.inline) {
- // 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 = $tag(div).hide().insertBefore($(href)[0]);
-
- $(document).one(event_purge, function () {
- $inline.replaceWith($loaded.children());
- });
-
- prep($(href));
- } else if (settings.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.html) {
- prep(settings.html);
- } else if (isImage(href)) {
- $(photo = new Image())
- .addClass(prefix + 'Photo')
- .bind('error',function () {
- settings.title = false;
- prep($tag(div, 'Error').html(settings.imgError));
- })
- .one('load', function () {
- var percent;
-
- if (settings.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.h - photo.height, 0) / 2 + 'px';
- }
-
- if ($related[1] && (settings.loop || $related[index + 1])) {
- photo.style.cursor = 'pointer';
- photo.onclick = function () {
- publicMethod.next();
- };
- }
-
- if (isIE) {
- photo.style.msInterpolationMode = 'bicubic';
- }
-
- setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise.
- prep(photo);
- }, 1);
- });
-
- setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise.
- photo.src = href;
- }, 1);
- } else if (href) {
- $loadingBay.load(href, settings.data, function (data, status) {
- prep(status === 'error' ? $tag(div, 'Error').html(settings.xhrError) : $(this).contents());
- });
- }
- };
-
- // Navigates to the next page/image in a set.
- publicMethod.next = function () {
- if (!active && $related[1] && (settings.loop || $related[index + 1])) {
- index = getIndex(1);
- publicMethod.load();
- }
- };
-
- publicMethod.prev = function () {
- if (!active && $related[1] && (settings.loop || index)) {
- index = getIndex(-1);
- publicMethod.load();
- }
- };
-
- // Note: to use this within an iframe use the following format: parent.$.fn.colorbox.close();
- publicMethod.close = function () {
- if (open && !closing) {
-
- closing = true;
-
- open = false;
-
- trigger(event_cleanup, settings.onCleanup);
-
- $window.unbind('.' + prefix + ' .' + event_ie6);
-
- $overlay.fadeTo(200, 0);
-
- $box.stop().fadeTo(300, 0, function () {
-
- $box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide();
-
- trigger(event_purge);
-
- $loaded.empty().remove(); // Using empty first may prevent some IE7 issues.
-
- setTimeout(function () {
- closing = false;
- trigger(event_closed, settings.onClosed);
- }, 1);
- });
- }
- };
-
- // Removes changes ColorBox made to the document, but does not remove the plugin
- // from jQuery.
- publicMethod.remove = function () {
- $([]).add($box).add($overlay).remove();
- $box = null;
- $('.' + boxElement)
- .removeData(colorbox)
- .removeClass(boxElement);
-
- $(document).unbind('click.'+prefix);
- };
-
- // A method for fetching the current element ColorBox is referencing.
- // returns a jQuery object.
- publicMethod.element = function () {
- return $(element);
- };
-
- publicMethod.settings = defaults;
-
-}(jQuery, document, window));
vendor/assets/javascripts/jquery.Jcrop.js
@@ -1,1600 +0,0 @@
-/**
- * jquery.Jcrop.js v0.9.9
- * jQuery Image Cropping Plugin
- * @author Kelly Hallman <khallman@gmail.com>
- * Copyright (c) 2008-2011 Kelly Hallman - released under MIT License {{{
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * }}}
- */
-
-(function ($) {
-
- $.Jcrop = function (obj, opt) {
- var options = $.extend({}, $.Jcrop.defaults),
- docOffset, lastcurs, ie6mode = false;
-
- // Internal Methods {{{
- function px(n) {
- return parseInt(n, 10) + 'px';
- }
- function pct(n) {
- return parseInt(n, 10) + '%';
- }
- function cssClass(cl) {
- return options.baseClass + '-' + cl;
- }
- function supportsColorFade() {
- return $.fx.step.hasOwnProperty('backgroundColor');
- }
- function getPos(obj) //{{{
- {
- // Updated in v0.9.4 to use built-in dimensions plugin
- var pos = $(obj).offset();
- return [pos.left, pos.top];
- }
- //}}}
- function mouseAbs(e) //{{{
- {
- return [(e.pageX - docOffset[0]), (e.pageY - docOffset[1])];
- }
- //}}}
- function setOptions(opt) //{{{
- {
- if (typeof(opt) !== 'object') {
- opt = {};
- }
- options = $.extend(options, opt);
-
- if (typeof(options.onChange) !== 'function') {
- options.onChange = function () {};
- }
- if (typeof(options.onSelect) !== 'function') {
- options.onSelect = function () {};
- }
- if (typeof(options.onRelease) !== 'function') {
- options.onRelease = function () {};
- }
- }
- //}}}
- function myCursor(type) //{{{
- {
- if (type !== lastcurs) {
- Tracker.setCursor(type);
- lastcurs = type;
- }
- }
- //}}}
- function startDragMode(mode, pos) //{{{
- {
- docOffset = getPos($img);
- Tracker.setCursor(mode === 'move' ? mode : mode + '-resize');
-
- if (mode === 'move') {
- return Tracker.activateHandlers(createMover(pos), doneSelect);
- }
-
- var fc = Coords.getFixed();
- var opp = oppLockCorner(mode);
- var opc = Coords.getCorner(oppLockCorner(opp));
-
- Coords.setPressed(Coords.getCorner(opp));
- Coords.setCurrent(opc);
-
- Tracker.activateHandlers(dragmodeHandler(mode, fc), doneSelect);
- }
- //}}}
- function dragmodeHandler(mode, f) //{{{
- {
- return function (pos) {
- if (!options.aspectRatio) {
- switch (mode) {
- case 'e':
- pos[1] = f.y2;
- break;
- case 'w':
- pos[1] = f.y2;
- break;
- case 'n':
- pos[0] = f.x2;
- break;
- case 's':
- pos[0] = f.x2;
- break;
- }
- } else {
- switch (mode) {
- case 'e':
- pos[1] = f.y + 1;
- break;
- case 'w':
- pos[1] = f.y + 1;
- break;
- case 'n':
- pos[0] = f.x + 1;
- break;
- case 's':
- pos[0] = f.x + 1;
- break;
- }
- }
- Coords.setCurrent(pos);
- Selection.update();
- };
- }
- //}}}
- function createMover(pos) //{{{
- {
- var lloc = pos;
- KeyManager.watchKeys();
-
- return function (pos) {
- Coords.moveOffset([pos[0] - lloc[0], pos[1] - lloc[1]]);
- lloc = pos;
-
- Selection.update();
- };
- }
- //}}}
- function oppLockCorner(ord) //{{{
- {
- switch (ord) {
- case 'n':
- return 'sw';
- case 's':
- return 'nw';
- case 'e':
- return 'nw';
- case 'w':
- return 'ne';
- case 'ne':
- return 'sw';
- case 'nw':
- return 'se';
- case 'se':
- return 'nw';
- case 'sw':
- return 'ne';
- }
- }
- //}}}
- function createDragger(ord) //{{{
- {
- return function (e) {
- if (options.disabled) {
- return false;
- }
- if ((ord === 'move') && !options.allowMove) {
- return false;
- }
- btndown = true;
- startDragMode(ord, mouseAbs(e));
- e.stopPropagation();
- e.preventDefault();
- return false;
- };
- }
- //}}}
- function presize($obj, w, h) //{{{
- {
- var nw = $obj.width(),
- nh = $obj.height();
- if ((nw > w) && w > 0) {
- nw = w;
- nh = (w / $obj.width()) * $obj.height();
- }
- if ((nh > h) && h > 0) {
- nh = h;
- nw = (h / $obj.height()) * $obj.width();
- }
- xscale = $obj.width() / nw;
- yscale = $obj.height() / nh;
- $obj.width(nw).height(nh);
- }
- //}}}
- function unscale(c) //{{{
- {
- return {
- x: parseInt(c.x * xscale, 10),
- y: parseInt(c.y * yscale, 10),
- x2: parseInt(c.x2 * xscale, 10),
- y2: parseInt(c.y2 * yscale, 10),
- w: parseInt(c.w * xscale, 10),
- h: parseInt(c.h * yscale, 10)
- };
- }
- //}}}
- function doneSelect(pos) //{{{
- {
- var c = Coords.getFixed();
- if ((c.w > options.minSelect[0]) && (c.h > options.minSelect[1])) {
- Selection.enableHandles();
- Selection.done();
- } else {
- Selection.release();
- }
- Tracker.setCursor(options.allowSelect ? 'crosshair' : 'default');
- }
- //}}}
- function newSelection(e) //{{{
- {
- if (options.disabled) {
- return false;
- }
- if (!options.allowSelect) {
- return false;
- }
- btndown = true;
- docOffset = getPos($img);
- Selection.disableHandles();
- myCursor('crosshair');
- var pos = mouseAbs(e);
- Coords.setPressed(pos);
- Selection.update();
- Tracker.activateHandlers(selectDrag, doneSelect);
- KeyManager.watchKeys();
-
- e.stopPropagation();
- e.preventDefault();
- return false;
- }
- //}}}
- function selectDrag(pos) //{{{
- {
- Coords.setCurrent(pos);
- Selection.update();
- }
- //}}}
- function newTracker() //{{{
- {
- var trk = $('<div></div>').addClass(cssClass('tracker'));
- if ($.browser.msie) {
- trk.css({
- opacity: 0,
- backgroundColor: 'white'
- });
- }
- return trk;
- }
- //}}}
-
- // }}}
- // Initialization {{{
- // Sanitize some options {{{
- if ($.browser.msie && ($.browser.version.split('.')[0] === '6')) {
- ie6mode = true;
- }
- if (typeof(obj) !== 'object') {
- obj = $(obj)[0];
- }
- if (typeof(opt) !== 'object') {
- opt = {};
- }
- // }}}
- setOptions(opt);
- // Initialize some jQuery objects {{{
- // The values are SET on the image(s) for the interface
- // If the original image has any of these set, they will be reset
- // However, if you destroy() the Jcrop instance the original image's
- // character in the DOM will be as you left it.
- var img_css = {
- border: 'none',
- margin: 0,
- padding: 0,
- position: 'absolute'
- };
-
- var $origimg = $(obj);
- var $img = $origimg.clone().removeAttr('id').css(img_css);
-
- $img.width($origimg.width());
- $img.height($origimg.height());
- $origimg.after($img).hide();
-
- presize($img, options.boxWidth, options.boxHeight);
-
- var boundx = $img.width(),
- boundy = $img.height(),
-
-
- $div = $('<div />').width(boundx).height(boundy).addClass(cssClass('holder')).css({
- position: 'relative',
- backgroundColor: options.bgColor
- }).insertAfter($origimg).append($img);
-
- delete(options.bgColor);
- if (options.addClass) {
- $div.addClass(options.addClass);
- }
-
- var $img2 = $('<img />')
- .attr('src', $img.attr('src')).css(img_css).width(boundx).height(boundy),
-
- $img_holder = $('<div />')
- .width(pct(100)).height(pct(100)).css({
- zIndex: 310,
- position: 'absolute',
- overflow: 'hidden'
- }).append($img2),
-
- $hdl_holder = $('<div />')
- .width(pct(100)).height(pct(100)).css('zIndex', 320),
-
- $sel = $('<div />')
- .css({
- position: 'absolute',
- zIndex: 300
- }).insertBefore($img).append($img_holder, $hdl_holder);
-
- if (ie6mode) {
- $sel.css({
- overflowY: 'hidden'
- });
- }
-
- var bound = options.boundary;
- var $trk = newTracker().width(boundx + (bound * 2)).height(boundy + (bound * 2)).css({
- position: 'absolute',
- top: px(-bound),
- left: px(-bound),
- zIndex: 290
- }).mousedown(newSelection);
-
- /* }}} */
- // Set more variables {{{
- var bgopacity = options.bgOpacity,
- xlimit, ylimit, xmin, ymin, xscale, yscale, enabled = true,
- btndown, animating, shift_down;
-
- docOffset = getPos($img);
- // }}}
- // }}}
- // Internal Modules {{{
- // Touch Module {{{
- var Touch = (function () {
- // Touch support detection function adapted (under MIT License)
- // from code by Jeffrey Sambells - http://github.com/iamamused/
- function hasTouchSupport() {
- var support = {},
- events = ['touchstart', 'touchmove', 'touchend'],
- el = document.createElement('div'), i;
-
- try {
- for(i=0; i<events.length; i++) {
- var eventName = events[i];
- eventName = 'on' + eventName;
- var isSupported = (eventName in el);
- if (!isSupported) {
- el.setAttribute(eventName, 'return;');
- isSupported = typeof el[eventName] == 'function';
- }
- support[events[i]] = isSupported;
- }
- return support.touchstart && support.touchend && support.touchmove;
- }
- catch(err) {
- return false;
- }
- }
-
- function detectSupport() {
- if ((options.touchSupport === true) || (options.touchSupport === false)) return options.touchSupport;
- else return hasTouchSupport();
- }
- return {
- createDragger: function (ord) {
- return function (e) {
- e.pageX = e.originalEvent.changedTouches[0].pageX;
- e.pageY = e.originalEvent.changedTouches[0].pageY;
- if (options.disabled) {
- return false;
- }
- if ((ord === 'move') && !options.allowMove) {
- return false;
- }
- btndown = true;
- startDragMode(ord, mouseAbs(e));
- e.stopPropagation();
- e.preventDefault();
- return false;
- };
- },
- newSelection: function (e) {
- e.pageX = e.originalEvent.changedTouches[0].pageX;
- e.pageY = e.originalEvent.changedTouches[0].pageY;
- return newSelection(e);
- },
- isSupported: hasTouchSupport,
- support: detectSupport()
- };
- }());
- // }}}
- // Coords Module {{{
- var Coords = (function () {
- var x1 = 0,
- y1 = 0,
- x2 = 0,
- y2 = 0,
- ox, oy;
-
- function setPressed(pos) //{{{
- {
- pos = rebound(pos);
- x2 = x1 = pos[0];
- y2 = y1 = pos[1];
- }
- //}}}
- function setCurrent(pos) //{{{
- {
- pos = rebound(pos);
- ox = pos[0] - x2;
- oy = pos[1] - y2;
- x2 = pos[0];
- y2 = pos[1];
- }
- //}}}
- function getOffset() //{{{
- {
- return [ox, oy];
- }
- //}}}
- function moveOffset(offset) //{{{
- {
- var ox = offset[0],
- oy = offset[1];
-
- if (0 > x1 + ox) {
- ox -= ox + x1;
- }
- if (0 > y1 + oy) {
- oy -= oy + y1;
- }
-
- if (boundy < y2 + oy) {
- oy += boundy - (y2 + oy);
- }
- if (boundx < x2 + ox) {
- ox += boundx - (x2 + ox);
- }
-
- x1 += ox;
- x2 += ox;
- y1 += oy;
- y2 += oy;
- }
- //}}}
- function getCorner(ord) //{{{
- {
- var c = getFixed();
- switch (ord) {
- case 'ne':
- return [c.x2, c.y];
- case 'nw':
- return [c.x, c.y];
- case 'se':
- return [c.x2, c.y2];
- case 'sw':
- return [c.x, c.y2];
- }
- }
- //}}}
- function getFixed() //{{{
- {
- if (!options.aspectRatio) {
- return getRect();
- }
- // This function could use some optimization I think...
- var aspect = options.aspectRatio,
- min_x = options.minSize[0] / xscale,
-
-
- //min_y = options.minSize[1]/yscale,
- max_x = options.maxSize[0] / xscale,
- max_y = options.maxSize[1] / yscale,
- rw = x2 - x1,
- rh = y2 - y1,
- rwa = Math.abs(rw),
- rha = Math.abs(rh),
- real_ratio = rwa / rha,
- xx, yy;
-
- if (max_x === 0) {
- max_x = boundx * 10;
- }
- if (max_y === 0) {
- max_y = boundy * 10;
- }
- if (real_ratio < aspect) {
- yy = y2;
- w = rha * aspect;
- xx = rw < 0 ? x1 - w : w + x1;
-
- if (xx < 0) {
- xx = 0;
- h = Math.abs((xx - x1) / aspect);
- yy = rh < 0 ? y1 - h : h + y1;
- } else if (xx > boundx) {
- xx = boundx;
- h = Math.abs((xx - x1) / aspect);
- yy = rh < 0 ? y1 - h : h + y1;
- }
- } else {
- xx = x2;
- h = rwa / aspect;
- yy = rh < 0 ? y1 - h : y1 + h;
- if (yy < 0) {
- yy = 0;
- w = Math.abs((yy - y1) * aspect);
- xx = rw < 0 ? x1 - w : w + x1;
- } else if (yy > boundy) {
- yy = boundy;
- w = Math.abs(yy - y1) * aspect;
- xx = rw < 0 ? x1 - w : w + x1;
- }
- }
-
- // Magic %-)
- if (xx > x1) { // right side
- if (xx - x1 < min_x) {
- xx = x1 + min_x;
- } else if (xx - x1 > max_x) {
- xx = x1 + max_x;
- }
- if (yy > y1) {
- yy = y1 + (xx - x1) / aspect;
- } else {
- yy = y1 - (xx - x1) / aspect;
- }
- } else if (xx < x1) { // left side
- if (x1 - xx < min_x) {
- xx = x1 - min_x;
- } else if (x1 - xx > max_x) {
- xx = x1 - max_x;
- }
- if (yy > y1) {
- yy = y1 + (x1 - xx) / aspect;
- } else {
- yy = y1 - (x1 - xx) / aspect;
- }
- }
-
- if (xx < 0) {
- x1 -= xx;
- xx = 0;
- } else if (xx > boundx) {
- x1 -= xx - boundx;
- xx = boundx;
- }
-
- if (yy < 0) {
- y1 -= yy;
- yy = 0;
- } else if (yy > boundy) {
- y1 -= yy - boundy;
- yy = boundy;
- }
-
- return makeObj(flipCoords(x1, y1, xx, yy));
- }
- //}}}
- function rebound(p) //{{{
- {
- if (p[0] < 0) {
- p[0] = 0;
- }
- if (p[1] < 0) {
- p[1] = 0;
- }
-
- if (p[0] > boundx) {
- p[0] = boundx;
- }
- if (p[1] > boundy) {
- p[1] = boundy;
- }
-
- return [p[0], p[1]];
- }
- //}}}
- function flipCoords(x1, y1, x2, y2) //{{{
- {
- var xa = x1,
- xb = x2,
- ya = y1,
- yb = y2;
- if (x2 < x1) {
- xa = x2;
- xb = x1;
- }
- if (y2 < y1) {
- ya = y2;
- yb = y1;
- }
- return [Math.round(xa), Math.round(ya), Math.round(xb), Math.round(yb)];
- }
- //}}}
- function getRect() //{{{
- {
- var xsize = x2 - x1,
- ysize = y2 - y1,
- delta;
-
- if (xlimit && (Math.abs(xsize) > xlimit)) {
- x2 = (xsize > 0) ? (x1 + xlimit) : (x1 - xlimit);
- }
- if (ylimit && (Math.abs(ysize) > ylimit)) {
- y2 = (ysize > 0) ? (y1 + ylimit) : (y1 - ylimit);
- }
-
- if (ymin / yscale && (Math.abs(ysize) < ymin / yscale)) {
- y2 = (ysize > 0) ? (y1 + ymin / yscale) : (y1 - ymin / yscale);
- }
- if (xmin / xscale && (Math.abs(xsize) < xmin / xscale)) {
- x2 = (xsize > 0) ? (x1 + xmin / xscale) : (x1 - xmin / xscale);
- }
-
- if (x1 < 0) {
- x2 -= x1;
- x1 -= x1;
- }
- if (y1 < 0) {
- y2 -= y1;
- y1 -= y1;
- }
- if (x2 < 0) {
- x1 -= x2;
- x2 -= x2;
- }
- if (y2 < 0) {
- y1 -= y2;
- y2 -= y2;
- }
- if (x2 > boundx) {
- delta = x2 - boundx;
- x1 -= delta;
- x2 -= delta;
- }
- if (y2 > boundy) {
- delta = y2 - boundy;
- y1 -= delta;
- y2 -= delta;
- }
- if (x1 > boundx) {
- delta = x1 - boundy;
- y2 -= delta;
- y1 -= delta;
- }
- if (y1 > boundy) {
- delta = y1 - boundy;
- y2 -= delta;
- y1 -= delta;
- }
-
- return makeObj(flipCoords(x1, y1, x2, y2));
- }
- //}}}
- function makeObj(a) //{{{
- {
- return {
- x: a[0],
- y: a[1],
- x2: a[2],
- y2: a[3],
- w: a[2] - a[0],
- h: a[3] - a[1]
- };
- }
- //}}}
-
- return {
- flipCoords: flipCoords,
- setPressed: setPressed,
- setCurrent: setCurrent,
- getOffset: getOffset,
- moveOffset: moveOffset,
- getCorner: getCorner,
- getFixed: getFixed
- };
- }());
-
- //}}}
- // Selection Module {{{
- var Selection = (function () {
- var awake, hdep = 370;
- var borders = {};
- var handle = {};
- var seehandles = false;
- var hhs = options.handleOffset;
-
- // Private Methods
- function insertBorder(type) //{{{
- {
- var jq = $('<div />').css({
- position: 'absolute',
- opacity: options.borderOpacity
- }).addClass(cssClass(type));
- $img_holder.append(jq);
- return jq;
- }
- //}}}
- function dragDiv(ord, zi) //{{{
- {
- var jq = $('<div />').mousedown(createDragger(ord)).css({
- cursor: ord + '-resize',
- position: 'absolute',
- zIndex: zi
- });
-
- if (Touch.support) {
- jq.bind('touchstart', Touch.createDragger(ord));
- }
-
- $hdl_holder.append(jq);
- return jq;
- }
- //}}}
- function insertHandle(ord) //{{{
- {
- return dragDiv(ord, hdep++).css({
- top: px(-hhs + 1),
- left: px(-hhs + 1),
- opacity: options.handleOpacity
- }).addClass(cssClass('handle'));
- }
- //}}}
- function insertDragbar(ord) //{{{
- {
- var s = options.handleSize,
- h = s,
- w = s,
- t = hhs,
- l = hhs;
-
- switch (ord) {
- case 'n':
- case 's':
- w = pct(100);
- break;
- case 'e':
- case 'w':
- h = pct(100);
- break;
- }
-
- return dragDiv(ord, hdep++).width(w).height(h).css({
- top: px(-t + 1),
- left: px(-l + 1)
- });
- }
- //}}}
- function createHandles(li) //{{{
- {
- var i;
- for (i = 0; i < li.length; i++) {
- handle[li[i]] = insertHandle(li[i]);
- }
- }
- //}}}
- function moveHandles(c) //{{{
- {
- var midvert = Math.round((c.h / 2) - hhs),
- midhoriz = Math.round((c.w / 2) - hhs),
- north = -hhs + 1,
- west = -hhs + 1,
- east = c.w - hhs,
- south = c.h - hhs,
- x, y;
-
- if (handle.e) {
- handle.e.css({
- top: px(midvert),
- left: px(east)
- });
- handle.w.css({
- top: px(midvert)
- });
- handle.s.css({
- top: px(south),
- left: px(midhoriz)
- });
- handle.n.css({
- left: px(midhoriz)
- });
- }
- if (handle.ne) {
- handle.ne.css({
- left: px(east)
- });
- handle.se.css({
- top: px(south),
- left: px(east)
- });
- handle.sw.css({
- top: px(south)
- });
- }
- if (handle.b) {
- handle.b.css({
- top: px(south)
- });
- handle.r.css({
- left: px(east)
- });
- }
- }
- //}}}
- function moveto(x, y) //{{{
- {
- $img2.css({
- top: px(-y),
- left: px(-x)
- });
- $sel.css({
- top: px(y),
- left: px(x)
- });
- }
- //}}}
- function resize(w, h) //{{{
- {
- $sel.width(w).height(h);
- }
- //}}}
- function refresh() //{{{
- {
- var c = Coords.getFixed();
-
- Coords.setPressed([c.x, c.y]);
- Coords.setCurrent([c.x2, c.y2]);
-
- updateVisible();
- }
- //}}}
-
- // Internal Methods
- function updateVisible() //{{{
- {
- if (awake) {
- return update();
- }
- }
- //}}}
- function update() //{{{
- {
- var c = Coords.getFixed();
-
- resize(c.w, c.h);
- moveto(c.x, c.y);
-
-/*
- options.drawBorders &&
- borders.right.css({ left: px(c.w-1) }) &&
- borders.bottom.css({ top: px(c.h-1) });
- */
-
- if (seehandles) {
- moveHandles(c);
- }
- if (!awake) {
- show();
- }
-
- options.onChange.call(api, unscale(c));
- }
- //}}}
- function show() //{{{
- {
- $sel.show();
-
- if (options.bgFade) {
- $img.fadeTo(options.fadeTime, bgopacity);
- } else {
- $img.css('opacity', bgopacity);
- }
-
- awake = true;
- }
- //}}}
- function release() //{{{
- {
- disableHandles();
- $sel.hide();
-
- if (options.bgFade) {
- $img.fadeTo(options.fadeTime, 1);
- } else {
- $img.css('opacity', 1);
- }
-
- awake = false;
- options.onRelease.call(api);
- }
- //}}}
- function showHandles() //{{{
- {
- if (seehandles) {
- moveHandles(Coords.getFixed());
- $hdl_holder.show();
- }
- }
- //}}}
- function enableHandles() //{{{
- {
- seehandles = true;
- if (options.allowResize) {
- moveHandles(Coords.getFixed());
- $hdl_holder.show();
- return true;
- }
- }
- //}}}
- function disableHandles() //{{{
- {
- seehandles = false;
- $hdl_holder.hide();
- }
- //}}}
- function animMode(v) //{{{
- {
- if (animating === v) {
- disableHandles();
- } else {
- enableHandles();
- }
- }
- //}}}
- function done() //{{{
- {
- animMode(false);
- refresh();
- }
- //}}}
- /* Insert draggable elements {{{*/
-
- // Insert border divs for outline
- if (options.drawBorders) {
- borders = {
- top: insertBorder('hline'),
- bottom: insertBorder('hline bottom'),
- left: insertBorder('vline'),
- right: insertBorder('vline right')
- };
- }
-
- // Insert handles on edges
- if (options.dragEdges) {
- handle.t = insertDragbar('n');
- handle.b = insertDragbar('s');
- handle.r = insertDragbar('e');
- handle.l = insertDragbar('w');
- }
-
- // Insert side and corner handles
- if (options.sideHandles) {
- createHandles(['n', 's', 'e', 'w']);
- }
- if (options.cornerHandles) {
- createHandles(['sw', 'nw', 'ne', 'se']);
- }
-
-
- //}}}
-
- var $track = newTracker().mousedown(createDragger('move')).css({
- cursor: 'move',
- position: 'absolute',
- zIndex: 360
- });
-
- if (Touch.support) {
- $track.bind('touchstart.jcrop', Touch.createDragger('move'));
- }
-
- $img_holder.append($track);
- disableHandles();
-
- return {
- updateVisible: updateVisible,
- update: update,
- release: release,
- refresh: refresh,
- isAwake: function () {
- return awake;
- },
- setCursor: function (cursor) {
- $track.css('cursor', cursor);
- },
- enableHandles: enableHandles,
- enableOnly: function () {
- seehandles = true;
- },
- showHandles: showHandles,
- disableHandles: disableHandles,
- animMode: animMode,
- done: done
- };
- }());
-
- //}}}
- // Tracker Module {{{
- var Tracker = (function () {
- var onMove = function () {},
- onDone = function () {},
- trackDoc = options.trackDocument;
-
- function toFront() //{{{
- {
- $trk.css({
- zIndex: 450
- });
- if (trackDoc) {
- $(document)
- .bind('mousemove',trackMove)
- .bind('mouseup',trackUp);
- }
- }
- //}}}
- function toBack() //{{{
- {
- $trk.css({
- zIndex: 290
- });
- if (trackDoc) {
- $(document)
- .unbind('mousemove', trackMove)
- .unbind('mouseup', trackUp);
- }
- }
- //}}}
- function trackMove(e) //{{{
- {
- onMove(mouseAbs(e));
- return false;
- }
- //}}}
- function trackUp(e) //{{{
- {
- e.preventDefault();
- e.stopPropagation();
-
- if (btndown) {
- btndown = false;
-
- onDone(mouseAbs(e));
-
- if (Selection.isAwake()) {
- options.onSelect.call(api, unscale(Coords.getFixed()));
- }
-
- toBack();
- onMove = function () {};
- onDone = function () {};
- }
-
- return false;
- }
- //}}}
- function activateHandlers(move, done) //{{{
- {
- btndown = true;
- onMove = move;
- onDone = done;
- toFront();
- return false;
- }
- //}}}
- function trackTouchMove(e) //{{{
- {
- e.pageX = e.originalEvent.changedTouches[0].pageX;
- e.pageY = e.originalEvent.changedTouches[0].pageY;
- return trackMove(e);
- }
- //}}}
- function trackTouchEnd(e) //{{{
- {
- e.pageX = e.originalEvent.changedTouches[0].pageX;
- e.pageY = e.originalEvent.changedTouches[0].pageY;
- return trackUp(e);
- }
- //}}}
- function setCursor(t) //{{{
- {
- $trk.css('cursor', t);
- }
- //}}}
-
- if (Touch.support) {
- $(document)
- .bind('touchmove', trackTouchMove)
- .bind('touchend', trackTouchEnd);
- }
-
- if (!trackDoc) {
- $trk.mousemove(trackMove).mouseup(trackUp).mouseout(trackUp);
- }
-
- $img.before($trk);
- return {
- activateHandlers: activateHandlers,
- setCursor: setCursor
- };
- }());
- //}}}
- // KeyManager Module {{{
- var KeyManager = (function () {
- var $keymgr = $('<input type="radio" />').css({
- position: 'fixed',
- left: '-120px',
- width: '12px'
- }),
- $keywrap = $('<div />').css({
- position: 'absolute',
- overflow: 'hidden'
- }).append($keymgr);
-
- function watchKeys() //{{{
- {
- if (options.keySupport) {
- $keymgr.show();
- $keymgr.focus();
- }
- }
- //}}}
- function onBlur(e) //{{{
- {
- $keymgr.hide();
- }
- //}}}
- function doNudge(e, x, y) //{{{
- {
- if (options.allowMove) {
- Coords.moveOffset([x, y]);
- Selection.updateVisible();
- }
- e.preventDefault();
- e.stopPropagation();
- }
- //}}}
- function parseKey(e) //{{{
- {
- if (e.ctrlKey) {
- return true;
- }
- shift_down = e.shiftKey ? true : false;
- var nudge = shift_down ? 10 : 1;
-
- switch (e.keyCode) {
- case 37:
- doNudge(e, -nudge, 0);
- break;
- case 39:
- doNudge(e, nudge, 0);
- break;
- case 38:
- doNudge(e, 0, -nudge);
- break;
- case 40:
- doNudge(e, 0, nudge);
- break;
- case 27:
- Selection.release();
- break;
- case 9:
- return true;
- }
-
- return false;
- }
- //}}}
-
- if (options.keySupport) {
- $keymgr.keydown(parseKey).blur(onBlur);
- if (ie6mode || !options.fixedSupport) {
- $keymgr.css({
- position: 'absolute',
- left: '-20px'
- });
- $keywrap.append($keymgr).insertBefore($img);
- } else {
- $keymgr.insertBefore($img);
- }
- }
-
-
- return {
- watchKeys: watchKeys
- };
- }());
- //}}}
- // }}}
- // API methods {{{
- function setClass(cname) //{{{
- {
- $div.removeClass().addClass(cssClass('holder')).addClass(cname);
- }
- //}}}
- function animateTo(a, callback) //{{{
- {
- var x1 = parseInt(a[0], 10) / xscale,
- y1 = parseInt(a[1], 10) / yscale,
- x2 = parseInt(a[2], 10) / xscale,
- y2 = parseInt(a[3], 10) / yscale;
-
- if (animating) {
- return;
- }
-
- var animto = Coords.flipCoords(x1, y1, x2, y2),
- c = Coords.getFixed(),
- initcr = [c.x, c.y, c.x2, c.y2],
- animat = initcr,
- interv = options.animationDelay,
- ix1 = animto[0] - initcr[0],
- iy1 = animto[1] - initcr[1],
- ix2 = animto[2] - initcr[2],
- iy2 = animto[3] - initcr[3],
- pcent = 0,
- velocity = options.swingSpeed;
-
- x = animat[0];
- y = animat[1];
- x2 = animat[2];
- y2 = animat[3];
-
- Selection.animMode(true);
- var anim_timer;
-
- function queueAnimator() {
- window.setTimeout(animator, interv);
- }
- var animator = (function () {
- return function () {
- pcent += (100 - pcent) / velocity;
-
- animat[0] = x + ((pcent / 100) * ix1);
- animat[1] = y + ((pcent / 100) * iy1);
- animat[2] = x2 + ((pcent / 100) * ix2);
- animat[3] = y2 + ((pcent / 100) * iy2);
-
- if (pcent >= 99.8) {
- pcent = 100;
- }
- if (pcent < 100) {
- setSelectRaw(animat);
- queueAnimator();
- } else {
- Selection.done();
- if (typeof(callback) === 'function') {
- callback.call(api);
- }
- }
- };
- }());
- queueAnimator();
- }
- //}}}
- function setSelect(rect) //{{{
- {
- setSelectRaw([
- parseInt(rect[0], 10) / xscale, parseInt(rect[1], 10) / yscale, parseInt(rect[2], 10) / xscale, parseInt(rect[3], 10) / yscale]);
- }
- //}}}
- function setSelectRaw(l) //{{{
- {
- Coords.setPressed([l[0], l[1]]);
- Coords.setCurrent([l[2], l[3]]);
- Selection.update();
- }
- //}}}
- function tellSelect() //{{{
- {
- return unscale(Coords.getFixed());
- }
- //}}}
- function tellScaled() //{{{
- {
- return Coords.getFixed();
- }
- //}}}
- function setOptionsNew(opt) //{{{
- {
- setOptions(opt);
- interfaceUpdate();
- }
- //}}}
- function disableCrop() //{{{
- {
- options.disabled = true;
- Selection.disableHandles();
- Selection.setCursor('default');
- Tracker.setCursor('default');
- }
- //}}}
- function enableCrop() //{{{
- {
- options.disabled = false;
- interfaceUpdate();
- }
- //}}}
- function cancelCrop() //{{{
- {
- Selection.done();
- Tracker.activateHandlers(null, null);
- }
- //}}}
- function destroy() //{{{
- {
- $div.remove();
- $origimg.show();
- $(obj).removeData('Jcrop');
- }
- //}}}
- function setImage(src, callback) //{{{
- {
- Selection.release();
- disableCrop();
- var img = new Image();
- img.onload = function () {
- var iw = img.width;
- var ih = img.height;
- var bw = options.boxWidth;
- var bh = options.boxHeight;
- $img.width(iw).height(ih);
- $img.attr('src', src);
- $img2.attr('src', src);
- presize($img, bw, bh);
- boundx = $img.width();
- boundy = $img.height();
- $img2.width(boundx).height(boundy);
- $trk.width(boundx + (bound * 2)).height(boundy + (bound * 2));
- $div.width(boundx).height(boundy);
- enableCrop();
-
- if (typeof(callback) === 'function') {
- callback.call(api);
- }
- };
- img.src = src;
- }
- //}}}
- function interfaceUpdate(alt) //{{{
- // This method tweaks the interface based on options object.
- // Called when options are changed and at end of initialization.
- {
- if (options.allowResize) {
- if (alt) {
- Selection.enableOnly();
- } else {
- Selection.enableHandles();
- }
- } else {
- Selection.disableHandles();
- }
-
- Tracker.setCursor(options.allowSelect ? 'crosshair' : 'default');
- Selection.setCursor(options.allowMove ? 'move' : 'default');
-
-
- if (options.hasOwnProperty('setSelect')) {
- setSelect(options.setSelect);
- Selection.done();
- delete(options.setSelect);
- }
-
- if (options.hasOwnProperty('trueSize')) {
- xscale = options.trueSize[0] / boundx;
- yscale = options.trueSize[1] / boundy;
- }
- if (options.hasOwnProperty('bgColor')) {
-
- if (supportsColorFade() && options.fadeTime) {
- $div.animate({
- backgroundColor: options.bgColor
- }, {
- queue: false,
- duration: options.fadeTime
- });
- } else {
- $div.css('backgroundColor', options.bgColor);
- }
-
- delete(options.bgColor);
- }
- if (options.hasOwnProperty('bgOpacity')) {
- bgopacity = options.bgOpacity;
-
- if (Selection.isAwake()) {
- if (options.fadeTime) {
- $img.fadeTo(options.fadeTime, bgopacity);
- } else {
- $div.css('opacity', options.opacity);
- }
- }
- delete(options.bgOpacity);
- }
-
- xlimit = options.maxSize[0] || 0;
- ylimit = options.maxSize[1] || 0;
- xmin = options.minSize[0] || 0;
- ymin = options.minSize[1] || 0;
-
- if (options.hasOwnProperty('outerImage')) {
- $img.attr('src', options.outerImage);
- delete(options.outerImage);
- }
-
- Selection.refresh();
- }
- //}}}
- //}}}
-
- if (Touch.support) {
- $trk.bind('touchstart', Touch.newSelection);
- }
-
- $hdl_holder.hide();
- interfaceUpdate(true);
-
- var api = {
- setImage: setImage,
- animateTo: animateTo,
- setSelect: setSelect,
- setOptions: setOptionsNew,
- tellSelect: tellSelect,
- tellScaled: tellScaled,
- setClass: setClass,
-
- disable: disableCrop,
- enable: enableCrop,
- cancel: cancelCrop,
- release: Selection.release,
- destroy: destroy,
-
- focus: KeyManager.watchKeys,
-
- getBounds: function () {
- return [boundx * xscale, boundy * yscale];
- },
- getWidgetSize: function () {
- return [boundx, boundy];
- },
- getScaleFactor: function () {
- return [xscale, yscale];
- },
-
- ui: {
- holder: $div,
- selection: $sel
- }
- };
-
- if ($.browser.msie) {
- $div.bind('selectstart', function () {
- return false;
- });
- }
-
- $origimg.data('Jcrop', api);
- return api;
- };
- $.fn.Jcrop = function (options, callback) //{{{
- {
-
- function attachWhenDone(from) //{{{
- {
- var opt = (typeof(options) === 'object') ? options : {};
- var loadsrc = opt.useImg || from.src;
- var img = new Image();
- img.onload = function () {
- function attachJcrop() {
- var api = $.Jcrop(from, opt);
- if (typeof(callback) === 'function') {
- callback.call(api);
- }
- }
-
- function attachAttempt() {
- if (!img.width || !img.height) {
- window.setTimeout(attachAttempt, 50);
- } else {
- attachJcrop();
- }
- }
- window.setTimeout(attachAttempt, 50);
- };
- img.src = loadsrc;
- }
- //}}}
-
- // Iterate over each object, attach Jcrop
- this.each(function () {
- // If we've already attached to this object
- if ($(this).data('Jcrop')) {
- // The API can be requested this way (undocumented)
- if (options === 'api') {
- return $(this).data('Jcrop');
- }
- // Otherwise, we just reset the options...
- else {
- $(this).data('Jcrop').setOptions(options);
- }
- }
- // If we haven't been attached, preload and attach
- else {
- attachWhenDone(this);
- }
- });
-
- // Return "this" so the object is chainable (jQuery-style)
- return this;
- };
- //}}}
- // Global Defaults {{{
- $.Jcrop.defaults = {
-
- // Basic Settings
- allowSelect: true,
- allowMove: true,
- allowResize: true,
-
- trackDocument: true,
-
- // Styling Options
- baseClass: 'jcrop',
- addClass: null,
- bgColor: 'black',
- bgOpacity: 0.6,
- bgFade: false,
- borderOpacity: 0.4,
- handleOpacity: 0.5,
- handleSize: 9,
- handleOffset: 5,
-
- aspectRatio: 0,
- keySupport: true,
- cornerHandles: true,
- sideHandles: true,
- drawBorders: true,
- dragEdges: true,
- fixedSupport: true,
- touchSupport: null,
-
- boxWidth: 0,
- boxHeight: 0,
- boundary: 2,
- fadeTime: 400,
- animationDelay: 20,
- swingSpeed: 3,
-
- minSelect: [0, 0],
- maxSize: [0, 0],
- minSize: [0, 0],
-
- // Callbacks / Event Handlers
- onChange: function () {},
- onSelect: function () {},
- onRelease: function () {}
- };
-
- // }}}
-}(jQuery));
vendor/assets/stylesheets/colorbox.css.scss
@@ -1,86 +0,0 @@
-/*
- 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:image-url("overlay.png") repeat 0 0;}
-#colorbox{}
- #cboxTopLeft{width:21px; height:21px; background:image-url("controls.png") no-repeat -101px 0;}
- #cboxTopRight{width:21px; height:21px; background:image-url("controls.png") no-repeat -130px 0;}
- #cboxBottomLeft{width:21px; height:21px; background:image-url("controls.png") no-repeat -101px -29px;}
- #cboxBottomRight{width:21px; height:21px; background:image-url("controls.png") no-repeat -130px -29px;}
- #cboxMiddleLeft{width:21px; background:image-url("controls.png") left top repeat-y;}
- #cboxMiddleRight{width:21px; background:image-url("controls.png") right top repeat-y;}
- #cboxTopCenter{height:21px; background:image-url("border.png") 0 0 repeat-x;}
- #cboxBottomCenter{height:21px; background:image-url("border.png") 0 -29px repeat-x;}
- #cboxContent{background:#fff; overflow:hidden;}
- .cboxIframe{background:#fff;}
- #cboxError{padding:50px; border:1px solid #ccc;}
- #cboxLoadedContent{margin-bottom:28px;}
- #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
- #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
- #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
- #cboxPrevious{position:absolute; bottom:0; left:0; background:image-url("controls.png") no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
- #cboxPrevious:hover{background-position:-75px -25px;}
- #cboxNext{position:absolute; bottom:0; left:27px; background:image-url("controls.png") no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
- #cboxNext:hover{background-position:-50px -25px;}
- #cboxLoadingOverlay{background:image-url("loading_background.png") no-repeat center center;}
- #cboxLoadingGraphic{background:image-url("loading.gif") no-repeat center center;}
- #cboxClose{position:absolute; bottom:0; right:0; background:image-url("controls.png") no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
- #cboxClose:hover{background-position:-25px -25px;}
-
-/*
- The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
- when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9.
- See: http://jacklmoore.com/notes/ie-transparency-problems/
-*/
-.cboxIE #cboxTopLeft,
-.cboxIE #cboxTopCenter,
-.cboxIE #cboxTopRight,
-.cboxIE #cboxBottomLeft,
-.cboxIE #cboxBottomCenter,
-.cboxIE #cboxBottomRight,
-.cboxIE #cboxMiddleLeft,
-.cboxIE #cboxMiddleRight {
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
-}
-
-/*
- The following provides PNG transparency support for IE6
- Feel free to remove this and the /ie6/ directory if you have dropped IE6 support.
-*/
-.cboxIE6 #cboxTopLeft{background:image-url("ie6/borderTopLeft.png");}
-.cboxIE6 #cboxTopCenter{background:image-url("ie6/borderTopCenter.png");}
-.cboxIE6 #cboxTopRight{background:image-url("ie6/borderTopRight.png");}
-.cboxIE6 #cboxBottomLeft{background:image-url("ie6/borderBottomLeft.png");}
-.cboxIE6 #cboxBottomCenter{background:image-url("ie6/borderBottomCenter.png");}
-.cboxIE6 #cboxBottomRight{background:image-url("ie6/borderBottomRight.png");}
-.cboxIE6 #cboxMiddleLeft{background:image-url("ie6/borderMiddleLeft.png");}
-.cboxIE6 #cboxMiddleRight{background:image-url("ie6/borderMiddleRight.png");}
-
-.cboxIE6 #cboxTopLeft,
-.cboxIE6 #cboxTopCenter,
-.cboxIE6 #cboxTopRight,
-.cboxIE6 #cboxBottomLeft,
-.cboxIE6 #cboxBottomCenter,
-.cboxIE6 #cboxBottomRight,
-.cboxIE6 #cboxMiddleLeft,
-.cboxIE6 #cboxMiddleRight {
- _behavior: expression(this.src = this.src ? this.src : this.currentStyle.backgroundImage.split('"')[1], this.style.background = "none", this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.src + ", sizingMethod='scale')");
-}
vendor/assets/stylesheets/jquery.Jcrop.css
@@ -1,35 +0,0 @@
-/* Fixes issue here http://code.google.com/p/jcrop/issues/detail?id=1 */
-.jcrop-holder { text-align: left; }
-
-.jcrop-vline, .jcrop-hline
-{
- font-size: 0px;
- position: absolute;
- background: white url('Jcrop.gif') top left repeat;
-}
-.jcrop-vline { height: 100%; width: 1px !important; }
-.jcrop-hline { width: 100%; height: 1px !important; }
-.jcrop-vline.right { right: 0px; }
-.jcrop-hline.bottom { bottom: 0px; }
-.jcrop-handle {
- font-size: 1px;
- width: 7px !important;
- height: 7px !important;
- border: 1px #eee solid;
- background-color: #333;
-}
-
-.jcrop-tracker { width: 100%; height: 100%; }
-
-.custom .jcrop-vline,
-.custom .jcrop-hline
-{
- background: yellow;
-}
-.custom .jcrop-handle
-{
- border-color: black;
- background-color: #C7BB00;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
-}
Gemfile
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
-gem 'rails', '~> 4.0.5'
+gem 'rails', '~> 4.0.8'
gem 'sass-rails', '~> 4.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0'
Gemfile.lock
@@ -1,25 +1,25 @@
GEM
remote: https://rubygems.org/
specs:
- actionmailer (4.0.5)
- actionpack (= 4.0.5)
+ actionmailer (4.0.8)
+ actionpack (= 4.0.8)
mail (~> 2.5.4)
- actionpack (4.0.5)
- activesupport (= 4.0.5)
+ actionpack (4.0.8)
+ activesupport (= 4.0.8)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
- activemodel (4.0.5)
- activesupport (= 4.0.5)
+ activemodel (4.0.8)
+ activesupport (= 4.0.8)
builder (~> 3.1.0)
- activerecord (4.0.5)
- activemodel (= 4.0.5)
+ activerecord (4.0.8)
+ activemodel (= 4.0.8)
activerecord-deprecated_finders (~> 1.0.2)
- activesupport (= 4.0.5)
+ activesupport (= 4.0.8)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
- activesupport (4.0.5)
+ activesupport (4.0.8)
i18n (~> 0.6, >= 0.6.9)
minitest (~> 4.2)
multi_json (~> 1.3)
@@ -184,7 +184,7 @@ GEM
subexec (~> 0.2.1)
mini_portile (0.5.3)
minitest (4.7.5)
- multi_json (1.10.0)
+ multi_json (1.10.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
naught (1.0.0)
@@ -205,25 +205,25 @@ GEM
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
- polyglot (0.3.4)
+ polyglot (0.3.5)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
- rails (4.0.5)
- actionmailer (= 4.0.5)
- actionpack (= 4.0.5)
- activerecord (= 4.0.5)
- activesupport (= 4.0.5)
+ rails (4.0.8)
+ actionmailer (= 4.0.8)
+ actionpack (= 4.0.8)
+ activerecord (= 4.0.8)
+ activesupport (= 4.0.8)
bundler (>= 1.3.0, < 2.0)
- railties (= 4.0.5)
- sprockets-rails (~> 2.0.0)
- railties (4.0.5)
- actionpack (= 4.0.5)
- activesupport (= 4.0.5)
+ railties (= 4.0.8)
+ sprockets-rails (~> 2.0)
+ railties (4.0.8)
+ actionpack (= 4.0.8)
+ activesupport (= 4.0.8)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
- rake (10.3.1)
+ rake (10.3.2)
rdoc (4.1.1)
json (~> 1.4)
rmagick (2.13.2)
@@ -270,7 +270,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sprockets-rails (2.0.1)
+ sprockets-rails (2.1.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
@@ -279,7 +279,7 @@ GEM
teaspoon (0.8.0)
railties (>= 3.2.5, < 5)
thor (0.19.1)
- thread_safe (0.3.3)
+ thread_safe (0.3.4)
tilt (1.4.1)
treetop (1.4.15)
polyglot
@@ -358,7 +358,7 @@ DEPENDENCIES
newrelic_rpm
pg
poltergeist
- rails (~> 4.0.5)
+ rails (~> 4.0.8)
rmagick (~> 2.13.0)
rspec-rails
sass-rails (~> 4.0)