Skip to content

Commit

Permalink
fixed merges
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniespratley committed Dec 20, 2014
2 parents d32f469 + 59efece commit 37221ff
Show file tree
Hide file tree
Showing 36 changed files with 927 additions and 998 deletions.
17 changes: 10 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* jshint camelcase:false */
var fs = require('fs');
var express = require('express');
var cmsRouter = require('./routes/cms-router.js');
'use strict';

// # Globbing
Expand All @@ -11,6 +13,12 @@ var fs = require('fs');
* @TODO - Externalize configuration for server and proxy, mongodb
*/

var startNodeServer = function(options, app){
var app = express();
var config = JSON.parse(fs.readFileSync('./config/config.json'));
var server = new cmsRouter.mount(config, app);
};

var serverEndpoint = 'http://localhost:8181';
var proxyConfig = {
proxy: {
Expand Down Expand Up @@ -59,7 +67,7 @@ module.exports = function (grunt) {
tasks: ['newer:copy:styles', 'autoprefixer']
},
scripts: {
files: ['<%= yeoman.app %>/scripts/{,**/}*.js'],
files: ['<%= yeoman.app %>/scripts/{,** /}*.js'],
tasks: ['jshint:app']
},
gruntfile: {
Expand Down Expand Up @@ -95,12 +103,7 @@ module.exports = function (grunt) {
open: true,
base: ['.tmp', '<%= yeoman.app %>'],
middleware: function (connect, options) {
var express = require('express');
var fs = require('fs');
var cmsRouter = require('./routes/cms-router.js');
var app = express();
var config = JSON.parse(fs.readFileSync('./config/config.json'));
var server = new cmsRouter.mount(config, app);
startNodeServer(options, connect);
return [
require('json-proxy').initialize(proxyConfig),
mountFolder(connect, '.grunt'),
Expand Down
16 changes: 10 additions & 6 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/config.js"></script>
<script src="scripts/app.js"></script>
<!--script src="scripts/templates.js"></script-->

<script src="scripts/templates.js"></script>
<script src="scripts/controllers/main.js"></script>
<script src="scripts/controllers/docs.js"></script>
<script src="scripts/controllers/admin.js"></script>
Expand All @@ -138,19 +139,22 @@
<script src="scripts/controllers/help.js"></script>
<script src="scripts/controllers/app.js"></script>
<script src="scripts/filters/gravatar.js"></script>

<script src="scripts/directives/cms-formgroup.js"></script>
<script src="scripts/directives/cms-widgets.js"></script>
<script src="scripts/directives/cms-widget.js"></script>
<script src="scripts/directives/cms-uploader.js"></script>
<script src="scripts/directives/cms-header.js"></script>
<script src="scripts/directives/cms-gravatar.js"></script>
<script src="scripts/services/dataservice.js"></script>

<!--script src="scripts/services/cmsdataserviceprovider.js"></script-->
<script src="scripts/services/cmsdataservicefactory.js"></script>
<script src="scripts/services/cmsusersfactory.js"></script>
<script src="scripts/services/cmsauthservice.js"></script>
<script src="scripts/services/cmssessionservice.js"></script>
<script src="scripts/services/cmsnotify.js"></script>
<script src="scripts/services/cms-dataservicefactory.js"></script>
<script src="scripts/services/cms-usersfactory.js"></script>
<script src="scripts/services/cms-authservice.js"></script>
<script src="scripts/services/cms-sessionservice.js"></script>
<script src="scripts/services/cms-socketservice.js"></script>
<script src="scripts/services/cms-notify.js"></script>

<!-- endbuild -->
</body>
Expand Down
159 changes: 78 additions & 81 deletions app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,86 +10,83 @@
* Resize textarea automatically to the size of its text content.
*
* @example
<example module="rfx">
<file name="index.html">
<textarea ng-model="text" r-autogrow class="input-block-level"></textarea>
<pre>{{text}}</pre>
</file>
</example>
<example module='rfx'>
<file name='index.html'>
<textarea ng-model='text' r-autogrow class='input-block-level'></textarea>
<pre>{{text}}</pre>
</file>
</example>
*/
var app;

Parse.initialize("fYHs4Flnj7vgVHm9vaFiFTSKt5Mj2Bxf9e93mTOB", "QPFGBNHs0QQHFS54atV71oKppd3gTgaFfQIHP2VW");

app = angular.module('angularCmsApp', ['ngCookies', 'ngResource', 'ngSanitize', 'ngRoute', 'ngAnimate', 'mgcrea.ngStrap', 'fg']).config(function($routeProvider) {
var routeResolver;
routeResolver = {
delay: function($q, $timeout) {
var delay;
delay = $q.defer();
$timeout(delay.resolve, 1000);
return delay.promise;
}
};
return $routeProvider.when('/', {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
}).when('/docs', {
templateUrl: 'views/docs.html',
controller: 'DocsCtrl'
}).when('/admin', {
templateUrl: 'views/admin.html',
controller: 'AdminCtrl'
}).when('/plugins', {
templateUrl: 'views/plugins.html',
controller: 'PluginsCtrl'
}).when('/themes', {
templateUrl: 'views/themes.html',
controller: 'ThemesCtrl'
}).when('/widgets', {
templateUrl: 'views/widgets.html',
controller: 'WidgetsCtrl'
}).when('/media', {
templateUrl: 'views/media.html',
controller: 'MediaCtrl'
}).when('/settings', {
templateUrl: 'views/settings.html',
controller: 'SettingsCtrl'
}).when('/users', {
templateUrl: 'views/users.html',
controller: 'UsersCtrl'
}).when('/login', {
templateUrl: 'views/login.html',
controller: 'LoginCtrl'
}).when('/register', {
templateUrl: 'views/register.html',
controller: 'RegisterCtrl'
}).when('/dashboard', {
templateUrl: 'views/dashboard.html',
controller: 'DashboardCtrl'
}).when('/profile', {
templateUrl: 'views/profile.html',
controller: 'ProfileCtrl'
}).when('/pages', {
templateUrl: 'views/pages.html',
controller: 'PagesCtrl',
resolve: {
pages: function(DataService) {
return DataService.fetch('pages').then(function(res) {
return res.data;
});
}
}
}).when('/help', {
templateUrl: 'views/help.html',
controller: 'HelpCtrl'
}).when('/forgot-password', {
templateUrl: 'views/forgot-password.html',
controller: 'ForgotPasswordCtrl'
}).when('/register', {
templateUrl: 'views/register.html',
controller: 'RegisterCtrl'
}).otherwise({
redirectTo: '/'
});
Parse.initialize('fYHs4Flnj7vgVHm9vaFiFTSKt5Mj2Bxf9e93mTOB', 'QPFGBNHs0QQHFS54atV71oKppd3gTgaFfQIHP2VW');
var app = angular.module('angularCmsApp', ['ngCookies', 'ngResource', 'ngSanitize', 'ngRoute', 'ngAnimate', 'mgcrea.ngStrap', 'fg']).config(function ($routeProvider) {
var routeResolver;
routeResolver = {
delay: function ($q, $timeout) {
var delay;
delay = $q.defer();
$timeout(delay.resolve, 1000);
delay.promise;
}
};
$routeProvider.when('/', {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
}).when('/docs', {
templateUrl: 'views/docs.html',
controller: 'DocsCtrl'
}).when('/admin', {
templateUrl: 'views/admin.html',
controller: 'AdminCtrl'
}).when('/plugins', {
templateUrl: 'views/plugins.html',
controller: 'PluginsCtrl'
}).when('/themes', {
templateUrl: 'views/themes.html',
controller: 'ThemesCtrl'
}).when('/widgets', {
templateUrl: 'views/widgets.html',
controller: 'WidgetsCtrl'
}).when('/media', {
templateUrl: 'views/media.html',
controller: 'MediaCtrl'
}).when('/settings', {
templateUrl: 'views/settings.html',
controller: 'SettingsCtrl'
}).when('/users', {
templateUrl: 'views/users.html',
controller: 'UsersCtrl'
}).when('/login', {
templateUrl: 'views/login.html',
controller: 'LoginCtrl'
}).when('/register', {
templateUrl: 'views/register.html',
controller: 'RegisterCtrl'
}).when('/dashboard', {
templateUrl: 'views/dashboard.html',
controller: 'DashboardCtrl'
}).when('/profile', {
templateUrl: 'views/profile.html',
controller: 'ProfileCtrl'
}).when('/pages', {
templateUrl: 'views/pages.html',
controller: 'PagesCtrl',
resolve: {
pages: function (DataService) {
return DataService.fetch('pages').then(function (res) {
return res.data;
});
}
}
}).when('/help', {
templateUrl: 'views/help.html',
controller: 'HelpCtrl'
}).when('/forgot-password', {
templateUrl: 'views/forgot-password.html',
controller: 'ForgotPasswordCtrl'
}).when('/register', {
templateUrl: 'views/register.html',
controller: 'RegisterCtrl'
}).otherwise({
redirectTo: '/'
});
});
Loading

0 comments on commit 37221ff

Please sign in to comment.