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
// Set model answar prop and check if answar is correct | |
this.questions.at( this.model.get("index") ).set( "answar", { | |
allPointsCorrect: _.all( draggables, function() { return $(this.target).data("accepted"); } ), | |
coords: _.map( draggables, function() { return $(this.target).data( "position" ); } ) | |
}); |
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
var SPEED = 200; | |
var JET = 420; | |
var GRAVITY = 900; | |
var OPENING = 200; | |
var SPAWN_RATE = 1.25; | |
var state = { | |
preload: function() { | |
this.load.image( "wall", "assets/wall.png" ); | |
this.load.image( "background", "assets/background-texture.png" ); |
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
define ["underscore"], (_) -> | |
class ResponsiveImagesController | |
currImgSize: "small" | |
breakpoint: 480 | |
constructor: (@images) -> | |
@debouncedHandleResize = _.debounce( @handleResize, 500 ) | |
@bindEvents() | |
@handleResize() | |
bindEvents: -> | |
$(window).on( "resize.responsive-images", @debouncedHandleResize ) |
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
<?php | |
$first_date = "{event_last_date format="%Y%m%d"}"; | |
$next_week = date( "Ymd", strtotime( "+1 Sunday 23:59" ) ); | |
$today = date( "Ymd", strtotime( "now" ) ); | |
echo "<p>First date: " . $first_date . "<br>"; | |
echo "next_week: " . $next_week . "<br>"; | |
echo "today: " . $today . "</p>"; |
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
li { | |
@for $i from 1 through 10 { | |
&:nth-child(#{$i}) { | |
@include experimental(animation-delay, #{$i * 0.2}s); | |
} | |
} | |
} |
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
define ["underscore", "model/Rectangle"], (_, Rectangle) -> | |
class ConfigRuleBook | |
constructor: () -> | |
# Relationship between fronts and shelves | |
@frontShelfRelationship = | |
"skuffe_1x05": "hylde_1" | |
"skuffe_1x1": "hylde_1" | |
"bakker_1": "hylde_1" | |
"skuffe_2x1": "hylde_2" | |
"klap_2x1": "hylde_2" |
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() { | |
define(["underscore", "view/elements/DrawerElement"], function(_, DrawerElementView) { | |
var ConfigurationLoader; | |
ConfigurationLoader = (function() { | |
function ConfigurationLoader() { | |
_.bindAll(this); | |
this.load(); | |
} | |
ConfigurationLoader.prototype.getConfigId = function() { |
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
define ["underscore", "view/elements/DrawerElement"], (_, DrawerElementView) -> | |
class ConfigurationLoader | |
constructor: -> | |
_.bindAll @ | |
@load() | |
getConfigId: -> | |
regex = /// | |
(.+?) # Match anything before config/ | |
config/ # Match "config/" |
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
# Here's the method. Filename should be written without the .js extention, so to load a file called | |
# Main.js you'd type require ["Main"] | |
require ["url/to/thing/"], -> | |
# Thing has now been loaded. Continue on | |
## If you need a reference to the object you just loaded (If the JS file returns an object etc.) you can catch it like this | |
require ["path/to/thing"], (Thing) -> | |
window.thing = new Thing() |
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
// Generated by CoffeeScript 1.3.1 | |
(function() { | |
var SliderControl, | |
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | |
SliderControl = (function() { | |
SliderControl.name = 'SliderControl'; | |
function SliderControl(el) { |