markdown try
This commit is contained in:
parent
ad49e34e53
commit
1aa06051b5
|
@ -21,6 +21,7 @@
|
||||||
"ng-table": "^1.0.0",
|
"ng-table": "^1.0.0",
|
||||||
"angular-ui-select": "^0.19.4",
|
"angular-ui-select": "^0.19.4",
|
||||||
"angular-sanitize": "^1.5.8",
|
"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": {
|
"scripts": {
|
||||||
"start": "grunt serve"
|
"start": "grunt serve"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"grunt": "^0.4.5",
|
||||||
|
"grunt-cli": "^1.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ angular.module('warehost', [
|
||||||
'ui.bootstrap',
|
'ui.bootstrap',
|
||||||
'ui.select',
|
'ui.select',
|
||||||
'ui.tree',
|
'ui.tree',
|
||||||
|
'ui.markdown',
|
||||||
'ngTable',
|
'ngTable',
|
||||||
'config',
|
'config',
|
||||||
'session',
|
'session',
|
||||||
|
|
|
@ -57,6 +57,5 @@
|
||||||
span.glyphicon.glyphicon-log-in
|
span.glyphicon.glyphicon-log-in
|
||||||
div(style="margin-top:53px;")
|
div(style="margin-top:53px;")
|
||||||
.container(ng-if="error.msg")
|
.container(ng-if="error.msg")
|
||||||
.alert.alert-danger(style="margin-top:20px;")
|
.alert.alert-danger(style="margin-top:20px;") {{error.msg}}
|
||||||
{{error.msg}}
|
|
||||||
div(ui-view="")
|
div(ui-view="")
|
||||||
|
|
|
@ -1,28 +1,30 @@
|
||||||
.container
|
.container
|
||||||
h1 Pages
|
h1 Pages
|
||||||
a.btn.btn-default(ng-click="isAdding=true")
|
.row
|
||||||
span.glyphicon.glyphicon-plus
|
.well.col-md-6(ui-tree)
|
||||||
form(ng-submit="add()",name="addform",ng-if="isAdding")
|
.btn-toolbar
|
||||||
.form-group
|
.btn-group
|
||||||
label(for="name") Name
|
a.btn.btn-default(ng-click="add(null)")
|
||||||
input.form-control(id="name",name="name",ng-model="obj.name",ng-minlength="3")
|
span.glyphicon.glyphicon-plus
|
||||||
button.btn.btn-primary(type="submit")
|
br
|
||||||
span.glyphicon.glyphicon-floppy-disk
|
.list-group
|
||||||
| Save
|
.list-group-item(ng-repeat="item in list") {{item.title}}
|
||||||
table.table.table-bordered(ng-table="tableParams")
|
form.col-md-6(ng-submit="save()")
|
||||||
tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
|
h3(ng-if="obj.ID") Edit
|
||||||
td(data-title="'#'") {{item.website.ID}}
|
h3(ng-if="!obj.ID") New
|
||||||
td(data-title="'Name'")
|
.form-group
|
||||||
span(ng-if="!item.isEditing") {{item.website.name}}
|
label(for="title") Title
|
||||||
form(name="myform",ng-if="item.isEditing")
|
input.form-control(id="title",ng-model="obj.title")
|
||||||
.form-group(ng-class="{'has-error': (error.fields.indexOf('name') >= 0 || !myform.name.$valid)}")
|
.form-group
|
||||||
label(for="name") Name
|
label Under Menu
|
||||||
input.form-control(id="name",name="name",ng-model="item.website.name")
|
i (http(s)://PLACEHOLDER/{{obj.menu.url}})
|
||||||
td(data-title="'Option'")
|
ui-select(ng-model="obj.menu",theme="bootstrap")
|
||||||
.btn-group.btn-group-xs
|
ui-select-match {{$select.selected.name}}
|
||||||
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing")
|
ui-select-choices(repeat="item in menulist | filter:$select.search")
|
||||||
span.glyphicon.glyphicon-pencil
|
div(ng-bind-html="item.name | highlight: $select.search")
|
||||||
span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing")
|
.form-group
|
||||||
span.glyphicon.glyphicon-remove-circle
|
label(for="content") Content
|
||||||
span.btn.btn-default(ng-click="delete(item)")
|
textarea.form-control(id="content",ui-markdown-editor="{}",ng-model="obj.content")
|
||||||
span.glyphicon.glyphicon-trash
|
input.btn.btn-default(type="submit",value="Save")
|
||||||
|
h3 Preview
|
||||||
|
div(ng-bind-markdown="obj.content")
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
angular.module('config', [])
|
angular.module('config', [])
|
||||||
.factory('config', function() {
|
.factory('config', function() {
|
||||||
return {
|
return {
|
||||||
api: 'http://[::1]:8080',
|
api: 'https://apiv2.warehost.de',
|
||||||
table: {
|
table: {
|
||||||
count: 25
|
count: 25
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
<link rel="stylesheet" href="bower_components/ng-table/dist/ng-table.css" />
|
<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-select/dist/select.css" />
|
||||||
<link rel="stylesheet" href="bower_components/angular-ui-tree/dist/angular-ui-tree.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 -->
|
<!-- endbower -->
|
||||||
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css" />
|
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css" />
|
||||||
<link rel="stylesheet" href="bower_components/bootswatch/paper/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/ng-table/dist/ng-table.js"></script>
|
||||||
<script src="bower_components/angular-ui-select/dist/select.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/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 -->
|
<!-- endbower -->
|
||||||
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
|
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
|
||||||
<!-- endbuild -->
|
<!-- endbuild -->
|
||||||
|
|
Reference in New Issue