diff --git a/client/app/app.styl b/client/app/app.styl index 2fa5441..f6a3884 100644 --- a/client/app/app.styl +++ b/client/app/app.styl @@ -1,47 +1,48 @@ @import "font-awesome/css/font-awesome.css" @import "bootstrap/dist/css/bootstrap.css" // // Bootstrap Fonts // @font-face font-family: 'Glyphicons Halflings' src: url('../bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot') src: url('../bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'), url('../bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../bower_components/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); // // Font Awesome Fonts // @font-face font-family: 'FontAwesome' src: url('../bower_components/font-awesome/fonts/fontawesome-webfont.eot?v=4.1.0') src: url('../bower_components/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), url('../bower_components/font-awesome/fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), url('../bower_components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'), url('../bower_components/font-awesome/fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg'); font-weight: normal font-style: normal // // App-wide Styles // .browsehappy background #ccc color #000 margin 0.2em 0 padding 0.2em 0 // Component styles are injected through grunt // injector @import 'account/login/login.styl'; @import 'admin/admin.styl'; +@import 'editor/editor.styl'; @import 'main/main.styl'; @import 'import/import.styl'; @import 'modal/modal.styl'; // endinjector \ No newline at end of file diff --git a/client/app/editor/editor.controller.js b/client/app/editor/editor.controller.js new file mode 100644 index 0000000..757844e --- /dev/null +++ b/client/app/editor/editor.controller.js @@ -0,0 +1,6 @@ +'use strict'; + +angular.module('manticoreApp') + .controller('EditorCtrl', function ($scope) { + $scope.message = 'Hello'; + }); diff --git a/client/app/editor/editor.controller.spec.js b/client/app/editor/editor.controller.spec.js new file mode 100644 index 0000000..d1e6464 --- /dev/null +++ b/client/app/editor/editor.controller.spec.js @@ -0,0 +1,21 @@ +'use strict'; + +describe('Controller: EditorCtrl', function () { + + // load the controller's module + beforeEach(module('manticoreApp')); + + var EditorCtrl, scope; + + // Initialize the controller and a mock scope + beforeEach(inject(function ($controller, $rootScope) { + scope = $rootScope.$new(); + EditorCtrl = $controller('EditorCtrl', { + $scope: scope + }); + })); + + it('should ...', function () { + expect(1).toEqual(1); + }); +}); diff --git a/client/app/editor/editor.jade b/client/app/editor/editor.jade new file mode 100644 index 0000000..ec056f8 --- /dev/null +++ b/client/app/editor/editor.jade @@ -0,0 +1,3 @@ +div(ng-include='"components/navbar/navbar.html"') +.container + | This is the editor view. diff --git a/client/app/editor/editor.js b/client/app/editor/editor.js new file mode 100644 index 0000000..da10e49 --- /dev/null +++ b/client/app/editor/editor.js @@ -0,0 +1,11 @@ +'use strict'; + +angular.module('manticoreApp') + .config(function ($stateProvider) { + $stateProvider + .state('editor', { + url: '/document/:id', + templateUrl: 'app/editor/editor.html', + controller: 'EditorCtrl' + }); + }); diff --git a/client/app/editor/editor.styl b/client/app/editor/editor.styl new file mode 100644 index 0000000..e69de29 diff --git a/client/app/main/main.controller.js b/client/app/main/main.controller.js index 524bfcb..f38ffcd 100644 --- a/client/app/main/main.controller.js +++ b/client/app/main/main.controller.js @@ -1,24 +1,26 @@ 'use strict'; angular.module('manticoreApp') .controller('MainCtrl', function ($scope, $http, Auth) { $scope.documents = []; $scope.isLoggedIn = Auth.isLoggedIn; - $http.get('/api/documents').success(function(documents) { - $scope.documents = documents; - }); + if ($scope.isLoggedIn()) { + $http.get('/api/documents').success(function(documents) { + $scope.documents = documents; + }); + } $scope.openDocument = function (document) { $http.get('/api/documents/snapshot/' + _.last(document.chunks)) .success(function (data) { - + }).error(function (data) { console.log(data); }) }; $scope.deleteDocument = function(document) { $http.delete('/api/documents/' + document._id); }; }); diff --git a/client/index.html b/client/index.html index 7cc0531..d53f82b 100644 --- a/client/index.html +++ b/client/index.html @@ -1,70 +1,72 @@
+ +