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
/** | |
* 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
/*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
<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
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
<h1>Alert</h1> | |
<p>Bootstrap JS</p> | |
<div class="alert fade in"> | |
<button type="button" class="close" data-dismiss="alert">×</button> | |
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good. | |
</div> | |
<p></p><a ng-click="alert=true">Open Alert (AngularJS)</a></p> | |
<div class="alert fade" ng-class="{in:alert}"> | |
<button type="button" class="close" ng-click="alert=false">×</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
<h2>{{ transaction.Title || "Transactions" }}</h2> | |
<label for="selectedYear">View transactions from: </label> | |
<select name="selectedYear" ng-model="selectedYear"> | |
<option ng-repeat="year in years">{{year}}</option> | |
</select> |
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
/* | |
I'm converting an existing web-app to angular. We made extensive use of the | |
Google Visualization library in the past. It's a powerful, although | |
complicated API, so I was anxious to get it wrapped up in angular. This | |
populates a table with data returned from a custome service 'Account' | |
*/ | |
'use strict'; | |
/* Directives */ |
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
<?php | |
foreach ($_FILES as $file) { | |
switch($file['error']) { | |
case UPLOAD_ERR_INI_SIZE: | |
error_log("The uploaded file exceeds the upload_max_filesize directive in php.ini. : " . $file['name']); | |
break; | |
case UPLOAD_ERR_FORM_SIZE: | |
error_log("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form. " . $file['name']); |
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
http://symfony.com/doc/current/book/doctrine.html#saving-related-entities |