-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature-mass_upload-rework
- Loading branch information
Showing
62 changed files
with
734 additions
and
518 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* jQuery plugin fitIntoViewport | ||
* --------------------------- | ||
* Repositions element(s) horizontally if some parts of them are not in the | ||
* viewport. | ||
* If element | ||
* - is bigger than window -> center | ||
* - reaches over left edge -> push right | ||
* - reaches over right edge -> push left | ||
* | ||
*/ | ||
|
||
(function( $ ) { | ||
$.fn.fitIntoViewport = function() { | ||
var window_width = $(window).width(); | ||
|
||
return this.each(function() { | ||
var $this = $(this), | ||
left_offset, outer_width, offset_parent, | ||
absolute_x, relative_x; | ||
|
||
// clear target css 'left' and 'right' before calculating | ||
$this.css({ | ||
left : '', | ||
right : '' | ||
}); | ||
|
||
left_offset = $this.offset().left; | ||
outer_width = $this.outerWidth(); | ||
|
||
// recalculate x position | ||
if (outer_width > window_width) { | ||
absolute_x = Math.floor((window_width - outer_width) / 2); | ||
} | ||
else if (left_offset < 0) { | ||
absolute_x = 0; | ||
} | ||
else if (left_offset + outer_width > window_width) { | ||
absolute_x = window_width - outer_width; | ||
} | ||
else { | ||
return false; | ||
} | ||
|
||
// calculate x relative to offset parent | ||
offset_parent = left_offset - $this.position().left; | ||
relative_x = absolute_x - offset_parent; | ||
|
||
$this.css({ | ||
left : relative_x, | ||
right : 'auto' | ||
}); | ||
}); | ||
}; | ||
}( jQuery )); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
$ -> | ||
$(document).ajaxStart -> | ||
$('.l-ajax-spinner').fadeIn 200 | ||
|
||
$(document).ajaxStop -> | ||
$('.l-ajax-spinner').fadeOut 200 | ||
|
||
$(document).on | ||
'ajaxStart': -> | ||
$('.l-ajax-spinner').fadeIn 200 | ||
'ajaxStop': -> | ||
$('.l-ajax-spinner').fadeOut 200 |
27 changes: 0 additions & 27 deletions
27
app/assets/javascripts/visual/category_dropdown_max_right.coffee
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
$ -> | ||
$('body') | ||
.on('touchstart', (e) -> | ||
$touchedElement = $(e.target).closest('.TouchHover') | ||
$('.TouchHover') | ||
.not($touchedElement) | ||
.removeClass('touched') | ||
) | ||
.on('touchstart', '.TouchHover', (e) -> | ||
$el = $(@) | ||
|
||
if $el.hasClass('touched') | ||
return true | ||
else | ||
e.preventDefault() | ||
$el | ||
.addClass('touched') | ||
.children('.TouchHover--hidden') | ||
.fitIntoViewport() | ||
) | ||
.on('mouseenter', '.TouchHover', (e) -> | ||
$(@) | ||
.children('.TouchHover--hidden') | ||
.fitIntoViewport() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
113 changes: 113 additions & 0 deletions
113
app/assets/stylesheets/billboards/_billboard-valentines.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
/** | ||
* Valentines billboard | ||
*/ | ||
|
||
|
||
// General stuff | ||
#billboard-valentines > article > ul > li p { | ||
text-indent: -1000em; | ||
} | ||
|
||
#billboard-valentines li p, | ||
#billboard-valentines li div { | ||
padding: 0; | ||
} | ||
|
||
|
||
// Responsive code: small version | ||
@include till-breakpoint($bp-tablet) { | ||
#billboard-valentines { | ||
background-image: image-url('welcome/billboard_valentines_small.jpg'); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link1 p { | ||
@include static-position($top: 22px, $left: 0, $height: 28px, | ||
$width: 208px); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link2 p { | ||
@include static-position($top: 193px, $left: 70px, $height: 31px, | ||
$width: 101px); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link3 p { | ||
@include static-position($top: 365px, $left: 68px, $height: 31px, | ||
$width: 103px); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link2 div { | ||
@include static-position($top: 65px, $left: 42px, $bottom: 229px, | ||
$right: 35px); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link3 div { | ||
@include static-position($top: 238px, $left: 42px, $bottom: 56px, | ||
$right: 35px); | ||
} | ||
} | ||
|
||
|
||
// Responsive code: medium version | ||
@include between-breakpoints($bp-tablet, $bp-tablet-horizontal) { | ||
#billboard-valentines { | ||
background-image: image-url('welcome/billboard_valentines_medium.jpg'); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link1 p { | ||
@include static-position($top: 25px, $left: 159px, $height: 32px, | ||
$width: 290px); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link2 p { | ||
@include static-position($top: 360px, $left: 210px, $height: 31px, | ||
$width: 101px); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link3 p { | ||
@include static-position($top: 360px, $left: 346px, $height: 32px, | ||
$width: 103px); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link2 div { | ||
@include static-position($top: 92px, $left: 180px, $bottom: 77px, | ||
$right: 138px); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link3 div { | ||
@include static-position($top: 92px, $left: 319px, $bottom: 77px, | ||
$right: 0); | ||
} | ||
} | ||
|
||
|
||
// Responsive code: big version | ||
@include at-breakpoint($bp-tablet-horizontal) { | ||
#billboard-valentines { | ||
background-image: image-url('welcome/billboard_valentines_big.jpg'); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link1 p { | ||
@include static-position($top: 360px, $left: 1px, $height: 32px, | ||
$width: 290px); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link2 p { | ||
@include static-position($top: 360px, $left: 397px, $height: 32px, | ||
$width: 101px); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link3 p { | ||
@include static-position($top: 360px, $left: 595px, $height: 32px, | ||
$width: 103px); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link2 div { | ||
@include static-position($top: 11px, $left: 315px, $bottom: 70px, | ||
$right: 201px); | ||
} | ||
|
||
#billboard-valentines li#billboard-valentines-link3 div { | ||
@include static-position($top: 11px, $left: 517px, $bottom: 70px, | ||
$right: 0); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.