Remove more trailing whitespace

This commit is contained in:
Henrik Hodne 2013-10-07 17:07:33 -05:00
parent 63c8c59744
commit e3e96aca73
11 changed files with 192 additions and 192 deletions

View File

@ -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.
</p>
</div>
</div>
</div>
<div class="sync-row">
{{#unless isSyncing}}
<img src="/images/getting-started/mustache-no-spin.png" class="spinner" width="100">

View File

@ -7,7 +7,7 @@
<div class="column">
<img src="/images/getting-started/project-switch.png">
</div>
<div class="column-right">
<span class="steps">Step 1: &nbsp; Enabling your projects</span>
<p>

View File

@ -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
{{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!
</p>
</p>
<p>
It only takes a few steps, once you've set up your project:

View File

@ -1,14 +1,14 @@
@Travis.reopen
ReposView: Travis.View.extend
templateName: 'repos/list'
ReposListView: Em.CollectionView.extend
elementId: 'repos'
tagName: 'ul'
emptyView: Ember.View.extend
template: Ember.Handlebars.compile('<div class="loading"><span>Loading</span></div>')
itemViewClass: Travis.View.extend
repoBinding: 'content'
classNames: ['repo']
@ -16,34 +16,34 @@
selected: (->
@get('content') == @get('controller.selectedRepo')
).property('controller.selectedRepo')
color: (->
Travis.Helpers.colorForState(@get('repo.lastBuildState'))
).property('repo.lastBuildState')
click: ->
@get('controller').transitionToRoute('/' + @get('repo.slug'))
ReposListTabsView: Travis.View.extend
templateName: 'repos/list/tabs'
tabBinding: 'controller.tab'
currentUserBinding: 'controller.currentUser.id'
activate: (name) ->
@get('controller').transitionToRoot()
@get('controller').activate(name)
classRecent: (->
'active' if @get('tab') == 'recent'
).property('tab')
classOwned: (->
classes = []
classes.push('active') if @get('tab') == 'owned'
classes.push('display-inline') if @get('currentUser')
classes.join(' ')
).property('tab', 'currentUser')
classSearch: (->
'active' if @get('tab') == 'search'
).property('tab')

View File

@ -14,11 +14,11 @@
(function($) {
var _ajax = $.ajax,
mockHandlers = [],
CALLBACK_REGEX = /=\?(&|$)/,
CALLBACK_REGEX = /=\?(&|$)/,
jsc = (new Date()).getTime();
// Parse the given XML string.
// Parse the given XML string.
function parseXML(xml) {
if ( window['DOMParser'] == undefined && window.ActiveXObject ) {
DOMParser = function() { };
@ -53,7 +53,7 @@
(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
// set of data is passed to it.
function isMockDataEqual( mock, live ) {
@ -103,7 +103,7 @@
} else {
// Look for a simple wildcard '*' or a direct URL match
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)) {
return null;
}
@ -117,7 +117,7 @@
}
}
// Inspect the request type
if ( handler && handler.type &&
if ( handler && handler.type &&
handler.type.toLowerCase() != requestSettings.type.toLowerCase() ) {
// The request type doesn't match (GET vs. POST)
return null;
@ -283,7 +283,7 @@
if(requestSettings.type.toUpperCase() === "GET" && remote ) {
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
if(newMockReturn) {
return newMockReturn;
@ -299,14 +299,14 @@
function processJsonpUrl( requestSettings ) {
if ( requestSettings.type.toUpperCase() === "GET" ) {
if ( !CALLBACK_REGEX.test( requestSettings.url ) ) {
requestSettings.url += (/\?/.test( requestSettings.url ) ? "&" : "?") +
requestSettings.url += (/\?/.test( requestSettings.url ) ? "&" : "?") +
(requestSettings.jsonp || "callback") + "=?";
}
} else if ( !requestSettings.data || !CALLBACK_REGEX.test(requestSettings.data) ) {
requestSettings.data = (requestSettings.data ? requestSettings.data + "&" : "") + (requestSettings.jsonp || "callback") + "=?";
}
}
// Process a JSONP request by evaluating the mocked response text
function processJsonpRequest( requestSettings, mockHandler, origSettings ) {
// 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 ) {
var mockRequest, requestSettings, mockHandler;
@ -419,7 +419,7 @@
// work around to support 1.5 signature
origSettings.url = url;
}
// Extend the original settings for the request
requestSettings = $.extend(true, {}, $.ajaxSettings, origSettings);
@ -429,7 +429,7 @@
if ( !mockHandlers[k] ) {
continue;
}
mockHandler = getMockForRequest( mockHandlers[k], requestSettings );
if(!mockHandler) {
// No valid mock found for this request

View File

@ -2016,7 +2016,7 @@ function suspendListener(obj, eventName, target, method, callback) {
Suspends multiple listeners during a callback.
@method suspendListeners
@for Ember
@param obj
@ -2082,7 +2082,7 @@ function watchedEvents(obj) {
is skipped, and once listeners are removed. A listener without
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.
@method sendEvent
@for Ember
@param obj
@ -2837,14 +2837,14 @@ Map.create = function() {
Map.prototype = {
/**
This property will change as the number of objects in the map changes.
@property length
@type number
@default 0
*/
length: 0,
/**
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
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
not mutate the upstream property, rather causes the current property to
become the value set. This causes the downstream property to permentantly
@ -8679,7 +8679,7 @@ Ember.Error.prototype = Ember.create(Error.prototype);
(function() {
/**
Expose RSVP implementation
Documentation can be found here: https://github.com/tildeio/rsvp.js/blob/master/README.md
@class RSVP
@ -20624,7 +20624,7 @@ if (Handlebars.compile) {
var template = Ember.Handlebars.template(templateSpec);
template.isMethod = false; //Make sure we don't wrap templates with ._super
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;
function program1(depth0,data) {
var buffer = '', hashTypes, hashContexts;
data.buffer.push("<option value=\"\">");
hashTypes = {};
@ -24318,7 +24318,7 @@ function program1(depth0,data) {
}
function program3(depth0,data) {
var stack1, hashTypes, hashContexts;
hashTypes = {};
hashContexts = {};
@ -24327,7 +24327,7 @@ function program3(depth0,data) {
else { data.buffer.push(''); }
}
function program4(depth0,data) {
var hashContexts, hashTypes;
hashContexts = {'contentBinding': depth0,'labelBinding': depth0};
hashTypes = {'contentBinding': "ID",'labelBinding': "ID"};
@ -24338,7 +24338,7 @@ function program4(depth0,data) {
}
function program6(depth0,data) {
var stack1, hashTypes, hashContexts;
hashTypes = {};
hashContexts = {};
@ -24347,7 +24347,7 @@ function program6(depth0,data) {
else { data.buffer.push(''); }
}
function program7(depth0,data) {
var hashContexts, hashTypes;
hashContexts = {'contentBinding': depth0};
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});
if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
return buffer;
}),
attributeBindings: ['multiple', 'disabled', 'tabindex', 'name'],
@ -29044,7 +29044,7 @@ Ember.ControllerMixin.reopen({
Optionally supply a model for the route in question. The model
will be serialized into the URL using the `serialize` hook of
the route:
```javascript
aController.transitionToRoute('blogPost', aPost);
```
@ -29168,7 +29168,7 @@ Ember.View.reopen({
// Add a new named queue after the 'actions' queue (where RSVP promises
// 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.
var queues = Ember.run.queues,
@ -33110,7 +33110,7 @@ function chain(app, promise, fn) {
* using your app.
*
* Example:
*
*
* ```
* visit('posts/index').then(function() {
* // assert something
@ -33118,7 +33118,7 @@ function chain(app, promise, fn) {
* ```
*
* @method visit
* @param {String} url the name of the route
* @param {String} url the name of the route
* @returns {RSVP.Promise}
*/
helper('visit', visit);

View File

@ -195,108 +195,108 @@ performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
var $0 = $$.length - 1;
switch (yystate) {
case 1: return $$[$0-1];
case 1: return $$[$0-1];
break;
case 2: this.$ = new yy.ProgramNode([], $$[$0]);
case 2: this.$ = new yy.ProgramNode([], $$[$0]);
break;
case 3: this.$ = new yy.ProgramNode($$[$0-2], $$[$0]);
case 3: this.$ = new yy.ProgramNode($$[$0-2], $$[$0]);
break;
case 4: this.$ = new yy.ProgramNode($$[$0-1], []);
case 4: this.$ = new yy.ProgramNode($$[$0-1], []);
break;
case 5: this.$ = new yy.ProgramNode($$[$0]);
case 5: this.$ = new yy.ProgramNode($$[$0]);
break;
case 6: this.$ = new yy.ProgramNode([], []);
case 6: this.$ = new yy.ProgramNode([], []);
break;
case 7: this.$ = new yy.ProgramNode([]);
case 7: this.$ = new yy.ProgramNode([]);
break;
case 8: this.$ = [$$[$0]];
case 8: this.$ = [$$[$0]];
break;
case 9: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
case 9: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
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;
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;
case 12: this.$ = $$[$0];
case 12: this.$ = $$[$0];
break;
case 13: this.$ = $$[$0];
case 13: this.$ = $$[$0];
break;
case 14: this.$ = new yy.ContentNode($$[$0]);
case 14: this.$ = new yy.ContentNode($$[$0]);
break;
case 15: this.$ = new yy.CommentNode($$[$0]);
case 15: this.$ = new yy.CommentNode($$[$0]);
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;
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;
case 18: this.$ = $$[$0-1];
case 18: this.$ = $$[$0-1];
break;
case 19:
// 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] === '&');
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;
case 21: this.$ = new yy.PartialNode($$[$0-1]);
case 21: this.$ = new yy.PartialNode($$[$0-1]);
break;
case 22: this.$ = new yy.PartialNode($$[$0-2], $$[$0-1]);
case 22: this.$ = new yy.PartialNode($$[$0-2], $$[$0-1]);
break;
case 23:
case 23:
break;
case 24: this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]];
case 24: this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]];
break;
case 25: this.$ = [[$$[$0-1]].concat($$[$0]), null];
case 25: this.$ = [[$$[$0-1]].concat($$[$0]), null];
break;
case 26: this.$ = [[$$[$0-1]], $$[$0]];
case 26: this.$ = [[$$[$0-1]], $$[$0]];
break;
case 27: this.$ = [[$$[$0]], null];
case 27: this.$ = [[$$[$0]], null];
break;
case 28: this.$ = [[$$[$0]], null];
case 28: this.$ = [[$$[$0]], null];
break;
case 29: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
case 29: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
break;
case 30: this.$ = [$$[$0]];
case 30: this.$ = [$$[$0]];
break;
case 31: this.$ = $$[$0];
case 31: this.$ = $$[$0];
break;
case 32: this.$ = new yy.StringNode($$[$0]);
case 32: this.$ = new yy.StringNode($$[$0]);
break;
case 33: this.$ = new yy.IntegerNode($$[$0]);
case 33: this.$ = new yy.IntegerNode($$[$0]);
break;
case 34: this.$ = new yy.BooleanNode($$[$0]);
case 34: this.$ = new yy.BooleanNode($$[$0]);
break;
case 35: this.$ = $$[$0];
case 35: this.$ = $$[$0];
break;
case 36: this.$ = new yy.HashNode($$[$0]);
case 36: this.$ = new yy.HashNode($$[$0]);
break;
case 37: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
case 37: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
break;
case 38: this.$ = [$$[$0]];
case 38: this.$ = [$$[$0]];
break;
case 39: this.$ = [$$[$0-2], $$[$0]];
case 39: this.$ = [$$[$0-2], $$[$0]];
break;
case 40: this.$ = [$$[$0-2], new yy.StringNode($$[$0])];
case 40: this.$ = [$$[$0-2], new yy.StringNode($$[$0])];
break;
case 41: this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])];
case 41: this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])];
break;
case 42: this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])];
case 42: this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])];
break;
case 43: this.$ = [$$[$0-2], $$[$0]];
case 43: this.$ = [$$[$0-2], $$[$0]];
break;
case 44: this.$ = new yy.PartialNameNode($$[$0]);
case 44: this.$ = new yy.PartialNameNode($$[$0]);
break;
case 45: this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0]));
case 45: this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0]));
break;
case 46: this.$ = new yy.PartialNameNode(new yy.IntegerNode($$[$0]));
case 46: this.$ = new yy.PartialNameNode(new yy.IntegerNode($$[$0]));
break;
case 47: this.$ = new yy.DataNode($$[$0]);
case 47: this.$ = new yy.DataNode($$[$0]);
break;
case 48: this.$ = new yy.IdNode($$[$0]);
case 48: this.$ = new yy.IdNode($$[$0]);
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;
case 50: this.$ = [{part: $$[$0]}];
case 50: this.$ = [{part: $$[$0]}];
break;
}
},
@ -582,77 +582,77 @@ lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_STA
var YYSTATE=YY_START
switch($avoiding_name_collisions) {
case 0: yy_.yytext = "\\"; return 14;
case 0: yy_.yytext = "\\"; return 14;
break;
case 1:
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) return 14;
break;
case 2: return 14;
case 2: return 14;
break;
case 3:
if(yy_.yytext.slice(-1) !== "\\") this.popState();
if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1);
return 14;
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;
case 5: return 25;
case 5: return 25;
break;
case 6: return 16;
case 6: return 16;
break;
case 7: return 20;
case 7: return 20;
break;
case 8: return 19;
case 8: return 19;
break;
case 9: return 19;
case 9: return 19;
break;
case 10: return 23;
case 10: return 23;
break;
case 11: return 22;
case 11: return 22;
break;
case 12: this.popState(); this.begin('com');
case 12: this.popState(); this.begin('com');
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;
case 14: return 22;
case 14: return 22;
break;
case 15: return 37;
case 15: return 37;
break;
case 16: return 36;
case 16: return 36;
break;
case 17: return 36;
case 17: return 36;
break;
case 18: return 40;
case 18: return 40;
break;
case 19: /*ignore whitespace*/
case 19: /*ignore whitespace*/
break;
case 20: this.popState(); return 24;
case 20: this.popState(); return 24;
break;
case 21: this.popState(); return 18;
case 21: this.popState(); return 18;
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;
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;
case 24: return 38;
case 24: return 38;
break;
case 25: return 33;
case 25: return 33;
break;
case 26: return 33;
case 26: return 33;
break;
case 27: return 32;
case 27: return 32;
break;
case 28: return 36;
case 28: return 36;
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;
case 30: return 'INVALID';
case 30: return 'INVALID';
break;
case 31: return 5;
case 31: return 5;
break;
}
};

