I hereby claim:
- I am mlangens on github.
- I am mlangens (https://keybase.io/mlangens) on keybase.
- I have a public key ASB_zOGmgAwPgfC42rkZesA8XBFAcLHb9b-dbzXG1CZGFgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
if(!event){ | |
event = window.event; | |
} | |
if(event.stopPropagation){ | |
event.stopPropagation(); | |
} | |
else { | |
event.cancelBubble = true; | |
} |
this.inputChanger = function() { | |
$(window).on('keydown', function(event) { | |
if(event.which === 13) { | |
var target = $(event.target); | |
var thingie = target.closest('.lightbox-container'); | |
var inputs = thingie.find('input,textarea'); | |
var index = inputs.get().indexOf(event.target); | |
if (index === -1) { | |
target.click(); | |
} else { |
this.inputChanger = function() { | |
$(window).on('keydown', function(event) { | |
if(event.which === 13) { | |
var target = $(event.target); | |
var thingie = target.closest('.lightbox-container'); | |
var inputs = thingie.find('input,textarea,button'); | |
var index = inputs.get().indexOf(event.target); | |
// var nextIndex = (index + 1) % inputs.length; | |
var nextIndex = (index + 1) | |
if(nextIndex == inputs.length) { |
this.inputChanger = function() { | |
$(window).on('keydown', function(event) { | |
if(event.which === 13) { | |
var target = $(event.target); | |
var thingie = target.closest('.lightbox-container'); | |
var inputs = thingie.find('input,textarea'); | |
var index = inputs.get().indexOf(event.target); | |
var nextIndex = (index + 1) % inputs.length; | |
$(inputs.get(nextIndex)).focus(); | |
return false; |
<html> | |
<head> | |
<script type="text/javascript" src="jquery-1.8.2.min.js"></script> | |
<script> | |
var sampleRate = 44100; | |
var beatsPerMin = 180; | |
var ticksPerBeat = 4; | |
function applyEnvelope(data, a, d, s, r) { |
@Test | |
public void updateCustomCategoryShouldUpdateWithNoDuplicates() throws Exception { | |
long categoryId = 123L; | |
String categoryName = "new name"; | |
CustomCategory category1 = new CustomCategory(); | |
category1.setId(categoryId); | |
category1.setCategoryName("previous name"); | |
CustomCategory category2 = new CustomCategory(); |
Modularizing a Backbone View | |
Backbone views most usually always interact with the DOM, using our new modular system we can load in Javascript templates using Require.js text! plugin. | |
// Filename: views/project/list | |
define([ | |
'jQuery', | |
'Underscore', | |
'Backbone', | |
// Using the Require.js text! plugin, we are loaded raw text | |
// which will be used as our views primary template |
Backbone.View.extend({ | |
template: 'my-view-template', | |
render: function(){ | |
var that = this; | |
$.get("/templates/" + this.template + ".html", function(template){ | |
var html = $(template).tmpl(); | |
that.$el.html(html); | |
}); | |
return this; |
require([ "order!jquery-1.7.1.min", "order!underscore", "order!backbone", | |
"order!handlebars-1.0.0.beta.6", "order!navbar", "order!footer", | |
"order!about", "order!agile_resources", | |
"order!application_development", "order!apply_now", "order!books", | |
"order!careers", "order!contact", "order!learn", | |
"order!current_openings", "order!electronic_card_wall", "order!events", | |
"order!executive_bios", "order!home", "order!modernization", | |
"order!services", "order!testimonials", "order!training", | |
"order!transformation", "order!webinars", "order!whitepapers", | |
"order!views/views", "order!controllers/routes", "order!contentflow" ], |