diff --git a/Gemfile b/Gemfile index 3c0a1afc4..d79be4a42 100644 --- a/Gemfile +++ b/Gemfile @@ -22,11 +22,12 @@ group :assets do # See https://github.com/sstephenson/execjs#readme for more supported runtimes # long term, we'll probably want node.js for performance, but this will do for now as it's easier for new people to install gem 'therubyracer', :platforms => :ruby + gem "less-rails" + gem "twitter-bootstrap-rails" gem 'uglifier', '>= 1.0.3' gem 'compass-rails', '~> 1.0.3' - gem 'zurb-foundation', '~> 3.0.9' end gem 'jquery-rails' @@ -48,7 +49,8 @@ gem 'capistrano-ext' # To use debugger # gem 'debugger' -# GROWSTUFF ADDITIONS BELOW HERE +# Markdown formatting for updates etc +gem 'bluecloth' # user signup/login/etc gem 'devise' diff --git a/Gemfile.lock b/Gemfile.lock index 04049ceb5..a1f1b6f70 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -30,9 +30,10 @@ GEM multi_json (~> 1.0) arel (3.0.2) bcrypt-ruby (3.0.1) + bluecloth (2.2.0) builder (3.0.4) cape (1.5.0) - capistrano (2.13.4) + capistrano (2.13.5) highline net-scp (>= 1.0.0) net-sftp (>= 2.0.0) @@ -48,13 +49,14 @@ GEM coffee-script-source execjs coffee-script-source (1.4.0) + commonjs (0.2.6) compass (0.12.2) chunky_png (~> 1.2) fssm (>= 0.2.7) sass (~> 3.1) compass-rails (1.0.3) compass (>= 0.12.2, < 0.14) - daemon_controller (1.0.0) + daemon_controller (1.1.0) devise (2.1.2) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.1) @@ -65,7 +67,7 @@ GEM execjs (1.4.0) multi_json (~> 1.0) fastthread (1.0.7) - friendly_id (4.0.8) + friendly_id (4.0.9) fssm (0.2.9) haml (3.1.7) haml-rails (0.3.5) @@ -81,16 +83,18 @@ GEM railties (>= 3.1.0, < 5.0) thor (~> 0.14) json (1.7.5) + less (2.2.2) + commonjs (~> 0.2.6) + less-rails (2.2.6) + actionpack (>= 3.1) + less (~> 2.2.0) libv8 (3.3.10.4) mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.19) - modular-scale (1.0.2) - compass (>= 0.11.5) - sassy-math (>= 1.2) - multi_json (1.3.6) + multi_json (1.3.7) net-scp (1.0.4) net-ssh (>= 1.99.1) net-sftp (2.0.5) @@ -100,7 +104,7 @@ GEM net-ssh (>= 1.99.1) nokogiri (1.5.5) orm_adapter (0.4.0) - passenger (3.0.17) + passenger (3.0.18) daemon_controller (>= 1.0.0) fastthread (>= 1.0.1) rack @@ -147,13 +151,11 @@ GEM rspec (~> 2.11.0) rvm-capistrano (1.2.7) capistrano (>= 2.0.0) - sass (3.2.1) + sass (3.2.2) sass-rails (3.2.5) railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) - sassy-math (1.2) - compass (~> 0.11) spork (0.9.2) sprockets (2.1.3) hike (~> 1.2) @@ -164,10 +166,14 @@ GEM libv8 (~> 3.3.10) thor (0.16.0) tilt (1.3.3) - treetop (1.4.11) + treetop (1.4.12) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.33) + twitter-bootstrap-rails (2.1.6) + actionpack (>= 3.1) + execjs + railties (>= 3.1) + tzinfo (0.3.35) uglifier (1.3.0) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) @@ -178,16 +184,12 @@ GEM nokogiri (>= 1.2.0) rack (>= 1.0) rack-test (>= 0.5.3) - zurb-foundation (3.0.9) - compass (>= 0.12.2) - modular-scale (>= 1.0.2) - rake - sass (>= 3.2.0) PLATFORMS ruby DEPENDENCIES + bluecloth bundler (>= 1.1.5) cape capistrano @@ -200,6 +202,7 @@ DEPENDENCIES haml haml-rails jquery-rails + less-rails passenger pg rails (= 3.2.8) @@ -210,7 +213,7 @@ DEPENDENCIES spork (~> 0.9.0.rc) sqlite3 therubyracer + twitter-bootstrap-rails uglifier (>= 1.0.3) watchr webrat - zurb-foundation (~> 3.0.9) diff --git a/app/assets/images/foundation/orbit/bullets.jpg b/app/assets/images/foundation/orbit/bullets.jpg deleted file mode 100644 index f3c734f0b..000000000 Binary files a/app/assets/images/foundation/orbit/bullets.jpg and /dev/null differ diff --git a/app/assets/images/foundation/orbit/left-arrow-small.png b/app/assets/images/foundation/orbit/left-arrow-small.png deleted file mode 100644 index b3ff03315..000000000 Binary files a/app/assets/images/foundation/orbit/left-arrow-small.png and /dev/null differ diff --git a/app/assets/images/foundation/orbit/left-arrow.png b/app/assets/images/foundation/orbit/left-arrow.png deleted file mode 100644 index 7e3f2d62d..000000000 Binary files a/app/assets/images/foundation/orbit/left-arrow.png and /dev/null differ diff --git a/app/assets/images/foundation/orbit/loading.gif b/app/assets/images/foundation/orbit/loading.gif deleted file mode 100644 index 969f50597..000000000 Binary files a/app/assets/images/foundation/orbit/loading.gif and /dev/null differ diff --git a/app/assets/images/foundation/orbit/mask-black.png b/app/assets/images/foundation/orbit/mask-black.png deleted file mode 100644 index 02f3fbab2..000000000 Binary files a/app/assets/images/foundation/orbit/mask-black.png and /dev/null differ diff --git a/app/assets/images/foundation/orbit/pause-black.png b/app/assets/images/foundation/orbit/pause-black.png deleted file mode 100644 index 5fb087545..000000000 Binary files a/app/assets/images/foundation/orbit/pause-black.png and /dev/null differ diff --git a/app/assets/images/foundation/orbit/right-arrow-small.png b/app/assets/images/foundation/orbit/right-arrow-small.png deleted file mode 100644 index e4c95330e..000000000 Binary files a/app/assets/images/foundation/orbit/right-arrow-small.png and /dev/null differ diff --git a/app/assets/images/foundation/orbit/right-arrow.png b/app/assets/images/foundation/orbit/right-arrow.png deleted file mode 100644 index 7c3199a77..000000000 Binary files a/app/assets/images/foundation/orbit/right-arrow.png and /dev/null differ diff --git a/app/assets/images/foundation/orbit/rotator-black.png b/app/assets/images/foundation/orbit/rotator-black.png deleted file mode 100644 index 8df4d31af..000000000 Binary files a/app/assets/images/foundation/orbit/rotator-black.png and /dev/null differ diff --git a/app/assets/images/foundation/orbit/timer-black.png b/app/assets/images/foundation/orbit/timer-black.png deleted file mode 100644 index 02f3fbab2..000000000 Binary files a/app/assets/images/foundation/orbit/timer-black.png and /dev/null differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 55916f200..759a3cf13 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,7 +12,6 @@ // //= require jquery //= require jquery_ujs -//= require foundation -//= require foundation/app +//= require twitter/bootstrap //= require_tree . diff --git a/app/assets/javascripts/bootstrap.js.coffee b/app/assets/javascripts/bootstrap.js.coffee new file mode 100644 index 000000000..c9404a8e2 --- /dev/null +++ b/app/assets/javascripts/bootstrap.js.coffee @@ -0,0 +1,4 @@ +jQuery -> + $("a[rel=popover]").popover() + $(".tooltip").tooltip() + $("a[rel=tooltip]").tooltip() \ No newline at end of file diff --git a/app/assets/javascripts/foundation/app.js b/app/assets/javascripts/foundation/app.js deleted file mode 100644 index e8ef09b65..000000000 --- a/app/assets/javascripts/foundation/app.js +++ /dev/null @@ -1,22 +0,0 @@ -(function ($) { - - $(function(){ - $(document).foundationAlerts(); - $(document).foundationButtons(); - $(document).foundationAccordion(); - $(document).foundationNavigation(); - $(document).foundationCustomForms(); - $(document).foundationMediaQueryViewer(); - $(document).foundationTabs({callback:$.foundation.customForms.appendCustomMarkup}); - - $(document).tooltips(); - $('input, textarea').placeholder(); - - // UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE8 SUPPORT AND ARE USING .block-grids - // $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'both'}); - // $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'both'}); - // $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'both'}); - // $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'both'}); - }); - -})(jQuery); diff --git a/app/assets/javascripts/foundation/jquery.foundation.accordion.js b/app/assets/javascripts/foundation/jquery.foundation.accordion.js deleted file mode 100644 index 34c746f03..000000000 --- a/app/assets/javascripts/foundation/jquery.foundation.accordion.js +++ /dev/null @@ -1,15 +0,0 @@ -(function ($){ - - $.fn.foundationAccordion = function (options) { - - $(document).on('click.fndtn', '.accordion li', function () { - var flyout = $(this).children('.content').first(); - $('.accordion .content').not(flyout).hide().parent('li').removeClass('active'); - flyout.show(0, function () { - flyout.parent('li').addClass('active'); - }); - }); - - }; - -})( jQuery ); diff --git a/app/assets/javascripts/foundation/jquery.foundation.alerts.js b/app/assets/javascripts/foundation/jquery.foundation.alerts.js deleted file mode 100644 index 0233f4f54..000000000 --- a/app/assets/javascripts/foundation/jquery.foundation.alerts.js +++ /dev/null @@ -1,19 +0,0 @@ -(function ($) { - - $.fn.foundationAlerts = function (options) { - var settings = $.extend({ - callback: $.noop - }, options); - - $(document).on("click", ".alert-box a.close", function (event) { - event.preventDefault(); - $(this).closest(".alert-box").fadeOut(function (event) { - $(this).remove(); - // Do something else after the alert closes - settings.callback(); - }); - }); - - }; - -})(jQuery); diff --git a/app/assets/javascripts/foundation/jquery.foundation.buttons.js b/app/assets/javascripts/foundation/jquery.foundation.buttons.js deleted file mode 100644 index 8da9458d2..000000000 --- a/app/assets/javascripts/foundation/jquery.foundation.buttons.js +++ /dev/null @@ -1,49 +0,0 @@ -(function ($) { - - $.fn.foundationButtons = function(options) { - // Prevent event propagation on disabled buttons - $(document).on('click.fndtn', '.button.disabled', function (e) { - e.preventDefault(); - }); - - $('.button.dropdown > ul', this).addClass('no-hover'); - - $(document).on('click.fndtn', '.button.dropdown, .button.dropdown.split span', function (e) { - // Stops further propagation of the event up the DOM tree when clicked on the button. - // Events fired by its descendants are not being blocked. - if (e.target === this) { - e.stopPropagation(); - } - }); - $(document).on('click.fndtn', '.button.dropdown.split span', function (e) { - e.preventDefault(); - $('.button.dropdown', this).not($(this).parent()).children('ul').removeClass('show-dropdown'); - $(this).siblings('ul').toggleClass('show-dropdown'); - }); - $(document).on('click.fndtn', '.button.dropdown:not(.split)', function (e) { - $('.button.dropdown', this).not(this).children('ul').removeClass('show-dropdown'); - $(this).children('ul').toggleClass('show-dropdown'); - }); - $(document).on('click.fndtn', 'body, html', function () { - $('.button.dropdown ul').removeClass('show-dropdown'); - }); - - // Positioning the Flyout List - var normalButtonHeight = $('.button.dropdown:not(.large):not(.small):not(.tiny)', this).outerHeight() - 1, - largeButtonHeight = $('.button.large.dropdown', this).outerHeight() - 1, - smallButtonHeight = $('.button.small.dropdown', this).outerHeight() - 1, - tinyButtonHeight = $('.button.tiny.dropdown', this).outerHeight() - 1; - - $('.button.dropdown:not(.large):not(.small):not(.tiny) > ul', this).css('top', normalButtonHeight); - $('.button.dropdown.large > ul', this).css('top', largeButtonHeight); - $('.button.dropdown.small > ul', this).css('top', smallButtonHeight); - $('.button.dropdown.tiny > ul', this).css('top', tinyButtonHeight); - - $('.button.dropdown.up:not(.large):not(.small):not(.tiny) > ul', this).css('top', 'auto').css('bottom', normalButtonHeight - 2); - $('.button.dropdown.up.large > ul', this).css('top', 'auto').css('bottom', largeButtonHeight - 2); - $('.button.dropdown.up.small > ul', this).css('top', 'auto').css('bottom', smallButtonHeight - 2); - $('.button.dropdown.up.tiny > ul', this).css('top', 'auto').css('bottom', tinyButtonHeight - 2); - - }; - -})( jQuery ); diff --git a/app/assets/javascripts/foundation/jquery.foundation.forms.js b/app/assets/javascripts/foundation/jquery.foundation.forms.js deleted file mode 100644 index 3e13398a9..000000000 --- a/app/assets/javascripts/foundation/jquery.foundation.forms.js +++ /dev/null @@ -1,483 +0,0 @@ -/* - * jQuery Custom Forms Plugin 1.0 - * www.ZURB.com - * Copyright 2010, ZURB - * Free to use under the MIT license. - * http://www.opensource.org/licenses/mit-license.php -*/ - -(function( $ ){ - - /** - * Helper object used to quickly adjust all hidden parent element's, display and visibility properties. - * This is currently used for the custom drop downs. When the dropdowns are contained within a reveal modal - * we cannot accurately determine the list-item elements width property, since the modal's display property is set - * to 'none'. - * - * This object will help us work around that problem. - * - * NOTE: This could also be plugin. - * - * @function hiddenFix - */ - var hiddenFix = function() { - - return { - /** - * Sets all hidden parent elements and self to visibile. - * - * @method adjust - * @param {jQuery Object} $child - */ - - // We'll use this to temporarily store style properties. - tmp : [], - - // We'll use this to set hidden parent elements. - hidden : null, - - adjust : function( $child ) { - // Internal reference. - var _self = this; - - // Set all hidden parent elements, including this element. - _self.hidden = $child.parents().andSelf().filter( ":hidden" ); - - // Loop through all hidden elements. - _self.hidden.each( function() { - - // Cache the element. - var $elem = $( this ); - - // Store the style attribute. - // Undefined if element doesn't have a style attribute. - _self.tmp.push( $elem.attr( 'style' ) ); - - // Set the element's display property to block, - // but ensure it's visibility is hidden. - $elem.css( { 'visibility' : 'hidden', 'display' : 'block' } ); - }); - - }, // end adjust - - /** - * Resets the elements previous state. - * - * @method reset - */ - reset : function() { - // Internal reference. - var _self = this; - // Loop through our hidden element collection. - _self.hidden.each( function( i ) { - // Cache this element. - var $elem = $( this ), - _tmp = _self.tmp[ i ]; // Get the stored 'style' value for this element. - - // If the stored value is undefined. - if( _tmp === undefined ) - // Remove the style attribute. - $elem.removeAttr( 'style' ); - else - // Otherwise, reset the element style attribute. - $elem.attr( 'style', _tmp ); - - }); - // Reset the tmp array. - _self.tmp = []; - // Reset the hidden elements variable. - _self.hidden = null; - - } // end reset - - }; // end return - - }; - - jQuery.foundation = jQuery.foundation || {}; - jQuery.foundation.customForms = jQuery.foundation.customForms || {}; - - $.foundation.customForms.appendCustomMarkup = function ( options ) { - - var defaults = { - disable_class: "js-disable-custom" - }; - - options = $.extend( defaults, options ); - - function appendCustomMarkup(idx, sel) { - var $this = $(sel).hide(), - type = $this.attr('type'), - $span = $this.next('span.custom.' + type); - - if ($span.length === 0) { - $span = $('').insertAfter($this); - } - - $span.toggleClass('checked', $this.is(':checked')); - $span.toggleClass('disabled', $this.is(':disabled')); - } - - function appendCustomSelect(idx, sel) { - var hiddenFixObj = hiddenFix(); - // - // jQueryify the element. - // - $options = $this.find( 'option' ), - // - // Filter down the selected options - // - $selectedOption = $options.filter( ':selected' ), - // - // Initial max width. - // - maxWidth = 0, - // - // We'll use this variable to create the
  • elements for our custom select. - // - liHtml = '', - // - // We'll use this to cache the created
  • elements within our custom select. - // - $listItems - ; - var $currentSelect = false; - // - // Should we not create a custom list? - // - if ( $this.hasClass( 'no-custom' ) ) return; - - // - // Did we not create a custom select element yet? - // - if ( $customSelect.length === 0 ) { - // - // Let's create our custom select element! - // - - // - // Determine what select size to use. - // - var customSelectSize = $this.hasClass( 'small' ) ? 'small' : - $this.hasClass( 'medium' ) ? 'medium' : - $this.hasClass( 'large' ) ? 'large' : - $this.hasClass( 'expand' ) ? 'expand' : '' - ; - // - // Build our custom list. - // - $customSelect = $('
    "'); - // - // Grab the selector element - // - $selector = $customSelect.find( ".selector" ); - // - // Grab the unordered list element from the custom list. - // - $customList = $customSelect.find( "ul" ); - // - // Build our
  • elements. - // - liHtml = $options.map( function() { return "
  • " + $( this ).html() + "
  • "; } ).get().join( '' ); - // - // Append our
  • elements to the custom list (