This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!Array.prototype.indexOf) { | |
| Array.prototype.indexOf = function (searchElement, fromIndex) { | |
| var k; | |
| if (this == null) { | |
| throw new TypeError('"this" is null or not defined'); | |
| } | |
| var O = Object(this); | |
| var len = O.length >>> 0; | |
| if (len === 0) { | |
| return -1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!Element.prototype.getElementsByClassName) { | |
| Element.prototype.getElementsByClassName = function (search) { | |
| var d = this, elements, pattern, i, results = []; | |
| if (d.querySelectorAll) { // IE8 | |
| return d.querySelectorAll("." + search); | |
| } | |
| if (d.evaluate) { // IE6, IE7 | |
| pattern = ".//*[contains(concat(' ', @class, ' '), ' " + search + " ')]"; | |
| elements = d.evaluate(pattern, d, null, 0, null); | |
| while ((i = elements.iterateNext())) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function.prototype.delayed = function (delay) { | |
| var timer = 0; | |
| var callback = this; | |
| return function() { | |
| clearTimeout(timer); | |
| timer = setTimeout(callback, ms); | |
| }; | |
| }; | |
| document.getElementById('search').addEventListener('keyup',search.delayed(200)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Angular Fine Uploader | |
| * @version 0.1.0 | |
| * @homepage https://github.com/darthwade/angular-fine-uploader | |
| * @author Vadym Petrychenko https://github.com/darthwade | |
| * @license The MIT License (http://www.opensource.org/licenses/mit-license.php) | |
| * @copyright 2014 Vadym Petrychenko | |
| */ | |
| (function (factory) { | |
| if (typeof define === 'function' && define.amd) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define([ | |
| 'angular', | |
| 'restangular', | |
| '../config' | |
| ], function (angular) { | |
| 'use strict'; | |
| angular.module('convertiser.common') | |
| .service('systemService', function (Restangular) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| angular.module('au.common') | |
| .constant('httpStatus', { | |
| isInformational: function(code) { | |
| return code >= 100 && code <= 199; | |
| }, | |
| isSuccess: function(code) { | |
| return code >= 200 && code <= 299; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // "{0} is dead, but {1} is alive! {0} {2}".format("ASP", "ASP.NET") | |
| if (!String.prototype.format) { | |
| String.prototype.format = function() { | |
| var args = arguments; | |
| return this.replace(/{(\d+)}/g, function(match, number) { | |
| return typeof args[number] != 'undefined' | |
| ? args[number] | |
| : match | |
| ; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beforeEach(function() { | |
| this.addMatchers({ | |
| toContainClass: function (expected) { | |
| var self = this; | |
| var deferred = protractor.promise.defer(); | |
| self.actual.getAttribute('class').then(function(classes) { | |
| var result = classes && classes.search(new RegExp(expected, 'i')) > 0; | |
| if (result) { |
NewerOlder