markdown try
This commit is contained in:
parent
ad49e34e53
commit
1aa06051b5
|
@ -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#*"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,5 +33,9 @@
|
|||
},
|
||||
"scripts": {
|
||||
"start": "grunt serve"
|
||||
},
|
||||
"dependencies": {
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-cli": "^1.2.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ angular.module('warehost', [
|
|||
'ui.bootstrap',
|
||||
'ui.select',
|
||||
'ui.tree',
|
||||
'ui.markdown',
|
||||
'ngTable',
|
||||
'config',
|
||||
'session',
|
||||
|
|
|
@ -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="")
|
||||
|
|
|
@ -1,28 +1,30 @@
|
|||
.container
|
||||
h1 Pages
|
||||
a.btn.btn-default(ng-click="isAdding=true")
|
||||
.row
|
||||
.well.col-md-6(ui-tree)
|
||||
.btn-toolbar
|
||||
.btn-group
|
||||
a.btn.btn-default(ng-click="add(null)")
|
||||
span.glyphicon.glyphicon-plus
|
||||
form(ng-submit="add()",name="addform",ng-if="isAdding")
|
||||
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="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
|
||||
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")
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
angular.module('config', [])
|
||||
.factory('config', function() {
|
||||
return {
|
||||
api: 'http://[::1]:8080',
|
||||
api: 'https://apiv2.warehost.de',
|
||||
table: {
|
||||
count: 25
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<link rel="stylesheet" href="bower_components/ng-table/dist/ng-table.css" />
|
||||
<link rel="stylesheet" href="bower_components/angular-ui-select/dist/select.css" />
|
||||
<link rel="stylesheet" href="bower_components/angular-ui-tree/dist/angular-ui-tree.css" />
|
||||
<link rel="stylesheet" href="bower_components/codemirror/lib/codemirror.css" />
|
||||
<!-- endbower -->
|
||||
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="bower_components/bootswatch/paper/bootstrap.min.css" />
|
||||
|
@ -45,6 +46,9 @@
|
|||
<script src="bower_components/ng-table/dist/ng-table.js"></script>
|
||||
<script src="bower_components/angular-ui-select/dist/select.js"></script>
|
||||
<script src="bower_components/angular-ui-tree/dist/angular-ui-tree.js"></script>
|
||||
<script src="bower_components/showdown/src/showdown.js"></script>
|
||||
<script src="bower_components/codemirror/lib/codemirror.js"></script>
|
||||
<script src="bower_components/Angular-Markdown-Editor/demo/dist/angular-markdown-editor.js"></script>
|
||||
<!-- endbower -->
|
||||
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
|
||||
<!-- endbuild -->
|
||||
|
|
Reference in New Issue