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(['rit','util/router','navIndicator'], function(RIT,Router) { | |
var $ = RIT.$, _ = RIT._, B = RIT.Backbone, Events = RIT.Events, self; | |
/** | |
* iEnside (/w enside.html) supports legacy Toyota connect and technology pages. | |
* Example uses include (URLs in browser's location / address bar, not iframe): | |
* http://local.rit.toyota.com/entune/enside.html#!/entune/learning-center/new-index.html | |
* http://local.rit.toyota.com/entune/enside.html#!phones (uses urls property object) | |
* http://local.rit.toyota.com/entune/enside.html (uses default route, "defRoute") | |
* @type {Router} |
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
// Sets the html of an element with "Loading ..." and continues to print a dot up to 20 times. | |
// If the element is ready to be updated with actual content, simply clearInterval($el[0].interval); | |
// Requires: jQuery v1.4+ | |
$el.html(function(i,html){ | |
this.intcount = 0; | |
this.interval = ($.proxy(function(el){ | |
return setInterval(function(){ | |
if (++el.intcount < 20) el.innerHTML += '.'; | |
else clearInterval(el.interval); | |
}, 500); |
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
/** | |
* Extend jQuery with additional functionality to be used throughout app. | |
*/ | |
$.fn.extend({ | |
/** formData: | |
* Most form submissions will require special formatting different from | |
* a normal get request (a=val1,val2&b=val3 vs. a=val1&a=val2&b=val3). | |
* Sample use: $.getJSON(url,$("myFormElement").formData(),callback);. | |
* @return {String} Serialized form data appropriate for GET requests. | |
* @author Joe Johnson |
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
{ | |
css: "path/to/cssForPrinting.css", | |
print: function(DOMobj){ | |
var winPrinter = window.open('', "SLPPrinter", "width=900,height=525,top=150,left=150,toolbars=no,scrollbars=yes,status=no,resizable=yes"), | |
html = (DOMobj.jquery)? DOMobj.parent().html() : (DOMobj.parentNode)? DOMobj.parentNode.innerHTML : (DOMobj.innerHTML || ''); | |
if (document.createStyleSheet) document.createStyleSheet(this.css); else // Dynamically added CSS is different for IE. | |
$("head",winPrinter.document).append($("<link/>").attr({ rel: "stylesheet", type: "text/css", href: this.css })); | |
$("body",winPrinter.document).append(html); winPrinter.focus(); winPrinter.print(); winPrinter.close(); | |
return DOMobj; | |
} |
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
/** | |
* T*****: Racing For Awareness Contest and Sweepstakes. | |
* @author Joe Johnson ([email protected]) | |
* @requires jQuery | |
* @namespace | |
*/ | |
var R4A = { | |
hasContestEnded: true, | |
Shirts: {}, places: [], | |
sweepstakes: "forms.html", |
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
/** | |
* @namespace | |
* TCR (<masked>) is a global namespace object containing | |
* the methods and properties used throughout this application. | |
* @requires jQuery-1.8.2 and Portfolio.JS (and its dependencies). | |
*/ | |
var TCR = { | |
Data: { Images: $() }, | |
Images: { Slideshow: [], Gallery: [] }, | |
initSlideshow: 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
/** | |
* SLP.Modules.Codes extends the SLP.Modules object on DOM-ready. | |
* @module Codes | |
*/ | |
SLP.Modules.Codes = { | |
/** | |
* First validate for empty fields, then check the campaign codes, | |
* making sure that they begin with T(masked), L(masked), or S(masked). | |
* @param {object} event jQuery Event object (form submit) | |
* @return {boolean} true if all validation passes. |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
min: { | |
plugins: { | |
src: ["vendor/jquery.isotope.min.js","vendor/plugins.js","vendor/modal.js","vendor/jqpp.js"], | |
dest: "dist/plugins.min.js", | |
separator: ';' | |
}, | |
app: { |
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
// Don't forget to include: | |
// https://raw.github.com/say2joe/jquery.cache/master/jquery.cache.js | |
var myApp = { | |
appInfo: { | |
description: "Caching paradigm for JavaScript Applications", | |
title: "jQuery App DOM Cache" | |
}, | |
appProperty: (function(j){ | |
return (j = jQuery.noConflict()); |
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
/** | |
* Retina image update script. Invoke with Retina.render(). | |
* Retina.render() may be passed a selector for img selection. | |
* The default filter looks for imgs with data-scale="retina". | |
* @param {string|function} expr A CSS selector expression or jQuery filter function. | |
* @return {boolean|collection} Returns false or (for Retina displays) the images updated. | |
* @author Joe Johnson ([email protected]) | |
*/ | |
(function(ns,$){ | |
ns.Retina = { |