diff --git a/1.2.17/angular-1.2.17.zip b/1.2.17/angular-1.2.17.zip new file mode 100644 index 0000000000..bacbd9312a Binary files /dev/null and b/1.2.17/angular-1.2.17.zip differ diff --git a/1.2.17/angular-animate.js b/1.2.17/angular-animate.js new file mode 100644 index 0000000000..865174d363 --- /dev/null +++ b/1.2.17/angular-animate.js @@ -0,0 +1,1633 @@ +/** + * @license AngularJS v1.2.17 + * (c) 2010-2014 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular, undefined) {'use strict'; + +/* jshint maxlen: false */ + +/** + * @ngdoc module + * @name ngAnimate + * @description + * + * # ngAnimate + * + * The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives. + * + * + *
+ * + * # Usage + * + * To see animations in action, all that is required is to define the appropriate CSS classes + * or to register a JavaScript animation via the myModule.animation() function. The directives that support animation automatically are: + * `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation + * by using the `$animate` service. + * + * Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives: + * + * | Directive | Supported Animations | + * |---------------------------------------------------------- |----------------------------------------------------| + * | {@link ng.directive:ngRepeat#usage_animations ngRepeat} | enter, leave and move | + * | {@link ngRoute.directive:ngView#usage_animations ngView} | enter and leave | + * | {@link ng.directive:ngInclude#usage_animations ngInclude} | enter and leave | + * | {@link ng.directive:ngSwitch#usage_animations ngSwitch} | enter and leave | + * | {@link ng.directive:ngIf#usage_animations ngIf} | enter and leave | + * | {@link ng.directive:ngClass#usage_animations ngClass} | add and remove | + * | {@link ng.directive:ngShow#usage_animations ngShow & ngHide} | add and remove (the ng-hide class value) | + * | {@link ng.directive:form#usage_animations form} | add and remove (dirty, pristine, valid, invalid & all other validations) | + * | {@link ng.directive:ngModel#usage_animations ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) | + * + * You can find out more information about animations upon visiting each directive page. + * + * Below is an example of how to apply animations to a directive that supports animation hooks: + * + * ```html + * + * + * + * + * ``` + * + * Keep in mind that if an animation is running, any child elements cannot be animated until the parent element's + * animation has completed. + * + *

CSS-defined Animations

+ * The animate service will automatically apply two CSS classes to the animated element and these two CSS classes + * are designed to contain the start and end CSS styling. Both CSS transitions and keyframe animations are supported + * and can be used to play along with this naming structure. + * + * The following code below demonstrates how to perform animations using **CSS transitions** with Angular: + * + * ```html + * + * + *
+ *
+ *
+ * ``` + * + * The following code below demonstrates how to perform animations using **CSS animations** with Angular: + * + * ```html + * + * + *
+ *
+ *
+ * ``` + * + * Both CSS3 animations and transitions can be used together and the animate service will figure out the correct duration and delay timing. + * + * Upon DOM mutation, the event class is added first (something like `ng-enter`), then the browser prepares itself to add + * the active class (in this case `ng-enter-active`) which then triggers the animation. The animation module will automatically + * detect the CSS code to determine when the animation ends. Once the animation is over then both CSS classes will be + * removed from the DOM. If a browser does not support CSS transitions or CSS animations then the animation will start and end + * immediately resulting in a DOM element that is at its final state. This final state is when the DOM element + * has no CSS transition/animation classes applied to it. + * + *

CSS Staggering Animations

+ * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a + * curtain-like effect. The ngAnimate module, as of 1.2.0, supports staggering animations and the stagger effect can be + * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for + * the animation. The style property expected within the stagger class can either be a **transition-delay** or an + * **animation-delay** property (or both if your animation contains both transitions and keyframe animations). + * + * ```css + * .my-animation.ng-enter { + * /* standard transition code */ + * -webkit-transition: 1s linear all; + * transition: 1s linear all; + * opacity:0; + * } + * .my-animation.ng-enter-stagger { + * /* this will have a 100ms delay between each successive leave animation */ + * -webkit-transition-delay: 0.1s; + * transition-delay: 0.1s; + * + * /* in case the stagger doesn't work then these two values + * must be set to 0 to avoid an accidental CSS inheritance */ + * -webkit-transition-duration: 0s; + * transition-duration: 0s; + * } + * .my-animation.ng-enter.ng-enter-active { + * /* standard transition styles */ + * opacity:1; + * } + * ``` + * + * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations + * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this + * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation + * will also be reset if more than 10ms has passed after the last animation has been fired. + * + * The following code will issue the **ng-leave-stagger** event on the element provided: + * + * ```js + * var kids = parent.children(); + * + * $animate.leave(kids[0]); //stagger index=0 + * $animate.leave(kids[1]); //stagger index=1 + * $animate.leave(kids[2]); //stagger index=2 + * $animate.leave(kids[3]); //stagger index=3 + * $animate.leave(kids[4]); //stagger index=4 + * + * $timeout(function() { + * //stagger has reset itself + * $animate.leave(kids[5]); //stagger index=0 + * $animate.leave(kids[6]); //stagger index=1 + * }, 100, false); + * ``` + * + * Stagger animations are currently only supported within CSS-defined animations. + * + *

JavaScript-defined Animations

+ * In the event that you do not want to use CSS3 transitions or CSS3 animations or if you wish to offer animations on browsers that do not + * yet support CSS transitions/animations, then you can make use of JavaScript animations defined inside of your AngularJS module. + * + * ```js + * //!annotate="YourApp" Your AngularJS Module|Replace this or ngModule with the module that you used to define your application. + * var ngModule = angular.module('YourApp', ['ngAnimate']); + * ngModule.animation('.my-crazy-animation', function() { + * return { + * enter: function(element, done) { + * //run the animation here and call done when the animation is complete + * return function(cancelled) { + * //this (optional) function will be called when the animation + * //completes or when the animation is cancelled (the cancelled + * //flag will be set to true if cancelled). + * }; + * }, + * leave: function(element, done) { }, + * move: function(element, done) { }, + * + * //animation that can be triggered before the class is added + * beforeAddClass: function(element, className, done) { }, + * + * //animation that can be triggered after the class is added + * addClass: function(element, className, done) { }, + * + * //animation that can be triggered before the class is removed + * beforeRemoveClass: function(element, className, done) { }, + * + * //animation that can be triggered after the class is removed + * removeClass: function(element, className, done) { } + * }; + * }); + * ``` + * + * JavaScript-defined animations are created with a CSS-like class selector and a collection of events which are set to run + * a javascript callback function. When an animation is triggered, $animate will look for a matching animation which fits + * the element's CSS class attribute value and then run the matching animation event function (if found). + * In other words, if the CSS classes present on the animated element match any of the JavaScript animations then the callback function will + * be executed. It should be also noted that only simple, single class selectors are allowed (compound class selectors are not supported). + * + * Within a JavaScript animation, an object containing various event callback animation functions is expected to be returned. + * As explained above, these callbacks are triggered based on the animation event. Therefore if an enter animation is run, + * and the JavaScript animation is found, then the enter callback will handle that animation (in addition to the CSS keyframe animation + * or transition code that is defined via a stylesheet). + * + */ + +angular.module('ngAnimate', ['ng']) + + /** + * @ngdoc provider + * @name $animateProvider + * @description + * + * The `$animateProvider` allows developers to register JavaScript animation event handlers directly inside of a module. + * When an animation is triggered, the $animate service will query the $animate service to find any animations that match + * the provided name value. + * + * Requires the {@link ngAnimate `ngAnimate`} module to be installed. + * + * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application. + * + */ + + //this private service is only used within CSS-enabled animations + //IE8 + IE9 do not support rAF natively, but that is fine since they + //also don't support transitions and keyframes which means that the code + //below will never be used by the two browsers. + .factory('$$animateReflow', ['$$rAF', '$document', function($$rAF, $document) { + var bod = $document[0].body; + return function(fn) { + //the returned function acts as the cancellation function + return $$rAF(function() { + //the line below will force the browser to perform a repaint + //so that all the animated elements within the animation frame + //will be properly updated and drawn on screen. This is + //required to perform multi-class CSS based animations with + //Firefox. DO NOT REMOVE THIS LINE. + var a = bod.offsetWidth + 1; + fn(); + }); + }; + }]) + + .config(['$provide', '$animateProvider', function($provide, $animateProvider) { + var noop = angular.noop; + var forEach = angular.forEach; + var selectors = $animateProvider.$$selectors; + + var ELEMENT_NODE = 1; + var NG_ANIMATE_STATE = '$$ngAnimateState'; + var NG_ANIMATE_CLASS_NAME = 'ng-animate'; + var rootAnimateState = {running: true}; + + function extractElementNode(element) { + for(var i = 0; i < element.length; i++) { + var elm = element[i]; + if(elm.nodeType == ELEMENT_NODE) { + return elm; + } + } + } + + function prepareElement(element) { + return element && angular.element(element); + } + + function stripCommentsFromElement(element) { + return angular.element(extractElementNode(element)); + } + + function isMatchingElement(elm1, elm2) { + return extractElementNode(elm1) == extractElementNode(elm2); + } + + $provide.decorator('$animate', ['$delegate', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document', + function($delegate, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document) { + + var globalAnimationCounter = 0; + $rootElement.data(NG_ANIMATE_STATE, rootAnimateState); + + // disable animations during bootstrap, but once we bootstrapped, wait again + // for another digest until enabling animations. The reason why we digest twice + // is because all structural animations (enter, leave and move) all perform a + // post digest operation before animating. If we only wait for a single digest + // to pass then the structural animation would render its animation on page load. + // (which is what we're trying to avoid when the application first boots up.) + $rootScope.$$postDigest(function() { + $rootScope.$$postDigest(function() { + rootAnimateState.running = false; + }); + }); + + var classNameFilter = $animateProvider.classNameFilter(); + var isAnimatableClassName = !classNameFilter + ? function() { return true; } + : function(className) { + return classNameFilter.test(className); + }; + + function lookup(name) { + if (name) { + var matches = [], + flagMap = {}, + classes = name.substr(1).split('.'); + + //the empty string value is the default animation + //operation which performs CSS transition and keyframe + //animations sniffing. This is always included for each + //element animation procedure if the browser supports + //transitions and/or keyframe animations. The default + //animation is added to the top of the list to prevent + //any previous animations from affecting the element styling + //prior to the element being animated. + if ($sniffer.transitions || $sniffer.animations) { + matches.push($injector.get(selectors[''])); + } + + for(var i=0; i < classes.length; i++) { + var klass = classes[i], + selectorFactoryName = selectors[klass]; + if(selectorFactoryName && !flagMap[klass]) { + matches.push($injector.get(selectorFactoryName)); + flagMap[klass] = true; + } + } + return matches; + } + } + + function animationRunner(element, animationEvent, className) { + //transcluded directives may sometimes fire an animation using only comment nodes + //best to catch this early on to prevent any animation operations from occurring + var node = element[0]; + if(!node) { + return; + } + + var isSetClassOperation = animationEvent == 'setClass'; + var isClassBased = isSetClassOperation || + animationEvent == 'addClass' || + animationEvent == 'removeClass'; + + var classNameAdd, classNameRemove; + if(angular.isArray(className)) { + classNameAdd = className[0]; + classNameRemove = className[1]; + className = classNameAdd + ' ' + classNameRemove; + } + + var currentClassName = element.attr('class'); + var classes = currentClassName + ' ' + className; + if(!isAnimatableClassName(classes)) { + return; + } + + var beforeComplete = noop, + beforeCancel = [], + before = [], + afterComplete = noop, + afterCancel = [], + after = []; + + var animationLookup = (' ' + classes).replace(/\s+/g,'.'); + forEach(lookup(animationLookup), function(animationFactory) { + var created = registerAnimation(animationFactory, animationEvent); + if(!created && isSetClassOperation) { + registerAnimation(animationFactory, 'addClass'); + registerAnimation(animationFactory, 'removeClass'); + } + }); + + function registerAnimation(animationFactory, event) { + var afterFn = animationFactory[event]; + var beforeFn = animationFactory['before' + event.charAt(0).toUpperCase() + event.substr(1)]; + if(afterFn || beforeFn) { + if(event == 'leave') { + beforeFn = afterFn; + //when set as null then animation knows to skip this phase + afterFn = null; + } + after.push({ + event : event, fn : afterFn + }); + before.push({ + event : event, fn : beforeFn + }); + return true; + } + } + + function run(fns, cancellations, allCompleteFn) { + var animations = []; + forEach(fns, function(animation) { + animation.fn && animations.push(animation); + }); + + var count = 0; + function afterAnimationComplete(index) { + if(cancellations) { + (cancellations[index] || noop)(); + if(++count < animations.length) return; + cancellations = null; + } + allCompleteFn(); + } + + //The code below adds directly to the array in order to work with + //both sync and async animations. Sync animations are when the done() + //operation is called right away. DO NOT REFACTOR! + forEach(animations, function(animation, index) { + var progress = function() { + afterAnimationComplete(index); + }; + switch(animation.event) { + case 'setClass': + cancellations.push(animation.fn(element, classNameAdd, classNameRemove, progress)); + break; + case 'addClass': + cancellations.push(animation.fn(element, classNameAdd || className, progress)); + break; + case 'removeClass': + cancellations.push(animation.fn(element, classNameRemove || className, progress)); + break; + default: + cancellations.push(animation.fn(element, progress)); + break; + } + }); + + if(cancellations && cancellations.length === 0) { + allCompleteFn(); + } + } + + return { + node : node, + event : animationEvent, + className : className, + isClassBased : isClassBased, + isSetClassOperation : isSetClassOperation, + before : function(allCompleteFn) { + beforeComplete = allCompleteFn; + run(before, beforeCancel, function() { + beforeComplete = noop; + allCompleteFn(); + }); + }, + after : function(allCompleteFn) { + afterComplete = allCompleteFn; + run(after, afterCancel, function() { + afterComplete = noop; + allCompleteFn(); + }); + }, + cancel : function() { + if(beforeCancel) { + forEach(beforeCancel, function(cancelFn) { + (cancelFn || noop)(true); + }); + beforeComplete(true); + } + if(afterCancel) { + forEach(afterCancel, function(cancelFn) { + (cancelFn || noop)(true); + }); + afterComplete(true); + } + } + }; + } + + /** + * @ngdoc service + * @name $animate + * @kind function + * + * @description + * The `$animate` service provides animation detection support while performing DOM operations (enter, leave and move) as well as during addClass and removeClass operations. + * When any of these operations are run, the $animate service + * will examine any JavaScript-defined animations (which are defined by using the $animateProvider provider object) + * as well as any CSS-defined animations against the CSS classes present on the element once the DOM operation is run. + * + * The `$animate` service is used behind the scenes with pre-existing directives and animation with these directives + * will work out of the box without any extra configuration. + * + * Requires the {@link ngAnimate `ngAnimate`} module to be installed. + * + * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application. + * + */ + return { + /** + * @ngdoc method + * @name $animate#enter + * @kind function + * + * @description + * Appends the element to the parentElement element that resides in the document and then runs the enter animation. Once + * the animation is started, the following CSS classes will be present on the element for the duration of the animation: + * + * Below is a breakdown of each step that occurs during enter animation: + * + * | Animation Step | What the element class attribute looks like | + * |----------------------------------------------------------------------------------------------|---------------------------------------------| + * | 1. $animate.enter(...) is called | class="my-animation" | + * | 2. element is inserted into the parentElement element or beside the afterElement element | class="my-animation" | + * | 3. $animate runs any JavaScript-defined animations on the element | class="my-animation ng-animate" | + * | 4. the .ng-enter class is added to the element | class="my-animation ng-animate ng-enter" | + * | 5. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate ng-enter" | + * | 6. $animate waits for 10ms (this performs a reflow) | class="my-animation ng-animate ng-enter" | + * | 7. the .ng-enter-active and .ng-animate-active classes are added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active ng-enter ng-enter-active" | + * | 8. $animate waits for X milliseconds for the animation to complete | class="my-animation ng-animate ng-animate-active ng-enter ng-enter-active" | + * | 9. The animation ends and all generated CSS classes are removed from the element | class="my-animation" | + * | 10. The doneCallback() callback is fired (if provided) | class="my-animation" | + * + * @param {DOMElement} element the element that will be the focus of the enter animation + * @param {DOMElement} parentElement the parent element of the element that will be the focus of the enter animation + * @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation + * @param {function()=} doneCallback the callback function that will be called once the animation is complete + */ + enter : function(element, parentElement, afterElement, doneCallback) { + element = angular.element(element); + parentElement = prepareElement(parentElement); + afterElement = prepareElement(afterElement); + + this.enabled(false, element); + $delegate.enter(element, parentElement, afterElement); + $rootScope.$$postDigest(function() { + element = stripCommentsFromElement(element); + performAnimation('enter', 'ng-enter', element, parentElement, afterElement, noop, doneCallback); + }); + }, + + /** + * @ngdoc method + * @name $animate#leave + * @kind function + * + * @description + * Runs the leave animation operation and, upon completion, removes the element from the DOM. Once + * the animation is started, the following CSS classes will be added for the duration of the animation: + * + * Below is a breakdown of each step that occurs during leave animation: + * + * | Animation Step | What the element class attribute looks like | + * |----------------------------------------------------------------------------------------------|---------------------------------------------| + * | 1. $animate.leave(...) is called | class="my-animation" | + * | 2. $animate runs any JavaScript-defined animations on the element | class="my-animation ng-animate" | + * | 3. the .ng-leave class is added to the element | class="my-animation ng-animate ng-leave" | + * | 4. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate ng-leave" | + * | 5. $animate waits for 10ms (this performs a reflow) | class="my-animation ng-animate ng-leave" | + * | 6. the .ng-leave-active and .ng-animate-active classes is added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active ng-leave ng-leave-active" | + * | 7. $animate waits for X milliseconds for the animation to complete | class="my-animation ng-animate ng-animate-active ng-leave ng-leave-active" | + * | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation" | + * | 9. The element is removed from the DOM | ... | + * | 10. The doneCallback() callback is fired (if provided) | ... | + * + * @param {DOMElement} element the element that will be the focus of the leave animation + * @param {function()=} doneCallback the callback function that will be called once the animation is complete + */ + leave : function(element, doneCallback) { + element = angular.element(element); + cancelChildAnimations(element); + this.enabled(false, element); + $rootScope.$$postDigest(function() { + performAnimation('leave', 'ng-leave', stripCommentsFromElement(element), null, null, function() { + $delegate.leave(element); + }, doneCallback); + }); + }, + + /** + * @ngdoc method + * @name $animate#move + * @kind function + * + * @description + * Fires the move DOM operation. Just before the animation starts, the animate service will either append it into the parentElement container or + * add the element directly after the afterElement element if present. Then the move animation will be run. Once + * the animation is started, the following CSS classes will be added for the duration of the animation: + * + * Below is a breakdown of each step that occurs during move animation: + * + * | Animation Step | What the element class attribute looks like | + * |----------------------------------------------------------------------------------------------|---------------------------------------------| + * | 1. $animate.move(...) is called | class="my-animation" | + * | 2. element is moved into the parentElement element or beside the afterElement element | class="my-animation" | + * | 3. $animate runs any JavaScript-defined animations on the element | class="my-animation ng-animate" | + * | 4. the .ng-move class is added to the element | class="my-animation ng-animate ng-move" | + * | 5. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate ng-move" | + * | 6. $animate waits for 10ms (this performs a reflow) | class="my-animation ng-animate ng-move" | + * | 7. the .ng-move-active and .ng-animate-active classes is added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active ng-move ng-move-active" | + * | 8. $animate waits for X milliseconds for the animation to complete | class="my-animation ng-animate ng-animate-active ng-move ng-move-active" | + * | 9. The animation ends and all generated CSS classes are removed from the element | class="my-animation" | + * | 10. The doneCallback() callback is fired (if provided) | class="my-animation" | + * + * @param {DOMElement} element the element that will be the focus of the move animation + * @param {DOMElement} parentElement the parentElement element of the element that will be the focus of the move animation + * @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation + * @param {function()=} doneCallback the callback function that will be called once the animation is complete + */ + move : function(element, parentElement, afterElement, doneCallback) { + element = angular.element(element); + parentElement = prepareElement(parentElement); + afterElement = prepareElement(afterElement); + + cancelChildAnimations(element); + this.enabled(false, element); + $delegate.move(element, parentElement, afterElement); + $rootScope.$$postDigest(function() { + element = stripCommentsFromElement(element); + performAnimation('move', 'ng-move', element, parentElement, afterElement, noop, doneCallback); + }); + }, + + /** + * @ngdoc method + * @name $animate#addClass + * + * @description + * Triggers a custom animation event based off the className variable and then attaches the className value to the element as a CSS class. + * Unlike the other animation methods, the animate service will suffix the className value with {@type -add} in order to provide + * the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if no CSS transitions + * or keyframes are defined on the -add or base CSS class). + * + * Below is a breakdown of each step that occurs during addClass animation: + * + * | Animation Step | What the element class attribute looks like | + * |------------------------------------------------------------------------------------------------|---------------------------------------------| + * | 1. $animate.addClass(element, 'super') is called | class="my-animation" | + * | 2. $animate runs any JavaScript-defined animations on the element | class="my-animation ng-animate" | + * | 3. the .super-add class are added to the element | class="my-animation ng-animate super-add" | + * | 4. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate super-add" | + * | 5. $animate waits for 10ms (this performs a reflow) | class="my-animation ng-animate super-add" | + * | 6. the .super, .super-add-active and .ng-animate-active classes are added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active super super-add super-add-active" | + * | 7. $animate waits for X milliseconds for the animation to complete | class="my-animation super super-add super-add-active" | + * | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation super" | + * | 9. The super class is kept on the element | class="my-animation super" | + * | 10. The doneCallback() callback is fired (if provided) | class="my-animation super" | + * + * @param {DOMElement} element the element that will be animated + * @param {string} className the CSS class that will be added to the element and then animated + * @param {function()=} doneCallback the callback function that will be called once the animation is complete + */ + addClass : function(element, className, doneCallback) { + element = angular.element(element); + element = stripCommentsFromElement(element); + performAnimation('addClass', className, element, null, null, function() { + $delegate.addClass(element, className); + }, doneCallback); + }, + + /** + * @ngdoc method + * @name $animate#removeClass + * + * @description + * Triggers a custom animation event based off the className variable and then removes the CSS class provided by the className value + * from the element. Unlike the other animation methods, the animate service will suffix the className value with {@type -remove} in + * order to provide the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if + * no CSS transitions or keyframes are defined on the -remove or base CSS classes). + * + * Below is a breakdown of each step that occurs during removeClass animation: + * + * | Animation Step | What the element class attribute looks like | + * |-----------------------------------------------------------------------------------------------|---------------------------------------------| + * | 1. $animate.removeClass(element, 'super') is called | class="my-animation super" | + * | 2. $animate runs any JavaScript-defined animations on the element | class="my-animation super ng-animate" | + * | 3. the .super-remove class are added to the element | class="my-animation super ng-animate super-remove"| + * | 4. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation super ng-animate super-remove" | + * | 5. $animate waits for 10ms (this performs a reflow) | class="my-animation super ng-animate super-remove" | + * | 6. the .super-remove-active and .ng-animate-active classes are added and .super is removed (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active super-remove super-remove-active" | + * | 7. $animate waits for X milliseconds for the animation to complete | class="my-animation ng-animate ng-animate-active super-remove super-remove-active" | + * | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation" | + * | 9. The doneCallback() callback is fired (if provided) | class="my-animation" | + * + * + * @param {DOMElement} element the element that will be animated + * @param {string} className the CSS class that will be animated and then removed from the element + * @param {function()=} doneCallback the callback function that will be called once the animation is complete + */ + removeClass : function(element, className, doneCallback) { + element = angular.element(element); + element = stripCommentsFromElement(element); + performAnimation('removeClass', className, element, null, null, function() { + $delegate.removeClass(element, className); + }, doneCallback); + }, + + /** + * + * @ngdoc function + * @name $animate#setClass + * @function + * @description Adds and/or removes the given CSS classes to and from the element. + * Once complete, the done() callback will be fired (if provided). + * @param {DOMElement} element the element which will its CSS classes changed + * removed from it + * @param {string} add the CSS classes which will be added to the element + * @param {string} remove the CSS class which will be removed from the element + * @param {Function=} done the callback function (if provided) that will be fired after the + * CSS classes have been set on the element + */ + setClass : function(element, add, remove, doneCallback) { + element = angular.element(element); + element = stripCommentsFromElement(element); + performAnimation('setClass', [add, remove], element, null, null, function() { + $delegate.setClass(element, add, remove); + }, doneCallback); + }, + + /** + * @ngdoc method + * @name $animate#enabled + * @kind function + * + * @param {boolean=} value If provided then set the animation on or off. + * @param {DOMElement} element If provided then the element will be used to represent the enable/disable operation + * @return {boolean} Current animation state. + * + * @description + * Globally enables/disables animations. + * + */ + enabled : function(value, element) { + switch(arguments.length) { + case 2: + if(value) { + cleanup(element); + } else { + var data = element.data(NG_ANIMATE_STATE) || {}; + data.disabled = true; + element.data(NG_ANIMATE_STATE, data); + } + break; + + case 1: + rootAnimateState.disabled = !value; + break; + + default: + value = !rootAnimateState.disabled; + break; + } + return !!value; + } + }; + + /* + all animations call this shared animation triggering function internally. + The animationEvent variable refers to the JavaScript animation event that will be triggered + and the className value is the name of the animation that will be applied within the + CSS code. Element, parentElement and afterElement are provided DOM elements for the animation + and the onComplete callback will be fired once the animation is fully complete. + */ + function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) { + + var runner = animationRunner(element, animationEvent, className); + if(!runner) { + fireDOMOperation(); + fireBeforeCallbackAsync(); + fireAfterCallbackAsync(); + closeAnimation(); + return; + } + + className = runner.className; + var elementEvents = angular.element._data(runner.node); + elementEvents = elementEvents && elementEvents.events; + + if (!parentElement) { + parentElement = afterElement ? afterElement.parent() : element.parent(); + } + + var ngAnimateState = element.data(NG_ANIMATE_STATE) || {}; + var runningAnimations = ngAnimateState.active || {}; + var totalActiveAnimations = ngAnimateState.totalActive || 0; + var lastAnimation = ngAnimateState.last; + + //only allow animations if the currently running animation is not structural + //or if there is no animation running at all + var skipAnimations = runner.isClassBased ? + ngAnimateState.disabled || (lastAnimation && !lastAnimation.isClassBased) : + false; + + //skip the animation if animations are disabled, a parent is already being animated, + //the element is not currently attached to the document body or then completely close + //the animation if any matching animations are not found at all. + //NOTE: IE8 + IE9 should close properly (run closeAnimation()) in case an animation was found. + if (skipAnimations || animationsDisabled(element, parentElement)) { + fireDOMOperation(); + fireBeforeCallbackAsync(); + fireAfterCallbackAsync(); + closeAnimation(); + return; + } + + var skipAnimation = false; + if(totalActiveAnimations > 0) { + var animationsToCancel = []; + if(!runner.isClassBased) { + if(animationEvent == 'leave' && runningAnimations['ng-leave']) { + skipAnimation = true; + } else { + //cancel all animations when a structural animation takes place + for(var klass in runningAnimations) { + animationsToCancel.push(runningAnimations[klass]); + cleanup(element, klass); + } + runningAnimations = {}; + totalActiveAnimations = 0; + } + } else if(lastAnimation.event == 'setClass') { + animationsToCancel.push(lastAnimation); + cleanup(element, className); + } + else if(runningAnimations[className]) { + var current = runningAnimations[className]; + if(current.event == animationEvent) { + skipAnimation = true; + } else { + animationsToCancel.push(current); + cleanup(element, className); + } + } + + if(animationsToCancel.length > 0) { + forEach(animationsToCancel, function(operation) { + operation.cancel(); + }); + } + } + + if(runner.isClassBased && !runner.isSetClassOperation && !skipAnimation) { + skipAnimation = (animationEvent == 'addClass') == element.hasClass(className); //opposite of XOR + } + + if(skipAnimation) { + fireDOMOperation(); + fireBeforeCallbackAsync(); + fireAfterCallbackAsync(); + fireDoneCallbackAsync(); + return; + } + + if(animationEvent == 'leave') { + //there's no need to ever remove the listener since the element + //will be removed (destroyed) after the leave animation ends or + //is cancelled midway + element.one('$destroy', function(e) { + var element = angular.element(this); + var state = element.data(NG_ANIMATE_STATE); + if(state) { + var activeLeaveAnimation = state.active['ng-leave']; + if(activeLeaveAnimation) { + activeLeaveAnimation.cancel(); + cleanup(element, 'ng-leave'); + } + } + }); + } + + //the ng-animate class does nothing, but it's here to allow for + //parent animations to find and cancel child animations when needed + element.addClass(NG_ANIMATE_CLASS_NAME); + + var localAnimationCount = globalAnimationCounter++; + totalActiveAnimations++; + runningAnimations[className] = runner; + + element.data(NG_ANIMATE_STATE, { + last : runner, + active : runningAnimations, + index : localAnimationCount, + totalActive : totalActiveAnimations + }); + + //first we run the before animations and when all of those are complete + //then we perform the DOM operation and run the next set of animations + fireBeforeCallbackAsync(); + runner.before(function(cancelled) { + var data = element.data(NG_ANIMATE_STATE); + cancelled = cancelled || + !data || !data.active[className] || + (runner.isClassBased && data.active[className].event != animationEvent); + + fireDOMOperation(); + if(cancelled === true) { + closeAnimation(); + } else { + fireAfterCallbackAsync(); + runner.after(closeAnimation); + } + }); + + function fireDOMCallback(animationPhase) { + var eventName = '$animate:' + animationPhase; + if(elementEvents && elementEvents[eventName] && elementEvents[eventName].length > 0) { + $$asyncCallback(function() { + element.triggerHandler(eventName, { + event : animationEvent, + className : className + }); + }); + } + } + + function fireBeforeCallbackAsync() { + fireDOMCallback('before'); + } + + function fireAfterCallbackAsync() { + fireDOMCallback('after'); + } + + function fireDoneCallbackAsync() { + fireDOMCallback('close'); + if(doneCallback) { + $$asyncCallback(function() { + doneCallback(); + }); + } + } + + //it is less complicated to use a flag than managing and canceling + //timeouts containing multiple callbacks. + function fireDOMOperation() { + if(!fireDOMOperation.hasBeenRun) { + fireDOMOperation.hasBeenRun = true; + domOperation(); + } + } + + function closeAnimation() { + if(!closeAnimation.hasBeenRun) { + closeAnimation.hasBeenRun = true; + var data = element.data(NG_ANIMATE_STATE); + if(data) { + /* only structural animations wait for reflow before removing an + animation, but class-based animations don't. An example of this + failing would be when a parent HTML tag has a ng-class attribute + causing ALL directives below to skip animations during the digest */ + if(runner && runner.isClassBased) { + cleanup(element, className); + } else { + $$asyncCallback(function() { + var data = element.data(NG_ANIMATE_STATE) || {}; + if(localAnimationCount == data.index) { + cleanup(element, className, animationEvent); + } + }); + element.data(NG_ANIMATE_STATE, data); + } + } + fireDoneCallbackAsync(); + } + } + } + + function cancelChildAnimations(element) { + var node = extractElementNode(element); + if (node) { + var nodes = angular.isFunction(node.getElementsByClassName) ? + node.getElementsByClassName(NG_ANIMATE_CLASS_NAME) : + node.querySelectorAll('.' + NG_ANIMATE_CLASS_NAME); + forEach(nodes, function(element) { + element = angular.element(element); + var data = element.data(NG_ANIMATE_STATE); + if(data && data.active) { + forEach(data.active, function(runner) { + runner.cancel(); + }); + } + }); + } + } + + function cleanup(element, className) { + if(isMatchingElement(element, $rootElement)) { + if(!rootAnimateState.disabled) { + rootAnimateState.running = false; + rootAnimateState.structural = false; + } + } else if(className) { + var data = element.data(NG_ANIMATE_STATE) || {}; + + var removeAnimations = className === true; + if(!removeAnimations && data.active && data.active[className]) { + data.totalActive--; + delete data.active[className]; + } + + if(removeAnimations || !data.totalActive) { + element.removeClass(NG_ANIMATE_CLASS_NAME); + element.removeData(NG_ANIMATE_STATE); + } + } + } + + function animationsDisabled(element, parentElement) { + if (rootAnimateState.disabled) return true; + + if(isMatchingElement(element, $rootElement)) { + return rootAnimateState.disabled || rootAnimateState.running; + } + + do { + //the element did not reach the root element which means that it + //is not apart of the DOM. Therefore there is no reason to do + //any animations on it + if(parentElement.length === 0) break; + + var isRoot = isMatchingElement(parentElement, $rootElement); + var state = isRoot ? rootAnimateState : parentElement.data(NG_ANIMATE_STATE); + var result = state && (!!state.disabled || state.running || state.totalActive > 0); + if(isRoot || result) { + return result; + } + + if(isRoot) return true; + } + while(parentElement = parentElement.parent()); + + return true; + } + }]); + + $animateProvider.register('', ['$window', '$sniffer', '$timeout', '$$animateReflow', + function($window, $sniffer, $timeout, $$animateReflow) { + // Detect proper transitionend/animationend event names. + var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT; + + // If unprefixed events are not supported but webkit-prefixed are, use the latter. + // Otherwise, just use W3C names, browsers not supporting them at all will just ignore them. + // Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend` + // but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`. + // Register both events in case `window.onanimationend` is not supported because of that, + // do the same for `transitionend` as Safari is likely to exhibit similar behavior. + // Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit + // therefore there is no reason to test anymore for other vendor prefixes: http://caniuse.com/#search=transition + if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) { + CSS_PREFIX = '-webkit-'; + TRANSITION_PROP = 'WebkitTransition'; + TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend'; + } else { + TRANSITION_PROP = 'transition'; + TRANSITIONEND_EVENT = 'transitionend'; + } + + if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) { + CSS_PREFIX = '-webkit-'; + ANIMATION_PROP = 'WebkitAnimation'; + ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend'; + } else { + ANIMATION_PROP = 'animation'; + ANIMATIONEND_EVENT = 'animationend'; + } + + var DURATION_KEY = 'Duration'; + var PROPERTY_KEY = 'Property'; + var DELAY_KEY = 'Delay'; + var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount'; + var NG_ANIMATE_PARENT_KEY = '$$ngAnimateKey'; + var NG_ANIMATE_CSS_DATA_KEY = '$$ngAnimateCSS3Data'; + var NG_ANIMATE_BLOCK_CLASS_NAME = 'ng-animate-block-transitions'; + var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3; + var CLOSING_TIME_BUFFER = 1.5; + var ONE_SECOND = 1000; + + var lookupCache = {}; + var parentCounter = 0; + var animationReflowQueue = []; + var cancelAnimationReflow; + function afterReflow(element, callback) { + if(cancelAnimationReflow) { + cancelAnimationReflow(); + } + animationReflowQueue.push(callback); + cancelAnimationReflow = $$animateReflow(function() { + forEach(animationReflowQueue, function(fn) { + fn(); + }); + + animationReflowQueue = []; + cancelAnimationReflow = null; + lookupCache = {}; + }); + } + + var closingTimer = null; + var closingTimestamp = 0; + var animationElementQueue = []; + function animationCloseHandler(element, totalTime) { + var node = extractElementNode(element); + element = angular.element(node); + + //this item will be garbage collected by the closing + //animation timeout + animationElementQueue.push(element); + + //but it may not need to cancel out the existing timeout + //if the timestamp is less than the previous one + var futureTimestamp = Date.now() + totalTime; + if(futureTimestamp <= closingTimestamp) { + return; + } + + $timeout.cancel(closingTimer); + + closingTimestamp = futureTimestamp; + closingTimer = $timeout(function() { + closeAllAnimations(animationElementQueue); + animationElementQueue = []; + }, totalTime, false); + } + + function closeAllAnimations(elements) { + forEach(elements, function(element) { + var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY); + if(elementData) { + (elementData.closeAnimationFn || noop)(); + } + }); + } + + function getElementAnimationDetails(element, cacheKey) { + var data = cacheKey ? lookupCache[cacheKey] : null; + if(!data) { + var transitionDuration = 0; + var transitionDelay = 0; + var animationDuration = 0; + var animationDelay = 0; + var transitionDelayStyle; + var animationDelayStyle; + var transitionDurationStyle; + var transitionPropertyStyle; + + //we want all the styles defined before and after + forEach(element, function(element) { + if (element.nodeType == ELEMENT_NODE) { + var elementStyles = $window.getComputedStyle(element) || {}; + + transitionDurationStyle = elementStyles[TRANSITION_PROP + DURATION_KEY]; + + transitionDuration = Math.max(parseMaxTime(transitionDurationStyle), transitionDuration); + + transitionPropertyStyle = elementStyles[TRANSITION_PROP + PROPERTY_KEY]; + + transitionDelayStyle = elementStyles[TRANSITION_PROP + DELAY_KEY]; + + transitionDelay = Math.max(parseMaxTime(transitionDelayStyle), transitionDelay); + + animationDelayStyle = elementStyles[ANIMATION_PROP + DELAY_KEY]; + + animationDelay = Math.max(parseMaxTime(animationDelayStyle), animationDelay); + + var aDuration = parseMaxTime(elementStyles[ANIMATION_PROP + DURATION_KEY]); + + if(aDuration > 0) { + aDuration *= parseInt(elementStyles[ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY], 10) || 1; + } + + animationDuration = Math.max(aDuration, animationDuration); + } + }); + data = { + total : 0, + transitionPropertyStyle: transitionPropertyStyle, + transitionDurationStyle: transitionDurationStyle, + transitionDelayStyle: transitionDelayStyle, + transitionDelay: transitionDelay, + transitionDuration: transitionDuration, + animationDelayStyle: animationDelayStyle, + animationDelay: animationDelay, + animationDuration: animationDuration + }; + if(cacheKey) { + lookupCache[cacheKey] = data; + } + } + return data; + } + + function parseMaxTime(str) { + var maxValue = 0; + var values = angular.isString(str) ? + str.split(/\s*,\s*/) : + []; + forEach(values, function(value) { + maxValue = Math.max(parseFloat(value) || 0, maxValue); + }); + return maxValue; + } + + function getCacheKey(element) { + var parentElement = element.parent(); + var parentID = parentElement.data(NG_ANIMATE_PARENT_KEY); + if(!parentID) { + parentElement.data(NG_ANIMATE_PARENT_KEY, ++parentCounter); + parentID = parentCounter; + } + return parentID + '-' + extractElementNode(element).getAttribute('class'); + } + + function animateSetup(animationEvent, element, className, calculationDecorator) { + var cacheKey = getCacheKey(element); + var eventCacheKey = cacheKey + ' ' + className; + var itemIndex = lookupCache[eventCacheKey] ? ++lookupCache[eventCacheKey].total : 0; + + var stagger = {}; + if(itemIndex > 0) { + var staggerClassName = className + '-stagger'; + var staggerCacheKey = cacheKey + ' ' + staggerClassName; + var applyClasses = !lookupCache[staggerCacheKey]; + + applyClasses && element.addClass(staggerClassName); + + stagger = getElementAnimationDetails(element, staggerCacheKey); + + applyClasses && element.removeClass(staggerClassName); + } + + /* the animation itself may need to add/remove special CSS classes + * before calculating the anmation styles */ + calculationDecorator = calculationDecorator || + function(fn) { return fn(); }; + + element.addClass(className); + + var formerData = element.data(NG_ANIMATE_CSS_DATA_KEY) || {}; + + var timings = calculationDecorator(function() { + return getElementAnimationDetails(element, eventCacheKey); + }); + + var transitionDuration = timings.transitionDuration; + var animationDuration = timings.animationDuration; + if(transitionDuration === 0 && animationDuration === 0) { + element.removeClass(className); + return false; + } + + element.data(NG_ANIMATE_CSS_DATA_KEY, { + running : formerData.running || 0, + itemIndex : itemIndex, + stagger : stagger, + timings : timings, + closeAnimationFn : noop + }); + + //temporarily disable the transition so that the enter styles + //don't animate twice (this is here to avoid a bug in Chrome/FF). + var isCurrentlyAnimating = formerData.running > 0 || animationEvent == 'setClass'; + if(transitionDuration > 0) { + blockTransitions(element, className, isCurrentlyAnimating); + } + + //staggering keyframe animations work by adjusting the `animation-delay` CSS property + //on the given element, however, the delay value can only calculated after the reflow + //since by that time $animate knows how many elements are being animated. Therefore, + //until the reflow occurs the element needs to be blocked (where the keyframe animation + //is set to `none 0s`). This blocking mechanism should only be set for when a stagger + //animation is detected and when the element item index is greater than 0. + if(animationDuration > 0 && stagger.animationDelay > 0 && stagger.animationDuration === 0) { + blockKeyframeAnimations(element); + } + + return true; + } + + function isStructuralAnimation(className) { + return className == 'ng-enter' || className == 'ng-move' || className == 'ng-leave'; + } + + function blockTransitions(element, className, isAnimating) { + if(isStructuralAnimation(className) || !isAnimating) { + extractElementNode(element).style[TRANSITION_PROP + PROPERTY_KEY] = 'none'; + } else { + element.addClass(NG_ANIMATE_BLOCK_CLASS_NAME); + } + } + + function blockKeyframeAnimations(element) { + extractElementNode(element).style[ANIMATION_PROP] = 'none 0s'; + } + + function unblockTransitions(element, className) { + var prop = TRANSITION_PROP + PROPERTY_KEY; + var node = extractElementNode(element); + if(node.style[prop] && node.style[prop].length > 0) { + node.style[prop] = ''; + } + element.removeClass(NG_ANIMATE_BLOCK_CLASS_NAME); + } + + function unblockKeyframeAnimations(element) { + var prop = ANIMATION_PROP; + var node = extractElementNode(element); + if(node.style[prop] && node.style[prop].length > 0) { + node.style[prop] = ''; + } + } + + function animateRun(animationEvent, element, className, activeAnimationComplete) { + var node = extractElementNode(element); + var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY); + if(node.getAttribute('class').indexOf(className) == -1 || !elementData) { + activeAnimationComplete(); + return; + } + + var activeClassName = ''; + forEach(className.split(' '), function(klass, i) { + activeClassName += (i > 0 ? ' ' : '') + klass + '-active'; + }); + + var stagger = elementData.stagger; + var timings = elementData.timings; + var itemIndex = elementData.itemIndex; + var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration); + var maxDelay = Math.max(timings.transitionDelay, timings.animationDelay); + var maxDelayTime = maxDelay * ONE_SECOND; + + var startTime = Date.now(); + var css3AnimationEvents = ANIMATIONEND_EVENT + ' ' + TRANSITIONEND_EVENT; + + var style = '', appliedStyles = []; + if(timings.transitionDuration > 0) { + var propertyStyle = timings.transitionPropertyStyle; + if(propertyStyle.indexOf('all') == -1) { + style += CSS_PREFIX + 'transition-property: ' + propertyStyle + ';'; + style += CSS_PREFIX + 'transition-duration: ' + timings.transitionDurationStyle + ';'; + appliedStyles.push(CSS_PREFIX + 'transition-property'); + appliedStyles.push(CSS_PREFIX + 'transition-duration'); + } + } + + if(itemIndex > 0) { + if(stagger.transitionDelay > 0 && stagger.transitionDuration === 0) { + var delayStyle = timings.transitionDelayStyle; + style += CSS_PREFIX + 'transition-delay: ' + + prepareStaggerDelay(delayStyle, stagger.transitionDelay, itemIndex) + '; '; + appliedStyles.push(CSS_PREFIX + 'transition-delay'); + } + + if(stagger.animationDelay > 0 && stagger.animationDuration === 0) { + style += CSS_PREFIX + 'animation-delay: ' + + prepareStaggerDelay(timings.animationDelayStyle, stagger.animationDelay, itemIndex) + '; '; + appliedStyles.push(CSS_PREFIX + 'animation-delay'); + } + } + + if(appliedStyles.length > 0) { + //the element being animated may sometimes contain comment nodes in + //the jqLite object, so we're safe to use a single variable to house + //the styles since there is always only one element being animated + var oldStyle = node.getAttribute('style') || ''; + node.setAttribute('style', oldStyle + '; ' + style); + } + + element.on(css3AnimationEvents, onAnimationProgress); + element.addClass(activeClassName); + elementData.closeAnimationFn = function() { + onEnd(); + activeAnimationComplete(); + }; + + var staggerTime = itemIndex * (Math.max(stagger.animationDelay, stagger.transitionDelay) || 0); + var animationTime = (maxDelay + maxDuration) * CLOSING_TIME_BUFFER; + var totalTime = (staggerTime + animationTime) * ONE_SECOND; + + elementData.running++; + animationCloseHandler(element, totalTime); + return onEnd; + + // This will automatically be called by $animate so + // there is no need to attach this internally to the + // timeout done method. + function onEnd(cancelled) { + element.off(css3AnimationEvents, onAnimationProgress); + element.removeClass(activeClassName); + animateClose(element, className); + var node = extractElementNode(element); + for (var i in appliedStyles) { + node.style.removeProperty(appliedStyles[i]); + } + } + + function onAnimationProgress(event) { + event.stopPropagation(); + var ev = event.originalEvent || event; + var timeStamp = ev.$manualTimeStamp || ev.timeStamp || Date.now(); + + /* Firefox (or possibly just Gecko) likes to not round values up + * when a ms measurement is used for the animation */ + var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)); + + /* $manualTimeStamp is a mocked timeStamp value which is set + * within browserTrigger(). This is only here so that tests can + * mock animations properly. Real events fallback to event.timeStamp, + * or, if they don't, then a timeStamp is automatically created for them. + * We're checking to see if the timeStamp surpasses the expected delay, + * but we're using elapsedTime instead of the timeStamp on the 2nd + * pre-condition since animations sometimes close off early */ + if(Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) { + activeAnimationComplete(); + } + } + } + + function prepareStaggerDelay(delayStyle, staggerDelay, index) { + var style = ''; + forEach(delayStyle.split(','), function(val, i) { + style += (i > 0 ? ',' : '') + + (index * staggerDelay + parseInt(val, 10)) + 's'; + }); + return style; + } + + function animateBefore(animationEvent, element, className, calculationDecorator) { + if(animateSetup(animationEvent, element, className, calculationDecorator)) { + return function(cancelled) { + cancelled && animateClose(element, className); + }; + } + } + + function animateAfter(animationEvent, element, className, afterAnimationComplete) { + if(element.data(NG_ANIMATE_CSS_DATA_KEY)) { + return animateRun(animationEvent, element, className, afterAnimationComplete); + } else { + animateClose(element, className); + afterAnimationComplete(); + } + } + + function animate(animationEvent, element, className, animationComplete) { + //If the animateSetup function doesn't bother returning a + //cancellation function then it means that there is no animation + //to perform at all + var preReflowCancellation = animateBefore(animationEvent, element, className); + if(!preReflowCancellation) { + animationComplete(); + return; + } + + //There are two cancellation functions: one is before the first + //reflow animation and the second is during the active state + //animation. The first function will take care of removing the + //data from the element which will not make the 2nd animation + //happen in the first place + var cancel = preReflowCancellation; + afterReflow(element, function() { + unblockTransitions(element, className); + unblockKeyframeAnimations(element); + //once the reflow is complete then we point cancel to + //the new cancellation function which will remove all of the + //animation properties from the active animation + cancel = animateAfter(animationEvent, element, className, animationComplete); + }); + + return function(cancelled) { + (cancel || noop)(cancelled); + }; + } + + function animateClose(element, className) { + element.removeClass(className); + var data = element.data(NG_ANIMATE_CSS_DATA_KEY); + if(data) { + if(data.running) { + data.running--; + } + if(!data.running || data.running === 0) { + element.removeData(NG_ANIMATE_CSS_DATA_KEY); + } + } + } + + return { + enter : function(element, animationCompleted) { + return animate('enter', element, 'ng-enter', animationCompleted); + }, + + leave : function(element, animationCompleted) { + return animate('leave', element, 'ng-leave', animationCompleted); + }, + + move : function(element, animationCompleted) { + return animate('move', element, 'ng-move', animationCompleted); + }, + + beforeSetClass : function(element, add, remove, animationCompleted) { + var className = suffixClasses(remove, '-remove') + ' ' + + suffixClasses(add, '-add'); + var cancellationMethod = animateBefore('setClass', element, className, function(fn) { + /* when classes are removed from an element then the transition style + * that is applied is the transition defined on the element without the + * CSS class being there. This is how CSS3 functions outside of ngAnimate. + * http://plnkr.co/edit/j8OzgTNxHTb4n3zLyjGW?p=preview */ + var klass = element.attr('class'); + element.removeClass(remove); + element.addClass(add); + var timings = fn(); + element.attr('class', klass); + return timings; + }); + + if(cancellationMethod) { + afterReflow(element, function() { + unblockTransitions(element, className); + unblockKeyframeAnimations(element); + animationCompleted(); + }); + return cancellationMethod; + } + animationCompleted(); + }, + + beforeAddClass : function(element, className, animationCompleted) { + var cancellationMethod = animateBefore('addClass', element, suffixClasses(className, '-add'), function(fn) { + + /* when a CSS class is added to an element then the transition style that + * is applied is the transition defined on the element when the CSS class + * is added at the time of the animation. This is how CSS3 functions + * outside of ngAnimate. */ + element.addClass(className); + var timings = fn(); + element.removeClass(className); + return timings; + }); + + if(cancellationMethod) { + afterReflow(element, function() { + unblockTransitions(element, className); + unblockKeyframeAnimations(element); + animationCompleted(); + }); + return cancellationMethod; + } + animationCompleted(); + }, + + setClass : function(element, add, remove, animationCompleted) { + remove = suffixClasses(remove, '-remove'); + add = suffixClasses(add, '-add'); + var className = remove + ' ' + add; + return animateAfter('setClass', element, className, animationCompleted); + }, + + addClass : function(element, className, animationCompleted) { + return animateAfter('addClass', element, suffixClasses(className, '-add'), animationCompleted); + }, + + beforeRemoveClass : function(element, className, animationCompleted) { + var cancellationMethod = animateBefore('removeClass', element, suffixClasses(className, '-remove'), function(fn) { + /* when classes are removed from an element then the transition style + * that is applied is the transition defined on the element without the + * CSS class being there. This is how CSS3 functions outside of ngAnimate. + * http://plnkr.co/edit/j8OzgTNxHTb4n3zLyjGW?p=preview */ + var klass = element.attr('class'); + element.removeClass(className); + var timings = fn(); + element.attr('class', klass); + return timings; + }); + + if(cancellationMethod) { + afterReflow(element, function() { + unblockTransitions(element, className); + unblockKeyframeAnimations(element); + animationCompleted(); + }); + return cancellationMethod; + } + animationCompleted(); + }, + + removeClass : function(element, className, animationCompleted) { + return animateAfter('removeClass', element, suffixClasses(className, '-remove'), animationCompleted); + } + }; + + function suffixClasses(classes, suffix) { + var className = ''; + classes = angular.isArray(classes) ? classes : classes.split(/\s+/); + forEach(classes, function(klass, i) { + if(klass && klass.length > 0) { + className += (i > 0 ? ' ' : '') + klass + suffix; + } + }); + return className; + } + }]); + }]); + + +})(window, window.angular); diff --git a/1.2.17/angular-animate.min.js b/1.2.17/angular-animate.min.js new file mode 100644 index 0000000000..8a97edb3cf --- /dev/null +++ b/1.2.17/angular-animate.min.js @@ -0,0 +1,28 @@ +/* + AngularJS v1.2.17 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(u,f,P){'use strict';f.module("ngAnimate",["ng"]).factory("$$animateReflow",["$$rAF","$document",function(f,u){return function(e){return f(function(){e()})}}]).config(["$provide","$animateProvider",function(W,H){function e(f){for(var e=0;e=x&&b>=u&&f()}var k=e(b);a=b.data(m);if(-1!=k.getAttribute("class").indexOf(c)&&a){var p="";h(c.split(" "),function(a,b){p+=(0 + * + * See {@link ngCookies.$cookies `$cookies`} and + * {@link ngCookies.$cookieStore `$cookieStore`} for usage. + */ + + +angular.module('ngCookies', ['ng']). + /** + * @ngdoc service + * @name $cookies + * + * @description + * Provides read/write access to browser's cookies. + * + * Only a simple Object is exposed and by adding or removing properties to/from this object, new + * cookies are created/deleted at the end of current $eval. + * The object's properties can only be strings. + * + * Requires the {@link ngCookies `ngCookies`} module to be installed. + * + * @example + * + * ```js + * function ExampleController($cookies) { + * // Retrieving a cookie + * var favoriteCookie = $cookies.myFavorite; + * // Setting a cookie + * $cookies.myFavorite = 'oatmeal'; + * } + * ``` + */ + factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) { + var cookies = {}, + lastCookies = {}, + lastBrowserCookies, + runEval = false, + copy = angular.copy, + isUndefined = angular.isUndefined; + + //creates a poller fn that copies all cookies from the $browser to service & inits the service + $browser.addPollFn(function() { + var currentCookies = $browser.cookies(); + if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl + lastBrowserCookies = currentCookies; + copy(currentCookies, lastCookies); + copy(currentCookies, cookies); + if (runEval) $rootScope.$apply(); + } + })(); + + runEval = true; + + //at the end of each eval, push cookies + //TODO: this should happen before the "delayed" watches fire, because if some cookies are not + // strings or browser refuses to store some cookies, we update the model in the push fn. + $rootScope.$watch(push); + + return cookies; + + + /** + * Pushes all the cookies from the service to the browser and verifies if all cookies were + * stored. + */ + function push() { + var name, + value, + browserCookies, + updated; + + //delete any cookies deleted in $cookies + for (name in lastCookies) { + if (isUndefined(cookies[name])) { + $browser.cookies(name, undefined); + } + } + + //update all cookies updated in $cookies + for(name in cookies) { + value = cookies[name]; + if (!angular.isString(value)) { + value = '' + value; + cookies[name] = value; + } + if (value !== lastCookies[name]) { + $browser.cookies(name, value); + updated = true; + } + } + + //verify what was actually stored + if (updated){ + updated = false; + browserCookies = $browser.cookies(); + + for (name in cookies) { + if (cookies[name] !== browserCookies[name]) { + //delete or reset all cookies that the browser dropped from $cookies + if (isUndefined(browserCookies[name])) { + delete cookies[name]; + } else { + cookies[name] = browserCookies[name]; + } + updated = true; + } + } + } + } + }]). + + + /** + * @ngdoc service + * @name $cookieStore + * @requires $cookies + * + * @description + * Provides a key-value (string-object) storage, that is backed by session cookies. + * Objects put or retrieved from this storage are automatically serialized or + * deserialized by angular's toJson/fromJson. + * + * Requires the {@link ngCookies `ngCookies`} module to be installed. + * + * @example + * + * ```js + * function ExampleController($cookies) { + * // Put cookie + * $cookieStore.put('myFavorite','oatmeal'); + * // Get cookie + * var favoriteCookie = $cookieStore.get('myFavorite'); + * // Removing a cookie + * $cookieStore.remove('myFavorite'); + * } + * ``` + */ + factory('$cookieStore', ['$cookies', function($cookies) { + + return { + /** + * @ngdoc method + * @name $cookieStore#get + * + * @description + * Returns the value of given cookie key + * + * @param {string} key Id to use for lookup. + * @returns {Object} Deserialized cookie value. + */ + get: function(key) { + var value = $cookies[key]; + return value ? angular.fromJson(value) : value; + }, + + /** + * @ngdoc method + * @name $cookieStore#put + * + * @description + * Sets a value for given cookie key + * + * @param {string} key Id for the `value`. + * @param {Object} value Value to be stored. + */ + put: function(key, value) { + $cookies[key] = angular.toJson(value); + }, + + /** + * @ngdoc method + * @name $cookieStore#remove + * + * @description + * Remove given cookie + * + * @param {string} key Id of the key-value pair to delete. + */ + remove: function(key) { + delete $cookies[key]; + } + }; + + }]); + + +})(window, window.angular); diff --git a/1.2.17/angular-cookies.min.js b/1.2.17/angular-cookies.min.js new file mode 100644 index 0000000000..5b5b1139fa --- /dev/null +++ b/1.2.17/angular-cookies.min.js @@ -0,0 +1,8 @@ +/* + AngularJS v1.2.17 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(p,f,n){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(e,b){var c={},g={},h,k=!1,l=f.copy,m=f.isUndefined;b.addPollFn(function(){var a=b.cookies();h!=a&&(h=a,l(a,g),l(a,c),k&&e.$apply())})();k=!0;e.$watch(function(){var a,d,e;for(a in g)m(c[a])&&b.cookies(a,n);for(a in c)d=c[a],f.isString(d)||(d=""+d,c[a]=d),d!==g[a]&&(b.cookies(a,d),e=!0);if(e)for(a in d=b.cookies(),c)c[a]!==d[a]&&(m(d[a])?delete c[a]:c[a]=d[a])});return c}]).factory("$cookieStore", +["$cookies",function(e){return{get:function(b){return(b=e[b])?f.fromJson(b):b},put:function(b,c){e[b]=f.toJson(c)},remove:function(b){delete e[b]}}}])})(window,window.angular); +//# sourceMappingURL=angular-cookies.min.js.map diff --git a/1.2.17/angular-cookies.min.js.map b/1.2.17/angular-cookies.min.js.map new file mode 100644 index 0000000000..4e6f87abc8 --- /dev/null +++ b/1.2.17/angular-cookies.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-cookies.min.js", +"lineCount":7, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAmBtCD,CAAAE,OAAA,CAAe,WAAf,CAA4B,CAAC,IAAD,CAA5B,CAAAC,QAAA,CAyBW,UAzBX,CAyBuB,CAAC,YAAD,CAAe,UAAf,CAA2B,QAAS,CAACC,CAAD,CAAaC,CAAb,CAAuB,CAAA,IACxEC,EAAU,EAD8D,CAExEC,EAAc,EAF0D,CAGxEC,CAHwE,CAIxEC,EAAU,CAAA,CAJ8D,CAKxEC,EAAOV,CAAAU,KALiE,CAMxEC,EAAcX,CAAAW,YAGlBN,EAAAO,UAAA,CAAmB,QAAQ,EAAG,CAC5B,IAAIC,EAAiBR,CAAAC,QAAA,EACjBE,EAAJ,EAA0BK,CAA1B,GACEL,CAGA,CAHqBK,CAGrB,CAFAH,CAAA,CAAKG,CAAL,CAAqBN,CAArB,CAEA,CADAG,CAAA,CAAKG,CAAL,CAAqBP,CAArB,CACA,CAAIG,CAAJ,EAAaL,CAAAU,OAAA,EAJf,CAF4B,CAA9B,CAAA,EAUAL,EAAA,CAAU,CAAA,CAKVL,EAAAW,OAAA,CASAC,QAAa,EAAG,CAAA,IACVC,CADU,CAEVC,CAFU,CAIVC,CAGJ,KAAKF,CAAL,GAAaV,EAAb,CACMI,CAAA,CAAYL,CAAA,CAAQW,CAAR,CAAZ,CAAJ,EACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBhB,CAAvB,CAKJ,KAAIgB,CAAJ,GAAYX,EAAZ,CACEY,CAKA,CALQZ,CAAA,CAAQW,CAAR,CAKR,CAJKjB,CAAAoB,SAAA,CAAiBF,CAAjB,CAIL,GAHEA,CACA,CADQ,EACR,CADaA,CACb,CAAAZ,CAAA,CAAQW,CAAR,CAAA,CAAgBC,CAElB,EAAIA,CAAJ,GAAcX,CAAA,CAAYU,CAAZ,CAAd,GACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBC,CAAvB,CACA,CAAAC,CAAA,CAAU,CAAA,CAFZ,CAOF,IAAIA,CAAJ,CAIE,IAAKF,CAAL,GAFAI,EAEaf,CAFID,CAAAC,QAAA,EAEJA,CAAAA,CAAb,CACMA,CAAA,CAAQW,CAAR,CAAJ,GAAsBI,CAAA,CAAeJ,CAAf,CAAtB,GAEMN,CAAA,CAAYU,CAAA,CAAeJ,CAAf,CAAZ,CAAJ,CACE,OAAOX,CAAA,CAAQW,CAAR,CADT,CAGEX,CAAA,CAAQW,CAAR,CAHF,CAGkBI,CAAA,CAAeJ,CAAf,CALpB,CAhCU,CAThB,CAEA,OAAOX,EA1BqE,CAA3D,CAzBvB,CAAAH,QAAA,CAkIW,cAlIX;AAkI2B,CAAC,UAAD,CAAa,QAAQ,CAACmB,CAAD,CAAW,CAErD,MAAO,KAWAC,QAAQ,CAACC,CAAD,CAAM,CAEjB,MAAO,CADHN,CACG,CADKI,CAAA,CAASE,CAAT,CACL,EAAQxB,CAAAyB,SAAA,CAAiBP,CAAjB,CAAR,CAAkCA,CAFxB,CAXd,KA0BAQ,QAAQ,CAACF,CAAD,CAAMN,CAAN,CAAa,CACxBI,CAAA,CAASE,CAAT,CAAA,CAAgBxB,CAAA2B,OAAA,CAAeT,CAAf,CADQ,CA1BrB,QAuCGU,QAAQ,CAACJ,CAAD,CAAM,CACpB,OAAOF,CAAA,CAASE,CAAT,CADa,CAvCjB,CAF8C,CAAhC,CAlI3B,CAnBsC,CAArC,CAAA,CAsMEzB,MAtMF,CAsMUA,MAAAC,QAtMV;", +"sources":["angular-cookies.js"], +"names":["window","angular","undefined","module","factory","$rootScope","$browser","cookies","lastCookies","lastBrowserCookies","runEval","copy","isUndefined","addPollFn","currentCookies","$apply","$watch","push","name","value","updated","isString","browserCookies","$cookies","get","key","fromJson","put","toJson","remove"] +} diff --git a/1.2.17/angular-csp.css b/1.2.17/angular-csp.css new file mode 100644 index 0000000000..3abb3a0e66 --- /dev/null +++ b/1.2.17/angular-csp.css @@ -0,0 +1,24 @@ +/* Include this file in your html if you are using the CSP mode. */ + +@charset "UTF-8"; + +[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], +.ng-cloak, .x-ng-cloak, +.ng-hide { + display: none !important; +} + +ng\:form { + display: block; +} + +.ng-animate-block-transitions { + transition:0s all!important; + -webkit-transition:0s all!important; +} + +/* show the element during a show/hide animation when the + * animation is ongoing, but the .ng-hide class is active */ +.ng-hide-add-active, .ng-hide-remove { + display: block!important; +} diff --git a/1.2.17/angular-loader.js b/1.2.17/angular-loader.js new file mode 100644 index 0000000000..aaf9228317 --- /dev/null +++ b/1.2.17/angular-loader.js @@ -0,0 +1,414 @@ +/** + * @license AngularJS v1.2.17 + * (c) 2010-2014 Google, Inc. http://angularjs.org + * License: MIT + */ + +(function() {'use strict'; + +/** + * @description + * + * This object provides a utility for producing rich Error messages within + * Angular. It can be called as follows: + * + * var exampleMinErr = minErr('example'); + * throw exampleMinErr('one', 'This {0} is {1}', foo, bar); + * + * The above creates an instance of minErr in the example namespace. The + * resulting error will have a namespaced error code of example.one. The + * resulting error will replace {0} with the value of foo, and {1} with the + * value of bar. The object is not restricted in the number of arguments it can + * take. + * + * If fewer arguments are specified than necessary for interpolation, the extra + * interpolation markers will be preserved in the final string. + * + * Since data will be parsed statically during a build step, some restrictions + * are applied with respect to how minErr instances are created and called. + * Instances should have names of the form namespaceMinErr for a minErr created + * using minErr('namespace') . Error codes, namespaces and template strings + * should all be static strings, not variables or general expressions. + * + * @param {string} module The namespace to use for the new minErr instance. + * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance + */ + +function minErr(module) { + return function () { + var code = arguments[0], + prefix = '[' + (module ? module + ':' : '') + code + '] ', + template = arguments[1], + templateArgs = arguments, + stringify = function (obj) { + if (typeof obj === 'function') { + return obj.toString().replace(/ \{[\s\S]*$/, ''); + } else if (typeof obj === 'undefined') { + return 'undefined'; + } else if (typeof obj !== 'string') { + return JSON.stringify(obj); + } + return obj; + }, + message, i; + + message = prefix + template.replace(/\{\d+\}/g, function (match) { + var index = +match.slice(1, -1), arg; + + if (index + 2 < templateArgs.length) { + arg = templateArgs[index + 2]; + if (typeof arg === 'function') { + return arg.toString().replace(/ ?\{[\s\S]*$/, ''); + } else if (typeof arg === 'undefined') { + return 'undefined'; + } else if (typeof arg !== 'string') { + return toJson(arg); + } + return arg; + } + return match; + }); + + message = message + '\nhttp://errors.angularjs.org/1.2.17/' + + (module ? module + '/' : '') + code; + for (i = 2; i < arguments.length; i++) { + message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' + + encodeURIComponent(stringify(arguments[i])); + } + + return new Error(message); + }; +} + +/** + * @ngdoc type + * @name angular.Module + * @module ng + * @description + * + * Interface for configuring angular {@link angular.module modules}. + */ + +function setupModuleLoader(window) { + + var $injectorMinErr = minErr('$injector'); + var ngMinErr = minErr('ng'); + + function ensure(obj, name, factory) { + return obj[name] || (obj[name] = factory()); + } + + var angular = ensure(window, 'angular', Object); + + // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap + angular.$$minErr = angular.$$minErr || minErr; + + return ensure(angular, 'module', function() { + /** @type {Object.} */ + var modules = {}; + + /** + * @ngdoc function + * @name angular.module + * @module ng + * @description + * + * The `angular.module` is a global place for creating, registering and retrieving Angular + * modules. + * All modules (angular core or 3rd party) that should be available to an application must be + * registered using this mechanism. + * + * When passed two or more arguments, a new module is created. If passed only one argument, an + * existing module (the name passed as the first argument to `module`) is retrieved. + * + * + * # Module + * + * A module is a collection of services, directives, filters, and configuration information. + * `angular.module` is used to configure the {@link auto.$injector $injector}. + * + * ```js + * // Create a new module + * var myModule = angular.module('myModule', []); + * + * // register a new service + * myModule.value('appName', 'MyCoolApp'); + * + * // configure existing services inside initialization blocks. + * myModule.config(['$locationProvider', function($locationProvider) { + * // Configure existing providers + * $locationProvider.hashPrefix('!'); + * }]); + * ``` + * + * Then you can create an injector and load your modules like this: + * + * ```js + * var injector = angular.injector(['ng', 'myModule']) + * ``` + * + * However it's more likely that you'll just use + * {@link ng.directive:ngApp ngApp} or + * {@link angular.bootstrap} to simplify this process for you. + * + * @param {!string} name The name of the module to create or retrieve. +<<<<<* @param {!Array.=} requires If specified then new module is being created. If +>>>>>* unspecified then the module is being retrieved for further configuration. + * @param {Function} configFn Optional configuration function for the module. Same as + * {@link angular.Module#config Module#config()}. + * @returns {module} new module with the {@link angular.Module} api. + */ + return function module(name, requires, configFn) { + var assertNotHasOwnProperty = function(name, context) { + if (name === 'hasOwnProperty') { + throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context); + } + }; + + assertNotHasOwnProperty(name, 'module'); + if (requires && modules.hasOwnProperty(name)) { + modules[name] = null; + } + return ensure(modules, name, function() { + if (!requires) { + throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " + + "the module name or forgot to load it. If registering a module ensure that you " + + "specify the dependencies as the second argument.", name); + } + + /** @type {!Array.>} */ + var invokeQueue = []; + + /** @type {!Array.} */ + var runBlocks = []; + + var config = invokeLater('$injector', 'invoke'); + + /** @type {angular.Module} */ + var moduleInstance = { + // Private state + _invokeQueue: invokeQueue, + _runBlocks: runBlocks, + + /** + * @ngdoc property + * @name angular.Module#requires + * @module ng + * @returns {Array.} List of module names which must be loaded before this module. + * @description + * Holds the list of modules which the injector will load before the current module is + * loaded. + */ + requires: requires, + + /** + * @ngdoc property + * @name angular.Module#name + * @module ng + * @returns {string} Name of the module. + * @description + */ + name: name, + + + /** + * @ngdoc method + * @name angular.Module#provider + * @module ng + * @param {string} name service name + * @param {Function} providerType Construction function for creating new instance of the + * service. + * @description + * See {@link auto.$provide#provider $provide.provider()}. + */ + provider: invokeLater('$provide', 'provider'), + + /** + * @ngdoc method + * @name angular.Module#factory + * @module ng + * @param {string} name service name + * @param {Function} providerFunction Function for creating new instance of the service. + * @description + * See {@link auto.$provide#factory $provide.factory()}. + */ + factory: invokeLater('$provide', 'factory'), + + /** + * @ngdoc method + * @name angular.Module#service + * @module ng + * @param {string} name service name + * @param {Function} constructor A constructor function that will be instantiated. + * @description + * See {@link auto.$provide#service $provide.service()}. + */ + service: invokeLater('$provide', 'service'), + + /** + * @ngdoc method + * @name angular.Module#value + * @module ng + * @param {string} name service name + * @param {*} object Service instance object. + * @description + * See {@link auto.$provide#value $provide.value()}. + */ + value: invokeLater('$provide', 'value'), + + /** + * @ngdoc method + * @name angular.Module#constant + * @module ng + * @param {string} name constant name + * @param {*} object Constant value. + * @description + * Because the constant are fixed, they get applied before other provide methods. + * See {@link auto.$provide#constant $provide.constant()}. + */ + constant: invokeLater('$provide', 'constant', 'unshift'), + + /** + * @ngdoc method + * @name angular.Module#animation + * @module ng + * @param {string} name animation name + * @param {Function} animationFactory Factory function for creating new instance of an + * animation. + * @description + * + * **NOTE**: animations take effect only if the **ngAnimate** module is loaded. + * + * + * Defines an animation hook that can be later used with + * {@link ngAnimate.$animate $animate} service and directives that use this service. + * + * ```js + * module.animation('.animation-name', function($inject1, $inject2) { + * return { + * eventName : function(element, done) { + * //code to run the animation + * //once complete, then run done() + * return function cancellationFunction(element) { + * //code to cancel the animation + * } + * } + * } + * }) + * ``` + * + * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and + * {@link ngAnimate ngAnimate module} for more information. + */ + animation: invokeLater('$animateProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#filter + * @module ng + * @param {string} name Filter name. + * @param {Function} filterFactory Factory function for creating new instance of filter. + * @description + * See {@link ng.$filterProvider#register $filterProvider.register()}. + */ + filter: invokeLater('$filterProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#controller + * @module ng + * @param {string|Object} name Controller name, or an object map of controllers where the + * keys are the names and the values are the constructors. + * @param {Function} constructor Controller constructor function. + * @description + * See {@link ng.$controllerProvider#register $controllerProvider.register()}. + */ + controller: invokeLater('$controllerProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#directive + * @module ng + * @param {string|Object} name Directive name, or an object map of directives where the + * keys are the names and the values are the factories. + * @param {Function} directiveFactory Factory function for creating new instance of + * directives. + * @description + * See {@link ng.$compileProvider#directive $compileProvider.directive()}. + */ + directive: invokeLater('$compileProvider', 'directive'), + + /** + * @ngdoc method + * @name angular.Module#config + * @module ng + * @param {Function} configFn Execute this function on module load. Useful for service + * configuration. + * @description + * Use this method to register work which needs to be performed on module loading. + * For more about how to configure services, see + * {@link providers#providers_provider-recipe Provider Recipe}. + */ + config: config, + + /** + * @ngdoc method + * @name angular.Module#run + * @module ng + * @param {Function} initializationFn Execute this function after injector creation. + * Useful for application initialization. + * @description + * Use this method to register work which should be performed when the injector is done + * loading all modules. + */ + run: function(block) { + runBlocks.push(block); + return this; + } + }; + + if (configFn) { + config(configFn); + } + + return moduleInstance; + + /** + * @param {string} provider + * @param {string} method + * @param {String=} insertMethod + * @returns {angular.Module} + */ + function invokeLater(provider, method, insertMethod) { + return function() { + invokeQueue[insertMethod || 'push']([provider, method, arguments]); + return moduleInstance; + }; + } + }); + }; + }); + +} + +setupModuleLoader(window); +})(window); + +/** + * Closure compiler type information + * + * @typedef { { + * requires: !Array., + * invokeQueue: !Array.>, + * + * service: function(string, Function):angular.Module, + * factory: function(string, Function):angular.Module, + * value: function(string, *):angular.Module, + * + * filter: function(string, Function):angular.Module, + * + * init: function(Function):angular.Module + * } } + */ +angular.Module; + diff --git a/1.2.17/angular-loader.min.js b/1.2.17/angular-loader.min.js new file mode 100644 index 0000000000..bc519d0089 --- /dev/null +++ b/1.2.17/angular-loader.min.js @@ -0,0 +1,9 @@ +/* + AngularJS v1.2.17 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(){'use strict';function d(a){return function(){var c=arguments[0],b,c="["+(a?a+":":"")+c+"] http://errors.angularjs.org/1.2.17/"+(a?a+"/":"")+c;for(b=1;b 0 && iteration >= count) { + var fnIndex; + deferred.resolve(iteration); + + angular.forEach(repeatFns, function(fn, index) { + if (fn.id === promise.$$intervalId) fnIndex = index; + }); + + if (fnIndex !== undefined) { + repeatFns.splice(fnIndex, 1); + } + } + + if (!skipApply) $rootScope.$apply(); + } + + repeatFns.push({ + nextTime:(now + delay), + delay: delay, + fn: tick, + id: nextRepeatId, + deferred: deferred + }); + repeatFns.sort(function(a,b){ return a.nextTime - b.nextTime;}); + + nextRepeatId++; + return promise; + }; + /** + * @ngdoc method + * @name $interval#cancel + * + * @description + * Cancels a task associated with the `promise`. + * + * @param {promise} promise A promise from calling the `$interval` function. + * @returns {boolean} Returns `true` if the task was successfully cancelled. + */ + $interval.cancel = function(promise) { + if(!promise) return false; + var fnIndex; + + angular.forEach(repeatFns, function(fn, index) { + if (fn.id === promise.$$intervalId) fnIndex = index; + }); + + if (fnIndex !== undefined) { + repeatFns[fnIndex].deferred.reject('canceled'); + repeatFns.splice(fnIndex, 1); + return true; + } + + return false; + }; + + /** + * @ngdoc method + * @name $interval#flush + * @description + * + * Runs interval tasks scheduled to be run in the next `millis` milliseconds. + * + * @param {number=} millis maximum timeout amount to flush up until. + * + * @return {number} The amount of time moved forward. + */ + $interval.flush = function(millis) { + now += millis; + while (repeatFns.length && repeatFns[0].nextTime <= now) { + var task = repeatFns[0]; + task.fn(); + task.nextTime += task.delay; + repeatFns.sort(function(a,b){ return a.nextTime - b.nextTime;}); + } + return millis; + }; + + return $interval; + }]; +}; + + +/* jshint -W101 */ +/* The R_ISO8061_STR regex is never going to fit into the 100 char limit! + * This directive should go inside the anonymous function but a bug in JSHint means that it would + * not be enacted early enough to prevent the warning. + */ +var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/; + +function jsonStringToDate(string) { + var match; + if (match = string.match(R_ISO8061_STR)) { + var date = new Date(0), + tzHour = 0, + tzMin = 0; + if (match[9]) { + tzHour = int(match[9] + match[10]); + tzMin = int(match[9] + match[11]); + } + date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3])); + date.setUTCHours(int(match[4]||0) - tzHour, + int(match[5]||0) - tzMin, + int(match[6]||0), + int(match[7]||0)); + return date; + } + return string; +} + +function int(str) { + return parseInt(str, 10); +} + +function padNumber(num, digits, trim) { + var neg = ''; + if (num < 0) { + neg = '-'; + num = -num; + } + num = '' + num; + while(num.length < digits) num = '0' + num; + if (trim) + num = num.substr(num.length - digits); + return neg + num; +} + + +/** + * @ngdoc type + * @name angular.mock.TzDate + * @description + * + * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`. + * + * Mock of the Date type which has its timezone specified via constructor arg. + * + * The main purpose is to create Date-like instances with timezone fixed to the specified timezone + * offset, so that we can test code that depends on local timezone settings without dependency on + * the time zone settings of the machine where the code is running. + * + * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored) + * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC* + * + * @example + * !!!! WARNING !!!!! + * This is not a complete Date object so only methods that were implemented can be called safely. + * To make matters worse, TzDate instances inherit stuff from Date via a prototype. + * + * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is + * incomplete we might be missing some non-standard methods. This can result in errors like: + * "Date.prototype.foo called on incompatible Object". + * + * ```js + * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z'); + * newYearInBratislava.getTimezoneOffset() => -60; + * newYearInBratislava.getFullYear() => 2010; + * newYearInBratislava.getMonth() => 0; + * newYearInBratislava.getDate() => 1; + * newYearInBratislava.getHours() => 0; + * newYearInBratislava.getMinutes() => 0; + * newYearInBratislava.getSeconds() => 0; + * ``` + * + */ +angular.mock.TzDate = function (offset, timestamp) { + var self = new Date(0); + if (angular.isString(timestamp)) { + var tsStr = timestamp; + + self.origDate = jsonStringToDate(timestamp); + + timestamp = self.origDate.getTime(); + if (isNaN(timestamp)) + throw { + name: "Illegal Argument", + message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string" + }; + } else { + self.origDate = new Date(timestamp); + } + + var localOffset = new Date(timestamp).getTimezoneOffset(); + self.offsetDiff = localOffset*60*1000 - offset*1000*60*60; + self.date = new Date(timestamp + self.offsetDiff); + + self.getTime = function() { + return self.date.getTime() - self.offsetDiff; + }; + + self.toLocaleDateString = function() { + return self.date.toLocaleDateString(); + }; + + self.getFullYear = function() { + return self.date.getFullYear(); + }; + + self.getMonth = function() { + return self.date.getMonth(); + }; + + self.getDate = function() { + return self.date.getDate(); + }; + + self.getHours = function() { + return self.date.getHours(); + }; + + self.getMinutes = function() { + return self.date.getMinutes(); + }; + + self.getSeconds = function() { + return self.date.getSeconds(); + }; + + self.getMilliseconds = function() { + return self.date.getMilliseconds(); + }; + + self.getTimezoneOffset = function() { + return offset * 60; + }; + + self.getUTCFullYear = function() { + return self.origDate.getUTCFullYear(); + }; + + self.getUTCMonth = function() { + return self.origDate.getUTCMonth(); + }; + + self.getUTCDate = function() { + return self.origDate.getUTCDate(); + }; + + self.getUTCHours = function() { + return self.origDate.getUTCHours(); + }; + + self.getUTCMinutes = function() { + return self.origDate.getUTCMinutes(); + }; + + self.getUTCSeconds = function() { + return self.origDate.getUTCSeconds(); + }; + + self.getUTCMilliseconds = function() { + return self.origDate.getUTCMilliseconds(); + }; + + self.getDay = function() { + return self.date.getDay(); + }; + + // provide this method only on browsers that already have it + if (self.toISOString) { + self.toISOString = function() { + return padNumber(self.origDate.getUTCFullYear(), 4) + '-' + + padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' + + padNumber(self.origDate.getUTCDate(), 2) + 'T' + + padNumber(self.origDate.getUTCHours(), 2) + ':' + + padNumber(self.origDate.getUTCMinutes(), 2) + ':' + + padNumber(self.origDate.getUTCSeconds(), 2) + '.' + + padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z'; + }; + } + + //hide all methods not implemented in this mock that the Date prototype exposes + var unimplementedMethods = ['getUTCDay', + 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds', + 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear', + 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', + 'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString', + 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf']; + + angular.forEach(unimplementedMethods, function(methodName) { + self[methodName] = function() { + throw new Error("Method '" + methodName + "' is not implemented in the TzDate mock"); + }; + }); + + return self; +}; + +//make "tzDateInstance instanceof Date" return true +angular.mock.TzDate.prototype = Date.prototype; +/* jshint +W101 */ + +angular.mock.animate = angular.module('ngAnimateMock', ['ng']) + + .config(['$provide', function($provide) { + + var reflowQueue = []; + $provide.value('$$animateReflow', function(fn) { + var index = reflowQueue.length; + reflowQueue.push(fn); + return function cancel() { + reflowQueue.splice(index, 1); + }; + }); + + $provide.decorator('$animate', function($delegate, $$asyncCallback) { + var animate = { + queue : [], + enabled : $delegate.enabled, + triggerCallbacks : function() { + $$asyncCallback.flush(); + }, + triggerReflow : function() { + angular.forEach(reflowQueue, function(fn) { + fn(); + }); + reflowQueue = []; + } + }; + + angular.forEach( + ['enter','leave','move','addClass','removeClass','setClass'], function(method) { + animate[method] = function() { + animate.queue.push({ + event : method, + element : arguments[0], + args : arguments + }); + $delegate[method].apply($delegate, arguments); + }; + }); + + return animate; + }); + + }]); + + +/** + * @ngdoc function + * @name angular.mock.dump + * @description + * + * *NOTE*: this is not an injectable instance, just a globally available function. + * + * Method for serializing common angular objects (scope, elements, etc..) into strings, useful for + * debugging. + * + * This method is also available on window, where it can be used to display objects on debug + * console. + * + * @param {*} object - any object to turn into string. + * @return {string} a serialized string of the argument + */ +angular.mock.dump = function(object) { + return serialize(object); + + function serialize(object) { + var out; + + if (angular.isElement(object)) { + object = angular.element(object); + out = angular.element('
'); + angular.forEach(object, function(element) { + out.append(angular.element(element).clone()); + }); + out = out.html(); + } else if (angular.isArray(object)) { + out = []; + angular.forEach(object, function(o) { + out.push(serialize(o)); + }); + out = '[ ' + out.join(', ') + ' ]'; + } else if (angular.isObject(object)) { + if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) { + out = serializeScope(object); + } else if (object instanceof Error) { + out = object.stack || ('' + object.name + ': ' + object.message); + } else { + // TODO(i): this prevents methods being logged, + // we should have a better way to serialize objects + out = angular.toJson(object, true); + } + } else { + out = String(object); + } + + return out; + } + + function serializeScope(scope, offset) { + offset = offset || ' '; + var log = [offset + 'Scope(' + scope.$id + '): {']; + for ( var key in scope ) { + if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) { + log.push(' ' + key + ': ' + angular.toJson(scope[key])); + } + } + var child = scope.$$childHead; + while(child) { + log.push(serializeScope(child, offset + ' ')); + child = child.$$nextSibling; + } + log.push('}'); + return log.join('\n' + offset); + } +}; + +/** + * @ngdoc service + * @name $httpBackend + * @description + * Fake HTTP backend implementation suitable for unit testing applications that use the + * {@link ng.$http $http service}. + * + * *Note*: For fake HTTP backend implementation suitable for end-to-end testing or backend-less + * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}. + * + * During unit testing, we want our unit tests to run quickly and have no external dependencies so + * we don’t want to send [XHR](https://developer.mozilla.org/en/xmlhttprequest) or + * [JSONP](http://en.wikipedia.org/wiki/JSONP) requests to a real server. All we really need is + * to verify whether a certain request has been sent or not, or alternatively just let the + * application make requests, respond with pre-trained responses and assert that the end result is + * what we expect it to be. + * + * This mock implementation can be used to respond with static or dynamic responses via the + * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc). + * + * When an Angular application needs some data from a server, it calls the $http service, which + * sends the request to a real server using $httpBackend service. With dependency injection, it is + * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify + * the requests and respond with some testing data without sending a request to a real server. + * + * There are two ways to specify what test data should be returned as http responses by the mock + * backend when the code under test makes http requests: + * + * - `$httpBackend.expect` - specifies a request expectation + * - `$httpBackend.when` - specifies a backend definition + * + * + * # Request Expectations vs Backend Definitions + * + * Request expectations provide a way to make assertions about requests made by the application and + * to define responses for those requests. The test will fail if the expected requests are not made + * or they are made in the wrong order. + * + * Backend definitions allow you to define a fake backend for your application which doesn't assert + * if a particular request was made or not, it just returns a trained response if a request is made. + * The test will pass whether or not the request gets made during testing. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Request expectationsBackend definitions
Syntax.expect(...).respond(...).when(...).respond(...)
Typical usagestrict unit testsloose (black-box) unit testing
Fulfills multiple requestsNOYES
Order of requests mattersYESNO
Request requiredYESNO
Response requiredoptional (see below)YES
+ * + * In cases where both backend definitions and request expectations are specified during unit + * testing, the request expectations are evaluated first. + * + * If a request expectation has no response specified, the algorithm will search your backend + * definitions for an appropriate response. + * + * If a request didn't match any expectation or if the expectation doesn't have the response + * defined, the backend definitions are evaluated in sequential order to see if any of them match + * the request. The response from the first matched definition is returned. + * + * + * # Flushing HTTP requests + * + * The $httpBackend used in production always responds to requests asynchronously. If we preserved + * this behavior in unit testing, we'd have to create async unit tests, which are hard to write, + * to follow and to maintain. But neither can the testing mock respond synchronously; that would + * change the execution of the code under test. For this reason, the mock $httpBackend has a + * `flush()` method, which allows the test to explicitly flush pending requests. This preserves + * the async api of the backend, while allowing the test to execute synchronously. + * + * + * # Unit testing with mock $httpBackend + * The following code shows how to setup and use the mock backend when unit testing a controller. + * First we create the controller under test: + * + ```js + // The controller code + function MyController($scope, $http) { + var authToken; + + $http.get('/auth.py').success(function(data, status, headers) { + authToken = headers('A-Token'); + $scope.user = data; + }); + + $scope.saveMessage = function(message) { + var headers = { 'Authorization': authToken }; + $scope.status = 'Saving...'; + + $http.post('/add-msg.py', message, { headers: headers } ).success(function(response) { + $scope.status = ''; + }).error(function() { + $scope.status = 'ERROR!'; + }); + }; + } + ``` + * + * Now we setup the mock backend and create the test specs: + * + ```js + // testing controller + describe('MyController', function() { + var $httpBackend, $rootScope, createController; + + beforeEach(inject(function($injector) { + // Set up the mock http service responses + $httpBackend = $injector.get('$httpBackend'); + // backend definition common for all tests + $httpBackend.when('GET', '/auth.py').respond({userId: 'userX'}, {'A-Token': 'xxx'}); + + // Get hold of a scope (i.e. the root scope) + $rootScope = $injector.get('$rootScope'); + // The $controller service is used to create instances of controllers + var $controller = $injector.get('$controller'); + + createController = function() { + return $controller('MyController', {'$scope' : $rootScope }); + }; + })); + + + afterEach(function() { + $httpBackend.verifyNoOutstandingExpectation(); + $httpBackend.verifyNoOutstandingRequest(); + }); + + + it('should fetch authentication token', function() { + $httpBackend.expectGET('/auth.py'); + var controller = createController(); + $httpBackend.flush(); + }); + + + it('should send msg to server', function() { + var controller = createController(); + $httpBackend.flush(); + + // now you don’t care about the authentication, but + // the controller will still send the request and + // $httpBackend will respond without you having to + // specify the expectation and response for this request + + $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, ''); + $rootScope.saveMessage('message content'); + expect($rootScope.status).toBe('Saving...'); + $httpBackend.flush(); + expect($rootScope.status).toBe(''); + }); + + + it('should send auth header', function() { + var controller = createController(); + $httpBackend.flush(); + + $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) { + // check if the header was send, if it wasn't the expectation won't + // match the request and the test will fail + return headers['Authorization'] == 'xxx'; + }).respond(201, ''); + + $rootScope.saveMessage('whatever'); + $httpBackend.flush(); + }); + }); + ``` + */ +angular.mock.$HttpBackendProvider = function() { + this.$get = ['$rootScope', createHttpBackendMock]; +}; + +/** + * General factory function for $httpBackend mock. + * Returns instance for unit testing (when no arguments specified): + * - passing through is disabled + * - auto flushing is disabled + * + * Returns instance for e2e testing (when `$delegate` and `$browser` specified): + * - passing through (delegating request to real backend) is enabled + * - auto flushing is enabled + * + * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified) + * @param {Object=} $browser Auto-flushing enabled if specified + * @return {Object} Instance of $httpBackend mock + */ +function createHttpBackendMock($rootScope, $delegate, $browser) { + var definitions = [], + expectations = [], + responses = [], + responsesPush = angular.bind(responses, responses.push), + copy = angular.copy; + + function createResponse(status, data, headers, statusText) { + if (angular.isFunction(status)) return status; + + return function() { + return angular.isNumber(status) + ? [status, data, headers, statusText] + : [200, status, data]; + }; + } + + // TODO(vojta): change params to: method, url, data, headers, callback + function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) { + var xhr = new MockXhr(), + expectation = expectations[0], + wasExpected = false; + + function prettyPrint(data) { + return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp) + ? data + : angular.toJson(data); + } + + function wrapResponse(wrapped) { + if (!$browser && timeout && timeout.then) timeout.then(handleTimeout); + + return handleResponse; + + function handleResponse() { + var response = wrapped.response(method, url, data, headers); + xhr.$$respHeaders = response[2]; + callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders(), + copy(response[3] || '')); + } + + function handleTimeout() { + for (var i = 0, ii = responses.length; i < ii; i++) { + if (responses[i] === handleResponse) { + responses.splice(i, 1); + callback(-1, undefined, ''); + break; + } + } + } + } + + if (expectation && expectation.match(method, url)) { + if (!expectation.matchData(data)) + throw new Error('Expected ' + expectation + ' with different data\n' + + 'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT: ' + data); + + if (!expectation.matchHeaders(headers)) + throw new Error('Expected ' + expectation + ' with different headers\n' + + 'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT: ' + + prettyPrint(headers)); + + expectations.shift(); + + if (expectation.response) { + responses.push(wrapResponse(expectation)); + return; + } + wasExpected = true; + } + + var i = -1, definition; + while ((definition = definitions[++i])) { + if (definition.match(method, url, data, headers || {})) { + if (definition.response) { + // if $browser specified, we do auto flush all requests + ($browser ? $browser.defer : responsesPush)(wrapResponse(definition)); + } else if (definition.passThrough) { + $delegate(method, url, data, callback, headers, timeout, withCredentials); + } else throw new Error('No response defined !'); + return; + } + } + throw wasExpected ? + new Error('No response defined !') : + new Error('Unexpected request: ' + method + ' ' + url + '\n' + + (expectation ? 'Expected ' + expectation : 'No more request expected')); + } + + /** + * @ngdoc method + * @name $httpBackend#when + * @description + * Creates a new backend definition. + * + * @param {string} method HTTP method. + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current definition. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. + * + * - respond – + * `{function([status,] data[, headers, statusText]) + * | function(function(method, url, data, headers)}` + * – The respond method takes a set of static data to be returned or a function that can + * return an array containing response status (number), response data (string), response + * headers (Object), and the text for the status (string). + */ + $httpBackend.when = function(method, url, data, headers) { + var definition = new MockHttpExpectation(method, url, data, headers), + chain = { + respond: function(status, data, headers, statusText) { + definition.response = createResponse(status, data, headers, statusText); + } + }; + + if ($browser) { + chain.passThrough = function() { + definition.passThrough = true; + }; + } + + definitions.push(definition); + return chain; + }; + + /** + * @ngdoc method + * @name $httpBackend#whenGET + * @description + * Creates a new backend definition for GET requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenHEAD + * @description + * Creates a new backend definition for HEAD requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenDELETE + * @description + * Creates a new backend definition for DELETE requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenPOST + * @description + * Creates a new backend definition for POST requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenPUT + * @description + * Creates a new backend definition for PUT requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenJSONP + * @description + * Creates a new backend definition for JSONP requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + createShortMethods('when'); + + + /** + * @ngdoc method + * @name $httpBackend#expect + * @description + * Creates a new request expectation. + * + * @param {string} method HTTP method. + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current expectation. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + * + * - respond – + * `{function([status,] data[, headers, statusText]) + * | function(function(method, url, data, headers)}` + * – The respond method takes a set of static data to be returned or a function that can + * return an array containing response status (number), response data (string), response + * headers (Object), and the text for the status (string). + */ + $httpBackend.expect = function(method, url, data, headers) { + var expectation = new MockHttpExpectation(method, url, data, headers); + expectations.push(expectation); + return { + respond: function (status, data, headers, statusText) { + expectation.response = createResponse(status, data, headers, statusText); + } + }; + }; + + + /** + * @ngdoc method + * @name $httpBackend#expectGET + * @description + * Creates a new request expectation for GET requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. See #expect for more info. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectHEAD + * @description + * Creates a new request expectation for HEAD requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectDELETE + * @description + * Creates a new request expectation for DELETE requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectPOST + * @description + * Creates a new request expectation for POST requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectPUT + * @description + * Creates a new request expectation for PUT requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectPATCH + * @description + * Creates a new request expectation for PATCH requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectJSONP + * @description + * Creates a new request expectation for JSONP requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + createShortMethods('expect'); + + + /** + * @ngdoc method + * @name $httpBackend#flush + * @description + * Flushes all pending requests using the trained responses. + * + * @param {number=} count Number of responses to flush (in the order they arrived). If undefined, + * all pending requests will be flushed. If there are no pending requests when the flush method + * is called an exception is thrown (as this typically a sign of programming error). + */ + $httpBackend.flush = function(count) { + $rootScope.$digest(); + if (!responses.length) throw new Error('No pending request to flush !'); + + if (angular.isDefined(count)) { + while (count--) { + if (!responses.length) throw new Error('No more pending request to flush !'); + responses.shift()(); + } + } else { + while (responses.length) { + responses.shift()(); + } + } + $httpBackend.verifyNoOutstandingExpectation(); + }; + + + /** + * @ngdoc method + * @name $httpBackend#verifyNoOutstandingExpectation + * @description + * Verifies that all of the requests defined via the `expect` api were made. If any of the + * requests were not made, verifyNoOutstandingExpectation throws an exception. + * + * Typically, you would call this method following each test case that asserts requests using an + * "afterEach" clause. + * + * ```js + * afterEach($httpBackend.verifyNoOutstandingExpectation); + * ``` + */ + $httpBackend.verifyNoOutstandingExpectation = function() { + $rootScope.$digest(); + if (expectations.length) { + throw new Error('Unsatisfied requests: ' + expectations.join(', ')); + } + }; + + + /** + * @ngdoc method + * @name $httpBackend#verifyNoOutstandingRequest + * @description + * Verifies that there are no outstanding requests that need to be flushed. + * + * Typically, you would call this method following each test case that asserts requests using an + * "afterEach" clause. + * + * ```js + * afterEach($httpBackend.verifyNoOutstandingRequest); + * ``` + */ + $httpBackend.verifyNoOutstandingRequest = function() { + if (responses.length) { + throw new Error('Unflushed requests: ' + responses.length); + } + }; + + + /** + * @ngdoc method + * @name $httpBackend#resetExpectations + * @description + * Resets all request expectations, but preserves all backend definitions. Typically, you would + * call resetExpectations during a multiple-phase test when you want to reuse the same instance of + * $httpBackend mock. + */ + $httpBackend.resetExpectations = function() { + expectations.length = 0; + responses.length = 0; + }; + + return $httpBackend; + + + function createShortMethods(prefix) { + angular.forEach(['GET', 'DELETE', 'JSONP'], function(method) { + $httpBackend[prefix + method] = function(url, headers) { + return $httpBackend[prefix](method, url, undefined, headers); + }; + }); + + angular.forEach(['PUT', 'POST', 'PATCH'], function(method) { + $httpBackend[prefix + method] = function(url, data, headers) { + return $httpBackend[prefix](method, url, data, headers); + }; + }); + } +} + +function MockHttpExpectation(method, url, data, headers) { + + this.data = data; + this.headers = headers; + + this.match = function(m, u, d, h) { + if (method != m) return false; + if (!this.matchUrl(u)) return false; + if (angular.isDefined(d) && !this.matchData(d)) return false; + if (angular.isDefined(h) && !this.matchHeaders(h)) return false; + return true; + }; + + this.matchUrl = function(u) { + if (!url) return true; + if (angular.isFunction(url.test)) return url.test(u); + return url == u; + }; + + this.matchHeaders = function(h) { + if (angular.isUndefined(headers)) return true; + if (angular.isFunction(headers)) return headers(h); + return angular.equals(headers, h); + }; + + this.matchData = function(d) { + if (angular.isUndefined(data)) return true; + if (data && angular.isFunction(data.test)) return data.test(d); + if (data && angular.isFunction(data)) return data(d); + if (data && !angular.isString(data)) return angular.equals(data, angular.fromJson(d)); + return data == d; + }; + + this.toString = function() { + return method + ' ' + url; + }; +} + +function createMockXhr() { + return new MockXhr(); +} + +function MockXhr() { + + // hack for testing $http, $httpBackend + MockXhr.$$lastInstance = this; + + this.open = function(method, url, async) { + this.$$method = method; + this.$$url = url; + this.$$async = async; + this.$$reqHeaders = {}; + this.$$respHeaders = {}; + }; + + this.send = function(data) { + this.$$data = data; + }; + + this.setRequestHeader = function(key, value) { + this.$$reqHeaders[key] = value; + }; + + this.getResponseHeader = function(name) { + // the lookup must be case insensitive, + // that's why we try two quick lookups first and full scan last + var header = this.$$respHeaders[name]; + if (header) return header; + + name = angular.lowercase(name); + header = this.$$respHeaders[name]; + if (header) return header; + + header = undefined; + angular.forEach(this.$$respHeaders, function(headerVal, headerName) { + if (!header && angular.lowercase(headerName) == name) header = headerVal; + }); + return header; + }; + + this.getAllResponseHeaders = function() { + var lines = []; + + angular.forEach(this.$$respHeaders, function(value, key) { + lines.push(key + ': ' + value); + }); + return lines.join('\n'); + }; + + this.abort = angular.noop; +} + + +/** + * @ngdoc service + * @name $timeout + * @description + * + * This service is just a simple decorator for {@link ng.$timeout $timeout} service + * that adds a "flush" and "verifyNoPendingTasks" methods. + */ + +angular.mock.$TimeoutDecorator = function($delegate, $browser) { + + /** + * @ngdoc method + * @name $timeout#flush + * @description + * + * Flushes the queue of pending tasks. + * + * @param {number=} delay maximum timeout amount to flush up until + */ + $delegate.flush = function(delay) { + $browser.defer.flush(delay); + }; + + /** + * @ngdoc method + * @name $timeout#verifyNoPendingTasks + * @description + * + * Verifies that there are no pending tasks that need to be flushed. + */ + $delegate.verifyNoPendingTasks = function() { + if ($browser.deferredFns.length) { + throw new Error('Deferred tasks to flush (' + $browser.deferredFns.length + '): ' + + formatPendingTasksAsString($browser.deferredFns)); + } + }; + + function formatPendingTasksAsString(tasks) { + var result = []; + angular.forEach(tasks, function(task) { + result.push('{id: ' + task.id + ', ' + 'time: ' + task.time + '}'); + }); + + return result.join(', '); + } + + return $delegate; +}; + +angular.mock.$RAFDecorator = function($delegate) { + var queue = []; + var rafFn = function(fn) { + var index = queue.length; + queue.push(fn); + return function() { + queue.splice(index, 1); + }; + }; + + rafFn.supported = $delegate.supported; + + rafFn.flush = function() { + if(queue.length === 0) { + throw new Error('No rAF callbacks present'); + } + + var length = queue.length; + for(var i=0;i'); + }; +}; + +/** + * @ngdoc module + * @name ngMock + * @description + * + * # ngMock + * + * The `ngMock` module providers support to inject and mock Angular services into unit tests. + * In addition, ngMock also extends various core ng services such that they can be + * inspected and controlled in a synchronous manner within test code. + * + * + *
+ * + */ +angular.module('ngMock', ['ng']).provider({ + $browser: angular.mock.$BrowserProvider, + $exceptionHandler: angular.mock.$ExceptionHandlerProvider, + $log: angular.mock.$LogProvider, + $interval: angular.mock.$IntervalProvider, + $httpBackend: angular.mock.$HttpBackendProvider, + $rootElement: angular.mock.$RootElementProvider +}).config(['$provide', function($provide) { + $provide.decorator('$timeout', angular.mock.$TimeoutDecorator); + $provide.decorator('$$rAF', angular.mock.$RAFDecorator); + $provide.decorator('$$asyncCallback', angular.mock.$AsyncCallbackDecorator); +}]); + +/** + * @ngdoc module + * @name ngMockE2E + * @module ngMockE2E + * @description + * + * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing. + * Currently there is only one mock present in this module - + * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock. + */ +angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) { + $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator); +}]); + +/** + * @ngdoc service + * @name $httpBackend + * @module ngMockE2E + * @description + * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of + * applications that use the {@link ng.$http $http service}. + * + * *Note*: For fake http backend implementation suitable for unit testing please see + * {@link ngMock.$httpBackend unit-testing $httpBackend mock}. + * + * This implementation can be used to respond with static or dynamic responses via the `when` api + * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the + * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch + * templates from a webserver). + * + * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application + * is being developed with the real backend api replaced with a mock, it is often desirable for + * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch + * templates or static files from the webserver). To configure the backend with this behavior + * use the `passThrough` request handler of `when` instead of `respond`. + * + * Additionally, we don't want to manually have to flush mocked out requests like we do during unit + * testing. For this reason the e2e $httpBackend automatically flushes mocked out requests + * automatically, closely simulating the behavior of the XMLHttpRequest object. + * + * To setup the application to run with this http backend, you have to create a module that depends + * on the `ngMockE2E` and your application modules and defines the fake backend: + * + * ```js + * myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']); + * myAppDev.run(function($httpBackend) { + * phones = [{name: 'phone1'}, {name: 'phone2'}]; + * + * // returns the current list of phones + * $httpBackend.whenGET('/phones').respond(phones); + * + * // adds a new phone to the phones array + * $httpBackend.whenPOST('/phones').respond(function(method, url, data) { + * var phone = angular.fromJson(data); + * phones.push(phone); + * return [200, phone, {}]; + * }); + * $httpBackend.whenGET(/^\/templates\//).passThrough(); + * //... + * }); + * ``` + * + * Afterwards, bootstrap your app with this new module. + */ + +/** + * @ngdoc method + * @name $httpBackend#when + * @module ngMockE2E + * @description + * Creates a new backend definition. + * + * @param {string} method HTTP method. + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current definition. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + * + * - respond – + * `{function([status,] data[, headers, statusText]) + * | function(function(method, url, data, headers)}` + * – The respond method takes a set of static data to be returned or a function that can return + * an array containing response status (number), response data (string), response headers + * (Object), and the text for the status (string). + * - passThrough – `{function()}` – Any request matching a backend definition with + * `passThrough` handler will be passed through to the real backend (an XHR request will be made + * to the server.) + */ + +/** + * @ngdoc method + * @name $httpBackend#whenGET + * @module ngMockE2E + * @description + * Creates a new backend definition for GET requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenHEAD + * @module ngMockE2E + * @description + * Creates a new backend definition for HEAD requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenDELETE + * @module ngMockE2E + * @description + * Creates a new backend definition for DELETE requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenPOST + * @module ngMockE2E + * @description + * Creates a new backend definition for POST requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenPUT + * @module ngMockE2E + * @description + * Creates a new backend definition for PUT requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenPATCH + * @module ngMockE2E + * @description + * Creates a new backend definition for PATCH requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenJSONP + * @module ngMockE2E + * @description + * Creates a new backend definition for JSONP requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ +angular.mock.e2e = {}; +angular.mock.e2e.$httpBackendDecorator = + ['$rootScope', '$delegate', '$browser', createHttpBackendMock]; + + +angular.mock.clearDataCache = function() { + var key, + cache = angular.element.cache; + + for(key in cache) { + if (Object.prototype.hasOwnProperty.call(cache,key)) { + var handle = cache[key].handle; + + handle && angular.element(handle.elem).off(); + delete cache[key]; + } + } +}; + + +if(window.jasmine || window.mocha) { + + var currentSpec = null, + isSpecRunning = function() { + return !!currentSpec; + }; + + + (window.beforeEach || window.setup)(function() { + currentSpec = this; + }); + + (window.afterEach || window.teardown)(function() { + var injector = currentSpec.$injector; + + currentSpec.$injector = null; + currentSpec.$modules = null; + currentSpec = null; + + if (injector) { + injector.get('$rootElement').off(); + injector.get('$browser').pollFns.length = 0; + } + + angular.mock.clearDataCache(); + + // clean up jquery's fragment cache + angular.forEach(angular.element.fragments, function(val, key) { + delete angular.element.fragments[key]; + }); + + MockXhr.$$lastInstance = null; + + angular.forEach(angular.callbacks, function(val, key) { + delete angular.callbacks[key]; + }); + angular.callbacks.counter = 0; + }); + + /** + * @ngdoc function + * @name angular.mock.module + * @description + * + * *NOTE*: This function is also published on window for easy access.
+ * + * This function registers a module configuration code. It collects the configuration information + * which will be used when the injector is created by {@link angular.mock.inject inject}. + * + * See {@link angular.mock.inject inject} for usage example + * + * @param {...(string|Function|Object)} fns any number of modules which are represented as string + * aliases or as anonymous module initialization functions. The modules are used to + * configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an + * object literal is passed they will be registered as values in the module, the key being + * the module name and the value being what is returned. + */ + window.module = angular.mock.module = function() { + var moduleFns = Array.prototype.slice.call(arguments, 0); + return isSpecRunning() ? workFn() : workFn; + ///////////////////// + function workFn() { + if (currentSpec.$injector) { + throw new Error('Injector already created, can not register a module!'); + } else { + var modules = currentSpec.$modules || (currentSpec.$modules = []); + angular.forEach(moduleFns, function(module) { + if (angular.isObject(module) && !angular.isArray(module)) { + modules.push(function($provide) { + angular.forEach(module, function(value, key) { + $provide.value(key, value); + }); + }); + } else { + modules.push(module); + } + }); + } + } + }; + + /** + * @ngdoc function + * @name angular.mock.inject + * @description + * + * *NOTE*: This function is also published on window for easy access.
+ * + * The inject function wraps a function into an injectable function. The inject() creates new + * instance of {@link auto.$injector $injector} per test, which is then used for + * resolving references. + * + * + * ## Resolving References (Underscore Wrapping) + * Often, we would like to inject a reference once, in a `beforeEach()` block and reuse this + * in multiple `it()` clauses. To be able to do this we must assign the reference to a variable + * that is declared in the scope of the `describe()` block. Since we would, most likely, want + * the variable to have the same name of the reference we have a problem, since the parameter + * to the `inject()` function would hide the outer variable. + * + * To help with this, the injected parameters can, optionally, be enclosed with underscores. + * These are ignored by the injector when the reference name is resolved. + * + * For example, the parameter `_myService_` would be resolved as the reference `myService`. + * Since it is available in the function body as _myService_, we can then assign it to a variable + * defined in an outer scope. + * + * ``` + * // Defined out reference variable outside + * var myService; + * + * // Wrap the parameter in underscores + * beforeEach( inject( function(_myService_){ + * myService = _myService_; + * })); + * + * // Use myService in a series of tests. + * it('makes use of myService', function() { + * myService.doStuff(); + * }); + * + * ``` + * + * See also {@link angular.mock.module angular.mock.module} + * + * ## Example + * Example of what a typical jasmine tests looks like with the inject method. + * ```js + * + * angular.module('myApplicationModule', []) + * .value('mode', 'app') + * .value('version', 'v1.0.1'); + * + * + * describe('MyApp', function() { + * + * // You need to load modules that you want to test, + * // it loads only the "ng" module by default. + * beforeEach(module('myApplicationModule')); + * + * + * // inject() is used to inject arguments of all given functions + * it('should provide a version', inject(function(mode, version) { + * expect(version).toEqual('v1.0.1'); + * expect(mode).toEqual('app'); + * })); + * + * + * // The inject and module method can also be used inside of the it or beforeEach + * it('should override a version and test the new version is injected', function() { + * // module() takes functions or strings (module aliases) + * module(function($provide) { + * $provide.value('version', 'overridden'); // override version here + * }); + * + * inject(function(version) { + * expect(version).toEqual('overridden'); + * }); + * }); + * }); + * + * ``` + * + * @param {...Function} fns any number of functions which will be injected using the injector. + */ + + + + var ErrorAddingDeclarationLocationStack = function(e, errorForStack) { + this.message = e.message; + this.name = e.name; + if (e.line) this.line = e.line; + if (e.sourceId) this.sourceId = e.sourceId; + if (e.stack && errorForStack) + this.stack = e.stack + '\n' + errorForStack.stack; + if (e.stackArray) this.stackArray = e.stackArray; + }; + ErrorAddingDeclarationLocationStack.prototype.toString = Error.prototype.toString; + + window.inject = angular.mock.inject = function() { + var blockFns = Array.prototype.slice.call(arguments, 0); + var errorForStack = new Error('Declaration Location'); + return isSpecRunning() ? workFn.call(currentSpec) : workFn; + ///////////////////// + function workFn() { + var modules = currentSpec.$modules || []; + + modules.unshift('ngMock'); + modules.unshift('ng'); + var injector = currentSpec.$injector; + if (!injector) { + injector = currentSpec.$injector = angular.injector(modules); + } + for(var i = 0, ii = blockFns.length; i < ii; i++) { + try { + /* jshint -W040 *//* Jasmine explicitly provides a `this` object when calling functions */ + injector.invoke(blockFns[i] || angular.noop, this); + /* jshint +W040 */ + } catch (e) { + if (e.stack && errorForStack) { + throw new ErrorAddingDeclarationLocationStack(e, errorForStack); + } + throw e; + } finally { + errorForStack = null; + } + } + } + }; +} + + +})(window, window.angular); diff --git a/1.2.17/angular-resource.js b/1.2.17/angular-resource.js new file mode 100644 index 0000000000..712b32ead0 --- /dev/null +++ b/1.2.17/angular-resource.js @@ -0,0 +1,610 @@ +/** + * @license AngularJS v1.2.17 + * (c) 2010-2014 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular, undefined) {'use strict'; + +var $resourceMinErr = angular.$$minErr('$resource'); + +// Helper functions and regex to lookup a dotted path on an object +// stopping at undefined/null. The path must be composed of ASCII +// identifiers (just like $parse) +var MEMBER_NAME_REGEX = /^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/; + +function isValidDottedPath(path) { + return (path != null && path !== '' && path !== 'hasOwnProperty' && + MEMBER_NAME_REGEX.test('.' + path)); +} + +function lookupDottedPath(obj, path) { + if (!isValidDottedPath(path)) { + throw $resourceMinErr('badmember', 'Dotted member path "@{0}" is invalid.', path); + } + var keys = path.split('.'); + for (var i = 0, ii = keys.length; i < ii && obj !== undefined; i++) { + var key = keys[i]; + obj = (obj !== null) ? obj[key] : undefined; + } + return obj; +} + +/** + * Create a shallow copy of an object and clear other fields from the destination + */ +function shallowClearAndCopy(src, dst) { + dst = dst || {}; + + angular.forEach(dst, function(value, key){ + delete dst[key]; + }); + + for (var key in src) { + if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) { + dst[key] = src[key]; + } + } + + return dst; +} + +/** + * @ngdoc module + * @name ngResource + * @description + * + * # ngResource + * + * The `ngResource` module provides interaction support with RESTful services + * via the $resource service. + * + * + *
+ * + * See {@link ngResource.$resource `$resource`} for usage. + */ + +/** + * @ngdoc service + * @name $resource + * @requires $http + * + * @description + * A factory which creates a resource object that lets you interact with + * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources. + * + * The returned resource object has action methods which provide high-level behaviors without + * the need to interact with the low level {@link ng.$http $http} service. + * + * Requires the {@link ngResource `ngResource`} module to be installed. + * + * @param {string} url A parametrized URL template with parameters prefixed by `:` as in + * `/user/:username`. If you are using a URL with a port number (e.g. + * `http://example.com:8080/api`), it will be respected. + * + * If you are using a url with a suffix, just add the suffix, like this: + * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')` + * or even `$resource('http://example.com/resource/:resource_id.:format')` + * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be + * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you + * can escape it with `/\.`. + * + * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in + * `actions` methods. If any of the parameter value is a function, it will be executed every time + * when a param value needs to be obtained for a request (unless the param was overridden). + * + * Each key value in the parameter object is first bound to url template if present and then any + * excess keys are appended to the url search query after the `?`. + * + * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in + * URL `/path/greet?salutation=Hello`. + * + * If the parameter value is prefixed with `@` then the value of that parameter will be taken + * from the corresponding key on the data object (useful for non-GET operations). + * + * @param {Object.=} actions Hash with declaration of custom action that should extend + * the default set of resource actions. The declaration should be created in the format of {@link + * ng.$http#usage_parameters $http.config}: + * + * {action1: {method:?, params:?, isArray:?, headers:?, ...}, + * action2: {method:?, params:?, isArray:?, headers:?, ...}, + * ...} + * + * Where: + * + * - **`action`** – {string} – The name of action. This name becomes the name of the method on + * your resource object. + * - **`method`** – {string} – HTTP request method. Valid methods are: `GET`, `POST`, `PUT`, + * `DELETE`, and `JSONP`. + * - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of + * the parameter value is a function, it will be executed every time when a param value needs to + * be obtained for a request (unless the param was overridden). + * - **`url`** – {string} – action specific `url` override. The url templating is supported just + * like for the resource-level urls. + * - **`isArray`** – {boolean=} – If true then the returned object for this action is an array, + * see `returns` section. + * - **`transformRequest`** – + * `{function(data, headersGetter)|Array.}` – + * transform function or an array of such functions. The transform function takes the http + * request body and headers and returns its transformed (typically serialized) version. + * - **`transformResponse`** – + * `{function(data, headersGetter)|Array.}` – + * transform function or an array of such functions. The transform function takes the http + * response body and headers and returns its transformed (typically deserialized) version. + * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the + * GET request, otherwise if a cache instance built with + * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for + * caching. + * - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that + * should abort the request when resolved. + * - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the + * XHR object. See + * [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5) + * for more information. + * - **`responseType`** - `{string}` - see + * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType). + * - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods - + * `response` and `responseError`. Both `response` and `responseError` interceptors get called + * with `http response` object. See {@link ng.$http $http interceptors}. + * + * @returns {Object} A resource "class" object with methods for the default set of resource actions + * optionally extended with custom `actions`. The default set contains these actions: + * ```js + * { 'get': {method:'GET'}, + * 'save': {method:'POST'}, + * 'query': {method:'GET', isArray:true}, + * 'remove': {method:'DELETE'}, + * 'delete': {method:'DELETE'} }; + * ``` + * + * Calling these methods invoke an {@link ng.$http} with the specified http method, + * destination and parameters. When the data is returned from the server then the object is an + * instance of the resource class. The actions `save`, `remove` and `delete` are available on it + * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create, + * read, update, delete) on server-side data like this: + * ```js + * var User = $resource('/user/:userId', {userId:'@id'}); + * var user = User.get({userId:123}, function() { + * user.abc = true; + * user.$save(); + * }); + * ``` + * + * It is important to realize that invoking a $resource object method immediately returns an + * empty reference (object or array depending on `isArray`). Once the data is returned from the + * server the existing reference is populated with the actual data. This is a useful trick since + * usually the resource is assigned to a model which is then rendered by the view. Having an empty + * object results in no rendering, once the data arrives from the server then the object is + * populated with the data and the view automatically re-renders itself showing the new data. This + * means that in most cases one never has to write a callback function for the action methods. + * + * The action methods on the class object or instance object can be invoked with the following + * parameters: + * + * - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])` + * - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])` + * - non-GET instance actions: `instance.$action([parameters], [success], [error])` + * + * Success callback is called with (value, responseHeaders) arguments. Error callback is called + * with (httpResponse) argument. + * + * Class actions return empty instance (with additional properties below). + * Instance actions return promise of the action. + * + * The Resource instances and collection have these additional properties: + * + * - `$promise`: the {@link ng.$q promise} of the original server interaction that created this + * instance or collection. + * + * On success, the promise is resolved with the same resource instance or collection object, + * updated with data from server. This makes it easy to use in + * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view + * rendering until the resource(s) are loaded. + * + * On failure, the promise is resolved with the {@link ng.$http http response} object, without + * the `resource` property. + * + * If an interceptor object was provided, the promise will instead be resolved with the value + * returned by the interceptor. + * + * - `$resolved`: `true` after first server interaction is completed (either with success or + * rejection), `false` before that. Knowing if the Resource has been resolved is useful in + * data-binding. + * + * @example + * + * # Credit card resource + * + * ```js + // Define CreditCard class + var CreditCard = $resource('/user/:userId/card/:cardId', + {userId:123, cardId:'@id'}, { + charge: {method:'POST', params:{charge:true}} + }); + + // We can retrieve a collection from the server + var cards = CreditCard.query(function() { + // GET: /user/123/card + // server returns: [ {id:456, number:'1234', name:'Smith'} ]; + + var card = cards[0]; + // each item is an instance of CreditCard + expect(card instanceof CreditCard).toEqual(true); + card.name = "J. Smith"; + // non GET methods are mapped onto the instances + card.$save(); + // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'} + // server returns: {id:456, number:'1234', name: 'J. Smith'}; + + // our custom method is mapped as well. + card.$charge({amount:9.99}); + // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'} + }); + + // we can create an instance as well + var newCard = new CreditCard({number:'0123'}); + newCard.name = "Mike Smith"; + newCard.$save(); + // POST: /user/123/card {number:'0123', name:'Mike Smith'} + // server returns: {id:789, number:'0123', name: 'Mike Smith'}; + expect(newCard.id).toEqual(789); + * ``` + * + * The object returned from this function execution is a resource "class" which has "static" method + * for each action in the definition. + * + * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and + * `headers`. + * When the data is returned from the server then the object is an instance of the resource type and + * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD + * operations (create, read, update, delete) on server-side data. + + ```js + var User = $resource('/user/:userId', {userId:'@id'}); + User.get({userId:123}, function(user) { + user.abc = true; + user.$save(); + }); + ``` + * + * It's worth noting that the success callback for `get`, `query` and other methods gets passed + * in the response that came from the server as well as $http header getter function, so one + * could rewrite the above example and get access to http headers as: + * + ```js + var User = $resource('/user/:userId', {userId:'@id'}); + User.get({userId:123}, function(u, getResponseHeaders){ + u.abc = true; + u.$save(function(u, putResponseHeaders) { + //u => saved user object + //putResponseHeaders => $http header getter + }); + }); + ``` + * + * You can also access the raw `$http` promise via the `$promise` property on the object returned + * + ``` + var User = $resource('/user/:userId', {userId:'@id'}); + User.get({userId:123}) + .$promise.then(function(user) { + $scope.user = user; + }); + ``` + + * # Creating a custom 'PUT' request + * In this example we create a custom method on our resource to make a PUT request + * ```js + * var app = angular.module('app', ['ngResource', 'ngRoute']); + * + * // Some APIs expect a PUT request in the format URL/object/ID + * // Here we are creating an 'update' method + * app.factory('Notes', ['$resource', function($resource) { + * return $resource('/notes/:id', null, + * { + * 'update': { method:'PUT' } + * }); + * }]); + * + * // In our controller we get the ID from the URL using ngRoute and $routeParams + * // We pass in $routeParams and our Notes factory along with $scope + * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes', + function($scope, $routeParams, Notes) { + * // First get a note object from the factory + * var note = Notes.get({ id:$routeParams.id }); + * $id = note.id; + * + * // Now call update passing in the ID first then the object you are updating + * Notes.update({ id:$id }, note); + * + * // This will PUT /notes/ID with the note object in the request payload + * }]); + * ``` + */ +angular.module('ngResource', ['ng']). + factory('$resource', ['$http', '$q', function($http, $q) { + + var DEFAULT_ACTIONS = { + 'get': {method:'GET'}, + 'save': {method:'POST'}, + 'query': {method:'GET', isArray:true}, + 'remove': {method:'DELETE'}, + 'delete': {method:'DELETE'} + }; + var noop = angular.noop, + forEach = angular.forEach, + extend = angular.extend, + copy = angular.copy, + isFunction = angular.isFunction; + + /** + * We need our custom method because encodeURIComponent is too aggressive and doesn't follow + * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path + * segments: + * segment = *pchar + * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + * pct-encoded = "%" HEXDIG HEXDIG + * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" + * / "*" / "+" / "," / ";" / "=" + */ + function encodeUriSegment(val) { + return encodeUriQuery(val, true). + replace(/%26/gi, '&'). + replace(/%3D/gi, '='). + replace(/%2B/gi, '+'); + } + + + /** + * This method is intended for encoding *key* or *value* parts of query component. We need a + * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't + * have to be encoded per http://tools.ietf.org/html/rfc3986: + * query = *( pchar / "/" / "?" ) + * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * pct-encoded = "%" HEXDIG HEXDIG + * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" + * / "*" / "+" / "," / ";" / "=" + */ + function encodeUriQuery(val, pctEncodeSpaces) { + return encodeURIComponent(val). + replace(/%40/gi, '@'). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, (pctEncodeSpaces ? '%20' : '+')); + } + + function Route(template, defaults) { + this.template = template; + this.defaults = defaults || {}; + this.urlParams = {}; + } + + Route.prototype = { + setUrlParams: function(config, params, actionUrl) { + var self = this, + url = actionUrl || self.template, + val, + encodedVal; + + var urlParams = self.urlParams = {}; + forEach(url.split(/\W/), function(param){ + if (param === 'hasOwnProperty') { + throw $resourceMinErr('badname', "hasOwnProperty is not a valid parameter name."); + } + if (!(new RegExp("^\\d+$").test(param)) && param && + (new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) { + urlParams[param] = true; + } + }); + url = url.replace(/\\:/g, ':'); + + params = params || {}; + forEach(self.urlParams, function(_, urlParam){ + val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam]; + if (angular.isDefined(val) && val !== null) { + encodedVal = encodeUriSegment(val); + url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), function(match, p1) { + return encodedVal + p1; + }); + } else { + url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function(match, + leadingSlashes, tail) { + if (tail.charAt(0) == '/') { + return tail; + } else { + return leadingSlashes + tail; + } + }); + } + }); + + // strip trailing slashes and set the url + url = url.replace(/\/+$/, '') || '/'; + // then replace collapse `/.` if found in the last URL path segment before the query + // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x` + url = url.replace(/\/\.(?=\w+($|\?))/, '.'); + // replace escaped `/\.` with `/.` + config.url = url.replace(/\/\\\./, '/.'); + + + // set params - delegate param encoding to $http + forEach(params, function(value, key){ + if (!self.urlParams[key]) { + config.params = config.params || {}; + config.params[key] = value; + } + }); + } + }; + + + function resourceFactory(url, paramDefaults, actions) { + var route = new Route(url); + + actions = extend({}, DEFAULT_ACTIONS, actions); + + function extractParams(data, actionParams){ + var ids = {}; + actionParams = extend({}, paramDefaults, actionParams); + forEach(actionParams, function(value, key){ + if (isFunction(value)) { value = value(); } + ids[key] = value && value.charAt && value.charAt(0) == '@' ? + lookupDottedPath(data, value.substr(1)) : value; + }); + return ids; + } + + function defaultResponseInterceptor(response) { + return response.resource; + } + + function Resource(value){ + shallowClearAndCopy(value || {}, this); + } + + forEach(actions, function(action, name) { + var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method); + + Resource[name] = function(a1, a2, a3, a4) { + var params = {}, data, success, error; + + /* jshint -W086 */ /* (purposefully fall through case statements) */ + switch(arguments.length) { + case 4: + error = a4; + success = a3; + //fallthrough + case 3: + case 2: + if (isFunction(a2)) { + if (isFunction(a1)) { + success = a1; + error = a2; + break; + } + + success = a2; + error = a3; + //fallthrough + } else { + params = a1; + data = a2; + success = a3; + break; + } + case 1: + if (isFunction(a1)) success = a1; + else if (hasBody) data = a1; + else params = a1; + break; + case 0: break; + default: + throw $resourceMinErr('badargs', + "Expected up to 4 arguments [params, data, success, error], got {0} arguments", + arguments.length); + } + /* jshint +W086 */ /* (purposefully fall through case statements) */ + + var isInstanceCall = this instanceof Resource; + var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data)); + var httpConfig = {}; + var responseInterceptor = action.interceptor && action.interceptor.response || + defaultResponseInterceptor; + var responseErrorInterceptor = action.interceptor && action.interceptor.responseError || + undefined; + + forEach(action, function(value, key) { + if (key != 'params' && key != 'isArray' && key != 'interceptor') { + httpConfig[key] = copy(value); + } + }); + + if (hasBody) httpConfig.data = data; + route.setUrlParams(httpConfig, + extend({}, extractParams(data, action.params || {}), params), + action.url); + + var promise = $http(httpConfig).then(function(response) { + var data = response.data, + promise = value.$promise; + + if (data) { + // Need to convert action.isArray to boolean in case it is undefined + // jshint -W018 + if (angular.isArray(data) !== (!!action.isArray)) { + throw $resourceMinErr('badcfg', 'Error in resource configuration. Expected ' + + 'response to contain an {0} but got an {1}', + action.isArray?'array':'object', angular.isArray(data)?'array':'object'); + } + // jshint +W018 + if (action.isArray) { + value.length = 0; + forEach(data, function(item) { + value.push(new Resource(item)); + }); + } else { + shallowClearAndCopy(data, value); + value.$promise = promise; + } + } + + value.$resolved = true; + + response.resource = value; + + return response; + }, function(response) { + value.$resolved = true; + + (error||noop)(response); + + return $q.reject(response); + }); + + promise = promise.then( + function(response) { + var value = responseInterceptor(response); + (success||noop)(value, response.headers); + return value; + }, + responseErrorInterceptor); + + if (!isInstanceCall) { + // we are creating instance / collection + // - set the initial promise + // - return the instance / collection + value.$promise = promise; + value.$resolved = false; + + return value; + } + + // instance call + return promise; + }; + + + Resource.prototype['$' + name] = function(params, success, error) { + if (isFunction(params)) { + error = success; success = params; params = {}; + } + var result = Resource[name].call(this, params, this, success, error); + return result.$promise || result; + }; + }); + + Resource.bind = function(additionalParamDefaults){ + return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions); + }; + + return Resource; + } + + return resourceFactory; + }]); + + +})(window, window.angular); diff --git a/1.2.17/angular-resource.min.js b/1.2.17/angular-resource.min.js new file mode 100644 index 0000000000..badd75458c --- /dev/null +++ b/1.2.17/angular-resource.min.js @@ -0,0 +1,13 @@ +/* + AngularJS v1.2.17 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(H,a,A){'use strict';function D(p,g){g=g||{};a.forEach(g,function(a,c){delete g[c]});for(var c in p)!p.hasOwnProperty(c)||"$"===c.charAt(0)&&"$"===c.charAt(1)||(g[c]=p[c]);return g}var v=a.$$minErr("$resource"),C=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;a.module("ngResource",["ng"]).factory("$resource",["$http","$q",function(p,g){function c(a,c){this.template=a;this.defaults=c||{};this.urlParams={}}function t(n,w,l){function r(h,d){var e={};d=x({},w,d);s(d,function(b,d){u(b)&&(b=b());var k;if(b&& +b.charAt&&"@"==b.charAt(0)){k=h;var a=b.substr(1);if(null==a||""===a||"hasOwnProperty"===a||!C.test("."+a))throw v("badmember",a);for(var a=a.split("."),f=0,c=a.length;f + */ + /* global -ngRouteModule */ +var ngRouteModule = angular.module('ngRoute', ['ng']). + provider('$route', $RouteProvider); + +/** + * @ngdoc provider + * @name $routeProvider + * @kind function + * + * @description + * + * Used for configuring routes. + * + * ## Example + * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`. + * + * ## Dependencies + * Requires the {@link ngRoute `ngRoute`} module to be installed. + */ +function $RouteProvider(){ + function inherit(parent, extra) { + return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra); + } + + var routes = {}; + + /** + * @ngdoc method + * @name $routeProvider#when + * + * @param {string} path Route path (matched against `$location.path`). If `$location.path` + * contains redundant trailing slash or is missing one, the route will still match and the + * `$location.path` will be updated to add or drop the trailing slash to exactly match the + * route definition. + * + * * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up + * to the next slash are matched and stored in `$routeParams` under the given `name` + * when the route matches. + * * `path` can contain named groups starting with a colon and ending with a star: + * e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name` + * when the route matches. + * * `path` can contain optional named groups with a question mark: e.g.`:name?`. + * + * For example, routes like `/color/:color/largecode/:largecode*\/edit` will match + * `/color/brown/largecode/code/with/slashes/edit` and extract: + * + * * `color: brown` + * * `largecode: code/with/slashes`. + * + * + * @param {Object} route Mapping information to be assigned to `$route.current` on route + * match. + * + * Object properties: + * + * - `controller` – `{(string|function()=}` – Controller fn that should be associated with + * newly created scope or the name of a {@link angular.Module#controller registered + * controller} if passed as a string. + * - `controllerAs` – `{string=}` – A controller alias name. If present the controller will be + * published to scope under the `controllerAs` name. + * - `template` – `{string=|function()=}` – html template as a string or a function that + * returns an html template as a string which should be used by {@link + * ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives. + * This property takes precedence over `templateUrl`. + * + * If `template` is a function, it will be called with the following parameters: + * + * - `{Array.}` - route parameters extracted from the current + * `$location.path()` by applying the current route + * + * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html + * template that should be used by {@link ngRoute.directive:ngView ngView}. + * + * If `templateUrl` is a function, it will be called with the following parameters: + * + * - `{Array.}` - route parameters extracted from the current + * `$location.path()` by applying the current route + * + * - `resolve` - `{Object.=}` - An optional map of dependencies which should + * be injected into the controller. If any of these dependencies are promises, the router + * will wait for them all to be resolved or one to be rejected before the controller is + * instantiated. + * If all the promises are resolved successfully, the values of the resolved promises are + * injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is + * fired. If any of the promises are rejected the + * {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. The map object + * is: + * + * - `key` – `{string}`: a name of a dependency to be injected into the controller. + * - `factory` - `{string|function}`: If `string` then it is an alias for a service. + * Otherwise if function, then it is {@link auto.$injector#invoke injected} + * and the return value is treated as the dependency. If the result is a promise, it is + * resolved before its value is injected into the controller. Be aware that + * `ngRoute.$routeParams` will still refer to the previous route within these resolve + * functions. Use `$route.current.params` to access the new route parameters, instead. + * + * - `redirectTo` – {(string|function())=} – value to update + * {@link ng.$location $location} path with and trigger route redirection. + * + * If `redirectTo` is a function, it will be called with the following parameters: + * + * - `{Object.}` - route parameters extracted from the current + * `$location.path()` by applying the current route templateUrl. + * - `{string}` - current `$location.path()` + * - `{Object}` - current `$location.search()` + * + * The custom `redirectTo` function is expected to return a string which will be used + * to update `$location.path()` and `$location.search()`. + * + * - `[reloadOnSearch=true]` - {boolean=} - reload route when only `$location.search()` + * or `$location.hash()` changes. + * + * If the option is set to `false` and url in the browser changes, then + * `$routeUpdate` event is broadcasted on the root scope. + * + * - `[caseInsensitiveMatch=false]` - {boolean=} - match routes without being case sensitive + * + * If the option is set to `true`, then the particular route can be matched without being + * case sensitive + * + * @returns {Object} self + * + * @description + * Adds a new route definition to the `$route` service. + */ + this.when = function(path, route) { + routes[path] = angular.extend( + {reloadOnSearch: true}, + route, + path && pathRegExp(path, route) + ); + + // create redirection for trailing slashes + if (path) { + var redirectPath = (path[path.length-1] == '/') + ? path.substr(0, path.length-1) + : path +'/'; + + routes[redirectPath] = angular.extend( + {redirectTo: path}, + pathRegExp(redirectPath, route) + ); + } + + return this; + }; + + /** + * @param path {string} path + * @param opts {Object} options + * @return {?Object} + * + * @description + * Normalizes the given path, returning a regular expression + * and the original path. + * + * Inspired by pathRexp in visionmedia/express/lib/utils.js. + */ + function pathRegExp(path, opts) { + var insensitive = opts.caseInsensitiveMatch, + ret = { + originalPath: path, + regexp: path + }, + keys = ret.keys = []; + + path = path + .replace(/([().])/g, '\\$1') + .replace(/(\/)?:(\w+)([\?\*])?/g, function(_, slash, key, option){ + var optional = option === '?' ? option : null; + var star = option === '*' ? option : null; + keys.push({ name: key, optional: !!optional }); + slash = slash || ''; + return '' + + (optional ? '' : slash) + + '(?:' + + (optional ? slash : '') + + (star && '(.+?)' || '([^/]+)') + + (optional || '') + + ')' + + (optional || ''); + }) + .replace(/([\/$\*])/g, '\\$1'); + + ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : ''); + return ret; + } + + /** + * @ngdoc method + * @name $routeProvider#otherwise + * + * @description + * Sets route definition that will be used on route change when no other route definition + * is matched. + * + * @param {Object} params Mapping information to be assigned to `$route.current`. + * @returns {Object} self + */ + this.otherwise = function(params) { + this.when(null, params); + return this; + }; + + + this.$get = ['$rootScope', + '$location', + '$routeParams', + '$q', + '$injector', + '$http', + '$templateCache', + '$sce', + function($rootScope, $location, $routeParams, $q, $injector, $http, $templateCache, $sce) { + + /** + * @ngdoc service + * @name $route + * @requires $location + * @requires $routeParams + * + * @property {Object} current Reference to the current route definition. + * The route definition contains: + * + * - `controller`: The controller constructor as define in route definition. + * - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for + * controller instantiation. The `locals` contain + * the resolved values of the `resolve` map. Additionally the `locals` also contain: + * + * - `$scope` - The current route scope. + * - `$template` - The current route template HTML. + * + * @property {Object} routes Object with all route configuration Objects as its properties. + * + * @description + * `$route` is used for deep-linking URLs to controllers and views (HTML partials). + * It watches `$location.url()` and tries to map the path to an existing route definition. + * + * Requires the {@link ngRoute `ngRoute`} module to be installed. + * + * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API. + * + * The `$route` service is typically used in conjunction with the + * {@link ngRoute.directive:ngView `ngView`} directive and the + * {@link ngRoute.$routeParams `$routeParams`} service. + * + * @example + * This example shows how changing the URL hash causes the `$route` to match a route against the + * URL, and the `ngView` pulls in the partial. + * + * Note that this example is using {@link ng.directive:script inlined templates} + * to get it working on jsfiddle as well. + * + * + * + *
+ * Choose: + * Moby | + * Moby: Ch1 | + * Gatsby | + * Gatsby: Ch4 | + * Scarlet Letter
+ * + *
+ * + *
+ * + *
$location.path() = {{$location.path()}}
+ *
$route.current.templateUrl = {{$route.current.templateUrl}}
+ *
$route.current.params = {{$route.current.params}}
+ *
$route.current.scope.name = {{$route.current.scope.name}}
+ *
$routeParams = {{$routeParams}}
+ *
+ *
+ * + * + * controller: {{name}}
+ * Book Id: {{params.bookId}}
+ *
+ * + * + * controller: {{name}}
+ * Book Id: {{params.bookId}}
+ * Chapter Id: {{params.chapterId}} + *
+ * + * + * angular.module('ngRouteExample', ['ngRoute']) + * + * .controller('MainController', function($scope, $route, $routeParams, $location) { + * $scope.$route = $route; + * $scope.$location = $location; + * $scope.$routeParams = $routeParams; + * }) + * + * .controller('BookController', function($scope, $routeParams) { + * $scope.name = "BookController"; + * $scope.params = $routeParams; + * }) + * + * .controller('ChapterController', function($scope, $routeParams) { + * $scope.name = "ChapterController"; + * $scope.params = $routeParams; + * }) + * + * .config(function($routeProvider, $locationProvider) { + * $routeProvider + * .when('/Book/:bookId', { + * templateUrl: 'book.html', + * controller: 'BookController', + * resolve: { + * // I will cause a 1 second delay + * delay: function($q, $timeout) { + * var delay = $q.defer(); + * $timeout(delay.resolve, 1000); + * return delay.promise; + * } + * } + * }) + * .when('/Book/:bookId/ch/:chapterId', { + * templateUrl: 'chapter.html', + * controller: 'ChapterController' + * }); + * + * // configure html5 to get links working on jsfiddle + * $locationProvider.html5Mode(true); + * }); + * + * + * + * + * it('should load and compile correct template', function() { + * element(by.linkText('Moby: Ch1')).click(); + * var content = element(by.css('[ng-view]')).getText(); + * expect(content).toMatch(/controller\: ChapterController/); + * expect(content).toMatch(/Book Id\: Moby/); + * expect(content).toMatch(/Chapter Id\: 1/); + * + * element(by.partialLinkText('Scarlet')).click(); + * + * content = element(by.css('[ng-view]')).getText(); + * expect(content).toMatch(/controller\: BookController/); + * expect(content).toMatch(/Book Id\: Scarlet/); + * }); + * + *
+ */ + + /** + * @ngdoc event + * @name $route#$routeChangeStart + * @eventType broadcast on root scope + * @description + * Broadcasted before a route change. At this point the route services starts + * resolving all of the dependencies needed for the route change to occur. + * Typically this involves fetching the view template as well as any dependencies + * defined in `resolve` route property. Once all of the dependencies are resolved + * `$routeChangeSuccess` is fired. + * + * @param {Object} angularEvent Synthetic event object. + * @param {Route} next Future route information. + * @param {Route} current Current route information. + */ + + /** + * @ngdoc event + * @name $route#$routeChangeSuccess + * @eventType broadcast on root scope + * @description + * Broadcasted after a route dependencies are resolved. + * {@link ngRoute.directive:ngView ngView} listens for the directive + * to instantiate the controller and render the view. + * + * @param {Object} angularEvent Synthetic event object. + * @param {Route} current Current route information. + * @param {Route|Undefined} previous Previous route information, or undefined if current is + * first route entered. + */ + + /** + * @ngdoc event + * @name $route#$routeChangeError + * @eventType broadcast on root scope + * @description + * Broadcasted if any of the resolve promises are rejected. + * + * @param {Object} angularEvent Synthetic event object + * @param {Route} current Current route information. + * @param {Route} previous Previous route information. + * @param {Route} rejection Rejection of the promise. Usually the error of the failed promise. + */ + + /** + * @ngdoc event + * @name $route#$routeUpdate + * @eventType broadcast on root scope + * @description + * + * The `reloadOnSearch` property has been set to false, and we are reusing the same + * instance of the Controller. + */ + + var forceReload = false, + $route = { + routes: routes, + + /** + * @ngdoc method + * @name $route#reload + * + * @description + * Causes `$route` service to reload the current route even if + * {@link ng.$location $location} hasn't changed. + * + * As a result of that, {@link ngRoute.directive:ngView ngView} + * creates new scope, reinstantiates the controller. + */ + reload: function() { + forceReload = true; + $rootScope.$evalAsync(updateRoute); + } + }; + + $rootScope.$on('$locationChangeSuccess', updateRoute); + + return $route; + + ///////////////////////////////////////////////////// + + /** + * @param on {string} current url + * @param route {Object} route regexp to match the url against + * @return {?Object} + * + * @description + * Check if the route matches the current url. + * + * Inspired by match in + * visionmedia/express/lib/router/router.js. + */ + function switchRouteMatcher(on, route) { + var keys = route.keys, + params = {}; + + if (!route.regexp) return null; + + var m = route.regexp.exec(on); + if (!m) return null; + + for (var i = 1, len = m.length; i < len; ++i) { + var key = keys[i - 1]; + + var val = 'string' == typeof m[i] + ? decodeURIComponent(m[i]) + : m[i]; + + if (key && val) { + params[key.name] = val; + } + } + return params; + } + + function updateRoute() { + var next = parseRoute(), + last = $route.current; + + if (next && last && next.$$route === last.$$route + && angular.equals(next.pathParams, last.pathParams) + && !next.reloadOnSearch && !forceReload) { + last.params = next.params; + angular.copy(last.params, $routeParams); + $rootScope.$broadcast('$routeUpdate', last); + } else if (next || last) { + forceReload = false; + $rootScope.$broadcast('$routeChangeStart', next, last); + $route.current = next; + if (next) { + if (next.redirectTo) { + if (angular.isString(next.redirectTo)) { + $location.path(interpolate(next.redirectTo, next.params)).search(next.params) + .replace(); + } else { + $location.url(next.redirectTo(next.pathParams, $location.path(), $location.search())) + .replace(); + } + } + } + + $q.when(next). + then(function() { + if (next) { + var locals = angular.extend({}, next.resolve), + template, templateUrl; + + angular.forEach(locals, function(value, key) { + locals[key] = angular.isString(value) ? + $injector.get(value) : $injector.invoke(value); + }); + + if (angular.isDefined(template = next.template)) { + if (angular.isFunction(template)) { + template = template(next.params); + } + } else if (angular.isDefined(templateUrl = next.templateUrl)) { + if (angular.isFunction(templateUrl)) { + templateUrl = templateUrl(next.params); + } + templateUrl = $sce.getTrustedResourceUrl(templateUrl); + if (angular.isDefined(templateUrl)) { + next.loadedTemplateUrl = templateUrl; + template = $http.get(templateUrl, {cache: $templateCache}). + then(function(response) { return response.data; }); + } + } + if (angular.isDefined(template)) { + locals['$template'] = template; + } + return $q.all(locals); + } + }). + // after route change + then(function(locals) { + if (next == $route.current) { + if (next) { + next.locals = locals; + angular.copy(next.params, $routeParams); + } + $rootScope.$broadcast('$routeChangeSuccess', next, last); + } + }, function(error) { + if (next == $route.current) { + $rootScope.$broadcast('$routeChangeError', next, last, error); + } + }); + } + } + + + /** + * @returns {Object} the current active route, by matching it against the URL + */ + function parseRoute() { + // Match a route + var params, match; + angular.forEach(routes, function(route, path) { + if (!match && (params = switchRouteMatcher($location.path(), route))) { + match = inherit(route, { + params: angular.extend({}, $location.search(), params), + pathParams: params}); + match.$$route = route; + } + }); + // No route matched; fallback to "otherwise" route + return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}}); + } + + /** + * @returns {string} interpolation of the redirect path with the parameters + */ + function interpolate(string, params) { + var result = []; + angular.forEach((string||'').split(':'), function(segment, i) { + if (i === 0) { + result.push(segment); + } else { + var segmentMatch = segment.match(/(\w+)(.*)/); + var key = segmentMatch[1]; + result.push(params[key]); + result.push(segmentMatch[2] || ''); + delete params[key]; + } + }); + return result.join(''); + } + }]; +} + +ngRouteModule.provider('$routeParams', $RouteParamsProvider); + + +/** + * @ngdoc service + * @name $routeParams + * @requires $route + * + * @description + * The `$routeParams` service allows you to retrieve the current set of route parameters. + * + * Requires the {@link ngRoute `ngRoute`} module to be installed. + * + * The route parameters are a combination of {@link ng.$location `$location`}'s + * {@link ng.$location#search `search()`} and {@link ng.$location#path `path()`}. + * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched. + * + * In case of parameter name collision, `path` params take precedence over `search` params. + * + * The service guarantees that the identity of the `$routeParams` object will remain unchanged + * (but its properties will likely change) even when a route change occurs. + * + * Note that the `$routeParams` are only updated *after* a route change completes successfully. + * This means that you cannot rely on `$routeParams` being correct in route resolve functions. + * Instead you can use `$route.current.params` to access the new route's parameters. + * + * @example + * ```js + * // Given: + * // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby + * // Route: /Chapter/:chapterId/Section/:sectionId + * // + * // Then + * $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'} + * ``` + */ +function $RouteParamsProvider() { + this.$get = function() { return {}; }; +} + +ngRouteModule.directive('ngView', ngViewFactory); +ngRouteModule.directive('ngView', ngViewFillContentFactory); + + +/** + * @ngdoc directive + * @name ngView + * @restrict ECA + * + * @description + * # Overview + * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by + * including the rendered template of the current route into the main layout (`index.html`) file. + * Every time the current route changes, the included view changes with it according to the + * configuration of the `$route` service. + * + * Requires the {@link ngRoute `ngRoute`} module to be installed. + * + * @animations + * enter - animation is used to bring new content into the browser. + * leave - animation is used to animate existing content away. + * + * The enter and leave animation occur concurrently. + * + * @scope + * @priority 400 + * @param {string=} onload Expression to evaluate whenever the view updates. + * + * @param {string=} autoscroll Whether `ngView` should call {@link ng.$anchorScroll + * $anchorScroll} to scroll the viewport after the view is updated. + * + * - If the attribute is not set, disable scrolling. + * - If the attribute is set without value, enable scrolling. + * - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated + * as an expression yields a truthy value. + * @example + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+
+
+
+ +
$location.path() = {{main.$location.path()}}
+
$route.current.templateUrl = {{main.$route.current.templateUrl}}
+
$route.current.params = {{main.$route.current.params}}
+
$route.current.scope.name = {{main.$route.current.scope.name}}
+
$routeParams = {{main.$routeParams}}
+
+
+ + +
+ controller: {{book.name}}
+ Book Id: {{book.params.bookId}}
+
+
+ + +
+ controller: {{chapter.name}}
+ Book Id: {{chapter.params.bookId}}
+ Chapter Id: {{chapter.params.chapterId}} +
+
+ + + .view-animate-container { + position:relative; + height:100px!important; + position:relative; + background:white; + border:1px solid black; + height:40px; + overflow:hidden; + } + + .view-animate { + padding:10px; + } + + .view-animate.ng-enter, .view-animate.ng-leave { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; + + display:block; + width:100%; + border-left:1px solid black; + + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + padding:10px; + } + + .view-animate.ng-enter { + left:100%; + } + .view-animate.ng-enter.ng-enter-active { + left:0; + } + .view-animate.ng-leave.ng-leave-active { + left:-100%; + } + + + + angular.module('ngViewExample', ['ngRoute', 'ngAnimate']) + .config(['$routeProvider', '$locationProvider', + function($routeProvider, $locationProvider) { + $routeProvider + .when('/Book/:bookId', { + templateUrl: 'book.html', + controller: 'BookCtrl', + controllerAs: 'book' + }) + .when('/Book/:bookId/ch/:chapterId', { + templateUrl: 'chapter.html', + controller: 'ChapterCtrl', + controllerAs: 'chapter' + }); + + // configure html5 to get links working on jsfiddle + $locationProvider.html5Mode(true); + }]) + .controller('MainCtrl', ['$route', '$routeParams', '$location', + function($route, $routeParams, $location) { + this.$route = $route; + this.$location = $location; + this.$routeParams = $routeParams; + }]) + .controller('BookCtrl', ['$routeParams', function($routeParams) { + this.name = "BookCtrl"; + this.params = $routeParams; + }]) + .controller('ChapterCtrl', ['$routeParams', function($routeParams) { + this.name = "ChapterCtrl"; + this.params = $routeParams; + }]); + + + + + it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller\: ChapterCtrl/); + expect(content).toMatch(/Book Id\: Moby/); + expect(content).toMatch(/Chapter Id\: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller\: BookCtrl/); + expect(content).toMatch(/Book Id\: Scarlet/); + }); + +
+ */ + + +/** + * @ngdoc event + * @name ngView#$viewContentLoaded + * @eventType emit on the current ngView scope + * @description + * Emitted every time the ngView content is reloaded. + */ +ngViewFactory.$inject = ['$route', '$anchorScroll', '$animate']; +function ngViewFactory( $route, $anchorScroll, $animate) { + return { + restrict: 'ECA', + terminal: true, + priority: 400, + transclude: 'element', + link: function(scope, $element, attr, ctrl, $transclude) { + var currentScope, + currentElement, + previousElement, + autoScrollExp = attr.autoscroll, + onloadExp = attr.onload || ''; + + scope.$on('$routeChangeSuccess', update); + update(); + + function cleanupLastView() { + if(previousElement) { + previousElement.remove(); + previousElement = null; + } + if(currentScope) { + currentScope.$destroy(); + currentScope = null; + } + if(currentElement) { + $animate.leave(currentElement, function() { + previousElement = null; + }); + previousElement = currentElement; + currentElement = null; + } + } + + function update() { + var locals = $route.current && $route.current.locals, + template = locals && locals.$template; + + if (angular.isDefined(template)) { + var newScope = scope.$new(); + var current = $route.current; + + // Note: This will also link all children of ng-view that were contained in the original + // html. If that content contains controllers, ... they could pollute/change the scope. + // However, using ng-view on an element with additional content does not make sense... + // Note: We can't remove them in the cloneAttchFn of $transclude as that + // function is called before linking the content, which would apply child + // directives to non existing elements. + var clone = $transclude(newScope, function(clone) { + $animate.enter(clone, null, currentElement || $element, function onNgViewEnter () { + if (angular.isDefined(autoScrollExp) + && (!autoScrollExp || scope.$eval(autoScrollExp))) { + $anchorScroll(); + } + }); + cleanupLastView(); + }); + + currentElement = clone; + currentScope = current.scope = newScope; + currentScope.$emit('$viewContentLoaded'); + currentScope.$eval(onloadExp); + } else { + cleanupLastView(); + } + } + } + }; +} + +// This directive is called during the $transclude call of the first `ngView` directive. +// It will replace and compile the content of the element with the loaded template. +// We need this directive so that the element content is already filled when +// the link function of another directive on the same element as ngView +// is called. +ngViewFillContentFactory.$inject = ['$compile', '$controller', '$route']; +function ngViewFillContentFactory($compile, $controller, $route) { + return { + restrict: 'ECA', + priority: -400, + link: function(scope, $element) { + var current = $route.current, + locals = current.locals; + + $element.html(locals.$template); + + var link = $compile($element.contents()); + + if (current.controller) { + locals.$scope = scope; + var controller = $controller(current.controller, locals); + if (current.controllerAs) { + scope[current.controllerAs] = controller; + } + $element.data('$ngControllerController', controller); + $element.children().data('$ngControllerController', controller); + } + + link(scope); + } + }; +} + + +})(window, window.angular); diff --git a/1.2.17/angular-route.min.js b/1.2.17/angular-route.min.js new file mode 100644 index 0000000000..bf7ff1a0e3 --- /dev/null +++ b/1.2.17/angular-route.min.js @@ -0,0 +1,14 @@ +/* + AngularJS v1.2.17 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(n,e,A){'use strict';function x(s,g,k){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,c,b,f,w){function y(){p&&(p.remove(),p=null);h&&(h.$destroy(),h=null);l&&(k.leave(l,function(){p=null}),p=l,l=null)}function v(){var b=s.current&&s.current.locals;if(e.isDefined(b&&b.$template)){var b=a.$new(),d=s.current;l=w(b,function(d){k.enter(d,null,l||c,function(){!e.isDefined(t)||t&&!a.$eval(t)||g()});y()});h=d.scope=b;h.$emit("$viewContentLoaded");h.$eval(u)}else y()} +var h,l,p,t=b.autoscroll,u=b.onload||"";a.$on("$routeChangeSuccess",v);v()}}}function z(e,g,k){return{restrict:"ECA",priority:-400,link:function(a,c){var b=k.current,f=b.locals;c.html(f.$template);var w=e(c.contents());b.controller&&(f.$scope=a,f=g(b.controller,f),b.controllerAs&&(a[b.controllerAs]=f),c.data("$ngControllerController",f),c.children().data("$ngControllerController",f));w(a)}}}n=e.module("ngRoute",["ng"]).provider("$route",function(){function s(a,c){return e.extend(new (e.extend(function(){}, +{prototype:a})),c)}function g(a,e){var b=e.caseInsensitiveMatch,f={originalPath:a,regexp:a},k=f.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,e,b,c){a="?"===c?c:null;c="*"===c?c:null;k.push({name:b,optional:!!a});e=e||"";return""+(a?"":e)+"(?:"+(a?e:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");f.regexp=RegExp("^"+a+"$",b?"i":"");return f}var k={};this.when=function(a,c){k[a]=e.extend({reloadOnSearch:!0},c,a&&g(a,c));if(a){var b= +"/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";k[b]=e.extend({redirectTo:a},g(b,c))}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce",function(a,c,b,f,g,n,v,h){function l(){var d=p(),m=r.current;if(d&&m&&d.$$route===m.$$route&&e.equals(d.pathParams,m.pathParams)&&!d.reloadOnSearch&&!u)m.params=d.params,e.copy(m.params,b),a.$broadcast("$routeUpdate",m);else if(d||m)u=!1,a.$broadcast("$routeChangeStart", +d,m),(r.current=d)&&d.redirectTo&&(e.isString(d.redirectTo)?c.path(t(d.redirectTo,d.params)).search(d.params).replace():c.url(d.redirectTo(d.pathParams,c.path(),c.search())).replace()),f.when(d).then(function(){if(d){var a=e.extend({},d.resolve),c,b;e.forEach(a,function(d,c){a[c]=e.isString(d)?g.get(d):g.invoke(d)});e.isDefined(c=d.template)?e.isFunction(c)&&(c=c(d.params)):e.isDefined(b=d.templateUrl)&&(e.isFunction(b)&&(b=b(d.params)),b=h.getTrustedResourceUrl(b),e.isDefined(b)&&(d.loadedTemplateUrl= +b,c=n.get(b,{cache:v}).then(function(a){return a.data})));e.isDefined(c)&&(a.$template=c);return f.all(a)}}).then(function(c){d==r.current&&(d&&(d.locals=c,e.copy(d.params,b)),a.$broadcast("$routeChangeSuccess",d,m))},function(c){d==r.current&&a.$broadcast("$routeChangeError",d,m,c)})}function p(){var a,b;e.forEach(k,function(f,k){var q;if(q=!b){var g=c.path();q=f.keys;var l={};if(f.regexp)if(g=f.regexp.exec(g)){for(var h=1,p=g.length;h + * + * See {@link ngSanitize.$sanitize `$sanitize`} for usage. + */ + +/* + * HTML Parser By Misko Hevery (misko@hevery.com) + * based on: HTML Parser By John Resig (ejohn.org) + * Original code by Erik Arvidsson, Mozilla Public License + * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js + * + * // Use like so: + * htmlParser(htmlString, { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * }); + * + */ + + +/** + * @ngdoc service + * @name $sanitize + * @kind function + * + * @description + * The input is sanitized by parsing the html into tokens. All safe tokens (from a whitelist) are + * then serialized back to properly escaped html string. This means that no unsafe input can make + * it into the returned string, however, since our parser is more strict than a typical browser + * parser, it's possible that some obscure input, which would be recognized as valid HTML by a + * browser, won't make it through the sanitizer. + * The whitelist is configured using the functions `aHrefSanitizationWhitelist` and + * `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider `$compileProvider`}. + * + * @param {string} html Html input. + * @returns {string} Sanitized html. + * + * @example + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value +
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
+</div>
+
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
+
+
+ + it('should sanitize the html snippet by default', function() { + expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). + toBe('

an html\nclick here\nsnippet

'); + }); + + it('should inline raw snippet if bound to a trusted value', function() { + expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()). + toBe("

an html\n" + + "click here\n" + + "snippet

"); + }); + + it('should escape snippet without any filter', function() { + expect(element(by.css('#bind-default div')).getInnerHtml()). + toBe("<p style=\"color:blue\">an html\n" + + "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + + "snippet</p>"); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new text'); + expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). + toBe('new text'); + expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe( + 'new text'); + expect(element(by.css('#bind-default div')).getInnerHtml()).toBe( + "new <b onclick=\"alert(1)\">text</b>"); + }); +
+
+ */ +function $SanitizeProvider() { + this.$get = ['$$sanitizeUri', function($$sanitizeUri) { + return function(html) { + var buf = []; + htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) { + return !/^unsafe/.test($$sanitizeUri(uri, isImage)); + })); + return buf.join(''); + }; + }]; +} + +function sanitizeText(chars) { + var buf = []; + var writer = htmlSanitizeWriter(buf, angular.noop); + writer.chars(chars); + return buf.join(''); +} + + +// Regular Expressions for parsing tags and attributes +var START_TAG_REGEXP = + /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/, + END_TAG_REGEXP = /^<\s*\/\s*([\w:-]+)[^>]*>/, + ATTR_REGEXP = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g, + BEGIN_TAG_REGEXP = /^/g, + DOCTYPE_REGEXP = /]*?)>/i, + CDATA_REGEXP = //g, + SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + // Match everything outside of normal chars and " (quote character) + NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g; + + +// Good source of info about elements and attributes +// http://dev.w3.org/html5/spec/Overview.html#semantics +// http://simon.html5.org/html-elements + +// Safe Void Elements - HTML5 +// http://dev.w3.org/html5/spec/Overview.html#void-elements +var voidElements = makeMap("area,br,col,hr,img,wbr"); + +// Elements that you can, intentionally, leave open (and which close themselves) +// http://dev.w3.org/html5/spec/Overview.html#optional-tags +var optionalEndTagBlockElements = makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"), + optionalEndTagInlineElements = makeMap("rp,rt"), + optionalEndTagElements = angular.extend({}, + optionalEndTagInlineElements, + optionalEndTagBlockElements); + +// Safe Block Elements - HTML5 +var blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap("address,article," + + "aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5," + + "h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")); + +// Inline Elements - HTML5 +var inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap("a,abbr,acronym,b," + + "bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s," + + "samp,small,span,strike,strong,sub,sup,time,tt,u,var")); + + +// Special Elements (can contain anything) +var specialElements = makeMap("script,style"); + +var validElements = angular.extend({}, + voidElements, + blockElements, + inlineElements, + optionalEndTagElements); + +//Attributes that have href and hence need to be sanitized +var uriAttrs = makeMap("background,cite,href,longdesc,src,usemap"); +var validAttrs = angular.extend({}, uriAttrs, makeMap( + 'abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,'+ + 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,'+ + 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,'+ + 'scope,scrolling,shape,size,span,start,summary,target,title,type,'+ + 'valign,value,vspace,width')); + +function makeMap(str) { + var obj = {}, items = str.split(','), i; + for (i = 0; i < items.length; i++) obj[items[i]] = true; + return obj; +} + + +/** + * @example + * htmlParser(htmlString, { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * }); + * + * @param {string} html string + * @param {object} handler + */ +function htmlParser( html, handler ) { + var index, chars, match, stack = [], last = html; + stack.last = function() { return stack[ stack.length - 1 ]; }; + + while ( html ) { + chars = true; + + // Make sure we're not in a script or style element + if ( !stack.last() || !specialElements[ stack.last() ] ) { + + // Comment + if ( html.indexOf("", index) === index) { + if (handler.comment) handler.comment( html.substring( 4, index ) ); + html = html.substring( index + 3 ); + chars = false; + } + // DOCTYPE + } else if ( DOCTYPE_REGEXP.test(html) ) { + match = html.match( DOCTYPE_REGEXP ); + + if ( match ) { + html = html.replace( match[0], ''); + chars = false; + } + // end tag + } else if ( BEGING_END_TAGE_REGEXP.test(html) ) { + match = html.match( END_TAG_REGEXP ); + + if ( match ) { + html = html.substring( match[0].length ); + match[0].replace( END_TAG_REGEXP, parseEndTag ); + chars = false; + } + + // start tag + } else if ( BEGIN_TAG_REGEXP.test(html) ) { + match = html.match( START_TAG_REGEXP ); + + if ( match ) { + html = html.substring( match[0].length ); + match[0].replace( START_TAG_REGEXP, parseStartTag ); + chars = false; + } + } + + if ( chars ) { + index = html.indexOf("<"); + + var text = index < 0 ? html : html.substring( 0, index ); + html = index < 0 ? "" : html.substring( index ); + + if (handler.chars) handler.chars( decodeEntities(text) ); + } + + } else { + html = html.replace(new RegExp("(.*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'), + function(all, text){ + text = text.replace(COMMENT_REGEXP, "$1").replace(CDATA_REGEXP, "$1"); + + if (handler.chars) handler.chars( decodeEntities(text) ); + + return ""; + }); + + parseEndTag( "", stack.last() ); + } + + if ( html == last ) { + throw $sanitizeMinErr('badparse', "The sanitizer was unable to parse the following block " + + "of html: {0}", html); + } + last = html; + } + + // Clean up any remaining tags + parseEndTag(); + + function parseStartTag( tag, tagName, rest, unary ) { + tagName = angular.lowercase(tagName); + if ( blockElements[ tagName ] ) { + while ( stack.last() && inlineElements[ stack.last() ] ) { + parseEndTag( "", stack.last() ); + } + } + + if ( optionalEndTagElements[ tagName ] && stack.last() == tagName ) { + parseEndTag( "", tagName ); + } + + unary = voidElements[ tagName ] || !!unary; + + if ( !unary ) + stack.push( tagName ); + + var attrs = {}; + + rest.replace(ATTR_REGEXP, + function(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) { + var value = doubleQuotedValue + || singleQuotedValue + || unquotedValue + || ''; + + attrs[name] = decodeEntities(value); + }); + if (handler.start) handler.start( tagName, attrs, unary ); + } + + function parseEndTag( tag, tagName ) { + var pos = 0, i; + tagName = angular.lowercase(tagName); + if ( tagName ) + // Find the closest opened tag of the same type + for ( pos = stack.length - 1; pos >= 0; pos-- ) + if ( stack[ pos ] == tagName ) + break; + + if ( pos >= 0 ) { + // Close all the open elements, up the stack + for ( i = stack.length - 1; i >= pos; i-- ) + if (handler.end) handler.end( stack[ i ] ); + + // Remove the open elements from the stack + stack.length = pos; + } + } +} + +var hiddenPre=document.createElement("pre"); +var spaceRe = /^(\s*)([\s\S]*?)(\s*)$/; +/** + * decodes all entities into regular string + * @param value + * @returns {string} A string with decoded entities. + */ +function decodeEntities(value) { + if (!value) { return ''; } + + // Note: IE8 does not preserve spaces at the start/end of innerHTML + // so we must capture them and reattach them afterward + var parts = spaceRe.exec(value); + var spaceBefore = parts[1]; + var spaceAfter = parts[3]; + var content = parts[2]; + if (content) { + hiddenPre.innerHTML=content.replace(//g, '>'); +} + +/** + * create an HTML/XML writer which writes to buffer + * @param {Array} buf use buf.jain('') to get out sanitized html string + * @returns {object} in the form of { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * } + */ +function htmlSanitizeWriter(buf, uriValidator){ + var ignore = false; + var out = angular.bind(buf, buf.push); + return { + start: function(tag, attrs, unary){ + tag = angular.lowercase(tag); + if (!ignore && specialElements[tag]) { + ignore = tag; + } + if (!ignore && validElements[tag] === true) { + out('<'); + out(tag); + angular.forEach(attrs, function(value, key){ + var lkey=angular.lowercase(key); + var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background'); + if (validAttrs[lkey] === true && + (uriAttrs[lkey] !== true || uriValidator(value, isImage))) { + out(' '); + out(key); + out('="'); + out(encodeEntities(value)); + out('"'); + } + }); + out(unary ? '/>' : '>'); + } + }, + end: function(tag){ + tag = angular.lowercase(tag); + if (!ignore && validElements[tag] === true) { + out(''); + } + if (tag == ignore) { + ignore = false; + } + }, + chars: function(chars){ + if (!ignore) { + out(encodeEntities(chars)); + } + } + }; +} + + +// define ngSanitize module and register $sanitize service +angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider); + +/* global sanitizeText: false */ + +/** + * @ngdoc filter + * @name linky + * @kind function + * + * @description + * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and + * plain email address links. + * + * Requires the {@link ngSanitize `ngSanitize`} module to be installed. + * + * @param {string} text Input text. + * @param {string} target Window (_blank|_self|_parent|_top) or named frame to open links in. + * @returns {string} Html-linkified text. + * + * @usage + + * + * @example + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + +
FilterSourceRendered
linky filter +
<div ng-bind-html="snippet | linky">
</div>
+
+
+
linky target +
<div ng-bind-html="snippetWithTarget | linky:'_blank'">
</div>
+
+
+
no filter
<div ng-bind="snippet">
</div>
+ + + it('should linkify the snippet with urls', function() { + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(4); + }); + + it('should not linkify snippet without the linky filter', function() { + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#escaped-html a')).count()).toEqual(0); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new http://link.'); + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('new http://link.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(1); + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()) + .toBe('new http://link.'); + }); + + it('should work with the target property', function() { + expect(element(by.id('linky-target')). + element(by.binding("snippetWithTarget | linky:'_blank'")).getText()). + toBe('http://angularjs.org/'); + expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank'); + }); + + + */ +angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) { + var LINKY_URL_REGEXP = + /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/, + MAILTO_REGEXP = /^mailto:/; + + return function(text, target) { + if (!text) return text; + var match; + var raw = text; + var html = []; + var url; + var i; + while ((match = raw.match(LINKY_URL_REGEXP))) { + // We can not end in these as they are sometimes found at the end of the sentence + url = match[0]; + // if we did not match ftp/http/mailto then assume mailto + if (match[2] == match[3]) url = 'mailto:' + url; + i = match.index; + addText(raw.substr(0, i)); + addLink(url, match[0].replace(MAILTO_REGEXP, '')); + raw = raw.substring(i + match[0].length); + } + addText(raw); + return $sanitize(html.join('')); + + function addText(text) { + if (!text) { + return; + } + html.push(sanitizeText(text)); + } + + function addLink(url, text) { + html.push(''); + addText(text); + html.push(''); + } + }; +}]); + + +})(window, window.angular); diff --git a/1.2.17/angular-sanitize.min.js b/1.2.17/angular-sanitize.min.js new file mode 100644 index 0000000000..8613fb3216 --- /dev/null +++ b/1.2.17/angular-sanitize.min.js @@ -0,0 +1,15 @@ +/* + AngularJS v1.2.17 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(p,h,q){'use strict';function E(a){var d=[];s(d,h.noop).chars(a);return d.join("")}function k(a){var d={};a=a.split(",");var b;for(b=0;b=b;e--)d.end&&d.end(f[e]);f.length=b}}var c,g,f=[],l=a;for(f.last=function(){return f[f.length-1]};a;){g=!0;if(f.last()&&x[f.last()])a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(c,a){a=a.replace(H,"$1").replace(I,"$1");d.chars&&d.chars(r(a));return""}),e("",f.last());else{if(0===a.indexOf("\x3c!--"))c=a.indexOf("--",4),0<=c&&a.lastIndexOf("--\x3e",c)===c&&(d.comment&&d.comment(a.substring(4,c)),a=a.substring(c+3),g=!1);else if(y.test(a)){if(c=a.match(y))a= +a.replace(c[0],""),g=!1}else if(J.test(a)){if(c=a.match(z))a=a.substring(c[0].length),c[0].replace(z,e),g=!1}else K.test(a)&&(c=a.match(A))&&(a=a.substring(c[0].length),c[0].replace(A,b),g=!1);g&&(c=a.indexOf("<"),g=0>c?a:a.substring(0,c),a=0>c?"":a.substring(c),d.chars&&d.chars(r(g)))}if(a==l)throw L("badparse",a);l=a}e()}function r(a){if(!a)return"";var d=M.exec(a);a=d[1];var b=d[3];if(d=d[2])n.innerHTML=d.replace(//g,">")}function s(a,d){var b=!1,e=h.bind(a,a.push);return{start:function(a,g,f){a=h.lowercase(a);!b&&x[a]&&(b=a);b||!0!==C[a]||(e("<"),e(a),h.forEach(g,function(b,f){var g=h.lowercase(f),k="img"===a&&"src"===g||"background"===g;!0!==P[g]||!0===D[g]&&!d(b,k)||(e(" "),e(f),e('="'),e(B(b)),e('"'))}), +e(f?"/>":">"))},end:function(a){a=h.lowercase(a);b||!0!==C[a]||(e(""));a==b&&(b=!1)},chars:function(a){b||e(B(a))}}}var L=h.$$minErr("$sanitize"),A=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,z=/^<\s*\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^]*?)>/i,I=/]/,b=/^mailto:/;return function(e,c){function g(a){a&&m.push(E(a))}function f(a,b){m.push("');g(b);m.push("")}if(!e)return e; +for(var l,k=e,m=[],n,p;l=k.match(d);)n=l[0],l[2]==l[3]&&(n="mailto:"+n),p=l.index,g(k.substr(0,p)),f(n,l[0].replace(b,"")),k=k.substring(p+l[0].length);g(k);return a(m.join(""))}}])})(window,window.angular); +//# sourceMappingURL=angular-sanitize.min.js.map diff --git a/1.2.17/angular-sanitize.min.js.map b/1.2.17/angular-sanitize.min.js.map new file mode 100644 index 0000000000..b267327ddb --- /dev/null +++ b/1.2.17/angular-sanitize.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-sanitize.min.js", +"lineCount":14, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAiJtCC,QAASA,EAAY,CAACC,CAAD,CAAQ,CAC3B,IAAIC,EAAM,EACGC,EAAAC,CAAmBF,CAAnBE,CAAwBN,CAAAO,KAAxBD,CACbH,MAAA,CAAaA,CAAb,CACA,OAAOC,EAAAI,KAAA,CAAS,EAAT,CAJoB,CAoE7BC,QAASA,EAAO,CAACC,CAAD,CAAM,CAAA,IAChBC,EAAM,EAAIC,EAAAA,CAAQF,CAAAG,MAAA,CAAU,GAAV,CAAtB,KAAsCC,CACtC,KAAKA,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgBF,CAAAG,OAAhB,CAA8BD,CAAA,EAA9B,CAAmCH,CAAA,CAAIC,CAAA,CAAME,CAAN,CAAJ,CAAA,CAAgB,CAAA,CACnD,OAAOH,EAHa,CAmBtBK,QAASA,EAAU,CAAEC,CAAF,CAAQC,CAAR,CAAkB,CAiFnCC,QAASA,EAAa,CAAEC,CAAF,CAAOC,CAAP,CAAgBC,CAAhB,CAAsBC,CAAtB,CAA8B,CAClDF,CAAA,CAAUrB,CAAAwB,UAAA,CAAkBH,CAAlB,CACV,IAAKI,CAAA,CAAeJ,CAAf,CAAL,CACE,IAAA,CAAQK,CAAAC,KAAA,EAAR,EAAwBC,CAAA,CAAgBF,CAAAC,KAAA,EAAhB,CAAxB,CAAA,CACEE,CAAA,CAAa,EAAb,CAAiBH,CAAAC,KAAA,EAAjB,CAICG,EAAA,CAAwBT,CAAxB,CAAL,EAA0CK,CAAAC,KAAA,EAA1C,EAA0DN,CAA1D,EACEQ,CAAA,CAAa,EAAb,CAAiBR,CAAjB,CAKF,EAFAE,CAEA,CAFQQ,CAAA,CAAcV,CAAd,CAER,EAFmC,CAAC,CAACE,CAErC,GACEG,CAAAM,KAAA,CAAYX,CAAZ,CAEF,KAAIY,EAAQ,EAEZX,EAAAY,QAAA,CAAaC,CAAb,CACE,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAcC,CAAd,CAAiCC,CAAjC,CAAoDC,CAApD,CAAmE,CAMzEP,CAAA,CAAMI,CAAN,CAAA,CAAcI,CAAA,CALFH,CAKE,EAJTC,CAIS,EAHTC,CAGS,EAFT,EAES,CAN2D,CAD7E,CASItB,EAAAwB,MAAJ,EAAmBxB,CAAAwB,MAAA,CAAerB,CAAf,CAAwBY,CAAxB,CAA+BV,CAA/B,CA5B+B,CA+BpDM,QAASA,EAAW,CAAET,CAAF,CAAOC,CAAP,CAAiB,CAAA,IAC/BsB,EAAM,CADyB,CACtB7B,CAEb,IADAO,CACA,CADUrB,CAAAwB,UAAA,CAAkBH,CAAlB,CACV,CAEE,IAAMsB,CAAN,CAAYjB,CAAAX,OAAZ,CAA2B,CAA3B,CAAqC,CAArC,EAA8B4B,CAA9B,EACOjB,CAAA,CAAOiB,CAAP,CADP,EACuBtB,CADvB,CAAwCsB,CAAA,EAAxC;AAIF,GAAY,CAAZ,EAAKA,CAAL,CAAgB,CAEd,IAAM7B,CAAN,CAAUY,CAAAX,OAAV,CAAyB,CAAzB,CAA4BD,CAA5B,EAAiC6B,CAAjC,CAAsC7B,CAAA,EAAtC,CACMI,CAAA0B,IAAJ,EAAiB1B,CAAA0B,IAAA,CAAalB,CAAA,CAAOZ,CAAP,CAAb,CAGnBY,EAAAX,OAAA,CAAe4B,CAND,CATmB,CAhHF,IAC/BE,CAD+B,CACxB1C,CADwB,CACVuB,EAAQ,EADE,CACEC,EAAOV,CAG5C,KAFAS,CAAAC,KAEA,CAFamB,QAAQ,EAAG,CAAE,MAAOpB,EAAA,CAAOA,CAAAX,OAAP,CAAsB,CAAtB,CAAT,CAExB,CAAQE,CAAR,CAAA,CAAe,CACbd,CAAA,CAAQ,CAAA,CAGR,IAAMuB,CAAAC,KAAA,EAAN,EAAuBoB,CAAA,CAAiBrB,CAAAC,KAAA,EAAjB,CAAvB,CAmDEV,CASA,CATOA,CAAAiB,QAAA,CAAiBc,MAAJ,CAAW,kBAAX,CAAgCtB,CAAAC,KAAA,EAAhC,CAA+C,QAA/C,CAAyD,GAAzD,CAAb,CACL,QAAQ,CAACsB,CAAD,CAAMC,CAAN,CAAW,CACjBA,CAAA,CAAOA,CAAAhB,QAAA,CAAaiB,CAAb,CAA6B,IAA7B,CAAAjB,QAAA,CAA2CkB,CAA3C,CAAyD,IAAzD,CAEHlC,EAAAf,MAAJ,EAAmBe,CAAAf,MAAA,CAAesC,CAAA,CAAeS,CAAf,CAAf,CAEnB,OAAO,EALU,CADd,CASP,CAAArB,CAAA,CAAa,EAAb,CAAiBH,CAAAC,KAAA,EAAjB,CA5DF,KAAyD,CAGvD,GAA8B,CAA9B,GAAKV,CAAAoC,QAAA,CAAa,SAAb,CAAL,CAEER,CAEA,CAFQ5B,CAAAoC,QAAA,CAAa,IAAb,CAAmB,CAAnB,CAER,CAAc,CAAd,EAAKR,CAAL,EAAmB5B,CAAAqC,YAAA,CAAiB,QAAjB,CAAwBT,CAAxB,CAAnB,GAAsDA,CAAtD,GACM3B,CAAAqC,QAEJ,EAFqBrC,CAAAqC,QAAA,CAAiBtC,CAAAuC,UAAA,CAAgB,CAAhB,CAAmBX,CAAnB,CAAjB,CAErB,CADA5B,CACA,CADOA,CAAAuC,UAAA,CAAgBX,CAAhB,CAAwB,CAAxB,CACP,CAAA1C,CAAA,CAAQ,CAAA,CAHV,CAJF,KAUO,IAAKsD,CAAAC,KAAA,CAAoBzC,CAApB,CAAL,CAGL,IAFAmB,CAEA,CAFQnB,CAAAmB,MAAA,CAAYqB,CAAZ,CAER,CACExC,CACA;AADOA,CAAAiB,QAAA,CAAcE,CAAA,CAAM,CAAN,CAAd,CAAwB,EAAxB,CACP,CAAAjC,CAAA,CAAQ,CAAA,CAFV,CAHK,IAQA,IAAKwD,CAAAD,KAAA,CAA4BzC,CAA5B,CAAL,CAGL,IAFAmB,CAEA,CAFQnB,CAAAmB,MAAA,CAAYwB,CAAZ,CAER,CACE3C,CAEA,CAFOA,CAAAuC,UAAA,CAAgBpB,CAAA,CAAM,CAAN,CAAArB,OAAhB,CAEP,CADAqB,CAAA,CAAM,CAAN,CAAAF,QAAA,CAAkB0B,CAAlB,CAAkC/B,CAAlC,CACA,CAAA1B,CAAA,CAAQ,CAAA,CAHV,CAHK,IAUK0D,EAAAH,KAAA,CAAsBzC,CAAtB,CAAL,GACLmB,CADK,CACGnB,CAAAmB,MAAA,CAAY0B,CAAZ,CADH,IAIH7C,CAEA,CAFOA,CAAAuC,UAAA,CAAgBpB,CAAA,CAAM,CAAN,CAAArB,OAAhB,CAEP,CADAqB,CAAA,CAAM,CAAN,CAAAF,QAAA,CAAkB4B,CAAlB,CAAoC3C,CAApC,CACA,CAAAhB,CAAA,CAAQ,CAAA,CANL,CAUFA,EAAL,GACE0C,CAKA,CALQ5B,CAAAoC,QAAA,CAAa,GAAb,CAKR,CAHIH,CAGJ,CAHmB,CAAR,CAAAL,CAAA,CAAY5B,CAAZ,CAAmBA,CAAAuC,UAAA,CAAgB,CAAhB,CAAmBX,CAAnB,CAG9B,CAFA5B,CAEA,CAFe,CAAR,CAAA4B,CAAA,CAAY,EAAZ,CAAiB5B,CAAAuC,UAAA,CAAgBX,CAAhB,CAExB,CAAI3B,CAAAf,MAAJ,EAAmBe,CAAAf,MAAA,CAAesC,CAAA,CAAeS,CAAf,CAAf,CANrB,CAzCuD,CA+DzD,GAAKjC,CAAL,EAAaU,CAAb,CACE,KAAMoC,EAAA,CAAgB,UAAhB,CAC4C9C,CAD5C,CAAN,CAGFU,CAAA,CAAOV,CAvEM,CA2EfY,CAAA,EA/EmC,CA2IrCY,QAASA,EAAc,CAACuB,CAAD,CAAQ,CAC7B,GAAI,CAACA,CAAL,CAAc,MAAO,EAIrB,KAAIC,EAAQC,CAAAC,KAAA,CAAaH,CAAb,CACRI,EAAAA,CAAcH,CAAA,CAAM,CAAN,CAClB,KAAII,EAAaJ,CAAA,CAAM,CAAN,CAEjB,IADIK,CACJ,CADcL,CAAA,CAAM,CAAN,CACd,CACEM,CAAAC,UAKA,CALoBF,CAAApC,QAAA,CAAgB,IAAhB,CAAqB,MAArB,CAKpB,CAAAoC,CAAA,CAAU,aAAA,EAAiBC,EAAjB,CACRA,CAAAE,YADQ,CACgBF,CAAAG,UAE5B,OAAON,EAAP,CAAqBE,CAArB,CAA+BD,CAlBF,CA4B/BM,QAASA,EAAc,CAACX,CAAD,CAAQ,CAC7B,MAAOA,EAAA9B,QAAA,CACG,IADH;AACS,OADT,CAAAA,QAAA,CAEG0C,CAFH,CAE0B,QAAS,CAACZ,CAAD,CAAQ,CAC9C,IAAIa,EAAKb,CAAAc,WAAA,CAAiB,CAAjB,CACLC,EAAAA,CAAMf,CAAAc,WAAA,CAAiB,CAAjB,CACV,OAAO,IAAP,EAAgC,IAAhC,EAAiBD,CAAjB,CAAsB,KAAtB,GAA0CE,CAA1C,CAAgD,KAAhD,EAA0D,KAA1D,EAAqE,GAHvB,CAF3C,CAAA7C,QAAA,CAOG8C,CAPH,CAO4B,QAAQ,CAAChB,CAAD,CAAO,CAC9C,MAAO,IAAP,CAAcA,CAAAc,WAAA,CAAiB,CAAjB,CAAd,CAAoC,GADU,CAP3C,CAAA5C,QAAA,CAUG,IAVH,CAUS,MAVT,CAAAA,QAAA,CAWG,IAXH,CAWS,MAXT,CADsB,CAyB/B7B,QAASA,EAAkB,CAACD,CAAD,CAAM6E,CAAN,CAAmB,CAC5C,IAAIC,EAAS,CAAA,CAAb,CACIC,EAAMnF,CAAAoF,KAAA,CAAahF,CAAb,CAAkBA,CAAA4B,KAAlB,CACV,OAAO,OACEU,QAAQ,CAACtB,CAAD,CAAMa,CAAN,CAAaV,CAAb,CAAmB,CAChCH,CAAA,CAAMpB,CAAAwB,UAAA,CAAkBJ,CAAlB,CACD8D,EAAAA,CAAL,EAAenC,CAAA,CAAgB3B,CAAhB,CAAf,GACE8D,CADF,CACW9D,CADX,CAGK8D,EAAL,EAAsC,CAAA,CAAtC,GAAeG,CAAA,CAAcjE,CAAd,CAAf,GACE+D,CAAA,CAAI,GAAJ,CAcA,CAbAA,CAAA,CAAI/D,CAAJ,CAaA,CAZApB,CAAAsF,QAAA,CAAgBrD,CAAhB,CAAuB,QAAQ,CAAC+B,CAAD,CAAQuB,CAAR,CAAY,CACzC,IAAIC,EAAKxF,CAAAwB,UAAA,CAAkB+D,CAAlB,CAAT,CACIE,EAAmB,KAAnBA,GAAWrE,CAAXqE,EAAqC,KAArCA,GAA4BD,CAA5BC,EAAyD,YAAzDA,GAAgDD,CAC3B,EAAA,CAAzB,GAAIE,CAAA,CAAWF,CAAX,CAAJ,EACsB,CAAA,CADtB,GACGG,CAAA,CAASH,CAAT,CADH,EAC8B,CAAAP,CAAA,CAAajB,CAAb,CAAoByB,CAApB,CAD9B,GAEEN,CAAA,CAAI,GAAJ,CAIA,CAHAA,CAAA,CAAII,CAAJ,CAGA,CAFAJ,CAAA,CAAI,IAAJ,CAEA,CADAA,CAAA,CAAIR,CAAA,CAAeX,CAAf,CAAJ,CACA,CAAAmB,CAAA,CAAI,GAAJ,CANF,CAHyC,CAA3C,CAYA;AAAAA,CAAA,CAAI5D,CAAA,CAAQ,IAAR,CAAe,GAAnB,CAfF,CALgC,CAD7B,KAwBAqB,QAAQ,CAACxB,CAAD,CAAK,CACdA,CAAA,CAAMpB,CAAAwB,UAAA,CAAkBJ,CAAlB,CACD8D,EAAL,EAAsC,CAAA,CAAtC,GAAeG,CAAA,CAAcjE,CAAd,CAAf,GACE+D,CAAA,CAAI,IAAJ,CAEA,CADAA,CAAA,CAAI/D,CAAJ,CACA,CAAA+D,CAAA,CAAI,GAAJ,CAHF,CAKI/D,EAAJ,EAAW8D,CAAX,GACEA,CADF,CACW,CAAA,CADX,CAPc,CAxBb,OAmCE/E,QAAQ,CAACA,CAAD,CAAO,CACb+E,CAAL,EACEC,CAAA,CAAIR,CAAA,CAAexE,CAAf,CAAJ,CAFgB,CAnCjB,CAHqC,CAta9C,IAAI4D,EAAkB/D,CAAA4F,SAAA,CAAiB,WAAjB,CAAtB,CAwJI9B,EACG,4FAzJP,CA0JEF,EAAiB,2BA1JnB,CA2JEzB,EAAc,yEA3JhB,CA4JE0B,EAAmB,IA5JrB,CA6JEF,EAAyB,SA7J3B,CA8JER,EAAiB,qBA9JnB,CA+JEM,EAAiB,qBA/JnB,CAgKEL,EAAe,yBAhKjB,CAiKEwB,EAAwB,iCAjK1B,CAmKEI,EAA0B,gBAnK5B;AA4KIjD,EAAetB,CAAA,CAAQ,wBAAR,CAIfoF,EAAAA,CAA8BpF,CAAA,CAAQ,gDAAR,CAC9BqF,EAAAA,CAA+BrF,CAAA,CAAQ,OAAR,CADnC,KAEIqB,EAAyB9B,CAAA+F,OAAA,CAAe,EAAf,CACeD,CADf,CAEeD,CAFf,CAF7B,CAOIpE,EAAgBzB,CAAA+F,OAAA,CAAe,EAAf,CAAmBF,CAAnB,CAAgDpF,CAAA,CAAQ,4KAAR,CAAhD,CAPpB,CAYImB,EAAiB5B,CAAA+F,OAAA,CAAe,EAAf,CAAmBD,CAAnB,CAAiDrF,CAAA,CAAQ,2JAAR,CAAjD,CAZrB,CAkBIsC,EAAkBtC,CAAA,CAAQ,cAAR,CAlBtB;AAoBI4E,EAAgBrF,CAAA+F,OAAA,CAAe,EAAf,CACehE,CADf,CAEeN,CAFf,CAGeG,CAHf,CAIeE,CAJf,CApBpB,CA2BI6D,EAAWlF,CAAA,CAAQ,0CAAR,CA3Bf,CA4BIiF,EAAa1F,CAAA+F,OAAA,CAAe,EAAf,CAAmBJ,CAAnB,CAA6BlF,CAAA,CAC1C,ySAD0C,CAA7B,CA5BjB,CA0LI8D,EAAUyB,QAAAC,cAAA,CAAuB,KAAvB,CA1Ld,CA2LI/B,EAAU,wBA2GdlE,EAAAkG,OAAA,CAAe,YAAf,CAA6B,EAA7B,CAAAC,SAAA,CAA0C,WAA1C,CAnVAC,QAA0B,EAAG,CAC3B,IAAAC,KAAA;AAAY,CAAC,eAAD,CAAkB,QAAQ,CAACC,CAAD,CAAgB,CACpD,MAAO,SAAQ,CAACrF,CAAD,CAAO,CACpB,IAAIb,EAAM,EACVY,EAAA,CAAWC,CAAX,CAAiBZ,CAAA,CAAmBD,CAAnB,CAAwB,QAAQ,CAACmG,CAAD,CAAMd,CAAN,CAAe,CAC9D,MAAO,CAAC,SAAA/B,KAAA,CAAe4C,CAAA,CAAcC,CAAd,CAAmBd,CAAnB,CAAf,CADsD,CAA/C,CAAjB,CAGA,OAAOrF,EAAAI,KAAA,CAAS,EAAT,CALa,CAD8B,CAA1C,CADe,CAmV7B,CAuGAR,EAAAkG,OAAA,CAAe,YAAf,CAAAM,OAAA,CAAoC,OAApC,CAA6C,CAAC,WAAD,CAAc,QAAQ,CAACC,CAAD,CAAY,CAAA,IACzEC,EACE,mEAFuE,CAGzEC,EAAgB,UAEpB,OAAO,SAAQ,CAACzD,CAAD,CAAO0D,CAAP,CAAe,CAoB5BC,QAASA,EAAO,CAAC3D,CAAD,CAAO,CAChBA,CAAL,EAGAjC,CAAAe,KAAA,CAAU9B,CAAA,CAAagD,CAAb,CAAV,CAJqB,CAOvB4D,QAASA,EAAO,CAACC,CAAD,CAAM7D,CAAN,CAAY,CAC1BjC,CAAAe,KAAA,CAAU,KAAV,CACIhC,EAAAgH,UAAA,CAAkBJ,CAAlB,CAAJ,GACE3F,CAAAe,KAAA,CAAU,UAAV,CAEA,CADAf,CAAAe,KAAA,CAAU4E,CAAV,CACA,CAAA3F,CAAAe,KAAA,CAAU,IAAV,CAHF,CAKAf,EAAAe,KAAA,CAAU,QAAV,CACAf,EAAAe,KAAA,CAAU+E,CAAV,CACA9F,EAAAe,KAAA,CAAU,IAAV,CACA6E,EAAA,CAAQ3D,CAAR,CACAjC,EAAAe,KAAA,CAAU,MAAV,CAX0B,CA1B5B,GAAI,CAACkB,CAAL,CAAW,MAAOA,EAMlB;IALA,IAAId,CAAJ,CACI6E,EAAM/D,CADV,CAEIjC,EAAO,EAFX,CAGI8F,CAHJ,CAIIjG,CACJ,CAAQsB,CAAR,CAAgB6E,CAAA7E,MAAA,CAAUsE,CAAV,CAAhB,CAAA,CAEEK,CAMA,CANM3E,CAAA,CAAM,CAAN,CAMN,CAJIA,CAAA,CAAM,CAAN,CAIJ,EAJgBA,CAAA,CAAM,CAAN,CAIhB,GAJ0B2E,CAI1B,CAJgC,SAIhC,CAJ4CA,CAI5C,EAHAjG,CAGA,CAHIsB,CAAAS,MAGJ,CAFAgE,CAAA,CAAQI,CAAAC,OAAA,CAAW,CAAX,CAAcpG,CAAd,CAAR,CAEA,CADAgG,CAAA,CAAQC,CAAR,CAAa3E,CAAA,CAAM,CAAN,CAAAF,QAAA,CAAiByE,CAAjB,CAAgC,EAAhC,CAAb,CACA,CAAAM,CAAA,CAAMA,CAAAzD,UAAA,CAAc1C,CAAd,CAAkBsB,CAAA,CAAM,CAAN,CAAArB,OAAlB,CAER8F,EAAA,CAAQI,CAAR,CACA,OAAOR,EAAA,CAAUxF,CAAAT,KAAA,CAAU,EAAV,CAAV,CAlBqB,CAL+C,CAAlC,CAA7C,CA/jBsC,CAArC,CAAA,CAgnBET,MAhnBF,CAgnBUA,MAAAC,QAhnBV;", +"sources":["angular-sanitize.js"], +"names":["window","angular","undefined","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","makeMap","str","obj","items","split","i","length","htmlParser","html","handler","parseStartTag","tag","tagName","rest","unary","lowercase","blockElements","stack","last","inlineElements","parseEndTag","optionalEndTagElements","voidElements","push","attrs","replace","ATTR_REGEXP","match","name","doubleQuotedValue","singleQuotedValue","unquotedValue","decodeEntities","start","pos","end","index","stack.last","specialElements","RegExp","all","text","COMMENT_REGEXP","CDATA_REGEXP","indexOf","lastIndexOf","comment","substring","DOCTYPE_REGEXP","test","BEGING_END_TAGE_REGEXP","END_TAG_REGEXP","BEGIN_TAG_REGEXP","START_TAG_REGEXP","$sanitizeMinErr","value","parts","spaceRe","exec","spaceBefore","spaceAfter","content","hiddenPre","innerHTML","textContent","innerText","encodeEntities","SURROGATE_PAIR_REGEXP","hi","charCodeAt","low","NON_ALPHANUMERIC_REGEXP","uriValidator","ignore","out","bind","validElements","forEach","key","lkey","isImage","validAttrs","uriAttrs","$$minErr","optionalEndTagBlockElements","optionalEndTagInlineElements","extend","document","createElement","module","provider","$SanitizeProvider","$get","$$sanitizeUri","uri","filter","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","target","addText","addLink","url","isDefined","raw","substr"] +} diff --git a/1.2.17/angular-scenario.js b/1.2.17/angular-scenario.js new file mode 100644 index 0000000000..7b0c80e59d --- /dev/null +++ b/1.2.17/angular-scenario.js @@ -0,0 +1,33674 @@ +/*! + * jQuery JavaScript Library v1.10.2 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03T13:48Z + */ +(function( window, undefined ) {'use strict'; + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +// + +var + // The deferred used on DOM ready + readyList, + + // A central reference to the root jQuery(document) + rootjQuery, + + // Support: IE<10 + // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` + core_strundefined = typeof undefined, + + // Use the correct document accordingly with window argument (sandbox) + location = window.location, + document = window.document, + docElem = document.documentElement, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // [[Class]] -> type pairs + class2type = {}, + + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + + core_version = "1.10.2", + + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + + // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // The ready event handler + completed = function( event ) { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } + }, + // Clean-up method for dom ready events + detach = function() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + if ( obj == null ) { + return String( obj ); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( jQuery.support.ownLast ) { + for ( key in obj ) { + return core_hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || core_hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, keepScripts ) { + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec( data ), + scripts = !keepScripts && []; + + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ); + if ( scripts ) { + jQuery( scripts ).remove(); + } + return jQuery.merge( [], parsed.childNodes ); + }, + + parseJSON: function( data ) { + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + if ( data === null ) { + return data; + } + + if ( typeof data === "string" ) { + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + if ( data ) { + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + } + } + } + + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Use native String.trim function wherever possible + trim: core_trim && !core_trim.call("\uFEFF\xA0") ? + function( text ) { + return text == null ? + "" : + core_trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + core_push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( core_indexOf ) { + return core_indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations. + // Note: this method belongs to the css module but it's needed here for the support module. + // If support gets modularized, this method should be moved back to the css module. + swap: function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || type !== "function" && + ( length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +/*! + * Sizzle CSS Selector Engine v1.10.2 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03 + */ +(function( window, undefined ) { + +var i, + support, + cachedruns, + Expr, + getText, + isXML, + compile, + outermostContext, + sortInput, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + hasDuplicate = false, + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rsibling = new RegExp( whitespace + "*[+~]" ), + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent.attachEvent && parent !== parent.top ) { + parent.attachEvent( "onbeforeunload", function() { + setDocument(); + }); + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = assert(function( div ) { + div.innerHTML = "
"; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Support: Opera 10-12/IE8 + // ^= $= *= and empty values + // Should not select anything + // Support: Windows 8 Native Apps + // The type attribute is restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "t", "" ); + + if ( div.querySelectorAll("[t^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); + + if ( compare ) { + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } + + // Not directly comparable, sort on existence of method + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val === undefined ? + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null : + val; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] && match[4] !== undefined ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + } + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) + ); + return results; +} + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + elem[ name ] === true ? name.toLowerCase() : null; + } + }); +} + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function( support ) { + + var all, a, input, select, fragment, opt, eventName, isSupported, i, + div = document.createElement("div"); + + // Setup + div.setAttribute( "className", "t" ); + div.innerHTML = "
a"; + + // Finish early in limited (non-browser) environments + all = div.getElementsByTagName("*") || []; + a = div.getElementsByTagName("a")[ 0 ]; + if ( !a || !a.style || !all.length ) { + return support; + } + + // First batch of tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + a.style.cssText = "top:1px;float:left;opacity:.5"; + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + support.getSetAttribute = div.className !== "t"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName("tbody").length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName("link").length; + + // Get the style information from getAttribute + // (IE uses .cssText instead) + support.style = /top/.test( a.getAttribute("style") ); + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + support.hrefNormalized = a.getAttribute("href") === "/a"; + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + support.opacity = /^0.5/.test( a.style.opacity ); + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + support.cssFloat = !!a.style.cssFloat; + + // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) + support.checkOn = !!input.value; + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + support.optSelected = opt.selected; + + // Tests for enctype support on a form (#6743) + support.enctype = !!document.createElement("form").enctype; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>"; + + // Will be defined later + support.inlineBlockNeedsLayout = false; + support.shrinkWrapBlocks = false; + support.pixelPosition = false; + support.deleteExpando = true; + support.noCloneEvent = true; + support.reliableMarginRight = true; + support.boxSizingReliable = true; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Support: IE<9 + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + // Check if we can trust getAttribute("value") + input = document.createElement("input"); + input.setAttribute( "value", "" ); + support.input = input.getAttribute( "value" ) === ""; + + // Check if an input maintains its value after becoming a radio + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "checked", "t" ); + input.setAttribute( "name", "t" ); + + fragment = document.createDocumentFragment(); + fragment.appendChild( input ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + for ( i in { submit: true, change: true, focusin: true }) { + div.setAttribute( eventName = "on" + i, "t" ); + + support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; + } + + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + // Support: IE<9 + // Iteration over object's inherited properties before its own. + for ( i in jQuery( support ) ) { + break; + } + support.ownLast = i !== "0"; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, marginDiv, tds, + divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + + body.appendChild( container ).appendChild( div ); + + // Support: IE8 + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + div.innerHTML = "
t
"; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Support: IE8 + // Check if empty table cells still have offsetWidth/Height + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior. + div.innerHTML = ""; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; + + // Workaround failing boxSizing test due to offsetWidth returning wrong value + // with some non-1 values of body zoom, ticket #13543 + jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { + support.boxSizing = div.offsetWidth === 4; + }); + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild( document.createElement("div") ); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== core_strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + div.style.display = "block"; + div.innerHTML = "
"; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + if ( support.inlineBlockNeedsLayout ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); + + // Null elements to avoid leaks in IE + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + all = select = fragment = opt = a = input = null; + + return support; +})({}); + +var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +function internalData( elem, name, data, pvt /* Internal Use Only */ ){ + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "applet": true, + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + // Do not set data on non-element because it will not be cleared (#8335). + if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { + return false; + } + + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var attrs, name, + data = null, + i = 0, + elem = this[0]; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attrs = elem.attributes; + for ( ; i < attrs.length; i++ ) { + name = attrs[i].name; + + if ( name.indexOf("data-") === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return arguments.length > 1 ? + + // Sets one value + this.each(function() { + jQuery.data( this, key, value ); + }) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, + rclass = /[\t\r\n\f]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button|object)$/i, + rclickable = /^(?:a|area)$/i, + ruseDefault = /^(?:checked|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + getSetInput = jQuery.support.input; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call( this, j, this.className ) ); + }); + } + + if ( proceed ) { + // The disjunction here is for better compressibility (see removeClass) + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + " " + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + elem.className = jQuery.trim( cur ); + + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = arguments.length === 0 || typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call( this, j, this.className ) ); + }); + } + if ( proceed ) { + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + "" + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + elem.className = value ? jQuery.trim( cur ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value; + + if ( typeof stateVal === "boolean" && type === "string" ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + classNames = value.match( core_rnotwhite ) || []; + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( type === core_strundefined || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var ret, hooks, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // Use proper attribute retrieval(#6932, #12072) + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // oldIE doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { + optionSet = true; + } + } + + // force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attr: function( elem, name, value ) { + var hooks, ret, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === core_strundefined ) { + return jQuery.prop( elem, name, value ); + } + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + + } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var name, propName, + i = 0, + attrNames = value && value.match( core_rnotwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( (name = attrNames[i++]) ) { + propName = jQuery.propFix[ name ] || name; + + // Boolean attributes get special treatment (#10870) + if ( jQuery.expr.match.bool.test( name ) ) { + // Set corresponding property to false + if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + elem[ propName ] = false; + // Support: IE<9 + // Also clear defaultChecked/defaultSelected (if appropriate) + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = + elem[ propName ] = false; + } + + // See #9699 for explanation of this approach (setting first, then removal) + } else { + jQuery.attr( elem, name, "" ); + } + + elem.removeAttribute( getSetAttribute ? name : propName ); + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? + ret : + ( elem[ name ] = value ); + + } else { + return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? + ret : + elem[ name ]; + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + return tabindex ? + parseInt( tabindex, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + -1; + } + } + } +}); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + // IE<8 needs the *property* name + elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); + + // Use defaultChecked and defaultSelected for oldIE + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; + } + + return name; + } +}; +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; + + jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? + function( elem, name, isXML ) { + var fn = jQuery.expr.attrHandle[ name ], + ret = isXML ? + undefined : + /* jshint eqeqeq: false */ + (jQuery.expr.attrHandle[ name ] = undefined) != + getter( elem, name, isXML ) ? + + name.toLowerCase() : + null; + jQuery.expr.attrHandle[ name ] = fn; + return ret; + } : + function( elem, name, isXML ) { + return isXML ? + undefined : + elem[ jQuery.camelCase( "default-" + name ) ] ? + name.toLowerCase() : + null; + }; +}); + +// fix oldIE attroperties +if ( !getSetInput || !getSetAttribute ) { + jQuery.attrHooks.value = { + set: function( elem, value, name ) { + if ( jQuery.nodeName( elem, "input" ) ) { + // Does not return so that setAttribute is also used + elem.defaultValue = value; + } else { + // Use nodeHook if defined (#1954); otherwise setAttribute is fine + return nodeHook && nodeHook.set( elem, value, name ); + } + } + }; +} + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = { + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + elem.setAttributeNode( + (ret = elem.ownerDocument.createAttribute( name )) + ); + } + + ret.value = value += ""; + + // Break association with cloned elements by also using setAttribute (#9646) + return name === "value" || value === elem.getAttribute( name ) ? + value : + undefined; + } + }; + jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = + // Some attributes are constructed with empty-string values when not defined + function( elem, name, isXML ) { + var ret; + return isXML ? + undefined : + (ret = elem.getAttributeNode( name )) && ret.value !== "" ? + ret.value : + null; + }; + jQuery.valHooks.button = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return ret && ret.specified ? + ret.value : + undefined; + }, + set: nodeHook.set + }; + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + set: function( elem, value, name ) { + nodeHook.set( elem, value === "" ? false : value, name ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }; + }); +} + + +// Some attributes require a special call on IE +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !jQuery.support.hrefNormalized ) { + // href/src property should get the full normalized URL (#10299/#12915) + jQuery.each([ "href", "src" ], function( i, name ) { + jQuery.propHooks[ name ] = { + get: function( elem ) { + return elem.getAttribute( name, 4 ); + } + }; + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Note: IE uppercases css property names, but if we were to .toLowerCase() + // .cssText, that would destroy case senstitivity in URL's, like in "background" + return elem.style.cssText || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = value + "" ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }; +} + +jQuery.each([ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +}); + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }; + if ( !jQuery.support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + // Support: Webkit + // "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + }; + } +}); +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = core_slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Even when returnValue equals to undefined Firefox will still show alert + if ( event.result !== undefined ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === core_strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); +var isSimple = /^.[^:#\[\.,]*$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + cur = ret.push( cur ); + break; + } + } + } + + return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( jQuery.unique(all) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.unique( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( isSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
", "
" ], + area: [ 1, "", "" ], + param: [ 1, "", "" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + col: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
", "
" ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var + // Snapshot the DOM in case .domManip sweeps something relevant into its fragment + args = jQuery.map( this, function( elem ) { + return [ elem.nextSibling, elem.parentNode ]; + }), + i = 0; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + var next = args[ i++ ], + parent = args[ i++ ]; + + if ( parent ) { + // Don't use the snapshot next if it has moved (#13810) + if ( next && next.parentNode !== parent ) { + next = this.nextSibling; + } + jQuery( this ).remove(); + parent.insertBefore( elem, next ); + } + // Allow new content to include elements from the context set + }, true ); + + // Force removal if there was no new content (e.g., from empty arguments) + return i ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback, allowIntersection ) { + + // Flatten any nested arrays + args = core_concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, self.html() ); + } + self.domManip( args, callback, allowIntersection ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[i], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Hope ajax is available... + jQuery._evalUrl( node.src ); + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + core_push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( manipulation_rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted from table fragments + if ( !jQuery.support.tbody ) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare or + wrap[1] === "
" && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== core_strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + core_deletedIds.push( id ); + } + } + } + } + }, + + _evalUrl: function( url ) { + return jQuery.ajax({ + url: url, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } +}); +jQuery.fn.extend({ + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + } +}); +var iframe, getStyles, curCSS, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity\s*=\s*([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = jQuery._data( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + var len, styles, + map = {}, + i = 0; + + if ( jQuery.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each(function() { + if ( isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "columnCount": true, + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var num, val, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + } +}); + +// NOTE: we've included the "window" in window.getComputedStyle +// because jsdom on node.js will break without it. +if ( window.getComputedStyle ) { + getStyles = function( elem ) { + return window.getComputedStyle( elem, null ); + }; + + curCSS = function( elem, name, _computed ) { + var width, minWidth, maxWidth, + computed = _computed || getStyles( elem ), + + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, + style = elem.style; + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + getStyles = function( elem ) { + return elem.currentStyle; + }; + + curCSS = function( elem, name, _computed ) { + var left, rs, rsLeft, + computed = _computed || getStyles( elem ), + ret = computed ? computed[ name ] : undefined, + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rs = elem.runtimeStyle; + rsLeft = rs && rs.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + rs.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + rs.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles( elem ), + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, styles ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + // Use the already-created iframe if possible + iframe = ( iframe || + jQuery(" + + + + Light 300 +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Light 300 Italic +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Normal 400 +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Normal 400 Italic +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Semibold 600 +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Semibold 600 Italic +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Bold 700 +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Bold 700 Italic +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Extrabold 800 +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + Extrabold 800 Italic +
+ AaBbCcDdEeFfGgHhJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +
+ + \ No newline at end of file diff --git a/1.2.17/docs/components/open-sans-fontface-1.0.4/open-sans.css b/1.2.17/docs/components/open-sans-fontface-1.0.4/open-sans.css new file mode 100644 index 0000000000..76c36b935c --- /dev/null +++ b/1.2.17/docs/components/open-sans-fontface-1.0.4/open-sans.css @@ -0,0 +1,131 @@ +/* Open Sans @font-face kit */ + +/* BEGIN Light */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/Light/OpenSans-Light.eot'); + src: url('fonts/Light/OpenSans-Light.eot?#iefix') format('embedded-opentype'), + url('fonts/Light/OpenSans-Light.woff') format('woff'), + url('fonts/Light/OpenSans-Light.ttf') format('truetype'), + url('fonts/Light/OpenSans-Light.svg#OpenSansLight') format('svg'); + font-weight: 300; + font-style: normal; +} +/* END Light */ + +/* BEGIN Light Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/LightItalic/OpenSans-LightItalic.eot'); + src: url('fonts/LightItalic/OpenSans-LightItalic.eot?#iefix') format('embedded-opentype'), + url('fonts/LightItalic/OpenSans-LightItalic.woff') format('woff'), + url('fonts/LightItalic/OpenSans-LightItalic.ttf') format('truetype'), + url('fonts/LightItalic/OpenSans-LightItalic.svg#OpenSansLightItalic') format('svg'); + font-weight: 300; + font-style: italic; +} +/* END Light Italic */ + +/* BEGIN Regular */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/Regular/OpenSans-Regular.eot'); + src: url('fonts/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'), + url('fonts/Regular/OpenSans-Regular.woff') format('woff'), + url('fonts/Regular/OpenSans-Regular.ttf') format('truetype'), + url('fonts/Regular/OpenSans-Regular.svg#OpenSansRegular') format('svg'); + font-weight: normal; + font-style: normal; +} +/* END Regular */ + +/* BEGIN Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/Italic/OpenSans-Italic.eot'); + src: url('fonts/Italic/OpenSans-Italic.eot?#iefix') format('embedded-opentype'), + url('fonts/Italic/OpenSans-Italic.woff') format('woff'), + url('fonts/Italic/OpenSans-Italic.ttf') format('truetype'), + url('fonts/Italic/OpenSans-Italic.svg#OpenSansItalic') format('svg'); + font-weight: normal; + font-style: italic; +} +/* END Italic */ + +/* BEGIN Semibold */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/Semibold/OpenSans-Semibold.eot'); + src: url('fonts/Semibold/OpenSans-Semibold.eot?#iefix') format('embedded-opentype'), + url('fonts/Semibold/OpenSans-Semibold.woff') format('woff'), + url('fonts/Semibold/OpenSans-Semibold.ttf') format('truetype'), + url('fonts/Semibold/OpenSans-Semibold.svg#OpenSansSemibold') format('svg'); + font-weight: 600; + font-style: normal; +} +/* END Semibold */ + +/* BEGIN Semibold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/SemiboldItalic/OpenSans-SemiboldItalic.eot'); + src: url('fonts/SemiboldItalic/OpenSans-SemiboldItalic.eot?#iefix') format('embedded-opentype'), + url('fonts/SemiboldItalic/OpenSans-SemiboldItalic.woff') format('woff'), + url('fonts/SemiboldItalic/OpenSans-SemiboldItalic.ttf') format('truetype'), + url('fonts/SemiboldItalic/OpenSans-SemiboldItalic.svg#OpenSansSemiboldItalic') format('svg'); + font-weight: 600; + font-style: italic; +} +/* END Semibold Italic */ + +/* BEGIN Bold */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/Bold/OpenSans-Bold.eot'); + src: url('fonts/Bold/OpenSans-Bold.eot?#iefix') format('embedded-opentype'), + url('fonts/Bold/OpenSans-Bold.woff') format('woff'), + url('fonts/Bold/OpenSans-Bold.ttf') format('truetype'), + url('fonts/Bold/OpenSans-Bold.svg#OpenSansBold') format('svg'); + font-weight: bold; + font-style: normal; +} +/* END Bold */ + +/* BEGIN Bold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/BoldItalic/OpenSans-BoldItalic.eot'); + src: url('fonts/BoldItalic/OpenSans-BoldItalic.eot?#iefix') format('embedded-opentype'), + url('fonts/BoldItalic/OpenSans-BoldItalic.woff') format('woff'), + url('fonts/BoldItalic/OpenSans-BoldItalic.ttf') format('truetype'), + url('fonts/BoldItalic/OpenSans-BoldItalic.svg#OpenSansBoldItalic') format('svg'); + font-weight: bold; + font-style: italic; +} +/* END Bold Italic */ + +/* BEGIN Extrabold */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/ExtraBold/OpenSans-ExtraBold.eot'); + src: url('fonts/ExtraBold/OpenSans-ExtraBold.eot?#iefix') format('embedded-opentype'), + url('fonts/ExtraBold/OpenSans-ExtraBold.woff') format('woff'), + url('fonts/ExtraBold/OpenSans-ExtraBold.ttf') format('truetype'), + url('fonts/ExtraBold/OpenSans-ExtraBold.svg#OpenSansExtrabold') format('svg'); + font-weight: 800; + font-style: normal; +} +/* END Extrabold */ + +/* BEGIN Extrabold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot'); + src: url('fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot?#iefix') format('embedded-opentype'), + url('fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff') format('woff'), + url('fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.ttf') format('truetype'), + url('fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.svg#OpenSansExtraboldItalic') format('svg'); + font-weight: 800; + font-style: italic; +} +/* END Extrabold Italic */ diff --git a/1.2.17/docs/components/open-sans-fontface-1.0.4/open-sans.less b/1.2.17/docs/components/open-sans-fontface-1.0.4/open-sans.less new file mode 100644 index 0000000000..236a402e96 --- /dev/null +++ b/1.2.17/docs/components/open-sans-fontface-1.0.4/open-sans.less @@ -0,0 +1,133 @@ +/* Open Sans @font-face kit */ + +@OpenSansPath: "./fonts"; + +/* BEGIN Light */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/Light/OpenSans-Light.eot'); + src: url('@{OpenSansPath}/Light/OpenSans-Light.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/Light/OpenSans-Light.woff') format('woff'), + url('@{OpenSansPath}/Light/OpenSans-Light.ttf') format('truetype'), + url('@{OpenSansPath}/Light/OpenSans-Light.svg#OpenSansLight') format('svg'); + font-weight: 300; + font-style: normal; +} +/* END Light */ + +/* BEGIN Light Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.eot'); + src: url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.woff') format('woff'), + url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.ttf') format('truetype'), + url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.svg#OpenSansLightItalic') format('svg'); + font-weight: 300; + font-style: italic; +} +/* END Light Italic */ + +/* BEGIN Regular */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/Regular/OpenSans-Regular.eot'); + src: url('@{OpenSansPath}/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/Regular/OpenSans-Regular.woff') format('woff'), + url('@{OpenSansPath}/Regular/OpenSans-Regular.ttf') format('truetype'), + url('@{OpenSansPath}/Regular/OpenSans-Regular.svg#OpenSansRegular') format('svg'); + font-weight: normal; + font-style: normal; +} +/* END Regular */ + +/* BEGIN Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/Italic/OpenSans-Italic.eot'); + src: url('@{OpenSansPath}/Italic/OpenSans-Italic.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/Italic/OpenSans-Italic.woff') format('woff'), + url('@{OpenSansPath}/Italic/OpenSans-Italic.ttf') format('truetype'), + url('@{OpenSansPath}/Italic/OpenSans-Italic.svg#OpenSansItalic') format('svg'); + font-weight: normal; + font-style: italic; +} +/* END Italic */ + +/* BEGIN Semibold */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/Semibold/OpenSans-Semibold.eot'); + src: url('@{OpenSansPath}/Semibold/OpenSans-Semibold.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/Semibold/OpenSans-Semibold.woff') format('woff'), + url('@{OpenSansPath}/Semibold/OpenSans-Semibold.ttf') format('truetype'), + url('@{OpenSansPath}/Semibold/OpenSans-Semibold.svg#OpenSansSemibold') format('svg'); + font-weight: 600; + font-style: normal; +} +/* END Semibold */ + +/* BEGIN Semibold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot'); + src: url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.woff') format('woff'), + url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.ttf') format('truetype'), + url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.svg#OpenSansSemiboldItalic') format('svg'); + font-weight: 600; + font-style: italic; +} +/* END Semibold Italic */ + +/* BEGIN Bold */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/Bold/OpenSans-Bold.eot'); + src: url('@{OpenSansPath}/Bold/OpenSans-Bold.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/Bold/OpenSans-Bold.woff') format('woff'), + url('@{OpenSansPath}/Bold/OpenSans-Bold.ttf') format('truetype'), + url('@{OpenSansPath}/Bold/OpenSans-Bold.svg#OpenSansBold') format('svg'); + font-weight: bold; + font-style: normal; +} +/* END Bold */ + +/* BEGIN Bold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot'); + src: url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.woff') format('woff'), + url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.ttf') format('truetype'), + url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.svg#OpenSansBoldItalic') format('svg'); + font-weight: bold; + font-style: italic; +} +/* END Bold Italic */ + +/* BEGIN Extrabold */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot'); + src: url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.woff') format('woff'), + url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.ttf') format('truetype'), + url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.svg#OpenSansExtrabold') format('svg'); + font-weight: 800; + font-style: normal; +} +/* END Extrabold */ + +/* BEGIN Extrabold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot'); + src: url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot?#iefix') format('embedded-opentype'), + url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff') format('woff'), + url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.ttf') format('truetype'), + url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.svg#OpenSansExtraboldItalic') format('svg'); + font-weight: 800; + font-style: italic; +} +/* END Extrabold Italic */ diff --git a/1.2.17/docs/components/open-sans-fontface-1.0.4/open-sans.scss b/1.2.17/docs/components/open-sans-fontface-1.0.4/open-sans.scss new file mode 100644 index 0000000000..a46063fbb3 --- /dev/null +++ b/1.2.17/docs/components/open-sans-fontface-1.0.4/open-sans.scss @@ -0,0 +1,133 @@ +/* Open Sans @font-face kit */ + +$OpenSansPath: "./fonts" !default; + +/* BEGIN Light */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/Light/OpenSans-Light.eot'); + src: url('#{$OpenSansPath}/Light/OpenSans-Light.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/Light/OpenSans-Light.woff') format('woff'), + url('#{$OpenSansPath}/Light/OpenSans-Light.ttf') format('truetype'), + url('#{$OpenSansPath}/Light/OpenSans-Light.svg#OpenSansLight') format('svg'); + font-weight: 300; + font-style: normal; +} +/* END Light */ + +/* BEGIN Light Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/LightItalic/OpenSans-LightItalic.eot'); + src: url('#{$OpenSansPath}/LightItalic/OpenSans-LightItalic.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/LightItalic/OpenSans-LightItalic.woff') format('woff'), + url('#{$OpenSansPath}/LightItalic/OpenSans-LightItalic.ttf') format('truetype'), + url('#{$OpenSansPath}/LightItalic/OpenSans-LightItalic.svg#OpenSansLightItalic') format('svg'); + font-weight: 300; + font-style: italic; +} +/* END Light Italic */ + +/* BEGIN Regular */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/Regular/OpenSans-Regular.eot'); + src: url('#{$OpenSansPath}/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/Regular/OpenSans-Regular.woff') format('woff'), + url('#{$OpenSansPath}/Regular/OpenSans-Regular.ttf') format('truetype'), + url('#{$OpenSansPath}/Regular/OpenSans-Regular.svg#OpenSansRegular') format('svg'); + font-weight: normal; + font-style: normal; +} +/* END Regular */ + +/* BEGIN Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/Italic/OpenSans-Italic.eot'); + src: url('#{$OpenSansPath}/Italic/OpenSans-Italic.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/Italic/OpenSans-Italic.woff') format('woff'), + url('#{$OpenSansPath}/Italic/OpenSans-Italic.ttf') format('truetype'), + url('#{$OpenSansPath}/Italic/OpenSans-Italic.svg#OpenSansItalic') format('svg'); + font-weight: normal; + font-style: italic; +} +/* END Italic */ + +/* BEGIN Semibold */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/Semibold/OpenSans-Semibold.eot'); + src: url('#{$OpenSansPath}/Semibold/OpenSans-Semibold.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/Semibold/OpenSans-Semibold.woff') format('woff'), + url('#{$OpenSansPath}/Semibold/OpenSans-Semibold.ttf') format('truetype'), + url('#{$OpenSansPath}/Semibold/OpenSans-Semibold.svg#OpenSansSemibold') format('svg'); + font-weight: 600; + font-style: normal; +} +/* END Semibold */ + +/* BEGIN Semibold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot'); + src: url('#{$OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.woff') format('woff'), + url('#{$OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.ttf') format('truetype'), + url('#{$OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.svg#OpenSansSemiboldItalic') format('svg'); + font-weight: 600; + font-style: italic; +} +/* END Semibold Italic */ + +/* BEGIN Bold */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/Bold/OpenSans-Bold.eot'); + src: url('#{$OpenSansPath}/Bold/OpenSans-Bold.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/Bold/OpenSans-Bold.woff') format('woff'), + url('#{$OpenSansPath}/Bold/OpenSans-Bold.ttf') format('truetype'), + url('#{$OpenSansPath}/Bold/OpenSans-Bold.svg#OpenSansBold') format('svg'); + font-weight: bold; + font-style: normal; +} +/* END Bold */ + +/* BEGIN Bold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot'); + src: url('#{$OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/BoldItalic/OpenSans-BoldItalic.woff') format('woff'), + url('#{$OpenSansPath}/BoldItalic/OpenSans-BoldItalic.ttf') format('truetype'), + url('#{$OpenSansPath}/BoldItalic/OpenSans-BoldItalic.svg#OpenSansBoldItalic') format('svg'); + font-weight: bold; + font-style: italic; +} +/* END Bold Italic */ + +/* BEGIN Extrabold */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot'); + src: url('#{$OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/ExtraBold/OpenSans-ExtraBold.woff') format('woff'), + url('#{$OpenSansPath}/ExtraBold/OpenSans-ExtraBold.ttf') format('truetype'), + url('#{$OpenSansPath}/ExtraBold/OpenSans-ExtraBold.svg#OpenSansExtrabold') format('svg'); + font-weight: 800; + font-style: normal; +} +/* END Extrabold */ + +/* BEGIN Extrabold Italic */ +@font-face { + font-family: 'Open Sans'; + src: url('#{$OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot'); + src: url('#{$OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot?#iefix') format('embedded-opentype'), + url('#{$OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff') format('woff'), + url('#{$OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.ttf') format('truetype'), + url('#{$OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.svg#OpenSansExtraboldItalic') format('svg'); + font-weight: 800; + font-style: italic; +} +/* END Extrabold Italic */ diff --git a/1.2.17/docs/css/animations.css b/1.2.17/docs/css/animations.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/1.2.17/docs/css/doc_widgets.css b/1.2.17/docs/css/doc_widgets.css new file mode 100644 index 0000000000..587d5a7e3c --- /dev/null +++ b/1.2.17/docs/css/doc_widgets.css @@ -0,0 +1,150 @@ +ul.doc-example { + list-style-type: none; + position: relative; + font-size: 14px; +} + +ul.doc-example > li { + border: 2px solid gray; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background-color: white; + margin-bottom: 20px; +} + +ul.doc-example > li.doc-example-heading { + border: none; + border-radius: 0; + margin-bottom: -10px; +} + +span.nojsfiddle { + float: right; + font-size: 14px; + margin-right:10px; + margin-top: 10px; +} + +form.jsfiddle { + position: absolute; + right: 0; + z-index: 1; + height: 14px; +} + +form.jsfiddle button { + cursor: pointer; + padding: 4px 10px; + margin: 10px; + background-color: #FFF; + font-weight: bold; + color: #7989D6; + border-color: #7989D6; + -moz-border-radius: 8px; + -webkit-border-radius:8px; + border-radius: 8px; +} + +form.jsfiddle textarea, form.jsfiddle input { + display: none; +} + +li.doc-example-live { + padding: 10px; + font-size: 1.2em; +} + +div.syntaxhighlighter { + padding-bottom: 1px !important; /* fix to remove unnecessary scrollbars http://is.gd/gSMgC */ +} + +/* TABS - tutorial environment navigation */ + +div.tabs-nav { + height: 25px; + position: relative; +} + +div.tabs-nav ul li { + list-style: none; + display: inline-block; + padding: 5px 10px; +} + +div.tabs-nav ul li.current a { + color: white; + text-decoration: none; +} + +div.tabs-nav ul li.current { + background: #7989D6; + -moz-box-shadow: 4px 4px 6px #48577D; + -moz-border-radius-topright: 8px; + -moz-border-radius-topleft: 8px; + box-shadow: 4px 4px 6px #48577D; + border-radius-topright: 8px; + border-radius-topleft: 8px; + -webkit-box-shadow: 4px 4px 6px #48577D; + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + border-top-right-radius: 8px; + border-top-left-radius: 8px; +} + +div.tabs-content { + padding: 4px; + position: relative; + background: #7989D6; + -moz-border-radius: 8px; + border-radius: 8px; + -webkit-border-radius: 8px; +} + +div.tabs-content-inner { + margin: 1px; + padding: 10px; + background: white; + border-radius: 6px; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; +} + + +/* Tutorial Nav Bar */ + +#tutorial-nav { + margin: 0.5em 0 1em 0; + padding: 0; + list-style-type: none; + background: #7989D6; + + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; + + -moz-box-shadow: 4px 4px 6px #48577D; + -webkit-box-shadow: 4px 4px 6px #48577D; + box-shadow: 4px 4px 6px #48577D; +} + + +#tutorial-nav li { + display: inline; +} + + +#tutorial-nav a:link, #tutorial-nav a:visited { + font-size: 1.2em; + color: #FFF; + text-decoration: none; + text-align: center; + display: inline-block; + width: 11em; + padding: 0.2em 0; +} + + +#tutorial-nav a:hover { + color: #000; +} diff --git a/1.2.17/docs/css/docs.css b/1.2.17/docs/css/docs.css new file mode 100644 index 0000000000..ea7821d1c6 --- /dev/null +++ b/1.2.17/docs/css/docs.css @@ -0,0 +1,686 @@ +html, body { + position:relative; + height:100%; +} + +#wrapper { + min-height:100%; + position:relative; + padding-bottom:120px; +} + +.footer { + border-top:20px solid white; + position:absolute; + bottom:0; + left:0; + right:0; + z-index:100; + padding-top: 2em; + background-color: #333; + color: white; + padding-bottom: 2em; +} + +.header-fixed { + position:fixed; + z-index:1000; + top:0; + left:0; + right:0; +} + +.header-branding { + min-height:41px!important; +} + +.docs-navbar-primary { + border-radius:0!important; + margin-bottom:0!important; +} + +/* Logo */ +/*.dropdown-menu { + display:none; +} +*/ +h1,h2,h3,h4,h5,h6 { + font-family: "Open Sans"; +} + +.subnav-body { + margin:70px 0 20px; +} + +.header .brand { + padding-top: 6px; + padding-bottom: 0px; +} + +.header .brand img { + margin-top:5px; + height: 30px; +} + +.docs-search { + margin:10px 0; + padding:4px 0 4px 20px; + background:white; + border-radius:20px; + vertical-align:middle; +} + +.docs-search > .search-query { + font-size:14px; + border:0; + width:80%; + color:#555; +} + +.docs-search > .search-icon { + font-size:15px; + margin-right:10px; +} + +.docs-search > .search-query:focus { + outline:0; +} + +/* end: Logo */ + + +.spacer { + height: 1em; +} + + +.icon-cog { + line-height: 13px; +} + +.naked-list, +.naked-list ul, +.naked-list li { + list-style:none; + margin:0; + padding:0; +} + +.nav-index-section a { + font-weight:bold; + font-family: "Open Sans"; + color:black!important; + margin-top:10px; + display:block; +} + +.nav-index-group { + margin-bottom:20px!important; +} + +.nav-index-group-heading { + color:#6F0101; + font-weight:bold; + font-size:1.2em; + padding:0; + margin:0; + border-bottom:1px soild #aaa; + margin-bottom:5px; +} + +.nav-breadcrumb { + margin:4px 0; + padding:0; +} + +.nav-breadcrumb-entry { + font-family: "Open Sans"; + padding:0; + margin:0; + font-size:18px; + display:inline-block; + vertical-align:middle; +} + +.nav-breadcrumb-entry > .divider { + color:#555; + display:inline-block; + padding-left:8px; +} + +.nav-breadcrumb-entry > span, +.nav-breadcrumb-entry > a { + color:#6F0101; +} + +.step-list > li:nth-child(1) { + padding-left:20px; +} + +.step-list > li:nth-child(2) { + padding-left:40px; +} + +.step-list > li:nth-child(3) { + padding-left:60px; +} + +.api-profile-header-heading { + margin:0; + padding:0; +} + +.api-profile-header-structure, +.api-profile-header-structure a { + font-family: "Open Sans"; + font-weight:bold; + color:#999; +} + +.api-profile-section { + margin-top:30px; + padding-top:30px; + border-top:1px solid #aaa; +} + +pre { + white-space: pre-wrap; + word-break: normal; +} + +.aside-nav a, +.aside-nav a:link, +.aside-nav a:visited, +.aside-nav a:active { + color:#999; +} +.aside-nav a:hover { + color:black; +} + +.api-profile-description > p:first-child { + margin:15px 0; + font-size:18px; +} + +p > code, +code.highlighted { + background:#f4f4f4; + border-radius:5px; + padding:2px 5px; + color:maroon; +} + +.docs-version-jump { + min-width:100%; + max-width:100%; +} + +.picker { + position: relative; + width: auto; + display: inline-block; + margin: 0 0 2px 1.2%; + overflow: hidden; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + font-family: "Open Sans"; + font-weight: 600; + height: auto; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #f2f2f2)); + background-image: -webkit-linear-gradient(#ffffff, #f2f2f2); + background-image: -moz-linear-gradient(#ffffff, #f2f2f2); + background-image: -o-linear-gradient(#ffffff, #f2f2f2); + background-image: linear-gradient(#ffffff, #f2f2f2); +} + +.picker select { + position: relative; + display: block; + min-width: 100%; + width: 120%; + height: 34px; + padding: 6px 30px 6px 15px; + color: #555555; + border: none; + background: transparent; + outline: none; + -webkit-appearance: none; + z-index: 99; + cursor: pointer; + font-size: 16px; + -moz-appearance: none; + text-indent: 0.01px; + text-overflow: ''; +} + +.picker:after { + content:""; + position: absolute; + right: 8%; + top: 50%; + z-index: 0; + color: #999; + width: 0; + margin-top:-2px; + height: 0; + border-top: 6px solid; + border-right: 6px solid transparent; + border-left: 6px solid transparent; +} + +iframe.example { + width: 100%; + border: 1px solid black; +} + +.search-results-frame { + clear:both; + display:table; + width:100%; +} + +.search-results.ng-hide { + display:none; +} + +.search-results-container { + padding-bottom:1em; + border-top:1px solid #111; + background:#181818; + box-shadow:inset 0 0 10px #111; +} + +.search-results-container .search-results-group { + vertical-align:top; + padding:10px 10px; + display:inline-block; +} + +.search-results-group-heading { + font-family: "Open Sans"; + padding-left:10px; + color:white; +} + +.search-results-frame > .search-results-group:first-child > .search-results { + border-right:1px solid #050505; +} + +.search-results-group.col-group-api { width:30%; } +.search-results-group.col-group-guide { width:30%; } +.search-results-group.col-group-tutorial { width:25%; } +.search-results-group.col-group-misc, +.search-results-group.col-group-error { float:right; clear:both; width:15% } + + +.search-results-group.col-group-api .search-result { + width:48%; + display:inline-block; +} + +.search-close { + position: absolute; + bottom: 0; + left: 50%; + margin-left: -100px; + color: white; + text-align: center; + padding: 5px; + background: #333; + border-top-right-radius: 5px; + border-top-left-radius: 5px; + width: 200px; + box-shadow:0 0 10px #111; +} + +.variables-matrix { + border:1px solid #ddd; + width:100%; + margin:10px 0; +} + +.variables-matrix td, +.variables-matrix th { + padding:10px; +} + +.variables-matrix td { + border-top:1px solid #eee; +} + +.variables-matrix td + td, +.variables-matrix th + th { + border-left:1px solid #eee; +} + +.variables-matrix tr:nth-child(even) td { + background:#f5f5f5; +} + +.variables-matrix th { + background:#f1f1f1; +} + +.sup-header { + padding-top:10px; + padding-bottom:5px; + background:rgba(245,245,245,0.88); + box-shadow:0 0 2px #999; +} + +.main-body-grid { + margin-top:120px; + position:relative; +} + +.main-body-grid > .grid-left, +.main-body-grid > .grid-right { + padding:20px 0; +} + +.main-body-grid > .grid-left { + position:fixed; + top:120px; + bottom:0; + padding-bottom:120px; + overflow:auto; +} + +.main-header-grid > .grid-left, +.main-body-grid > .grid-left { + width:260px; +} + +.main-header-grid > .grid-right, +.main-body-grid > .grid-right { + margin-left:270px; + position:relative; +} + +.main-header-grid > .grid-left { + float:left; +} + +.main-body-grid .side-navigation { + position:relative; +} + +.main-body-grid .side-navigation.ng-hide { + display:block!important; +} + +.variables-matrix td { + vertical-align:top; + padding:5px; +} + +.type-hint { + display:inline-block; + background: gray; +} + +.variables-matrix .type-hint { + text-align:center; + min-width:60px; + margin:1px 5px; +} + +.type-hint + .type-hint { + margin-top:5px; +} + +.type-hint-expression { + background:purple; +} + +.type-hint-date { + background:pink; +} + +.type-hint-string { + background:#3a87ad; +} + +.type-hint-function { + background:green; +} + +.type-hint-object { + background:#999; +} + +.type-hint-array { + background:#F90;; +} + +.type-hint-boolean { + background:rgb(18, 131, 39); +} + +.type-hint-number { + background:rgb(189, 63, 66); +} + +.type-hint-regexp { + background: rgb(90, 84, 189); +} + +.type-hint-domelement { + background: rgb(95, 158, 160); +} + +.runnable-example-frame { + width:100%; + height:300px; + border: 1px solid #ddd; + border-radius:5px; +} + +.runnable-example-tabs { + margin-top:10px; + margin-bottom:20px; +} + +.tutorial-nav { + display:block; +} + +h1 + ul, h1 + ul > li, +h2 + ul, h2 + ul > li, +ul.tutorial-nav, ul.tutorial-nav > li, +.usage > ul, .usage > ul > li, +ul.methods, ul.methods > li, +ul.events, ul.events > li { + list-style:none; + padding:0; +} + +h2 { + border-top:1px solid #eee; + margin-top:30px; + padding-top:30px; +} + +h4 { + margin-top:20px; + padding-top:20px; +} + +.btn { + color:#428bca; + position: relative; + width: auto; + display: inline-block; + margin: 0 0 2px; + overflow: hidden; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + font-family: "Open Sans"; + font-weight: 600; + height: auto; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #f2f2f2)); + background-image: -webkit-linear-gradient(#ffffff, #f2f2f2); + background-image: -moz-linear-gradient(#ffffff, #f2f2f2); + background-image: -o-linear-gradient(#ffffff, #f2f2f2); + background-image: linear-gradient(#ffffff, #f2f2f2); +} + +.btn + .btn { + margin-left:10px; +} + +.btn:hover { + color:black!important; + border: 1px solid #ddd!important; + background:white!important; +} + +.view-source, .improve-docs { + position:relative; + z-index:100; +} + +.view-source { + margin-right:10px; +} + +.improve-docs { + float:right; +} + +.return-arguments, +.return-arguments th, +.return-arguments th + th, +.return-arguments td, +.return-arguments td + td { + border-radius:0; + border:0; +} + +.return-arguments td:first-child { + width:100px; +} + +ul.methods > li, +ul.events > li { + margin-bottom:40px; +} + +@media only screen and (min-width: 769px) and (max-width: 991px) { + .main-body-grid { + margin-top: 160px; + } + .main-body-grid > .grid-left { + top: 160px; + } +} + +@media only screen and (max-width : 768px) { + .picker, .picker select { + width:auto; + display:block; + margin-bottom:10px; + } + .docs-navbar-primary { + text-align:center; + } + .main-body-grid { + margin-top:0; + } + .main-header-grid > .grid-left, + .main-body-grid > .grid-left, + .main-header-grid > .grid-right, + .main-body-grid > .grid-right { + display:block; + float:none; + width:auto!important; + margin-left:0; + } + .main-body-grid > .grid-left, + .header-fixed, .footer { + position:static!important; + } + .main-body-grid > .grid-left { + background:#efefef; + margin-left:-1em; + margin-right:-1em; + padding:1em; + width:auto!important; + overflow:visible; + } + .main-header-grid > .grid-right, + .main-body-grid > .grid-right { + margin-left:0; + } + .main-body-grid .side-navigation { + display:block!important; + } + .main-body-grid .side-navigation.ng-hide { + display:none!important; + } + .nav-index-group .nav-index-listing { + display:inline-block; + padding:3px 0; + } + .nav-index-group .nav-index-listing:not(.nav-index-section) + .nav-index-listing:not(.nav-index-section):after { + padding-right:5px; + content:", "; + } + .nav-index-group .nav-index-listing:last-child { + content:""; + } + .nav-index-group .nav-index-section { + display:block; + } + .toc-toggle { + margin-bottom:20px; + } + .toc-close { + position: absolute; + bottom: -50px; + left: 50%; + margin-left: -50%; + text-align: center; + padding: 5px; + background: #eee; + border-radius: 5px; + width: 90%; + border:1px solid #ddd; + box-shadow:0 0 10px #bbb; + } + .navbar-brand { + float:none; + text-align:center; + } + .search-results-container { + padding-bottom:60px; + text-align:left; + } + .search-results-group { + float:none!important; + display:block!important; + width:auto!important; + border:0!important; + padding:0!important; + } + .search-results-group .search-result { + display:inline-block!important; + padding:0 5px; + width:auto!important; + } + .search-results-group .search-result:after { + content:", "; + } + #wrapper { + padding-bottom:0px; + } +} diff --git a/1.2.17/docs/css/prettify-theme.css b/1.2.17/docs/css/prettify-theme.css new file mode 100644 index 0000000000..86595bcea9 --- /dev/null +++ b/1.2.17/docs/css/prettify-theme.css @@ -0,0 +1,138 @@ +/* GitHub Theme */ +.prettyprint { + background: white; + font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace; + font-size: 12px; + line-height: 1.5; +} + +.pln { + color: #333333; +} + +@media screen { + .str { + color: #dd1144; + } + + .kwd { + color: #333333; + } + + .com { + color: #999988; + } + + .typ { + color: #445588; + } + + .lit { + color: #445588; + } + + .pun { + color: #333333; + } + + .opn { + color: #333333; + } + + .clo { + color: #333333; + } + + .tag { + color: navy; + } + + .atn { + color: teal; + } + + .atv { + color: #dd1144; + } + + .dec { + color: #333333; + } + + .var { + color: teal; + } + + .fun { + color: #990000; + } +} +@media print, projection { + .str { + color: #006600; + } + + .kwd { + color: #006; + font-weight: bold; + } + + .com { + color: #600; + font-style: italic; + } + + .typ { + color: #404; + font-weight: bold; + } + + .lit { + color: #004444; + } + + .pun, .opn, .clo { + color: #444400; + } + + .tag { + color: #006; + font-weight: bold; + } + + .atn { + color: #440044; + } + + .atv { + color: #006600; + } +} +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; +} + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L4, +li.L5, +li.L6, +li.L7, +li.L8, +li.L9 { + /* */ +} + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + /* */ +} diff --git a/1.2.17/docs/css/prettify.css b/1.2.17/docs/css/prettify.css new file mode 100644 index 0000000000..16e0cafbfe --- /dev/null +++ b/1.2.17/docs/css/prettify.css @@ -0,0 +1,51 @@ +.pln { color: #000 } /* plain text */ + +@media screen { + .str { color: #080 } /* string content */ + .kwd { color: #008 } /* a keyword */ + .com { color: #800 } /* a comment */ + .typ { color: #606 } /* a type name */ + .lit { color: #066 } /* a literal value */ + /* punctuation, lisp open bracket, lisp close bracket */ + .pun, .opn, .clo { color: #660 } + .tag { color: #008 } /* a markup tag name */ + .atn { color: #606 } /* a markup attribute name */ + .atv { color: #080 } /* a markup attribute value */ + .dec, .var { color: #606 } /* a declaration; a variable name */ + .fun { color: red } /* a function name */ +} + +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { color: #060 } + .kwd { color: #006; font-weight: bold } + .com { color: #600; font-style: italic } + .typ { color: #404; font-weight: bold } + .lit { color: #044 } + .pun, .opn, .clo { color: #440 } + .tag { color: #006; font-weight: bold } + .atn { color: #404 } + .atv { color: #060 } +} + +pre.prettyprint { + padding: 8px; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; +} +pre.prettyprint.linenums { + -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; + -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; + box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; +} +ol.linenums { + margin: 0 0 0 33px; /* IE indents via margin-left */ +} +ol.linenums li { + padding-left: 12px; + font-size:12px; + color: #bebec5; + line-height: 18px; + text-shadow: 0 1px 0 #fff; + list-style-type:decimal!important; +} diff --git a/1.2.17/docs/examples/example-$filter/index-debug.html b/1.2.17/docs/examples/example-$filter/index-debug.html new file mode 100644 index 0000000000..51bf6e5058 --- /dev/null +++ b/1.2.17/docs/examples/example-$filter/index-debug.html @@ -0,0 +1,20 @@ + + + + + Example - example-$filter-debug + + + + + + + + + +
+

{{ originalText }}

+

{{ filteredText }}

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$filter/index-jquery.html b/1.2.17/docs/examples/example-$filter/index-jquery.html new file mode 100644 index 0000000000..e1800097ed --- /dev/null +++ b/1.2.17/docs/examples/example-$filter/index-jquery.html @@ -0,0 +1,21 @@ + + + + + Example - example-$filter-jquery + + + + + + + + + + +
+

{{ originalText }}

+

{{ filteredText }}

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$filter/index-production.html b/1.2.17/docs/examples/example-$filter/index-production.html new file mode 100644 index 0000000000..8567387002 --- /dev/null +++ b/1.2.17/docs/examples/example-$filter/index-production.html @@ -0,0 +1,20 @@ + + + + + Example - example-$filter-production + + + + + + + + + +
+

{{ originalText }}

+

{{ filteredText }}

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$filter/index.html b/1.2.17/docs/examples/example-$filter/index.html new file mode 100644 index 0000000000..b4924a6f9c --- /dev/null +++ b/1.2.17/docs/examples/example-$filter/index.html @@ -0,0 +1,20 @@ + + + + + Example - example-$filter + + + + + + + + + +
+

{{ originalText }}

+

{{ filteredText }}

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$filter/manifest.json b/1.2.17/docs/examples/example-$filter/manifest.json new file mode 100644 index 0000000000..0d2a67bb53 --- /dev/null +++ b/1.2.17/docs/examples/example-$filter/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-$filter", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$filter/script.js b/1.2.17/docs/examples/example-$filter/script.js new file mode 100644 index 0000000000..1fa286a06b --- /dev/null +++ b/1.2.17/docs/examples/example-$filter/script.js @@ -0,0 +1,5 @@ + angular.module('filterExample', []) + .controller('MainCtrl', function($scope, $filter) { + $scope.originalText = 'hello'; + $scope.filteredText = $filter('uppercase')($scope.originalText); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$route-service/book.html b/1.2.17/docs/examples/example-$route-service/book.html new file mode 100644 index 0000000000..94e4b4bf95 --- /dev/null +++ b/1.2.17/docs/examples/example-$route-service/book.html @@ -0,0 +1,2 @@ + controller: {{name}}
+ Book Id: {{params.bookId}}
\ No newline at end of file diff --git a/1.2.17/docs/examples/example-$route-service/chapter.html b/1.2.17/docs/examples/example-$route-service/chapter.html new file mode 100644 index 0000000000..43b15f580f --- /dev/null +++ b/1.2.17/docs/examples/example-$route-service/chapter.html @@ -0,0 +1,3 @@ + controller: {{name}}
+ Book Id: {{params.bookId}}
+ Chapter Id: {{params.chapterId}} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$route-service/index-debug.html b/1.2.17/docs/examples/example-$route-service/index-debug.html new file mode 100644 index 0000000000..2c2b009094 --- /dev/null +++ b/1.2.17/docs/examples/example-$route-service/index-debug.html @@ -0,0 +1,37 @@ + + + + + Example - example-$route-service-debug + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+ +
+ +
$location.path() = {{$location.path()}}
+
$route.current.templateUrl = {{$route.current.templateUrl}}
+
$route.current.params = {{$route.current.params}}
+
$route.current.scope.name = {{$route.current.scope.name}}
+
$routeParams = {{$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$route-service/index-jquery.html b/1.2.17/docs/examples/example-$route-service/index-jquery.html new file mode 100644 index 0000000000..051254d7c3 --- /dev/null +++ b/1.2.17/docs/examples/example-$route-service/index-jquery.html @@ -0,0 +1,38 @@ + + + + + Example - example-$route-service-jquery + + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+ +
+ +
$location.path() = {{$location.path()}}
+
$route.current.templateUrl = {{$route.current.templateUrl}}
+
$route.current.params = {{$route.current.params}}
+
$route.current.scope.name = {{$route.current.scope.name}}
+
$routeParams = {{$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$route-service/index-production.html b/1.2.17/docs/examples/example-$route-service/index-production.html new file mode 100644 index 0000000000..223cc62de0 --- /dev/null +++ b/1.2.17/docs/examples/example-$route-service/index-production.html @@ -0,0 +1,37 @@ + + + + + Example - example-$route-service-production + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+ +
+ +
$location.path() = {{$location.path()}}
+
$route.current.templateUrl = {{$route.current.templateUrl}}
+
$route.current.params = {{$route.current.params}}
+
$route.current.scope.name = {{$route.current.scope.name}}
+
$routeParams = {{$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$route-service/index.html b/1.2.17/docs/examples/example-$route-service/index.html new file mode 100644 index 0000000000..fa84e3127e --- /dev/null +++ b/1.2.17/docs/examples/example-$route-service/index.html @@ -0,0 +1,37 @@ + + + + + Example - example-$route-service + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+ +
+ +
$location.path() = {{$location.path()}}
+
$route.current.templateUrl = {{$route.current.templateUrl}}
+
$route.current.params = {{$route.current.params}}
+
$route.current.scope.name = {{$route.current.scope.name}}
+
$routeParams = {{$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$route-service/manifest.json b/1.2.17/docs/examples/example-$route-service/manifest.json new file mode 100644 index 0000000000..0156fd11f9 --- /dev/null +++ b/1.2.17/docs/examples/example-$route-service/manifest.json @@ -0,0 +1,10 @@ +{ + "name": "example-$route-service", + "files": [ + "index-production.html", + "book.html", + "chapter.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$route-service/protractor.js b/1.2.17/docs/examples/example-$route-service/protractor.js new file mode 100644 index 0000000000..a0512ced9a --- /dev/null +++ b/1.2.17/docs/examples/example-$route-service/protractor.js @@ -0,0 +1,13 @@ + it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller\: ChapterController/); + expect(content).toMatch(/Book Id\: Moby/); + expect(content).toMatch(/Chapter Id\: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller\: BookController/); + expect(content).toMatch(/Book Id\: Scarlet/); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-$route-service/script.js b/1.2.17/docs/examples/example-$route-service/script.js new file mode 100644 index 0000000000..0c77c4d097 --- /dev/null +++ b/1.2.17/docs/examples/example-$route-service/script.js @@ -0,0 +1,40 @@ + angular.module('ngRouteExample', ['ngRoute']) + + .controller('MainController', function($scope, $route, $routeParams, $location) { + $scope.$route = $route; + $scope.$location = $location; + $scope.$routeParams = $routeParams; + }) + + .controller('BookController', function($scope, $routeParams) { + $scope.name = "BookController"; + $scope.params = $routeParams; + }) + + .controller('ChapterController', function($scope, $routeParams) { + $scope.name = "ChapterController"; + $scope.params = $routeParams; + }) + + .config(function($routeProvider, $locationProvider) { + $routeProvider + .when('/Book/:bookId', { + templateUrl: 'book.html', + controller: 'BookController', + resolve: { + // I will cause a 1 second delay + delay: function($q, $timeout) { + var delay = $q.defer(); + $timeout(delay.resolve, 1000); + return delay.promise; + } + } + }) + .when('/Book/:bookId/ch/:chapterId', { + templateUrl: 'chapter.html', + controller: 'ChapterController' + }); + + // configure html5 to get links working on jsfiddle + $locationProvider.html5Mode(true); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-NgModelController/index-debug.html b/1.2.17/docs/examples/example-NgModelController/index-debug.html new file mode 100644 index 0000000000..c9a5be58dc --- /dev/null +++ b/1.2.17/docs/examples/example-NgModelController/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-NgModelController-debug + + + + + + + + + + + + +
Change me!
+ Required! +
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-NgModelController/index-jquery.html b/1.2.17/docs/examples/example-NgModelController/index-jquery.html new file mode 100644 index 0000000000..b49e994a15 --- /dev/null +++ b/1.2.17/docs/examples/example-NgModelController/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-NgModelController-jquery + + + + + + + + + + + + + +
Change me!
+ Required! +
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-NgModelController/index-production.html b/1.2.17/docs/examples/example-NgModelController/index-production.html new file mode 100644 index 0000000000..b798ff387b --- /dev/null +++ b/1.2.17/docs/examples/example-NgModelController/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-NgModelController-production + + + + + + + + + + + + +
Change me!
+ Required! +
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-NgModelController/index.html b/1.2.17/docs/examples/example-NgModelController/index.html new file mode 100644 index 0000000000..e845b6374a --- /dev/null +++ b/1.2.17/docs/examples/example-NgModelController/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-NgModelController + + + + + + + + + + + + +
Change me!
+ Required! +
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-NgModelController/manifest.json b/1.2.17/docs/examples/example-NgModelController/manifest.json new file mode 100644 index 0000000000..77bb9769d8 --- /dev/null +++ b/1.2.17/docs/examples/example-NgModelController/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-NgModelController", + "files": [ + "index-production.html", + "style.css", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-NgModelController/protractor.js b/1.2.17/docs/examples/example-NgModelController/protractor.js new file mode 100644 index 0000000000..a524f929cc --- /dev/null +++ b/1.2.17/docs/examples/example-NgModelController/protractor.js @@ -0,0 +1,16 @@ +it('should data-bind and become invalid', function() { + if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') { + // SafariDriver can't handle contenteditable + // and Firefox driver can't clear contenteditables very well + return; + } + var contentEditable = element(by.css('[contenteditable]')); + var content = 'Change me!'; + + expect(contentEditable.getText()).toEqual(content); + + contentEditable.clear(); + contentEditable.sendKeys(protractor.Key.BACK_SPACE); + expect(contentEditable.getText()).toEqual(''); + expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/); +}); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-NgModelController/script.js b/1.2.17/docs/examples/example-NgModelController/script.js new file mode 100644 index 0000000000..275f8df3c8 --- /dev/null +++ b/1.2.17/docs/examples/example-NgModelController/script.js @@ -0,0 +1,32 @@ + angular.module('customControl', ['ngSanitize']). + directive('contenteditable', ['$sce', function($sce) { + return { + restrict: 'A', // only activate on element attribute + require: '?ngModel', // get a hold of NgModelController + link: function(scope, element, attrs, ngModel) { + if(!ngModel) return; // do nothing if no ng-model + + // Specify how UI should be updated + ngModel.$render = function() { + element.html($sce.getTrustedHtml(ngModel.$viewValue || '')); + }; + + // Listen for change events to enable binding + element.on('blur keyup change', function() { + scope.$apply(read); + }); + read(); // initialize + + // Write data to the model + function read() { + var html = element.html(); + // When we clear the content editable the browser leaves a
behind + // If strip-br attribute is provided then we strip this out + if( attrs.stripBr && html == '
' ) { + html = ''; + } + ngModel.$setViewValue(html); + } + } + }; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-NgModelController/style.css b/1.2.17/docs/examples/example-NgModelController/style.css new file mode 100644 index 0000000000..e9a4a054d1 --- /dev/null +++ b/1.2.17/docs/examples/example-NgModelController/style.css @@ -0,0 +1,9 @@ + [contenteditable] { + border: 1px solid black; + background-color: white; + min-height: 20px; + } + + .ng-invalid { + border: 1px solid red; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-checkbox-input-directive/index-debug.html b/1.2.17/docs/examples/example-checkbox-input-directive/index-debug.html new file mode 100644 index 0000000000..d4ab65c87a --- /dev/null +++ b/1.2.17/docs/examples/example-checkbox-input-directive/index-debug.html @@ -0,0 +1,28 @@ + + + + + Example - example-checkbox-input-directive-debug + + + + + + + + + + + Value1:
+ Value2:
+ value1 = {{value1}}
+ value2 = {{value2}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-checkbox-input-directive/index-jquery.html b/1.2.17/docs/examples/example-checkbox-input-directive/index-jquery.html new file mode 100644 index 0000000000..526211bf49 --- /dev/null +++ b/1.2.17/docs/examples/example-checkbox-input-directive/index-jquery.html @@ -0,0 +1,29 @@ + + + + + Example - example-checkbox-input-directive-jquery + + + + + + + + + + + + Value1:
+ Value2:
+ value1 = {{value1}}
+ value2 = {{value2}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-checkbox-input-directive/index-production.html b/1.2.17/docs/examples/example-checkbox-input-directive/index-production.html new file mode 100644 index 0000000000..bfe3ca5025 --- /dev/null +++ b/1.2.17/docs/examples/example-checkbox-input-directive/index-production.html @@ -0,0 +1,28 @@ + + + + + Example - example-checkbox-input-directive-production + + + + + + + + + + + Value1:
+ Value2:
+ value1 = {{value1}}
+ value2 = {{value2}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-checkbox-input-directive/index.html b/1.2.17/docs/examples/example-checkbox-input-directive/index.html new file mode 100644 index 0000000000..2ed09d593e --- /dev/null +++ b/1.2.17/docs/examples/example-checkbox-input-directive/index.html @@ -0,0 +1,28 @@ + + + + + Example - example-checkbox-input-directive + + + + + + + + + + + Value1:
+ Value2:
+ value1 = {{value1}}
+ value2 = {{value2}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-checkbox-input-directive/manifest.json b/1.2.17/docs/examples/example-checkbox-input-directive/manifest.json new file mode 100644 index 0000000000..7c0bf82470 --- /dev/null +++ b/1.2.17/docs/examples/example-checkbox-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-checkbox-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-checkbox-input-directive/protractor.js b/1.2.17/docs/examples/example-checkbox-input-directive/protractor.js new file mode 100644 index 0000000000..6de643e7f4 --- /dev/null +++ b/1.2.17/docs/examples/example-checkbox-input-directive/protractor.js @@ -0,0 +1,13 @@ + it('should change state', function() { + var value1 = element(by.binding('value1')); + var value2 = element(by.binding('value2')); + + expect(value1.getText()).toContain('true'); + expect(value2.getText()).toContain('YES'); + + element(by.model('value1')).click(); + element(by.model('value2')).click(); + + expect(value1.getText()).toContain('false'); + expect(value2.getText()).toContain('NO'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-email-input-directive/index-debug.html b/1.2.17/docs/examples/example-email-input-directive/index-debug.html new file mode 100644 index 0000000000..832e085328 --- /dev/null +++ b/1.2.17/docs/examples/example-email-input-directive/index-debug.html @@ -0,0 +1,33 @@ + + + + + Example - example-email-input-directive-debug + + + + + + + + + + + Email: + + Required! + + Not valid email! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.email = {{!!myForm.$error.email}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-email-input-directive/index-jquery.html b/1.2.17/docs/examples/example-email-input-directive/index-jquery.html new file mode 100644 index 0000000000..33f1ace05b --- /dev/null +++ b/1.2.17/docs/examples/example-email-input-directive/index-jquery.html @@ -0,0 +1,34 @@ + + + + + Example - example-email-input-directive-jquery + + + + + + + + + + + + Email: + + Required! + + Not valid email! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.email = {{!!myForm.$error.email}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-email-input-directive/index-production.html b/1.2.17/docs/examples/example-email-input-directive/index-production.html new file mode 100644 index 0000000000..861cd6777a --- /dev/null +++ b/1.2.17/docs/examples/example-email-input-directive/index-production.html @@ -0,0 +1,33 @@ + + + + + Example - example-email-input-directive-production + + + + + + + + + + + Email: + + Required! + + Not valid email! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.email = {{!!myForm.$error.email}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-email-input-directive/index.html b/1.2.17/docs/examples/example-email-input-directive/index.html new file mode 100644 index 0000000000..ea15cc7f0a --- /dev/null +++ b/1.2.17/docs/examples/example-email-input-directive/index.html @@ -0,0 +1,33 @@ + + + + + Example - example-email-input-directive + + + + + + + + + + + Email: + + Required! + + Not valid email! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.email = {{!!myForm.$error.email}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-email-input-directive/manifest.json b/1.2.17/docs/examples/example-email-input-directive/manifest.json new file mode 100644 index 0000000000..a7348f2b92 --- /dev/null +++ b/1.2.17/docs/examples/example-email-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-email-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-email-input-directive/protractor.js b/1.2.17/docs/examples/example-email-input-directive/protractor.js new file mode 100644 index 0000000000..0d7c9a164b --- /dev/null +++ b/1.2.17/docs/examples/example-email-input-directive/protractor.js @@ -0,0 +1,22 @@ + var text = element(by.binding('text')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('text')); + + it('should initialize to model', function() { + expect(text.getText()).toContain('me@example.com'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if not email', function() { + input.clear(); + input.sendKeys('xxx'); + + expect(valid.getText()).toContain('false'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example/index-debug.html b/1.2.17/docs/examples/example-example/index-debug.html new file mode 100644 index 0000000000..7581b11f10 --- /dev/null +++ b/1.2.17/docs/examples/example-example/index-debug.html @@ -0,0 +1,45 @@ + + + + + Example - example-example-debug + + + + + + + + +
+
+Name:
+E-mail:
+Gender: male +female
+ + + +
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example/index-jquery.html b/1.2.17/docs/examples/example-example/index-jquery.html new file mode 100644 index 0000000000..574cf757a4 --- /dev/null +++ b/1.2.17/docs/examples/example-example/index-jquery.html @@ -0,0 +1,46 @@ + + + + + Example - example-example-jquery + + + + + + + + + +
+
+Name:
+E-mail:
+Gender: male +female
+ + + +
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example/index-production.html b/1.2.17/docs/examples/example-example/index-production.html new file mode 100644 index 0000000000..4463622148 --- /dev/null +++ b/1.2.17/docs/examples/example-example/index-production.html @@ -0,0 +1,45 @@ + + + + + Example - example-example-production + + + + + + + + +
+
+Name:
+E-mail:
+Gender: male +female
+ + + +
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example/index.html b/1.2.17/docs/examples/example-example/index.html new file mode 100644 index 0000000000..c316cbabd9 --- /dev/null +++ b/1.2.17/docs/examples/example-example/index.html @@ -0,0 +1,45 @@ + + + + + Example - example-example + + + + + + + + +
+
+Name:
+E-mail:
+Gender: male +female
+ + + +
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example/manifest.json b/1.2.17/docs/examples/example-example/manifest.json new file mode 100644 index 0000000000..afef434e19 --- /dev/null +++ b/1.2.17/docs/examples/example-example/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example1/index-debug.html b/1.2.17/docs/examples/example-example1/index-debug.html new file mode 100644 index 0000000000..fbd55d5d3d --- /dev/null +++ b/1.2.17/docs/examples/example-example1/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example1-debug + + + + + + + + + +
+ I can add: {{a}} + {{b}} = {{ a+b }} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example1/index-jquery.html b/1.2.17/docs/examples/example-example1/index-jquery.html new file mode 100644 index 0000000000..4e64dac9fa --- /dev/null +++ b/1.2.17/docs/examples/example-example1/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example1-jquery + + + + + + + + + + +
+ I can add: {{a}} + {{b}} = {{ a+b }} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example1/index-production.html b/1.2.17/docs/examples/example-example1/index-production.html new file mode 100644 index 0000000000..7e76cb42fd --- /dev/null +++ b/1.2.17/docs/examples/example-example1/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example1-production + + + + + + + + + +
+ I can add: {{a}} + {{b}} = {{ a+b }} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example1/index.html b/1.2.17/docs/examples/example-example1/index.html new file mode 100644 index 0000000000..cd2ad9b769 --- /dev/null +++ b/1.2.17/docs/examples/example-example1/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example1 + + + + + + + + + +
+ I can add: {{a}} + {{b}} = {{ a+b }} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example1/manifest.json b/1.2.17/docs/examples/example-example1/manifest.json new file mode 100644 index 0000000000..add5f56bdc --- /dev/null +++ b/1.2.17/docs/examples/example-example1/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example1", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example1/script.js b/1.2.17/docs/examples/example-example1/script.js new file mode 100644 index 0000000000..68333d37e5 --- /dev/null +++ b/1.2.17/docs/examples/example-example1/script.js @@ -0,0 +1,4 @@ +angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) { + $scope.a = 1; + $scope.b = 2; +}); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example10/index-debug.html b/1.2.17/docs/examples/example-example10/index-debug.html new file mode 100644 index 0000000000..f21f69bf11 --- /dev/null +++ b/1.2.17/docs/examples/example-example10/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example10-debug + + + + + + + + + Check me check multiple:
+
+ Show/Hide me +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example10/index-jquery.html b/1.2.17/docs/examples/example-example10/index-jquery.html new file mode 100644 index 0000000000..5b7929109f --- /dev/null +++ b/1.2.17/docs/examples/example-example10/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example10-jquery + + + + + + + + + + Check me check multiple:
+
+ Show/Hide me +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example10/index-production.html b/1.2.17/docs/examples/example-example10/index-production.html new file mode 100644 index 0000000000..3b83071242 --- /dev/null +++ b/1.2.17/docs/examples/example-example10/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example10-production + + + + + + + + + Check me check multiple:
+
+ Show/Hide me +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example10/index.html b/1.2.17/docs/examples/example-example10/index.html new file mode 100644 index 0000000000..17b09cfea0 --- /dev/null +++ b/1.2.17/docs/examples/example-example10/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example10 + + + + + + + + + Check me check multiple:
+
+ Show/Hide me +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example10/manifest.json b/1.2.17/docs/examples/example-example10/manifest.json new file mode 100644 index 0000000000..947ad10326 --- /dev/null +++ b/1.2.17/docs/examples/example-example10/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example10", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example10/protractor.js b/1.2.17/docs/examples/example-example10/protractor.js new file mode 100644 index 0000000000..1f2c684ba9 --- /dev/null +++ b/1.2.17/docs/examples/example-example10/protractor.js @@ -0,0 +1,5 @@ + it('should toggle open', function() { + expect(element(by.id('details')).getAttribute('open')).toBeFalsy(); + element(by.model('open')).click(); + expect(element(by.id('details')).getAttribute('open')).toBeTruthy(); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example100/index-debug.html b/1.2.17/docs/examples/example-example100/index-debug.html new file mode 100644 index 0000000000..ba0c5a019b --- /dev/null +++ b/1.2.17/docs/examples/example-example100/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-example100-debug + + + + + + + + + +
Some
+
model = {{content}}
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example100/index-jquery.html b/1.2.17/docs/examples/example-example100/index-jquery.html new file mode 100644 index 0000000000..29b90685c6 --- /dev/null +++ b/1.2.17/docs/examples/example-example100/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-example100-jquery + + + + + + + + + + +
Some
+
model = {{content}}
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example100/index-production.html b/1.2.17/docs/examples/example-example100/index-production.html new file mode 100644 index 0000000000..5ad80b257d --- /dev/null +++ b/1.2.17/docs/examples/example-example100/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-example100-production + + + + + + + + + +
Some
+
model = {{content}}
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example100/index.html b/1.2.17/docs/examples/example-example100/index.html new file mode 100644 index 0000000000..6b97649eb9 --- /dev/null +++ b/1.2.17/docs/examples/example-example100/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-example100 + + + + + + + + + +
Some
+
model = {{content}}
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example100/manifest.json b/1.2.17/docs/examples/example-example100/manifest.json new file mode 100644 index 0000000000..a68d9d3bb7 --- /dev/null +++ b/1.2.17/docs/examples/example-example100/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example100", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example100/script.js b/1.2.17/docs/examples/example-example100/script.js new file mode 100644 index 0000000000..0487d87bdf --- /dev/null +++ b/1.2.17/docs/examples/example-example100/script.js @@ -0,0 +1,21 @@ + angular.module('form-example2', []).directive('contenteditable', function() { + return { + require: 'ngModel', + link: function(scope, elm, attrs, ctrl) { + // view -> model + elm.on('blur', function() { + scope.$apply(function() { + ctrl.$setViewValue(elm.html()); + }); + }); + + // model -> view + ctrl.$render = function() { + elm.html(ctrl.$viewValue); + }; + + // load init value from DOM + ctrl.$setViewValue(elm.html()); + } + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example101/index-debug.html b/1.2.17/docs/examples/example-example101/index-debug.html new file mode 100644 index 0000000000..84c475c800 --- /dev/null +++ b/1.2.17/docs/examples/example-example101/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example101-debug + + + + + + + + + +
+ {{ 'World' | greet }} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example101/index-jquery.html b/1.2.17/docs/examples/example-example101/index-jquery.html new file mode 100644 index 0000000000..5228a53541 --- /dev/null +++ b/1.2.17/docs/examples/example-example101/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example101-jquery + + + + + + + + + + +
+ {{ 'World' | greet }} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example101/index-production.html b/1.2.17/docs/examples/example-example101/index-production.html new file mode 100644 index 0000000000..432852c108 --- /dev/null +++ b/1.2.17/docs/examples/example-example101/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example101-production + + + + + + + + + +
+ {{ 'World' | greet }} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example101/index.html b/1.2.17/docs/examples/example-example101/index.html new file mode 100644 index 0000000000..445ff0fc8e --- /dev/null +++ b/1.2.17/docs/examples/example-example101/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example101 + + + + + + + + + +
+ {{ 'World' | greet }} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example101/manifest.json b/1.2.17/docs/examples/example-example101/manifest.json new file mode 100644 index 0000000000..ed66af641a --- /dev/null +++ b/1.2.17/docs/examples/example-example101/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example101", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example101/script.js b/1.2.17/docs/examples/example-example101/script.js new file mode 100644 index 0000000000..7a2bb6a413 --- /dev/null +++ b/1.2.17/docs/examples/example-example101/script.js @@ -0,0 +1,10 @@ + // declare a module + var myAppModule = angular.module('myApp', []); + + // configure the module. + // in this example we will create a greeting filter + myAppModule.filter('greet', function() { + return function(name) { + return 'Hello, ' + name + '!'; + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example102/index-debug.html b/1.2.17/docs/examples/example-example102/index-debug.html new file mode 100644 index 0000000000..fdc71bbb2f --- /dev/null +++ b/1.2.17/docs/examples/example-example102/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example102-debug + + + + + + + + + +
+ {{ greeting }}! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example102/index-jquery.html b/1.2.17/docs/examples/example-example102/index-jquery.html new file mode 100644 index 0000000000..ce5550ec92 --- /dev/null +++ b/1.2.17/docs/examples/example-example102/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example102-jquery + + + + + + + + + + +
+ {{ greeting }}! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example102/index-production.html b/1.2.17/docs/examples/example-example102/index-production.html new file mode 100644 index 0000000000..032d662b2d --- /dev/null +++ b/1.2.17/docs/examples/example-example102/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example102-production + + + + + + + + + +
+ {{ greeting }}! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example102/index.html b/1.2.17/docs/examples/example-example102/index.html new file mode 100644 index 0000000000..5efb3813b3 --- /dev/null +++ b/1.2.17/docs/examples/example-example102/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example102 + + + + + + + + + +
+ {{ greeting }}! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example102/manifest.json b/1.2.17/docs/examples/example-example102/manifest.json new file mode 100644 index 0000000000..d9f1b45407 --- /dev/null +++ b/1.2.17/docs/examples/example-example102/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example102", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example102/script.js b/1.2.17/docs/examples/example-example102/script.js new file mode 100644 index 0000000000..0c531d7a68 --- /dev/null +++ b/1.2.17/docs/examples/example-example102/script.js @@ -0,0 +1,34 @@ + angular.module('xmpl.service', []). + value('greeter', { + salutation: 'Hello', + localize: function(localization) { + this.salutation = localization.salutation; + }, + greet: function(name) { + return this.salutation + ' ' + name + '!'; + } + }). + value('user', { + load: function(name) { + this.name = name; + } + }); + + angular.module('xmpl.directive', []); + + angular.module('xmpl.filter', []); + + angular.module('xmpl', ['xmpl.service', 'xmpl.directive', 'xmpl.filter']). + run(function(greeter, user) { + // This is effectively part of the main method initialization code + greeter.localize({ + salutation: 'Bonjour' + }); + user.load('World'); + }); + + + // A Controller for your app + var XmplController = function($scope, greeter, user) { + $scope.greeting = greeter.greet(user.name); + }; \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example103/index-debug.html b/1.2.17/docs/examples/example-example103/index-debug.html new file mode 100644 index 0000000000..bbcb35a7da --- /dev/null +++ b/1.2.17/docs/examples/example-example103/index-debug.html @@ -0,0 +1,23 @@ + + + + + Example - example-example103-debug + + + + + + + + + +
+ Your name: + + +
+ {{greeting}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example103/index-jquery.html b/1.2.17/docs/examples/example-example103/index-jquery.html new file mode 100644 index 0000000000..2e94ecea3a --- /dev/null +++ b/1.2.17/docs/examples/example-example103/index-jquery.html @@ -0,0 +1,24 @@ + + + + + Example - example-example103-jquery + + + + + + + + + + +
+ Your name: + + +
+ {{greeting}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example103/index-production.html b/1.2.17/docs/examples/example-example103/index-production.html new file mode 100644 index 0000000000..d589f63c38 --- /dev/null +++ b/1.2.17/docs/examples/example-example103/index-production.html @@ -0,0 +1,23 @@ + + + + + Example - example-example103-production + + + + + + + + + +
+ Your name: + + +
+ {{greeting}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example103/index.html b/1.2.17/docs/examples/example-example103/index.html new file mode 100644 index 0000000000..7550e07dfe --- /dev/null +++ b/1.2.17/docs/examples/example-example103/index.html @@ -0,0 +1,23 @@ + + + + + Example - example-example103 + + + + + + + + + +
+ Your name: + + +
+ {{greeting}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example103/manifest.json b/1.2.17/docs/examples/example-example103/manifest.json new file mode 100644 index 0000000000..05759b4f0a --- /dev/null +++ b/1.2.17/docs/examples/example-example103/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example103", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example103/script.js b/1.2.17/docs/examples/example-example103/script.js new file mode 100644 index 0000000000..0b04a3e86c --- /dev/null +++ b/1.2.17/docs/examples/example-example103/script.js @@ -0,0 +1,7 @@ + function MyController($scope) { + $scope.username = 'World'; + + $scope.sayHello = function() { + $scope.greeting = 'Hello ' + $scope.username + '!'; + }; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example104/index-debug.html b/1.2.17/docs/examples/example-example104/index-debug.html new file mode 100644 index 0000000000..afc05aa097 --- /dev/null +++ b/1.2.17/docs/examples/example-example104/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-example104-debug + + + + + + + + + + +
+
+ Hello {{name}}! +
+
+
    +
  1. {{name}} from {{department}}
  2. +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example104/index-jquery.html b/1.2.17/docs/examples/example-example104/index-jquery.html new file mode 100644 index 0000000000..aeb1b27e93 --- /dev/null +++ b/1.2.17/docs/examples/example-example104/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-example104-jquery + + + + + + + + + + + +
+
+ Hello {{name}}! +
+
+
    +
  1. {{name}} from {{department}}
  2. +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example104/index-production.html b/1.2.17/docs/examples/example-example104/index-production.html new file mode 100644 index 0000000000..96df5d20fd --- /dev/null +++ b/1.2.17/docs/examples/example-example104/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-example104-production + + + + + + + + + + +
+
+ Hello {{name}}! +
+
+
    +
  1. {{name}} from {{department}}
  2. +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example104/index.html b/1.2.17/docs/examples/example-example104/index.html new file mode 100644 index 0000000000..faf3f998e2 --- /dev/null +++ b/1.2.17/docs/examples/example-example104/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-example104 + + + + + + + + + + +
+
+ Hello {{name}}! +
+
+
    +
  1. {{name}} from {{department}}
  2. +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example104/manifest.json b/1.2.17/docs/examples/example-example104/manifest.json new file mode 100644 index 0000000000..a7d46981ce --- /dev/null +++ b/1.2.17/docs/examples/example-example104/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example104", + "files": [ + "index-production.html", + "script.js", + "style.css" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example104/script.js b/1.2.17/docs/examples/example-example104/script.js new file mode 100644 index 0000000000..6ca6b45df6 --- /dev/null +++ b/1.2.17/docs/examples/example-example104/script.js @@ -0,0 +1,8 @@ + function GreetCtrl($scope, $rootScope) { + $scope.name = 'World'; + $rootScope.department = 'Angular'; + } + + function ListCtrl($scope) { + $scope.names = ['Igor', 'Misko', 'Vojta']; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example104/style.css b/1.2.17/docs/examples/example-example104/style.css new file mode 100644 index 0000000000..d2a95564e1 --- /dev/null +++ b/1.2.17/docs/examples/example-example104/style.css @@ -0,0 +1,5 @@ + .show-scope-demo.ng-scope, + .show-scope-demo .ng-scope { + border: 1px solid red; + margin: 3px; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example105/index-debug.html b/1.2.17/docs/examples/example-example105/index-debug.html new file mode 100644 index 0000000000..7bd4ef2638 --- /dev/null +++ b/1.2.17/docs/examples/example-example105/index-debug.html @@ -0,0 +1,32 @@ + + + + + Example - example-example105-debug + + + + + + + + + +
+ Root scope MyEvent count: {{count}} +
    +
  • + + +
    + Middle scope MyEvent count: {{count}} +
      +
    • + Leaf scope MyEvent count: {{count}} +
    • +
    +
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example105/index-jquery.html b/1.2.17/docs/examples/example-example105/index-jquery.html new file mode 100644 index 0000000000..46a83a3c63 --- /dev/null +++ b/1.2.17/docs/examples/example-example105/index-jquery.html @@ -0,0 +1,33 @@ + + + + + Example - example-example105-jquery + + + + + + + + + + +
+ Root scope MyEvent count: {{count}} +
    +
  • + + +
    + Middle scope MyEvent count: {{count}} +
      +
    • + Leaf scope MyEvent count: {{count}} +
    • +
    +
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example105/index-production.html b/1.2.17/docs/examples/example-example105/index-production.html new file mode 100644 index 0000000000..b12502e155 --- /dev/null +++ b/1.2.17/docs/examples/example-example105/index-production.html @@ -0,0 +1,32 @@ + + + + + Example - example-example105-production + + + + + + + + + +
+ Root scope MyEvent count: {{count}} +
    +
  • + + +
    + Middle scope MyEvent count: {{count}} +
      +
    • + Leaf scope MyEvent count: {{count}} +
    • +
    +
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example105/index.html b/1.2.17/docs/examples/example-example105/index.html new file mode 100644 index 0000000000..60cbab93d2 --- /dev/null +++ b/1.2.17/docs/examples/example-example105/index.html @@ -0,0 +1,32 @@ + + + + + Example - example-example105 + + + + + + + + + +
+ Root scope MyEvent count: {{count}} +
    +
  • + + +
    + Middle scope MyEvent count: {{count}} +
      +
    • + Leaf scope MyEvent count: {{count}} +
    • +
    +
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example105/manifest.json b/1.2.17/docs/examples/example-example105/manifest.json new file mode 100644 index 0000000000..4372ed63be --- /dev/null +++ b/1.2.17/docs/examples/example-example105/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example105", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example105/script.js b/1.2.17/docs/examples/example-example105/script.js new file mode 100644 index 0000000000..238de52e46 --- /dev/null +++ b/1.2.17/docs/examples/example-example105/script.js @@ -0,0 +1,6 @@ + function EventController($scope) { + $scope.count = 0; + $scope.$on('MyEvent', function() { + $scope.count++; + }); + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example106/index-debug.html b/1.2.17/docs/examples/example-example106/index-debug.html new file mode 100644 index 0000000000..70adad5c6f --- /dev/null +++ b/1.2.17/docs/examples/example-example106/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example106-debug + + + + + + + + + +
+

Let's try this simple notify service, injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example106/index-jquery.html b/1.2.17/docs/examples/example-example106/index-jquery.html new file mode 100644 index 0000000000..82762a3845 --- /dev/null +++ b/1.2.17/docs/examples/example-example106/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example106-jquery + + + + + + + + + + +
+

Let's try this simple notify service, injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example106/index-production.html b/1.2.17/docs/examples/example-example106/index-production.html new file mode 100644 index 0000000000..69f82e28c4 --- /dev/null +++ b/1.2.17/docs/examples/example-example106/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example106-production + + + + + + + + + +
+

Let's try this simple notify service, injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example106/index.html b/1.2.17/docs/examples/example-example106/index.html new file mode 100644 index 0000000000..ae05a3e395 --- /dev/null +++ b/1.2.17/docs/examples/example-example106/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example106 + + + + + + + + + +
+

Let's try this simple notify service, injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example106/manifest.json b/1.2.17/docs/examples/example-example106/manifest.json new file mode 100644 index 0000000000..5703532681 --- /dev/null +++ b/1.2.17/docs/examples/example-example106/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example106", + "files": [ + "index-production.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example106/protractor.js b/1.2.17/docs/examples/example-example106/protractor.js new file mode 100644 index 0000000000..943e356ace --- /dev/null +++ b/1.2.17/docs/examples/example-example106/protractor.js @@ -0,0 +1,4 @@ + it('should test service', function() { + expect(element(by.id('simple')).element(by.model('message')).getAttribute('value')) + .toEqual('test'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example106/script.js b/1.2.17/docs/examples/example-example106/script.js new file mode 100644 index 0000000000..12aabc558a --- /dev/null +++ b/1.2.17/docs/examples/example-example106/script.js @@ -0,0 +1,17 @@ + angular. + module('myServiceModule', []). + controller('MyController', ['$scope','notify', function ($scope, notify) { + $scope.callNotify = function(msg) { + notify(msg); + }; + }]). + factory('notify', ['$window', function(win) { + var msgs = []; + return function(msg) { + msgs.push(msg); + if (msgs.length == 3) { + win.alert(msgs.join("\n")); + msgs = []; + } + }; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example107/index-debug.html b/1.2.17/docs/examples/example-example107/index-debug.html new file mode 100644 index 0000000000..0d9e49a285 --- /dev/null +++ b/1.2.17/docs/examples/example-example107/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example107-debug + + + + + + + + + +
+

Let's try the notify service, that is implicitly injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example107/index-jquery.html b/1.2.17/docs/examples/example-example107/index-jquery.html new file mode 100644 index 0000000000..6064b24927 --- /dev/null +++ b/1.2.17/docs/examples/example-example107/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example107-jquery + + + + + + + + + + +
+

Let's try the notify service, that is implicitly injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example107/index-production.html b/1.2.17/docs/examples/example-example107/index-production.html new file mode 100644 index 0000000000..9d9ea30f8e --- /dev/null +++ b/1.2.17/docs/examples/example-example107/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example107-production + + + + + + + + + +
+

Let's try the notify service, that is implicitly injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example107/index.html b/1.2.17/docs/examples/example-example107/index.html new file mode 100644 index 0000000000..7e42b739f1 --- /dev/null +++ b/1.2.17/docs/examples/example-example107/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example107 + + + + + + + + + +
+

Let's try the notify service, that is implicitly injected into the controller...

+ + +

(you have to click 3 times to see an alert)

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example107/manifest.json b/1.2.17/docs/examples/example-example107/manifest.json new file mode 100644 index 0000000000..a583cbb4b3 --- /dev/null +++ b/1.2.17/docs/examples/example-example107/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example107", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example107/script.js b/1.2.17/docs/examples/example-example107/script.js new file mode 100644 index 0000000000..bee4e0ef63 --- /dev/null +++ b/1.2.17/docs/examples/example-example107/script.js @@ -0,0 +1,16 @@ + angular.module('myServiceModuleDI', []). + factory('notify', function($window) { + var msgs = []; + return function(msg) { + msgs.push(msg); + if (msgs.length == 3) { + $window.alert(msgs.join("\n")); + msgs = []; + } + }; + }). + controller('MyController', function($scope, notify) { + $scope.callNotify = function(msg) { + notify(msg); + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example11/index-debug.html b/1.2.17/docs/examples/example-example11/index-debug.html new file mode 100644 index 0000000000..127b8a2f6c --- /dev/null +++ b/1.2.17/docs/examples/example-example11/index-debug.html @@ -0,0 +1,42 @@ + + + + + Example - example-example11-debug + + + + + + + + + + + + + userType: + Required!
+ userType = {{userType}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example11/index-jquery.html b/1.2.17/docs/examples/example-example11/index-jquery.html new file mode 100644 index 0000000000..e755c76ddc --- /dev/null +++ b/1.2.17/docs/examples/example-example11/index-jquery.html @@ -0,0 +1,43 @@ + + + + + Example - example-example11-jquery + + + + + + + + + + + + + + userType: + Required!
+ userType = {{userType}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example11/index-production.html b/1.2.17/docs/examples/example-example11/index-production.html new file mode 100644 index 0000000000..afce7b89f4 --- /dev/null +++ b/1.2.17/docs/examples/example-example11/index-production.html @@ -0,0 +1,42 @@ + + + + + Example - example-example11-production + + + + + + + + + + + + + userType: + Required!
+ userType = {{userType}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example11/index.html b/1.2.17/docs/examples/example-example11/index.html new file mode 100644 index 0000000000..31427026f7 --- /dev/null +++ b/1.2.17/docs/examples/example-example11/index.html @@ -0,0 +1,42 @@ + + + + + Example - example-example11 + + + + + + + + + + + + + userType: + Required!
+ userType = {{userType}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example11/manifest.json b/1.2.17/docs/examples/example-example11/manifest.json new file mode 100644 index 0000000000..b89b9da768 --- /dev/null +++ b/1.2.17/docs/examples/example-example11/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example11", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example11/protractor.js b/1.2.17/docs/examples/example-example11/protractor.js new file mode 100644 index 0000000000..4e686d9498 --- /dev/null +++ b/1.2.17/docs/examples/example-example11/protractor.js @@ -0,0 +1,19 @@ + it('should initialize to model', function() { + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + + expect(userType.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + var userInput = element(by.model('userType')); + + userInput.clear(); + userInput.sendKeys(''); + + expect(userType.getText()).toEqual('userType ='); + expect(valid.getText()).toContain('false'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example12/index-debug.html b/1.2.17/docs/examples/example-example12/index-debug.html new file mode 100644 index 0000000000..69ed411eee --- /dev/null +++ b/1.2.17/docs/examples/example-example12/index-debug.html @@ -0,0 +1,39 @@ + + + + + Example - example-example12-debug + + + + + + + + + + + + Update input to see transitions when valid/invalid. + Integer is a valid value. + + + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example12/index-jquery.html b/1.2.17/docs/examples/example-example12/index-jquery.html new file mode 100644 index 0000000000..1358a8f2b4 --- /dev/null +++ b/1.2.17/docs/examples/example-example12/index-jquery.html @@ -0,0 +1,40 @@ + + + + + Example - example-example12-jquery + + + + + + + + + + + + + Update input to see transitions when valid/invalid. + Integer is a valid value. + + + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example12/index-production.html b/1.2.17/docs/examples/example-example12/index-production.html new file mode 100644 index 0000000000..7b592edaba --- /dev/null +++ b/1.2.17/docs/examples/example-example12/index-production.html @@ -0,0 +1,39 @@ + + + + + Example - example-example12-production + + + + + + + + + + + + Update input to see transitions when valid/invalid. + Integer is a valid value. + + + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example12/index.html b/1.2.17/docs/examples/example-example12/index.html new file mode 100644 index 0000000000..56ba4524ad --- /dev/null +++ b/1.2.17/docs/examples/example-example12/index.html @@ -0,0 +1,39 @@ + + + + + Example - example-example12 + + + + + + + + + + + + Update input to see transitions when valid/invalid. + Integer is a valid value. + + + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example12/manifest.json b/1.2.17/docs/examples/example-example12/manifest.json new file mode 100644 index 0000000000..abc98db431 --- /dev/null +++ b/1.2.17/docs/examples/example-example12/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example12", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example13/index-debug.html b/1.2.17/docs/examples/example-example13/index-debug.html new file mode 100644 index 0000000000..b8a56af9a9 --- /dev/null +++ b/1.2.17/docs/examples/example-example13/index-debug.html @@ -0,0 +1,24 @@ + + + + + Example - example-example13-debug + + + + + + + + + +
+ Enter name:
+ Hello ! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example13/index-jquery.html b/1.2.17/docs/examples/example-example13/index-jquery.html new file mode 100644 index 0000000000..483616374b --- /dev/null +++ b/1.2.17/docs/examples/example-example13/index-jquery.html @@ -0,0 +1,25 @@ + + + + + Example - example-example13-jquery + + + + + + + + + + +
+ Enter name:
+ Hello ! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example13/index-production.html b/1.2.17/docs/examples/example-example13/index-production.html new file mode 100644 index 0000000000..9a8c477d22 --- /dev/null +++ b/1.2.17/docs/examples/example-example13/index-production.html @@ -0,0 +1,24 @@ + + + + + Example - example-example13-production + + + + + + + + + +
+ Enter name:
+ Hello ! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example13/index.html b/1.2.17/docs/examples/example-example13/index.html new file mode 100644 index 0000000000..902c1019e5 --- /dev/null +++ b/1.2.17/docs/examples/example-example13/index.html @@ -0,0 +1,24 @@ + + + + + Example - example-example13 + + + + + + + + + +
+ Enter name:
+ Hello ! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example13/manifest.json b/1.2.17/docs/examples/example-example13/manifest.json new file mode 100644 index 0000000000..097f49e4d7 --- /dev/null +++ b/1.2.17/docs/examples/example-example13/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example13", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example13/protractor.js b/1.2.17/docs/examples/example-example13/protractor.js new file mode 100644 index 0000000000..5cc9209d2a --- /dev/null +++ b/1.2.17/docs/examples/example-example13/protractor.js @@ -0,0 +1,8 @@ + it('should check ng-bind', function() { + var nameInput = element(by.model('name')); + + expect(element(by.binding('name')).getText()).toBe('Whirled'); + nameInput.clear(); + nameInput.sendKeys('world'); + expect(element(by.binding('name')).getText()).toBe('world'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example14/index-debug.html b/1.2.17/docs/examples/example-example14/index-debug.html new file mode 100644 index 0000000000..7e10b1b39e --- /dev/null +++ b/1.2.17/docs/examples/example-example14/index-debug.html @@ -0,0 +1,26 @@ + + + + + Example - example-example14-debug + + + + + + + + + +
+ Salutation:
+ Name:
+

+  
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example14/index-jquery.html b/1.2.17/docs/examples/example-example14/index-jquery.html new file mode 100644 index 0000000000..0a52f0fd1c --- /dev/null +++ b/1.2.17/docs/examples/example-example14/index-jquery.html @@ -0,0 +1,27 @@ + + + + + Example - example-example14-jquery + + + + + + + + + + +
+ Salutation:
+ Name:
+

+  
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example14/index-production.html b/1.2.17/docs/examples/example-example14/index-production.html new file mode 100644 index 0000000000..2b57fa45d9 --- /dev/null +++ b/1.2.17/docs/examples/example-example14/index-production.html @@ -0,0 +1,26 @@ + + + + + Example - example-example14-production + + + + + + + + + +
+ Salutation:
+ Name:
+

+  
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example14/index.html b/1.2.17/docs/examples/example-example14/index.html new file mode 100644 index 0000000000..a0380b9d0f --- /dev/null +++ b/1.2.17/docs/examples/example-example14/index.html @@ -0,0 +1,26 @@ + + + + + Example - example-example14 + + + + + + + + + +
+ Salutation:
+ Name:
+

+  
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example14/manifest.json b/1.2.17/docs/examples/example-example14/manifest.json new file mode 100644 index 0000000000..6276328e40 --- /dev/null +++ b/1.2.17/docs/examples/example-example14/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example14", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example14/protractor.js b/1.2.17/docs/examples/example-example14/protractor.js new file mode 100644 index 0000000000..a7436ba95f --- /dev/null +++ b/1.2.17/docs/examples/example-example14/protractor.js @@ -0,0 +1,14 @@ + it('should check ng-bind', function() { + var salutationElem = element(by.binding('salutation')); + var salutationInput = element(by.model('salutation')); + var nameInput = element(by.model('name')); + + expect(salutationElem.getText()).toBe('Hello World!'); + + salutationInput.clear(); + salutationInput.sendKeys('Greetings'); + nameInput.clear(); + nameInput.sendKeys('user'); + + expect(salutationElem.getText()).toBe('Greetings user!'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example15/index-debug.html b/1.2.17/docs/examples/example-example15/index-debug.html new file mode 100644 index 0000000000..6c873f4ea8 --- /dev/null +++ b/1.2.17/docs/examples/example-example15/index-debug.html @@ -0,0 +1,20 @@ + + + + + Example - example-example15-debug + + + + + + + + + + +
+

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example15/index-jquery.html b/1.2.17/docs/examples/example-example15/index-jquery.html new file mode 100644 index 0000000000..a8c7e9a9ca --- /dev/null +++ b/1.2.17/docs/examples/example-example15/index-jquery.html @@ -0,0 +1,21 @@ + + + + + Example - example-example15-jquery + + + + + + + + + + + +
+

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example15/index-production.html b/1.2.17/docs/examples/example-example15/index-production.html new file mode 100644 index 0000000000..ad3b068fad --- /dev/null +++ b/1.2.17/docs/examples/example-example15/index-production.html @@ -0,0 +1,20 @@ + + + + + Example - example-example15-production + + + + + + + + + + +
+

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example15/index.html b/1.2.17/docs/examples/example-example15/index.html new file mode 100644 index 0000000000..3c99b6ac75 --- /dev/null +++ b/1.2.17/docs/examples/example-example15/index.html @@ -0,0 +1,20 @@ + + + + + Example - example-example15 + + + + + + + + + + +
+

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example15/manifest.json b/1.2.17/docs/examples/example-example15/manifest.json new file mode 100644 index 0000000000..872057483d --- /dev/null +++ b/1.2.17/docs/examples/example-example15/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example15", + "files": [ + "index-production.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example15/protractor.js b/1.2.17/docs/examples/example-example15/protractor.js new file mode 100644 index 0000000000..46c0353305 --- /dev/null +++ b/1.2.17/docs/examples/example-example15/protractor.js @@ -0,0 +1,4 @@ + it('should check ng-bind-html', function() { + expect(element(by.binding('myHTML')).getText()).toBe( + 'I am an HTMLstring with links! and other stuff'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example15/script.js b/1.2.17/docs/examples/example-example15/script.js new file mode 100644 index 0000000000..a5b2a2e4dd --- /dev/null +++ b/1.2.17/docs/examples/example-example15/script.js @@ -0,0 +1,6 @@ + angular.module('ngBindHtmlExample', ['ngSanitize']) + + .controller('ngBindHtmlCtrl', ['$scope', function ngBindHtmlCtrl($scope) { + $scope.myHTML = + 'I am an HTMLstring with links! and other stuff'; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example16/index-debug.html b/1.2.17/docs/examples/example-example16/index-debug.html new file mode 100644 index 0000000000..f57bdc59f6 --- /dev/null +++ b/1.2.17/docs/examples/example-example16/index-debug.html @@ -0,0 +1,28 @@ + + + + + Example - example-example16-debug + + + + + + + + + +

Map Syntax Example

+ deleted (apply "strike" class)
+ important (apply "bold" class)
+ error (apply "red" class) +
+

Using String Syntax

+ +
+

Using Array Syntax

+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example16/index-jquery.html b/1.2.17/docs/examples/example-example16/index-jquery.html new file mode 100644 index 0000000000..d43016e60b --- /dev/null +++ b/1.2.17/docs/examples/example-example16/index-jquery.html @@ -0,0 +1,29 @@ + + + + + Example - example-example16-jquery + + + + + + + + + + +

Map Syntax Example

+ deleted (apply "strike" class)
+ important (apply "bold" class)
+ error (apply "red" class) +
+

Using String Syntax

+ +
+

Using Array Syntax

+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example16/index-production.html b/1.2.17/docs/examples/example-example16/index-production.html new file mode 100644 index 0000000000..cfe7a91b77 --- /dev/null +++ b/1.2.17/docs/examples/example-example16/index-production.html @@ -0,0 +1,28 @@ + + + + + Example - example-example16-production + + + + + + + + + +

Map Syntax Example

+ deleted (apply "strike" class)
+ important (apply "bold" class)
+ error (apply "red" class) +
+

Using String Syntax

+ +
+

Using Array Syntax

+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example16/index.html b/1.2.17/docs/examples/example-example16/index.html new file mode 100644 index 0000000000..5b34cb8a79 --- /dev/null +++ b/1.2.17/docs/examples/example-example16/index.html @@ -0,0 +1,28 @@ + + + + + Example - example-example16 + + + + + + + + + +

Map Syntax Example

+ deleted (apply "strike" class)
+ important (apply "bold" class)
+ error (apply "red" class) +
+

Using String Syntax

+ +
+

Using Array Syntax

+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example16/manifest.json b/1.2.17/docs/examples/example-example16/manifest.json new file mode 100644 index 0000000000..f258bcd568 --- /dev/null +++ b/1.2.17/docs/examples/example-example16/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example16", + "files": [ + "index-production.html", + "style.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example16/protractor.js b/1.2.17/docs/examples/example-example16/protractor.js new file mode 100644 index 0000000000..1f8ea4c64e --- /dev/null +++ b/1.2.17/docs/examples/example-example16/protractor.js @@ -0,0 +1,28 @@ + var ps = element.all(by.css('p')); + + it('should let you toggle the class', function() { + + expect(ps.first().getAttribute('class')).not.toMatch(/bold/); + expect(ps.first().getAttribute('class')).not.toMatch(/red/); + + element(by.model('important')).click(); + expect(ps.first().getAttribute('class')).toMatch(/bold/); + + element(by.model('error')).click(); + expect(ps.first().getAttribute('class')).toMatch(/red/); + }); + + it('should let you toggle string example', function() { + expect(ps.get(1).getAttribute('class')).toBe(''); + element(by.model('style')).clear(); + element(by.model('style')).sendKeys('red'); + expect(ps.get(1).getAttribute('class')).toBe('red'); + }); + + it('array example should have 3 classes', function() { + expect(ps.last().getAttribute('class')).toBe(''); + element(by.model('style1')).sendKeys('bold'); + element(by.model('style2')).sendKeys('strike'); + element(by.model('style3')).sendKeys('red'); + expect(ps.last().getAttribute('class')).toBe('bold strike red'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example16/style.css b/1.2.17/docs/examples/example-example16/style.css new file mode 100644 index 0000000000..f3d75e0a41 --- /dev/null +++ b/1.2.17/docs/examples/example-example16/style.css @@ -0,0 +1,9 @@ + .strike { + text-decoration: line-through; + } + .bold { + font-weight: bold; + } + .red { + color: red; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example17/index-debug.html b/1.2.17/docs/examples/example-example17/index-debug.html new file mode 100644 index 0000000000..254ce55b19 --- /dev/null +++ b/1.2.17/docs/examples/example-example17/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example17-debug + + + + + + + + + + + + +
+ Sample Text + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example17/index-jquery.html b/1.2.17/docs/examples/example-example17/index-jquery.html new file mode 100644 index 0000000000..8c14e5cb8a --- /dev/null +++ b/1.2.17/docs/examples/example-example17/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example17-jquery + + + + + + + + + + + + + +
+ Sample Text + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example17/index-production.html b/1.2.17/docs/examples/example-example17/index-production.html new file mode 100644 index 0000000000..bd4aa727cf --- /dev/null +++ b/1.2.17/docs/examples/example-example17/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example17-production + + + + + + + + + + + + +
+ Sample Text + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example17/index.html b/1.2.17/docs/examples/example-example17/index.html new file mode 100644 index 0000000000..76eb6433d4 --- /dev/null +++ b/1.2.17/docs/examples/example-example17/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example17 + + + + + + + + + + + + +
+ Sample Text + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example17/manifest.json b/1.2.17/docs/examples/example-example17/manifest.json new file mode 100644 index 0000000000..fa087d38da --- /dev/null +++ b/1.2.17/docs/examples/example-example17/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example17", + "files": [ + "index-production.html", + "style.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example17/protractor.js b/1.2.17/docs/examples/example-example17/protractor.js new file mode 100644 index 0000000000..f3a5a82ed9 --- /dev/null +++ b/1.2.17/docs/examples/example-example17/protractor.js @@ -0,0 +1,14 @@ + it('should check ng-class', function() { + expect(element(by.css('.base-class')).getAttribute('class')).not. + toMatch(/my-class/); + + element(by.id('setbtn')).click(); + + expect(element(by.css('.base-class')).getAttribute('class')). + toMatch(/my-class/); + + element(by.id('clearbtn')).click(); + + expect(element(by.css('.base-class')).getAttribute('class')).not. + toMatch(/my-class/); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example17/style.css b/1.2.17/docs/examples/example-example17/style.css new file mode 100644 index 0000000000..2f3fa91244 --- /dev/null +++ b/1.2.17/docs/examples/example-example17/style.css @@ -0,0 +1,9 @@ + .base-class { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + } + + .base-class.my-class { + color: red; + font-size:3em; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example18/index-debug.html b/1.2.17/docs/examples/example-example18/index-debug.html new file mode 100644 index 0000000000..ddcd7a212b --- /dev/null +++ b/1.2.17/docs/examples/example-example18/index-debug.html @@ -0,0 +1,23 @@ + + + + + Example - example-example18-debug + + + + + + + + + +
    +
  1. + + {{name}} + +
  2. +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example18/index-jquery.html b/1.2.17/docs/examples/example-example18/index-jquery.html new file mode 100644 index 0000000000..ad7aa7d80b --- /dev/null +++ b/1.2.17/docs/examples/example-example18/index-jquery.html @@ -0,0 +1,24 @@ + + + + + Example - example-example18-jquery + + + + + + + + + + +
    +
  1. + + {{name}} + +
  2. +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example18/index-production.html b/1.2.17/docs/examples/example-example18/index-production.html new file mode 100644 index 0000000000..ae4c1cc320 --- /dev/null +++ b/1.2.17/docs/examples/example-example18/index-production.html @@ -0,0 +1,23 @@ + + + + + Example - example-example18-production + + + + + + + + + +
    +
  1. + + {{name}} + +
  2. +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example18/index.html b/1.2.17/docs/examples/example-example18/index.html new file mode 100644 index 0000000000..177993c3bd --- /dev/null +++ b/1.2.17/docs/examples/example-example18/index.html @@ -0,0 +1,23 @@ + + + + + Example - example-example18 + + + + + + + + + +
    +
  1. + + {{name}} + +
  2. +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example18/manifest.json b/1.2.17/docs/examples/example-example18/manifest.json new file mode 100644 index 0000000000..bb1d6d7d9c --- /dev/null +++ b/1.2.17/docs/examples/example-example18/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example18", + "files": [ + "index-production.html", + "style.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example18/protractor.js b/1.2.17/docs/examples/example-example18/protractor.js new file mode 100644 index 0000000000..c44928632b --- /dev/null +++ b/1.2.17/docs/examples/example-example18/protractor.js @@ -0,0 +1,6 @@ + it('should check ng-class-odd and ng-class-even', function() { + expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')). + toMatch(/odd/); + expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')). + toMatch(/even/); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example18/style.css b/1.2.17/docs/examples/example-example18/style.css new file mode 100644 index 0000000000..68949bf55d --- /dev/null +++ b/1.2.17/docs/examples/example-example18/style.css @@ -0,0 +1,6 @@ + .odd { + color: red; + } + .even { + color: blue; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example19/index-debug.html b/1.2.17/docs/examples/example-example19/index-debug.html new file mode 100644 index 0000000000..93a95bb69e --- /dev/null +++ b/1.2.17/docs/examples/example-example19/index-debug.html @@ -0,0 +1,23 @@ + + + + + Example - example-example19-debug + + + + + + + + + +
    +
  1. + + {{name}}       + +
  2. +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example19/index-jquery.html b/1.2.17/docs/examples/example-example19/index-jquery.html new file mode 100644 index 0000000000..99f97690c4 --- /dev/null +++ b/1.2.17/docs/examples/example-example19/index-jquery.html @@ -0,0 +1,24 @@ + + + + + Example - example-example19-jquery + + + + + + + + + + +
    +
  1. + + {{name}}       + +
  2. +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example19/index-production.html b/1.2.17/docs/examples/example-example19/index-production.html new file mode 100644 index 0000000000..d89a93f26e --- /dev/null +++ b/1.2.17/docs/examples/example-example19/index-production.html @@ -0,0 +1,23 @@ + + + + + Example - example-example19-production + + + + + + + + + +
    +
  1. + + {{name}}       + +
  2. +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example19/index.html b/1.2.17/docs/examples/example-example19/index.html new file mode 100644 index 0000000000..b0cdb91860 --- /dev/null +++ b/1.2.17/docs/examples/example-example19/index.html @@ -0,0 +1,23 @@ + + + + + Example - example-example19 + + + + + + + + + +
    +
  1. + + {{name}}       + +
  2. +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example19/manifest.json b/1.2.17/docs/examples/example-example19/manifest.json new file mode 100644 index 0000000000..354b1f054d --- /dev/null +++ b/1.2.17/docs/examples/example-example19/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example19", + "files": [ + "index-production.html", + "style.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example19/protractor.js b/1.2.17/docs/examples/example-example19/protractor.js new file mode 100644 index 0000000000..c44928632b --- /dev/null +++ b/1.2.17/docs/examples/example-example19/protractor.js @@ -0,0 +1,6 @@ + it('should check ng-class-odd and ng-class-even', function() { + expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')). + toMatch(/odd/); + expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')). + toMatch(/even/); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example19/style.css b/1.2.17/docs/examples/example-example19/style.css new file mode 100644 index 0000000000..68949bf55d --- /dev/null +++ b/1.2.17/docs/examples/example-example19/style.css @@ -0,0 +1,6 @@ + .odd { + color: red; + } + .even { + color: blue; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example2/index-debug.html b/1.2.17/docs/examples/example-example2/index-debug.html new file mode 100644 index 0000000000..ddaf03e00f --- /dev/null +++ b/1.2.17/docs/examples/example-example2/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example2-debug + + + + + + + + + + +
+ Go to bottom + You're at the bottom! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example2/index-jquery.html b/1.2.17/docs/examples/example-example2/index-jquery.html new file mode 100644 index 0000000000..4b8cbb46f8 --- /dev/null +++ b/1.2.17/docs/examples/example-example2/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example2-jquery + + + + + + + + + + + +
+ Go to bottom + You're at the bottom! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example2/index-production.html b/1.2.17/docs/examples/example-example2/index-production.html new file mode 100644 index 0000000000..095562a20d --- /dev/null +++ b/1.2.17/docs/examples/example-example2/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example2-production + + + + + + + + + + +
+ Go to bottom + You're at the bottom! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example2/index.html b/1.2.17/docs/examples/example-example2/index.html new file mode 100644 index 0000000000..b5c82c7985 --- /dev/null +++ b/1.2.17/docs/examples/example-example2/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example2 + + + + + + + + + + +
+ Go to bottom + You're at the bottom! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example2/manifest.json b/1.2.17/docs/examples/example-example2/manifest.json new file mode 100644 index 0000000000..15c820feef --- /dev/null +++ b/1.2.17/docs/examples/example-example2/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example2", + "files": [ + "index-production.html", + "script.js", + "style.css" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example2/script.js b/1.2.17/docs/examples/example-example2/script.js new file mode 100644 index 0000000000..a4bb9d01ec --- /dev/null +++ b/1.2.17/docs/examples/example-example2/script.js @@ -0,0 +1,10 @@ + function ScrollCtrl($scope, $location, $anchorScroll) { + $scope.gotoBottom = function (){ + // set the location.hash to the id of + // the element you wish to scroll to. + $location.hash('bottom'); + + // call $anchorScroll() + $anchorScroll(); + }; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example2/style.css b/1.2.17/docs/examples/example-example2/style.css new file mode 100644 index 0000000000..a9bffdc2d9 --- /dev/null +++ b/1.2.17/docs/examples/example-example2/style.css @@ -0,0 +1,9 @@ + #scrollArea { + height: 350px; + overflow: auto; + } + + #bottom { + display: block; + margin-top: 2000px; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example20/index-debug.html b/1.2.17/docs/examples/example-example20/index-debug.html new file mode 100644 index 0000000000..ac5bfcbbd8 --- /dev/null +++ b/1.2.17/docs/examples/example-example20/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example20-debug + + + + + + + + +
{{ 'hello' }}
+
{{ 'hello IE7' }}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example20/index-jquery.html b/1.2.17/docs/examples/example-example20/index-jquery.html new file mode 100644 index 0000000000..c11f8c1444 --- /dev/null +++ b/1.2.17/docs/examples/example-example20/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example20-jquery + + + + + + + + + +
{{ 'hello' }}
+
{{ 'hello IE7' }}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example20/index-production.html b/1.2.17/docs/examples/example-example20/index-production.html new file mode 100644 index 0000000000..c6623b01b9 --- /dev/null +++ b/1.2.17/docs/examples/example-example20/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example20-production + + + + + + + + +
{{ 'hello' }}
+
{{ 'hello IE7' }}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example20/index.html b/1.2.17/docs/examples/example-example20/index.html new file mode 100644 index 0000000000..b8e6cc3de9 --- /dev/null +++ b/1.2.17/docs/examples/example-example20/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example20 + + + + + + + + +
{{ 'hello' }}
+
{{ 'hello IE7' }}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example20/manifest.json b/1.2.17/docs/examples/example-example20/manifest.json new file mode 100644 index 0000000000..68a0d16939 --- /dev/null +++ b/1.2.17/docs/examples/example-example20/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example20", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example20/protractor.js b/1.2.17/docs/examples/example-example20/protractor.js new file mode 100644 index 0000000000..1fd0ff5c17 --- /dev/null +++ b/1.2.17/docs/examples/example-example20/protractor.js @@ -0,0 +1,6 @@ + it('should remove the template directive and css class', function() { + expect($('#template1').getAttribute('ng-cloak')). + toBeNull(); + expect($('#template2').getAttribute('ng-cloak')). + toBeNull(); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example21/index-debug.html b/1.2.17/docs/examples/example-example21/index-debug.html new file mode 100644 index 0000000000..fe2c0a88aa --- /dev/null +++ b/1.2.17/docs/examples/example-example21/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example21-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example21/index-jquery.html b/1.2.17/docs/examples/example-example21/index-jquery.html new file mode 100644 index 0000000000..1e2ff9cd3d --- /dev/null +++ b/1.2.17/docs/examples/example-example21/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example21-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example21/index-production.html b/1.2.17/docs/examples/example-example21/index-production.html new file mode 100644 index 0000000000..d5e621e405 --- /dev/null +++ b/1.2.17/docs/examples/example-example21/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example21-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example21/index.html b/1.2.17/docs/examples/example-example21/index.html new file mode 100644 index 0000000000..b91eeb20a8 --- /dev/null +++ b/1.2.17/docs/examples/example-example21/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example21 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example21/manifest.json b/1.2.17/docs/examples/example-example21/manifest.json new file mode 100644 index 0000000000..c82db91d49 --- /dev/null +++ b/1.2.17/docs/examples/example-example21/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example21", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example21/protractor.js b/1.2.17/docs/examples/example-example21/protractor.js new file mode 100644 index 0000000000..88afa2fdb0 --- /dev/null +++ b/1.2.17/docs/examples/example-example21/protractor.js @@ -0,0 +1,5 @@ + it('should check ng-click', function() { + expect(element(by.binding('count')).getText()).toMatch('0'); + element(by.css('button')).click(); + expect(element(by.binding('count')).getText()).toMatch('1'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example22/index-debug.html b/1.2.17/docs/examples/example-example22/index-debug.html new file mode 100644 index 0000000000..2c2acfbe60 --- /dev/null +++ b/1.2.17/docs/examples/example-example22/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example22-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example22/index-jquery.html b/1.2.17/docs/examples/example-example22/index-jquery.html new file mode 100644 index 0000000000..c611b042a5 --- /dev/null +++ b/1.2.17/docs/examples/example-example22/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example22-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example22/index-production.html b/1.2.17/docs/examples/example-example22/index-production.html new file mode 100644 index 0000000000..86fb0e53b0 --- /dev/null +++ b/1.2.17/docs/examples/example-example22/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example22-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example22/index.html b/1.2.17/docs/examples/example-example22/index.html new file mode 100644 index 0000000000..578af51c0e --- /dev/null +++ b/1.2.17/docs/examples/example-example22/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example22 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example22/manifest.json b/1.2.17/docs/examples/example-example22/manifest.json new file mode 100644 index 0000000000..930dcbb743 --- /dev/null +++ b/1.2.17/docs/examples/example-example22/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example22", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example23/index-debug.html b/1.2.17/docs/examples/example-example23/index-debug.html new file mode 100644 index 0000000000..99f097f7c6 --- /dev/null +++ b/1.2.17/docs/examples/example-example23/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example23-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example23/index-jquery.html b/1.2.17/docs/examples/example-example23/index-jquery.html new file mode 100644 index 0000000000..9ab989d322 --- /dev/null +++ b/1.2.17/docs/examples/example-example23/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example23-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example23/index-production.html b/1.2.17/docs/examples/example-example23/index-production.html new file mode 100644 index 0000000000..4ab0887ffb --- /dev/null +++ b/1.2.17/docs/examples/example-example23/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example23-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example23/index.html b/1.2.17/docs/examples/example-example23/index.html new file mode 100644 index 0000000000..ac7c5a28be --- /dev/null +++ b/1.2.17/docs/examples/example-example23/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example23 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example23/manifest.json b/1.2.17/docs/examples/example-example23/manifest.json new file mode 100644 index 0000000000..70c520a007 --- /dev/null +++ b/1.2.17/docs/examples/example-example23/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example23", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example24/index-debug.html b/1.2.17/docs/examples/example-example24/index-debug.html new file mode 100644 index 0000000000..037a1b4748 --- /dev/null +++ b/1.2.17/docs/examples/example-example24/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example24-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example24/index-jquery.html b/1.2.17/docs/examples/example-example24/index-jquery.html new file mode 100644 index 0000000000..0575c631b9 --- /dev/null +++ b/1.2.17/docs/examples/example-example24/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example24-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example24/index-production.html b/1.2.17/docs/examples/example-example24/index-production.html new file mode 100644 index 0000000000..236ff83050 --- /dev/null +++ b/1.2.17/docs/examples/example-example24/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example24-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example24/index.html b/1.2.17/docs/examples/example-example24/index.html new file mode 100644 index 0000000000..ba7310d0de --- /dev/null +++ b/1.2.17/docs/examples/example-example24/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example24 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example24/manifest.json b/1.2.17/docs/examples/example-example24/manifest.json new file mode 100644 index 0000000000..31304f2a8b --- /dev/null +++ b/1.2.17/docs/examples/example-example24/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example24", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example25/index-debug.html b/1.2.17/docs/examples/example-example25/index-debug.html new file mode 100644 index 0000000000..937ebc4787 --- /dev/null +++ b/1.2.17/docs/examples/example-example25/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example25-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example25/index-jquery.html b/1.2.17/docs/examples/example-example25/index-jquery.html new file mode 100644 index 0000000000..cd6c726f74 --- /dev/null +++ b/1.2.17/docs/examples/example-example25/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example25-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example25/index-production.html b/1.2.17/docs/examples/example-example25/index-production.html new file mode 100644 index 0000000000..00e3a9ec0a --- /dev/null +++ b/1.2.17/docs/examples/example-example25/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example25-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example25/index.html b/1.2.17/docs/examples/example-example25/index.html new file mode 100644 index 0000000000..37b4893264 --- /dev/null +++ b/1.2.17/docs/examples/example-example25/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example25 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example25/manifest.json b/1.2.17/docs/examples/example-example25/manifest.json new file mode 100644 index 0000000000..827bc7b0f4 --- /dev/null +++ b/1.2.17/docs/examples/example-example25/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example25", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example26/index-debug.html b/1.2.17/docs/examples/example-example26/index-debug.html new file mode 100644 index 0000000000..5a248e4bd6 --- /dev/null +++ b/1.2.17/docs/examples/example-example26/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example26-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example26/index-jquery.html b/1.2.17/docs/examples/example-example26/index-jquery.html new file mode 100644 index 0000000000..a032a62d5e --- /dev/null +++ b/1.2.17/docs/examples/example-example26/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example26-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example26/index-production.html b/1.2.17/docs/examples/example-example26/index-production.html new file mode 100644 index 0000000000..8696a84245 --- /dev/null +++ b/1.2.17/docs/examples/example-example26/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example26-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example26/index.html b/1.2.17/docs/examples/example-example26/index.html new file mode 100644 index 0000000000..2395e90263 --- /dev/null +++ b/1.2.17/docs/examples/example-example26/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example26 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example26/manifest.json b/1.2.17/docs/examples/example-example26/manifest.json new file mode 100644 index 0000000000..2b3b4c0530 --- /dev/null +++ b/1.2.17/docs/examples/example-example26/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example26", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example27/index-debug.html b/1.2.17/docs/examples/example-example27/index-debug.html new file mode 100644 index 0000000000..5d7c52208e --- /dev/null +++ b/1.2.17/docs/examples/example-example27/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example27-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example27/index-jquery.html b/1.2.17/docs/examples/example-example27/index-jquery.html new file mode 100644 index 0000000000..a0535f36dc --- /dev/null +++ b/1.2.17/docs/examples/example-example27/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example27-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example27/index-production.html b/1.2.17/docs/examples/example-example27/index-production.html new file mode 100644 index 0000000000..2eaa946e52 --- /dev/null +++ b/1.2.17/docs/examples/example-example27/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example27-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example27/index.html b/1.2.17/docs/examples/example-example27/index.html new file mode 100644 index 0000000000..566dd69ab0 --- /dev/null +++ b/1.2.17/docs/examples/example-example27/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example27 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example27/manifest.json b/1.2.17/docs/examples/example-example27/manifest.json new file mode 100644 index 0000000000..1c3026f9b2 --- /dev/null +++ b/1.2.17/docs/examples/example-example27/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example27", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example28/index-debug.html b/1.2.17/docs/examples/example-example28/index-debug.html new file mode 100644 index 0000000000..0072dfdf20 --- /dev/null +++ b/1.2.17/docs/examples/example-example28/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example28-debug + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example28/index-jquery.html b/1.2.17/docs/examples/example-example28/index-jquery.html new file mode 100644 index 0000000000..6eebc6c261 --- /dev/null +++ b/1.2.17/docs/examples/example-example28/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example28-jquery + + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example28/index-production.html b/1.2.17/docs/examples/example-example28/index-production.html new file mode 100644 index 0000000000..495aab200b --- /dev/null +++ b/1.2.17/docs/examples/example-example28/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example28-production + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example28/index.html b/1.2.17/docs/examples/example-example28/index.html new file mode 100644 index 0000000000..49ddd93aab --- /dev/null +++ b/1.2.17/docs/examples/example-example28/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example28 + + + + + + + + + + count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example28/manifest.json b/1.2.17/docs/examples/example-example28/manifest.json new file mode 100644 index 0000000000..9a80d91245 --- /dev/null +++ b/1.2.17/docs/examples/example-example28/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example28", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example29/index-debug.html b/1.2.17/docs/examples/example-example29/index-debug.html new file mode 100644 index 0000000000..cb287192a4 --- /dev/null +++ b/1.2.17/docs/examples/example-example29/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example29-debug + + + + + + + + + + key down count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example29/index-jquery.html b/1.2.17/docs/examples/example-example29/index-jquery.html new file mode 100644 index 0000000000..a8d3b5bcea --- /dev/null +++ b/1.2.17/docs/examples/example-example29/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example29-jquery + + + + + + + + + + + key down count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example29/index-production.html b/1.2.17/docs/examples/example-example29/index-production.html new file mode 100644 index 0000000000..49cd672492 --- /dev/null +++ b/1.2.17/docs/examples/example-example29/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example29-production + + + + + + + + + + key down count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example29/index.html b/1.2.17/docs/examples/example-example29/index.html new file mode 100644 index 0000000000..f07682bee3 --- /dev/null +++ b/1.2.17/docs/examples/example-example29/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example29 + + + + + + + + + + key down count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example29/manifest.json b/1.2.17/docs/examples/example-example29/manifest.json new file mode 100644 index 0000000000..48f662eda5 --- /dev/null +++ b/1.2.17/docs/examples/example-example29/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example29", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example3/index-debug.html b/1.2.17/docs/examples/example-example3/index-debug.html new file mode 100644 index 0000000000..2a14b96295 --- /dev/null +++ b/1.2.17/docs/examples/example-example3/index-debug.html @@ -0,0 +1,36 @@ + + + + + Example - example-example3-debug + + + + + + + + + + +
+ + + + +

Cached Values

+
+ + : + +
+ +

Cache Info

+
+ + : + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example3/index-jquery.html b/1.2.17/docs/examples/example-example3/index-jquery.html new file mode 100644 index 0000000000..14860dfa79 --- /dev/null +++ b/1.2.17/docs/examples/example-example3/index-jquery.html @@ -0,0 +1,37 @@ + + + + + Example - example-example3-jquery + + + + + + + + + + + +
+ + + + +

Cached Values

+
+ + : + +
+ +

Cache Info

+
+ + : + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example3/index-production.html b/1.2.17/docs/examples/example-example3/index-production.html new file mode 100644 index 0000000000..96aba53433 --- /dev/null +++ b/1.2.17/docs/examples/example-example3/index-production.html @@ -0,0 +1,36 @@ + + + + + Example - example-example3-production + + + + + + + + + + +
+ + + + +

Cached Values

+
+ + : + +
+ +

Cache Info

+
+ + : + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example3/index.html b/1.2.17/docs/examples/example-example3/index.html new file mode 100644 index 0000000000..617d0f5a40 --- /dev/null +++ b/1.2.17/docs/examples/example-example3/index.html @@ -0,0 +1,36 @@ + + + + + Example - example-example3 + + + + + + + + + + +
+ + + + +

Cached Values

+
+ + : + +
+ +

Cache Info

+
+ + : + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example3/manifest.json b/1.2.17/docs/examples/example-example3/manifest.json new file mode 100644 index 0000000000..e1661b24e5 --- /dev/null +++ b/1.2.17/docs/examples/example-example3/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example3", + "files": [ + "index-production.html", + "script.js", + "style.css" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example3/script.js b/1.2.17/docs/examples/example-example3/script.js new file mode 100644 index 0000000000..1e4be05ab3 --- /dev/null +++ b/1.2.17/docs/examples/example-example3/script.js @@ -0,0 +1,9 @@ + angular.module('cacheExampleApp', []). + controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) { + $scope.keys = []; + $scope.cache = $cacheFactory('cacheId'); + $scope.put = function(key, value) { + $scope.cache.put(key, value); + $scope.keys.push(key); + }; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example3/style.css b/1.2.17/docs/examples/example-example3/style.css new file mode 100644 index 0000000000..301a3b0a5c --- /dev/null +++ b/1.2.17/docs/examples/example-example3/style.css @@ -0,0 +1,3 @@ + p { + margin: 10px 0 3px; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example30/index-debug.html b/1.2.17/docs/examples/example-example30/index-debug.html new file mode 100644 index 0000000000..250e4d9831 --- /dev/null +++ b/1.2.17/docs/examples/example-example30/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example30-debug + + + + + + + + +

Typing in the input box below updates the key count

+ key up count: {{count}} + +

Typing in the input box below updates the keycode

+ +

event keyCode: {{ event.keyCode }}

+

event altKey: {{ event.altKey }}

+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example30/index-jquery.html b/1.2.17/docs/examples/example-example30/index-jquery.html new file mode 100644 index 0000000000..5032a01941 --- /dev/null +++ b/1.2.17/docs/examples/example-example30/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example30-jquery + + + + + + + + + +

Typing in the input box below updates the key count

+ key up count: {{count}} + +

Typing in the input box below updates the keycode

+ +

event keyCode: {{ event.keyCode }}

+

event altKey: {{ event.altKey }}

+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example30/index-production.html b/1.2.17/docs/examples/example-example30/index-production.html new file mode 100644 index 0000000000..5ca0c4d6c7 --- /dev/null +++ b/1.2.17/docs/examples/example-example30/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example30-production + + + + + + + + +

Typing in the input box below updates the key count

+ key up count: {{count}} + +

Typing in the input box below updates the keycode

+ +

event keyCode: {{ event.keyCode }}

+

event altKey: {{ event.altKey }}

+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example30/index.html b/1.2.17/docs/examples/example-example30/index.html new file mode 100644 index 0000000000..c97c2a8c87 --- /dev/null +++ b/1.2.17/docs/examples/example-example30/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example30 + + + + + + + + +

Typing in the input box below updates the key count

+ key up count: {{count}} + +

Typing in the input box below updates the keycode

+ +

event keyCode: {{ event.keyCode }}

+

event altKey: {{ event.altKey }}

+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example30/manifest.json b/1.2.17/docs/examples/example-example30/manifest.json new file mode 100644 index 0000000000..7e06e65605 --- /dev/null +++ b/1.2.17/docs/examples/example-example30/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example30", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example31/index-debug.html b/1.2.17/docs/examples/example-example31/index-debug.html new file mode 100644 index 0000000000..6c8a74c7b2 --- /dev/null +++ b/1.2.17/docs/examples/example-example31/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example31-debug + + + + + + + + + + key press count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example31/index-jquery.html b/1.2.17/docs/examples/example-example31/index-jquery.html new file mode 100644 index 0000000000..1b4995c4d2 --- /dev/null +++ b/1.2.17/docs/examples/example-example31/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example31-jquery + + + + + + + + + + + key press count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example31/index-production.html b/1.2.17/docs/examples/example-example31/index-production.html new file mode 100644 index 0000000000..035e3c73ae --- /dev/null +++ b/1.2.17/docs/examples/example-example31/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example31-production + + + + + + + + + + key press count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example31/index.html b/1.2.17/docs/examples/example-example31/index.html new file mode 100644 index 0000000000..d14c6b7f5b --- /dev/null +++ b/1.2.17/docs/examples/example-example31/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example31 + + + + + + + + + + key press count: {{count}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example31/manifest.json b/1.2.17/docs/examples/example-example31/manifest.json new file mode 100644 index 0000000000..4890933c94 --- /dev/null +++ b/1.2.17/docs/examples/example-example31/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example31", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example32/index-debug.html b/1.2.17/docs/examples/example-example32/index-debug.html new file mode 100644 index 0000000000..80ef9d6edf --- /dev/null +++ b/1.2.17/docs/examples/example-example32/index-debug.html @@ -0,0 +1,33 @@ + + + + + Example - example-example32-debug + + + + + + + + + + + Enter text and hit enter: + + +
list={{list}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example32/index-jquery.html b/1.2.17/docs/examples/example-example32/index-jquery.html new file mode 100644 index 0000000000..1670bbb09d --- /dev/null +++ b/1.2.17/docs/examples/example-example32/index-jquery.html @@ -0,0 +1,34 @@ + + + + + Example - example-example32-jquery + + + + + + + + + + + + Enter text and hit enter: + + +
list={{list}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example32/index-production.html b/1.2.17/docs/examples/example-example32/index-production.html new file mode 100644 index 0000000000..ece250917c --- /dev/null +++ b/1.2.17/docs/examples/example-example32/index-production.html @@ -0,0 +1,33 @@ + + + + + Example - example-example32-production + + + + + + + + + + + Enter text and hit enter: + + +
list={{list}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example32/index.html b/1.2.17/docs/examples/example-example32/index.html new file mode 100644 index 0000000000..32aa2fc77f --- /dev/null +++ b/1.2.17/docs/examples/example-example32/index.html @@ -0,0 +1,33 @@ + + + + + Example - example-example32 + + + + + + + + + + + Enter text and hit enter: + + +
list={{list}}
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example32/manifest.json b/1.2.17/docs/examples/example-example32/manifest.json new file mode 100644 index 0000000000..597ccde53c --- /dev/null +++ b/1.2.17/docs/examples/example-example32/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example32", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example32/protractor.js b/1.2.17/docs/examples/example-example32/protractor.js new file mode 100644 index 0000000000..cb3d46eb70 --- /dev/null +++ b/1.2.17/docs/examples/example-example32/protractor.js @@ -0,0 +1,12 @@ + it('should check ng-submit', function() { + expect(element(by.binding('list')).getText()).toBe('list=[]'); + element(by.css('#submit')).click(); + expect(element(by.binding('list')).getText()).toContain('hello'); + expect(element(by.input('text')).getAttribute('value')).toBe(''); + }); + it('should ignore empty strings', function() { + expect(element(by.binding('list')).getText()).toBe('list=[]'); + element(by.css('#submit')).click(); + element(by.css('#submit')).click(); + expect(element(by.binding('list')).getText()).toContain('hello'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example33/index-debug.html b/1.2.17/docs/examples/example-example33/index-debug.html new file mode 100644 index 0000000000..d7b6255a31 --- /dev/null +++ b/1.2.17/docs/examples/example-example33/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example33-debug + + + + + + + + + + copied: {{copied}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example33/index-jquery.html b/1.2.17/docs/examples/example-example33/index-jquery.html new file mode 100644 index 0000000000..bde3846d2b --- /dev/null +++ b/1.2.17/docs/examples/example-example33/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example33-jquery + + + + + + + + + + + copied: {{copied}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example33/index-production.html b/1.2.17/docs/examples/example-example33/index-production.html new file mode 100644 index 0000000000..6c78ff3e4f --- /dev/null +++ b/1.2.17/docs/examples/example-example33/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example33-production + + + + + + + + + + copied: {{copied}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example33/index.html b/1.2.17/docs/examples/example-example33/index.html new file mode 100644 index 0000000000..074e796080 --- /dev/null +++ b/1.2.17/docs/examples/example-example33/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example33 + + + + + + + + + + copied: {{copied}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example33/manifest.json b/1.2.17/docs/examples/example-example33/manifest.json new file mode 100644 index 0000000000..be9db818f4 --- /dev/null +++ b/1.2.17/docs/examples/example-example33/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example33", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example34/index-debug.html b/1.2.17/docs/examples/example-example34/index-debug.html new file mode 100644 index 0000000000..e612cbaef8 --- /dev/null +++ b/1.2.17/docs/examples/example-example34/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example34-debug + + + + + + + + + + cut: {{cut}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example34/index-jquery.html b/1.2.17/docs/examples/example-example34/index-jquery.html new file mode 100644 index 0000000000..21da6f9b78 --- /dev/null +++ b/1.2.17/docs/examples/example-example34/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example34-jquery + + + + + + + + + + + cut: {{cut}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example34/index-production.html b/1.2.17/docs/examples/example-example34/index-production.html new file mode 100644 index 0000000000..0f838a3baf --- /dev/null +++ b/1.2.17/docs/examples/example-example34/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example34-production + + + + + + + + + + cut: {{cut}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example34/index.html b/1.2.17/docs/examples/example-example34/index.html new file mode 100644 index 0000000000..cee35cffca --- /dev/null +++ b/1.2.17/docs/examples/example-example34/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example34 + + + + + + + + + + cut: {{cut}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example34/manifest.json b/1.2.17/docs/examples/example-example34/manifest.json new file mode 100644 index 0000000000..cc7622aeb4 --- /dev/null +++ b/1.2.17/docs/examples/example-example34/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example34", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example35/index-debug.html b/1.2.17/docs/examples/example-example35/index-debug.html new file mode 100644 index 0000000000..44b24f1312 --- /dev/null +++ b/1.2.17/docs/examples/example-example35/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example35-debug + + + + + + + + + + pasted: {{paste}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example35/index-jquery.html b/1.2.17/docs/examples/example-example35/index-jquery.html new file mode 100644 index 0000000000..8a2db5e67f --- /dev/null +++ b/1.2.17/docs/examples/example-example35/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example35-jquery + + + + + + + + + + + pasted: {{paste}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example35/index-production.html b/1.2.17/docs/examples/example-example35/index-production.html new file mode 100644 index 0000000000..64de387dc5 --- /dev/null +++ b/1.2.17/docs/examples/example-example35/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example35-production + + + + + + + + + + pasted: {{paste}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example35/index.html b/1.2.17/docs/examples/example-example35/index.html new file mode 100644 index 0000000000..15950d52d0 --- /dev/null +++ b/1.2.17/docs/examples/example-example35/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example35 + + + + + + + + + + pasted: {{paste}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example35/manifest.json b/1.2.17/docs/examples/example-example35/manifest.json new file mode 100644 index 0000000000..9705a31c98 --- /dev/null +++ b/1.2.17/docs/examples/example-example35/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example35", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example36/animations.css b/1.2.17/docs/examples/example-example36/animations.css new file mode 100644 index 0000000000..2782c1247b --- /dev/null +++ b/1.2.17/docs/examples/example-example36/animations.css @@ -0,0 +1,20 @@ + .animate-if { + background:white; + border:1px solid black; + padding:10px; + } + + .animate-if.ng-enter, .animate-if.ng-leave { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + } + + .animate-if.ng-enter, + .animate-if.ng-leave.ng-leave-active { + opacity:0; + } + + .animate-if.ng-leave, + .animate-if.ng-enter.ng-enter-active { + opacity:1; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example36/index-debug.html b/1.2.17/docs/examples/example-example36/index-debug.html new file mode 100644 index 0000000000..10141801aa --- /dev/null +++ b/1.2.17/docs/examples/example-example36/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example36-debug + + + + + + + + + + + Click me:
+ Show when checked: + + I'm removed when the checkbox is unchecked. + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example36/index-jquery.html b/1.2.17/docs/examples/example-example36/index-jquery.html new file mode 100644 index 0000000000..f333fb2112 --- /dev/null +++ b/1.2.17/docs/examples/example-example36/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example36-jquery + + + + + + + + + + + + Click me:
+ Show when checked: + + I'm removed when the checkbox is unchecked. + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example36/index-production.html b/1.2.17/docs/examples/example-example36/index-production.html new file mode 100644 index 0000000000..fd485df6da --- /dev/null +++ b/1.2.17/docs/examples/example-example36/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example36-production + + + + + + + + + + + Click me:
+ Show when checked: + + I'm removed when the checkbox is unchecked. + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example36/index.html b/1.2.17/docs/examples/example-example36/index.html new file mode 100644 index 0000000000..7bc6541378 --- /dev/null +++ b/1.2.17/docs/examples/example-example36/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example36 + + + + + + + + + + + Click me:
+ Show when checked: + + I'm removed when the checkbox is unchecked. + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example36/manifest.json b/1.2.17/docs/examples/example-example36/manifest.json new file mode 100644 index 0000000000..e78a43e50d --- /dev/null +++ b/1.2.17/docs/examples/example-example36/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example36", + "files": [ + "index-production.html", + "animations.css" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example37/animations.css b/1.2.17/docs/examples/example-example37/animations.css new file mode 100644 index 0000000000..87a01ef8ec --- /dev/null +++ b/1.2.17/docs/examples/example-example37/animations.css @@ -0,0 +1,38 @@ + .slide-animate-container { + position:relative; + background:white; + border:1px solid black; + height:40px; + overflow:hidden; + } + + .slide-animate { + padding:10px; + } + + .slide-animate.ng-enter, .slide-animate.ng-leave { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + display:block; + padding:10px; + } + + .slide-animate.ng-enter { + top:-50px; + } + .slide-animate.ng-enter.ng-enter-active { + top:0; + } + + .slide-animate.ng-leave { + top:0; + } + .slide-animate.ng-leave.ng-leave-active { + top:50px; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example37/index-debug.html b/1.2.17/docs/examples/example-example37/index-debug.html new file mode 100644 index 0000000000..2af023d5b2 --- /dev/null +++ b/1.2.17/docs/examples/example-example37/index-debug.html @@ -0,0 +1,28 @@ + + + + + Example - example-example37-debug + + + + + + + + + + + +
+ + url of the template: {{template.url}} +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example37/index-jquery.html b/1.2.17/docs/examples/example-example37/index-jquery.html new file mode 100644 index 0000000000..868578dc74 --- /dev/null +++ b/1.2.17/docs/examples/example-example37/index-jquery.html @@ -0,0 +1,29 @@ + + + + + Example - example-example37-jquery + + + + + + + + + + + + +
+ + url of the template: {{template.url}} +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example37/index-production.html b/1.2.17/docs/examples/example-example37/index-production.html new file mode 100644 index 0000000000..d5511733ff --- /dev/null +++ b/1.2.17/docs/examples/example-example37/index-production.html @@ -0,0 +1,28 @@ + + + + + Example - example-example37-production + + + + + + + + + + + +
+ + url of the template: {{template.url}} +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example37/index.html b/1.2.17/docs/examples/example-example37/index.html new file mode 100644 index 0000000000..e52ddd93d0 --- /dev/null +++ b/1.2.17/docs/examples/example-example37/index.html @@ -0,0 +1,28 @@ + + + + + Example - example-example37 + + + + + + + + + + + +
+ + url of the template: {{template.url}} +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example37/manifest.json b/1.2.17/docs/examples/example-example37/manifest.json new file mode 100644 index 0000000000..d578c48c34 --- /dev/null +++ b/1.2.17/docs/examples/example-example37/manifest.json @@ -0,0 +1,11 @@ +{ + "name": "example-example37", + "files": [ + "index-production.html", + "script.js", + "template1.html", + "template2.html", + "animations.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example37/protractor.js b/1.2.17/docs/examples/example-example37/protractor.js new file mode 100644 index 0000000000..1320585aee --- /dev/null +++ b/1.2.17/docs/examples/example-example37/protractor.js @@ -0,0 +1,27 @@ + var templateSelect = element(by.model('template')); + var includeElem = element(by.css('[ng-include]')); + + it('should load template1.html', function() { + expect(includeElem.getText()).toMatch(/Content of template1.html/); + }); + + it('should load template2.html', function() { + if (browser.params.browser == 'firefox') { + // Firefox can't handle using selects + // See https://github.com/angular/protractor/issues/480 + return; + } + templateSelect.click(); + templateSelect.element.all(by.css('option')).get(2).click(); + expect(includeElem.getText()).toMatch(/Content of template2.html/); + }); + + it('should change to blank', function() { + if (browser.params.browser == 'firefox') { + // Firefox can't handle using selects + return; + } + templateSelect.click(); + templateSelect.element.all(by.css('option')).get(0).click(); + expect(includeElem.isPresent()).toBe(false); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example37/script.js b/1.2.17/docs/examples/example-example37/script.js new file mode 100644 index 0000000000..80237f8008 --- /dev/null +++ b/1.2.17/docs/examples/example-example37/script.js @@ -0,0 +1,6 @@ + function Ctrl($scope) { + $scope.templates = + [ { name: 'template1.html', url: 'template1.html'}, + { name: 'template2.html', url: 'template2.html'} ]; + $scope.template = $scope.templates[0]; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example37/template1.html b/1.2.17/docs/examples/example-example37/template1.html new file mode 100644 index 0000000000..e2ce5ca854 --- /dev/null +++ b/1.2.17/docs/examples/example-example37/template1.html @@ -0,0 +1 @@ + Content of template1.html \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example37/template2.html b/1.2.17/docs/examples/example-example37/template2.html new file mode 100644 index 0000000000..bc2c751a70 --- /dev/null +++ b/1.2.17/docs/examples/example-example37/template2.html @@ -0,0 +1 @@ + Content of template2.html \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example38/index-debug.html b/1.2.17/docs/examples/example-example38/index-debug.html new file mode 100644 index 0000000000..9299bb90ac --- /dev/null +++ b/1.2.17/docs/examples/example-example38/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-example38-debug + + + + + + + + + +
+
+
+ list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}}; +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example38/index-jquery.html b/1.2.17/docs/examples/example-example38/index-jquery.html new file mode 100644 index 0000000000..4bd0bb3589 --- /dev/null +++ b/1.2.17/docs/examples/example-example38/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-example38-jquery + + + + + + + + + + +
+
+
+ list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}}; +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example38/index-production.html b/1.2.17/docs/examples/example-example38/index-production.html new file mode 100644 index 0000000000..09feb5ff7f --- /dev/null +++ b/1.2.17/docs/examples/example-example38/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-example38-production + + + + + + + + + +
+
+
+ list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}}; +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example38/index.html b/1.2.17/docs/examples/example-example38/index.html new file mode 100644 index 0000000000..254ec8b0f6 --- /dev/null +++ b/1.2.17/docs/examples/example-example38/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-example38 + + + + + + + + + +
+
+
+ list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}}; +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example38/manifest.json b/1.2.17/docs/examples/example-example38/manifest.json new file mode 100644 index 0000000000..6e95209d2d --- /dev/null +++ b/1.2.17/docs/examples/example-example38/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example38", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example38/protractor.js b/1.2.17/docs/examples/example-example38/protractor.js new file mode 100644 index 0000000000..b1bc72d1d7 --- /dev/null +++ b/1.2.17/docs/examples/example-example38/protractor.js @@ -0,0 +1,7 @@ + it('should alias index positions', function() { + var elements = element.all(by.css('.example-init')); + expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;'); + expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;'); + expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;'); + expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example39/index-debug.html b/1.2.17/docs/examples/example-example39/index-debug.html new file mode 100644 index 0000000000..fcce1d442f --- /dev/null +++ b/1.2.17/docs/examples/example-example39/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example39-debug + + + + + + + + +
Normal: {{1 + 2}}
+
Ignored: {{1 + 2}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example39/index-jquery.html b/1.2.17/docs/examples/example-example39/index-jquery.html new file mode 100644 index 0000000000..9fc171ce5f --- /dev/null +++ b/1.2.17/docs/examples/example-example39/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example39-jquery + + + + + + + + + +
Normal: {{1 + 2}}
+
Ignored: {{1 + 2}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example39/index-production.html b/1.2.17/docs/examples/example-example39/index-production.html new file mode 100644 index 0000000000..b6f0b77e05 --- /dev/null +++ b/1.2.17/docs/examples/example-example39/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example39-production + + + + + + + + +
Normal: {{1 + 2}}
+
Ignored: {{1 + 2}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example39/index.html b/1.2.17/docs/examples/example-example39/index.html new file mode 100644 index 0000000000..6ad09bfc7a --- /dev/null +++ b/1.2.17/docs/examples/example-example39/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example39 + + + + + + + + +
Normal: {{1 + 2}}
+
Ignored: {{1 + 2}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example39/manifest.json b/1.2.17/docs/examples/example-example39/manifest.json new file mode 100644 index 0000000000..4562c86bc2 --- /dev/null +++ b/1.2.17/docs/examples/example-example39/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example39", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example39/protractor.js b/1.2.17/docs/examples/example-example39/protractor.js new file mode 100644 index 0000000000..92e76aeb1f --- /dev/null +++ b/1.2.17/docs/examples/example-example39/protractor.js @@ -0,0 +1,4 @@ + it('should check ng-non-bindable', function() { + expect(element(by.binding('1 + 2')).getText()).toContain('3'); + expect(element.all(by.css('div')).last().getText()).toMatch(/1 \+ 2/); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example4/index-debug.html b/1.2.17/docs/examples/example-example4/index-debug.html new file mode 100644 index 0000000000..32464730e0 --- /dev/null +++ b/1.2.17/docs/examples/example-example4/index-debug.html @@ -0,0 +1,53 @@ + + + + + Example - example-example4-debug + + + + + + + + + +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example4/index-jquery.html b/1.2.17/docs/examples/example-example4/index-jquery.html new file mode 100644 index 0000000000..39dbfd33b2 --- /dev/null +++ b/1.2.17/docs/examples/example-example4/index-jquery.html @@ -0,0 +1,54 @@ + + + + + Example - example-example4-jquery + + + + + + + + + + +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example4/index-production.html b/1.2.17/docs/examples/example-example4/index-production.html new file mode 100644 index 0000000000..c75767d8ee --- /dev/null +++ b/1.2.17/docs/examples/example-example4/index-production.html @@ -0,0 +1,53 @@ + + + + + Example - example-example4-production + + + + + + + + + +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example4/index.html b/1.2.17/docs/examples/example-example4/index.html new file mode 100644 index 0000000000..ca050c817e --- /dev/null +++ b/1.2.17/docs/examples/example-example4/index.html @@ -0,0 +1,53 @@ + + + + + Example - example-example4 + + + + + + + + + +
+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example4/manifest.json b/1.2.17/docs/examples/example-example4/manifest.json new file mode 100644 index 0000000000..490fc2ef89 --- /dev/null +++ b/1.2.17/docs/examples/example-example4/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example4", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example4/protractor.js b/1.2.17/docs/examples/example-example4/protractor.js new file mode 100644 index 0000000000..f04c931a99 --- /dev/null +++ b/1.2.17/docs/examples/example-example4/protractor.js @@ -0,0 +1,9 @@ + it('should auto compile', function() { + var textarea = $('textarea'); + var output = $('div[compile]'); + // The initial state reads 'Hello Angular'. + expect(output.getText()).toBe('Hello Angular'); + textarea.clear(); + textarea.sendKeys('{{name}}!'); + expect(output.getText()).toBe('Angular!'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example40/index-debug.html b/1.2.17/docs/examples/example-example40/index-debug.html new file mode 100644 index 0000000000..a20cdbd519 --- /dev/null +++ b/1.2.17/docs/examples/example-example40/index-debug.html @@ -0,0 +1,45 @@ + + + + + Example - example-example40-debug + + + + + + + + + +
+ Person 1:
+ Person 2:
+ Number of People:
+ + + Without Offset: + +
+ + + With Offset(2): + + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example40/index-jquery.html b/1.2.17/docs/examples/example-example40/index-jquery.html new file mode 100644 index 0000000000..2af63ae349 --- /dev/null +++ b/1.2.17/docs/examples/example-example40/index-jquery.html @@ -0,0 +1,46 @@ + + + + + Example - example-example40-jquery + + + + + + + + + + +
+ Person 1:
+ Person 2:
+ Number of People:
+ + + Without Offset: + +
+ + + With Offset(2): + + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example40/index-production.html b/1.2.17/docs/examples/example-example40/index-production.html new file mode 100644 index 0000000000..e61fb35fe8 --- /dev/null +++ b/1.2.17/docs/examples/example-example40/index-production.html @@ -0,0 +1,45 @@ + + + + + Example - example-example40-production + + + + + + + + + +
+ Person 1:
+ Person 2:
+ Number of People:
+ + + Without Offset: + +
+ + + With Offset(2): + + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example40/index.html b/1.2.17/docs/examples/example-example40/index.html new file mode 100644 index 0000000000..feff267e1b --- /dev/null +++ b/1.2.17/docs/examples/example-example40/index.html @@ -0,0 +1,45 @@ + + + + + Example - example-example40 + + + + + + + + + +
+ Person 1:
+ Person 2:
+ Number of People:
+ + + Without Offset: + +
+ + + With Offset(2): + + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example40/manifest.json b/1.2.17/docs/examples/example-example40/manifest.json new file mode 100644 index 0000000000..c3a60d52e5 --- /dev/null +++ b/1.2.17/docs/examples/example-example40/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example40", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example40/protractor.js b/1.2.17/docs/examples/example-example40/protractor.js new file mode 100644 index 0000000000..65fe79ff37 --- /dev/null +++ b/1.2.17/docs/examples/example-example40/protractor.js @@ -0,0 +1,45 @@ + it('should show correct pluralized string', function() { + var withoutOffset = element.all(by.css('ng-pluralize')).get(0); + var withOffset = element.all(by.css('ng-pluralize')).get(1); + var countInput = element(by.model('personCount')); + + expect(withoutOffset.getText()).toEqual('1 person is viewing.'); + expect(withOffset.getText()).toEqual('Igor is viewing.'); + + countInput.clear(); + countInput.sendKeys('0'); + + expect(withoutOffset.getText()).toEqual('Nobody is viewing.'); + expect(withOffset.getText()).toEqual('Nobody is viewing.'); + + countInput.clear(); + countInput.sendKeys('2'); + + expect(withoutOffset.getText()).toEqual('2 people are viewing.'); + expect(withOffset.getText()).toEqual('Igor and Misko are viewing.'); + + countInput.clear(); + countInput.sendKeys('3'); + + expect(withoutOffset.getText()).toEqual('3 people are viewing.'); + expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.'); + + countInput.clear(); + countInput.sendKeys('4'); + + expect(withoutOffset.getText()).toEqual('4 people are viewing.'); + expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.'); + }); + it('should show data-bound names', function() { + var withOffset = element.all(by.css('ng-pluralize')).get(1); + var personCount = element(by.model('personCount')); + var person1 = element(by.model('person1')); + var person2 = element(by.model('person2')); + personCount.clear(); + personCount.sendKeys('4'); + person1.clear(); + person1.sendKeys('Di'); + person2.clear(); + person2.sendKeys('Vojta'); + expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example41/animations.css b/1.2.17/docs/examples/example-example41/animations.css new file mode 100644 index 0000000000..5d21c71bba --- /dev/null +++ b/1.2.17/docs/examples/example-example41/animations.css @@ -0,0 +1,34 @@ + .example-animate-container { + background:white; + border:1px solid black; + list-style:none; + margin:0; + padding:0 10px; + } + + .animate-repeat { + line-height:40px; + list-style:none; + box-sizing:border-box; + } + + .animate-repeat.ng-move, + .animate-repeat.ng-enter, + .animate-repeat.ng-leave { + -webkit-transition:all linear 0.5s; + transition:all linear 0.5s; + } + + .animate-repeat.ng-leave.ng-leave-active, + .animate-repeat.ng-move, + .animate-repeat.ng-enter { + opacity:0; + max-height:0; + } + + .animate-repeat.ng-leave, + .animate-repeat.ng-move.ng-move-active, + .animate-repeat.ng-enter.ng-enter-active { + opacity:1; + max-height:40px; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example41/index-debug.html b/1.2.17/docs/examples/example-example41/index-debug.html new file mode 100644 index 0000000000..0a94da1387 --- /dev/null +++ b/1.2.17/docs/examples/example-example41/index-debug.html @@ -0,0 +1,37 @@ + + + + + Example - example-example41-debug + + + + + + + + + + +
+ I have {{friends.length}} friends. They are: + +
    +
  • + [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old. +
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example41/index-jquery.html b/1.2.17/docs/examples/example-example41/index-jquery.html new file mode 100644 index 0000000000..a9dc777591 --- /dev/null +++ b/1.2.17/docs/examples/example-example41/index-jquery.html @@ -0,0 +1,38 @@ + + + + + Example - example-example41-jquery + + + + + + + + + + + +
+ I have {{friends.length}} friends. They are: + +
    +
  • + [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old. +
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example41/index-production.html b/1.2.17/docs/examples/example-example41/index-production.html new file mode 100644 index 0000000000..1d3c931319 --- /dev/null +++ b/1.2.17/docs/examples/example-example41/index-production.html @@ -0,0 +1,37 @@ + + + + + Example - example-example41-production + + + + + + + + + + +
+ I have {{friends.length}} friends. They are: + +
    +
  • + [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old. +
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example41/index.html b/1.2.17/docs/examples/example-example41/index.html new file mode 100644 index 0000000000..b16ca4cf0a --- /dev/null +++ b/1.2.17/docs/examples/example-example41/index.html @@ -0,0 +1,37 @@ + + + + + Example - example-example41 + + + + + + + + + + +
+ I have {{friends.length}} friends. They are: + +
    +
  • + [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old. +
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example41/manifest.json b/1.2.17/docs/examples/example-example41/manifest.json new file mode 100644 index 0000000000..b9a865868a --- /dev/null +++ b/1.2.17/docs/examples/example-example41/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example41", + "files": [ + "index-production.html", + "animations.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example41/protractor.js b/1.2.17/docs/examples/example-example41/protractor.js new file mode 100644 index 0000000000..b90d6fb61a --- /dev/null +++ b/1.2.17/docs/examples/example-example41/protractor.js @@ -0,0 +1,20 @@ +var friends = element.all(by.repeater('friend in friends')); + +it('should render initial data set', function() { + expect(friends.count()).toBe(10); + expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.'); + expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.'); + expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.'); + expect(element(by.binding('friends.length')).getText()) + .toMatch("I have 10 friends. They are:"); +}); + + it('should update repeater when filter predicate changes', function() { + expect(friends.count()).toBe(10); + + element(by.model('q')).sendKeys('ma'); + + expect(friends.count()).toBe(2); + expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.'); + expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example42/animations.css b/1.2.17/docs/examples/example-example42/animations.css new file mode 100644 index 0000000000..5a8125160e --- /dev/null +++ b/1.2.17/docs/examples/example-example42/animations.css @@ -0,0 +1,21 @@ + .animate-show { + -webkit-transition:all linear 0.5s; + transition:all linear 0.5s; + line-height:20px; + opacity:1; + padding:10px; + border:1px solid black; + background:white; + } + + .animate-show.ng-hide { + line-height:0; + opacity:0; + padding:0 10px; + } + + .check-element { + padding:10px; + border:1px solid black; + background:white; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example42/glyphicons.css b/1.2.17/docs/examples/example-example42/glyphicons.css new file mode 100644 index 0000000000..e81b05ec1e --- /dev/null +++ b/1.2.17/docs/examples/example-example42/glyphicons.css @@ -0,0 +1 @@ + @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example42/index-debug.html b/1.2.17/docs/examples/example-example42/index-debug.html new file mode 100644 index 0000000000..d8415d75be --- /dev/null +++ b/1.2.17/docs/examples/example-example42/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-example42-debug + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example42/index-jquery.html b/1.2.17/docs/examples/example-example42/index-jquery.html new file mode 100644 index 0000000000..8eec7bb8fb --- /dev/null +++ b/1.2.17/docs/examples/example-example42/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-example42-jquery + + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example42/index-production.html b/1.2.17/docs/examples/example-example42/index-production.html new file mode 100644 index 0000000000..e594c8248a --- /dev/null +++ b/1.2.17/docs/examples/example-example42/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-example42-production + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example42/index.html b/1.2.17/docs/examples/example-example42/index.html new file mode 100644 index 0000000000..bad6537994 --- /dev/null +++ b/1.2.17/docs/examples/example-example42/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-example42 + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example42/manifest.json b/1.2.17/docs/examples/example-example42/manifest.json new file mode 100644 index 0000000000..ad1e88d600 --- /dev/null +++ b/1.2.17/docs/examples/example-example42/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-example42", + "files": [ + "index-production.html", + "glyphicons.css", + "animations.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example42/protractor.js b/1.2.17/docs/examples/example-example42/protractor.js new file mode 100644 index 0000000000..a0c35c8644 --- /dev/null +++ b/1.2.17/docs/examples/example-example42/protractor.js @@ -0,0 +1,12 @@ + var thumbsUp = element(by.css('span.glyphicon-thumbs-up')); + var thumbsDown = element(by.css('span.glyphicon-thumbs-down')); + + it('should check ng-show / ng-hide', function() { + expect(thumbsUp.isDisplayed()).toBeFalsy(); + expect(thumbsDown.isDisplayed()).toBeTruthy(); + + element(by.model('checked')).click(); + + expect(thumbsUp.isDisplayed()).toBeTruthy(); + expect(thumbsDown.isDisplayed()).toBeFalsy(); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example43/animations.css b/1.2.17/docs/examples/example-example43/animations.css new file mode 100644 index 0000000000..a755d7b690 --- /dev/null +++ b/1.2.17/docs/examples/example-example43/animations.css @@ -0,0 +1,21 @@ + .animate-hide { + -webkit-transition:all linear 0.5s; + transition:all linear 0.5s; + line-height:20px; + opacity:1; + padding:10px; + border:1px solid black; + background:white; + } + + .animate-hide.ng-hide { + line-height:0; + opacity:0; + padding:0 10px; + } + + .check-element { + padding:10px; + border:1px solid black; + background:white; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example43/glyphicons.css b/1.2.17/docs/examples/example-example43/glyphicons.css new file mode 100644 index 0000000000..e81b05ec1e --- /dev/null +++ b/1.2.17/docs/examples/example-example43/glyphicons.css @@ -0,0 +1 @@ + @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example43/index-debug.html b/1.2.17/docs/examples/example-example43/index-debug.html new file mode 100644 index 0000000000..463559d785 --- /dev/null +++ b/1.2.17/docs/examples/example-example43/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-example43-debug + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example43/index-jquery.html b/1.2.17/docs/examples/example-example43/index-jquery.html new file mode 100644 index 0000000000..ff86fb3f11 --- /dev/null +++ b/1.2.17/docs/examples/example-example43/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-example43-jquery + + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example43/index-production.html b/1.2.17/docs/examples/example-example43/index-production.html new file mode 100644 index 0000000000..b23d53e14e --- /dev/null +++ b/1.2.17/docs/examples/example-example43/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-example43-production + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example43/index.html b/1.2.17/docs/examples/example-example43/index.html new file mode 100644 index 0000000000..e2919d9ebf --- /dev/null +++ b/1.2.17/docs/examples/example-example43/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-example43 + + + + + + + + + + + + Click me:
+
+ Show: +
+ I show up when your checkbox is checked. +
+
+
+ Hide: +
+ I hide when your checkbox is checked. +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example43/manifest.json b/1.2.17/docs/examples/example-example43/manifest.json new file mode 100644 index 0000000000..86faa930c0 --- /dev/null +++ b/1.2.17/docs/examples/example-example43/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-example43", + "files": [ + "index-production.html", + "glyphicons.css", + "animations.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example43/protractor.js b/1.2.17/docs/examples/example-example43/protractor.js new file mode 100644 index 0000000000..a0c35c8644 --- /dev/null +++ b/1.2.17/docs/examples/example-example43/protractor.js @@ -0,0 +1,12 @@ + var thumbsUp = element(by.css('span.glyphicon-thumbs-up')); + var thumbsDown = element(by.css('span.glyphicon-thumbs-down')); + + it('should check ng-show / ng-hide', function() { + expect(thumbsUp.isDisplayed()).toBeFalsy(); + expect(thumbsDown.isDisplayed()).toBeTruthy(); + + element(by.model('checked')).click(); + + expect(thumbsUp.isDisplayed()).toBeTruthy(); + expect(thumbsDown.isDisplayed()).toBeFalsy(); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example44/index-debug.html b/1.2.17/docs/examples/example-example44/index-debug.html new file mode 100644 index 0000000000..c5cd0ca037 --- /dev/null +++ b/1.2.17/docs/examples/example-example44/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example44-debug + + + + + + + + + + + + +
+ Sample Text +
myStyle={{myStyle}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example44/index-jquery.html b/1.2.17/docs/examples/example-example44/index-jquery.html new file mode 100644 index 0000000000..fc866c47af --- /dev/null +++ b/1.2.17/docs/examples/example-example44/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example44-jquery + + + + + + + + + + + + + +
+ Sample Text +
myStyle={{myStyle}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example44/index-production.html b/1.2.17/docs/examples/example-example44/index-production.html new file mode 100644 index 0000000000..c93ec96ba6 --- /dev/null +++ b/1.2.17/docs/examples/example-example44/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example44-production + + + + + + + + + + + + +
+ Sample Text +
myStyle={{myStyle}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example44/index.html b/1.2.17/docs/examples/example-example44/index.html new file mode 100644 index 0000000000..06ea4ebccb --- /dev/null +++ b/1.2.17/docs/examples/example-example44/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example44 + + + + + + + + + + + + +
+ Sample Text +
myStyle={{myStyle}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example44/manifest.json b/1.2.17/docs/examples/example-example44/manifest.json new file mode 100644 index 0000000000..07f72b2da1 --- /dev/null +++ b/1.2.17/docs/examples/example-example44/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example44", + "files": [ + "index-production.html", + "style.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example44/protractor.js b/1.2.17/docs/examples/example-example44/protractor.js new file mode 100644 index 0000000000..fe4af62bc2 --- /dev/null +++ b/1.2.17/docs/examples/example-example44/protractor.js @@ -0,0 +1,9 @@ + var colorSpan = element(by.css('span')); + + iit('should check ng-style', function() { + expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)'); + element(by.css('input[value=\'set color\']')).click(); + expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)'); + element(by.css('input[value=clear]')).click(); + expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example44/style.css b/1.2.17/docs/examples/example-example44/style.css new file mode 100644 index 0000000000..3813c5ab68 --- /dev/null +++ b/1.2.17/docs/examples/example-example44/style.css @@ -0,0 +1,3 @@ + span { + color: black; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example45/animations.css b/1.2.17/docs/examples/example-example45/animations.css new file mode 100644 index 0000000000..029267121d --- /dev/null +++ b/1.2.17/docs/examples/example-example45/animations.css @@ -0,0 +1,31 @@ + .animate-switch-container { + position:relative; + background:white; + border:1px solid black; + height:40px; + overflow:hidden; + } + + .animate-switch { + padding:10px; + } + + .animate-switch.ng-animate { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + } + + .animate-switch.ng-leave.ng-leave-active, + .animate-switch.ng-enter { + top:-50px; + } + .animate-switch.ng-leave, + .animate-switch.ng-enter.ng-enter-active { + top:0; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example45/index-debug.html b/1.2.17/docs/examples/example-example45/index-debug.html new file mode 100644 index 0000000000..cc1af3f749 --- /dev/null +++ b/1.2.17/docs/examples/example-example45/index-debug.html @@ -0,0 +1,30 @@ + + + + + Example - example-example45-debug + + + + + + + + + + + +
+ + selection={{selection}} +
+
+
Settings Div
+
Home Span
+
default
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example45/index-jquery.html b/1.2.17/docs/examples/example-example45/index-jquery.html new file mode 100644 index 0000000000..610b49a26f --- /dev/null +++ b/1.2.17/docs/examples/example-example45/index-jquery.html @@ -0,0 +1,31 @@ + + + + + Example - example-example45-jquery + + + + + + + + + + + + +
+ + selection={{selection}} +
+
+
Settings Div
+
Home Span
+
default
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example45/index-production.html b/1.2.17/docs/examples/example-example45/index-production.html new file mode 100644 index 0000000000..7e7c0f909a --- /dev/null +++ b/1.2.17/docs/examples/example-example45/index-production.html @@ -0,0 +1,30 @@ + + + + + Example - example-example45-production + + + + + + + + + + + +
+ + selection={{selection}} +
+
+
Settings Div
+
Home Span
+
default
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example45/index.html b/1.2.17/docs/examples/example-example45/index.html new file mode 100644 index 0000000000..445e531a3a --- /dev/null +++ b/1.2.17/docs/examples/example-example45/index.html @@ -0,0 +1,30 @@ + + + + + Example - example-example45 + + + + + + + + + + + +
+ + selection={{selection}} +
+
+
Settings Div
+
Home Span
+
default
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example45/manifest.json b/1.2.17/docs/examples/example-example45/manifest.json new file mode 100644 index 0000000000..87b450b73b --- /dev/null +++ b/1.2.17/docs/examples/example-example45/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-example45", + "files": [ + "index-production.html", + "script.js", + "animations.css", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example45/protractor.js b/1.2.17/docs/examples/example-example45/protractor.js new file mode 100644 index 0000000000..37cd86c2c2 --- /dev/null +++ b/1.2.17/docs/examples/example-example45/protractor.js @@ -0,0 +1,14 @@ + var switchElem = element(by.css('[ng-switch]')); + var select = element(by.model('selection')); + + it('should start in settings', function() { + expect(switchElem.getText()).toMatch(/Settings Div/); + }); + it('should change to home', function() { + select.element.all(by.css('option')).get(1).click(); + expect(switchElem.getText()).toMatch(/Home Span/); + }); + it('should select default', function() { + select.element.all(by.css('option')).get(2).click(); + expect(switchElem.getText()).toMatch(/default/); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example45/script.js b/1.2.17/docs/examples/example-example45/script.js new file mode 100644 index 0000000000..ee6a860834 --- /dev/null +++ b/1.2.17/docs/examples/example-example45/script.js @@ -0,0 +1,4 @@ + function Ctrl($scope) { + $scope.items = ['settings', 'home', 'other']; + $scope.selection = $scope.items[0]; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example46/index-debug.html b/1.2.17/docs/examples/example-example46/index-debug.html new file mode 100644 index 0000000000..a9de1de151 --- /dev/null +++ b/1.2.17/docs/examples/example-example46/index-debug.html @@ -0,0 +1,39 @@ + + + + + Example - example-example46-debug + + + + + + + + + +
+
+
+ {{text}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example46/index-jquery.html b/1.2.17/docs/examples/example-example46/index-jquery.html new file mode 100644 index 0000000000..91231b143c --- /dev/null +++ b/1.2.17/docs/examples/example-example46/index-jquery.html @@ -0,0 +1,40 @@ + + + + + Example - example-example46-jquery + + + + + + + + + + +
+
+
+ {{text}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example46/index-production.html b/1.2.17/docs/examples/example-example46/index-production.html new file mode 100644 index 0000000000..d2cde1d56a --- /dev/null +++ b/1.2.17/docs/examples/example-example46/index-production.html @@ -0,0 +1,39 @@ + + + + + Example - example-example46-production + + + + + + + + + +
+
+
+ {{text}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example46/index.html b/1.2.17/docs/examples/example-example46/index.html new file mode 100644 index 0000000000..01e17f373b --- /dev/null +++ b/1.2.17/docs/examples/example-example46/index.html @@ -0,0 +1,39 @@ + + + + + Example - example-example46 + + + + + + + + + +
+
+
+ {{text}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example46/manifest.json b/1.2.17/docs/examples/example-example46/manifest.json new file mode 100644 index 0000000000..bbc607ef13 --- /dev/null +++ b/1.2.17/docs/examples/example-example46/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example46", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example46/protractor.js b/1.2.17/docs/examples/example-example46/protractor.js new file mode 100644 index 0000000000..cede5558e4 --- /dev/null +++ b/1.2.17/docs/examples/example-example46/protractor.js @@ -0,0 +1,10 @@ + it('should have transcluded', function() { + var titleElement = element(by.model('title')); + titleElement.clear(); + titleElement.sendKeys('TITLE'); + var textElement = element(by.model('text')); + textElement.clear(); + textElement.sendKeys('TEXT'); + expect(element(by.binding('title')).getText()).toEqual('TITLE'); + expect(element(by.binding('text')).getText()).toEqual('TEXT'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example47/index-debug.html b/1.2.17/docs/examples/example-example47/index-debug.html new file mode 100644 index 0000000000..01f2911343 --- /dev/null +++ b/1.2.17/docs/examples/example-example47/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example47-debug + + + + + + + + + + + Load inlined template +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example47/index-jquery.html b/1.2.17/docs/examples/example-example47/index-jquery.html new file mode 100644 index 0000000000..2cceb5c08f --- /dev/null +++ b/1.2.17/docs/examples/example-example47/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example47-jquery + + + + + + + + + + + + Load inlined template +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example47/index-production.html b/1.2.17/docs/examples/example-example47/index-production.html new file mode 100644 index 0000000000..99e9dae7bb --- /dev/null +++ b/1.2.17/docs/examples/example-example47/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example47-production + + + + + + + + + + + Load inlined template +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example47/index.html b/1.2.17/docs/examples/example-example47/index.html new file mode 100644 index 0000000000..ea1465de54 --- /dev/null +++ b/1.2.17/docs/examples/example-example47/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example47 + + + + + + + + + + + Load inlined template +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example47/manifest.json b/1.2.17/docs/examples/example-example47/manifest.json new file mode 100644 index 0000000000..16357cf50d --- /dev/null +++ b/1.2.17/docs/examples/example-example47/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example47", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example47/protractor.js b/1.2.17/docs/examples/example-example47/protractor.js new file mode 100644 index 0000000000..a42438787a --- /dev/null +++ b/1.2.17/docs/examples/example-example47/protractor.js @@ -0,0 +1,4 @@ + it('should load template defined inside script tag', function() { + element(by.css('#tpl-link')).click(); + expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example48/index-debug.html b/1.2.17/docs/examples/example-example48/index-debug.html new file mode 100644 index 0000000000..4ba0ba2040 --- /dev/null +++ b/1.2.17/docs/examples/example-example48/index-debug.html @@ -0,0 +1,60 @@ + + + + + Example - example-example48-debug + + + + + + + + + +
+
    +
  • + Name: + [X] +
  • +
  • + [add] +
  • +
+
+ Color (null not allowed): +
+ + Color (null allowed): + + +
+ + Color grouped by shade: +
+ + + Select bogus.
+
+ Currently selected: {{ {selected_color:myColor} }} +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example48/index-jquery.html b/1.2.17/docs/examples/example-example48/index-jquery.html new file mode 100644 index 0000000000..93779afc90 --- /dev/null +++ b/1.2.17/docs/examples/example-example48/index-jquery.html @@ -0,0 +1,61 @@ + + + + + Example - example-example48-jquery + + + + + + + + + + +
+
    +
  • + Name: + [X] +
  • +
  • + [add] +
  • +
+
+ Color (null not allowed): +
+ + Color (null allowed): + + +
+ + Color grouped by shade: +
+ + + Select bogus.
+
+ Currently selected: {{ {selected_color:myColor} }} +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example48/index-production.html b/1.2.17/docs/examples/example-example48/index-production.html new file mode 100644 index 0000000000..8044162be1 --- /dev/null +++ b/1.2.17/docs/examples/example-example48/index-production.html @@ -0,0 +1,60 @@ + + + + + Example - example-example48-production + + + + + + + + + +
+
    +
  • + Name: + [X] +
  • +
  • + [add] +
  • +
+
+ Color (null not allowed): +
+ + Color (null allowed): + + +
+ + Color grouped by shade: +
+ + + Select bogus.
+
+ Currently selected: {{ {selected_color:myColor} }} +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example48/index.html b/1.2.17/docs/examples/example-example48/index.html new file mode 100644 index 0000000000..26aa8562a6 --- /dev/null +++ b/1.2.17/docs/examples/example-example48/index.html @@ -0,0 +1,60 @@ + + + + + Example - example-example48 + + + + + + + + + +
+
    +
  • + Name: + [X] +
  • +
  • + [add] +
  • +
+
+ Color (null not allowed): +
+ + Color (null allowed): + + +
+ + Color grouped by shade: +
+ + + Select bogus.
+
+ Currently selected: {{ {selected_color:myColor} }} +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example48/manifest.json b/1.2.17/docs/examples/example-example48/manifest.json new file mode 100644 index 0000000000..eb0528a18a --- /dev/null +++ b/1.2.17/docs/examples/example-example48/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example48", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example48/protractor.js b/1.2.17/docs/examples/example-example48/protractor.js new file mode 100644 index 0000000000..cc3acd2b87 --- /dev/null +++ b/1.2.17/docs/examples/example-example48/protractor.js @@ -0,0 +1,9 @@ + it('should check ng-options', function() { + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red'); + element.all(by.select('myColor')).first().click(); + element.all(by.css('select[ng-model="myColor"] option')).first().click(); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black'); + element(by.css('.nullable select[ng-model="myColor"]')).click(); + element.all(by.css('.nullable select[ng-model="myColor"] option')).first().click(); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example49/index-debug.html b/1.2.17/docs/examples/example-example49/index-debug.html new file mode 100644 index 0000000000..3beb0a9f67 --- /dev/null +++ b/1.2.17/docs/examples/example-example49/index-debug.html @@ -0,0 +1,20 @@ + + + + + Example - example-example49-debug + + + + + + + + + +
+

$document title:

+

window.document title:

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example49/index-jquery.html b/1.2.17/docs/examples/example-example49/index-jquery.html new file mode 100644 index 0000000000..b7d8d02a9d --- /dev/null +++ b/1.2.17/docs/examples/example-example49/index-jquery.html @@ -0,0 +1,21 @@ + + + + + Example - example-example49-jquery + + + + + + + + + + +
+

$document title:

+

window.document title:

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example49/index-production.html b/1.2.17/docs/examples/example-example49/index-production.html new file mode 100644 index 0000000000..0b4234a8b8 --- /dev/null +++ b/1.2.17/docs/examples/example-example49/index-production.html @@ -0,0 +1,20 @@ + + + + + Example - example-example49-production + + + + + + + + + +
+

$document title:

+

window.document title:

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example49/index.html b/1.2.17/docs/examples/example-example49/index.html new file mode 100644 index 0000000000..ed7edf75ea --- /dev/null +++ b/1.2.17/docs/examples/example-example49/index.html @@ -0,0 +1,20 @@ + + + + + Example - example-example49 + + + + + + + + + +
+

$document title:

+

window.document title:

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example49/manifest.json b/1.2.17/docs/examples/example-example49/manifest.json new file mode 100644 index 0000000000..8e58a76c54 --- /dev/null +++ b/1.2.17/docs/examples/example-example49/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example49", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example49/script.js b/1.2.17/docs/examples/example-example49/script.js new file mode 100644 index 0000000000..af5876e29e --- /dev/null +++ b/1.2.17/docs/examples/example-example49/script.js @@ -0,0 +1,4 @@ + function MainCtrl($scope, $document) { + $scope.title = $document[0].title; + $scope.windowTitle = angular.element(window.document)[0].title; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example5/index-debug.html b/1.2.17/docs/examples/example-example5/index-debug.html new file mode 100644 index 0000000000..f0037235b2 --- /dev/null +++ b/1.2.17/docs/examples/example-example5/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example5-debug + + + + + + + + +
+ link 1 (link, don't reload)
+ link 2 (link, don't reload)
+ link 3 (link, reload!)
+ anchor (link, don't reload)
+ anchor (no link)
+ link (link, change location) + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example5/index-jquery.html b/1.2.17/docs/examples/example-example5/index-jquery.html new file mode 100644 index 0000000000..b1dd53ee2c --- /dev/null +++ b/1.2.17/docs/examples/example-example5/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example5-jquery + + + + + + + + + +
+ link 1 (link, don't reload)
+ link 2 (link, don't reload)
+ link 3 (link, reload!)
+ anchor (link, don't reload)
+ anchor (no link)
+ link (link, change location) + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example5/index-production.html b/1.2.17/docs/examples/example-example5/index-production.html new file mode 100644 index 0000000000..67d4e89921 --- /dev/null +++ b/1.2.17/docs/examples/example-example5/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example5-production + + + + + + + + +
+ link 1 (link, don't reload)
+ link 2 (link, don't reload)
+ link 3 (link, reload!)
+ anchor (link, don't reload)
+ anchor (no link)
+ link (link, change location) + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example5/index.html b/1.2.17/docs/examples/example-example5/index.html new file mode 100644 index 0000000000..c899cbf317 --- /dev/null +++ b/1.2.17/docs/examples/example-example5/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example5 + + + + + + + + +
+ link 1 (link, don't reload)
+ link 2 (link, don't reload)
+ link 3 (link, reload!)
+ anchor (link, don't reload)
+ anchor (no link)
+ link (link, change location) + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example5/manifest.json b/1.2.17/docs/examples/example-example5/manifest.json new file mode 100644 index 0000000000..7939d7bd71 --- /dev/null +++ b/1.2.17/docs/examples/example-example5/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example5", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example5/protractor.js b/1.2.17/docs/examples/example-example5/protractor.js new file mode 100644 index 0000000000..ecb2628f8d --- /dev/null +++ b/1.2.17/docs/examples/example-example5/protractor.js @@ -0,0 +1,54 @@ + it('should execute ng-click but not reload when href without value', function() { + element(by.id('link-1')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('1'); + expect(element(by.id('link-1')).getAttribute('href')).toBe(''); + }); + + it('should execute ng-click but not reload when href empty string', function() { + element(by.id('link-2')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('2'); + expect(element(by.id('link-2')).getAttribute('href')).toBe(''); + }); + + it('should execute ng-click and change url when ng-href specified', function() { + expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\/123$/); + + element(by.id('link-3')).click(); + + // At this point, we navigate away from an Angular page, so we need + // to use browser.driver to get the base webdriver. + + browser.wait(function() { + return browser.driver.getCurrentUrl().then(function(url) { + return url.match(/\/123$/); + }); + }, 1000, 'page should navigate to /123'); + }); + + xit('should execute ng-click but not reload when href empty string and name specified', function() { + element(by.id('link-4')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('4'); + expect(element(by.id('link-4')).getAttribute('href')).toBe(''); + }); + + it('should execute ng-click but not reload when no href but name specified', function() { + element(by.id('link-5')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('5'); + expect(element(by.id('link-5')).getAttribute('href')).toBe(null); + }); + + it('should only change url when only ng-href', function() { + element(by.model('value')).clear(); + element(by.model('value')).sendKeys('6'); + expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/); + + element(by.id('link-6')).click(); + + // At this point, we navigate away from an Angular page, so we need + // to use browser.driver to get the base webdriver. + browser.wait(function() { + return browser.driver.getCurrentUrl().then(function(url) { + return url.match(/\/6$/); + }); + }, 1000, 'page should navigate to /6'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example50/index-debug.html b/1.2.17/docs/examples/example-example50/index-debug.html new file mode 100644 index 0000000000..e05f637b1e --- /dev/null +++ b/1.2.17/docs/examples/example-example50/index-debug.html @@ -0,0 +1,42 @@ + + + + + Example - example-example50-debug + + + + + + + + +
+ + Search: +
+ + + + + +
NamePhone
{{friend.name}}{{friend.phone}}
+
+ Any:
+ Name only
+ Phone only
+ Equality
+ + + + + + +
NamePhone
{{friendObj.name}}{{friendObj.phone}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example50/index-jquery.html b/1.2.17/docs/examples/example-example50/index-jquery.html new file mode 100644 index 0000000000..73d93d162e --- /dev/null +++ b/1.2.17/docs/examples/example-example50/index-jquery.html @@ -0,0 +1,43 @@ + + + + + Example - example-example50-jquery + + + + + + + + + +
+ + Search: + + + + + + +
NamePhone
{{friend.name}}{{friend.phone}}
+
+ Any:
+ Name only
+ Phone only
+ Equality
+ + + + + + +
NamePhone
{{friendObj.name}}{{friendObj.phone}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example50/index-production.html b/1.2.17/docs/examples/example-example50/index-production.html new file mode 100644 index 0000000000..ba7727097d --- /dev/null +++ b/1.2.17/docs/examples/example-example50/index-production.html @@ -0,0 +1,42 @@ + + + + + Example - example-example50-production + + + + + + + + +
+ + Search: + + + + + + +
NamePhone
{{friend.name}}{{friend.phone}}
+
+ Any:
+ Name only
+ Phone only
+ Equality
+ + + + + + +
NamePhone
{{friendObj.name}}{{friendObj.phone}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example50/index.html b/1.2.17/docs/examples/example-example50/index.html new file mode 100644 index 0000000000..ff537559dc --- /dev/null +++ b/1.2.17/docs/examples/example-example50/index.html @@ -0,0 +1,42 @@ + + + + + Example - example-example50 + + + + + + + + +
+ + Search: + + + + + + +
NamePhone
{{friend.name}}{{friend.phone}}
+
+ Any:
+ Name only
+ Phone only
+ Equality
+ + + + + + +
NamePhone
{{friendObj.name}}{{friendObj.phone}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example50/manifest.json b/1.2.17/docs/examples/example-example50/manifest.json new file mode 100644 index 0000000000..56fcb81f34 --- /dev/null +++ b/1.2.17/docs/examples/example-example50/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example50", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example50/protractor.js b/1.2.17/docs/examples/example-example50/protractor.js new file mode 100644 index 0000000000..6dcd056616 --- /dev/null +++ b/1.2.17/docs/examples/example-example50/protractor.js @@ -0,0 +1,33 @@ + var expectFriendNames = function(expectedNames, key) { + element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) { + arr.forEach(function(wd, i) { + expect(wd.getText()).toMatch(expectedNames[i]); + }); + }); + }; + + it('should search across all fields when filtering with a string', function() { + var searchText = element(by.model('searchText')); + searchText.clear(); + searchText.sendKeys('m'); + expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend'); + + searchText.clear(); + searchText.sendKeys('76'); + expectFriendNames(['John', 'Julie'], 'friend'); + }); + + it('should search in specific fields when filtering with a predicate object', function() { + var searchAny = element(by.model('search.$')); + searchAny.clear(); + searchAny.sendKeys('i'); + expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj'); + }); + it('should use a equal comparison when comparator is true', function() { + var searchName = element(by.model('search.name')); + var strict = element(by.model('strict')); + searchName.clear(); + searchName.sendKeys('Julie'); + strict.click(); + expectFriendNames(['Julie'], 'friendObj'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example51/index-debug.html b/1.2.17/docs/examples/example-example51/index-debug.html new file mode 100644 index 0000000000..ba0f08b512 --- /dev/null +++ b/1.2.17/docs/examples/example-example51/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-example51-debug + + + + + + + + + +
+
+ default currency symbol ($): {{amount | currency}}
+ custom currency identifier (USD$): {{amount | currency:"USD$"}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example51/index-jquery.html b/1.2.17/docs/examples/example-example51/index-jquery.html new file mode 100644 index 0000000000..01b64bde16 --- /dev/null +++ b/1.2.17/docs/examples/example-example51/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-example51-jquery + + + + + + + + + + +
+
+ default currency symbol ($): {{amount | currency}}
+ custom currency identifier (USD$): {{amount | currency:"USD$"}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example51/index-production.html b/1.2.17/docs/examples/example-example51/index-production.html new file mode 100644 index 0000000000..8dbfc90528 --- /dev/null +++ b/1.2.17/docs/examples/example-example51/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-example51-production + + + + + + + + + +
+
+ default currency symbol ($): {{amount | currency}}
+ custom currency identifier (USD$): {{amount | currency:"USD$"}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example51/index.html b/1.2.17/docs/examples/example-example51/index.html new file mode 100644 index 0000000000..6943c6b7f6 --- /dev/null +++ b/1.2.17/docs/examples/example-example51/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-example51 + + + + + + + + + +
+
+ default currency symbol ($): {{amount | currency}}
+ custom currency identifier (USD$): {{amount | currency:"USD$"}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example51/manifest.json b/1.2.17/docs/examples/example-example51/manifest.json new file mode 100644 index 0000000000..d1edf9cf3c --- /dev/null +++ b/1.2.17/docs/examples/example-example51/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example51", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example51/protractor.js b/1.2.17/docs/examples/example-example51/protractor.js new file mode 100644 index 0000000000..f5be614890 --- /dev/null +++ b/1.2.17/docs/examples/example-example51/protractor.js @@ -0,0 +1,15 @@ + it('should init with 1234.56', function() { + expect(element(by.id('currency-default')).getText()).toBe('$1,234.56'); + expect(element(by.binding('amount | currency:"USD$"')).getText()).toBe('USD$1,234.56'); + }); + it('should update', function() { + if (browser.params.browser == 'safari') { + // Safari does not understand the minus key. See + // https://github.com/angular/protractor/issues/481 + return; + } + element(by.model('amount')).clear(); + element(by.model('amount')).sendKeys('-1234'); + expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)'); + expect(element(by.binding('amount | currency:"USD$"')).getText()).toBe('(USD$1,234.00)'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example52/index-debug.html b/1.2.17/docs/examples/example-example52/index-debug.html new file mode 100644 index 0000000000..4a33eb5697 --- /dev/null +++ b/1.2.17/docs/examples/example-example52/index-debug.html @@ -0,0 +1,26 @@ + + + + + Example - example-example52-debug + + + + + + + + + +
+ Enter number:
+ Default formatting: {{val | number}}
+ No fractions: {{val | number:0}}
+ Negative number: {{-val | number:4}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example52/index-jquery.html b/1.2.17/docs/examples/example-example52/index-jquery.html new file mode 100644 index 0000000000..51369d82ad --- /dev/null +++ b/1.2.17/docs/examples/example-example52/index-jquery.html @@ -0,0 +1,27 @@ + + + + + Example - example-example52-jquery + + + + + + + + + + +
+ Enter number:
+ Default formatting: {{val | number}}
+ No fractions: {{val | number:0}}
+ Negative number: {{-val | number:4}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example52/index-production.html b/1.2.17/docs/examples/example-example52/index-production.html new file mode 100644 index 0000000000..565f20b7b6 --- /dev/null +++ b/1.2.17/docs/examples/example-example52/index-production.html @@ -0,0 +1,26 @@ + + + + + Example - example-example52-production + + + + + + + + + +
+ Enter number:
+ Default formatting: {{val | number}}
+ No fractions: {{val | number:0}}
+ Negative number: {{-val | number:4}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example52/index.html b/1.2.17/docs/examples/example-example52/index.html new file mode 100644 index 0000000000..427e131734 --- /dev/null +++ b/1.2.17/docs/examples/example-example52/index.html @@ -0,0 +1,26 @@ + + + + + Example - example-example52 + + + + + + + + + +
+ Enter number:
+ Default formatting: {{val | number}}
+ No fractions: {{val | number:0}}
+ Negative number: {{-val | number:4}} +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example52/manifest.json b/1.2.17/docs/examples/example-example52/manifest.json new file mode 100644 index 0000000000..b63d0c84e6 --- /dev/null +++ b/1.2.17/docs/examples/example-example52/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example52", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example52/protractor.js b/1.2.17/docs/examples/example-example52/protractor.js new file mode 100644 index 0000000000..167435649d --- /dev/null +++ b/1.2.17/docs/examples/example-example52/protractor.js @@ -0,0 +1,13 @@ + it('should format numbers', function() { + expect(element(by.id('number-default')).getText()).toBe('1,234.568'); + expect(element(by.binding('val | number:0')).getText()).toBe('1,235'); + expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679'); + }); + + it('should update', function() { + element(by.model('val')).clear(); + element(by.model('val')).sendKeys('3374.333'); + expect(element(by.id('number-default')).getText()).toBe('3,374.333'); + expect(element(by.binding('val | number:0')).getText()).toBe('3,374'); + expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example53/index-debug.html b/1.2.17/docs/examples/example-example53/index-debug.html new file mode 100644 index 0000000000..8ab7363882 --- /dev/null +++ b/1.2.17/docs/examples/example-example53/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example53-debug + + + + + + + + + {{1288323623006 | date:'medium'}}: + {{1288323623006 | date:'medium'}}
+ {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}: + {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
+ {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}: + {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example53/index-jquery.html b/1.2.17/docs/examples/example-example53/index-jquery.html new file mode 100644 index 0000000000..b88ddac86b --- /dev/null +++ b/1.2.17/docs/examples/example-example53/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example53-jquery + + + + + + + + + + {{1288323623006 | date:'medium'}}: + {{1288323623006 | date:'medium'}}
+ {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}: + {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
+ {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}: + {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example53/index-production.html b/1.2.17/docs/examples/example-example53/index-production.html new file mode 100644 index 0000000000..cb09285316 --- /dev/null +++ b/1.2.17/docs/examples/example-example53/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example53-production + + + + + + + + + {{1288323623006 | date:'medium'}}: + {{1288323623006 | date:'medium'}}
+ {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}: + {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
+ {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}: + {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example53/index.html b/1.2.17/docs/examples/example-example53/index.html new file mode 100644 index 0000000000..d15aadaf51 --- /dev/null +++ b/1.2.17/docs/examples/example-example53/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example53 + + + + + + + + + {{1288323623006 | date:'medium'}}: + {{1288323623006 | date:'medium'}}
+ {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}: + {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
+ {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}: + {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example53/manifest.json b/1.2.17/docs/examples/example-example53/manifest.json new file mode 100644 index 0000000000..f8f469763c --- /dev/null +++ b/1.2.17/docs/examples/example-example53/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example53", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example53/protractor.js b/1.2.17/docs/examples/example-example53/protractor.js new file mode 100644 index 0000000000..a9df1a7e2d --- /dev/null +++ b/1.2.17/docs/examples/example-example53/protractor.js @@ -0,0 +1,8 @@ + it('should format date', function() { + expect(element(by.binding("1288323623006 | date:'medium'")).getText()). + toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/); + expect(element(by.binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).getText()). + toMatch(/2010\-10\-2\d \d{2}:\d{2}:\d{2} (\-|\+)?\d{4}/); + expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()). + toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example54/index-debug.html b/1.2.17/docs/examples/example-example54/index-debug.html new file mode 100644 index 0000000000..1b68978960 --- /dev/null +++ b/1.2.17/docs/examples/example-example54/index-debug.html @@ -0,0 +1,16 @@ + + + + + Example - example-example54-debug + + + + + + + + +
{{ {'name':'value'} | json }}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example54/index-jquery.html b/1.2.17/docs/examples/example-example54/index-jquery.html new file mode 100644 index 0000000000..a705afcc23 --- /dev/null +++ b/1.2.17/docs/examples/example-example54/index-jquery.html @@ -0,0 +1,17 @@ + + + + + Example - example-example54-jquery + + + + + + + + + +
{{ {'name':'value'} | json }}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example54/index-production.html b/1.2.17/docs/examples/example-example54/index-production.html new file mode 100644 index 0000000000..9aff150609 --- /dev/null +++ b/1.2.17/docs/examples/example-example54/index-production.html @@ -0,0 +1,16 @@ + + + + + Example - example-example54-production + + + + + + + + +
{{ {'name':'value'} | json }}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example54/index.html b/1.2.17/docs/examples/example-example54/index.html new file mode 100644 index 0000000000..53d8c7c7df --- /dev/null +++ b/1.2.17/docs/examples/example-example54/index.html @@ -0,0 +1,16 @@ + + + + + Example - example-example54 + + + + + + + + +
{{ {'name':'value'} | json }}
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example54/manifest.json b/1.2.17/docs/examples/example-example54/manifest.json new file mode 100644 index 0000000000..622adc4325 --- /dev/null +++ b/1.2.17/docs/examples/example-example54/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example54", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example54/protractor.js b/1.2.17/docs/examples/example-example54/protractor.js new file mode 100644 index 0000000000..b4f5b33fda --- /dev/null +++ b/1.2.17/docs/examples/example-example54/protractor.js @@ -0,0 +1,3 @@ + it('should jsonify filtered objects', function() { + expect(element(by.binding("{'name':'value'}")).getText()).toMatch(/\{\n "name": ?"value"\n}/); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example55/index-debug.html b/1.2.17/docs/examples/example-example55/index-debug.html new file mode 100644 index 0000000000..52edb96d77 --- /dev/null +++ b/1.2.17/docs/examples/example-example55/index-debug.html @@ -0,0 +1,29 @@ + + + + + Example - example-example55-debug + + + + + + + + + +
+ Limit {{numbers}} to: +

Output numbers: {{ numbers | limitTo:numLimit }}

+ Limit {{letters}} to: +

Output letters: {{ letters | limitTo:letterLimit }}

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example55/index-jquery.html b/1.2.17/docs/examples/example-example55/index-jquery.html new file mode 100644 index 0000000000..f3d49c4bd0 --- /dev/null +++ b/1.2.17/docs/examples/example-example55/index-jquery.html @@ -0,0 +1,30 @@ + + + + + Example - example-example55-jquery + + + + + + + + + + +
+ Limit {{numbers}} to: +

Output numbers: {{ numbers | limitTo:numLimit }}

+ Limit {{letters}} to: +

Output letters: {{ letters | limitTo:letterLimit }}

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example55/index-production.html b/1.2.17/docs/examples/example-example55/index-production.html new file mode 100644 index 0000000000..742f95e782 --- /dev/null +++ b/1.2.17/docs/examples/example-example55/index-production.html @@ -0,0 +1,29 @@ + + + + + Example - example-example55-production + + + + + + + + + +
+ Limit {{numbers}} to: +

Output numbers: {{ numbers | limitTo:numLimit }}

+ Limit {{letters}} to: +

Output letters: {{ letters | limitTo:letterLimit }}

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example55/index.html b/1.2.17/docs/examples/example-example55/index.html new file mode 100644 index 0000000000..82d53d0ab3 --- /dev/null +++ b/1.2.17/docs/examples/example-example55/index.html @@ -0,0 +1,29 @@ + + + + + Example - example-example55 + + + + + + + + + +
+ Limit {{numbers}} to: +

Output numbers: {{ numbers | limitTo:numLimit }}

+ Limit {{letters}} to: +

Output letters: {{ letters | limitTo:letterLimit }}

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example55/manifest.json b/1.2.17/docs/examples/example-example55/manifest.json new file mode 100644 index 0000000000..faf2f32099 --- /dev/null +++ b/1.2.17/docs/examples/example-example55/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example55", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example55/protractor.js b/1.2.17/docs/examples/example-example55/protractor.js new file mode 100644 index 0000000000..f9ea3293e0 --- /dev/null +++ b/1.2.17/docs/examples/example-example55/protractor.js @@ -0,0 +1,29 @@ + var numLimitInput = element(by.model('numLimit')); + var letterLimitInput = element(by.model('letterLimit')); + var limitedNumbers = element(by.binding('numbers | limitTo:numLimit')); + var limitedLetters = element(by.binding('letters | limitTo:letterLimit')); + + it('should limit the number array to first three items', function() { + expect(numLimitInput.getAttribute('value')).toBe('3'); + expect(letterLimitInput.getAttribute('value')).toBe('3'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]'); + expect(limitedLetters.getText()).toEqual('Output letters: abc'); + }); + + it('should update the output when -3 is entered', function() { + numLimitInput.clear(); + numLimitInput.sendKeys('-3'); + letterLimitInput.clear(); + letterLimitInput.sendKeys('-3'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]'); + expect(limitedLetters.getText()).toEqual('Output letters: ghi'); + }); + + it('should not exceed the maximum size of input array', function() { + numLimitInput.clear(); + numLimitInput.sendKeys('100'); + letterLimitInput.clear(); + letterLimitInput.sendKeys('100'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]'); + expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example56/index-debug.html b/1.2.17/docs/examples/example-example56/index-debug.html new file mode 100644 index 0000000000..d509d50bf3 --- /dev/null +++ b/1.2.17/docs/examples/example-example56/index-debug.html @@ -0,0 +1,44 @@ + + + + + Example - example-example56-debug + + + + + + + + + +
+
Sorting predicate = {{predicate}}; reverse = {{reverse}}
+
+ [ unsorted ] + + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example56/index-jquery.html b/1.2.17/docs/examples/example-example56/index-jquery.html new file mode 100644 index 0000000000..455d9ce1b4 --- /dev/null +++ b/1.2.17/docs/examples/example-example56/index-jquery.html @@ -0,0 +1,45 @@ + + + + + Example - example-example56-jquery + + + + + + + + + + +
+
Sorting predicate = {{predicate}}; reverse = {{reverse}}
+
+ [ unsorted ] + + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example56/index-production.html b/1.2.17/docs/examples/example-example56/index-production.html new file mode 100644 index 0000000000..e8c7fa16dc --- /dev/null +++ b/1.2.17/docs/examples/example-example56/index-production.html @@ -0,0 +1,44 @@ + + + + + Example - example-example56-production + + + + + + + + + +
+
Sorting predicate = {{predicate}}; reverse = {{reverse}}
+
+ [ unsorted ] + + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example56/index.html b/1.2.17/docs/examples/example-example56/index.html new file mode 100644 index 0000000000..d34ed4a6c9 --- /dev/null +++ b/1.2.17/docs/examples/example-example56/index.html @@ -0,0 +1,44 @@ + + + + + Example - example-example56 + + + + + + + + + +
+
Sorting predicate = {{predicate}}; reverse = {{reverse}}
+
+ [ unsorted ] + + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example56/manifest.json b/1.2.17/docs/examples/example-example56/manifest.json new file mode 100644 index 0000000000..051d8633fb --- /dev/null +++ b/1.2.17/docs/examples/example-example56/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example56", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example57/index-debug.html b/1.2.17/docs/examples/example-example57/index-debug.html new file mode 100644 index 0000000000..c750a6c46b --- /dev/null +++ b/1.2.17/docs/examples/example-example57/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-example57-debug + + + + + + + + + +
+ + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example57/index-jquery.html b/1.2.17/docs/examples/example-example57/index-jquery.html new file mode 100644 index 0000000000..646be3077e --- /dev/null +++ b/1.2.17/docs/examples/example-example57/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-example57-jquery + + + + + + + + + + +
+ + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example57/index-production.html b/1.2.17/docs/examples/example-example57/index-production.html new file mode 100644 index 0000000000..e0285fb407 --- /dev/null +++ b/1.2.17/docs/examples/example-example57/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-example57-production + + + + + + + + + +
+ + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example57/index.html b/1.2.17/docs/examples/example-example57/index.html new file mode 100644 index 0000000000..bdc5e440f4 --- /dev/null +++ b/1.2.17/docs/examples/example-example57/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-example57 + + + + + + + + + +
+ + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example57/manifest.json b/1.2.17/docs/examples/example-example57/manifest.json new file mode 100644 index 0000000000..59afe4e814 --- /dev/null +++ b/1.2.17/docs/examples/example-example57/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example57", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example57/script.js b/1.2.17/docs/examples/example-example57/script.js new file mode 100644 index 0000000000..4f9dea5b55 --- /dev/null +++ b/1.2.17/docs/examples/example-example57/script.js @@ -0,0 +1,15 @@ + function Ctrl($scope, $filter) { + var orderBy = $filter('orderBy'); + $scope.friends = [ + { name: 'John', phone: '555-1212', age: 10 }, + { name: 'Mary', phone: '555-9876', age: 19 }, + { name: 'Mike', phone: '555-4321', age: 21 }, + { name: 'Adam', phone: '555-5678', age: 35 }, + { name: 'Julie', phone: '555-8765', age: 29 } + ]; + + $scope.order = function(predicate, reverse) { + $scope.friends = orderBy($scope.friends, predicate, reverse); + }; + $scope.order('-age',false); + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example58/http-hello.html b/1.2.17/docs/examples/example-example58/http-hello.html new file mode 100644 index 0000000000..7b24164aa1 --- /dev/null +++ b/1.2.17/docs/examples/example-example58/http-hello.html @@ -0,0 +1 @@ +Hello, $http! \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example58/index-debug.html b/1.2.17/docs/examples/example-example58/index-debug.html new file mode 100644 index 0000000000..270ec197b1 --- /dev/null +++ b/1.2.17/docs/examples/example-example58/index-debug.html @@ -0,0 +1,36 @@ + + + + + Example - example-example58-debug + + + + + + + + + +
+ + +
+ + + +
http status code: {{status}}
+
http response data: {{data}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example58/index-jquery.html b/1.2.17/docs/examples/example-example58/index-jquery.html new file mode 100644 index 0000000000..f02ab952f6 --- /dev/null +++ b/1.2.17/docs/examples/example-example58/index-jquery.html @@ -0,0 +1,37 @@ + + + + + Example - example-example58-jquery + + + + + + + + + + +
+ + +
+ + + +
http status code: {{status}}
+
http response data: {{data}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example58/index-production.html b/1.2.17/docs/examples/example-example58/index-production.html new file mode 100644 index 0000000000..52bb88d704 --- /dev/null +++ b/1.2.17/docs/examples/example-example58/index-production.html @@ -0,0 +1,36 @@ + + + + + Example - example-example58-production + + + + + + + + + +
+ + +
+ + + +
http status code: {{status}}
+
http response data: {{data}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example58/index.html b/1.2.17/docs/examples/example-example58/index.html new file mode 100644 index 0000000000..941a0bbdd3 --- /dev/null +++ b/1.2.17/docs/examples/example-example58/index.html @@ -0,0 +1,36 @@ + + + + + Example - example-example58 + + + + + + + + + +
+ + +
+ + + +
http status code: {{status}}
+
http response data: {{data}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example58/manifest.json b/1.2.17/docs/examples/example-example58/manifest.json new file mode 100644 index 0000000000..945a1503ec --- /dev/null +++ b/1.2.17/docs/examples/example-example58/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-example58", + "files": [ + "index-production.html", + "script.js", + "http-hello.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example58/protractor.js b/1.2.17/docs/examples/example-example58/protractor.js new file mode 100644 index 0000000000..60aa1f5a31 --- /dev/null +++ b/1.2.17/docs/examples/example-example58/protractor.js @@ -0,0 +1,28 @@ +var status = element(by.binding('status')); +var data = element(by.binding('data')); +var fetchBtn = element(by.id('fetchbtn')); +var sampleGetBtn = element(by.id('samplegetbtn')); +var sampleJsonpBtn = element(by.id('samplejsonpbtn')); +var invalidJsonpBtn = element(by.id('invalidjsonpbtn')); + +it('should make an xhr GET request', function() { + sampleGetBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('200'); + expect(data.getText()).toMatch(/Hello, \$http!/); +}); + +it('should make a JSONP request to angularjs.org', function() { + sampleJsonpBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('200'); + expect(data.getText()).toMatch(/Super Hero!/); +}); + +it('should make JSONP request to invalid URL and invoke the error handler', + function() { + invalidJsonpBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('0'); + expect(data.getText()).toMatch('Request failed'); +}); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example58/script.js b/1.2.17/docs/examples/example-example58/script.js new file mode 100644 index 0000000000..a352de9466 --- /dev/null +++ b/1.2.17/docs/examples/example-example58/script.js @@ -0,0 +1,24 @@ +function FetchCtrl($scope, $http, $templateCache) { + $scope.method = 'GET'; + $scope.url = 'http-hello.html'; + + $scope.fetch = function() { + $scope.code = null; + $scope.response = null; + + $http({method: $scope.method, url: $scope.url, cache: $templateCache}). + success(function(data, status) { + $scope.status = status; + $scope.data = data; + }). + error(function(data, status) { + $scope.data = data || "Request failed"; + $scope.status = status; + }); + }; + + $scope.updateModel = function(method, url) { + $scope.method = method; + $scope.url = url; + }; +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example59/index-debug.html b/1.2.17/docs/examples/example-example59/index-debug.html new file mode 100644 index 0000000000..3e08c52d73 --- /dev/null +++ b/1.2.17/docs/examples/example-example59/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-example59-debug + + + + + + + + + +
+ //demo.label// +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example59/index-jquery.html b/1.2.17/docs/examples/example-example59/index-jquery.html new file mode 100644 index 0000000000..3fdfe66402 --- /dev/null +++ b/1.2.17/docs/examples/example-example59/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-example59-jquery + + + + + + + + + + +
+ //demo.label// +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example59/index-production.html b/1.2.17/docs/examples/example-example59/index-production.html new file mode 100644 index 0000000000..15e2014932 --- /dev/null +++ b/1.2.17/docs/examples/example-example59/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-example59-production + + + + + + + + + +
+ //demo.label// +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example59/index.html b/1.2.17/docs/examples/example-example59/index.html new file mode 100644 index 0000000000..ec56c77983 --- /dev/null +++ b/1.2.17/docs/examples/example-example59/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-example59 + + + + + + + + + +
+ //demo.label// +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example59/manifest.json b/1.2.17/docs/examples/example-example59/manifest.json new file mode 100644 index 0000000000..fe12b81e79 --- /dev/null +++ b/1.2.17/docs/examples/example-example59/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example59", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example59/protractor.js b/1.2.17/docs/examples/example-example59/protractor.js new file mode 100644 index 0000000000..088c6693da --- /dev/null +++ b/1.2.17/docs/examples/example-example59/protractor.js @@ -0,0 +1,3 @@ +it('should interpolate binding with custom symbols', function() { + expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.'); +}); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example6/index-debug.html b/1.2.17/docs/examples/example-example6/index-debug.html new file mode 100644 index 0000000000..267594527f --- /dev/null +++ b/1.2.17/docs/examples/example-example6/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example6-debug + + + + + + + + + Click me to toggle:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example6/index-jquery.html b/1.2.17/docs/examples/example-example6/index-jquery.html new file mode 100644 index 0000000000..be7ad326b9 --- /dev/null +++ b/1.2.17/docs/examples/example-example6/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example6-jquery + + + + + + + + + + Click me to toggle:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example6/index-production.html b/1.2.17/docs/examples/example-example6/index-production.html new file mode 100644 index 0000000000..2dbb8c2e83 --- /dev/null +++ b/1.2.17/docs/examples/example-example6/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example6-production + + + + + + + + + Click me to toggle:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example6/index.html b/1.2.17/docs/examples/example-example6/index.html new file mode 100644 index 0000000000..29b36f25bd --- /dev/null +++ b/1.2.17/docs/examples/example-example6/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example6 + + + + + + + + + Click me to toggle:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example6/manifest.json b/1.2.17/docs/examples/example-example6/manifest.json new file mode 100644 index 0000000000..a341d49f13 --- /dev/null +++ b/1.2.17/docs/examples/example-example6/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example6", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example6/protractor.js b/1.2.17/docs/examples/example-example6/protractor.js new file mode 100644 index 0000000000..30944fc732 --- /dev/null +++ b/1.2.17/docs/examples/example-example6/protractor.js @@ -0,0 +1,5 @@ + it('should toggle button', function() { + expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy(); + element(by.model('checked')).click(); + expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy(); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example60/index-debug.html b/1.2.17/docs/examples/example-example60/index-debug.html new file mode 100644 index 0000000000..02c964c09a --- /dev/null +++ b/1.2.17/docs/examples/example-example60/index-debug.html @@ -0,0 +1,97 @@ + + + + + Example - example-example60-debug + + + + + + + + + + +
+
+ Date format:
+ Current time is: +
+ Blood 1 : {{blood_1}} + Blood 2 : {{blood_2}} + + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example60/index-jquery.html b/1.2.17/docs/examples/example-example60/index-jquery.html new file mode 100644 index 0000000000..7aea7781da --- /dev/null +++ b/1.2.17/docs/examples/example-example60/index-jquery.html @@ -0,0 +1,98 @@ + + + + + Example - example-example60-jquery + + + + + + + + + + + +
+
+ Date format:
+ Current time is: +
+ Blood 1 : {{blood_1}} + Blood 2 : {{blood_2}} + + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example60/index-production.html b/1.2.17/docs/examples/example-example60/index-production.html new file mode 100644 index 0000000000..8aa97f3392 --- /dev/null +++ b/1.2.17/docs/examples/example-example60/index-production.html @@ -0,0 +1,97 @@ + + + + + Example - example-example60-production + + + + + + + + + + +
+
+ Date format:
+ Current time is: +
+ Blood 1 : {{blood_1}} + Blood 2 : {{blood_2}} + + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example60/index.html b/1.2.17/docs/examples/example-example60/index.html new file mode 100644 index 0000000000..33326ea6b1 --- /dev/null +++ b/1.2.17/docs/examples/example-example60/index.html @@ -0,0 +1,97 @@ + + + + + Example - example-example60 + + + + + + + + + + +
+
+ Date format:
+ Current time is: +
+ Blood 1 : {{blood_1}} + Blood 2 : {{blood_2}} + + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example60/manifest.json b/1.2.17/docs/examples/example-example60/manifest.json new file mode 100644 index 0000000000..1246d4c6e8 --- /dev/null +++ b/1.2.17/docs/examples/example-example60/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example60", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example61/index-debug.html b/1.2.17/docs/examples/example-example61/index-debug.html new file mode 100644 index 0000000000..ef678a8125 --- /dev/null +++ b/1.2.17/docs/examples/example-example61/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-example61-debug + + + + + + + + + +
+

Reload this page with open console, enter text and hit the log button...

+ Message: + + + + + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example61/index-jquery.html b/1.2.17/docs/examples/example-example61/index-jquery.html new file mode 100644 index 0000000000..17d63a9758 --- /dev/null +++ b/1.2.17/docs/examples/example-example61/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-example61-jquery + + + + + + + + + + +
+

Reload this page with open console, enter text and hit the log button...

+ Message: + + + + + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example61/index-production.html b/1.2.17/docs/examples/example-example61/index-production.html new file mode 100644 index 0000000000..efa7ca8daf --- /dev/null +++ b/1.2.17/docs/examples/example-example61/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-example61-production + + + + + + + + + +
+

Reload this page with open console, enter text and hit the log button...

+ Message: + + + + + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example61/index.html b/1.2.17/docs/examples/example-example61/index.html new file mode 100644 index 0000000000..99ec473ece --- /dev/null +++ b/1.2.17/docs/examples/example-example61/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-example61 + + + + + + + + + +
+

Reload this page with open console, enter text and hit the log button...

+ Message: + + + + + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example61/manifest.json b/1.2.17/docs/examples/example-example61/manifest.json new file mode 100644 index 0000000000..5318b74a2e --- /dev/null +++ b/1.2.17/docs/examples/example-example61/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example61", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example61/script.js b/1.2.17/docs/examples/example-example61/script.js new file mode 100644 index 0000000000..c134582f1a --- /dev/null +++ b/1.2.17/docs/examples/example-example61/script.js @@ -0,0 +1,4 @@ + function LogCtrl($scope, $log) { + $scope.$log = $log; + $scope.message = 'Hello World!'; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example62/index-debug.html b/1.2.17/docs/examples/example-example62/index-debug.html new file mode 100644 index 0000000000..ac0a77109a --- /dev/null +++ b/1.2.17/docs/examples/example-example62/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-example62-debug + + + + + + + + + + +
+

+ User comments
+ By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when + $sanitize is available. If $sanitize isn't available, this results in an error instead of an + exploit. +
+
+ {{userComment.name}}: + +
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example62/index-jquery.html b/1.2.17/docs/examples/example-example62/index-jquery.html new file mode 100644 index 0000000000..807001351a --- /dev/null +++ b/1.2.17/docs/examples/example-example62/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-example62-jquery + + + + + + + + + + + +
+

+ User comments
+ By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when + $sanitize is available. If $sanitize isn't available, this results in an error instead of an + exploit. +
+
+ {{userComment.name}}: + +
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example62/index-production.html b/1.2.17/docs/examples/example-example62/index-production.html new file mode 100644 index 0000000000..4810ef1fac --- /dev/null +++ b/1.2.17/docs/examples/example-example62/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-example62-production + + + + + + + + + + +
+

+ User comments
+ By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when + $sanitize is available. If $sanitize isn't available, this results in an error instead of an + exploit. +
+
+ {{userComment.name}}: + +
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example62/index.html b/1.2.17/docs/examples/example-example62/index.html new file mode 100644 index 0000000000..71ba3348f8 --- /dev/null +++ b/1.2.17/docs/examples/example-example62/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-example62 + + + + + + + + + + +
+

+ User comments
+ By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when + $sanitize is available. If $sanitize isn't available, this results in an error instead of an + exploit. +
+
+ {{userComment.name}}: + +
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example62/manifest.json b/1.2.17/docs/examples/example-example62/manifest.json new file mode 100644 index 0000000000..daa5722f37 --- /dev/null +++ b/1.2.17/docs/examples/example-example62/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-example62", + "files": [ + "index-production.html", + "script.js", + "test_data.json", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example62/protractor.js b/1.2.17/docs/examples/example-example62/protractor.js new file mode 100644 index 0000000000..150ef4923f --- /dev/null +++ b/1.2.17/docs/examples/example-example62/protractor.js @@ -0,0 +1,12 @@ +describe('SCE doc demo', function() { + it('should sanitize untrusted values', function() { + expect(element(by.css('.htmlComment')).getInnerHtml()) + .toBe('Is anyone reading this?'); + }); + + it('should NOT sanitize explicitly trusted values', function() { + expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe( + 'Hover over this text.'); + }); +}); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example62/script.js b/1.2.17/docs/examples/example-example62/script.js new file mode 100644 index 0000000000..2d1a220ae9 --- /dev/null +++ b/1.2.17/docs/examples/example-example62/script.js @@ -0,0 +1,11 @@ +var mySceApp = angular.module('mySceApp', ['ngSanitize']); + +mySceApp.controller("myAppController", function myAppController($http, $templateCache, $sce) { + var self = this; + $http.get("test_data.json", {cache: $templateCache}).success(function(userComments) { + self.userComments = userComments; + }); + self.explicitlyTrustedHtml = $sce.trustAsHtml( + 'Hover over this text.'); +}); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example62/test_data.json b/1.2.17/docs/examples/example-example62/test_data.json new file mode 100644 index 0000000000..e086b707e3 --- /dev/null +++ b/1.2.17/docs/examples/example-example62/test_data.json @@ -0,0 +1,9 @@ +[ + { "name": "Alice", + "htmlComment": + "Is anyone reading this?" + }, + { "name": "Bob", + "htmlComment": "Yes! Am I the only other one?" + } +] \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example63/index-debug.html b/1.2.17/docs/examples/example-example63/index-debug.html new file mode 100644 index 0000000000..757665fb8b --- /dev/null +++ b/1.2.17/docs/examples/example-example63/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-example63-debug + + + + + + + + + +
+ + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example63/index-jquery.html b/1.2.17/docs/examples/example-example63/index-jquery.html new file mode 100644 index 0000000000..4f125c0d1e --- /dev/null +++ b/1.2.17/docs/examples/example-example63/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-example63-jquery + + + + + + + + + + +
+ + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example63/index-production.html b/1.2.17/docs/examples/example-example63/index-production.html new file mode 100644 index 0000000000..75f6ac09ca --- /dev/null +++ b/1.2.17/docs/examples/example-example63/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-example63-production + + + + + + + + + +
+ + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example63/index.html b/1.2.17/docs/examples/example-example63/index.html new file mode 100644 index 0000000000..cf7b90f356 --- /dev/null +++ b/1.2.17/docs/examples/example-example63/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-example63 + + + + + + + + + +
+ + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example63/manifest.json b/1.2.17/docs/examples/example-example63/manifest.json new file mode 100644 index 0000000000..c7ab6101c7 --- /dev/null +++ b/1.2.17/docs/examples/example-example63/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example63", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example63/protractor.js b/1.2.17/docs/examples/example-example63/protractor.js new file mode 100644 index 0000000000..112232d7cf --- /dev/null +++ b/1.2.17/docs/examples/example-example63/protractor.js @@ -0,0 +1,5 @@ + it('should display the greeting in the input box', function() { + element(by.model('greeting')).sendKeys('Hello, E2E Tests'); + // If we click the button it will block the test runner + // element(':button').click(); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example64/index-debug.html b/1.2.17/docs/examples/example-example64/index-debug.html new file mode 100644 index 0000000000..670d596e91 --- /dev/null +++ b/1.2.17/docs/examples/example-example64/index-debug.html @@ -0,0 +1,59 @@ + + + + + Example - example-example64-debug + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + +
FilterSourceRendered
linky filter +
<div ng-bind-html="snippet | linky">
</div>
+
+
+
linky target +
<div ng-bind-html="snippetWithTarget | linky:'_blank'">
</div>
+
+
+
no filter
<div ng-bind="snippet">
</div>
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example64/index-jquery.html b/1.2.17/docs/examples/example-example64/index-jquery.html new file mode 100644 index 0000000000..918695c1d4 --- /dev/null +++ b/1.2.17/docs/examples/example-example64/index-jquery.html @@ -0,0 +1,60 @@ + + + + + Example - example-example64-jquery + + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + +
FilterSourceRendered
linky filter +
<div ng-bind-html="snippet | linky">
</div>
+
+
+
linky target +
<div ng-bind-html="snippetWithTarget | linky:'_blank'">
</div>
+
+
+
no filter
<div ng-bind="snippet">
</div>
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example64/index-production.html b/1.2.17/docs/examples/example-example64/index-production.html new file mode 100644 index 0000000000..2cfd8c4542 --- /dev/null +++ b/1.2.17/docs/examples/example-example64/index-production.html @@ -0,0 +1,59 @@ + + + + + Example - example-example64-production + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + +
FilterSourceRendered
linky filter +
<div ng-bind-html="snippet | linky">
</div>
+
+
+
linky target +
<div ng-bind-html="snippetWithTarget | linky:'_blank'">
</div>
+
+
+
no filter
<div ng-bind="snippet">
</div>
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example64/index.html b/1.2.17/docs/examples/example-example64/index.html new file mode 100644 index 0000000000..cf83c47597 --- /dev/null +++ b/1.2.17/docs/examples/example-example64/index.html @@ -0,0 +1,59 @@ + + + + + Example - example-example64 + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + +
FilterSourceRendered
linky filter +
<div ng-bind-html="snippet | linky">
</div>
+
+
+
linky target +
<div ng-bind-html="snippetWithTarget | linky:'_blank'">
</div>
+
+
+
no filter
<div ng-bind="snippet">
</div>
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example64/manifest.json b/1.2.17/docs/examples/example-example64/manifest.json new file mode 100644 index 0000000000..2df2a86369 --- /dev/null +++ b/1.2.17/docs/examples/example-example64/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example64", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example64/protractor.js b/1.2.17/docs/examples/example-example64/protractor.js new file mode 100644 index 0000000000..c6e5a68926 --- /dev/null +++ b/1.2.17/docs/examples/example-example64/protractor.js @@ -0,0 +1,30 @@ + it('should linkify the snippet with urls', function() { + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(4); + }); + + it('should not linkify snippet without the linky filter', function() { + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#escaped-html a')).count()).toEqual(0); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new http://link.'); + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('new http://link.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(1); + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()) + .toBe('new http://link.'); + }); + + it('should work with the target property', function() { + expect(element(by.id('linky-target')). + element(by.binding("snippetWithTarget | linky:'_blank'")).getText()). + toBe('http://angularjs.org/'); + expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example65/index-debug.html b/1.2.17/docs/examples/example-example65/index-debug.html new file mode 100644 index 0000000000..fd23c355c8 --- /dev/null +++ b/1.2.17/docs/examples/example-example65/index-debug.html @@ -0,0 +1,59 @@ + + + + + Example - example-example65-debug + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value +
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
+</div>
+
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example65/index-jquery.html b/1.2.17/docs/examples/example-example65/index-jquery.html new file mode 100644 index 0000000000..504825a8b7 --- /dev/null +++ b/1.2.17/docs/examples/example-example65/index-jquery.html @@ -0,0 +1,60 @@ + + + + + Example - example-example65-jquery + + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value +
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
+</div>
+
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example65/index-production.html b/1.2.17/docs/examples/example-example65/index-production.html new file mode 100644 index 0000000000..4c901bdf54 --- /dev/null +++ b/1.2.17/docs/examples/example-example65/index-production.html @@ -0,0 +1,59 @@ + + + + + Example - example-example65-production + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value +
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
+</div>
+
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example65/index.html b/1.2.17/docs/examples/example-example65/index.html new file mode 100644 index 0000000000..40c4bf2acd --- /dev/null +++ b/1.2.17/docs/examples/example-example65/index.html @@ -0,0 +1,59 @@ + + + + + Example - example-example65 + + + + + + + + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value +
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
+</div>
+
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example65/manifest.json b/1.2.17/docs/examples/example-example65/manifest.json new file mode 100644 index 0000000000..9211e06155 --- /dev/null +++ b/1.2.17/docs/examples/example-example65/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example65", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example65/protractor.js b/1.2.17/docs/examples/example-example65/protractor.js new file mode 100644 index 0000000000..b7c6ff71f8 --- /dev/null +++ b/1.2.17/docs/examples/example-example65/protractor.js @@ -0,0 +1,29 @@ + it('should sanitize the html snippet by default', function() { + expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). + toBe('

an html\nclick here\nsnippet

'); + }); + + it('should inline raw snippet if bound to a trusted value', function() { + expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()). + toBe("

an html\n" + + "click here\n" + + "snippet

"); + }); + + it('should escape snippet without any filter', function() { + expect(element(by.css('#bind-default div')).getInnerHtml()). + toBe("<p style=\"color:blue\">an html\n" + + "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + + "snippet</p>"); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new text'); + expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). + toBe('new text'); + expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe( + 'new text'); + expect(element(by.css('#bind-default div')).getInnerHtml()).toBe( + "new <b onclick=\"alert(1)\">text</b>"); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example66/index-debug.html b/1.2.17/docs/examples/example-example66/index-debug.html new file mode 100644 index 0000000000..283b6b981e --- /dev/null +++ b/1.2.17/docs/examples/example-example66/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example66-debug + + + + + + + + + + + + count: {{ count }} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example66/index-jquery.html b/1.2.17/docs/examples/example-example66/index-jquery.html new file mode 100644 index 0000000000..e1ee1f0263 --- /dev/null +++ b/1.2.17/docs/examples/example-example66/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example66-jquery + + + + + + + + + + + + + count: {{ count }} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example66/index-production.html b/1.2.17/docs/examples/example-example66/index-production.html new file mode 100644 index 0000000000..ae51be0094 --- /dev/null +++ b/1.2.17/docs/examples/example-example66/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example66-production + + + + + + + + + + + + count: {{ count }} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example66/index.html b/1.2.17/docs/examples/example-example66/index.html new file mode 100644 index 0000000000..4dbc7ba214 --- /dev/null +++ b/1.2.17/docs/examples/example-example66/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example66 + + + + + + + + + + + + count: {{ count }} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example66/manifest.json b/1.2.17/docs/examples/example-example66/manifest.json new file mode 100644 index 0000000000..77d6dc3ea7 --- /dev/null +++ b/1.2.17/docs/examples/example-example66/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example66", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example66/script.js b/1.2.17/docs/examples/example-example66/script.js new file mode 100644 index 0000000000..7d2b294632 --- /dev/null +++ b/1.2.17/docs/examples/example-example66/script.js @@ -0,0 +1 @@ + angular.module('ngClickExample', ['ngTouch']); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example67/index-debug.html b/1.2.17/docs/examples/example-example67/index-debug.html new file mode 100644 index 0000000000..56e797cffd --- /dev/null +++ b/1.2.17/docs/examples/example-example67/index-debug.html @@ -0,0 +1,24 @@ + + + + + Example - example-example67-debug + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example67/index-jquery.html b/1.2.17/docs/examples/example-example67/index-jquery.html new file mode 100644 index 0000000000..697733fd44 --- /dev/null +++ b/1.2.17/docs/examples/example-example67/index-jquery.html @@ -0,0 +1,25 @@ + + + + + Example - example-example67-jquery + + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example67/index-production.html b/1.2.17/docs/examples/example-example67/index-production.html new file mode 100644 index 0000000000..12e05c78d2 --- /dev/null +++ b/1.2.17/docs/examples/example-example67/index-production.html @@ -0,0 +1,24 @@ + + + + + Example - example-example67-production + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example67/index.html b/1.2.17/docs/examples/example-example67/index.html new file mode 100644 index 0000000000..3c75d7fa91 --- /dev/null +++ b/1.2.17/docs/examples/example-example67/index.html @@ -0,0 +1,24 @@ + + + + + Example - example-example67 + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example67/manifest.json b/1.2.17/docs/examples/example-example67/manifest.json new file mode 100644 index 0000000000..cb4c82d4f1 --- /dev/null +++ b/1.2.17/docs/examples/example-example67/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example67", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example67/script.js b/1.2.17/docs/examples/example-example67/script.js new file mode 100644 index 0000000000..520623ff8b --- /dev/null +++ b/1.2.17/docs/examples/example-example67/script.js @@ -0,0 +1 @@ + angular.module('ngSwipeLeftExample', ['ngTouch']); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example68/index-debug.html b/1.2.17/docs/examples/example-example68/index-debug.html new file mode 100644 index 0000000000..7b69abfab6 --- /dev/null +++ b/1.2.17/docs/examples/example-example68/index-debug.html @@ -0,0 +1,24 @@ + + + + + Example - example-example68-debug + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example68/index-jquery.html b/1.2.17/docs/examples/example-example68/index-jquery.html new file mode 100644 index 0000000000..af2557ccb3 --- /dev/null +++ b/1.2.17/docs/examples/example-example68/index-jquery.html @@ -0,0 +1,25 @@ + + + + + Example - example-example68-jquery + + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example68/index-production.html b/1.2.17/docs/examples/example-example68/index-production.html new file mode 100644 index 0000000000..bb87bb29bc --- /dev/null +++ b/1.2.17/docs/examples/example-example68/index-production.html @@ -0,0 +1,24 @@ + + + + + Example - example-example68-production + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example68/index.html b/1.2.17/docs/examples/example-example68/index.html new file mode 100644 index 0000000000..eae32402ed --- /dev/null +++ b/1.2.17/docs/examples/example-example68/index.html @@ -0,0 +1,24 @@ + + + + + Example - example-example68 + + + + + + + + + + +
+ Some list content, like an email in the inbox +
+
+ + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example68/manifest.json b/1.2.17/docs/examples/example-example68/manifest.json new file mode 100644 index 0000000000..e93facd577 --- /dev/null +++ b/1.2.17/docs/examples/example-example68/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example68", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example68/script.js b/1.2.17/docs/examples/example-example68/script.js new file mode 100644 index 0000000000..f60025a7ea --- /dev/null +++ b/1.2.17/docs/examples/example-example68/script.js @@ -0,0 +1 @@ + angular.module('ngSwipeRightExample', ['ngTouch']); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example69/index-debug.html b/1.2.17/docs/examples/example-example69/index-debug.html new file mode 100644 index 0000000000..a4df5c93e8 --- /dev/null +++ b/1.2.17/docs/examples/example-example69/index-debug.html @@ -0,0 +1,43 @@ + + + + + Example - example-example69-debug + + + + + + + + + +
+

Browser with History API

+


+ $location.protocol() = {{$location.protocol()}}
+ $location.host() = {{$location.host()}}
+ $location.port() = {{$location.port()}}
+ $location.path() = {{$location.path()}}
+ $location.search() = {{$location.search()}}
+ $location.hash() = {{$location.hash()}}
+ /base/first?a=b | + sec/ond?flag#hash | + external +
+ +
+

Browser without History API

+


+ $location.protocol() = {{$location.protocol()}}
+ $location.host() = {{$location.host()}}
+ $location.port() = {{$location.port()}}
+ $location.path() = {{$location.path()}}
+ $location.search() = {{$location.search()}}
+ $location.hash() = {{$location.hash()}}
+ /base/first?a=b | + sec/ond?flag#hash | + external +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example69/index-jquery.html b/1.2.17/docs/examples/example-example69/index-jquery.html new file mode 100644 index 0000000000..86b27d2e2d --- /dev/null +++ b/1.2.17/docs/examples/example-example69/index-jquery.html @@ -0,0 +1,44 @@ + + + + + Example - example-example69-jquery + + + + + + + + + + +
+

Browser with History API

+


+ $location.protocol() = {{$location.protocol()}}
+ $location.host() = {{$location.host()}}
+ $location.port() = {{$location.port()}}
+ $location.path() = {{$location.path()}}
+ $location.search() = {{$location.search()}}
+ $location.hash() = {{$location.hash()}}
+ /base/first?a=b | + sec/ond?flag#hash | + external +
+ +
+

Browser without History API

+


+ $location.protocol() = {{$location.protocol()}}
+ $location.host() = {{$location.host()}}
+ $location.port() = {{$location.port()}}
+ $location.path() = {{$location.path()}}
+ $location.search() = {{$location.search()}}
+ $location.hash() = {{$location.hash()}}
+ /base/first?a=b | + sec/ond?flag#hash | + external +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example69/index-production.html b/1.2.17/docs/examples/example-example69/index-production.html new file mode 100644 index 0000000000..5e6f2aab09 --- /dev/null +++ b/1.2.17/docs/examples/example-example69/index-production.html @@ -0,0 +1,43 @@ + + + + + Example - example-example69-production + + + + + + + + + +
+

Browser with History API

+


+ $location.protocol() = {{$location.protocol()}}
+ $location.host() = {{$location.host()}}
+ $location.port() = {{$location.port()}}
+ $location.path() = {{$location.path()}}
+ $location.search() = {{$location.search()}}
+ $location.hash() = {{$location.hash()}}
+ /base/first?a=b | + sec/ond?flag#hash | + external +
+ +
+

Browser without History API

+


+ $location.protocol() = {{$location.protocol()}}
+ $location.host() = {{$location.host()}}
+ $location.port() = {{$location.port()}}
+ $location.path() = {{$location.path()}}
+ $location.search() = {{$location.search()}}
+ $location.hash() = {{$location.hash()}}
+ /base/first?a=b | + sec/ond?flag#hash | + external +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example69/index.html b/1.2.17/docs/examples/example-example69/index.html new file mode 100644 index 0000000000..226e141e32 --- /dev/null +++ b/1.2.17/docs/examples/example-example69/index.html @@ -0,0 +1,43 @@ + + + + + Example - example-example69 + + + + + + + + + +
+

Browser with History API

+


+ $location.protocol() = {{$location.protocol()}}
+ $location.host() = {{$location.host()}}
+ $location.port() = {{$location.port()}}
+ $location.path() = {{$location.path()}}
+ $location.search() = {{$location.search()}}
+ $location.hash() = {{$location.hash()}}
+ /base/first?a=b | + sec/ond?flag#hash | + external +
+ +
+

Browser without History API

+


+ $location.protocol() = {{$location.protocol()}}
+ $location.host() = {{$location.host()}}
+ $location.port() = {{$location.port()}}
+ $location.path() = {{$location.path()}}
+ $location.search() = {{$location.search()}}
+ $location.hash() = {{$location.hash()}}
+ /base/first?a=b | + sec/ond?flag#hash | + external +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example69/manifest.json b/1.2.17/docs/examples/example-example69/manifest.json new file mode 100644 index 0000000000..c0a85bfab4 --- /dev/null +++ b/1.2.17/docs/examples/example-example69/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example69", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example69/script.js b/1.2.17/docs/examples/example-example69/script.js new file mode 100644 index 0000000000..0810d98e2b --- /dev/null +++ b/1.2.17/docs/examples/example-example69/script.js @@ -0,0 +1,76 @@ + function FakeBrowser(initUrl, baseHref) { + this.onUrlChange = function(fn) { + this.urlChange = fn; + }; + + this.url = function() { + return initUrl; + }; + + this.defer = function(fn, delay) { + setTimeout(function() { fn(); }, delay || 0); + }; + + this.baseHref = function() { + return baseHref; + }; + + this.notifyWhenOutstandingRequests = angular.noop; + } + + var browsers = { + html5: new FakeBrowser('http://www.example.com/base/path?a=b#h', '/base/index.html'), + hashbang: new FakeBrowser('http://www.example.com/base/index.html#!/path?a=b#h', '/base/index.html') + }; + + function Html5Cntl($scope, $location) { + $scope.$location = $location; + } + + function HashbangCntl($scope, $location) { + $scope.$location = $location; + } + + function initEnv(name) { + var root = angular.element(document.getElementById(name + '-mode')); + // We must kill a link to the injector for this element otherwise angular will + // complain that it has been bootstrapped already. + root.data('$injector', null); + angular.bootstrap(root, [function($compileProvider, $locationProvider, $provide){ + $locationProvider.html5Mode(true).hashPrefix('!'); + + $provide.value('$browser', browsers[name]); + $provide.value('$sniffer', {history: name == 'html5'}); + + $compileProvider.directive('ngAddressBar', function() { + return function(scope, elm, attrs) { + var browser = browsers[attrs.browser], + input = angular.element('').val(browser.url()), + delay; + + input.on('keypress keyup keydown', function() { + if (!delay) { + delay = setTimeout(fireUrlChange, 250); + } + }); + + browser.url = function(url) { + return input.val(url); + }; + + elm.append('Address: ').append(input); + + function fireUrlChange() { + delay = null; + browser.urlChange(input.val()); + } + }; + }); + }]); + root.on('click', function(e) { + e.stopPropagation(); + }); + } + + initEnv('html5'); + initEnv('hashbang'); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example7/index-debug.html b/1.2.17/docs/examples/example-example7/index-debug.html new file mode 100644 index 0000000000..8a0e90df1a --- /dev/null +++ b/1.2.17/docs/examples/example-example7/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example7-debug + + + + + + + + + Check me to check both:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example7/index-jquery.html b/1.2.17/docs/examples/example-example7/index-jquery.html new file mode 100644 index 0000000000..83805c66c9 --- /dev/null +++ b/1.2.17/docs/examples/example-example7/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example7-jquery + + + + + + + + + + Check me to check both:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example7/index-production.html b/1.2.17/docs/examples/example-example7/index-production.html new file mode 100644 index 0000000000..fbc79db98e --- /dev/null +++ b/1.2.17/docs/examples/example-example7/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example7-production + + + + + + + + + Check me to check both:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example7/index.html b/1.2.17/docs/examples/example-example7/index.html new file mode 100644 index 0000000000..98804a906d --- /dev/null +++ b/1.2.17/docs/examples/example-example7/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example7 + + + + + + + + + Check me to check both:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example7/manifest.json b/1.2.17/docs/examples/example-example7/manifest.json new file mode 100644 index 0000000000..7829614265 --- /dev/null +++ b/1.2.17/docs/examples/example-example7/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example7", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example7/protractor.js b/1.2.17/docs/examples/example-example7/protractor.js new file mode 100644 index 0000000000..eb76243835 --- /dev/null +++ b/1.2.17/docs/examples/example-example7/protractor.js @@ -0,0 +1,5 @@ + it('should check both checkBoxes', function() { + expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy(); + element(by.model('master')).click(); + expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy(); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example70/index-debug.html b/1.2.17/docs/examples/example-example70/index-debug.html new file mode 100644 index 0000000000..0075e65145 --- /dev/null +++ b/1.2.17/docs/examples/example-example70/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example70-debug + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example70/index-jquery.html b/1.2.17/docs/examples/example-example70/index-jquery.html new file mode 100644 index 0000000000..156ccb8b92 --- /dev/null +++ b/1.2.17/docs/examples/example-example70/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example70-jquery + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example70/index-production.html b/1.2.17/docs/examples/example-example70/index-production.html new file mode 100644 index 0000000000..d395b853d0 --- /dev/null +++ b/1.2.17/docs/examples/example-example70/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example70-production + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example70/index.html b/1.2.17/docs/examples/example-example70/index.html new file mode 100644 index 0000000000..8950e799bc --- /dev/null +++ b/1.2.17/docs/examples/example-example70/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example70 + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example70/manifest.json b/1.2.17/docs/examples/example-example70/manifest.json new file mode 100644 index 0000000000..243c407a07 --- /dev/null +++ b/1.2.17/docs/examples/example-example70/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example70", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example70/script.js b/1.2.17/docs/examples/example-example70/script.js new file mode 100644 index 0000000000..fdfe17ea02 --- /dev/null +++ b/1.2.17/docs/examples/example-example70/script.js @@ -0,0 +1,10 @@ +function LocationController($scope, $location) { + $scope.$watch('locationPath', function(path) { + $location.path(path); + }); + $scope.$watch(function() { + return $location.path(); + }, function(path) { + $scope.locationPath = path; + }); +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example71/animations.css b/1.2.17/docs/examples/example-example71/animations.css new file mode 100644 index 0000000000..25e395b423 --- /dev/null +++ b/1.2.17/docs/examples/example-example71/animations.css @@ -0,0 +1,23 @@ + .sample-show-hide { + padding:10px; + border:1px solid black; + background:white; + } + + .sample-show-hide.ng-hide-add, .sample-show-hide.ng-hide-remove { + -webkit-transition:all linear 0.5s; + -moz-transition:all linear 0.5s; + -o-transition:all linear 0.5s; + transition:all linear 0.5s; + display:block!important; + } + + .sample-show-hide.ng-hide-add.ng-hide-add-active, + .sample-show-hide.ng-hide-remove { + opacity:0; + } + + .sample-show-hide.ng-hide-add, + .sample-show-hide.ng-hide-remove.ng-hide-remove-active { + opacity:1; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example71/index-debug.html b/1.2.17/docs/examples/example-example71/index-debug.html new file mode 100644 index 0000000000..00ba7e5bc1 --- /dev/null +++ b/1.2.17/docs/examples/example-example71/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-example71-debug + + + + + + + + + + +
+ +
+ Visible... +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example71/index-jquery.html b/1.2.17/docs/examples/example-example71/index-jquery.html new file mode 100644 index 0000000000..d335da52f3 --- /dev/null +++ b/1.2.17/docs/examples/example-example71/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-example71-jquery + + + + + + + + + + + +
+ +
+ Visible... +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example71/index-production.html b/1.2.17/docs/examples/example-example71/index-production.html new file mode 100644 index 0000000000..7278596278 --- /dev/null +++ b/1.2.17/docs/examples/example-example71/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-example71-production + + + + + + + + + + +
+ +
+ Visible... +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example71/index.html b/1.2.17/docs/examples/example-example71/index.html new file mode 100644 index 0000000000..d87867027f --- /dev/null +++ b/1.2.17/docs/examples/example-example71/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-example71 + + + + + + + + + + +
+ +
+ Visible... +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example71/manifest.json b/1.2.17/docs/examples/example-example71/manifest.json new file mode 100644 index 0000000000..36bfdec71e --- /dev/null +++ b/1.2.17/docs/examples/example-example71/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example71", + "files": [ + "index-production.html", + "animations.css" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example72/index-debug.html b/1.2.17/docs/examples/example-example72/index-debug.html new file mode 100644 index 0000000000..a48adc171a --- /dev/null +++ b/1.2.17/docs/examples/example-example72/index-debug.html @@ -0,0 +1,23 @@ + + + + + Example - example-example72-debug + + + + + + + + + + +

+ + +
+ CSS-Animated Text +

+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example72/index-jquery.html b/1.2.17/docs/examples/example-example72/index-jquery.html new file mode 100644 index 0000000000..558609bfe4 --- /dev/null +++ b/1.2.17/docs/examples/example-example72/index-jquery.html @@ -0,0 +1,24 @@ + + + + + Example - example-example72-jquery + + + + + + + + + + + +

+ + +
+ CSS-Animated Text +

+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example72/index-production.html b/1.2.17/docs/examples/example-example72/index-production.html new file mode 100644 index 0000000000..9a26579b3c --- /dev/null +++ b/1.2.17/docs/examples/example-example72/index-production.html @@ -0,0 +1,23 @@ + + + + + Example - example-example72-production + + + + + + + + + + +

+ + +
+ CSS-Animated Text +

+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example72/index.html b/1.2.17/docs/examples/example-example72/index.html new file mode 100644 index 0000000000..bf495ac07f --- /dev/null +++ b/1.2.17/docs/examples/example-example72/index.html @@ -0,0 +1,23 @@ + + + + + Example - example-example72 + + + + + + + + + + +

+ + +
+ CSS-Animated Text +

+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example72/manifest.json b/1.2.17/docs/examples/example-example72/manifest.json new file mode 100644 index 0000000000..a316ece861 --- /dev/null +++ b/1.2.17/docs/examples/example-example72/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example72", + "files": [ + "index-production.html", + "style.css" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example72/style.css b/1.2.17/docs/examples/example-example72/style.css new file mode 100644 index 0000000000..f2edcab030 --- /dev/null +++ b/1.2.17/docs/examples/example-example72/style.css @@ -0,0 +1,17 @@ + .css-class-add, .css-class-remove { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + -moz-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + -o-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; + } + + .css-class, + .css-class-add.css-class-add-active { + color: red; + font-size:3em; + } + + .css-class-remove.css-class-remove-active { + font-size:1.0em; + color:black; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example73/index-debug.html b/1.2.17/docs/examples/example-example73/index-debug.html new file mode 100644 index 0000000000..7be8145a57 --- /dev/null +++ b/1.2.17/docs/examples/example-example73/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example73-debug + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example73/index-jquery.html b/1.2.17/docs/examples/example-example73/index-jquery.html new file mode 100644 index 0000000000..7431de8ac9 --- /dev/null +++ b/1.2.17/docs/examples/example-example73/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example73-jquery + + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example73/index-production.html b/1.2.17/docs/examples/example-example73/index-production.html new file mode 100644 index 0000000000..0c15cde1cd --- /dev/null +++ b/1.2.17/docs/examples/example-example73/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example73-production + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example73/index.html b/1.2.17/docs/examples/example-example73/index.html new file mode 100644 index 0000000000..653d2a2f19 --- /dev/null +++ b/1.2.17/docs/examples/example-example73/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example73 + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example73/manifest.json b/1.2.17/docs/examples/example-example73/manifest.json new file mode 100644 index 0000000000..2c4ed10953 --- /dev/null +++ b/1.2.17/docs/examples/example-example73/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example73", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example73/script.js b/1.2.17/docs/examples/example-example73/script.js new file mode 100644 index 0000000000..67b948a05d --- /dev/null +++ b/1.2.17/docs/examples/example-example73/script.js @@ -0,0 +1,34 @@ + angular.module('drag', []). + directive('draggable', function($document) { + return function(scope, element, attr) { + var startX = 0, startY = 0, x = 0, y = 0; + element.css({ + position: 'relative', + border: '1px solid red', + backgroundColor: 'lightgrey', + cursor: 'pointer' + }); + element.on('mousedown', function(event) { + // Prevent default dragging of selected content + event.preventDefault(); + startX = event.screenX - x; + startY = event.screenY - y; + $document.on('mousemove', mousemove); + $document.on('mouseup', mouseup); + }); + + function mousemove(event) { + y = event.screenY - startY; + x = event.screenX - startX; + element.css({ + top: y + 'px', + left: x + 'px' + }); + } + + function mouseup() { + $document.unbind('mousemove', mousemove); + $document.unbind('mouseup', mouseup); + } + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example74/app.js b/1.2.17/docs/examples/example-example74/app.js new file mode 100644 index 0000000000..02a28d9a32 --- /dev/null +++ b/1.2.17/docs/examples/example-example74/app.js @@ -0,0 +1,13 @@ + var myApp = angular.module('spicyApp1', []); + + myApp.controller('SpicyController', ['$scope', function($scope) { + $scope.spice = 'very'; + + $scope.chiliSpicy = function() { + $scope.spice = 'chili'; + }; + + $scope.jalapenoSpicy = function() { + $scope.spice = 'jalapeño'; + }; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example74/index-debug.html b/1.2.17/docs/examples/example-example74/index-debug.html new file mode 100644 index 0000000000..08fd4c8713 --- /dev/null +++ b/1.2.17/docs/examples/example-example74/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example74-debug + + + + + + + + + +
+ + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example74/index-jquery.html b/1.2.17/docs/examples/example-example74/index-jquery.html new file mode 100644 index 0000000000..92050e5f2e --- /dev/null +++ b/1.2.17/docs/examples/example-example74/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example74-jquery + + + + + + + + + + +
+ + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example74/index-production.html b/1.2.17/docs/examples/example-example74/index-production.html new file mode 100644 index 0000000000..393b1e7910 --- /dev/null +++ b/1.2.17/docs/examples/example-example74/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example74-production + + + + + + + + + +
+ + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example74/index.html b/1.2.17/docs/examples/example-example74/index.html new file mode 100644 index 0000000000..c1dc55dc5b --- /dev/null +++ b/1.2.17/docs/examples/example-example74/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example74 + + + + + + + + + +
+ + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example74/manifest.json b/1.2.17/docs/examples/example-example74/manifest.json new file mode 100644 index 0000000000..600935a44b --- /dev/null +++ b/1.2.17/docs/examples/example-example74/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example74", + "files": [ + "index-production.html", + "app.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example75/app.js b/1.2.17/docs/examples/example-example75/app.js new file mode 100644 index 0000000000..7f190a715a --- /dev/null +++ b/1.2.17/docs/examples/example-example75/app.js @@ -0,0 +1,10 @@ + var myApp = angular.module('spicyApp2', []); + + myApp.controller('SpicyController', ['$scope', function($scope) { + $scope.customSpice = "wasabi"; + $scope.spice = 'very'; + + $scope.spicy = function(spice) { + $scope.spice = spice; + }; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example75/index-debug.html b/1.2.17/docs/examples/example-example75/index-debug.html new file mode 100644 index 0000000000..f12b277250 --- /dev/null +++ b/1.2.17/docs/examples/example-example75/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example75-debug + + + + + + + + + +
+ + + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example75/index-jquery.html b/1.2.17/docs/examples/example-example75/index-jquery.html new file mode 100644 index 0000000000..1b01b3bc63 --- /dev/null +++ b/1.2.17/docs/examples/example-example75/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example75-jquery + + + + + + + + + + +
+ + + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example75/index-production.html b/1.2.17/docs/examples/example-example75/index-production.html new file mode 100644 index 0000000000..c21e7d931a --- /dev/null +++ b/1.2.17/docs/examples/example-example75/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example75-production + + + + + + + + + +
+ + + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example75/index.html b/1.2.17/docs/examples/example-example75/index.html new file mode 100644 index 0000000000..3311ebc4e1 --- /dev/null +++ b/1.2.17/docs/examples/example-example75/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example75 + + + + + + + + + +
+ + + +

The food is {{spice}} spicy!

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example75/manifest.json b/1.2.17/docs/examples/example-example75/manifest.json new file mode 100644 index 0000000000..c987b51b9f --- /dev/null +++ b/1.2.17/docs/examples/example-example75/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example75", + "files": [ + "index-production.html", + "app.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example76/app.css b/1.2.17/docs/examples/example-example76/app.css new file mode 100644 index 0000000000..a0b18351dc --- /dev/null +++ b/1.2.17/docs/examples/example-example76/app.css @@ -0,0 +1,4 @@ + div.spicy div { + padding: 10px; + border: solid 2px blue; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example76/app.js b/1.2.17/docs/examples/example-example76/app.js new file mode 100644 index 0000000000..4ed3297e38 --- /dev/null +++ b/1.2.17/docs/examples/example-example76/app.js @@ -0,0 +1,12 @@ + var myApp = angular.module('scopeInheritance', []); + myApp.controller('MainController', ['$scope', function($scope) { + $scope.timeOfDay = 'morning'; + $scope.name = 'Nikki'; + }]); + myApp.controller('ChildController', ['$scope', function($scope) { + $scope.name = 'Mattie'; + }]); + myApp.controller('GrandChildController', ['$scope', function($scope) { + $scope.timeOfDay = 'evening'; + $scope.name = 'Gingerbread Baby'; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example76/index-debug.html b/1.2.17/docs/examples/example-example76/index-debug.html new file mode 100644 index 0000000000..84e4e8e88f --- /dev/null +++ b/1.2.17/docs/examples/example-example76/index-debug.html @@ -0,0 +1,30 @@ + + + + + Example - example-example76-debug + + + + + + + + + + +
+
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example76/index-jquery.html b/1.2.17/docs/examples/example-example76/index-jquery.html new file mode 100644 index 0000000000..3e11effdfc --- /dev/null +++ b/1.2.17/docs/examples/example-example76/index-jquery.html @@ -0,0 +1,31 @@ + + + + + Example - example-example76-jquery + + + + + + + + + + + +
+
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example76/index-production.html b/1.2.17/docs/examples/example-example76/index-production.html new file mode 100644 index 0000000000..1d275f1cf8 --- /dev/null +++ b/1.2.17/docs/examples/example-example76/index-production.html @@ -0,0 +1,30 @@ + + + + + Example - example-example76-production + + + + + + + + + + +
+
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example76/index.html b/1.2.17/docs/examples/example-example76/index.html new file mode 100644 index 0000000000..51cfdb4c6f --- /dev/null +++ b/1.2.17/docs/examples/example-example76/index.html @@ -0,0 +1,30 @@ + + + + + Example - example-example76 + + + + + + + + + + +
+
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+ +
+

Good {{timeOfDay}}, {{name}}!

+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example76/manifest.json b/1.2.17/docs/examples/example-example76/manifest.json new file mode 100644 index 0000000000..7b350eeac4 --- /dev/null +++ b/1.2.17/docs/examples/example-example76/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example76", + "files": [ + "index-production.html", + "app.css", + "app.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example77/index-debug.html b/1.2.17/docs/examples/example-example77/index-debug.html new file mode 100644 index 0000000000..59150787f1 --- /dev/null +++ b/1.2.17/docs/examples/example-example77/index-debug.html @@ -0,0 +1,25 @@ + + + + + Example - example-example77-debug + + + + + + + + + + +
+ Hello
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example77/index-jquery.html b/1.2.17/docs/examples/example-example77/index-jquery.html new file mode 100644 index 0000000000..af5a2ccb4e --- /dev/null +++ b/1.2.17/docs/examples/example-example77/index-jquery.html @@ -0,0 +1,26 @@ + + + + + Example - example-example77-jquery + + + + + + + + + + + +
+ Hello
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example77/index-production.html b/1.2.17/docs/examples/example-example77/index-production.html new file mode 100644 index 0000000000..330712ba96 --- /dev/null +++ b/1.2.17/docs/examples/example-example77/index-production.html @@ -0,0 +1,25 @@ + + + + + Example - example-example77-production + + + + + + + + + + +
+ Hello
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example77/index.html b/1.2.17/docs/examples/example-example77/index.html new file mode 100644 index 0000000000..712e561a2b --- /dev/null +++ b/1.2.17/docs/examples/example-example77/index.html @@ -0,0 +1,25 @@ + + + + + Example - example-example77 + + + + + + + + + + +
+ Hello
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example77/manifest.json b/1.2.17/docs/examples/example-example77/manifest.json new file mode 100644 index 0000000000..d8d19aa816 --- /dev/null +++ b/1.2.17/docs/examples/example-example77/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example77", + "files": [ + "index-production.html", + "script.js", + "protractorTest.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example77/protractorTest.js b/1.2.17/docs/examples/example-example77/protractorTest.js new file mode 100644 index 0000000000..21ddb4594a --- /dev/null +++ b/1.2.17/docs/examples/example-example77/protractorTest.js @@ -0,0 +1,4 @@ + it('should show off bindings', function() { + expect(element(by.css('div[ng-controller="Controller"] span[ng-bind]')).getText()) + .toBe('Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example77/script.js b/1.2.17/docs/examples/example-example77/script.js new file mode 100644 index 0000000000..5e18c6c932 --- /dev/null +++ b/1.2.17/docs/examples/example-example77/script.js @@ -0,0 +1,4 @@ + angular.module('docsBindExample', []) + .controller('Controller', ['$scope', function($scope) { + $scope.name = 'Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)'; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example78/index-debug.html b/1.2.17/docs/examples/example-example78/index-debug.html new file mode 100644 index 0000000000..9c4550c18f --- /dev/null +++ b/1.2.17/docs/examples/example-example78/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example78-debug + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example78/index-jquery.html b/1.2.17/docs/examples/example-example78/index-jquery.html new file mode 100644 index 0000000000..72adc66c2d --- /dev/null +++ b/1.2.17/docs/examples/example-example78/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example78-jquery + + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example78/index-production.html b/1.2.17/docs/examples/example-example78/index-production.html new file mode 100644 index 0000000000..2484c92e3a --- /dev/null +++ b/1.2.17/docs/examples/example-example78/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example78-production + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example78/index.html b/1.2.17/docs/examples/example-example78/index.html new file mode 100644 index 0000000000..76e9bbeadc --- /dev/null +++ b/1.2.17/docs/examples/example-example78/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example78 + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example78/manifest.json b/1.2.17/docs/examples/example-example78/manifest.json new file mode 100644 index 0000000000..a59dd3fed7 --- /dev/null +++ b/1.2.17/docs/examples/example-example78/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example78", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example78/script.js b/1.2.17/docs/examples/example-example78/script.js new file mode 100644 index 0000000000..79becdf4d1 --- /dev/null +++ b/1.2.17/docs/examples/example-example78/script.js @@ -0,0 +1,12 @@ + angular.module('docsSimpleDirective', []) + .controller('Controller', ['$scope', function($scope) { + $scope.customer = { + name: 'Naomi', + address: '1600 Amphitheatre' + }; + }]) + .directive('myCustomer', function() { + return { + template: 'Name: {{customer.name}} Address: {{customer.address}}' + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example79/index-debug.html b/1.2.17/docs/examples/example-example79/index-debug.html new file mode 100644 index 0000000000..e792d00f90 --- /dev/null +++ b/1.2.17/docs/examples/example-example79/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example79-debug + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example79/index-jquery.html b/1.2.17/docs/examples/example-example79/index-jquery.html new file mode 100644 index 0000000000..2af152987e --- /dev/null +++ b/1.2.17/docs/examples/example-example79/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example79-jquery + + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example79/index-production.html b/1.2.17/docs/examples/example-example79/index-production.html new file mode 100644 index 0000000000..6c811e2fbd --- /dev/null +++ b/1.2.17/docs/examples/example-example79/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example79-production + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example79/index.html b/1.2.17/docs/examples/example-example79/index.html new file mode 100644 index 0000000000..d04535236f --- /dev/null +++ b/1.2.17/docs/examples/example-example79/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example79 + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example79/manifest.json b/1.2.17/docs/examples/example-example79/manifest.json new file mode 100644 index 0000000000..b86f7447cf --- /dev/null +++ b/1.2.17/docs/examples/example-example79/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example79", + "files": [ + "index-production.html", + "script.js", + "my-customer.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example79/my-customer.html b/1.2.17/docs/examples/example-example79/my-customer.html new file mode 100644 index 0000000000..82930dca78 --- /dev/null +++ b/1.2.17/docs/examples/example-example79/my-customer.html @@ -0,0 +1 @@ + Name: {{customer.name}} Address: {{customer.address}} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example79/script.js b/1.2.17/docs/examples/example-example79/script.js new file mode 100644 index 0000000000..75e0299e50 --- /dev/null +++ b/1.2.17/docs/examples/example-example79/script.js @@ -0,0 +1,12 @@ + angular.module('docsTemplateUrlDirective', []) + .controller('Controller', ['$scope', function($scope) { + $scope.customer = { + name: 'Naomi', + address: '1600 Amphitheatre' + }; + }]) + .directive('myCustomer', function() { + return { + templateUrl: 'my-customer.html' + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example8/index-debug.html b/1.2.17/docs/examples/example-example8/index-debug.html new file mode 100644 index 0000000000..ed95e67549 --- /dev/null +++ b/1.2.17/docs/examples/example-example8/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example8-debug + + + + + + + + + Check me to make text readonly:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example8/index-jquery.html b/1.2.17/docs/examples/example-example8/index-jquery.html new file mode 100644 index 0000000000..74084b8991 --- /dev/null +++ b/1.2.17/docs/examples/example-example8/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example8-jquery + + + + + + + + + + Check me to make text readonly:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example8/index-production.html b/1.2.17/docs/examples/example-example8/index-production.html new file mode 100644 index 0000000000..b3c45e431d --- /dev/null +++ b/1.2.17/docs/examples/example-example8/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example8-production + + + + + + + + + Check me to make text readonly:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example8/index.html b/1.2.17/docs/examples/example-example8/index.html new file mode 100644 index 0000000000..d145623562 --- /dev/null +++ b/1.2.17/docs/examples/example-example8/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example8 + + + + + + + + + Check me to make text readonly:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example8/manifest.json b/1.2.17/docs/examples/example-example8/manifest.json new file mode 100644 index 0000000000..5bef30fecc --- /dev/null +++ b/1.2.17/docs/examples/example-example8/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example8", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example8/protractor.js b/1.2.17/docs/examples/example-example8/protractor.js new file mode 100644 index 0000000000..0f91387342 --- /dev/null +++ b/1.2.17/docs/examples/example-example8/protractor.js @@ -0,0 +1,5 @@ + it('should toggle readonly attr', function() { + expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeFalsy(); + element(by.model('checked')).click(); + expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeTruthy(); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example80/index-debug.html b/1.2.17/docs/examples/example-example80/index-debug.html new file mode 100644 index 0000000000..bd9b53aa39 --- /dev/null +++ b/1.2.17/docs/examples/example-example80/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example80-debug + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example80/index-jquery.html b/1.2.17/docs/examples/example-example80/index-jquery.html new file mode 100644 index 0000000000..e4722ef84d --- /dev/null +++ b/1.2.17/docs/examples/example-example80/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example80-jquery + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example80/index-production.html b/1.2.17/docs/examples/example-example80/index-production.html new file mode 100644 index 0000000000..23bfaa645f --- /dev/null +++ b/1.2.17/docs/examples/example-example80/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example80-production + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example80/index.html b/1.2.17/docs/examples/example-example80/index.html new file mode 100644 index 0000000000..0be8cb40b4 --- /dev/null +++ b/1.2.17/docs/examples/example-example80/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example80 + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example80/manifest.json b/1.2.17/docs/examples/example-example80/manifest.json new file mode 100644 index 0000000000..8f8f6db1bd --- /dev/null +++ b/1.2.17/docs/examples/example-example80/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example80", + "files": [ + "index-production.html", + "script.js", + "my-customer.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example80/my-customer.html b/1.2.17/docs/examples/example-example80/my-customer.html new file mode 100644 index 0000000000..82930dca78 --- /dev/null +++ b/1.2.17/docs/examples/example-example80/my-customer.html @@ -0,0 +1 @@ + Name: {{customer.name}} Address: {{customer.address}} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example80/script.js b/1.2.17/docs/examples/example-example80/script.js new file mode 100644 index 0000000000..255a1d2fea --- /dev/null +++ b/1.2.17/docs/examples/example-example80/script.js @@ -0,0 +1,13 @@ + angular.module('docsRestrictDirective', []) + .controller('Controller', ['$scope', function($scope) { + $scope.customer = { + name: 'Naomi', + address: '1600 Amphitheatre' + }; + }]) + .directive('myCustomer', function() { + return { + restrict: 'E', + templateUrl: 'my-customer.html' + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example81/index-debug.html b/1.2.17/docs/examples/example-example81/index-debug.html new file mode 100644 index 0000000000..8da69c0118 --- /dev/null +++ b/1.2.17/docs/examples/example-example81/index-debug.html @@ -0,0 +1,23 @@ + + + + + Example - example-example81-debug + + + + + + + + + +
+ +
+
+
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example81/index-jquery.html b/1.2.17/docs/examples/example-example81/index-jquery.html new file mode 100644 index 0000000000..4cc0ab86d7 --- /dev/null +++ b/1.2.17/docs/examples/example-example81/index-jquery.html @@ -0,0 +1,24 @@ + + + + + Example - example-example81-jquery + + + + + + + + + + +
+ +
+
+
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example81/index-production.html b/1.2.17/docs/examples/example-example81/index-production.html new file mode 100644 index 0000000000..853ce91439 --- /dev/null +++ b/1.2.17/docs/examples/example-example81/index-production.html @@ -0,0 +1,23 @@ + + + + + Example - example-example81-production + + + + + + + + + +
+ +
+
+
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example81/index.html b/1.2.17/docs/examples/example-example81/index.html new file mode 100644 index 0000000000..36396ce676 --- /dev/null +++ b/1.2.17/docs/examples/example-example81/index.html @@ -0,0 +1,23 @@ + + + + + Example - example-example81 + + + + + + + + + +
+ +
+
+
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example81/manifest.json b/1.2.17/docs/examples/example-example81/manifest.json new file mode 100644 index 0000000000..4df54b6ddf --- /dev/null +++ b/1.2.17/docs/examples/example-example81/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example81", + "files": [ + "index-production.html", + "script.js", + "my-customer.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example81/my-customer.html b/1.2.17/docs/examples/example-example81/my-customer.html new file mode 100644 index 0000000000..82930dca78 --- /dev/null +++ b/1.2.17/docs/examples/example-example81/my-customer.html @@ -0,0 +1 @@ + Name: {{customer.name}} Address: {{customer.address}} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example81/script.js b/1.2.17/docs/examples/example-example81/script.js new file mode 100644 index 0000000000..80c41e79da --- /dev/null +++ b/1.2.17/docs/examples/example-example81/script.js @@ -0,0 +1,19 @@ + angular.module('docsScopeProblemExample', []) + .controller('NaomiController', ['$scope', function($scope) { + $scope.customer = { + name: 'Naomi', + address: '1600 Amphitheatre' + }; + }]) + .controller('IgorController', ['$scope', function($scope) { + $scope.customer = { + name: 'Igor', + address: '123 Somewhere' + }; + }]) + .directive('myCustomer', function() { + return { + restrict: 'E', + templateUrl: 'my-customer.html' + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example82/index-debug.html b/1.2.17/docs/examples/example-example82/index-debug.html new file mode 100644 index 0000000000..781c04c7bb --- /dev/null +++ b/1.2.17/docs/examples/example-example82/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example82-debug + + + + + + + + + +
+ +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example82/index-jquery.html b/1.2.17/docs/examples/example-example82/index-jquery.html new file mode 100644 index 0000000000..6d2b548edb --- /dev/null +++ b/1.2.17/docs/examples/example-example82/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example82-jquery + + + + + + + + + + +
+ +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example82/index-production.html b/1.2.17/docs/examples/example-example82/index-production.html new file mode 100644 index 0000000000..985212499c --- /dev/null +++ b/1.2.17/docs/examples/example-example82/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example82-production + + + + + + + + + +
+ +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example82/index.html b/1.2.17/docs/examples/example-example82/index.html new file mode 100644 index 0000000000..67779937ca --- /dev/null +++ b/1.2.17/docs/examples/example-example82/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example82 + + + + + + + + + +
+ +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example82/manifest.json b/1.2.17/docs/examples/example-example82/manifest.json new file mode 100644 index 0000000000..0beabca956 --- /dev/null +++ b/1.2.17/docs/examples/example-example82/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example82", + "files": [ + "index-production.html", + "script.js", + "my-customer-iso.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example82/my-customer-iso.html b/1.2.17/docs/examples/example-example82/my-customer-iso.html new file mode 100644 index 0000000000..2b0eedf2b2 --- /dev/null +++ b/1.2.17/docs/examples/example-example82/my-customer-iso.html @@ -0,0 +1 @@ + Name: {{customerInfo.name}} Address: {{customerInfo.address}} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example82/script.js b/1.2.17/docs/examples/example-example82/script.js new file mode 100644 index 0000000000..e9d0706f31 --- /dev/null +++ b/1.2.17/docs/examples/example-example82/script.js @@ -0,0 +1,14 @@ + angular.module('docsIsolateScopeDirective', []) + .controller('Controller', ['$scope', function($scope) { + $scope.naomi = { name: 'Naomi', address: '1600 Amphitheatre' }; + $scope.igor = { name: 'Igor', address: '123 Somewhere' }; + }]) + .directive('myCustomer', function() { + return { + restrict: 'E', + scope: { + customerInfo: '=info' + }, + templateUrl: 'my-customer-iso.html' + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example83/index-debug.html b/1.2.17/docs/examples/example-example83/index-debug.html new file mode 100644 index 0000000000..558a365b06 --- /dev/null +++ b/1.2.17/docs/examples/example-example83/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example83-debug + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example83/index-jquery.html b/1.2.17/docs/examples/example-example83/index-jquery.html new file mode 100644 index 0000000000..8d18cab6ce --- /dev/null +++ b/1.2.17/docs/examples/example-example83/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example83-jquery + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example83/index-production.html b/1.2.17/docs/examples/example-example83/index-production.html new file mode 100644 index 0000000000..22f50abdbb --- /dev/null +++ b/1.2.17/docs/examples/example-example83/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example83-production + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example83/index.html b/1.2.17/docs/examples/example-example83/index.html new file mode 100644 index 0000000000..e2c6ff4711 --- /dev/null +++ b/1.2.17/docs/examples/example-example83/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example83 + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example83/manifest.json b/1.2.17/docs/examples/example-example83/manifest.json new file mode 100644 index 0000000000..b747b61a21 --- /dev/null +++ b/1.2.17/docs/examples/example-example83/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example83", + "files": [ + "index-production.html", + "script.js", + "my-customer-plus-vojta.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example83/my-customer-plus-vojta.html b/1.2.17/docs/examples/example-example83/my-customer-plus-vojta.html new file mode 100644 index 0000000000..51a938b478 --- /dev/null +++ b/1.2.17/docs/examples/example-example83/my-customer-plus-vojta.html @@ -0,0 +1,3 @@ + Name: {{customerInfo.name}} Address: {{customerInfo.address}} +
+ Name: {{vojta.name}} Address: {{vojta.address}} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example83/script.js b/1.2.17/docs/examples/example-example83/script.js new file mode 100644 index 0000000000..f2ee3ce9c6 --- /dev/null +++ b/1.2.17/docs/examples/example-example83/script.js @@ -0,0 +1,15 @@ + angular.module('docsIsolationExample', []) + .controller('Controller', ['$scope', function($scope) { + $scope.naomi = { name: 'Naomi', address: '1600 Amphitheatre' }; + + $scope.vojta = { name: 'Vojta', address: '3456 Somewhere Else' }; + }]) + .directive('myCustomer', function() { + return { + restrict: 'E', + scope: { + customerInfo: '=info' + }, + templateUrl: 'my-customer-plus-vojta.html' + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example84/index-debug.html b/1.2.17/docs/examples/example-example84/index-debug.html new file mode 100644 index 0000000000..3ab975fb7d --- /dev/null +++ b/1.2.17/docs/examples/example-example84/index-debug.html @@ -0,0 +1,20 @@ + + + + + Example - example-example84-debug + + + + + + + + + +
+ Date format:
+ Current time is: +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example84/index-jquery.html b/1.2.17/docs/examples/example-example84/index-jquery.html new file mode 100644 index 0000000000..22c4d14b36 --- /dev/null +++ b/1.2.17/docs/examples/example-example84/index-jquery.html @@ -0,0 +1,21 @@ + + + + + Example - example-example84-jquery + + + + + + + + + + +
+ Date format:
+ Current time is: +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example84/index-production.html b/1.2.17/docs/examples/example-example84/index-production.html new file mode 100644 index 0000000000..658be7db28 --- /dev/null +++ b/1.2.17/docs/examples/example-example84/index-production.html @@ -0,0 +1,20 @@ + + + + + Example - example-example84-production + + + + + + + + + +
+ Date format:
+ Current time is: +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example84/index.html b/1.2.17/docs/examples/example-example84/index.html new file mode 100644 index 0000000000..ef25d5a4df --- /dev/null +++ b/1.2.17/docs/examples/example-example84/index.html @@ -0,0 +1,20 @@ + + + + + Example - example-example84 + + + + + + + + + +
+ Date format:
+ Current time is: +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example84/manifest.json b/1.2.17/docs/examples/example-example84/manifest.json new file mode 100644 index 0000000000..37f6847198 --- /dev/null +++ b/1.2.17/docs/examples/example-example84/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example84", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example84/script.js b/1.2.17/docs/examples/example-example84/script.js new file mode 100644 index 0000000000..3408c950bb --- /dev/null +++ b/1.2.17/docs/examples/example-example84/script.js @@ -0,0 +1,33 @@ + angular.module('docsTimeDirective', []) + .controller('Controller', ['$scope', function($scope) { + $scope.format = 'M/d/yy h:mm:ss a'; + }]) + .directive('myCurrentTime', ['$interval', 'dateFilter', function($interval, dateFilter) { + + function link(scope, element, attrs) { + var format, + timeoutId; + + function updateTime() { + element.text(dateFilter(new Date(), format)); + } + + scope.$watch(attrs.myCurrentTime, function(value) { + format = value; + updateTime(); + }); + + element.on('$destroy', function() { + $interval.cancel(timeoutId); + }); + + // start the UI update process; save the timeoutId for canceling + timeoutId = $interval(function() { + updateTime(); // update DOM + }, 1000); + } + + return { + link: link + }; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example85/index-debug.html b/1.2.17/docs/examples/example-example85/index-debug.html new file mode 100644 index 0000000000..e8cfa5ca2f --- /dev/null +++ b/1.2.17/docs/examples/example-example85/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example85-debug + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example85/index-jquery.html b/1.2.17/docs/examples/example-example85/index-jquery.html new file mode 100644 index 0000000000..cbf570a614 --- /dev/null +++ b/1.2.17/docs/examples/example-example85/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example85-jquery + + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example85/index-production.html b/1.2.17/docs/examples/example-example85/index-production.html new file mode 100644 index 0000000000..4f294938eb --- /dev/null +++ b/1.2.17/docs/examples/example-example85/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example85-production + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example85/index.html b/1.2.17/docs/examples/example-example85/index.html new file mode 100644 index 0000000000..2bce9f4cd8 --- /dev/null +++ b/1.2.17/docs/examples/example-example85/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example85 + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example85/manifest.json b/1.2.17/docs/examples/example-example85/manifest.json new file mode 100644 index 0000000000..b949ece937 --- /dev/null +++ b/1.2.17/docs/examples/example-example85/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example85", + "files": [ + "index-production.html", + "script.js", + "my-dialog.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example85/my-dialog.html b/1.2.17/docs/examples/example-example85/my-dialog.html new file mode 100644 index 0000000000..58c4f39c28 --- /dev/null +++ b/1.2.17/docs/examples/example-example85/my-dialog.html @@ -0,0 +1,2 @@ +
+
\ No newline at end of file diff --git a/1.2.17/docs/examples/example-example85/script.js b/1.2.17/docs/examples/example-example85/script.js new file mode 100644 index 0000000000..966f97a434 --- /dev/null +++ b/1.2.17/docs/examples/example-example85/script.js @@ -0,0 +1,11 @@ + angular.module('docsTransclusionDirective', []) + .controller('Controller', ['$scope', function($scope) { + $scope.name = 'Tobias'; + }]) + .directive('myDialog', function() { + return { + restrict: 'E', + transclude: true, + templateUrl: 'my-dialog.html' + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example86/index-debug.html b/1.2.17/docs/examples/example-example86/index-debug.html new file mode 100644 index 0000000000..350d3427b4 --- /dev/null +++ b/1.2.17/docs/examples/example-example86/index-debug.html @@ -0,0 +1,19 @@ + + + + + Example - example-example86-debug + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example86/index-jquery.html b/1.2.17/docs/examples/example-example86/index-jquery.html new file mode 100644 index 0000000000..423b54e2b1 --- /dev/null +++ b/1.2.17/docs/examples/example-example86/index-jquery.html @@ -0,0 +1,20 @@ + + + + + Example - example-example86-jquery + + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example86/index-production.html b/1.2.17/docs/examples/example-example86/index-production.html new file mode 100644 index 0000000000..d1d3e54550 --- /dev/null +++ b/1.2.17/docs/examples/example-example86/index-production.html @@ -0,0 +1,19 @@ + + + + + Example - example-example86-production + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example86/index.html b/1.2.17/docs/examples/example-example86/index.html new file mode 100644 index 0000000000..9af3da0c2a --- /dev/null +++ b/1.2.17/docs/examples/example-example86/index.html @@ -0,0 +1,19 @@ + + + + + Example - example-example86 + + + + + + + + + +
+ Check out the contents, {{name}}! +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example86/manifest.json b/1.2.17/docs/examples/example-example86/manifest.json new file mode 100644 index 0000000000..5e67a3e0eb --- /dev/null +++ b/1.2.17/docs/examples/example-example86/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example86", + "files": [ + "index-production.html", + "script.js", + "my-dialog.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example86/my-dialog.html b/1.2.17/docs/examples/example-example86/my-dialog.html new file mode 100644 index 0000000000..58c4f39c28 --- /dev/null +++ b/1.2.17/docs/examples/example-example86/my-dialog.html @@ -0,0 +1,2 @@ +
+
\ No newline at end of file diff --git a/1.2.17/docs/examples/example-example86/script.js b/1.2.17/docs/examples/example-example86/script.js new file mode 100644 index 0000000000..a73ba663be --- /dev/null +++ b/1.2.17/docs/examples/example-example86/script.js @@ -0,0 +1,15 @@ + angular.module('docsTransclusionExample', []) + .controller('Controller', ['$scope', function($scope) { + $scope.name = 'Tobias'; + }]) + .directive('myDialog', function() { + return { + restrict: 'E', + transclude: true, + scope: {}, + templateUrl: 'my-dialog.html', + link: function (scope, element) { + scope.name = 'Jeff'; + } + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example87/index-debug.html b/1.2.17/docs/examples/example-example87/index-debug.html new file mode 100644 index 0000000000..baa7475bc0 --- /dev/null +++ b/1.2.17/docs/examples/example-example87/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example87-debug + + + + + + + + + +
+ + Check out the contents, {{name}}! + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example87/index-jquery.html b/1.2.17/docs/examples/example-example87/index-jquery.html new file mode 100644 index 0000000000..f47b051e81 --- /dev/null +++ b/1.2.17/docs/examples/example-example87/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example87-jquery + + + + + + + + + + +
+ + Check out the contents, {{name}}! + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example87/index-production.html b/1.2.17/docs/examples/example-example87/index-production.html new file mode 100644 index 0000000000..cf757932bf --- /dev/null +++ b/1.2.17/docs/examples/example-example87/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example87-production + + + + + + + + + +
+ + Check out the contents, {{name}}! + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example87/index.html b/1.2.17/docs/examples/example-example87/index.html new file mode 100644 index 0000000000..a6060ca7c9 --- /dev/null +++ b/1.2.17/docs/examples/example-example87/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example87 + + + + + + + + + +
+ + Check out the contents, {{name}}! + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example87/manifest.json b/1.2.17/docs/examples/example-example87/manifest.json new file mode 100644 index 0000000000..38ada8babb --- /dev/null +++ b/1.2.17/docs/examples/example-example87/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example87", + "files": [ + "index-production.html", + "script.js", + "my-dialog-close.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example87/my-dialog-close.html b/1.2.17/docs/examples/example-example87/my-dialog-close.html new file mode 100644 index 0000000000..1d12ba2b8d --- /dev/null +++ b/1.2.17/docs/examples/example-example87/my-dialog-close.html @@ -0,0 +1,4 @@ +
+ × +
+
\ No newline at end of file diff --git a/1.2.17/docs/examples/example-example87/script.js b/1.2.17/docs/examples/example-example87/script.js new file mode 100644 index 0000000000..df71bddfd5 --- /dev/null +++ b/1.2.17/docs/examples/example-example87/script.js @@ -0,0 +1,20 @@ + angular.module('docsIsoFnBindExample', []) + .controller('Controller', ['$scope', '$timeout', function($scope, $timeout) { + $scope.name = 'Tobias'; + $scope.hideDialog = function () { + $scope.dialogIsHidden = true; + $timeout(function () { + $scope.dialogIsHidden = false; + }, 2000); + }; + }]) + .directive('myDialog', function() { + return { + restrict: 'E', + transclude: true, + scope: { + 'close': '&onClose' + }, + templateUrl: 'my-dialog-close.html' + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example88/index-debug.html b/1.2.17/docs/examples/example-example88/index-debug.html new file mode 100644 index 0000000000..6dd49f7ce4 --- /dev/null +++ b/1.2.17/docs/examples/example-example88/index-debug.html @@ -0,0 +1,17 @@ + + + + + Example - example-example88-debug + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example88/index-jquery.html b/1.2.17/docs/examples/example-example88/index-jquery.html new file mode 100644 index 0000000000..ee0cb52b74 --- /dev/null +++ b/1.2.17/docs/examples/example-example88/index-jquery.html @@ -0,0 +1,18 @@ + + + + + Example - example-example88-jquery + + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example88/index-production.html b/1.2.17/docs/examples/example-example88/index-production.html new file mode 100644 index 0000000000..338e03fea2 --- /dev/null +++ b/1.2.17/docs/examples/example-example88/index-production.html @@ -0,0 +1,17 @@ + + + + + Example - example-example88-production + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example88/index.html b/1.2.17/docs/examples/example-example88/index.html new file mode 100644 index 0000000000..0757413d0a --- /dev/null +++ b/1.2.17/docs/examples/example-example88/index.html @@ -0,0 +1,17 @@ + + + + + Example - example-example88 + + + + + + + + + + Drag ME + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example88/manifest.json b/1.2.17/docs/examples/example-example88/manifest.json new file mode 100644 index 0000000000..fac28e38e1 --- /dev/null +++ b/1.2.17/docs/examples/example-example88/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example88", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example88/script.js b/1.2.17/docs/examples/example-example88/script.js new file mode 100644 index 0000000000..7aa2c6f916 --- /dev/null +++ b/1.2.17/docs/examples/example-example88/script.js @@ -0,0 +1,36 @@ + angular.module('dragModule', []) + .directive('myDraggable', ['$document', function($document) { + return function(scope, element, attr) { + var startX = 0, startY = 0, x = 0, y = 0; + + element.css({ + position: 'relative', + border: '1px solid red', + backgroundColor: 'lightgrey', + cursor: 'pointer' + }); + + element.on('mousedown', function(event) { + // Prevent default dragging of selected content + event.preventDefault(); + startX = event.pageX - x; + startY = event.pageY - y; + $document.on('mousemove', mousemove); + $document.on('mouseup', mouseup); + }); + + function mousemove(event) { + y = event.pageY - startY; + x = event.pageX - startX; + element.css({ + top: y + 'px', + left: x + 'px' + }); + } + + function mouseup() { + $document.unbind('mousemove', mousemove); + $document.unbind('mouseup', mouseup); + } + }; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example89/index-debug.html b/1.2.17/docs/examples/example-example89/index-debug.html new file mode 100644 index 0000000000..c30a3b6afd --- /dev/null +++ b/1.2.17/docs/examples/example-example89/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-example89-debug + + + + + + + + + + + +

Hello

+

Lorem ipsum dolor sit amet

+
+ +

World

+ Mauris elementum elementum enim at suscipit. +

counter: {{i || 0}}

+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example89/index-jquery.html b/1.2.17/docs/examples/example-example89/index-jquery.html new file mode 100644 index 0000000000..7051bc49f7 --- /dev/null +++ b/1.2.17/docs/examples/example-example89/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-example89-jquery + + + + + + + + + + + + +

Hello

+

Lorem ipsum dolor sit amet

+
+ +

World

+ Mauris elementum elementum enim at suscipit. +

counter: {{i || 0}}

+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example89/index-production.html b/1.2.17/docs/examples/example-example89/index-production.html new file mode 100644 index 0000000000..7bcff8f9c0 --- /dev/null +++ b/1.2.17/docs/examples/example-example89/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-example89-production + + + + + + + + + + + +

Hello

+

Lorem ipsum dolor sit amet

+
+ +

World

+ Mauris elementum elementum enim at suscipit. +

counter: {{i || 0}}

+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example89/index.html b/1.2.17/docs/examples/example-example89/index.html new file mode 100644 index 0000000000..0e9cef2366 --- /dev/null +++ b/1.2.17/docs/examples/example-example89/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-example89 + + + + + + + + + + + +

Hello

+

Lorem ipsum dolor sit amet

+
+ +

World

+ Mauris elementum elementum enim at suscipit. +

counter: {{i || 0}}

+
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example89/manifest.json b/1.2.17/docs/examples/example-example89/manifest.json new file mode 100644 index 0000000000..eed94e7dc7 --- /dev/null +++ b/1.2.17/docs/examples/example-example89/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "example-example89", + "files": [ + "index-production.html", + "script.js", + "my-tabs.html", + "my-pane.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example89/my-pane.html b/1.2.17/docs/examples/example-example89/my-pane.html new file mode 100644 index 0000000000..1e74f5dc12 --- /dev/null +++ b/1.2.17/docs/examples/example-example89/my-pane.html @@ -0,0 +1,2 @@ +
+
\ No newline at end of file diff --git a/1.2.17/docs/examples/example-example89/my-tabs.html b/1.2.17/docs/examples/example-example89/my-tabs.html new file mode 100644 index 0000000000..d14f733e64 --- /dev/null +++ b/1.2.17/docs/examples/example-example89/my-tabs.html @@ -0,0 +1,8 @@ +
+ +
+
\ No newline at end of file diff --git a/1.2.17/docs/examples/example-example89/script.js b/1.2.17/docs/examples/example-example89/script.js new file mode 100644 index 0000000000..8c959bbfc8 --- /dev/null +++ b/1.2.17/docs/examples/example-example89/script.js @@ -0,0 +1,40 @@ + angular.module('docsTabsExample', []) + .directive('myTabs', function() { + return { + restrict: 'E', + transclude: true, + scope: {}, + controller: function($scope) { + var panes = $scope.panes = []; + + $scope.select = function(pane) { + angular.forEach(panes, function(pane) { + pane.selected = false; + }); + pane.selected = true; + }; + + this.addPane = function(pane) { + if (panes.length === 0) { + $scope.select(pane); + } + panes.push(pane); + }; + }, + templateUrl: 'my-tabs.html' + }; + }) + .directive('myPane', function() { + return { + require: '^myTabs', + restrict: 'E', + transclude: true, + scope: { + title: '@' + }, + link: function(scope, element, attrs, tabsCtrl) { + tabsCtrl.addPane(scope); + }, + templateUrl: 'my-pane.html' + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example9/index-debug.html b/1.2.17/docs/examples/example-example9/index-debug.html new file mode 100644 index 0000000000..21675f75b4 --- /dev/null +++ b/1.2.17/docs/examples/example-example9/index-debug.html @@ -0,0 +1,20 @@ + + + + + Example - example-example9-debug + + + + + + + + + Check me to select:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example9/index-jquery.html b/1.2.17/docs/examples/example-example9/index-jquery.html new file mode 100644 index 0000000000..9b6daad84f --- /dev/null +++ b/1.2.17/docs/examples/example-example9/index-jquery.html @@ -0,0 +1,21 @@ + + + + + Example - example-example9-jquery + + + + + + + + + + Check me to select:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example9/index-production.html b/1.2.17/docs/examples/example-example9/index-production.html new file mode 100644 index 0000000000..a08297a9ad --- /dev/null +++ b/1.2.17/docs/examples/example-example9/index-production.html @@ -0,0 +1,20 @@ + + + + + Example - example-example9-production + + + + + + + + + Check me to select:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example9/index.html b/1.2.17/docs/examples/example-example9/index.html new file mode 100644 index 0000000000..74a734512e --- /dev/null +++ b/1.2.17/docs/examples/example-example9/index.html @@ -0,0 +1,20 @@ + + + + + Example - example-example9 + + + + + + + + + Check me to select:
+ + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example9/manifest.json b/1.2.17/docs/examples/example-example9/manifest.json new file mode 100644 index 0000000000..3cb447e2b1 --- /dev/null +++ b/1.2.17/docs/examples/example-example9/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example9", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example9/protractor.js b/1.2.17/docs/examples/example-example9/protractor.js new file mode 100644 index 0000000000..e51846f4a6 --- /dev/null +++ b/1.2.17/docs/examples/example-example9/protractor.js @@ -0,0 +1,5 @@ + it('should select Greetings!', function() { + expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy(); + element(by.model('selected')).click(); + expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy(); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example90/index-debug.html b/1.2.17/docs/examples/example-example90/index-debug.html new file mode 100644 index 0000000000..2b3126e683 --- /dev/null +++ b/1.2.17/docs/examples/example-example90/index-debug.html @@ -0,0 +1,16 @@ + + + + + Example - example-example90-debug + + + + + + + + + 1+2={{1+2}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example90/index-jquery.html b/1.2.17/docs/examples/example-example90/index-jquery.html new file mode 100644 index 0000000000..0ea435a549 --- /dev/null +++ b/1.2.17/docs/examples/example-example90/index-jquery.html @@ -0,0 +1,17 @@ + + + + + Example - example-example90-jquery + + + + + + + + + + 1+2={{1+2}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example90/index-production.html b/1.2.17/docs/examples/example-example90/index-production.html new file mode 100644 index 0000000000..7e1f638d3d --- /dev/null +++ b/1.2.17/docs/examples/example-example90/index-production.html @@ -0,0 +1,16 @@ + + + + + Example - example-example90-production + + + + + + + + + 1+2={{1+2}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example90/index.html b/1.2.17/docs/examples/example-example90/index.html new file mode 100644 index 0000000000..d9b1bb2fcb --- /dev/null +++ b/1.2.17/docs/examples/example-example90/index.html @@ -0,0 +1,16 @@ + + + + + Example - example-example90 + + + + + + + + + 1+2={{1+2}} + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example90/manifest.json b/1.2.17/docs/examples/example-example90/manifest.json new file mode 100644 index 0000000000..67f2927674 --- /dev/null +++ b/1.2.17/docs/examples/example-example90/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example90", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example90/protractor.js b/1.2.17/docs/examples/example-example90/protractor.js new file mode 100644 index 0000000000..3e639c677f --- /dev/null +++ b/1.2.17/docs/examples/example-example90/protractor.js @@ -0,0 +1,3 @@ + it('should calculate expression in binding', function() { + expect(element(by.binding('1+2')).getText()).toEqual('1+2=3'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example91/index-debug.html b/1.2.17/docs/examples/example-example91/index-debug.html new file mode 100644 index 0000000000..690eb5619d --- /dev/null +++ b/1.2.17/docs/examples/example-example91/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-example91-debug + + + + + + + + + +
+ Expression: + + +
    +
  • + [ X ] + {{expr}} => +
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example91/index-jquery.html b/1.2.17/docs/examples/example-example91/index-jquery.html new file mode 100644 index 0000000000..35588bdb37 --- /dev/null +++ b/1.2.17/docs/examples/example-example91/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-example91-jquery + + + + + + + + + + +
+ Expression: + + +
    +
  • + [ X ] + {{expr}} => +
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example91/index-production.html b/1.2.17/docs/examples/example-example91/index-production.html new file mode 100644 index 0000000000..165797bd5f --- /dev/null +++ b/1.2.17/docs/examples/example-example91/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-example91-production + + + + + + + + + +
+ Expression: + + +
    +
  • + [ X ] + {{expr}} => +
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example91/index.html b/1.2.17/docs/examples/example-example91/index.html new file mode 100644 index 0000000000..d1412a908e --- /dev/null +++ b/1.2.17/docs/examples/example-example91/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-example91 + + + + + + + + + +
+ Expression: + + +
    +
  • + [ X ] + {{expr}} => +
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example91/manifest.json b/1.2.17/docs/examples/example-example91/manifest.json new file mode 100644 index 0000000000..671aa1e4ce --- /dev/null +++ b/1.2.17/docs/examples/example-example91/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example91", + "files": [ + "index-production.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example91/protractor.js b/1.2.17/docs/examples/example-example91/protractor.js new file mode 100644 index 0000000000..b56b5439ed --- /dev/null +++ b/1.2.17/docs/examples/example-example91/protractor.js @@ -0,0 +1,6 @@ + it('should allow user expression testing', function() { + element(by.css('.expressions button')).click(); + var lis = element(by.css('.expressions ul')).element.all(by.repeater('expr in exprs')); + expect(lis.count()).toBe(1); + expect(lis.get(0).getText()).toEqual('[ X ] 3*10|currency => $30.00'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example91/script.js b/1.2.17/docs/examples/example-example91/script.js new file mode 100644 index 0000000000..098b6ce067 --- /dev/null +++ b/1.2.17/docs/examples/example-example91/script.js @@ -0,0 +1,11 @@ + function Cntl2($scope) { + var exprs = $scope.exprs = []; + $scope.expr = '3*10|currency'; + $scope.addExp = function(expr) { + exprs.push(expr); + }; + + $scope.removeExp = function(index) { + exprs.splice(index, 1); + }; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example92/index-debug.html b/1.2.17/docs/examples/example-example92/index-debug.html new file mode 100644 index 0000000000..6d05f2867f --- /dev/null +++ b/1.2.17/docs/examples/example-example92/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example92-debug + + + + + + + + + +
+ Name: + + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example92/index-jquery.html b/1.2.17/docs/examples/example-example92/index-jquery.html new file mode 100644 index 0000000000..54ff16a542 --- /dev/null +++ b/1.2.17/docs/examples/example-example92/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example92-jquery + + + + + + + + + + +
+ Name: + + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example92/index-production.html b/1.2.17/docs/examples/example-example92/index-production.html new file mode 100644 index 0000000000..f58204eeb4 --- /dev/null +++ b/1.2.17/docs/examples/example-example92/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example92-production + + + + + + + + + +
+ Name: + + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example92/index.html b/1.2.17/docs/examples/example-example92/index.html new file mode 100644 index 0000000000..c7d450e94e --- /dev/null +++ b/1.2.17/docs/examples/example-example92/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example92 + + + + + + + + + +
+ Name: + + +
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example92/manifest.json b/1.2.17/docs/examples/example-example92/manifest.json new file mode 100644 index 0000000000..4d4a94b196 --- /dev/null +++ b/1.2.17/docs/examples/example-example92/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-example92", + "files": [ + "index-production.html", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example92/protractor.js b/1.2.17/docs/examples/example-example92/protractor.js new file mode 100644 index 0000000000..8c58cbe69f --- /dev/null +++ b/1.2.17/docs/examples/example-example92/protractor.js @@ -0,0 +1,13 @@ + it('should calculate expression in binding', function() { + if (browser.params.browser == 'safari') { + // Safari can't handle dialogs. + return; + } + element(by.css('[ng-click="greet()"]')).click(); + + var alertDialog = browser.switchTo().alert(); + + expect(alertDialog.getText()).toEqual('Hello World'); + + alertDialog.accept(); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example92/script.js b/1.2.17/docs/examples/example-example92/script.js new file mode 100644 index 0000000000..84f2c6bb1b --- /dev/null +++ b/1.2.17/docs/examples/example-example92/script.js @@ -0,0 +1,7 @@ + function Cntl1($window, $scope){ + $scope.name = 'World'; + + $scope.greet = function() { + $window.alert('Hello ' + $scope.name); + }; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example93/index-debug.html b/1.2.17/docs/examples/example-example93/index-debug.html new file mode 100644 index 0000000000..c5e5f6c9d6 --- /dev/null +++ b/1.2.17/docs/examples/example-example93/index-debug.html @@ -0,0 +1,21 @@ + + + + + Example - example-example93-debug + + + + + + + + + +
+ +

$event:

 {{$event | json}}

+

clickEvent:

{{clickEvent | json}}

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example93/index-jquery.html b/1.2.17/docs/examples/example-example93/index-jquery.html new file mode 100644 index 0000000000..9714cbbca4 --- /dev/null +++ b/1.2.17/docs/examples/example-example93/index-jquery.html @@ -0,0 +1,22 @@ + + + + + Example - example-example93-jquery + + + + + + + + + + +
+ +

$event:

 {{$event | json}}

+

clickEvent:

{{clickEvent | json}}

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example93/index-production.html b/1.2.17/docs/examples/example-example93/index-production.html new file mode 100644 index 0000000000..ea51def9fb --- /dev/null +++ b/1.2.17/docs/examples/example-example93/index-production.html @@ -0,0 +1,21 @@ + + + + + Example - example-example93-production + + + + + + + + + +
+ +

$event:

 {{$event | json}}

+

clickEvent:

{{clickEvent | json}}

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example93/index.html b/1.2.17/docs/examples/example-example93/index.html new file mode 100644 index 0000000000..8a86e1814d --- /dev/null +++ b/1.2.17/docs/examples/example-example93/index.html @@ -0,0 +1,21 @@ + + + + + Example - example-example93 + + + + + + + + + +
+ +

$event:

 {{$event | json}}

+

clickEvent:

{{clickEvent | json}}

+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example93/manifest.json b/1.2.17/docs/examples/example-example93/manifest.json new file mode 100644 index 0000000000..8c3a889a59 --- /dev/null +++ b/1.2.17/docs/examples/example-example93/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example93", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example93/script.js b/1.2.17/docs/examples/example-example93/script.js new file mode 100644 index 0000000000..62a9590de2 --- /dev/null +++ b/1.2.17/docs/examples/example-example93/script.js @@ -0,0 +1,21 @@ + angular.module('eventExampleApp', []). + controller('EventController', ['$scope', function($scope) { + /* + * expose the event object to the scope + */ + $scope.clickMe = function(clickEvent) { + $scope.clickEvent = simpleKeys(clickEvent); + console.log(clickEvent); + }; + + /* + * return a copy of an object with only non-object keys + * we need this to avoid circular references + */ + function simpleKeys (original) { + return Object.keys(original).reduce(function (obj, key) { + obj[key] = typeof original[key] === 'object' ? '{ ... }' : original[key]; + return obj; + }, {}); + } + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example94/index-debug.html b/1.2.17/docs/examples/example-example94/index-debug.html new file mode 100644 index 0000000000..cbdd0ffd2b --- /dev/null +++ b/1.2.17/docs/examples/example-example94/index-debug.html @@ -0,0 +1,26 @@ + + + + + Example - example-example94-debug + + + + + + + + + +
+
+ All entries: + {{entry.name}} +
+
+ Entries that contain an "a": + {{entry.name}} +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example94/index-jquery.html b/1.2.17/docs/examples/example-example94/index-jquery.html new file mode 100644 index 0000000000..4744d956ff --- /dev/null +++ b/1.2.17/docs/examples/example-example94/index-jquery.html @@ -0,0 +1,27 @@ + + + + + Example - example-example94-jquery + + + + + + + + + + +
+
+ All entries: + {{entry.name}} +
+
+ Entries that contain an "a": + {{entry.name}} +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example94/index-production.html b/1.2.17/docs/examples/example-example94/index-production.html new file mode 100644 index 0000000000..8347625e9b --- /dev/null +++ b/1.2.17/docs/examples/example-example94/index-production.html @@ -0,0 +1,26 @@ + + + + + Example - example-example94-production + + + + + + + + + +
+
+ All entries: + {{entry.name}} +
+
+ Entries that contain an "a": + {{entry.name}} +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example94/index.html b/1.2.17/docs/examples/example-example94/index.html new file mode 100644 index 0000000000..06b33560ff --- /dev/null +++ b/1.2.17/docs/examples/example-example94/index.html @@ -0,0 +1,26 @@ + + + + + Example - example-example94 + + + + + + + + + +
+
+ All entries: + {{entry.name}} +
+
+ Entries that contain an "a": + {{entry.name}} +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example94/manifest.json b/1.2.17/docs/examples/example-example94/manifest.json new file mode 100644 index 0000000000..606492f417 --- /dev/null +++ b/1.2.17/docs/examples/example-example94/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example94", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example94/script.js b/1.2.17/docs/examples/example-example94/script.js new file mode 100644 index 0000000000..7a28c9b184 --- /dev/null +++ b/1.2.17/docs/examples/example-example94/script.js @@ -0,0 +1,12 @@ + angular.module('FilterInControllerModule', []). + controller('FilterController', ['filterFilter', function(filterFilter) { + this.array = [ + {name: 'Tobias'}, + {name: 'Jeff'}, + {name: 'Brian'}, + {name: 'Igor'}, + {name: 'James'}, + {name: 'Brad'} + ]; + this.filteredArray = filterFilter(this.array, 'a'); + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example95/index-debug.html b/1.2.17/docs/examples/example-example95/index-debug.html new file mode 100644 index 0000000000..fee4a381cc --- /dev/null +++ b/1.2.17/docs/examples/example-example95/index-debug.html @@ -0,0 +1,22 @@ + + + + + Example - example-example95-debug + + + + + + + + + +
+
+ No filter: {{greeting}}
+ Reverse: {{greeting|reverse}}
+ Reverse + uppercase: {{greeting|reverse:true}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example95/index-jquery.html b/1.2.17/docs/examples/example-example95/index-jquery.html new file mode 100644 index 0000000000..fee505bad8 --- /dev/null +++ b/1.2.17/docs/examples/example-example95/index-jquery.html @@ -0,0 +1,23 @@ + + + + + Example - example-example95-jquery + + + + + + + + + + +
+
+ No filter: {{greeting}}
+ Reverse: {{greeting|reverse}}
+ Reverse + uppercase: {{greeting|reverse:true}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example95/index-production.html b/1.2.17/docs/examples/example-example95/index-production.html new file mode 100644 index 0000000000..bee548e31e --- /dev/null +++ b/1.2.17/docs/examples/example-example95/index-production.html @@ -0,0 +1,22 @@ + + + + + Example - example-example95-production + + + + + + + + + +
+
+ No filter: {{greeting}}
+ Reverse: {{greeting|reverse}}
+ Reverse + uppercase: {{greeting|reverse:true}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example95/index.html b/1.2.17/docs/examples/example-example95/index.html new file mode 100644 index 0000000000..a0e1287580 --- /dev/null +++ b/1.2.17/docs/examples/example-example95/index.html @@ -0,0 +1,22 @@ + + + + + Example - example-example95 + + + + + + + + + +
+
+ No filter: {{greeting}}
+ Reverse: {{greeting|reverse}}
+ Reverse + uppercase: {{greeting|reverse:true}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example95/manifest.json b/1.2.17/docs/examples/example-example95/manifest.json new file mode 100644 index 0000000000..8e6f75afaf --- /dev/null +++ b/1.2.17/docs/examples/example-example95/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example95", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example95/script.js b/1.2.17/docs/examples/example-example95/script.js new file mode 100644 index 0000000000..51f2c7be94 --- /dev/null +++ b/1.2.17/docs/examples/example-example95/script.js @@ -0,0 +1,18 @@ + angular.module('myReverseModule', []) + .filter('reverse', function() { + return function(input, uppercase) { + input = input || ''; + var out = ""; + for (var i = 0; i < input.length; i++) { + out = input.charAt(i) + out; + } + // conditional based on optional argument + if (uppercase) { + out = out.toUpperCase(); + } + return out; + }; + }) + .controller('Controller', ['$scope', function($scope) { + $scope.greeting = 'hello'; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example96/index-debug.html b/1.2.17/docs/examples/example-example96/index-debug.html new file mode 100644 index 0000000000..84cdd77246 --- /dev/null +++ b/1.2.17/docs/examples/example-example96/index-debug.html @@ -0,0 +1,43 @@ + + + + + Example - example-example96-debug + + + + + + + + +
+
+ Name:
+ E-mail:
+ Gender: male + female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example96/index-jquery.html b/1.2.17/docs/examples/example-example96/index-jquery.html new file mode 100644 index 0000000000..0b42b4e9ec --- /dev/null +++ b/1.2.17/docs/examples/example-example96/index-jquery.html @@ -0,0 +1,44 @@ + + + + + Example - example-example96-jquery + + + + + + + + + +
+
+ Name:
+ E-mail:
+ Gender: male + female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example96/index-production.html b/1.2.17/docs/examples/example-example96/index-production.html new file mode 100644 index 0000000000..57c232cb20 --- /dev/null +++ b/1.2.17/docs/examples/example-example96/index-production.html @@ -0,0 +1,43 @@ + + + + + Example - example-example96-production + + + + + + + + +
+
+ Name:
+ E-mail:
+ Gender: male + female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example96/index.html b/1.2.17/docs/examples/example-example96/index.html new file mode 100644 index 0000000000..b7d755a63a --- /dev/null +++ b/1.2.17/docs/examples/example-example96/index.html @@ -0,0 +1,43 @@ + + + + + Example - example-example96 + + + + + + + + +
+
+ Name:
+ E-mail:
+ Gender: male + female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example96/manifest.json b/1.2.17/docs/examples/example-example96/manifest.json new file mode 100644 index 0000000000..154f07a8ce --- /dev/null +++ b/1.2.17/docs/examples/example-example96/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example96", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example97/index-debug.html b/1.2.17/docs/examples/example-example97/index-debug.html new file mode 100644 index 0000000000..5b6405dbb4 --- /dev/null +++ b/1.2.17/docs/examples/example-example97/index-debug.html @@ -0,0 +1,52 @@ + + + + + Example - example-example97-debug + + + + + + + + +
+
+ Name: +
+ E-mail:
+ Gender: male + female
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example97/index-jquery.html b/1.2.17/docs/examples/example-example97/index-jquery.html new file mode 100644 index 0000000000..a07aa1fda3 --- /dev/null +++ b/1.2.17/docs/examples/example-example97/index-jquery.html @@ -0,0 +1,53 @@ + + + + + Example - example-example97-jquery + + + + + + + + + +
+
+ Name: +
+ E-mail:
+ Gender: male + female
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example97/index-production.html b/1.2.17/docs/examples/example-example97/index-production.html new file mode 100644 index 0000000000..b9df488bb1 --- /dev/null +++ b/1.2.17/docs/examples/example-example97/index-production.html @@ -0,0 +1,52 @@ + + + + + Example - example-example97-production + + + + + + + + +
+
+ Name: +
+ E-mail:
+ Gender: male + female
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example97/index.html b/1.2.17/docs/examples/example-example97/index.html new file mode 100644 index 0000000000..3ab380ff64 --- /dev/null +++ b/1.2.17/docs/examples/example-example97/index.html @@ -0,0 +1,52 @@ + + + + + Example - example-example97 + + + + + + + + +
+
+ Name: +
+ E-mail:
+ Gender: male + female
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example97/manifest.json b/1.2.17/docs/examples/example-example97/manifest.json new file mode 100644 index 0000000000..59d2c60b56 --- /dev/null +++ b/1.2.17/docs/examples/example-example97/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-example97", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example98/index-debug.html b/1.2.17/docs/examples/example-example98/index-debug.html new file mode 100644 index 0000000000..fdc2eac3c0 --- /dev/null +++ b/1.2.17/docs/examples/example-example98/index-debug.html @@ -0,0 +1,40 @@ + + + + + Example - example-example98-debug + + + + + + + + + +
+
+ Name: +
+ E-mail: +
+
Invalid: + Tell us your email. + This is not a valid email. +
+ + Gender: male + female
+ + + I agree:
+
Please agree and sign.
+ + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example98/index-jquery.html b/1.2.17/docs/examples/example-example98/index-jquery.html new file mode 100644 index 0000000000..b5a25aea39 --- /dev/null +++ b/1.2.17/docs/examples/example-example98/index-jquery.html @@ -0,0 +1,41 @@ + + + + + Example - example-example98-jquery + + + + + + + + + + +
+
+ Name: +
+ E-mail: +
+
Invalid: + Tell us your email. + This is not a valid email. +
+ + Gender: male + female
+ + + I agree:
+
Please agree and sign.
+ + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example98/index-production.html b/1.2.17/docs/examples/example-example98/index-production.html new file mode 100644 index 0000000000..e11b897be0 --- /dev/null +++ b/1.2.17/docs/examples/example-example98/index-production.html @@ -0,0 +1,40 @@ + + + + + Example - example-example98-production + + + + + + + + + +
+
+ Name: +
+ E-mail: +
+
Invalid: + Tell us your email. + This is not a valid email. +
+ + Gender: male + female
+ + + I agree:
+
Please agree and sign.
+ + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example98/index.html b/1.2.17/docs/examples/example-example98/index.html new file mode 100644 index 0000000000..41e46ce270 --- /dev/null +++ b/1.2.17/docs/examples/example-example98/index.html @@ -0,0 +1,40 @@ + + + + + Example - example-example98 + + + + + + + + + +
+
+ Name: +
+ E-mail: +
+
Invalid: + Tell us your email. + This is not a valid email. +
+ + Gender: male + female
+ + + I agree:
+
Please agree and sign.
+ + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example98/manifest.json b/1.2.17/docs/examples/example-example98/manifest.json new file mode 100644 index 0000000000..dc90892fd3 --- /dev/null +++ b/1.2.17/docs/examples/example-example98/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example98", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example98/script.js b/1.2.17/docs/examples/example-example98/script.js new file mode 100644 index 0000000000..b3047bf9bb --- /dev/null +++ b/1.2.17/docs/examples/example-example98/script.js @@ -0,0 +1,17 @@ + function Controller($scope) { + $scope.master = {}; + + $scope.update = function(user) { + $scope.master = angular.copy(user); + }; + + $scope.reset = function() { + $scope.user = angular.copy($scope.master); + }; + + $scope.isUnchanged = function(user) { + return angular.equals(user, $scope.master); + }; + + $scope.reset(); + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example99/index-debug.html b/1.2.17/docs/examples/example-example99/index-debug.html new file mode 100644 index 0000000000..3928f28c04 --- /dev/null +++ b/1.2.17/docs/examples/example-example99/index-debug.html @@ -0,0 +1,34 @@ + + + + + Example - example-example99-debug + + + + + + + + + +
+
+ Size (integer 0 - 10): + {{size}}
+ This is not valid integer! + + The value must be in range 0 to 10! +
+ +
+ Length (float): + + {{length}}
+ + This is not a valid float number! +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example99/index-jquery.html b/1.2.17/docs/examples/example-example99/index-jquery.html new file mode 100644 index 0000000000..f41bfe1e4b --- /dev/null +++ b/1.2.17/docs/examples/example-example99/index-jquery.html @@ -0,0 +1,35 @@ + + + + + Example - example-example99-jquery + + + + + + + + + + +
+
+ Size (integer 0 - 10): + {{size}}
+ This is not valid integer! + + The value must be in range 0 to 10! +
+ +
+ Length (float): + + {{length}}
+ + This is not a valid float number! +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example99/index-production.html b/1.2.17/docs/examples/example-example99/index-production.html new file mode 100644 index 0000000000..d29ea9cdf2 --- /dev/null +++ b/1.2.17/docs/examples/example-example99/index-production.html @@ -0,0 +1,34 @@ + + + + + Example - example-example99-production + + + + + + + + + +
+
+ Size (integer 0 - 10): + {{size}}
+ This is not valid integer! + + The value must be in range 0 to 10! +
+ +
+ Length (float): + + {{length}}
+ + This is not a valid float number! +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example99/index.html b/1.2.17/docs/examples/example-example99/index.html new file mode 100644 index 0000000000..4715f72a50 --- /dev/null +++ b/1.2.17/docs/examples/example-example99/index.html @@ -0,0 +1,34 @@ + + + + + Example - example-example99 + + + + + + + + + +
+
+ Size (integer 0 - 10): + {{size}}
+ This is not valid integer! + + The value must be in range 0 to 10! +
+ +
+ Length (float): + + {{length}}
+ + This is not a valid float number! +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example99/manifest.json b/1.2.17/docs/examples/example-example99/manifest.json new file mode 100644 index 0000000000..14b77e36de --- /dev/null +++ b/1.2.17/docs/examples/example-example99/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-example99", + "files": [ + "index-production.html", + "script.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-example99/script.js b/1.2.17/docs/examples/example-example99/script.js new file mode 100644 index 0000000000..91a29d63eb --- /dev/null +++ b/1.2.17/docs/examples/example-example99/script.js @@ -0,0 +1,39 @@ + var app = angular.module('form-example1', []); + + var INTEGER_REGEXP = /^\-?\d+$/; + app.directive('integer', function() { + return { + require: 'ngModel', + link: function(scope, elm, attrs, ctrl) { + ctrl.$parsers.unshift(function(viewValue) { + if (INTEGER_REGEXP.test(viewValue)) { + // it is valid + ctrl.$setValidity('integer', true); + return viewValue; + } else { + // it is invalid, return undefined (no model update) + ctrl.$setValidity('integer', false); + return undefined; + } + }); + } + }; + }); + + var FLOAT_REGEXP = /^\-?\d+((\.|\,)\d+)?$/; + app.directive('smartFloat', function() { + return { + require: 'ngModel', + link: function(scope, elm, attrs, ctrl) { + ctrl.$parsers.unshift(function(viewValue) { + if (FLOAT_REGEXP.test(viewValue)) { + ctrl.$setValidity('float', true); + return parseFloat(viewValue.replace(',', '.')); + } else { + ctrl.$setValidity('float', false); + return undefined; + } + }); + } + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-1/index-debug.html b/1.2.17/docs/examples/example-guide-concepts-1/index-debug.html new file mode 100644 index 0000000000..2bedb59e14 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-1/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-guide-concepts-1-debug + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: +
+
+ Total: {{qty * cost | currency}} +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-1/index-jquery.html b/1.2.17/docs/examples/example-guide-concepts-1/index-jquery.html new file mode 100644 index 0000000000..ada9eba94d --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-1/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-guide-concepts-1-jquery + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: +
+
+ Total: {{qty * cost | currency}} +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-1/index-production.html b/1.2.17/docs/examples/example-guide-concepts-1/index-production.html new file mode 100644 index 0000000000..24a9865767 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-1/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-guide-concepts-1-production + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: +
+
+ Total: {{qty * cost | currency}} +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-1/index.html b/1.2.17/docs/examples/example-guide-concepts-1/index.html new file mode 100644 index 0000000000..7163963ce3 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-1/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-guide-concepts-1 + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: +
+
+ Total: {{qty * cost | currency}} +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-1/manifest.json b/1.2.17/docs/examples/example-guide-concepts-1/manifest.json new file mode 100644 index 0000000000..f4c83905a1 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-1/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "example-guide-concepts-1", + "files": [ + "index-production.html" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-2/index-debug.html b/1.2.17/docs/examples/example-guide-concepts-2/index-debug.html new file mode 100644 index 0000000000..287b05e470 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-2/index-debug.html @@ -0,0 +1,35 @@ + + + + + Example - example-guide-concepts-2-debug + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-2/index-jquery.html b/1.2.17/docs/examples/example-guide-concepts-2/index-jquery.html new file mode 100644 index 0000000000..c3ae1c30e5 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-2/index-jquery.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-2-jquery + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-2/index-production.html b/1.2.17/docs/examples/example-guide-concepts-2/index-production.html new file mode 100644 index 0000000000..c749abd830 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-2/index-production.html @@ -0,0 +1,35 @@ + + + + + Example - example-guide-concepts-2-production + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-2/index.html b/1.2.17/docs/examples/example-guide-concepts-2/index.html new file mode 100644 index 0000000000..33786533f8 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-2/index.html @@ -0,0 +1,35 @@ + + + + + Example - example-guide-concepts-2 + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-2/invoice1.js b/1.2.17/docs/examples/example-guide-concepts-2/invoice1.js new file mode 100644 index 0000000000..4d65f22276 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-2/invoice1.js @@ -0,0 +1,22 @@ + angular.module('invoice1', []) + .controller('InvoiceController', function() { + this.qty = 1; + this.cost = 2; + this.inCurr = 'EUR'; + this.currencies = ['USD', 'EUR', 'CNY']; + this.usdToForeignRates = { + USD: 1, + EUR: 0.74, + CNY: 6.09 + }; + + this.total = function total(outCurr) { + return this.convertCurrency(this.qty * this.cost, this.inCurr, outCurr); + }; + this.convertCurrency = function convertCurrency(amount, inCurr, outCurr) { + return amount * this.usdToForeignRates[outCurr] / this.usdToForeignRates[inCurr]; + }; + this.pay = function pay() { + window.alert("Thanks!"); + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-2/manifest.json b/1.2.17/docs/examples/example-guide-concepts-2/manifest.json new file mode 100644 index 0000000000..9c6af114cc --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-2/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-guide-concepts-2", + "files": [ + "index-production.html", + "invoice1.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-21/finance2.js b/1.2.17/docs/examples/example-guide-concepts-21/finance2.js new file mode 100644 index 0000000000..270108aedb --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-21/finance2.js @@ -0,0 +1,17 @@ + angular.module('finance2', []) + .factory('currencyConverter', function() { + var currencies = ['USD', 'EUR', 'CNY']; + var usdToForeignRates = { + USD: 1, + EUR: 0.74, + CNY: 6.09 + }; + var convert = function (amount, inCurr, outCurr) { + return amount * usdToForeignRates[outCurr] / usdToForeignRates[inCurr]; + }; + + return { + currencies: currencies, + convert: convert + }; + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-21/index-debug.html b/1.2.17/docs/examples/example-guide-concepts-21/index-debug.html new file mode 100644 index 0000000000..718a9b64b0 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-21/index-debug.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-21-debug + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-21/index-jquery.html b/1.2.17/docs/examples/example-guide-concepts-21/index-jquery.html new file mode 100644 index 0000000000..6df5c3b1c0 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-21/index-jquery.html @@ -0,0 +1,37 @@ + + + + + Example - example-guide-concepts-21-jquery + + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-21/index-production.html b/1.2.17/docs/examples/example-guide-concepts-21/index-production.html new file mode 100644 index 0000000000..855045ede3 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-21/index-production.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-21-production + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-21/index.html b/1.2.17/docs/examples/example-guide-concepts-21/index.html new file mode 100644 index 0000000000..d856b72571 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-21/index.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-21 + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-21/invoice2.js b/1.2.17/docs/examples/example-guide-concepts-21/invoice2.js new file mode 100644 index 0000000000..77caa7ebf0 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-21/invoice2.js @@ -0,0 +1,14 @@ + angular.module('invoice2', ['finance2']) + .controller('InvoiceController', ['currencyConverter', function(currencyConverter) { + this.qty = 1; + this.cost = 2; + this.inCurr = 'EUR'; + this.currencies = currencyConverter.currencies; + + this.total = function total(outCurr) { + return currencyConverter.convert(this.qty * this.cost, this.inCurr, outCurr); + }; + this.pay = function pay() { + window.alert("Thanks!"); + }; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-21/manifest.json b/1.2.17/docs/examples/example-guide-concepts-21/manifest.json new file mode 100644 index 0000000000..036dcd520a --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-21/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-guide-concepts-21", + "files": [ + "index-production.html", + "finance2.js", + "invoice2.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-3/finance3.js b/1.2.17/docs/examples/example-guide-concepts-3/finance3.js new file mode 100644 index 0000000000..1439aaccf9 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-3/finance3.js @@ -0,0 +1,34 @@ + angular.module('finance3', []) + .factory('currencyConverter', ['$http', function($http) { + var YAHOO_FINANCE_URL_PATTERN = + 'http://query.yahooapis.com/v1/public/yql?q=select * from '+ + 'yahoo.finance.xchange where pair in ("PAIRS")&format=json&'+ + 'env=store://datatables.org/alltableswithkeys&callback=JSON_CALLBACK'; + var currencies = ['USD', 'EUR', 'CNY']; + var usdToForeignRates = {}; + + var convert = function (amount, inCurr, outCurr) { + return amount * usdToForeignRates[outCurr] / usdToForeignRates[inCurr]; + }; + + var refresh = function() { + var url = YAHOO_FINANCE_URL_PATTERN. + replace('PAIRS', 'USD' + currencies.join('","USD')); + return $http.jsonp(url).success(function(data) { + var newUsdToForeignRates = {}; + angular.forEach(data.query.results.rate, function(rate) { + var currency = rate.id.substring(3,6); + newUsdToForeignRates[currency] = window.parseFloat(rate.Rate); + }); + usdToForeignRates = newUsdToForeignRates; + }); + }; + + refresh(); + + return { + currencies: currencies, + convert: convert, + refresh: refresh + }; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-3/index-debug.html b/1.2.17/docs/examples/example-guide-concepts-3/index-debug.html new file mode 100644 index 0000000000..9d778e4610 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-3/index-debug.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-3-debug + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-3/index-jquery.html b/1.2.17/docs/examples/example-guide-concepts-3/index-jquery.html new file mode 100644 index 0000000000..dbeceac9a3 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-3/index-jquery.html @@ -0,0 +1,37 @@ + + + + + Example - example-guide-concepts-3-jquery + + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-3/index-production.html b/1.2.17/docs/examples/example-guide-concepts-3/index-production.html new file mode 100644 index 0000000000..8eaab5f9fe --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-3/index-production.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-3-production + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-3/index.html b/1.2.17/docs/examples/example-guide-concepts-3/index.html new file mode 100644 index 0000000000..6046ff454c --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-3/index.html @@ -0,0 +1,36 @@ + + + + + Example - example-guide-concepts-3 + + + + + + + + + + +
+ Invoice: +
+ Quantity: +
+
+ Costs: + +
+
+ Total: + + {{invoice.total(c) | currency:c}} + + +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-3/invoice3.js b/1.2.17/docs/examples/example-guide-concepts-3/invoice3.js new file mode 100644 index 0000000000..d9b1640be0 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-3/invoice3.js @@ -0,0 +1,14 @@ + angular.module('invoice3', ['finance3']) + .controller('InvoiceController', ['currencyConverter', function(currencyConverter) { + this.qty = 1; + this.cost = 2; + this.inCurr = 'EUR'; + this.currencies = currencyConverter.currencies; + + this.total = function total(outCurr) { + return currencyConverter.convert(this.qty * this.cost, this.inCurr, outCurr); + }; + this.pay = function pay() { + window.alert("Thanks!"); + }; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-guide-concepts-3/manifest.json b/1.2.17/docs/examples/example-guide-concepts-3/manifest.json new file mode 100644 index 0000000000..4581d36108 --- /dev/null +++ b/1.2.17/docs/examples/example-guide-concepts-3/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-guide-concepts-3", + "files": [ + "index-production.html", + "invoice3.js", + "finance3.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-input-directive/index-debug.html b/1.2.17/docs/examples/example-input-directive/index-debug.html new file mode 100644 index 0000000000..15e45489cf --- /dev/null +++ b/1.2.17/docs/examples/example-input-directive/index-debug.html @@ -0,0 +1,43 @@ + + + + + Example - example-input-directive-debug + + + + + + + + + +
+
+ User name: + + Required!
+ Last name: + + Too short! + + Too long!
+
+
+ user = {{user}}
+ myForm.userName.$valid = {{myForm.userName.$valid}}
+ myForm.userName.$error = {{myForm.userName.$error}}
+ myForm.lastName.$valid = {{myForm.lastName.$valid}}
+ myForm.lastName.$error = {{myForm.lastName.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.minlength = {{!!myForm.$error.minlength}}
+ myForm.$error.maxlength = {{!!myForm.$error.maxlength}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-input-directive/index-jquery.html b/1.2.17/docs/examples/example-input-directive/index-jquery.html new file mode 100644 index 0000000000..61bcf816da --- /dev/null +++ b/1.2.17/docs/examples/example-input-directive/index-jquery.html @@ -0,0 +1,44 @@ + + + + + Example - example-input-directive-jquery + + + + + + + + + + +
+
+ User name: + + Required!
+ Last name: + + Too short! + + Too long!
+
+
+ user = {{user}}
+ myForm.userName.$valid = {{myForm.userName.$valid}}
+ myForm.userName.$error = {{myForm.userName.$error}}
+ myForm.lastName.$valid = {{myForm.lastName.$valid}}
+ myForm.lastName.$error = {{myForm.lastName.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.minlength = {{!!myForm.$error.minlength}}
+ myForm.$error.maxlength = {{!!myForm.$error.maxlength}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-input-directive/index-production.html b/1.2.17/docs/examples/example-input-directive/index-production.html new file mode 100644 index 0000000000..bfe0e03942 --- /dev/null +++ b/1.2.17/docs/examples/example-input-directive/index-production.html @@ -0,0 +1,43 @@ + + + + + Example - example-input-directive-production + + + + + + + + + +
+
+ User name: + + Required!
+ Last name: + + Too short! + + Too long!
+
+
+ user = {{user}}
+ myForm.userName.$valid = {{myForm.userName.$valid}}
+ myForm.userName.$error = {{myForm.userName.$error}}
+ myForm.lastName.$valid = {{myForm.lastName.$valid}}
+ myForm.lastName.$error = {{myForm.lastName.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.minlength = {{!!myForm.$error.minlength}}
+ myForm.$error.maxlength = {{!!myForm.$error.maxlength}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-input-directive/index.html b/1.2.17/docs/examples/example-input-directive/index.html new file mode 100644 index 0000000000..bf87b71d16 --- /dev/null +++ b/1.2.17/docs/examples/example-input-directive/index.html @@ -0,0 +1,43 @@ + + + + + Example - example-input-directive + + + + + + + + + +
+
+ User name: + + Required!
+ Last name: + + Too short! + + Too long!
+
+
+ user = {{user}}
+ myForm.userName.$valid = {{myForm.userName.$valid}}
+ myForm.userName.$error = {{myForm.userName.$error}}
+ myForm.lastName.$valid = {{myForm.lastName.$valid}}
+ myForm.lastName.$error = {{myForm.lastName.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.minlength = {{!!myForm.$error.minlength}}
+ myForm.$error.maxlength = {{!!myForm.$error.maxlength}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-input-directive/manifest.json b/1.2.17/docs/examples/example-input-directive/manifest.json new file mode 100644 index 0000000000..b4c6da9122 --- /dev/null +++ b/1.2.17/docs/examples/example-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-input-directive/protractor.js b/1.2.17/docs/examples/example-input-directive/protractor.js new file mode 100644 index 0000000000..f3c5e1694c --- /dev/null +++ b/1.2.17/docs/examples/example-input-directive/protractor.js @@ -0,0 +1,51 @@ + var user = element(by.binding('{{user}}')); + var userNameValid = element(by.binding('myForm.userName.$valid')); + var lastNameValid = element(by.binding('myForm.lastName.$valid')); + var lastNameError = element(by.binding('myForm.lastName.$error')); + var formValid = element(by.binding('myForm.$valid')); + var userNameInput = element(by.model('user.name')); + var userLastInput = element(by.model('user.last')); + + it('should initialize to model', function() { + expect(user.getText()).toContain('{"name":"guest","last":"visitor"}'); + expect(userNameValid.getText()).toContain('true'); + expect(formValid.getText()).toContain('true'); + }); + + it('should be invalid if empty when required', function() { + userNameInput.clear(); + userNameInput.sendKeys(''); + + expect(user.getText()).toContain('{"last":"visitor"}'); + expect(userNameValid.getText()).toContain('false'); + expect(formValid.getText()).toContain('false'); + }); + + it('should be valid if empty when min length is set', function() { + userLastInput.clear(); + userLastInput.sendKeys(''); + + expect(user.getText()).toContain('{"name":"guest","last":""}'); + expect(lastNameValid.getText()).toContain('true'); + expect(formValid.getText()).toContain('true'); + }); + + it('should be invalid if less than required min length', function() { + userLastInput.clear(); + userLastInput.sendKeys('xx'); + + expect(user.getText()).toContain('{"name":"guest"}'); + expect(lastNameValid.getText()).toContain('false'); + expect(lastNameError.getText()).toContain('minlength'); + expect(formValid.getText()).toContain('false'); + }); + + it('should be invalid if longer than max length', function() { + userLastInput.clear(); + userLastInput.sendKeys('some ridiculously long name'); + + expect(user.getText()).toContain('{"name":"guest"}'); + expect(lastNameValid.getText()).toContain('false'); + expect(lastNameError.getText()).toContain('maxlength'); + expect(formValid.getText()).toContain('false'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-multi-bootstrap/controller.js b/1.2.17/docs/examples/example-multi-bootstrap/controller.js new file mode 100644 index 0000000000..5f1ca61d14 --- /dev/null +++ b/1.2.17/docs/examples/example-multi-bootstrap/controller.js @@ -0,0 +1,6 @@ +var app = angular.module('multi-bootstrap', []) + +.controller('BrokenTable', function($scope) { + $scope.headings = ['One', 'Two', 'Three']; + $scope.fillings = [[1, 2, 3], ['A', 'B', 'C'], [7, 8, 9]]; +}); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-multi-bootstrap/index-debug.html b/1.2.17/docs/examples/example-multi-bootstrap/index-debug.html new file mode 100644 index 0000000000..755f137ebc --- /dev/null +++ b/1.2.17/docs/examples/example-multi-bootstrap/index-debug.html @@ -0,0 +1,27 @@ + + + + + Example - example-multi-bootstrap-debug + + + + + + + + + + +
+ + + + + + + +
{{heading}}
{{fill}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-multi-bootstrap/index-jquery.html b/1.2.17/docs/examples/example-multi-bootstrap/index-jquery.html new file mode 100644 index 0000000000..dff567813d --- /dev/null +++ b/1.2.17/docs/examples/example-multi-bootstrap/index-jquery.html @@ -0,0 +1,28 @@ + + + + + Example - example-multi-bootstrap-jquery + + + + + + + + + + + +
+ + + + + + + +
{{heading}}
{{fill}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-multi-bootstrap/index-production.html b/1.2.17/docs/examples/example-multi-bootstrap/index-production.html new file mode 100644 index 0000000000..dac97d2dbb --- /dev/null +++ b/1.2.17/docs/examples/example-multi-bootstrap/index-production.html @@ -0,0 +1,27 @@ + + + + + Example - example-multi-bootstrap-production + + + + + + + + + + +
+ + + + + + + +
{{heading}}
{{fill}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-multi-bootstrap/index.html b/1.2.17/docs/examples/example-multi-bootstrap/index.html new file mode 100644 index 0000000000..94c2bef475 --- /dev/null +++ b/1.2.17/docs/examples/example-multi-bootstrap/index.html @@ -0,0 +1,27 @@ + + + + + Example - example-multi-bootstrap + + + + + + + + + + +
+ + + + + + + +
{{heading}}
{{fill}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-multi-bootstrap/manifest.json b/1.2.17/docs/examples/example-multi-bootstrap/manifest.json new file mode 100644 index 0000000000..b2685b5920 --- /dev/null +++ b/1.2.17/docs/examples/example-multi-bootstrap/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-multi-bootstrap", + "files": [ + "index-production.html", + "controller.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-multi-bootstrap/protractor.js b/1.2.17/docs/examples/example-multi-bootstrap/protractor.js new file mode 100644 index 0000000000..82f9ac81f2 --- /dev/null +++ b/1.2.17/docs/examples/example-multi-bootstrap/protractor.js @@ -0,0 +1,4 @@ +it('should only insert one table cell for each item in $scope.fillings', function() { + expect(element.all(by.css('td')).count()) + .toBe(9); +}); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngChange-directive/index-debug.html b/1.2.17/docs/examples/example-ngChange-directive/index-debug.html new file mode 100644 index 0000000000..fafebe6187 --- /dev/null +++ b/1.2.17/docs/examples/example-ngChange-directive/index-debug.html @@ -0,0 +1,30 @@ + + + + + Example - example-ngChange-directive-debug + + + + + + + + + +
+ + +
+ debug = {{confirmed}}
+ counter = {{counter}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngChange-directive/index-jquery.html b/1.2.17/docs/examples/example-ngChange-directive/index-jquery.html new file mode 100644 index 0000000000..585601d780 --- /dev/null +++ b/1.2.17/docs/examples/example-ngChange-directive/index-jquery.html @@ -0,0 +1,31 @@ + + + + + Example - example-ngChange-directive-jquery + + + + + + + + + + +
+ + +
+ debug = {{confirmed}}
+ counter = {{counter}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngChange-directive/index-production.html b/1.2.17/docs/examples/example-ngChange-directive/index-production.html new file mode 100644 index 0000000000..d55d3aa2f7 --- /dev/null +++ b/1.2.17/docs/examples/example-ngChange-directive/index-production.html @@ -0,0 +1,30 @@ + + + + + Example - example-ngChange-directive-production + + + + + + + + + +
+ + +
+ debug = {{confirmed}}
+ counter = {{counter}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngChange-directive/index.html b/1.2.17/docs/examples/example-ngChange-directive/index.html new file mode 100644 index 0000000000..bc442ce545 --- /dev/null +++ b/1.2.17/docs/examples/example-ngChange-directive/index.html @@ -0,0 +1,30 @@ + + + + + Example - example-ngChange-directive + + + + + + + + + +
+ + +
+ debug = {{confirmed}}
+ counter = {{counter}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngChange-directive/manifest.json b/1.2.17/docs/examples/example-ngChange-directive/manifest.json new file mode 100644 index 0000000000..738d489cdc --- /dev/null +++ b/1.2.17/docs/examples/example-ngChange-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-ngChange-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngChange-directive/protractor.js b/1.2.17/docs/examples/example-ngChange-directive/protractor.js new file mode 100644 index 0000000000..0e8c5f71da --- /dev/null +++ b/1.2.17/docs/examples/example-ngChange-directive/protractor.js @@ -0,0 +1,18 @@ + var counter = element(by.binding('counter')); + var debug = element(by.binding('confirmed')); + + it('should evaluate the expression if changing from view', function() { + expect(counter.getText()).toContain('0'); + + element(by.id('ng-change-example1')).click(); + + expect(counter.getText()).toContain('1'); + expect(debug.getText()).toContain('true'); + }); + + it('should not evaluate the expression if changing from model', function() { + element(by.id('ng-change-example2')).click(); + + expect(counter.getText()).toContain('0'); + expect(debug.getText()).toContain('true'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngController/app.js b/1.2.17/docs/examples/example-ngController/app.js new file mode 100644 index 0000000000..68d454a266 --- /dev/null +++ b/1.2.17/docs/examples/example-ngController/app.js @@ -0,0 +1,24 @@ + function SettingsController2($scope) { + $scope.name = "John Smith"; + $scope.contacts = [ + {type:'phone', value:'408 555 1212'}, + {type:'email', value:'john.smith@example.org'} ]; + + $scope.greet = function() { + alert($scope.name); + }; + + $scope.addContact = function() { + $scope.contacts.push({type:'email', value:'yourname@example.org'}); + }; + + $scope.removeContact = function(contactToRemove) { + var index = $scope.contacts.indexOf(contactToRemove); + $scope.contacts.splice(index, 1); + }; + + $scope.clearContact = function(contact) { + contact.type = 'phone'; + contact.value = ''; + }; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngController/index-debug.html b/1.2.17/docs/examples/example-ngController/index-debug.html new file mode 100644 index 0000000000..9ae8665531 --- /dev/null +++ b/1.2.17/docs/examples/example-ngController/index-debug.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngController-debug + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngController/index-jquery.html b/1.2.17/docs/examples/example-ngController/index-jquery.html new file mode 100644 index 0000000000..8a878cd7dc --- /dev/null +++ b/1.2.17/docs/examples/example-ngController/index-jquery.html @@ -0,0 +1,34 @@ + + + + + Example - example-ngController-jquery + + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngController/index-production.html b/1.2.17/docs/examples/example-ngController/index-production.html new file mode 100644 index 0000000000..180a722212 --- /dev/null +++ b/1.2.17/docs/examples/example-ngController/index-production.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngController-production + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngController/index.html b/1.2.17/docs/examples/example-ngController/index.html new file mode 100644 index 0000000000..948364be8b --- /dev/null +++ b/1.2.17/docs/examples/example-ngController/index.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngController + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngController/manifest.json b/1.2.17/docs/examples/example-ngController/manifest.json new file mode 100644 index 0000000000..ae92ea9e23 --- /dev/null +++ b/1.2.17/docs/examples/example-ngController/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-ngController", + "files": [ + "index-production.html", + "app.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngController/protractor.js b/1.2.17/docs/examples/example-ngController/protractor.js new file mode 100644 index 0000000000..b159c422b4 --- /dev/null +++ b/1.2.17/docs/examples/example-ngController/protractor.js @@ -0,0 +1,28 @@ + it('should check controller', function() { + var container = element(by.id('ctrl-exmpl')); + + expect(container.findElement(by.model('name')) + .getAttribute('value')).toBe('John Smith'); + + var firstRepeat = + container.findElement(by.repeater('contact in contacts').row(0)); + var secondRepeat = + container.findElement(by.repeater('contact in contacts').row(1)); + + expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value')) + .toBe('408 555 1212'); + expect(secondRepeat.findElement(by.model('contact.value')).getAttribute('value')) + .toBe('john.smith@example.org'); + + firstRepeat.findElement(by.linkText('clear')).click(); + + expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value')) + .toBe(''); + + container.findElement(by.linkText('add')).click(); + + expect(container.findElement(by.repeater('contact in contacts').row(2)) + .findElement(by.model('contact.value')) + .getAttribute('value')) + .toBe('yourname@example.org'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngControllerAs/app.js b/1.2.17/docs/examples/example-ngControllerAs/app.js new file mode 100644 index 0000000000..631dcab11c --- /dev/null +++ b/1.2.17/docs/examples/example-ngControllerAs/app.js @@ -0,0 +1,24 @@ + function SettingsController1() { + this.name = "John Smith"; + this.contacts = [ + {type: 'phone', value: '408 555 1212'}, + {type: 'email', value: 'john.smith@example.org'} ]; + } + + SettingsController1.prototype.greet = function() { + alert(this.name); + }; + + SettingsController1.prototype.addContact = function() { + this.contacts.push({type: 'email', value: 'yourname@example.org'}); + }; + + SettingsController1.prototype.removeContact = function(contactToRemove) { + var index = this.contacts.indexOf(contactToRemove); + this.contacts.splice(index, 1); + }; + + SettingsController1.prototype.clearContact = function(contact) { + contact.type = 'phone'; + contact.value = ''; + }; \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngControllerAs/index-debug.html b/1.2.17/docs/examples/example-ngControllerAs/index-debug.html new file mode 100644 index 0000000000..0945a309cf --- /dev/null +++ b/1.2.17/docs/examples/example-ngControllerAs/index-debug.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngControllerAs-debug + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngControllerAs/index-jquery.html b/1.2.17/docs/examples/example-ngControllerAs/index-jquery.html new file mode 100644 index 0000000000..da5e761d64 --- /dev/null +++ b/1.2.17/docs/examples/example-ngControllerAs/index-jquery.html @@ -0,0 +1,34 @@ + + + + + Example - example-ngControllerAs-jquery + + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngControllerAs/index-production.html b/1.2.17/docs/examples/example-ngControllerAs/index-production.html new file mode 100644 index 0000000000..ba335f3f21 --- /dev/null +++ b/1.2.17/docs/examples/example-ngControllerAs/index-production.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngControllerAs-production + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngControllerAs/index.html b/1.2.17/docs/examples/example-ngControllerAs/index.html new file mode 100644 index 0000000000..37a2dada14 --- /dev/null +++ b/1.2.17/docs/examples/example-ngControllerAs/index.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngControllerAs + + + + + + + + + +
+ Name: + [ greet ]
+ Contact: +
    +
  • + + + [ clear + | X ] +
  • +
  • [ add ]
  • +
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngControllerAs/manifest.json b/1.2.17/docs/examples/example-ngControllerAs/manifest.json new file mode 100644 index 0000000000..b54b3acd59 --- /dev/null +++ b/1.2.17/docs/examples/example-ngControllerAs/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "example-ngControllerAs", + "files": [ + "index-production.html", + "app.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngControllerAs/protractor.js b/1.2.17/docs/examples/example-ngControllerAs/protractor.js new file mode 100644 index 0000000000..3dad744e89 --- /dev/null +++ b/1.2.17/docs/examples/example-ngControllerAs/protractor.js @@ -0,0 +1,28 @@ + it('should check controller as', function() { + var container = element(by.id('ctrl-as-exmpl')); + expect(container.findElement(by.model('settings.name')) + .getAttribute('value')).toBe('John Smith'); + + var firstRepeat = + container.findElement(by.repeater('contact in settings.contacts').row(0)); + var secondRepeat = + container.findElement(by.repeater('contact in settings.contacts').row(1)); + + expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value')) + .toBe('408 555 1212'); + + expect(secondRepeat.findElement(by.model('contact.value')).getAttribute('value')) + .toBe('john.smith@example.org'); + + firstRepeat.findElement(by.linkText('clear')).click(); + + expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value')) + .toBe(''); + + container.findElement(by.linkText('add')).click(); + + expect(container.findElement(by.repeater('contact in settings.contacts').row(2)) + .findElement(by.model('contact.value')) + .getAttribute('value')) + .toBe('yourname@example.org'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngList-directive/index-debug.html b/1.2.17/docs/examples/example-ngList-directive/index-debug.html new file mode 100644 index 0000000000..ef548aff6b --- /dev/null +++ b/1.2.17/docs/examples/example-ngList-directive/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-ngList-directive-debug + + + + + + + + + +
+ List: + + Required! +
+ names = {{names}}
+ myForm.namesInput.$valid = {{myForm.namesInput.$valid}}
+ myForm.namesInput.$error = {{myForm.namesInput.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngList-directive/index-jquery.html b/1.2.17/docs/examples/example-ngList-directive/index-jquery.html new file mode 100644 index 0000000000..622b072fc5 --- /dev/null +++ b/1.2.17/docs/examples/example-ngList-directive/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-ngList-directive-jquery + + + + + + + + + + +
+ List: + + Required! +
+ names = {{names}}
+ myForm.namesInput.$valid = {{myForm.namesInput.$valid}}
+ myForm.namesInput.$error = {{myForm.namesInput.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngList-directive/index-production.html b/1.2.17/docs/examples/example-ngList-directive/index-production.html new file mode 100644 index 0000000000..15a36d5f28 --- /dev/null +++ b/1.2.17/docs/examples/example-ngList-directive/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-ngList-directive-production + + + + + + + + + +
+ List: + + Required! +
+ names = {{names}}
+ myForm.namesInput.$valid = {{myForm.namesInput.$valid}}
+ myForm.namesInput.$error = {{myForm.namesInput.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngList-directive/index.html b/1.2.17/docs/examples/example-ngList-directive/index.html new file mode 100644 index 0000000000..d1b1ea8ef9 --- /dev/null +++ b/1.2.17/docs/examples/example-ngList-directive/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-ngList-directive + + + + + + + + + +
+ List: + + Required! +
+ names = {{names}}
+ myForm.namesInput.$valid = {{myForm.namesInput.$valid}}
+ myForm.namesInput.$error = {{myForm.namesInput.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngList-directive/manifest.json b/1.2.17/docs/examples/example-ngList-directive/manifest.json new file mode 100644 index 0000000000..f380b3b051 --- /dev/null +++ b/1.2.17/docs/examples/example-ngList-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-ngList-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngList-directive/protractor.js b/1.2.17/docs/examples/example-ngList-directive/protractor.js new file mode 100644 index 0000000000..5c4b0d2f08 --- /dev/null +++ b/1.2.17/docs/examples/example-ngList-directive/protractor.js @@ -0,0 +1,18 @@ + var listInput = element(by.model('names')); + var names = element(by.binding('{{names}}')); + var valid = element(by.binding('myForm.namesInput.$valid')); + var error = element(by.css('span.error')); + + it('should initialize to model', function() { + expect(names.getText()).toContain('["igor","misko","vojta"]'); + expect(valid.getText()).toContain('true'); + expect(error.getCssValue('display')).toBe('none'); + }); + + it('should be invalid if empty', function() { + listInput.clear(); + listInput.sendKeys(''); + + expect(names.getText()).toContain(''); + expect(valid.getText()).toContain('false'); + expect(error.getCssValue('display')).not.toBe('none'); }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngValue-directive/index-debug.html b/1.2.17/docs/examples/example-ngValue-directive/index-debug.html new file mode 100644 index 0000000000..d8ebadfe75 --- /dev/null +++ b/1.2.17/docs/examples/example-ngValue-directive/index-debug.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngValue-directive-debug + + + + + + + + + +
+

Which is your favorite?

+ +
You chose {{my.favorite}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngValue-directive/index-jquery.html b/1.2.17/docs/examples/example-ngValue-directive/index-jquery.html new file mode 100644 index 0000000000..27f96c18f6 --- /dev/null +++ b/1.2.17/docs/examples/example-ngValue-directive/index-jquery.html @@ -0,0 +1,34 @@ + + + + + Example - example-ngValue-directive-jquery + + + + + + + + + + +
+

Which is your favorite?

+ +
You chose {{my.favorite}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngValue-directive/index-production.html b/1.2.17/docs/examples/example-ngValue-directive/index-production.html new file mode 100644 index 0000000000..d6a8b2df3d --- /dev/null +++ b/1.2.17/docs/examples/example-ngValue-directive/index-production.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngValue-directive-production + + + + + + + + + +
+

Which is your favorite?

+ +
You chose {{my.favorite}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngValue-directive/index.html b/1.2.17/docs/examples/example-ngValue-directive/index.html new file mode 100644 index 0000000000..0ef32f4a74 --- /dev/null +++ b/1.2.17/docs/examples/example-ngValue-directive/index.html @@ -0,0 +1,33 @@ + + + + + Example - example-ngValue-directive + + + + + + + + + +
+

Which is your favorite?

+ +
You chose {{my.favorite}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngValue-directive/manifest.json b/1.2.17/docs/examples/example-ngValue-directive/manifest.json new file mode 100644 index 0000000000..1e8f897466 --- /dev/null +++ b/1.2.17/docs/examples/example-ngValue-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-ngValue-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngValue-directive/protractor.js b/1.2.17/docs/examples/example-ngValue-directive/protractor.js new file mode 100644 index 0000000000..1b750cee10 --- /dev/null +++ b/1.2.17/docs/examples/example-ngValue-directive/protractor.js @@ -0,0 +1,9 @@ + var favorite = element(by.binding('my.favorite')); + + it('should initialize to model', function() { + expect(favorite.getText()).toContain('unicorns'); + }); + it('should bind the values to the inputs', function() { + element.all(by.model('my.favorite')).get(0).click(); + expect(favorite.getText()).toContain('pizza'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngView-directive/animations.css b/1.2.17/docs/examples/example-ngView-directive/animations.css new file mode 100644 index 0000000000..da5a8473ae --- /dev/null +++ b/1.2.17/docs/examples/example-ngView-directive/animations.css @@ -0,0 +1,39 @@ + .view-animate-container { + position:relative; + height:100px!important; + position:relative; + background:white; + border:1px solid black; + height:40px; + overflow:hidden; + } + + .view-animate { + padding:10px; + } + + .view-animate.ng-enter, .view-animate.ng-leave { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; + + display:block; + width:100%; + border-left:1px solid black; + + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + padding:10px; + } + + .view-animate.ng-enter { + left:100%; + } + .view-animate.ng-enter.ng-enter-active { + left:0; + } + .view-animate.ng-leave.ng-leave-active { + left:-100%; + } \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngView-directive/book.html b/1.2.17/docs/examples/example-ngView-directive/book.html new file mode 100644 index 0000000000..1a50c4e977 --- /dev/null +++ b/1.2.17/docs/examples/example-ngView-directive/book.html @@ -0,0 +1,4 @@ +
+ controller: {{book.name}}
+ Book Id: {{book.params.bookId}}
+
\ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngView-directive/chapter.html b/1.2.17/docs/examples/example-ngView-directive/chapter.html new file mode 100644 index 0000000000..e12ec0779f --- /dev/null +++ b/1.2.17/docs/examples/example-ngView-directive/chapter.html @@ -0,0 +1,5 @@ +
+ controller: {{chapter.name}}
+ Book Id: {{chapter.params.bookId}}
+ Chapter Id: {{chapter.params.chapterId}} +
\ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngView-directive/index-debug.html b/1.2.17/docs/examples/example-ngView-directive/index-debug.html new file mode 100644 index 0000000000..590ce7640b --- /dev/null +++ b/1.2.17/docs/examples/example-ngView-directive/index-debug.html @@ -0,0 +1,40 @@ + + + + + Example - example-ngView-directive-debug + + + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+
+
+
+ +
$location.path() = {{main.$location.path()}}
+
$route.current.templateUrl = {{main.$route.current.templateUrl}}
+
$route.current.params = {{main.$route.current.params}}
+
$route.current.scope.name = {{main.$route.current.scope.name}}
+
$routeParams = {{main.$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngView-directive/index-jquery.html b/1.2.17/docs/examples/example-ngView-directive/index-jquery.html new file mode 100644 index 0000000000..d83816ac10 --- /dev/null +++ b/1.2.17/docs/examples/example-ngView-directive/index-jquery.html @@ -0,0 +1,41 @@ + + + + + Example - example-ngView-directive-jquery + + + + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+
+
+
+ +
$location.path() = {{main.$location.path()}}
+
$route.current.templateUrl = {{main.$route.current.templateUrl}}
+
$route.current.params = {{main.$route.current.params}}
+
$route.current.scope.name = {{main.$route.current.scope.name}}
+
$routeParams = {{main.$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngView-directive/index-production.html b/1.2.17/docs/examples/example-ngView-directive/index-production.html new file mode 100644 index 0000000000..ae351e7e08 --- /dev/null +++ b/1.2.17/docs/examples/example-ngView-directive/index-production.html @@ -0,0 +1,40 @@ + + + + + Example - example-ngView-directive-production + + + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+
+
+
+ +
$location.path() = {{main.$location.path()}}
+
$route.current.templateUrl = {{main.$route.current.templateUrl}}
+
$route.current.params = {{main.$route.current.params}}
+
$route.current.scope.name = {{main.$route.current.scope.name}}
+
$routeParams = {{main.$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngView-directive/index.html b/1.2.17/docs/examples/example-ngView-directive/index.html new file mode 100644 index 0000000000..4e438925ec --- /dev/null +++ b/1.2.17/docs/examples/example-ngView-directive/index.html @@ -0,0 +1,40 @@ + + + + + Example - example-ngView-directive + + + + + + + + + + + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+
+
+
+ +
$location.path() = {{main.$location.path()}}
+
$route.current.templateUrl = {{main.$route.current.templateUrl}}
+
$route.current.params = {{main.$route.current.params}}
+
$route.current.scope.name = {{main.$route.current.scope.name}}
+
$routeParams = {{main.$routeParams}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngView-directive/manifest.json b/1.2.17/docs/examples/example-ngView-directive/manifest.json new file mode 100644 index 0000000000..5ebc47d05d --- /dev/null +++ b/1.2.17/docs/examples/example-ngView-directive/manifest.json @@ -0,0 +1,11 @@ +{ + "name": "example-ngView-directive", + "files": [ + "index-production.html", + "book.html", + "chapter.html", + "animations.css", + "script.js", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngView-directive/protractor.js b/1.2.17/docs/examples/example-ngView-directive/protractor.js new file mode 100644 index 0000000000..76425d75cd --- /dev/null +++ b/1.2.17/docs/examples/example-ngView-directive/protractor.js @@ -0,0 +1,13 @@ + it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller\: ChapterCtrl/); + expect(content).toMatch(/Book Id\: Moby/); + expect(content).toMatch(/Chapter Id\: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller\: BookCtrl/); + expect(content).toMatch(/Book Id\: Scarlet/); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-ngView-directive/script.js b/1.2.17/docs/examples/example-ngView-directive/script.js new file mode 100644 index 0000000000..79c2224a70 --- /dev/null +++ b/1.2.17/docs/examples/example-ngView-directive/script.js @@ -0,0 +1,32 @@ + angular.module('ngViewExample', ['ngRoute', 'ngAnimate']) + .config(['$routeProvider', '$locationProvider', + function($routeProvider, $locationProvider) { + $routeProvider + .when('/Book/:bookId', { + templateUrl: 'book.html', + controller: 'BookCtrl', + controllerAs: 'book' + }) + .when('/Book/:bookId/ch/:chapterId', { + templateUrl: 'chapter.html', + controller: 'ChapterCtrl', + controllerAs: 'chapter' + }); + + // configure html5 to get links working on jsfiddle + $locationProvider.html5Mode(true); + }]) + .controller('MainCtrl', ['$route', '$routeParams', '$location', + function($route, $routeParams, $location) { + this.$route = $route; + this.$location = $location; + this.$routeParams = $routeParams; + }]) + .controller('BookCtrl', ['$routeParams', function($routeParams) { + this.name = "BookCtrl"; + this.params = $routeParams; + }]) + .controller('ChapterCtrl', ['$routeParams', function($routeParams) { + this.name = "ChapterCtrl"; + this.params = $routeParams; + }]); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-number-input-directive/index-debug.html b/1.2.17/docs/examples/example-number-input-directive/index-debug.html new file mode 100644 index 0000000000..5b1237b8b4 --- /dev/null +++ b/1.2.17/docs/examples/example-number-input-directive/index-debug.html @@ -0,0 +1,33 @@ + + + + + Example - example-number-input-directive-debug + + + + + + + + + +
+ Number: + + Required! + + Not valid number! + value = {{value}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-number-input-directive/index-jquery.html b/1.2.17/docs/examples/example-number-input-directive/index-jquery.html new file mode 100644 index 0000000000..8d0c3c4b44 --- /dev/null +++ b/1.2.17/docs/examples/example-number-input-directive/index-jquery.html @@ -0,0 +1,34 @@ + + + + + Example - example-number-input-directive-jquery + + + + + + + + + + +
+ Number: + + Required! + + Not valid number! + value = {{value}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-number-input-directive/index-production.html b/1.2.17/docs/examples/example-number-input-directive/index-production.html new file mode 100644 index 0000000000..2ca577be27 --- /dev/null +++ b/1.2.17/docs/examples/example-number-input-directive/index-production.html @@ -0,0 +1,33 @@ + + + + + Example - example-number-input-directive-production + + + + + + + + + +
+ Number: + + Required! + + Not valid number! + value = {{value}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-number-input-directive/index.html b/1.2.17/docs/examples/example-number-input-directive/index.html new file mode 100644 index 0000000000..acbf51e522 --- /dev/null +++ b/1.2.17/docs/examples/example-number-input-directive/index.html @@ -0,0 +1,33 @@ + + + + + Example - example-number-input-directive + + + + + + + + + +
+ Number: + + Required! + + Not valid number! + value = {{value}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-number-input-directive/manifest.json b/1.2.17/docs/examples/example-number-input-directive/manifest.json new file mode 100644 index 0000000000..514d04f3b7 --- /dev/null +++ b/1.2.17/docs/examples/example-number-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-number-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-number-input-directive/protractor.js b/1.2.17/docs/examples/example-number-input-directive/protractor.js new file mode 100644 index 0000000000..f03b0e5549 --- /dev/null +++ b/1.2.17/docs/examples/example-number-input-directive/protractor.js @@ -0,0 +1,22 @@ + var value = element(by.binding('value')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('value')); + + it('should initialize to model', function() { + expect(value.getText()).toContain('12'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if over max', function() { + input.clear(); + input.sendKeys('123'); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('false'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-radio-input-directive/index-debug.html b/1.2.17/docs/examples/example-radio-input-directive/index-debug.html new file mode 100644 index 0000000000..793b79217a --- /dev/null +++ b/1.2.17/docs/examples/example-radio-input-directive/index-debug.html @@ -0,0 +1,31 @@ + + + + + Example - example-radio-input-directive-debug + + + + + + + + + +
+ Red
+ Green
+ Blue
+ color = {{color | json}}
+
+ Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-radio-input-directive/index-jquery.html b/1.2.17/docs/examples/example-radio-input-directive/index-jquery.html new file mode 100644 index 0000000000..d69a82c8f4 --- /dev/null +++ b/1.2.17/docs/examples/example-radio-input-directive/index-jquery.html @@ -0,0 +1,32 @@ + + + + + Example - example-radio-input-directive-jquery + + + + + + + + + + +
+ Red
+ Green
+ Blue
+ color = {{color | json}}
+
+ Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-radio-input-directive/index-production.html b/1.2.17/docs/examples/example-radio-input-directive/index-production.html new file mode 100644 index 0000000000..5ee791a80e --- /dev/null +++ b/1.2.17/docs/examples/example-radio-input-directive/index-production.html @@ -0,0 +1,31 @@ + + + + + Example - example-radio-input-directive-production + + + + + + + + + +
+ Red
+ Green
+ Blue
+ color = {{color | json}}
+
+ Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-radio-input-directive/index.html b/1.2.17/docs/examples/example-radio-input-directive/index.html new file mode 100644 index 0000000000..e7be4e86cc --- /dev/null +++ b/1.2.17/docs/examples/example-radio-input-directive/index.html @@ -0,0 +1,31 @@ + + + + + Example - example-radio-input-directive + + + + + + + + + +
+ Red
+ Green
+ Blue
+ color = {{color | json}}
+
+ Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. + + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-radio-input-directive/manifest.json b/1.2.17/docs/examples/example-radio-input-directive/manifest.json new file mode 100644 index 0000000000..863bef42e2 --- /dev/null +++ b/1.2.17/docs/examples/example-radio-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-radio-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-radio-input-directive/protractor.js b/1.2.17/docs/examples/example-radio-input-directive/protractor.js new file mode 100644 index 0000000000..8ba665c237 --- /dev/null +++ b/1.2.17/docs/examples/example-radio-input-directive/protractor.js @@ -0,0 +1,9 @@ + it('should change state', function() { + var color = element(by.binding('color')); + + expect(color.getText()).toContain('blue'); + + element.all(by.model('color')).get(0).click(); + + expect(color.getText()).toContain('red'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-text-input-directive/index-debug.html b/1.2.17/docs/examples/example-text-input-directive/index-debug.html new file mode 100644 index 0000000000..44f9b0d00b --- /dev/null +++ b/1.2.17/docs/examples/example-text-input-directive/index-debug.html @@ -0,0 +1,35 @@ + + + + + Example - example-text-input-directive-debug + + + + + + + + + +
+ Single word: + + Required! + + Single word only! + + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-text-input-directive/index-jquery.html b/1.2.17/docs/examples/example-text-input-directive/index-jquery.html new file mode 100644 index 0000000000..d1e771423f --- /dev/null +++ b/1.2.17/docs/examples/example-text-input-directive/index-jquery.html @@ -0,0 +1,36 @@ + + + + + Example - example-text-input-directive-jquery + + + + + + + + + + +
+ Single word: + + Required! + + Single word only! + + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-text-input-directive/index-production.html b/1.2.17/docs/examples/example-text-input-directive/index-production.html new file mode 100644 index 0000000000..bda2a51f14 --- /dev/null +++ b/1.2.17/docs/examples/example-text-input-directive/index-production.html @@ -0,0 +1,35 @@ + + + + + Example - example-text-input-directive-production + + + + + + + + + +
+ Single word: + + Required! + + Single word only! + + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-text-input-directive/index.html b/1.2.17/docs/examples/example-text-input-directive/index.html new file mode 100644 index 0000000000..7aa8e62c9e --- /dev/null +++ b/1.2.17/docs/examples/example-text-input-directive/index.html @@ -0,0 +1,35 @@ + + + + + Example - example-text-input-directive + + + + + + + + + +
+ Single word: + + Required! + + Single word only! + + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-text-input-directive/manifest.json b/1.2.17/docs/examples/example-text-input-directive/manifest.json new file mode 100644 index 0000000000..2612b8ac3a --- /dev/null +++ b/1.2.17/docs/examples/example-text-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-text-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-text-input-directive/protractor.js b/1.2.17/docs/examples/example-text-input-directive/protractor.js new file mode 100644 index 0000000000..8e933ee6d4 --- /dev/null +++ b/1.2.17/docs/examples/example-text-input-directive/protractor.js @@ -0,0 +1,23 @@ + var text = element(by.binding('text')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('text')); + + it('should initialize to model', function() { + expect(text.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if multi word', function() { + input.clear(); + input.sendKeys('hello world'); + + expect(valid.getText()).toContain('false'); + }); \ No newline at end of file diff --git a/1.2.17/docs/examples/example-url-input-directive/index-debug.html b/1.2.17/docs/examples/example-url-input-directive/index-debug.html new file mode 100644 index 0000000000..1a182d6f2a --- /dev/null +++ b/1.2.17/docs/examples/example-url-input-directive/index-debug.html @@ -0,0 +1,33 @@ + + + + + Example - example-url-input-directive-debug + + + + + + + + + +
+ URL: + + Required! + + Not valid url! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.url = {{!!myForm.$error.url}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-url-input-directive/index-jquery.html b/1.2.17/docs/examples/example-url-input-directive/index-jquery.html new file mode 100644 index 0000000000..aca63c7eba --- /dev/null +++ b/1.2.17/docs/examples/example-url-input-directive/index-jquery.html @@ -0,0 +1,34 @@ + + + + + Example - example-url-input-directive-jquery + + + + + + + + + + +
+ URL: + + Required! + + Not valid url! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.url = {{!!myForm.$error.url}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-url-input-directive/index-production.html b/1.2.17/docs/examples/example-url-input-directive/index-production.html new file mode 100644 index 0000000000..b6fae288b7 --- /dev/null +++ b/1.2.17/docs/examples/example-url-input-directive/index-production.html @@ -0,0 +1,33 @@ + + + + + Example - example-url-input-directive-production + + + + + + + + + +
+ URL: + + Required! + + Not valid url! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.url = {{!!myForm.$error.url}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-url-input-directive/index.html b/1.2.17/docs/examples/example-url-input-directive/index.html new file mode 100644 index 0000000000..21fb20669d --- /dev/null +++ b/1.2.17/docs/examples/example-url-input-directive/index.html @@ -0,0 +1,33 @@ + + + + + Example - example-url-input-directive + + + + + + + + + +
+ URL: + + Required! + + Not valid url! + text = {{text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.url = {{!!myForm.$error.url}}
+
+ + \ No newline at end of file diff --git a/1.2.17/docs/examples/example-url-input-directive/manifest.json b/1.2.17/docs/examples/example-url-input-directive/manifest.json new file mode 100644 index 0000000000..a92554ac20 --- /dev/null +++ b/1.2.17/docs/examples/example-url-input-directive/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "example-url-input-directive", + "files": [ + "index-production.html", + "protractor.js" + ] +} \ No newline at end of file diff --git a/1.2.17/docs/examples/example-url-input-directive/protractor.js b/1.2.17/docs/examples/example-url-input-directive/protractor.js new file mode 100644 index 0000000000..41ffdbe3b4 --- /dev/null +++ b/1.2.17/docs/examples/example-url-input-directive/protractor.js @@ -0,0 +1,23 @@ + var text = element(by.binding('text')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('text')); + + it('should initialize to model', function() { + expect(text.getText()).toContain('http://google.com'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if not url', function() { + input.clear(); + input.sendKeys('box'); + + expect(valid.getText()).toContain('false'); + }); \ No newline at end of file diff --git a/1.2.17/docs/img/AngularJS-small.png b/1.2.17/docs/img/AngularJS-small.png new file mode 100644 index 0000000000..ab5e20f883 Binary files /dev/null and b/1.2.17/docs/img/AngularJS-small.png differ diff --git a/1.2.17/docs/img/One_Way_Data_Binding.png b/1.2.17/docs/img/One_Way_Data_Binding.png new file mode 100644 index 0000000000..60e7e3bf32 Binary files /dev/null and b/1.2.17/docs/img/One_Way_Data_Binding.png differ diff --git a/1.2.17/docs/img/Two_Way_Data_Binding.png b/1.2.17/docs/img/Two_Way_Data_Binding.png new file mode 100644 index 0000000000..3a9c6d1ecc Binary files /dev/null and b/1.2.17/docs/img/Two_Way_Data_Binding.png differ diff --git a/1.2.17/docs/img/angular_parts.png b/1.2.17/docs/img/angular_parts.png new file mode 100644 index 0000000000..a33a10ba7d Binary files /dev/null and b/1.2.17/docs/img/angular_parts.png differ diff --git a/1.2.17/docs/img/angularjs-for-header-only.svg b/1.2.17/docs/img/angularjs-for-header-only.svg new file mode 100644 index 0000000000..68689b6bb1 --- /dev/null +++ b/1.2.17/docs/img/angularjs-for-header-only.svg @@ -0,0 +1,41 @@ + + + +]> + + + + + + + + + + + + + + + + + diff --git a/1.2.17/docs/img/bullet.png b/1.2.17/docs/img/bullet.png new file mode 100644 index 0000000000..3575a8e60f Binary files /dev/null and b/1.2.17/docs/img/bullet.png differ diff --git a/1.2.17/docs/img/form_data_flow.png b/1.2.17/docs/img/form_data_flow.png new file mode 100644 index 0000000000..60e947a595 Binary files /dev/null and b/1.2.17/docs/img/form_data_flow.png differ diff --git a/1.2.17/docs/img/glyphicons-halflings-white.png b/1.2.17/docs/img/glyphicons-halflings-white.png new file mode 100644 index 0000000000..a20760bfde Binary files /dev/null and b/1.2.17/docs/img/glyphicons-halflings-white.png differ diff --git a/1.2.17/docs/img/glyphicons-halflings.png b/1.2.17/docs/img/glyphicons-halflings.png new file mode 100644 index 0000000000..92d4445dfd Binary files /dev/null and b/1.2.17/docs/img/glyphicons-halflings.png differ diff --git a/1.2.17/docs/img/guide/concepts-databinding1.png b/1.2.17/docs/img/guide/concepts-databinding1.png new file mode 100644 index 0000000000..87b7ffd0bf Binary files /dev/null and b/1.2.17/docs/img/guide/concepts-databinding1.png differ diff --git a/1.2.17/docs/img/guide/concepts-databinding2.png b/1.2.17/docs/img/guide/concepts-databinding2.png new file mode 100644 index 0000000000..be8cbafe29 Binary files /dev/null and b/1.2.17/docs/img/guide/concepts-databinding2.png differ diff --git a/1.2.17/docs/img/guide/concepts-directive.png b/1.2.17/docs/img/guide/concepts-directive.png new file mode 100644 index 0000000000..b77d5f8ec9 Binary files /dev/null and b/1.2.17/docs/img/guide/concepts-directive.png differ diff --git a/1.2.17/docs/img/guide/concepts-module-injector.png b/1.2.17/docs/img/guide/concepts-module-injector.png new file mode 100644 index 0000000000..31fcf84c62 Binary files /dev/null and b/1.2.17/docs/img/guide/concepts-module-injector.png differ diff --git a/1.2.17/docs/img/guide/concepts-module-service.png b/1.2.17/docs/img/guide/concepts-module-service.png new file mode 100644 index 0000000000..b7580be21b Binary files /dev/null and b/1.2.17/docs/img/guide/concepts-module-service.png differ diff --git a/1.2.17/docs/img/guide/concepts-runtime.png b/1.2.17/docs/img/guide/concepts-runtime.png new file mode 100644 index 0000000000..eededc2ab6 Binary files /dev/null and b/1.2.17/docs/img/guide/concepts-runtime.png differ diff --git a/1.2.17/docs/img/guide/concepts-scope.png b/1.2.17/docs/img/guide/concepts-scope.png new file mode 100644 index 0000000000..83ad8f8f43 Binary files /dev/null and b/1.2.17/docs/img/guide/concepts-scope.png differ diff --git a/1.2.17/docs/img/guide/concepts-startup.png b/1.2.17/docs/img/guide/concepts-startup.png new file mode 100644 index 0000000000..b896a2b516 Binary files /dev/null and b/1.2.17/docs/img/guide/concepts-startup.png differ diff --git a/1.2.17/docs/img/guide/concepts-view.png b/1.2.17/docs/img/guide/concepts-view.png new file mode 100644 index 0000000000..0222544bee Binary files /dev/null and b/1.2.17/docs/img/guide/concepts-view.png differ diff --git a/1.2.17/docs/img/guide/di_sequence_final.png b/1.2.17/docs/img/guide/di_sequence_final.png new file mode 100644 index 0000000000..d4d743bdbc Binary files /dev/null and b/1.2.17/docs/img/guide/di_sequence_final.png differ diff --git a/1.2.17/docs/img/guide/dom_scope_final.png b/1.2.17/docs/img/guide/dom_scope_final.png new file mode 100644 index 0000000000..c6385d12ed Binary files /dev/null and b/1.2.17/docs/img/guide/dom_scope_final.png differ diff --git a/1.2.17/docs/img/guide/hashbang_vs_regular_url.jpg b/1.2.17/docs/img/guide/hashbang_vs_regular_url.jpg new file mode 100644 index 0000000000..632b4febad Binary files /dev/null and b/1.2.17/docs/img/guide/hashbang_vs_regular_url.jpg differ diff --git a/1.2.17/docs/img/guide/scenario_runner.png b/1.2.17/docs/img/guide/scenario_runner.png new file mode 100644 index 0000000000..a39037a0aa Binary files /dev/null and b/1.2.17/docs/img/guide/scenario_runner.png differ diff --git a/1.2.17/docs/img/guide/simple_scope_final.png b/1.2.17/docs/img/guide/simple_scope_final.png new file mode 100644 index 0000000000..99a04797a5 Binary files /dev/null and b/1.2.17/docs/img/guide/simple_scope_final.png differ diff --git a/1.2.17/docs/img/helloworld.png b/1.2.17/docs/img/helloworld.png new file mode 100644 index 0000000000..957ce8e98b Binary files /dev/null and b/1.2.17/docs/img/helloworld.png differ diff --git a/1.2.17/docs/img/helloworld_2way.png b/1.2.17/docs/img/helloworld_2way.png new file mode 100644 index 0000000000..2c02313c1b Binary files /dev/null and b/1.2.17/docs/img/helloworld_2way.png differ diff --git a/1.2.17/docs/img/tutorial/catalog_screen.png b/1.2.17/docs/img/tutorial/catalog_screen.png new file mode 100644 index 0000000000..0b1968c5fb Binary files /dev/null and b/1.2.17/docs/img/tutorial/catalog_screen.png differ diff --git a/1.2.17/docs/img/tutorial/tutorial_00.png b/1.2.17/docs/img/tutorial/tutorial_00.png new file mode 100644 index 0000000000..65f3973eba Binary files /dev/null and b/1.2.17/docs/img/tutorial/tutorial_00.png differ diff --git a/1.2.17/docs/img/tutorial/tutorial_00_final.png b/1.2.17/docs/img/tutorial/tutorial_00_final.png new file mode 100644 index 0000000000..838a094483 Binary files /dev/null and b/1.2.17/docs/img/tutorial/tutorial_00_final.png differ diff --git a/1.2.17/docs/img/tutorial/tutorial_02.png b/1.2.17/docs/img/tutorial/tutorial_02.png new file mode 100644 index 0000000000..b4c1cab16d Binary files /dev/null and b/1.2.17/docs/img/tutorial/tutorial_02.png differ diff --git a/1.2.17/docs/img/tutorial/tutorial_03.png b/1.2.17/docs/img/tutorial/tutorial_03.png new file mode 100644 index 0000000000..3e432a352e Binary files /dev/null and b/1.2.17/docs/img/tutorial/tutorial_03.png differ diff --git a/1.2.17/docs/img/tutorial/tutorial_04.png b/1.2.17/docs/img/tutorial/tutorial_04.png new file mode 100644 index 0000000000..3d028771dc Binary files /dev/null and b/1.2.17/docs/img/tutorial/tutorial_04.png differ diff --git a/1.2.17/docs/img/tutorial/tutorial_05.png b/1.2.17/docs/img/tutorial/tutorial_05.png new file mode 100644 index 0000000000..be30217427 Binary files /dev/null and b/1.2.17/docs/img/tutorial/tutorial_05.png differ diff --git a/1.2.17/docs/img/tutorial/tutorial_05.pptx b/1.2.17/docs/img/tutorial/tutorial_05.pptx new file mode 100644 index 0000000000..1afe4c3df5 Binary files /dev/null and b/1.2.17/docs/img/tutorial/tutorial_05.pptx differ diff --git a/1.2.17/docs/img/tutorial/tutorial_07_final.png b/1.2.17/docs/img/tutorial/tutorial_07_final.png new file mode 100644 index 0000000000..3e7776c460 Binary files /dev/null and b/1.2.17/docs/img/tutorial/tutorial_07_final.png differ diff --git a/1.2.17/docs/img/tutorial/tutorial_08-09_final.png b/1.2.17/docs/img/tutorial/tutorial_08-09_final.png new file mode 100644 index 0000000000..02601d241b Binary files /dev/null and b/1.2.17/docs/img/tutorial/tutorial_08-09_final.png differ diff --git a/1.2.17/docs/img/tutorial/tutorial_10-11_final.png b/1.2.17/docs/img/tutorial/tutorial_10-11_final.png new file mode 100644 index 0000000000..55a821ad18 Binary files /dev/null and b/1.2.17/docs/img/tutorial/tutorial_10-11_final.png differ diff --git a/1.2.17/docs/index-debug.html b/1.2.17/docs/index-debug.html new file mode 100644 index 0000000000..3831ccf72e --- /dev/null +++ b/1.2.17/docs/index-debug.html @@ -0,0 +1,269 @@ + + + + + + + + + AngularJS + + + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+ +
+ + +
+ + diff --git a/1.2.17/docs/index-jquery.html b/1.2.17/docs/index-jquery.html new file mode 100644 index 0000000000..91fe56361e --- /dev/null +++ b/1.2.17/docs/index-jquery.html @@ -0,0 +1,270 @@ + + + + + + + + + AngularJS + + + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+ +
+ + +
+ + diff --git a/1.2.17/docs/index-production.html b/1.2.17/docs/index-production.html new file mode 100644 index 0000000000..ec12714f8c --- /dev/null +++ b/1.2.17/docs/index-production.html @@ -0,0 +1,269 @@ + + + + + + + + + AngularJS + + + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+ +
+ + +
+ + diff --git a/1.2.17/docs/index.html b/1.2.17/docs/index.html new file mode 100644 index 0000000000..b27f84e0c1 --- /dev/null +++ b/1.2.17/docs/index.html @@ -0,0 +1,269 @@ + + + + + + + + + AngularJS + + + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+ +
+ + +
+ + diff --git a/1.2.17/docs/js/angular-bootstrap/bootstrap-prettify.js b/1.2.17/docs/js/angular-bootstrap/bootstrap-prettify.js new file mode 100644 index 0000000000..e35b4579ef --- /dev/null +++ b/1.2.17/docs/js/angular-bootstrap/bootstrap-prettify.js @@ -0,0 +1,284 @@ +'use strict'; + +var directive = {}; +var service = { value: {} }; + +var DEPENDENCIES = { + 'angular.js': 'http://code.angularjs.org/' + angular.version.full + '/angular.min.js', + 'angular-resource.js': 'http://code.angularjs.org/' + angular.version.full + '/angular-resource.min.js', + 'angular-route.js': 'http://code.angularjs.org/' + angular.version.full + '/angular-route.min.js', + 'angular-animate.js': 'http://code.angularjs.org/' + angular.version.full + '/angular-animate.min.js', + 'angular-sanitize.js': 'http://code.angularjs.org/' + angular.version.full + '/angular-sanitize.min.js', + 'angular-cookies.js': 'http://code.angularjs.org/' + angular.version.full + '/angular-cookies.min.js' +}; + + +function escape(text) { + return text. + replace(/\&/g, '&'). + replace(/\/g, '>'). + replace(/"/g, '"'); +} + +/** + * http://stackoverflow.com/questions/451486/pre-tag-loses-line-breaks-when-setting-innerhtml-in-ie + * http://stackoverflow.com/questions/195363/inserting-a-newline-into-a-pre-tag-ie-javascript + */ +function setHtmlIe8SafeWay(element, html) { + var newElement = angular.element('
' + html + '
'); + + element.empty(); + element.append(newElement.contents()); + return element; +} + + +directive.jsFiddle = function(getEmbeddedTemplate, escape, script) { + return { + terminal: true, + link: function(scope, element, attr) { + var name = '', + stylesheet = '\n', + fields = { + html: '', + css: '', + js: '' + }; + + angular.forEach(attr.jsFiddle.split(' '), function(file, index) { + var fileType = file.split('.')[1]; + + if (fileType == 'html') { + if (index == 0) { + fields[fileType] += + '
\n' + + getEmbeddedTemplate(file, 2); + } else { + fields[fileType] += '\n\n\n \n' + + ' \n'; + } + } else { + fields[fileType] += getEmbeddedTemplate(file) + '\n'; + } + }); + + fields.html += '
\n'; + + setHtmlIe8SafeWay(element, + '
' + + hiddenField('title', 'AngularJS Example: ' + name) + + hiddenField('css', ' \n' + + stylesheet + + script.angular + + (attr.resource ? script.resource : '') + + '