View File

@ -1,7 +1,7 @@
/*!
* jQuery throttle / debounce - v1.1 - 3/7/2010
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
*
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
@ -10,51 +10,51 @@
// Script: jQuery throttle / debounce: Sometimes, less is more!
//
// *Version: 1.1, Last updated: 3/7/2010*
//
//
// Project Home - http://benalman.com/projects/jquery-throttle-debounce-plugin/
// GitHub - http://github.com/cowboy/jquery-throttle-debounce/
// 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)
//
//
// About: License
//
//
// Copyright (c) 2010 "Cowboy" Ben Alman,
// Dual licensed under the MIT and GPL licenses.
// http://benalman.com/about/license/
//
//
// About: Examples
//
//
// These working examples, complete with fully commented code, illustrate a few
// ways in which this plugin can be used.
//
//
// Throttle - http://benalman.com/code/projects/jquery-throttle-debounce/examples/throttle/
// Debounce - http://benalman.com/code/projects/jquery-throttle-debounce/examples/debounce/
//
//
// About: Support and Testing
//
//
// 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
// reside (so you can test it yourself).
//
//
// 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.
// Unit Tests - http://benalman.com/code/projects/jquery-throttle-debounce/unit/
//
//
// About: Release History
//
//
// 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
// logic as well.
// 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
// no_trailing throttle parameter and debounce functionality.
//
//
// Topic: Note for non-jQuery users
//
//
// jQuery isn't actually required for this plugin, because nothing internal
// uses any jQuery methods or properties. jQuery is just used as a namespace
// under which these methods can 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
// the `Cowboy` namespace. Usage will be exactly the same, but instead of
@ -62,47 +62,47 @@
(function(window,undefined){
'$:nomunge'; // Used by YUI compressor.
// Since jQuery really isn't required for this plugin, use `jQuery` as the
// namespace only if it already exists, otherwise use the `Cowboy` namespace,
// creating it if necessary.
var $ = window.jQuery || window.Cowboy || ( window.Cowboy = {} ),
// Internal method reference.
jq_throttle;
// Method: jQuery.throttle
//
//
// Throttle execution of a function. Especially useful for rate limiting
// 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
// <jQuery.debounce> method.
//
//
// In this visualization, | is a throttled-function call and X is the actual
// callback execution:
//
//
// > Throttled with `no_trailing` specified as false or unspecified:
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
// > X X X X X X X X X X X X
// >
// >
// > Throttled with `no_trailing` specified as true:
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
// > X X X X X X X X X X
//
//
// Usage:
//
//
// > var throttled = jQuery.throttle( delay, [ no_trailing, ] callback );
// >
// >
// > jQuery('selector').bind( 'someevent', throttled );
// > jQuery('selector').unbind( 'someevent', throttled );
//
//
// This also works in jQuery 1.4+:
//
//
// > jQuery('selector').bind( 'someevent', jQuery.throttle( delay, [ no_trailing, ] callback ) );
// > jQuery('selector').unbind( 'someevent', callback );
//
//
// Arguments:
//
//
// delay - (Number) A zero-or-greater delay in milliseconds. For event
// callbacks, values around 100 or 250 (or even higher) are most useful.
// 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.
// The `this` context and all arguments are passed through, as-is, to
// `callback` when the throttled-function is executed.
//
//
// Returns:
//
//
// (Function) A new, throttled, function.
$.throttle = jq_throttle = function( delay, no_trailing, callback, debounce_mode ) {
// After wrapper has stopped being called, this timeout ensures that
// `callback` is executed at the proper times in `throttle` and `end`
// debounce modes.
var timeout_id,
// Keep track of the last time `callback` was executed.
last_exec = 0;
// `no_trailing` defaults to falsy.
if ( typeof no_trailing !== 'boolean' ) {
debounce_mode = callback;
callback = no_trailing;
no_trailing = undefined;
}
// The `wrapper` function encapsulates all of the throttling / debouncing
// functionality and when executed will limit the rate at which `callback`
// is executed.
@ -142,91 +142,91 @@
var that = this,
elapsed = +new Date() - last_exec,
args = arguments;
// Execute `callback` and update the `last_exec` timestamp.
function exec() {
last_exec = +new Date();
callback.apply( that, args );
};
// If `debounce_mode` is true (at_begin) this is used to clear the flag
// to allow future `callback` executions.
function clear() {
timeout_id = undefined;
};
if ( debounce_mode && !timeout_id ) {
// Since `wrapper` is being called for the first time and
// `debounce_mode` is true (at_begin), execute `callback`.
exec();
}
// Clear any existing timeout.
timeout_id && clearTimeout( timeout_id );
if ( debounce_mode === undefined && elapsed > delay ) {
// In throttle mode, if `delay` time has been exceeded, execute
// `callback`.
exec();
} else if ( no_trailing !== true ) {
// In trailing throttle mode, since `delay` time has not been
// exceeded, schedule `callback` to execute `delay` ms after most
// recent execution.
//
//
// If `debounce_mode` is true (at_begin), schedule `clear` to execute
// after `delay` ms.
//
//
// If `debounce_mode` is false (at end), schedule `callback` to
// execute after `delay` ms.
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
// it can be removed in jQuery 1.4+ .unbind or .die by using the original
// callback as a reference.
if ( $.guid ) {
wrapper.guid = callback.guid = callback.guid || $.guid++;
}
// Return the wrapper function.
return wrapper;
};
// Method: jQuery.debounce
//
//
// Debounce execution of a function. Debouncing, unlike throttling,
// 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
// simply rate-limit execution of a function, see the <jQuery.throttle>
// method.
//
//
// In this visualization, | is a debounced-function call and X is the actual
// callback execution:
//
//
// > Debounced with `at_begin` specified as false or unspecified:
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
// > X X
// >
// >
// > Debounced with `at_begin` specified as true:
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
// > X X
//
//
// Usage:
//
//
// > var debounced = jQuery.debounce( delay, [ at_begin, ] callback );
// >
// >
// > jQuery('selector').bind( 'someevent', debounced );
// > jQuery('selector').unbind( 'someevent', debounced );
//
//
// This also works in jQuery 1.4+:
//
//
// > jQuery('selector').bind( 'someevent', jQuery.debounce( delay, [ at_begin, ] callback ) );
// > jQuery('selector').unbind( 'someevent', callback );
//
//
// Arguments:
//
//
// delay - (Number) A zero-or-greater delay in milliseconds. For event
// 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
@ -238,15 +238,15 @@
// callback - (Function) A function to be executed after delay milliseconds.
// The `this` context and all arguments are passed through, as-is, to
// `callback` when the debounced-function is executed.
//
//
// Returns:
//
//
// (Function) A new, debounced, function.
$.debounce = function( delay, at_begin, callback ) {
return callback === undefined
? jq_throttle( delay, at_begin, false )
: jq_throttle( delay, callback, at_begin !== false );
};
})(this);

View File

@ -21,7 +21,7 @@
text-align: center
padding: 0
margin: 0
.great-news
font-size: 35px
color: #337389
@ -47,7 +47,7 @@
.sync-column
padding-right: 28px
max-width: 380px
display: block
display: block
float: left
clear: all
@ -83,7 +83,7 @@
text-decoration: underline
img
padding: 0
padding: 0
float: none
margin: 15px 0 0 0
width: 450px
@ -99,7 +99,7 @@
.column
padding-right: 20px
max-width: 450px
display: block
display: block
float: left
clear: all

View File

@ -42,7 +42,7 @@
text-overflow: ellipsis
color: $color-text-light
font-size: $font-size-small
.duration-icon
display: inline-block
width: 10px

View File

@ -78,7 +78,7 @@
height: 15px
margin-top: 3px
margin-left: 0px
&:hover
opacity: 1.0