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('portal', []).directive('ordersPendingControls', function ($compile) { | |
return { | |
scope: { | |
ordersPendingControls: '=' | |
}, | |
require: "^ngController", | |
replace: true, | |
template: '<div>' + | |
' <button class="btn btn-small" ng-click="editClicked()" ng-disabled="editDisabled" title="Edit this request"><i class="icon-pencil"></i></button>' + | |
' <button class="btn btn-small" ng-click="deleteClicked()" ng-disabled="deleteDisabled" title="Delete this request"><i class="icon-remove-circle icon-remove"></i></button>' + |
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/ng-template" id="one.html"> | |
<div>This is first template</div> | |
</script> | |
<script type="text/ng-template" id="two.html"> | |
<div>This is second template</div> | |
</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
/*global angular: true, google: true, _ : true */ | |
'use strict'; | |
angular.module('geocoder', ['ngStorage']).factory('Geocoder', function ($localStorage, $q, $timeout) { | |
var locations = $localStorage.locations ? JSON.parse($localStorage.locations) : {}; | |
var queue = []; | |
// Amount of time (in milliseconds) to pause between each trip to the |
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
/** | |
* Ratios.less | |
* | |
* Ben Jacobs <[email protected]> 2013/09/09 | |
* | |
* Inspired by a [blog post][1] on maintaing aspect ratio of fluid content | |
* using only CSS. | |
* | |
* [1]: http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio by ansciath | |
*/ |
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 getStyle (node, property, camel) { | |
var value; | |
if (window.getComputedStyle) { | |
value = document.defaultView.getComputedStyle(node, null) | |
.getPropertyValue(property); | |
} else if (node.currentStyle) { | |
// IE fallback | |
value = node.currentStyle[property] ? | |
node.currentStyle[property] : |
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
body { | |
color: red; | |
font-weight: bold; | |
} |
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
Hello, world! |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"> | |
<title></title> | |
</head> |
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
#!/usr/local/bin/node | |
var not = {}; | |
function printCatch (name) { | |
try { | |
console.log(eval(name)); | |
} catch (e) { | |
console.log("whoops, that isn't defined yet"); | |
setTimeout(printCatch.bind(undefined, name), 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
function getTemplateAsync (templateName) { | |
var dfd = $q.defer(); | |
var template = $templateCache.get(templateName); | |
if (!template) { | |
$http.get(templateName).success(function (data) { | |
$templateCache.put(templateName); | |
dfd.resolve(data); | |
}); |