From 3463a78f869a88c6cc64247a34a6bce661559402 Mon Sep 17 00:00:00 2001 From: Jonnie Spratley Date: Sun, 11 Jan 2015 17:17:18 -0800 Subject: [PATCH] updated some files --- Gruntfile.js | 4 +- app/scripts/config.js | 14 +- app/views/index.html | 264 +++++++------------------- app/views/main.html | 2 +- app/views/pages.html | 114 ++++++----- app/views/plugins.html | 151 ++++++++------- app/views/products.html | 44 ----- app/views/reset-password.html | 55 ++---- app/views/settings.html | 53 +++--- app/views/styles.html | 14 -- app/views/themes.html | 51 +++-- app/views/users.html | 58 +++--- app/views/widgets.html | 86 ++++----- config/config.json | 2 +- package.json | 1 + routes/cms-auth.js | 7 +- routes/cms-rest.js | 7 +- routes/cms-router.js | 2 +- test/protractor/spec/register-spec.js | 2 +- 19 files changed, 358 insertions(+), 573 deletions(-) delete mode 100755 app/views/products.html delete mode 100755 app/views/styles.html diff --git a/Gruntfile.js b/Gruntfile.js index e3a507f..6f7de46 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -14,7 +14,7 @@ var startNodeServer = function(){ var server = new cmsRouter.mount(config, _app); }; -var serverEndpoint = 'http://localhost:8181'; +var serverEndpoint = 'http://127.0.0.1:8181'; var proxyConfig = { proxy: { forward: { @@ -456,7 +456,9 @@ module.exports = function (grunt) { 'coffee', 'ngtemplates', 'copy:styles', + //'copy:dist', 'svgmin', + 'imagemin', 'htmlmin' ] }, diff --git a/app/scripts/config.js b/app/scripts/config.js index b18399e..70d8edf 100644 --- a/app/scripts/config.js +++ b/app/scripts/config.js @@ -2,7 +2,7 @@ window.Config = { baseurl: document.location.origin, sitetitle: 'angular-cms', sitedesc: 'This is the description', - sitebrand: '/images/angular-cms-brand.png', + sitebrand: 'images/angular-cms-brand.png', sitecopy: '2014 ', version: '0.1', email: 'jonniespratley@me.com', @@ -16,32 +16,32 @@ window.Config = { id: 1, title: 'HTML5', body: 'Using HTML5 in every way to make a better user experience.', - image: '/images/feature-html5.png' + image: 'images/feature-html5.png' }, { id: 2, title: 'AngularJS', body: 'The client-side framework of choice is Angular, its a full-stack.', - image: '/images/feature-angular.png' + image: 'images/feature-angular.png' }, { id: 3, title: 'Twitter Bootstrap', body: 'The client-side UI of choice is Twitter Bootstrap 3.0.', - image: '/images/feature-bootstrap.png' + image: 'images/feature-bootstrap.png' }, { id: 4, title: 'PhantomJS', body: 'Fully testable with Jasmine Karma Runner Unit e2e with PhantomJS.', - image: '/images/feature-phantomjs.png' + image: 'images/feature-phantomjs.png' }, { id: 5, title: 'NodeJS', body: 'The server of choice is NodeJS, its fast and scalable.', - image: '/images/feature-nodejs.png' + image: 'images/feature-nodejs.png' }, { id: 6, title: 'MongoDB', body: 'The database of choice is Mongo, its fast and scalable.', - image: '/images/feature-mongodb.png' + image: 'images/feature-mongodb.png' } ], session: { diff --git a/app/views/index.html b/app/views/index.html index ea9700b..4e8fde0 100755 --- a/app/views/index.html +++ b/app/views/index.html @@ -1,196 +1,70 @@ - +
+ - - - - Themes - - - - - - - - - - - - -
-
- - -
- - - -
-
-
-
- -
-
- Current Theme

Twenty Twelve 1.0

-

The 2012 theme for Angular-CMS takes us back to the Bootstrap 2.3, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.

-

OPTIONS: Widgets | Menus | Header

-
-
-
-
-
- -

Twenty Thirteen

-

By jonniespratley

- -
-
- -

Twenty Fourteen

-

By jonniespratley

- -
-
-
-
- -
- -
-
-

© Company 2013

-
-
- - - - - \ No newline at end of file + + +
+
+
+
+ +
+
+ Current Theme

Twenty Twelve 1.0

+

+ The 2012 theme for Angular-CMS takes us back to the Bootstrap 2.3, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small. +

+

+ OPTIONS:Widgets | Menus | Header +

+
+
+
+
+
+ +

Twenty Thirteen

+

+ By jonniespratley +

+ +
+
+ +

Twenty Fourteen

+

+ By jonniespratley +

+ +
+
+
+
+ diff --git a/app/views/main.html b/app/views/main.html index 625ccae..2331017 100755 --- a/app/views/main.html +++ b/app/views/main.html @@ -28,7 +28,7 @@

-
+
-
- -
-
-
-
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + +
+ + TitleDateActions
+ + {{page.title}}{{page.publish}}{{page.created | date:'medium'}} +
+ + +
- - - - - - - - - - - - - - - - - - - - -
- - TitleDateActions
- - - {{page.title}} - {{page.publish}} - {{page.created | date:'medium'}} -
- - -
-
- - - - - - - -
-
-
-
-
-
-
- - -
-
+
+
+
+
+
+
+ + +
+
+
diff --git a/app/views/plugins.html b/app/views/plugins.html index 8642973..b16b60a 100755 --- a/app/views/plugins.html +++ b/app/views/plugins.html @@ -3,82 +3,91 @@
+
+
+ +
+ + +
+ +
+
+ -
-
- - +
+
+ + + + + + + + + + + + + + + +
+ + PluginDescription
+ + {{plugin.title}}{{plugin.description}}
+
+
+

+ 1 - 10 of 146 items 10 Per Page +

+
+
+ +
- -
-
- - -
-
-
- - - - - - - - - - - - - - - -
- - PluginDescription
- - {{plugin.title}}{{plugin.description}}
-
-
-

1 - 10 of 146 items 10 Per Page

-
-
- -
-
-
- \ No newline at end of file diff --git a/app/views/products.html b/app/views/products.html deleted file mode 100755 index 120352f..0000000 --- a/app/views/products.html +++ /dev/null @@ -1,44 +0,0 @@ - - -
- - -
-
-
- -
- -
-
-
- -
-
-
- -
- -
-
-

© Company 2013

-
-
- \ No newline at end of file diff --git a/app/views/reset-password.html b/app/views/reset-password.html index d1b33f8..f35247d 100755 --- a/app/views/reset-password.html +++ b/app/views/reset-password.html @@ -1,35 +1,20 @@ - - - - - - Forgot Password Page - - - - - - - - - - - - \ No newline at end of file + diff --git a/app/views/settings.html b/app/views/settings.html index f0788d7..800c59d 100755 --- a/app/views/settings.html +++ b/app/views/settings.html @@ -3,15 +3,12 @@
- -
-
+ fg-schema="myForm.schema">
@@ -25,23 +22,23 @@
-
-
Example Form
+
+ Example Form +
-
+ fg-form-data="myForm.$data" + fg-schema="myForm.schema">
@@ -53,34 +50,30 @@ - - - - - - - General + + General + @@ -88,14 +81,14 @@ - Network - + + Network + -
-

+
@@ -12,40 +11,38 @@

Users
- - - - - - - - + + + + + + + + - - + - - + + - {{group}} - - - - - + + - + +
UsernameE-mailActiveLast UpdatedActions
+ + UsernameE-mailActiveLast UpdatedActions
+
- {{ user.username }} {{user.email}} + {{ user.username }} {{user.email}} {{group}} {{user.active}} {{user.updated_at | date:'medium'}} + {{user.active}} {{user.updated_at | date:'medium'}}
-
-
@@ -71,17 +68,16 @@

+ autofocus>
-
+ ng-disabled="user._id">
@@ -96,7 +92,7 @@
diff --git a/app/views/widgets.html b/app/views/widgets.html index d0e3a7e..d23f304 100755 --- a/app/views/widgets.html +++ b/app/views/widgets.html @@ -1,58 +1,58 @@ - -

Widgets

-
-
-
-
-
-
-
+

Widgets

+
+
+
+
+
+
+
NAVBAR
-
-
-
-
+
+
+
+
CONTENT
-
-
+
+
SIDEBAR
-
-
+
+
-
-
+
+
-
-
- - -
-
-
-
- -
-
-
-
+
+
+
+
+
+
+ +
+
+
+
App.widgets: {{App.widgets | json}}
+ diff --git a/config/config.json b/config/config.json index 2f39f37..390bccf 100644 --- a/config/config.json +++ b/config/config.json @@ -30,7 +30,7 @@ "password":"isyourdaughter18?" }, "proxy":{ - "hostname":"localhost", + "hostname":"127.0.0.1", "port":5001 }, "staticDir":"dist", diff --git a/package.json b/package.json index 02e843f..2963512 100755 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ "grunt-contrib-copy": "~0.4.1", "grunt-contrib-cssmin": "~0.7.0", "grunt-contrib-htmlmin": "~0.1.3", + "grunt-contrib-imagemin": "^0.9.2", "grunt-contrib-jasmine": "~0.5.2", "grunt-contrib-jshint": "~0.7.1", "grunt-contrib-less": "~0.9.0", diff --git a/routes/cms-auth.js b/routes/cms-auth.js index cf52120..ac44b92 100644 --- a/routes/cms-auth.js +++ b/routes/cms-auth.js @@ -123,12 +123,7 @@ var cmsAuth = function(config, app) { } }; - //Always users table - app.use(session({ - secret : 'angular-cms', - resave : true, - saveUninitialized : true - })); + app.get(config.apiBase + '/login', bodyParser.json(), cmsAuth.login); app.post(config.apiBase + '/login', bodyParser.json(), cmsAuth.login); app.post(config.apiBase + '/register', bodyParser.json(), cmsAuth.register); diff --git a/routes/cms-rest.js b/routes/cms-rest.js index c6c286a..a411e5e 100644 --- a/routes/cms-rest.js +++ b/routes/cms-rest.js @@ -7,7 +7,6 @@ module.exports = function (config, app) { 'use strict'; var router = express.Router(); -// a middleware with no mount path, gets executed for every request to the router router.use(function (req, res, next) { console.log('cms-rest Time:', Date.now()); next(); @@ -18,9 +17,9 @@ module.exports = function (config, app) { router.get( config.apiBase + '/readme', RestResource.readme ); //Dynamic REST - router.get( config.apiBase + '/:db/:collection/:id?', RestResource.get ) - router.post( config.apiBase + '/:db/:collection/:id?', bodyParser.json(), RestResource.add ) - router.put( config.apiBase + '/:db/:collection/:id?', bodyParser.json(), RestResource.edit ) + router.get( config.apiBase + '/:db/:collection/:id?', RestResource.get ); + router.post( config.apiBase + '/:db/:collection/:id?', bodyParser.json(), RestResource.add ); + router.put( config.apiBase + '/:db/:collection/:id?', bodyParser.json(), RestResource.edit ); router.delete( config.apiBase + '/:db/:collection/:id?', RestResource.destroy ); console.warn( 'cms-rest', 'initialized' ); diff --git a/routes/cms-router.js b/routes/cms-router.js index add095c..126acd3 100644 --- a/routes/cms-router.js +++ b/routes/cms-router.js @@ -17,9 +17,9 @@ module.exports.mount = function(config, app) { require('./cms-auth')(config, app); require('./cms-passport')(config, app); require('./cms-upload')(config, app); + require('./cms-server')(config, app); require('./cms-rest')(config, app); require('./cms-proxy')(config, app); - require('./cms-server')(config, app); require('./cms-sockets')(config, server); diff --git a/test/protractor/spec/register-spec.js b/test/protractor/spec/register-spec.js index 0386f44..73a0a07 100644 --- a/test/protractor/spec/register-spec.js +++ b/test/protractor/spec/register-spec.js @@ -9,7 +9,7 @@ describe('Register: ', function () { registerPage.get(); expect(browser.getCurrentUrl()).toContain('register'); return registerPage.register(testEmail, 'test').then(function () { - return expect(browser.getCurrentUrl()).toContain('dashboard'); + return expect(browser.getCurrentUrl()).toContain('login'); }); }); });