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
/** | |
* @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. | |
* Available via the MIT or new BSD license. | |
* see: http://github.com/requirejs/text for details | |
*/ | |
/*jslint regexp: true */ | |
/*global require, XMLHttpRequest, ActiveXObject, | |
define, window, process, Packages, | |
java, location, Components, FileUtils */ |
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 (factory) { | |
'use strict'; | |
if (typeof define === 'function' && define.amd) { | |
define(['underscore'], factory); | |
} else { | |
factory(_); | |
} | |
})(function (_) { | |
var opts = { | |
refProp: '$ref', |
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
(($, window) -> | |
hasArgs = () -> arguments.length > 0 | |
noArgs = () -> arguments.length == 0 | |
class DomCallbacks | |
###* | |
* Defines the jQuery functions to create callbacks for, and which type of callback they contain | |
* @type {defaults} | |
* @properties {array of jQuery function names, and test to determine if the callback | |
* should be run based on input to the jQuery function, passed the same arguments that the jQuery | |
* function is} |
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
ko.bindingHandlers.jqHtml = | |
init: (element, valueAccessor) -> | |
$(element).preMutate (options, el) -> | |
if ko.isObservable valueAccessor() | |
valueAccessor().valueWillMutate() | |
$(element).onMutate _.debounce (argsCollection) => | |
@argsCollection = argsCollection | |
if ko.isObservable valueAccessor() | |
valueAccessor().valueHasMutated() | |
, 100 |
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
_.debounceAll = (func, wait, immediate) -> | |
timeout = undefined | |
result = undefined | |
results = [] | |
-> | |
results.push | |
context: this | |
args: for val in arguments | |
val |
NewerOlder