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
'use strict'; | |
angular.module('app.photo') | |
.controller('EditPhotoCtrl', function($scope, $state, $location, $window, | |
UserService, PhotoService, UtilitiesService) { | |
/** | |
* INIT VALUES | |
*/ |
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
'use strict'; | |
angular.module('app.picture') | |
.directive('pictureList', function() { | |
return { | |
restrict: 'E', | |
scope: { | |
pictures: '=' |
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
'use strict'; | |
describe('PhotoCtrl', function() { | |
var ctrl, rootScope, scope, q, Mock; | |
beforeEach(angular.mock.module('app.photo', 'ui.router')); | |
beforeEach(inject(function($controller, _$rootScope_, _$location_, _$state_, _$q_) { |
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
beforeEach(inject(function(_) { | |
underScoreService = _; | |
})); | |
it('should do something', function () { | |
expect(underScoreService).toBe(true); | |
}); |
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 git = require('gulp-git'); | |
var inject = require('inject-string'); | |
var q = require('q'); | |
var getHash = function() { | |
var deferred = q.defer(); | |
$.git.revParse({args:'--short HEAD'}, function (err, hash) { | |
deferred.resolve(hash); | |
}); | |
return deferred.promise; |
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
/** | |
* semanticUi - Generic directive for Semantic UI Javascript initialization. | |
*/ | |
'use strict'; | |
angular.module('cozumo') | |
.directive('semanticUi', function ($timeout) { | |
return { | |
restrict: 'A', |
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
.foundation-mq { | |
font-family: "small=0em&medium=40em&large=64em&xlarge=75em&xxlarge=90em"; } | |
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ | |
/** | |
* 1. Set default font family to sans-serif. | |
* 2. Prevent iOS and IE text size adjust after device orientation change, | |
* without disabling user zoom. | |
*/ | |
html { |
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
App.directive('isFocused', function(){ | |
var isFocused = { | |
restrict: 'A', | |
scope: { | |
model: '=isFocused' | |
}, | |
link: function(scope, element, attrs) { | |
scope.model = false; | |
element.focus(function(){ |
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
'use strict'; | |
angular.module('AppSuccess') | |
.directive('scrollSpy', ['$window', function ($window) { | |
return { | |
restrict: 'A', | |
link: function (scope, element) { | |
// Get offset before scrollSpy activates | |
// otherwise offset of element would change |
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
app.directive('verticalAlign', function () { | |
return { | |
restrict: 'A', | |
link: function (scope, elm, attrs) { | |
var childHeight = elm[0].clientHeight; | |
var parentHeight = elm[0].parentElement.clientHeight; | |
var offset = (parentHeight - childHeight) / 2; | |
elm[0].style.paddingTop = offset + 'px'; | |
} | |
} |
OlderNewer