From fca96d641e93407e7aa4cd8a39b2775c675d8e87 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Fri, 30 Dec 2016 18:16:49 +0100 Subject: [PATCH] initial commit --- README.md | 2 +- app/index.html | 5 ++- app/scripts/_app.js | 17 +++++--- app/scripts/_app.spec.js | 6 +-- .../daily-planner/_daily-planner-d.scss | 3 ++ .../daily-planner/daily-planner-d.html | 6 +++ app/scripts/daily-planner/daily-planner-d.js | 39 +++++++++++++++++++ .../daily-planner/daily-planner-d.spec.js | 21 ++++++++++ app/scripts/routes.js | 10 ++--- app/scripts/routes.spec.js | 6 +-- app/styles/main.scss | 2 + bower.json | 12 +++--- config.xml | 6 +-- package.json | 2 +- 14 files changed, 108 insertions(+), 29 deletions(-) create mode 100644 app/scripts/daily-planner/_daily-planner-d.scss create mode 100644 app/scripts/daily-planner/daily-planner-d.html create mode 100644 app/scripts/daily-planner/daily-planner-d.js create mode 100644 app/scripts/daily-planner/daily-planner-d.spec.js diff --git a/README.md b/README.md index 688ac32b8d..821453c9e2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# superProductvity +# superProductivity This project was generated with [yo angular modular generator](https://github.com/johannesjo/generator-modular-angular) version 1.2.4. diff --git a/app/index.html b/app/index.html index 403d791168..1b4a7cf883 100644 --- a/app/index.html +++ b/app/index.html @@ -1,7 +1,7 @@ - Super productvity + Super productivity @@ -30,7 +30,7 @@ TODO configure more restrictive Content-Security-Policy - +
@@ -61,6 +61,7 @@ TODO configure more restrictive Content-Security-Policy + diff --git a/app/scripts/_app.js b/app/scripts/_app.js index 9f98afebef..8962b60132 100644 --- a/app/scripts/_app.js +++ b/app/scripts/_app.js @@ -1,8 +1,8 @@ /** * @ngdoc overview - * @name superProductvity + * @name superProductivity * @description - * # superProductvity + * # superProductivity * * Main module of the application. */ @@ -11,10 +11,17 @@ 'use strict'; angular - .module('superProductvity', [ + .module('superProductivity', [ 'ngAnimate', 'ngAria', 'ngResource', - 'ui.router' - ]); + 'ui.router', + 'LocalStorageModule' + ]) + .config(initLocalStorage); + + function initLocalStorage(localStorageServiceProvider) { + localStorageServiceProvider + .setPrefix('superProductivity'); + } })(); diff --git a/app/scripts/_app.spec.js b/app/scripts/_app.spec.js index 5d99b7903a..5f8cd6ef24 100644 --- a/app/scripts/_app.spec.js +++ b/app/scripts/_app.spec.js @@ -1,9 +1,9 @@ -describe('superProductvity', function () { +describe('superProductivity', function() { 'use strict'; - beforeEach(module('superProductvity')); + beforeEach(module('superProductivity')); - it('should always work', function () { + it('should always work', function() { expect(true) .toBe(true); }); diff --git a/app/scripts/daily-planner/_daily-planner-d.scss b/app/scripts/daily-planner/_daily-planner-d.scss new file mode 100644 index 0000000000..417bd92e2e --- /dev/null +++ b/app/scripts/daily-planner/_daily-planner-d.scss @@ -0,0 +1,3 @@ +daily-planner { + +} \ No newline at end of file diff --git a/app/scripts/daily-planner/daily-planner-d.html b/app/scripts/daily-planner/daily-planner-d.html new file mode 100644 index 0000000000..980256b7f7 --- /dev/null +++ b/app/scripts/daily-planner/daily-planner-d.html @@ -0,0 +1,6 @@ +
+
+ + +
+
\ No newline at end of file diff --git a/app/scripts/daily-planner/daily-planner-d.js b/app/scripts/daily-planner/daily-planner-d.js new file mode 100644 index 0000000000..3b0ddb5913 --- /dev/null +++ b/app/scripts/daily-planner/daily-planner-d.js @@ -0,0 +1,39 @@ +/** + * @ngdoc directive + * @name superProductivity.directive:dailyPlanner + * @description + * # dailyPlanner + */ + +(function() { + 'use strict'; + + angular + .module('superProductivity') + .directive('dailyPlanner', dailyPlanner); + + /* @ngInject */ + function dailyPlanner() { + return { + templateUrl: 'scripts/daily-planner/daily-planner-d.html', + bindToController: true, + controller: DailyPlannerCtrl, + controllerAs: 'vm', + link: linkFn, + restrict: 'E', + scope: { + + } + }; + + function linkFn(scope, element, attrs) { + + } + } + + /* @ngInject */ + function DailyPlannerCtrl() { + var vm = this; + } + +})(); diff --git a/app/scripts/daily-planner/daily-planner-d.spec.js b/app/scripts/daily-planner/daily-planner-d.spec.js new file mode 100644 index 0000000000..fcef911800 --- /dev/null +++ b/app/scripts/daily-planner/daily-planner-d.spec.js @@ -0,0 +1,21 @@ +'use strict'; + +describe('Directive: dailyPlanner', function() { + + // load the directive's module + beforeEach(module('superProductivity')); + beforeEach(module('templates')); + + var element, + scope; + + beforeEach(inject(function($rootScope) { + scope = $rootScope.$new(); + })); + + it('should do something', inject(function($compile) { + element = $compile('')(scope); + scope.$digest(); + expect(true).toBe(true); + })); + }); diff --git a/app/scripts/routes.js b/app/scripts/routes.js index c8127be2a0..39a14fd990 100644 --- a/app/scripts/routes.js +++ b/app/scripts/routes.js @@ -1,17 +1,17 @@ /** * @ngdoc overview - * @name superProductvity.routes + * @name superProductivity.routes * @description - * # superProductvity.routes + * # superProductivity.routes * * Routes module. All app states are defined here. */ -(function () { +(function() { 'use strict'; angular - .module('superProductvity') + .module('superProductivity') .config(routerHelperProvider); /* @ngInject */ @@ -22,7 +22,7 @@ $stateProvider .state('home', { url: '/', - template: '

Hello!

All clean here, as intended! Why not build some routes via "yo moda:r my-route"?

' + template: '' }) /* STATES-NEEDLE - DO NOT REMOVE THIS */; } diff --git a/app/scripts/routes.spec.js b/app/scripts/routes.spec.js index 4e8e7e1a77..b312dfb07e 100644 --- a/app/scripts/routes.spec.js +++ b/app/scripts/routes.spec.js @@ -1,9 +1,9 @@ -describe('superProductvity.routes', function () { +describe('superProductivity.routes', function() { 'use strict'; - beforeEach(module('superProductvity')); + beforeEach(module('superProductivity')); - it('should be defined', function () { + it('should be defined', function() { expect(true).toBe(true); }); }); diff --git a/app/styles/main.scss b/app/styles/main.scss index 28358ac258..d1e05c97a7 100644 --- a/app/styles/main.scss +++ b/app/styles/main.scss @@ -33,4 +33,6 @@ IMPORTANT NOTE: @import 'base/_typography.scss'; +@import '../scripts/daily-planner/_daily-planner-d.scss'; + // endinject diff --git a/bower.json b/bower.json index c71559415d..70848eff0b 100644 --- a/bower.json +++ b/bower.json @@ -1,8 +1,7 @@ { - "name": "superProductvity", + "name": "superProductivity", "version": "0.0.0", - "authors": [ - ], + "authors": [], "license": "none", "private": true, "ignore": [ @@ -20,12 +19,13 @@ "angular-animate": "^1.5.0", "angular-aria": "^1.5.0", "angular-resource": "^1.5.0", - "angular-ui-router": "latest" -}, + "angular-ui-router": "latest", + "angular-local-storage": "^0.5.2" + }, "devDependencies": { "angular-mocks": "^1.5.0" }, - "scripts":{ + "scripts": { "postinstall": "gulp wiredep" } } diff --git a/config.xml b/config.xml index 753e23bbd9..dbc5ef27a5 100644 --- a/config.xml +++ b/config.xml @@ -1,8 +1,8 @@ - - Super productvity + + Super productivity - Super productvity is fabulous + Super productivity is fabulous Your Name diff --git a/package.json b/package.json index e74d2b45c6..dc47c0725e 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "superProductvity", + "name": "superProductivity", "version": "0.0.0", "description": "", "main": "gulpfile.js",