-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4afa64
commit afdd226
Showing
9 changed files
with
162 additions
and
53 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,19 @@ window.Config = | |
sitecopy: "2014 " | ||
version: '0.1' | ||
email: "[email protected]" | ||
"staticDir": "www/cms-content" | ||
"publicDir": "www" | ||
"uploadsTmpDir": ".tmp" | ||
"uploadsDestDir": "www/cms-content/uploads" | ||
"uploadsUrl": ":8181/cms-content/" | ||
"logFormat": "[:date] - [:method] - :url - :status - :response-time ms" | ||
debug: true | ||
|
||
#I hold the home page feature content | ||
feature: | ||
feature: | ||
title: 'angular-cms' | ||
body: 'A content management system of some sort.' | ||
|
||
features: [ | ||
id: 1 | ||
title: "HTML5" | ||
|
@@ -44,12 +50,12 @@ window.Config = | |
body: "The database of choice is Mongo, its fast and scalable." | ||
image: "/images/feature-mongodb.png" | ||
] | ||
session: | ||
|
||
session: | ||
authorized: false | ||
user: null | ||
layout: | ||
|
||
layout: | ||
header: "views/_header.html" | ||
sidebar: "views/_sidebar.html" | ||
content:"views/_content.html" | ||
|
@@ -125,13 +131,13 @@ window.Config = | |
currentdate: new Date() | ||
dateformats: ["medium", "short", "fullDate", "longDate", "mediumDate", "shortDate"] | ||
timeformats: ["mediumTime", "shortTime"] | ||
|
||
#Default date format | ||
dateformat: "medium" | ||
|
||
#Default time format | ||
timeformat: "shortTime" | ||
|
||
#Default timezone | ||
timezone: null | ||
servers: [ | ||
|
@@ -145,26 +151,26 @@ window.Config = | |
port: 3000 | ||
body: "This is the v2 api server" | ||
] | ||
|
||
#SocketIO configuration | ||
socketio: | ||
host: "127.1.0.1" | ||
port: 8081 | ||
|
||
|
||
#Network configuration | ||
network: | ||
online: true | ||
cache: true | ||
|
||
|
||
#Database configuration | ||
database: | ||
host: "127.1.0.1" | ||
port: 27017 | ||
name: "angular-cms" | ||
|
||
|
||
#API configuration. | ||
api: | ||
url: "" | ||
|
@@ -220,4 +226,4 @@ window.Config = | |
user: | ||
username: '' | ||
password: '' | ||
message: "Welcome {{user.username}}" | ||
message: "Welcome {{user.username}}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,13 @@ | ||
'use strict' | ||
angular.module('angularCmsApp').controller 'MediaCtrl', ($scope, $http, DataService) -> | ||
$scope.awesomeThings = ['HTML5 Boilerplate', 'AngularJS','Karma'] | ||
$scope.awesomeThings = ['HTML5 Boilerplate', 'AngularJS', 'Karma'] | ||
|
||
$scope.uploads = [] | ||
$scope.getUploads = () -> | ||
DataService.fetch('uploads').then((res)-> | ||
$scope.uploads = res.data | ||
) | ||
|
||
$ -> | ||
$("#fileupload").fileupload( | ||
dataType: 'json' | ||
dropZone: $('.dropzone') | ||
add: (e, data) -> | ||
console.log(e, data) | ||
|
||
data.url = '/api/upload' | ||
data.context = $('<p/>').text('Uploading...').appendTo(document.body) | ||
data.submit() | ||
progressall: (e, data) -> | ||
progress = parseInt(data.loaded / data.total * 100, 10) | ||
$("#progress .bar").css "width", progress + "%" | ||
done: (e, data) -> | ||
$.each data.result.files, (index, file) -> | ||
$("<p/>").text(file.name).appendTo document.body | ||
) | ||
|
||
$scope.uploader = { | ||
files: [] | ||
}; | ||
|
||
$scope.getUploads() |
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
var mongoose = require( 'mongoose' ); | ||
|
||
|
||
module.exports = mongoose.model( 'Upload', mongoose.Schema( { | ||
name: String, | ||
filename: String, | ||
size: Number, | ||
url: String, | ||
type: String, | ||
path: String, | ||
meta: Object, | ||
created: Date, | ||
updated: Date | ||
} ) ); |