Skip to content

Commit

Permalink
Update bootstrap libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmanley committed Oct 8, 2012
1 parent e85239e commit fe1efec
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -10,7 +10,7 @@ gem 'coffeebeans'

group :assets do
gem 'sass-rails', '~> 3.2'
gem 'bootstrap-sass', '~> 2.1.0.0'
gem 'bootstrap-sass', git: 'git://github.com/wndxlori/bootstrap-sass.git'
gem 'coffee-rails', '~> 3.2'
gem 'uglifier'
gem 'haml_coffee_assets'
Expand Down
9 changes: 7 additions & 2 deletions Gemfile.lock
Expand Up @@ -24,6 +24,12 @@ GIT
mongoid (~> 3.0.0)
mongoid-grid_fs (~> 1.3.1)

GIT
remote: git://github.com/wndxlori/bootstrap-sass.git
revision: 2803b00c1ddf2c981624eac9998c26d7347232c2
specs:
bootstrap-sass (2.1.0.0)

GEM
remote: http://rubygems.org/
specs:
Expand All @@ -50,7 +56,6 @@ GEM
archive-zip (0.5.0)
io-like (>= 0.3.0)
bcrypt-ruby (3.0.1)
bootstrap-sass (2.1.0.0)
builder (3.0.3)
cancan (1.6.8)
capybara (1.1.2)
Expand Down Expand Up @@ -282,7 +287,7 @@ DEPENDENCIES
actionmailer
actionpack (~> 3.2)
archive-zip
bootstrap-sass (~> 2.1.0.0)
bootstrap-sass!
cancan
capybara
carrierwave
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/albums_controller.rb
Expand Up @@ -11,7 +11,7 @@ def index
def show
@album = Album.find_by_slug!(params[:id])
@children = @album.children.accessible_by(current_ability).cache
@images = @album.images.page(params[:page]).per(100)
@images = @album.images.page(params[:page])
authorize!(:show, @album)

respond_with(@album)
Expand Down
26 changes: 17 additions & 9 deletions vendor/assets/javascripts/bootstrap-image-gallery.js
@@ -1,5 +1,5 @@
/*
* Bootstrap Image Gallery 2.8
* Bootstrap Image Gallery 2.8.1
* https://github.com/blueimp/Bootstrap-Image-Gallery
*
* Copyright 2011, Sebastian Tschan
Expand Down Expand Up @@ -167,17 +167,21 @@
height: img.height
});
modal.find('.modal-title').css({ width: Math.max(img.width, 380) });
if ($(window).width() > 480) {
if (transition) {
clone = modal.clone().hide().appendTo(document.body);
}
if (transition) {
clone = modal.clone().hide().appendTo(document.body);
}
if ($(window).width() > 767) {
method.call(modal.stop(), {
'margin-top': -((clone || modal).outerHeight() / 2),
'margin-left': -((clone || modal).outerWidth() / 2)
});
if (clone) {
clone.remove();
}
} else {
modal.css({
top: ($(window).height() - (clone || modal).outerHeight()) / 2
});
}
if (clone) {
clone.remove();
}
modalImage.append(img);
forceReflow = img.offsetWidth;
Expand Down Expand Up @@ -326,11 +330,15 @@
canvas: options.canvas
};
}
if (windowWidth > 480) {
if (windowWidth > 767) {
modal.css({
'margin-top': -(modal.outerHeight() / 2),
'margin-left': -(modal.outerWidth() / 2)
});
} else {
modal.css({
top: ($(window).height() - modal.outerHeight()) / 2
});
}
this.initGalleryEvents();
this.initLinks();
Expand Down
@@ -1,6 +1,6 @@
@charset 'UTF-8';
/*
* Bootstrap Image Gallery CSS 2.5
* Bootstrap Image Gallery CSS 2.5.2
* https://github.com/blueimp/Bootstrap-Image-Gallery
*
* Copyright 2011, Sebastian Tschan
Expand All @@ -13,6 +13,7 @@
.modal-gallery {
width: auto;
max-height: none;
outline: none;
}
.modal-gallery .modal-body {
max-height: none;
Expand All @@ -32,7 +33,7 @@
}
.modal-gallery .modal-image:hover:before,
.modal-gallery .modal-image:hover:after {
content: '';
content: '\2039';
position: absolute;
top: 50%;
left: 15px;
Expand All @@ -54,7 +55,7 @@
z-index: 1;
}
.modal-gallery .modal-image:hover:after {
content: '';
content: '\203A';
left: auto;
right: 15px;
}
Expand All @@ -63,7 +64,7 @@
display: none;
}
.modal-loading .modal-image {
background: url(/assets/loading.gif) center no-repeat;
background: image-url('loading.gif') center no-repeat;
}
.modal-gallery.fade .modal-image {
-webkit-transition: width 0.15s ease, height 0.15s ease;
Expand Down Expand Up @@ -127,15 +128,19 @@
.modal-fullscreen .close,
.modal-fullscreen .modal-title {
color: #fff;
text-shadow: 0 0 2px rgba(33, 33, 33, 0.8);
text-shadow: 0 0 2px rgba(33, 33, 33, 0.8);
}
.modal-fullscreen .modal-header:hover,
.modal-fullscreen .modal-footer:hover {
opacity: 1;
}

@media (max-width: 480px) {
@media (max-width: 767px) {
.modal-gallery .btn span {
display: none;
}
.modal-fullscreen {
right: 0;
left: 0;
}
}
2 changes: 2 additions & 0 deletions vendor/assets/stylesheets/bootstrap-variables.css.scss
Expand Up @@ -2,3 +2,5 @@ $baseFontSize: 13px;
$baseLineHeight: 18px;
$navbarInverseBackground: #222;
$navbarInverseBackgroundHighlight: #333;
$iconSpritePath: image-path('glyphicons-halflings.png');
$iconWhiteSpritePath: image-path('glyphicons-halflings-white.png');

0 comments on commit fe1efec

Please sign in to comment.