This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('common') | |
.filter('split', function() { | |
// | |
// Helper function | |
// Return as many words as possible without going past the limit | |
var trimWords = function(string, limit) { | |
var cutAtCharacterLimit = string.slice(0, limit).trim(); | |
var indexOfLastSpace = cutAtCharacterLimit.lastIndexOf(' '); | |
var cutAtLastSpace; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('common') | |
.filter('telephone', function() { | |
'use strict'; | |
/** | |
* Clean or format a telephone number | |
* | |
* @param {String} number | |
* @param {String} method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////// | |
// | |
// Flexbox | |
// | |
// flex_container() direction is required. | |
// | |
// Possible values: | |
// - vertical | |
// - horizontal | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Check the validity of a credit card number | |
* | |
* https://gist.github.com/2134376 | |
* Phil Green (ShirtlessKirk) | |
* | |
* @param {String} number | |
* @return {Bool} validity | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function disableAnimate($animate) { | |
'ngInject'; | |
return { | |
restrict: 'A', | |
link: function($scope, $element) { | |
$animate.enabled($element, false); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Clean Home Button | |
*/ | |
body { | |
text-align: center; | |
} | |
a { | |
background: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #ffffff), color-stop(100%, #e5e5e5)), -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #6d8a18), color-stop(100%, #6d8a18)); | |
background: -webkit-linear-gradient(bottom, #ffffff, #e5e5e5), -webkit-linear-gradient(bottom, #6d8a18, #6d8a18); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Red Push Button | |
*/ | |
html { | |
background: url(data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABQAAD/7gAOQWRvYmUAZMAAAAAB/9sAhAACAgICAgICAgICAwICAgMEAwICAwQFBAQEBAQFBgUFBQUFBQYGBwcIBwcGCQkKCgkJDAwMDAwMDAwMDAwMDAwMAQMDAwUEBQkGBgkNCwkLDQ8ODg4ODw8MDAwMDA8PDAwMDAwMDwwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCACHAIcDAREAAhEBAxEB/8QAhgABAQEBAQEAAAAAAAAAAAAAAgMBAAQIAQEBAQAAAAAAAAAAAAAAAAAAAQQQAQACAQMCBQIDBwMEAwEAAAERAiExEgMAQVFhcSITgTLwkaGxwdFCcoIjUqKyYtLiM+HxkgQRAQACAQQDAQADAQEBAAAAAPAAAaERITFhQXGi4VGRArHBgf/aAAwDAQACEQMRAD8A+CK+3kKna1N1piFqmAx5foYz1tHd+KmYdV5uSGOJmdmyaGLWzbVqY0O/h/p6D64oxKtqW5Fvu2luXdbOYNwAkTGs/XsdB1W+tyDGlTkrupBteO1CGCtGpmXPjOf+WgdVtrcozpUjpWtxzbjxaYbbbEoZfLy7SzAfPIZlVi3KWaUF5DmaoQNWsAflj0MS9B3fipB1/NzN1bWpkTdw7RfuCsqrAzGmn9p0H1wGJm8aWb23TxzZ3Bu9+e2dJz6uIOj0/K31uBjSo2u69l1/yRx5Nvtzl7/jKx0HVba3KM6VOLbo98cZfiPdqxuMlZ7vZ9Mr0HzzBmCm5GzEfHF+avabwAefYPTGXoO78VA6rzcoOcG5bcsUUtZgwpBGn18qnQfXFGJkw1qKBbitaz/MxOqaZFx5+Anp+VvrcgxpUCW2K614WKg22xcYZ82fXOvQdVtrcozpUpYtYsk1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min1.js"></script> | |
<script> | |
var $$; | |
// If 1.7.1 is loaded, put it into noConflict mode | |
if(window.jQuery().jquery = '1.7.1') { | |
$$ = $.noConflict(true); | |
} else { | |
// If it is not loaded, load the local version | |
document.write("<script src='/js/jquery-1.7.1.js'>\x3C/script>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// lock the zoom unless the user is manually zooming | |
var viewportmeta = document.querySelector('meta[name="viewport"]'); | |
if (viewportmeta) { | |
viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0'; | |
document.body.addEventListener('gesturestart', function () { | |
viewportmeta.content = 'width=device-width, minimum-scale=0.25, maximum-scale=1.6'; | |
}, false); | |
} |