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
/* | |
grunt task that calls bower install with --force-latest | |
simply call 'bower' from a registerTask. | |
grunt.registerTask('install', [ | |
'clean', | |
'bower', | |
'bower_postinst' // good grunt plugin if you want to build something from sources, in my case I'm building angular-bootstraps 3.0.0 branch | |
]); | |
*/ |
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
import sbt._ | |
import Keys._ | |
import java.net._ | |
import java.io.File | |
import play.PlayRunHook | |
/* | |
Grunt runner should be in project directory to be picked up by sbt | |
*/ | |
object Grunt { |
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
$stateProvider.state('main', { | |
abstract: true, | |
url: '/:account', | |
resolve: { | |
auth: function ($q, $state, $stateParams, $location, AccountRepo, Security) { | |
return AccountRepo.auth().then(function (user) { | |
// If not logged in redirect to login with path preserved | |
if (user === false) { | |
$state.go('account.login', {redirect: $location.url()}); | |
return $q.reject('not logged in'); |
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
{ | |
"directory": "bower_components", | |
"json": "bower.json" | |
} |
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').directive('ngBindHtmlUnsafe', function ($sce) { | |
return { | |
constrain: 'E', | |
link: function (scope, element, attr) { | |
scope.$watch($sce.parseAsHtml(attr.ngBindHtmlUnsafe), function(value) { | |
element.html(value || ''); | |
}); | |
} |
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
.state("items.add", { | |
url: "/add", | |
onEnter: function($stateParams, $state, $dialog, $resource) { | |
var Item = $resource(...); | |
$dialog.dialog({ | |
keyboard: true, | |
templateUrl: "items/add", | |
backdropClick: 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
package controllers | |
import play.api.mvc._ | |
import play.api.libs.json._ | |
import reactivemongo.bson._ | |
import models._ | |
import extensions._ | |
import extensions.JsonTransforms._ |
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
package models | |
import scala.concurrent.{Future, ExecutionContext} | |
import reactivemongo.core.commands.{GetLastError, LastError} | |
import play.modules.reactivemongo.json.collection.JSONGenericHandlers | |
import reactivemongo.api.collections.GenericCollection | |
import play.api.libs.json.Json.JsValueWrapper | |
// Reactive Mongo imports | |
import reactivemongo.api._ |
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
/* | |
AngularJS v1.1.5-77ff108 | |
(c) 2010-2012 Google, Inc. http://angularjs.org | |
License: MIT | |
*/ | |
(function(M,X,s){'use strict';function jc(){var b=M.angular;M.angular=kc;return b}function o(b,a,c){var d;if(b)if(H(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==o)b.forEach(a,c);else if(!b||typeof b.length!=="number"?0:typeof b.hasOwnProperty!="function"&&typeof b.constructor!="function"||b instanceof O||ea&&b instanceof ea||Da.call(b)!=="[object Object]"||typeof b.callee==="function")for(d=0;d<b.length;d++)a.call(c,b[d], | |
d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function pb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function lc(b,a,c){for(var d=pb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function qb(b){return function(a,c){b(c,a)}}function Ea(){for(var b=$.length,a;b;){b--;a=$[b].charCodeAt(0);if(a==57)return $[b]="A",$.join("");if(a==90)$[b]="0";else return $[b]=String.fro |
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 module:false*/ | |
module.exports = function (grunt) { | |
'use strict'; | |
grunt.loadNpmTasks('grunt-hub'); | |
grunt.initConfig({ | |
hub: { | |
all: { | |
files: { |