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
<input type="text" data-ng-model="searchModel"> | |
<li data-ng-show="(searchModel && ([contact.name.formatted]|filter:searchModel).length)"> | |
{{ ::contact.name.formatted }} | |
</li |
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
var req = { | |
method: 'POST', | |
url: ENV.API_END_POINT + '/users', | |
headers: { | |
'Authorization': 'Basic ' + Base64Service.encode(mUser + ':' + mPass) | |
}, | |
data: user | |
}; | |
$http(req) |
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('admin') | |
.directive('dollarsToCents', function(){ | |
return { | |
require: 'ngModel', | |
link: function(scope, element, attrs, ngModel) { | |
if(ngModel) { // Don't do anything unless we have a model | |
ngModel.$parsers.push(function(value) { | |
return value*100; |
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
var input = 4.537; | |
var result = parseFloat(Math.round(num3 * 100) / 100).toFixed(2); // 4.54 |
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
/* | |
* @include triangle within a pseudo element and add positioning properties (ie. top, left) | |
* $direction: up, down, left, right | |
*/ | |
@mixin triangle( | |
$direction: 'down', | |
$size: 6px, | |
$color: #222 | |
){ | |
content: ''; |
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
%currency { | |
position: relative; | |
&:before { | |
content: '$'; | |
position: relative; | |
left: 0; | |
} | |
} |
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
@mixin tooltip( | |
$content: attr(data-tooltip), | |
$direction: top | |
) { | |
position: relative; | |
&:before, &:after { | |
display: none; | |
z-index: 98; | |
} |
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
/* global jQuery */ | |
'use strict'; | |
angular.module('clutch.directives').directive('flipCalendar', | |
function($state, $rootScope, ngDialog, $q, cfpLoadingBar) { | |
return { | |
restrict: 'A', | |
templateUrl: 'partials/authenticated/flip/calendar.html', | |
scope: { |
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
// Prototype method | |
Array.prototype.chunk = function(chunkSize) { | |
var array=this; | |
return [].concat.apply([], | |
array.map(function(elem,i) { | |
return i%chunkSize ? [] : [array.slice(i,i+chunkSize)]; | |
}) | |
); | |
}; | |
// |
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('myModule') | |
.filter('weekdays', function() { | |
'use strict'; | |
return function(day, length) { | |
// If length exists but doesn't match our keywords | |
if( length && length !== 'long' && length !== 'short' && length !== 'letter' ) { | |
return 'Length must be \'long\', \'short\' or \'letter\''; | |
} |