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
(function(w,d, ranges) { | |
var html = document.documentElement | |
window.onresize = function() { | |
var width = w.innerWidth || d.documentElement.clientWidth || d.body.clientWidth || 0; | |
for (var i=0; i < ranges.length; i++) { | |
if (ranges[i] < width) { | |
break; | |
}; |
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
function hook_preprocess_webform_confirmation(&$vars) { | |
module_load_include('inc', 'webform', 'includes/webform.submissions'); | |
$node = $vars['node']; | |
$webform = $node->webform; | |
$submission = webform_get_submission($node->nid, $vars["sid"]); | |
$confirmation = $node->webform['confirmation']; | |
$confirmation = token_replace($confirmation, array('webform' => $submission), array('webform_tokens')); | |
$vars['confirmation_message'] = $confirmation; |
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
jQuery.request_scroll = (callback) -> | |
### | |
Callback for our scroll event - just | |
keeps a track on the last scroll value | |
### | |
onScroll = -> | |
lastScrollY = window.scrollY | |
requestTick() |
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
module.exports = function( grunt ) { | |
// Compile all coffee and compass files recursively within an project with grunt. | |
// Usage: | |
// > cd <my-project> | |
// > npm install grunt-contrib-watch |
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
if Modernizr.touch | |
_active = null | |
$context.bind 'touchend', (event) -> | |
_active = null | |
links = $context.find('.contents-item a').bind 'touchend', -> | |
if _active != this | |
_active = this | |
return false |
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
viewport = document.getElementById('viewport') | |
orientationchange = (event) -> | |
unit = "width" | |
current_orientation = window.orientation | |
wider = window.screen.width > window.screen.height | |
if (current_orientation == 180 and wider) or | |
(current_orientation == 0 and wider) or | |
(current_orientation == -90 and !wider) or |
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
sections = jQuery('.dd_skrollr-numbers-section') | |
wrapper = jQuery('.dd_skrollr-numbers') | |
page_bottom = document.body.scrollHeight | |
# leave top | |
wrapper_position_top = wrapper.offset().top | |
wrapper_height = wrapper.height() | |
wrapper_position_bottom = wrapper_height + wrapper_position_top |
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
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<link rel="import" href="../paper-toast/paper-toast.html"> | |
<link rel="import" href="../core-pages/core-pages.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../chart-js/chart-js.html"> |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
OlderNewer