diff --git a/bower.json b/bower.json
index 4fd8d54..c237e4c 100644
--- a/bower.json
+++ b/bower.json
@@ -21,6 +21,7 @@
"ng-table": "^1.0.0",
"angular-ui-select": "^0.19.4",
"angular-sanitize": "^1.5.8",
- "angular-ui-tree": "^2.21.2"
+ "angular-ui-tree": "^2.21.2",
+ "Angular-Markdown-Editor": "angular-markdown-editor#*"
}
}
diff --git a/package.json b/package.json
index 53440b5..cbbb59b 100644
--- a/package.json
+++ b/package.json
@@ -33,5 +33,9 @@
},
"scripts": {
"start": "grunt serve"
+ },
+ "dependencies": {
+ "grunt": "^0.4.5",
+ "grunt-cli": "^1.2.0"
}
}
diff --git a/public/app/app.js b/public/app/app.js
index 6468797..c35096f 100644
--- a/public/app/app.js
+++ b/public/app/app.js
@@ -6,6 +6,7 @@ angular.module('warehost', [
'ui.bootstrap',
'ui.select',
'ui.tree',
+ 'ui.markdown',
'ngTable',
'config',
'session',
diff --git a/public/app/main.jade b/public/app/main.jade
index 9a95997..fde5cf3 100644
--- a/public/app/main.jade
+++ b/public/app/main.jade
@@ -57,6 +57,5 @@
span.glyphicon.glyphicon-log-in
div(style="margin-top:53px;")
.container(ng-if="error.msg")
- .alert.alert-danger(style="margin-top:20px;")
- {{error.msg}}
+ .alert.alert-danger(style="margin-top:20px;") {{error.msg}}
div(ui-view="")
diff --git a/public/app/web/page.jade b/public/app/web/page.jade
index 2cd066c..471f6c5 100644
--- a/public/app/web/page.jade
+++ b/public/app/web/page.jade
@@ -1,28 +1,30 @@
.container
h1 Pages
- a.btn.btn-default(ng-click="isAdding=true")
- span.glyphicon.glyphicon-plus
- form(ng-submit="add()",name="addform",ng-if="isAdding")
- .form-group
- label(for="name") Name
- input.form-control(id="name",name="name",ng-model="obj.name",ng-minlength="3")
- button.btn.btn-primary(type="submit")
- span.glyphicon.glyphicon-floppy-disk
- | Save
- table.table.table-bordered(ng-table="tableParams")
- tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
- td(data-title="'#'") {{item.website.ID}}
- td(data-title="'Name'")
- span(ng-if="!item.isEditing") {{item.website.name}}
- form(name="myform",ng-if="item.isEditing")
- .form-group(ng-class="{'has-error': (error.fields.indexOf('name') >= 0 || !myform.name.$valid)}")
- label(for="name") Name
- input.form-control(id="name",name="name",ng-model="item.website.name")
- td(data-title="'Option'")
- .btn-group.btn-group-xs
- span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing")
- span.glyphicon.glyphicon-pencil
- span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing")
- span.glyphicon.glyphicon-remove-circle
- span.btn.btn-default(ng-click="delete(item)")
- span.glyphicon.glyphicon-trash
+ .row
+ .well.col-md-6(ui-tree)
+ .btn-toolbar
+ .btn-group
+ a.btn.btn-default(ng-click="add(null)")
+ span.glyphicon.glyphicon-plus
+ br
+ .list-group
+ .list-group-item(ng-repeat="item in list") {{item.title}}
+ form.col-md-6(ng-submit="save()")
+ h3(ng-if="obj.ID") Edit
+ h3(ng-if="!obj.ID") New
+ .form-group
+ label(for="title") Title
+ input.form-control(id="title",ng-model="obj.title")
+ .form-group
+ label Under Menu
+ i (http(s)://PLACEHOLDER/{{obj.menu.url}})
+ ui-select(ng-model="obj.menu",theme="bootstrap")
+ ui-select-match {{$select.selected.name}}
+ ui-select-choices(repeat="item in menulist | filter:$select.search")
+ div(ng-bind-html="item.name | highlight: $select.search")
+ .form-group
+ label(for="content") Content
+ textarea.form-control(id="content",ui-markdown-editor="{}",ng-model="obj.content")
+ input.btn.btn-default(type="submit",value="Save")
+ h3 Preview
+ div(ng-bind-markdown="obj.content")
diff --git a/public/components/config.js b/public/components/config.js
index 582a254..181cfdc 100644
--- a/public/components/config.js
+++ b/public/components/config.js
@@ -2,7 +2,7 @@
angular.module('config', [])
.factory('config', function() {
return {
- api: 'http://[::1]:8080',
+ api: 'https://apiv2.warehost.de',
table: {
count: 25
}
diff --git a/public/index.html b/public/index.html
index 2eb5408..2534e4b 100644
--- a/public/index.html
+++ b/public/index.html
@@ -18,6 +18,7 @@
+
@@ -45,6 +46,9 @@
+
+
+