Remove more trailing whitespace
This commit is contained in:
parent
63c8c59744
commit
e3e96aca73
|
@ -16,7 +16,7 @@
|
||||||
If you're not part of any existing organizations yet, we'll take you to a handy getting started guide to get you off the ground quickly.
|
If you're not part of any existing organizations yet, we'll take you to a handy getting started guide to get you off the ground quickly.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sync-row">
|
<div class="sync-row">
|
||||||
{{#unless isSyncing}}
|
{{#unless isSyncing}}
|
||||||
<img src="/images/getting-started/mustache-no-spin.png" class="spinner" width="100">
|
<img src="/images/getting-started/mustache-no-spin.png" class="spinner" width="100">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<img src="/images/getting-started/project-switch.png">
|
<img src="/images/getting-started/project-switch.png">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="column-right">
|
<div class="column-right">
|
||||||
<span class="steps">Step 1: Enabling your projects</span>
|
<span class="steps">Step 1: Enabling your projects</span>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
suite on Travis CI allows to track changes in coverage over time. If you haven't tried it out already, <a
|
suite on Travis CI allows to track changes in coverage over time. If you haven't tried it out already, <a
|
||||||
{{bindAttr href="Travis.config.code_climate_url"}}" target="_blank">sign
|
{{bindAttr href="Travis.config.code_climate_url"}}" target="_blank">sign
|
||||||
up today</a> for to improve your code's quality. New customers get 20% off for the first three months!
|
up today</a> for to improve your code's quality. New customers get 20% off for the first three months!
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
It only takes a few steps, once you've set up your project:
|
It only takes a few steps, once you've set up your project:
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
@Travis.reopen
|
@Travis.reopen
|
||||||
ReposView: Travis.View.extend
|
ReposView: Travis.View.extend
|
||||||
templateName: 'repos/list'
|
templateName: 'repos/list'
|
||||||
|
|
||||||
ReposListView: Em.CollectionView.extend
|
ReposListView: Em.CollectionView.extend
|
||||||
elementId: 'repos'
|
elementId: 'repos'
|
||||||
tagName: 'ul'
|
tagName: 'ul'
|
||||||
|
|
||||||
emptyView: Ember.View.extend
|
emptyView: Ember.View.extend
|
||||||
template: Ember.Handlebars.compile('<div class="loading"><span>Loading</span></div>')
|
template: Ember.Handlebars.compile('<div class="loading"><span>Loading</span></div>')
|
||||||
|
|
||||||
itemViewClass: Travis.View.extend
|
itemViewClass: Travis.View.extend
|
||||||
repoBinding: 'content'
|
repoBinding: 'content'
|
||||||
classNames: ['repo']
|
classNames: ['repo']
|
||||||
|
@ -16,34 +16,34 @@
|
||||||
selected: (->
|
selected: (->
|
||||||
@get('content') == @get('controller.selectedRepo')
|
@get('content') == @get('controller.selectedRepo')
|
||||||
).property('controller.selectedRepo')
|
).property('controller.selectedRepo')
|
||||||
|
|
||||||
color: (->
|
color: (->
|
||||||
Travis.Helpers.colorForState(@get('repo.lastBuildState'))
|
Travis.Helpers.colorForState(@get('repo.lastBuildState'))
|
||||||
).property('repo.lastBuildState')
|
).property('repo.lastBuildState')
|
||||||
|
|
||||||
click: ->
|
click: ->
|
||||||
@get('controller').transitionToRoute('/' + @get('repo.slug'))
|
@get('controller').transitionToRoute('/' + @get('repo.slug'))
|
||||||
|
|
||||||
ReposListTabsView: Travis.View.extend
|
ReposListTabsView: Travis.View.extend
|
||||||
templateName: 'repos/list/tabs'
|
templateName: 'repos/list/tabs'
|
||||||
tabBinding: 'controller.tab'
|
tabBinding: 'controller.tab'
|
||||||
currentUserBinding: 'controller.currentUser.id'
|
currentUserBinding: 'controller.currentUser.id'
|
||||||
|
|
||||||
activate: (name) ->
|
activate: (name) ->
|
||||||
@get('controller').transitionToRoot()
|
@get('controller').transitionToRoot()
|
||||||
@get('controller').activate(name)
|
@get('controller').activate(name)
|
||||||
|
|
||||||
classRecent: (->
|
classRecent: (->
|
||||||
'active' if @get('tab') == 'recent'
|
'active' if @get('tab') == 'recent'
|
||||||
).property('tab')
|
).property('tab')
|
||||||
|
|
||||||
classOwned: (->
|
classOwned: (->
|
||||||
classes = []
|
classes = []
|
||||||
classes.push('active') if @get('tab') == 'owned'
|
classes.push('active') if @get('tab') == 'owned'
|
||||||
classes.push('display-inline') if @get('currentUser')
|
classes.push('display-inline') if @get('currentUser')
|
||||||
classes.join(' ')
|
classes.join(' ')
|
||||||
).property('tab', 'currentUser')
|
).property('tab', 'currentUser')
|
||||||
|
|
||||||
classSearch: (->
|
classSearch: (->
|
||||||
'active' if @get('tab') == 'search'
|
'active' if @get('tab') == 'search'
|
||||||
).property('tab')
|
).property('tab')
|
||||||
|
|
24
assets/scripts/spec/vendor/jquery.mockjax.js
vendored
24
assets/scripts/spec/vendor/jquery.mockjax.js
vendored
|
@ -14,11 +14,11 @@
|
||||||
(function($) {
|
(function($) {
|
||||||
var _ajax = $.ajax,
|
var _ajax = $.ajax,
|
||||||
mockHandlers = [],
|
mockHandlers = [],
|
||||||
CALLBACK_REGEX = /=\?(&|$)/,
|
CALLBACK_REGEX = /=\?(&|$)/,
|
||||||
jsc = (new Date()).getTime();
|
jsc = (new Date()).getTime();
|
||||||
|
|
||||||
|
|
||||||
// Parse the given XML string.
|
// Parse the given XML string.
|
||||||
function parseXML(xml) {
|
function parseXML(xml) {
|
||||||
if ( window['DOMParser'] == undefined && window.ActiveXObject ) {
|
if ( window['DOMParser'] == undefined && window.ActiveXObject ) {
|
||||||
DOMParser = function() { };
|
DOMParser = function() { };
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
(s.context ? $(s.context) : $.event).trigger(type, args);
|
(s.context ? $(s.context) : $.event).trigger(type, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the data field on the mock handler and the request match. This
|
// Check if the data field on the mock handler and the request match. This
|
||||||
// can be used to restrict a mock handler to being used only when a certain
|
// can be used to restrict a mock handler to being used only when a certain
|
||||||
// set of data is passed to it.
|
// set of data is passed to it.
|
||||||
function isMockDataEqual( mock, live ) {
|
function isMockDataEqual( mock, live ) {
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
} else {
|
} else {
|
||||||
// Look for a simple wildcard '*' or a direct URL match
|
// Look for a simple wildcard '*' or a direct URL match
|
||||||
var star = handler.url.indexOf('*');
|
var star = handler.url.indexOf('*');
|
||||||
if (handler.url !== requestSettings.url && star === -1 ||
|
if (handler.url !== requestSettings.url && star === -1 ||
|
||||||
!new RegExp(handler.url.replace(/[-[\]{}()+?.,\\^$|#\s]/g, "\\$&").replace('*', '.+')).test(requestSettings.url)) {
|
!new RegExp(handler.url.replace(/[-[\]{}()+?.,\\^$|#\s]/g, "\\$&").replace('*', '.+')).test(requestSettings.url)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Inspect the request type
|
// Inspect the request type
|
||||||
if ( handler && handler.type &&
|
if ( handler && handler.type &&
|
||||||
handler.type.toLowerCase() != requestSettings.type.toLowerCase() ) {
|
handler.type.toLowerCase() != requestSettings.type.toLowerCase() ) {
|
||||||
// The request type doesn't match (GET vs. POST)
|
// The request type doesn't match (GET vs. POST)
|
||||||
return null;
|
return null;
|
||||||
|
@ -283,7 +283,7 @@
|
||||||
if(requestSettings.type.toUpperCase() === "GET" && remote ) {
|
if(requestSettings.type.toUpperCase() === "GET" && remote ) {
|
||||||
var newMockReturn = processJsonpRequest( requestSettings, mockHandler, origSettings );
|
var newMockReturn = processJsonpRequest( requestSettings, mockHandler, origSettings );
|
||||||
|
|
||||||
// Check if we are supposed to return a Deferred back to the mock call, or just
|
// Check if we are supposed to return a Deferred back to the mock call, or just
|
||||||
// signal success
|
// signal success
|
||||||
if(newMockReturn) {
|
if(newMockReturn) {
|
||||||
return newMockReturn;
|
return newMockReturn;
|
||||||
|
@ -299,14 +299,14 @@
|
||||||
function processJsonpUrl( requestSettings ) {
|
function processJsonpUrl( requestSettings ) {
|
||||||
if ( requestSettings.type.toUpperCase() === "GET" ) {
|
if ( requestSettings.type.toUpperCase() === "GET" ) {
|
||||||
if ( !CALLBACK_REGEX.test( requestSettings.url ) ) {
|
if ( !CALLBACK_REGEX.test( requestSettings.url ) ) {
|
||||||
requestSettings.url += (/\?/.test( requestSettings.url ) ? "&" : "?") +
|
requestSettings.url += (/\?/.test( requestSettings.url ) ? "&" : "?") +
|
||||||
(requestSettings.jsonp || "callback") + "=?";
|
(requestSettings.jsonp || "callback") + "=?";
|
||||||
}
|
}
|
||||||
} else if ( !requestSettings.data || !CALLBACK_REGEX.test(requestSettings.data) ) {
|
} else if ( !requestSettings.data || !CALLBACK_REGEX.test(requestSettings.data) ) {
|
||||||
requestSettings.data = (requestSettings.data ? requestSettings.data + "&" : "") + (requestSettings.jsonp || "callback") + "=?";
|
requestSettings.data = (requestSettings.data ? requestSettings.data + "&" : "") + (requestSettings.jsonp || "callback") + "=?";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process a JSONP request by evaluating the mocked response text
|
// Process a JSONP request by evaluating the mocked response text
|
||||||
function processJsonpRequest( requestSettings, mockHandler, origSettings ) {
|
function processJsonpRequest( requestSettings, mockHandler, origSettings ) {
|
||||||
// Synthesize the mock request for adding a script tag
|
// Synthesize the mock request for adding a script tag
|
||||||
|
@ -407,7 +407,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// The core $.ajax replacement.
|
// The core $.ajax replacement.
|
||||||
function handleAjax( url, origSettings ) {
|
function handleAjax( url, origSettings ) {
|
||||||
var mockRequest, requestSettings, mockHandler;
|
var mockRequest, requestSettings, mockHandler;
|
||||||
|
|
||||||
|
@ -419,7 +419,7 @@
|
||||||
// work around to support 1.5 signature
|
// work around to support 1.5 signature
|
||||||
origSettings.url = url;
|
origSettings.url = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extend the original settings for the request
|
// Extend the original settings for the request
|
||||||
requestSettings = $.extend(true, {}, $.ajaxSettings, origSettings);
|
requestSettings = $.extend(true, {}, $.ajaxSettings, origSettings);
|
||||||
|
|
||||||
|
@ -429,7 +429,7 @@
|
||||||
if ( !mockHandlers[k] ) {
|
if ( !mockHandlers[k] ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
mockHandler = getMockForRequest( mockHandlers[k], requestSettings );
|
mockHandler = getMockForRequest( mockHandlers[k], requestSettings );
|
||||||
if(!mockHandler) {
|
if(!mockHandler) {
|
||||||
// No valid mock found for this request
|
// No valid mock found for this request
|
||||||
|
|
36
assets/scripts/vendor/ember.js
vendored
36
assets/scripts/vendor/ember.js
vendored
|
@ -2016,7 +2016,7 @@ function suspendListener(obj, eventName, target, method, callback) {
|
||||||
|
|
||||||
Suspends multiple listeners during a callback.
|
Suspends multiple listeners during a callback.
|
||||||
|
|
||||||
|
|
||||||
@method suspendListeners
|
@method suspendListeners
|
||||||
@for Ember
|
@for Ember
|
||||||
@param obj
|
@param obj
|
||||||
|
@ -2082,7 +2082,7 @@ function watchedEvents(obj) {
|
||||||
is skipped, and once listeners are removed. A listener without
|
is skipped, and once listeners are removed. A listener without
|
||||||
a target is executed on the passed object. If an array of actions
|
a target is executed on the passed object. If an array of actions
|
||||||
is not passed, the actions stored on the passed object are invoked.
|
is not passed, the actions stored on the passed object are invoked.
|
||||||
|
|
||||||
@method sendEvent
|
@method sendEvent
|
||||||
@for Ember
|
@for Ember
|
||||||
@param obj
|
@param obj
|
||||||
|
@ -2837,14 +2837,14 @@ Map.create = function() {
|
||||||
Map.prototype = {
|
Map.prototype = {
|
||||||
/**
|
/**
|
||||||
This property will change as the number of objects in the map changes.
|
This property will change as the number of objects in the map changes.
|
||||||
|
|
||||||
@property length
|
@property length
|
||||||
@type number
|
@type number
|
||||||
@default 0
|
@default 0
|
||||||
*/
|
*/
|
||||||
length: 0,
|
length: 0,
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Retrieve the value associated with a given key.
|
Retrieve the value associated with a given key.
|
||||||
|
|
||||||
|
@ -4438,7 +4438,7 @@ Ember.computed.alias = function(dependentKey) {
|
||||||
@return {Ember.ComputedProperty} computed property which creates an
|
@return {Ember.ComputedProperty} computed property which creates an
|
||||||
one way computed property to the original value for property.
|
one way computed property to the original value for property.
|
||||||
|
|
||||||
Where `computed.alias` aliases `get` and `set`, and allows for bidirectional
|
Where `computed.alias` aliases `get` and `set`, and allows for bidirectional
|
||||||
data flow, `computed.oneWay` only provides an aliased `get`. The `set` will
|
data flow, `computed.oneWay` only provides an aliased `get`. The `set` will
|
||||||
not mutate the upstream property, rather causes the current property to
|
not mutate the upstream property, rather causes the current property to
|
||||||
become the value set. This causes the downstream property to permentantly
|
become the value set. This causes the downstream property to permentantly
|
||||||
|
@ -8679,7 +8679,7 @@ Ember.Error.prototype = Ember.create(Error.prototype);
|
||||||
(function() {
|
(function() {
|
||||||
/**
|
/**
|
||||||
Expose RSVP implementation
|
Expose RSVP implementation
|
||||||
|
|
||||||
Documentation can be found here: https://github.com/tildeio/rsvp.js/blob/master/README.md
|
Documentation can be found here: https://github.com/tildeio/rsvp.js/blob/master/README.md
|
||||||
|
|
||||||
@class RSVP
|
@class RSVP
|
||||||
|
@ -20624,7 +20624,7 @@ if (Handlebars.compile) {
|
||||||
|
|
||||||
var template = Ember.Handlebars.template(templateSpec);
|
var template = Ember.Handlebars.template(templateSpec);
|
||||||
template.isMethod = false; //Make sure we don't wrap templates with ._super
|
template.isMethod = false; //Make sure we don't wrap templates with ._super
|
||||||
|
|
||||||
return template;
|
return template;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -24307,7 +24307,7 @@ helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
|
||||||
var buffer = '', stack1, hashTypes, hashContexts, escapeExpression=this.escapeExpression, self=this;
|
var buffer = '', stack1, hashTypes, hashContexts, escapeExpression=this.escapeExpression, self=this;
|
||||||
|
|
||||||
function program1(depth0,data) {
|
function program1(depth0,data) {
|
||||||
|
|
||||||
var buffer = '', hashTypes, hashContexts;
|
var buffer = '', hashTypes, hashContexts;
|
||||||
data.buffer.push("<option value=\"\">");
|
data.buffer.push("<option value=\"\">");
|
||||||
hashTypes = {};
|
hashTypes = {};
|
||||||
|
@ -24318,7 +24318,7 @@ function program1(depth0,data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function program3(depth0,data) {
|
function program3(depth0,data) {
|
||||||
|
|
||||||
var stack1, hashTypes, hashContexts;
|
var stack1, hashTypes, hashContexts;
|
||||||
hashTypes = {};
|
hashTypes = {};
|
||||||
hashContexts = {};
|
hashContexts = {};
|
||||||
|
@ -24327,7 +24327,7 @@ function program3(depth0,data) {
|
||||||
else { data.buffer.push(''); }
|
else { data.buffer.push(''); }
|
||||||
}
|
}
|
||||||
function program4(depth0,data) {
|
function program4(depth0,data) {
|
||||||
|
|
||||||
var hashContexts, hashTypes;
|
var hashContexts, hashTypes;
|
||||||
hashContexts = {'contentBinding': depth0,'labelBinding': depth0};
|
hashContexts = {'contentBinding': depth0,'labelBinding': depth0};
|
||||||
hashTypes = {'contentBinding': "ID",'labelBinding': "ID"};
|
hashTypes = {'contentBinding': "ID",'labelBinding': "ID"};
|
||||||
|
@ -24338,7 +24338,7 @@ function program4(depth0,data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function program6(depth0,data) {
|
function program6(depth0,data) {
|
||||||
|
|
||||||
var stack1, hashTypes, hashContexts;
|
var stack1, hashTypes, hashContexts;
|
||||||
hashTypes = {};
|
hashTypes = {};
|
||||||
hashContexts = {};
|
hashContexts = {};
|
||||||
|
@ -24347,7 +24347,7 @@ function program6(depth0,data) {
|
||||||
else { data.buffer.push(''); }
|
else { data.buffer.push(''); }
|
||||||
}
|
}
|
||||||
function program7(depth0,data) {
|
function program7(depth0,data) {
|
||||||
|
|
||||||
var hashContexts, hashTypes;
|
var hashContexts, hashTypes;
|
||||||
hashContexts = {'contentBinding': depth0};
|
hashContexts = {'contentBinding': depth0};
|
||||||
hashTypes = {'contentBinding': "STRING"};
|
hashTypes = {'contentBinding': "STRING"};
|
||||||
|
@ -24365,7 +24365,7 @@ function program7(depth0,data) {
|
||||||
stack1 = helpers['if'].call(depth0, "view.optionGroupPath", {hash:{},inverse:self.program(6, program6, data),fn:self.program(3, program3, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
|
stack1 = helpers['if'].call(depth0, "view.optionGroupPath", {hash:{},inverse:self.program(6, program6, data),fn:self.program(3, program3, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
|
||||||
if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
|
if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
|
||||||
return buffer;
|
return buffer;
|
||||||
|
|
||||||
}),
|
}),
|
||||||
attributeBindings: ['multiple', 'disabled', 'tabindex', 'name'],
|
attributeBindings: ['multiple', 'disabled', 'tabindex', 'name'],
|
||||||
|
|
||||||
|
@ -29044,7 +29044,7 @@ Ember.ControllerMixin.reopen({
|
||||||
Optionally supply a model for the route in question. The model
|
Optionally supply a model for the route in question. The model
|
||||||
will be serialized into the URL using the `serialize` hook of
|
will be serialized into the URL using the `serialize` hook of
|
||||||
the route:
|
the route:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
aController.transitionToRoute('blogPost', aPost);
|
aController.transitionToRoute('blogPost', aPost);
|
||||||
```
|
```
|
||||||
|
@ -29168,7 +29168,7 @@ Ember.View.reopen({
|
||||||
|
|
||||||
// Add a new named queue after the 'actions' queue (where RSVP promises
|
// Add a new named queue after the 'actions' queue (where RSVP promises
|
||||||
// resolve), which is used in router transitions to prevent unnecessary
|
// resolve), which is used in router transitions to prevent unnecessary
|
||||||
// loading state entry if all context promises resolve on the
|
// loading state entry if all context promises resolve on the
|
||||||
// 'actions' queue first.
|
// 'actions' queue first.
|
||||||
|
|
||||||
var queues = Ember.run.queues,
|
var queues = Ember.run.queues,
|
||||||
|
@ -33110,7 +33110,7 @@ function chain(app, promise, fn) {
|
||||||
* using your app.
|
* using your app.
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* visit('posts/index').then(function() {
|
* visit('posts/index').then(function() {
|
||||||
* // assert something
|
* // assert something
|
||||||
|
@ -33118,7 +33118,7 @@ function chain(app, promise, fn) {
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @method visit
|
* @method visit
|
||||||
* @param {String} url the name of the route
|
* @param {String} url the name of the route
|
||||||
* @returns {RSVP.Promise}
|
* @returns {RSVP.Promise}
|
||||||
*/
|
*/
|
||||||
helper('visit', visit);
|
helper('visit', visit);
|
||||||
|
|
164
assets/scripts/vendor/handlebars.js
vendored
164
assets/scripts/vendor/handlebars.js
vendored
|
@ -195,108 +195,108 @@ performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
|
||||||
|
|
||||||
var $0 = $$.length - 1;
|
var $0 = $$.length - 1;
|
||||||
switch (yystate) {
|
switch (yystate) {
|
||||||
case 1: return $$[$0-1];
|
case 1: return $$[$0-1];
|
||||||
break;
|
break;
|
||||||
case 2: this.$ = new yy.ProgramNode([], $$[$0]);
|
case 2: this.$ = new yy.ProgramNode([], $$[$0]);
|
||||||
break;
|
break;
|
||||||
case 3: this.$ = new yy.ProgramNode($$[$0-2], $$[$0]);
|
case 3: this.$ = new yy.ProgramNode($$[$0-2], $$[$0]);
|
||||||
break;
|
break;
|
||||||
case 4: this.$ = new yy.ProgramNode($$[$0-1], []);
|
case 4: this.$ = new yy.ProgramNode($$[$0-1], []);
|
||||||
break;
|
break;
|
||||||
case 5: this.$ = new yy.ProgramNode($$[$0]);
|
case 5: this.$ = new yy.ProgramNode($$[$0]);
|
||||||
break;
|
break;
|
||||||
case 6: this.$ = new yy.ProgramNode([], []);
|
case 6: this.$ = new yy.ProgramNode([], []);
|
||||||
break;
|
break;
|
||||||
case 7: this.$ = new yy.ProgramNode([]);
|
case 7: this.$ = new yy.ProgramNode([]);
|
||||||
break;
|
break;
|
||||||
case 8: this.$ = [$$[$0]];
|
case 8: this.$ = [$$[$0]];
|
||||||
break;
|
break;
|
||||||
case 9: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
|
case 9: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
|
||||||
break;
|
break;
|
||||||
case 10: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1].inverse, $$[$0-1], $$[$0]);
|
case 10: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1].inverse, $$[$0-1], $$[$0]);
|
||||||
break;
|
break;
|
||||||
case 11: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0-1].inverse, $$[$0]);
|
case 11: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0-1].inverse, $$[$0]);
|
||||||
break;
|
break;
|
||||||
case 12: this.$ = $$[$0];
|
case 12: this.$ = $$[$0];
|
||||||
break;
|
break;
|
||||||
case 13: this.$ = $$[$0];
|
case 13: this.$ = $$[$0];
|
||||||
break;
|
break;
|
||||||
case 14: this.$ = new yy.ContentNode($$[$0]);
|
case 14: this.$ = new yy.ContentNode($$[$0]);
|
||||||
break;
|
break;
|
||||||
case 15: this.$ = new yy.CommentNode($$[$0]);
|
case 15: this.$ = new yy.CommentNode($$[$0]);
|
||||||
break;
|
break;
|
||||||
case 16: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
|
case 16: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
|
||||||
break;
|
break;
|
||||||
case 17: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
|
case 17: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
|
||||||
break;
|
break;
|
||||||
case 18: this.$ = $$[$0-1];
|
case 18: this.$ = $$[$0-1];
|
||||||
break;
|
break;
|
||||||
case 19:
|
case 19:
|
||||||
// Parsing out the '&' escape token at this level saves ~500 bytes after min due to the removal of one parser node.
|
// Parsing out the '&' escape token at this level saves ~500 bytes after min due to the removal of one parser node.
|
||||||
this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], $$[$0-2][2] === '&');
|
this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], $$[$0-2][2] === '&');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 20: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], true);
|
case 20: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], true);
|
||||||
break;
|
break;
|
||||||
case 21: this.$ = new yy.PartialNode($$[$0-1]);
|
case 21: this.$ = new yy.PartialNode($$[$0-1]);
|
||||||
break;
|
break;
|
||||||
case 22: this.$ = new yy.PartialNode($$[$0-2], $$[$0-1]);
|
case 22: this.$ = new yy.PartialNode($$[$0-2], $$[$0-1]);
|
||||||
break;
|
break;
|
||||||
case 23:
|
case 23:
|
||||||
break;
|
break;
|
||||||
case 24: this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]];
|
case 24: this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]];
|
||||||
break;
|
break;
|
||||||
case 25: this.$ = [[$$[$0-1]].concat($$[$0]), null];
|
case 25: this.$ = [[$$[$0-1]].concat($$[$0]), null];
|
||||||
break;
|
break;
|
||||||
case 26: this.$ = [[$$[$0-1]], $$[$0]];
|
case 26: this.$ = [[$$[$0-1]], $$[$0]];
|
||||||
break;
|
break;
|
||||||
case 27: this.$ = [[$$[$0]], null];
|
case 27: this.$ = [[$$[$0]], null];
|
||||||
break;
|
break;
|
||||||
case 28: this.$ = [[$$[$0]], null];
|
case 28: this.$ = [[$$[$0]], null];
|
||||||
break;
|
break;
|
||||||
case 29: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
|
case 29: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
|
||||||
break;
|
break;
|
||||||
case 30: this.$ = [$$[$0]];
|
case 30: this.$ = [$$[$0]];
|
||||||
break;
|
break;
|
||||||
case 31: this.$ = $$[$0];
|
case 31: this.$ = $$[$0];
|
||||||
break;
|
break;
|
||||||
case 32: this.$ = new yy.StringNode($$[$0]);
|
case 32: this.$ = new yy.StringNode($$[$0]);
|
||||||
break;
|
break;
|
||||||
case 33: this.$ = new yy.IntegerNode($$[$0]);
|
case 33: this.$ = new yy.IntegerNode($$[$0]);
|
||||||
break;
|
break;
|
||||||
case 34: this.$ = new yy.BooleanNode($$[$0]);
|
case 34: this.$ = new yy.BooleanNode($$[$0]);
|
||||||
break;
|
break;
|
||||||
case 35: this.$ = $$[$0];
|
case 35: this.$ = $$[$0];
|
||||||
break;
|
break;
|
||||||
case 36: this.$ = new yy.HashNode($$[$0]);
|
case 36: this.$ = new yy.HashNode($$[$0]);
|
||||||
break;
|
break;
|
||||||
case 37: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
|
case 37: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
|
||||||
break;
|
break;
|
||||||
case 38: this.$ = [$$[$0]];
|
case 38: this.$ = [$$[$0]];
|
||||||
break;
|
break;
|
||||||
case 39: this.$ = [$$[$0-2], $$[$0]];
|
case 39: this.$ = [$$[$0-2], $$[$0]];
|
||||||
break;
|
break;
|
||||||
case 40: this.$ = [$$[$0-2], new yy.StringNode($$[$0])];
|
case 40: this.$ = [$$[$0-2], new yy.StringNode($$[$0])];
|
||||||
break;
|
break;
|
||||||
case 41: this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])];
|
case 41: this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])];
|
||||||
break;
|
break;
|
||||||
case 42: this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])];
|
case 42: this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])];
|
||||||
break;
|
break;
|
||||||
case 43: this.$ = [$$[$0-2], $$[$0]];
|
case 43: this.$ = [$$[$0-2], $$[$0]];
|
||||||
break;
|
break;
|
||||||
case 44: this.$ = new yy.PartialNameNode($$[$0]);
|
case 44: this.$ = new yy.PartialNameNode($$[$0]);
|
||||||
break;
|
break;
|
||||||
case 45: this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0]));
|
case 45: this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0]));
|
||||||
break;
|
break;
|
||||||
case 46: this.$ = new yy.PartialNameNode(new yy.IntegerNode($$[$0]));
|
case 46: this.$ = new yy.PartialNameNode(new yy.IntegerNode($$[$0]));
|
||||||
break;
|
break;
|
||||||
case 47: this.$ = new yy.DataNode($$[$0]);
|
case 47: this.$ = new yy.DataNode($$[$0]);
|
||||||
break;
|
break;
|
||||||
case 48: this.$ = new yy.IdNode($$[$0]);
|
case 48: this.$ = new yy.IdNode($$[$0]);
|
||||||
break;
|
break;
|
||||||
case 49: $$[$0-2].push({part: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2];
|
case 49: $$[$0-2].push({part: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2];
|
||||||
break;
|
break;
|
||||||
case 50: this.$ = [{part: $$[$0]}];
|
case 50: this.$ = [{part: $$[$0]}];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -582,77 +582,77 @@ lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_STA
|
||||||
|
|
||||||
var YYSTATE=YY_START
|
var YYSTATE=YY_START
|
||||||
switch($avoiding_name_collisions) {
|
switch($avoiding_name_collisions) {
|
||||||
case 0: yy_.yytext = "\\"; return 14;
|
case 0: yy_.yytext = "\\"; return 14;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if(yy_.yytext.slice(-1) !== "\\") this.begin("mu");
|
if(yy_.yytext.slice(-1) !== "\\") this.begin("mu");
|
||||||
if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu");
|
if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu");
|
||||||
if(yy_.yytext) return 14;
|
if(yy_.yytext) return 14;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 2: return 14;
|
case 2: return 14;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if(yy_.yytext.slice(-1) !== "\\") this.popState();
|
if(yy_.yytext.slice(-1) !== "\\") this.popState();
|
||||||
if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1);
|
if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1);
|
||||||
return 14;
|
return 14;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 4: yy_.yytext = yy_.yytext.substr(0, yy_.yyleng-4); this.popState(); return 15;
|
case 4: yy_.yytext = yy_.yytext.substr(0, yy_.yyleng-4); this.popState(); return 15;
|
||||||
break;
|
break;
|
||||||
case 5: return 25;
|
case 5: return 25;
|
||||||
break;
|
break;
|
||||||
case 6: return 16;
|
case 6: return 16;
|
||||||
break;
|
break;
|
||||||
case 7: return 20;
|
case 7: return 20;
|
||||||
break;
|
break;
|
||||||
case 8: return 19;
|
case 8: return 19;
|
||||||
break;
|
break;
|
||||||
case 9: return 19;
|
case 9: return 19;
|
||||||
break;
|
break;
|
||||||
case 10: return 23;
|
case 10: return 23;
|
||||||
break;
|
break;
|
||||||
case 11: return 22;
|
case 11: return 22;
|
||||||
break;
|
break;
|
||||||
case 12: this.popState(); this.begin('com');
|
case 12: this.popState(); this.begin('com');
|
||||||
break;
|
break;
|
||||||
case 13: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15;
|
case 13: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15;
|
||||||
break;
|
break;
|
||||||
case 14: return 22;
|
case 14: return 22;
|
||||||
break;
|
break;
|
||||||
case 15: return 37;
|
case 15: return 37;
|
||||||
break;
|
break;
|
||||||
case 16: return 36;
|
case 16: return 36;
|
||||||
break;
|
break;
|
||||||
case 17: return 36;
|
case 17: return 36;
|
||||||
break;
|
break;
|
||||||
case 18: return 40;
|
case 18: return 40;
|
||||||
break;
|
break;
|
||||||
case 19: /*ignore whitespace*/
|
case 19: /*ignore whitespace*/
|
||||||
break;
|
break;
|
||||||
case 20: this.popState(); return 24;
|
case 20: this.popState(); return 24;
|
||||||
break;
|
break;
|
||||||
case 21: this.popState(); return 18;
|
case 21: this.popState(); return 18;
|
||||||
break;
|
break;
|
||||||
case 22: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 31;
|
case 22: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 31;
|
||||||
break;
|
break;
|
||||||
case 23: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\'/g,"'"); return 31;
|
case 23: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\'/g,"'"); return 31;
|
||||||
break;
|
break;
|
||||||
case 24: return 38;
|
case 24: return 38;
|
||||||
break;
|
break;
|
||||||
case 25: return 33;
|
case 25: return 33;
|
||||||
break;
|
break;
|
||||||
case 26: return 33;
|
case 26: return 33;
|
||||||
break;
|
break;
|
||||||
case 27: return 32;
|
case 27: return 32;
|
||||||
break;
|
break;
|
||||||
case 28: return 36;
|
case 28: return 36;
|
||||||
break;
|
break;
|
||||||
case 29: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 36;
|
case 29: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 36;
|
||||||
break;
|
break;
|
||||||
case 30: return 'INVALID';
|
case 30: return 'INVALID';
|
||||||
break;
|
break;
|
||||||
case 31: return 5;
|
case 31: return 5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
122
assets/scripts/vendor/jquery.throttle.js
vendored
122
assets/scripts/vendor/jquery.throttle.js
vendored
|
@ -1,7 +1,7 @@
|
||||||
/*!
|
/*!
|
||||||
* jQuery throttle / debounce - v1.1 - 3/7/2010
|
* jQuery throttle / debounce - v1.1 - 3/7/2010
|
||||||
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
|
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010 "Cowboy" Ben Alman
|
* Copyright (c) 2010 "Cowboy" Ben Alman
|
||||||
* Dual licensed under the MIT and GPL licenses.
|
* Dual licensed under the MIT and GPL licenses.
|
||||||
* http://benalman.com/about/license/
|
* http://benalman.com/about/license/
|
||||||
|
@ -10,51 +10,51 @@
|
||||||
// Script: jQuery throttle / debounce: Sometimes, less is more!
|
// Script: jQuery throttle / debounce: Sometimes, less is more!
|
||||||
//
|
//
|
||||||
// *Version: 1.1, Last updated: 3/7/2010*
|
// *Version: 1.1, Last updated: 3/7/2010*
|
||||||
//
|
//
|
||||||
// Project Home - http://benalman.com/projects/jquery-throttle-debounce-plugin/
|
// Project Home - http://benalman.com/projects/jquery-throttle-debounce-plugin/
|
||||||
// GitHub - http://github.com/cowboy/jquery-throttle-debounce/
|
// GitHub - http://github.com/cowboy/jquery-throttle-debounce/
|
||||||
// Source - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.js
|
// Source - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.js
|
||||||
// (Minified) - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.min.js (0.7kb)
|
// (Minified) - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.min.js (0.7kb)
|
||||||
//
|
//
|
||||||
// About: License
|
// About: License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2010 "Cowboy" Ben Alman,
|
// Copyright (c) 2010 "Cowboy" Ben Alman,
|
||||||
// Dual licensed under the MIT and GPL licenses.
|
// Dual licensed under the MIT and GPL licenses.
|
||||||
// http://benalman.com/about/license/
|
// http://benalman.com/about/license/
|
||||||
//
|
//
|
||||||
// About: Examples
|
// About: Examples
|
||||||
//
|
//
|
||||||
// These working examples, complete with fully commented code, illustrate a few
|
// These working examples, complete with fully commented code, illustrate a few
|
||||||
// ways in which this plugin can be used.
|
// ways in which this plugin can be used.
|
||||||
//
|
//
|
||||||
// Throttle - http://benalman.com/code/projects/jquery-throttle-debounce/examples/throttle/
|
// Throttle - http://benalman.com/code/projects/jquery-throttle-debounce/examples/throttle/
|
||||||
// Debounce - http://benalman.com/code/projects/jquery-throttle-debounce/examples/debounce/
|
// Debounce - http://benalman.com/code/projects/jquery-throttle-debounce/examples/debounce/
|
||||||
//
|
//
|
||||||
// About: Support and Testing
|
// About: Support and Testing
|
||||||
//
|
//
|
||||||
// Information about what version or versions of jQuery this plugin has been
|
// Information about what version or versions of jQuery this plugin has been
|
||||||
// tested with, what browsers it has been tested in, and where the unit tests
|
// tested with, what browsers it has been tested in, and where the unit tests
|
||||||
// reside (so you can test it yourself).
|
// reside (so you can test it yourself).
|
||||||
//
|
//
|
||||||
// jQuery Versions - none, 1.3.2, 1.4.2
|
// jQuery Versions - none, 1.3.2, 1.4.2
|
||||||
// Browsers Tested - Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome 4-5, Opera 9.6-10.1.
|
// Browsers Tested - Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome 4-5, Opera 9.6-10.1.
|
||||||
// Unit Tests - http://benalman.com/code/projects/jquery-throttle-debounce/unit/
|
// Unit Tests - http://benalman.com/code/projects/jquery-throttle-debounce/unit/
|
||||||
//
|
//
|
||||||
// About: Release History
|
// About: Release History
|
||||||
//
|
//
|
||||||
// 1.1 - (3/7/2010) Fixed a bug in <jQuery.throttle> where trailing callbacks
|
// 1.1 - (3/7/2010) Fixed a bug in <jQuery.throttle> where trailing callbacks
|
||||||
// executed later than they should. Reworked a fair amount of internal
|
// executed later than they should. Reworked a fair amount of internal
|
||||||
// logic as well.
|
// logic as well.
|
||||||
// 1.0 - (3/6/2010) Initial release as a stand-alone project. Migrated over
|
// 1.0 - (3/6/2010) Initial release as a stand-alone project. Migrated over
|
||||||
// from jquery-misc repo v0.4 to jquery-throttle repo v1.0, added the
|
// from jquery-misc repo v0.4 to jquery-throttle repo v1.0, added the
|
||||||
// no_trailing throttle parameter and debounce functionality.
|
// no_trailing throttle parameter and debounce functionality.
|
||||||
//
|
//
|
||||||
// Topic: Note for non-jQuery users
|
// Topic: Note for non-jQuery users
|
||||||
//
|
//
|
||||||
// jQuery isn't actually required for this plugin, because nothing internal
|
// jQuery isn't actually required for this plugin, because nothing internal
|
||||||
// uses any jQuery methods or properties. jQuery is just used as a namespace
|
// uses any jQuery methods or properties. jQuery is just used as a namespace
|
||||||
// under which these methods can exist.
|
// under which these methods can exist.
|
||||||
//
|
//
|
||||||
// Since jQuery isn't actually required for this plugin, if jQuery doesn't exist
|
// Since jQuery isn't actually required for this plugin, if jQuery doesn't exist
|
||||||
// when this plugin is loaded, the method described below will be created in
|
// when this plugin is loaded, the method described below will be created in
|
||||||
// the `Cowboy` namespace. Usage will be exactly the same, but instead of
|
// the `Cowboy` namespace. Usage will be exactly the same, but instead of
|
||||||
|
@ -62,47 +62,47 @@
|
||||||
|
|
||||||
(function(window,undefined){
|
(function(window,undefined){
|
||||||
'$:nomunge'; // Used by YUI compressor.
|
'$:nomunge'; // Used by YUI compressor.
|
||||||
|
|
||||||
// Since jQuery really isn't required for this plugin, use `jQuery` as the
|
// Since jQuery really isn't required for this plugin, use `jQuery` as the
|
||||||
// namespace only if it already exists, otherwise use the `Cowboy` namespace,
|
// namespace only if it already exists, otherwise use the `Cowboy` namespace,
|
||||||
// creating it if necessary.
|
// creating it if necessary.
|
||||||
var $ = window.jQuery || window.Cowboy || ( window.Cowboy = {} ),
|
var $ = window.jQuery || window.Cowboy || ( window.Cowboy = {} ),
|
||||||
|
|
||||||
// Internal method reference.
|
// Internal method reference.
|
||||||
jq_throttle;
|
jq_throttle;
|
||||||
|
|
||||||
// Method: jQuery.throttle
|
// Method: jQuery.throttle
|
||||||
//
|
//
|
||||||
// Throttle execution of a function. Especially useful for rate limiting
|
// Throttle execution of a function. Especially useful for rate limiting
|
||||||
// execution of handlers on events like resize and scroll. If you want to
|
// execution of handlers on events like resize and scroll. If you want to
|
||||||
// rate-limit execution of a function to a single time, see the
|
// rate-limit execution of a function to a single time, see the
|
||||||
// <jQuery.debounce> method.
|
// <jQuery.debounce> method.
|
||||||
//
|
//
|
||||||
// In this visualization, | is a throttled-function call and X is the actual
|
// In this visualization, | is a throttled-function call and X is the actual
|
||||||
// callback execution:
|
// callback execution:
|
||||||
//
|
//
|
||||||
// > Throttled with `no_trailing` specified as false or unspecified:
|
// > Throttled with `no_trailing` specified as false or unspecified:
|
||||||
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
||||||
// > X X X X X X X X X X X X
|
// > X X X X X X X X X X X X
|
||||||
// >
|
// >
|
||||||
// > Throttled with `no_trailing` specified as true:
|
// > Throttled with `no_trailing` specified as true:
|
||||||
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
||||||
// > X X X X X X X X X X
|
// > X X X X X X X X X X
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
//
|
//
|
||||||
// > var throttled = jQuery.throttle( delay, [ no_trailing, ] callback );
|
// > var throttled = jQuery.throttle( delay, [ no_trailing, ] callback );
|
||||||
// >
|
// >
|
||||||
// > jQuery('selector').bind( 'someevent', throttled );
|
// > jQuery('selector').bind( 'someevent', throttled );
|
||||||
// > jQuery('selector').unbind( 'someevent', throttled );
|
// > jQuery('selector').unbind( 'someevent', throttled );
|
||||||
//
|
//
|
||||||
// This also works in jQuery 1.4+:
|
// This also works in jQuery 1.4+:
|
||||||
//
|
//
|
||||||
// > jQuery('selector').bind( 'someevent', jQuery.throttle( delay, [ no_trailing, ] callback ) );
|
// > jQuery('selector').bind( 'someevent', jQuery.throttle( delay, [ no_trailing, ] callback ) );
|
||||||
// > jQuery('selector').unbind( 'someevent', callback );
|
// > jQuery('selector').unbind( 'someevent', callback );
|
||||||
//
|
//
|
||||||
// Arguments:
|
// Arguments:
|
||||||
//
|
//
|
||||||
// delay - (Number) A zero-or-greater delay in milliseconds. For event
|
// delay - (Number) A zero-or-greater delay in milliseconds. For event
|
||||||
// callbacks, values around 100 or 250 (or even higher) are most useful.
|
// callbacks, values around 100 or 250 (or even higher) are most useful.
|
||||||
// no_trailing - (Boolean) Optional, defaults to false. If no_trailing is
|
// no_trailing - (Boolean) Optional, defaults to false. If no_trailing is
|
||||||
|
@ -114,27 +114,27 @@
|
||||||
// callback - (Function) A function to be executed after delay milliseconds.
|
// callback - (Function) A function to be executed after delay milliseconds.
|
||||||
// The `this` context and all arguments are passed through, as-is, to
|
// The `this` context and all arguments are passed through, as-is, to
|
||||||
// `callback` when the throttled-function is executed.
|
// `callback` when the throttled-function is executed.
|
||||||
//
|
//
|
||||||
// Returns:
|
// Returns:
|
||||||
//
|
//
|
||||||
// (Function) A new, throttled, function.
|
// (Function) A new, throttled, function.
|
||||||
|
|
||||||
$.throttle = jq_throttle = function( delay, no_trailing, callback, debounce_mode ) {
|
$.throttle = jq_throttle = function( delay, no_trailing, callback, debounce_mode ) {
|
||||||
// After wrapper has stopped being called, this timeout ensures that
|
// After wrapper has stopped being called, this timeout ensures that
|
||||||
// `callback` is executed at the proper times in `throttle` and `end`
|
// `callback` is executed at the proper times in `throttle` and `end`
|
||||||
// debounce modes.
|
// debounce modes.
|
||||||
var timeout_id,
|
var timeout_id,
|
||||||
|
|
||||||
// Keep track of the last time `callback` was executed.
|
// Keep track of the last time `callback` was executed.
|
||||||
last_exec = 0;
|
last_exec = 0;
|
||||||
|
|
||||||
// `no_trailing` defaults to falsy.
|
// `no_trailing` defaults to falsy.
|
||||||
if ( typeof no_trailing !== 'boolean' ) {
|
if ( typeof no_trailing !== 'boolean' ) {
|
||||||
debounce_mode = callback;
|
debounce_mode = callback;
|
||||||
callback = no_trailing;
|
callback = no_trailing;
|
||||||
no_trailing = undefined;
|
no_trailing = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The `wrapper` function encapsulates all of the throttling / debouncing
|
// The `wrapper` function encapsulates all of the throttling / debouncing
|
||||||
// functionality and when executed will limit the rate at which `callback`
|
// functionality and when executed will limit the rate at which `callback`
|
||||||
// is executed.
|
// is executed.
|
||||||
|
@ -142,91 +142,91 @@
|
||||||
var that = this,
|
var that = this,
|
||||||
elapsed = +new Date() - last_exec,
|
elapsed = +new Date() - last_exec,
|
||||||
args = arguments;
|
args = arguments;
|
||||||
|
|
||||||
// Execute `callback` and update the `last_exec` timestamp.
|
// Execute `callback` and update the `last_exec` timestamp.
|
||||||
function exec() {
|
function exec() {
|
||||||
last_exec = +new Date();
|
last_exec = +new Date();
|
||||||
callback.apply( that, args );
|
callback.apply( that, args );
|
||||||
};
|
};
|
||||||
|
|
||||||
// If `debounce_mode` is true (at_begin) this is used to clear the flag
|
// If `debounce_mode` is true (at_begin) this is used to clear the flag
|
||||||
// to allow future `callback` executions.
|
// to allow future `callback` executions.
|
||||||
function clear() {
|
function clear() {
|
||||||
timeout_id = undefined;
|
timeout_id = undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( debounce_mode && !timeout_id ) {
|
if ( debounce_mode && !timeout_id ) {
|
||||||
// Since `wrapper` is being called for the first time and
|
// Since `wrapper` is being called for the first time and
|
||||||
// `debounce_mode` is true (at_begin), execute `callback`.
|
// `debounce_mode` is true (at_begin), execute `callback`.
|
||||||
exec();
|
exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear any existing timeout.
|
// Clear any existing timeout.
|
||||||
timeout_id && clearTimeout( timeout_id );
|
timeout_id && clearTimeout( timeout_id );
|
||||||
|
|
||||||
if ( debounce_mode === undefined && elapsed > delay ) {
|
if ( debounce_mode === undefined && elapsed > delay ) {
|
||||||
// In throttle mode, if `delay` time has been exceeded, execute
|
// In throttle mode, if `delay` time has been exceeded, execute
|
||||||
// `callback`.
|
// `callback`.
|
||||||
exec();
|
exec();
|
||||||
|
|
||||||
} else if ( no_trailing !== true ) {
|
} else if ( no_trailing !== true ) {
|
||||||
// In trailing throttle mode, since `delay` time has not been
|
// In trailing throttle mode, since `delay` time has not been
|
||||||
// exceeded, schedule `callback` to execute `delay` ms after most
|
// exceeded, schedule `callback` to execute `delay` ms after most
|
||||||
// recent execution.
|
// recent execution.
|
||||||
//
|
//
|
||||||
// If `debounce_mode` is true (at_begin), schedule `clear` to execute
|
// If `debounce_mode` is true (at_begin), schedule `clear` to execute
|
||||||
// after `delay` ms.
|
// after `delay` ms.
|
||||||
//
|
//
|
||||||
// If `debounce_mode` is false (at end), schedule `callback` to
|
// If `debounce_mode` is false (at end), schedule `callback` to
|
||||||
// execute after `delay` ms.
|
// execute after `delay` ms.
|
||||||
timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay );
|
timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set the guid of `wrapper` function to the same of original callback, so
|
// Set the guid of `wrapper` function to the same of original callback, so
|
||||||
// it can be removed in jQuery 1.4+ .unbind or .die by using the original
|
// it can be removed in jQuery 1.4+ .unbind or .die by using the original
|
||||||
// callback as a reference.
|
// callback as a reference.
|
||||||
if ( $.guid ) {
|
if ( $.guid ) {
|
||||||
wrapper.guid = callback.guid = callback.guid || $.guid++;
|
wrapper.guid = callback.guid = callback.guid || $.guid++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the wrapper function.
|
// Return the wrapper function.
|
||||||
return wrapper;
|
return wrapper;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Method: jQuery.debounce
|
// Method: jQuery.debounce
|
||||||
//
|
//
|
||||||
// Debounce execution of a function. Debouncing, unlike throttling,
|
// Debounce execution of a function. Debouncing, unlike throttling,
|
||||||
// guarantees that a function is only executed a single time, either at the
|
// guarantees that a function is only executed a single time, either at the
|
||||||
// very beginning of a series of calls, or at the very end. If you want to
|
// very beginning of a series of calls, or at the very end. If you want to
|
||||||
// simply rate-limit execution of a function, see the <jQuery.throttle>
|
// simply rate-limit execution of a function, see the <jQuery.throttle>
|
||||||
// method.
|
// method.
|
||||||
//
|
//
|
||||||
// In this visualization, | is a debounced-function call and X is the actual
|
// In this visualization, | is a debounced-function call and X is the actual
|
||||||
// callback execution:
|
// callback execution:
|
||||||
//
|
//
|
||||||
// > Debounced with `at_begin` specified as false or unspecified:
|
// > Debounced with `at_begin` specified as false or unspecified:
|
||||||
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
||||||
// > X X
|
// > X X
|
||||||
// >
|
// >
|
||||||
// > Debounced with `at_begin` specified as true:
|
// > Debounced with `at_begin` specified as true:
|
||||||
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
||||||
// > X X
|
// > X X
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
//
|
//
|
||||||
// > var debounced = jQuery.debounce( delay, [ at_begin, ] callback );
|
// > var debounced = jQuery.debounce( delay, [ at_begin, ] callback );
|
||||||
// >
|
// >
|
||||||
// > jQuery('selector').bind( 'someevent', debounced );
|
// > jQuery('selector').bind( 'someevent', debounced );
|
||||||
// > jQuery('selector').unbind( 'someevent', debounced );
|
// > jQuery('selector').unbind( 'someevent', debounced );
|
||||||
//
|
//
|
||||||
// This also works in jQuery 1.4+:
|
// This also works in jQuery 1.4+:
|
||||||
//
|
//
|
||||||
// > jQuery('selector').bind( 'someevent', jQuery.debounce( delay, [ at_begin, ] callback ) );
|
// > jQuery('selector').bind( 'someevent', jQuery.debounce( delay, [ at_begin, ] callback ) );
|
||||||
// > jQuery('selector').unbind( 'someevent', callback );
|
// > jQuery('selector').unbind( 'someevent', callback );
|
||||||
//
|
//
|
||||||
// Arguments:
|
// Arguments:
|
||||||
//
|
//
|
||||||
// delay - (Number) A zero-or-greater delay in milliseconds. For event
|
// delay - (Number) A zero-or-greater delay in milliseconds. For event
|
||||||
// callbacks, values around 100 or 250 (or even higher) are most useful.
|
// callbacks, values around 100 or 250 (or even higher) are most useful.
|
||||||
// at_begin - (Boolean) Optional, defaults to false. If at_begin is false or
|
// at_begin - (Boolean) Optional, defaults to false. If at_begin is false or
|
||||||
|
@ -238,15 +238,15 @@
|
||||||
// callback - (Function) A function to be executed after delay milliseconds.
|
// callback - (Function) A function to be executed after delay milliseconds.
|
||||||
// The `this` context and all arguments are passed through, as-is, to
|
// The `this` context and all arguments are passed through, as-is, to
|
||||||
// `callback` when the debounced-function is executed.
|
// `callback` when the debounced-function is executed.
|
||||||
//
|
//
|
||||||
// Returns:
|
// Returns:
|
||||||
//
|
//
|
||||||
// (Function) A new, debounced, function.
|
// (Function) A new, debounced, function.
|
||||||
|
|
||||||
$.debounce = function( delay, at_begin, callback ) {
|
$.debounce = function( delay, at_begin, callback ) {
|
||||||
return callback === undefined
|
return callback === undefined
|
||||||
? jq_throttle( delay, at_begin, false )
|
? jq_throttle( delay, at_begin, false )
|
||||||
: jq_throttle( delay, callback, at_begin !== false );
|
: jq_throttle( delay, callback, at_begin !== false );
|
||||||
};
|
};
|
||||||
|
|
||||||
})(this);
|
})(this);
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
text-align: center
|
text-align: center
|
||||||
padding: 0
|
padding: 0
|
||||||
margin: 0
|
margin: 0
|
||||||
|
|
||||||
.great-news
|
.great-news
|
||||||
font-size: 35px
|
font-size: 35px
|
||||||
color: #337389
|
color: #337389
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
.sync-column
|
.sync-column
|
||||||
padding-right: 28px
|
padding-right: 28px
|
||||||
max-width: 380px
|
max-width: 380px
|
||||||
display: block
|
display: block
|
||||||
float: left
|
float: left
|
||||||
clear: all
|
clear: all
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
text-decoration: underline
|
text-decoration: underline
|
||||||
|
|
||||||
img
|
img
|
||||||
padding: 0
|
padding: 0
|
||||||
float: none
|
float: none
|
||||||
margin: 15px 0 0 0
|
margin: 15px 0 0 0
|
||||||
width: 450px
|
width: 450px
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
.column
|
.column
|
||||||
padding-right: 20px
|
padding-right: 20px
|
||||||
max-width: 450px
|
max-width: 450px
|
||||||
display: block
|
display: block
|
||||||
float: left
|
float: left
|
||||||
clear: all
|
clear: all
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
text-overflow: ellipsis
|
text-overflow: ellipsis
|
||||||
color: $color-text-light
|
color: $color-text-light
|
||||||
font-size: $font-size-small
|
font-size: $font-size-small
|
||||||
|
|
||||||
.duration-icon
|
.duration-icon
|
||||||
display: inline-block
|
display: inline-block
|
||||||
width: 10px
|
width: 10px
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
height: 15px
|
height: 15px
|
||||||
margin-top: 3px
|
margin-top: 3px
|
||||||
margin-left: 0px
|
margin-left: 0px
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
opacity: 1.0
|
opacity: 1.0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user