diff --git a/bower.json b/bower.json
index b7a5e58..30a25a4 100644
--- a/bower.json
+++ b/bower.json
@@ -20,11 +20,10 @@
"bootswatch": "^3.3.7",
"ng-table": "^1.0.0",
"angular-ui-select": "^0.19.4",
- "angular-sanitize": "^1.5.8",
"angular-ui-tree": "^2.21.2",
- "angular-markdown-editor-ghiscoding": "^1.0.7"
- },
- "resolutions":{
+ "textAngular": "^1.5.16"
+ },
+ "resolutions": {
"angular": "1.6.0"
}
}
diff --git a/public/app/app.js b/public/app/app.js
index fac67b1..4096d04 100644
--- a/public/app/app.js
+++ b/public/app/app.js
@@ -1,27 +1,19 @@
'use strict';
angular.module('warehost', [
- 'ngSanitize',
'ui.router',
'ui.bootstrap',
'ui.select',
'ui.tree',
- 'hc.marked',
- 'angular-markdown-editor',
+ 'textAngular',
'ngTable',
'config',
'session',
'alert'
])
- .config(['$urlRouterProvider','$httpProvider','markedProvider',function($urlRouterProvider,$httpProvider,markedProvider){
+ .config(['$urlRouterProvider','$httpProvider',function($urlRouterProvider,$httpProvider){
$urlRouterProvider.otherwise('/');
$httpProvider.defaults.withCredentials = true;
- // marked config
- markedProvider.setOptions({
- gfm: true,
- tables: true,
- sanitize: true
- });
// highlight config
//hljsServiceProvider.setOptions({});
diff --git a/public/app/host/admin/database.jade b/public/app/host/admin/database.jade
index cbce563..ea7344f 100644
--- a/public/app/host/admin/database.jade
+++ b/public/app/host/admin/database.jade
@@ -1,29 +1,30 @@
.container
h1 Database
- table.table.table-bordered(ng-table="tableParams")
- tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
- td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}}
- td(data-title="'Database/User'")
- span(ng-if="!item.isEditing") warehost_user{{item.profil.ID}}_db{{item.ID}}
- h4(ng-if="item.isEditing") Database: warehost_user{{item.profil.ID}}_db{{item.ID}}
- form(name="myform",ng-if="item.isEditing")
- .form-group
- label(for="password") Password
- input.form-control(id="password",name="password",ng-model="item.password",ng-minlength="3")
- .form-group
- label(for="comment") Comment
- input.form-control(id="comment",name="comment",ng-model="item.comment")
- button.btn.btn-primary(type="submit",ng-click="edit(item)")
- span.glyphicon.glyphicon-floppy-disk
- | Save
- td(data-title="'Kommentar'")
- span.glyphicon.glyphicon-lock(ng-if="item.password")
- span(ng-if="!item.isEditing") {{item.comment}}
- 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
+ .panel.panel-default
+ table.table(ng-table="tableParams")
+ tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
+ td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}}
+ td(data-title="'Database/User'")
+ span(ng-if="!item.isEditing") warehost_user{{item.profil.ID}}_db{{item.ID}}
+ h4(ng-if="item.isEditing") Database: warehost_user{{item.profil.ID}}_db{{item.ID}}
+ form(name="myform",ng-if="item.isEditing")
+ .form-group
+ label(for="password") Password
+ input.form-control(id="password",name="password",ng-model="item.password",ng-minlength="3")
+ .form-group
+ label(for="comment") Comment
+ input.form-control(id="comment",name="comment",ng-model="item.comment")
+ button.btn.btn-primary(type="submit",ng-click="edit(item)")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ td(data-title="'Kommentar'")
+ span.glyphicon.glyphicon-lock(ng-if="item.password")
+ span(ng-if="!item.isEditing") {{item.comment}}
+ 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
diff --git a/public/app/host/admin/domain.jade b/public/app/host/admin/domain.jade
index 1e7d0b7..0b6071a 100644
--- a/public/app/host/admin/domain.jade
+++ b/public/app/host/admin/domain.jade
@@ -1,45 +1,46 @@
.container
h1 Domains
- table.table.table-bordered(ng-table="tableParams")
- tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
- td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}}
- td(data-title="'Domain'", filter="{'fqdn': 'text'}")
- span(ng-if="!item.isEditing") {{item.fqdn}}
- h4(ng-if="item.isEditing") Domain: {{item.fqdn}}
- form(name="myform",ng-if="item.isEditing")
- .form-group
- label(for="domain") Domain
- input.form-control(id="domain",name="domain",ng-model="item.fqdn",ng-minlength="3")
- .form-group
- label
- input(type="checkbox",ng-model="item.active")
- | Active
- .form-group
- label
- input(type="checkbox",ng-model="item.web")
- | Web
- .form-group
- label
- input(type="checkbox",ng-model="item.mail")
- | Mail
- button.btn.btn-primary(type="submit",ng-click="edit(item)")
- span.glyphicon.glyphicon-floppy-disk
- | Save
- td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}")
- span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.active")
- span.glyphicon.glyphicon-lock(aria-hidden="true",ng-if="!item.active")
- td(data-title="'Funktions'")
- a(ng-if="item.mail && !item.isEditing && item.active",ui-sref="app.host.mail({domainid:item.ID})")
- span.glyphicon.glyphicon-envelope(aria-hidden="true")
- | Mail
- a(ng-if="item.web && !item.isEditing && item.active",ui-sref="app.host.web({domainid:item.ID})")
- span.glyphicon.glyphicon-globe(aria-hidden="true")
- | Web
- 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
+ .panel.panel-default
+ table.table(ng-table="tableParams")
+ tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
+ td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}}
+ td(data-title="'Domain'", filter="{'fqdn': 'text'}")
+ span(ng-if="!item.isEditing") {{item.fqdn}}
+ h4(ng-if="item.isEditing") Domain: {{item.fqdn}}
+ form(name="myform",ng-if="item.isEditing")
+ .form-group
+ label(for="domain") Domain
+ input.form-control(id="domain",name="domain",ng-model="item.fqdn",ng-minlength="3")
+ .form-group
+ label
+ input(type="checkbox",ng-model="item.active")
+ | Active
+ .form-group
+ label
+ input(type="checkbox",ng-model="item.web")
+ | Web
+ .form-group
+ label
+ input(type="checkbox",ng-model="item.mail")
+ | Mail
+ button.btn.btn-primary(type="submit",ng-click="edit(item)")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}")
+ span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.active")
+ span.glyphicon.glyphicon-lock(aria-hidden="true",ng-if="!item.active")
+ td(data-title="'Funktions'")
+ a(ng-if="item.mail && !item.isEditing && item.active",ui-sref="app.host.mail({domainid:item.ID})")
+ span.glyphicon.glyphicon-envelope(aria-hidden="true")
+ | Mail
+ a(ng-if="item.web && !item.isEditing && item.active",ui-sref="app.host.web({domainid:item.ID})")
+ span.glyphicon.glyphicon-globe(aria-hidden="true")
+ | Web
+ 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
diff --git a/public/app/host/admin/profil.jade b/public/app/host/admin/profil.jade
index 48ee51b..4f60d54 100644
--- a/public/app/host/admin/profil.jade
+++ b/public/app/host/admin/profil.jade
@@ -1,10 +1,11 @@
.container
h1 Profiles
- table.table.table-bordered(ng-table="tableParams")
- tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
- td(data-title="'UserID'", filter="{'login.ID': 'text'}") {{item.login.ID}}
- td(data-title="'User'", filter="{'login.username': 'text'}") {{item.login.username}}
- td(data-title="'ProfilID'", filter="{'ID': 'text'}") {{item.ID}}
- td(data-title="'Reseller'", filter="{'reseller': 'components/ngfilter-boolean.html'}")
- span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.reseller",ng-click="toggle(item)")
- span.glyphicon.glyphicon-remove(aria-hidden="true",ng-if="!item.reseller",ng-click="toggle(item)")
+ .panel.panel-default
+ table.table(ng-table="tableParams")
+ tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
+ td(data-title="'UserID'", filter="{'login.ID': 'text'}") {{item.login.ID}}
+ td(data-title="'User'", filter="{'login.username': 'text'}") {{item.login.username}}
+ td(data-title="'ProfilID'", filter="{'ID': 'text'}") {{item.ID}}
+ td(data-title="'Reseller'", filter="{'reseller': 'components/ngfilter-boolean.html'}")
+ span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.reseller",ng-click="toggle(item)")
+ span.glyphicon.glyphicon-remove(aria-hidden="true",ng-if="!item.reseller",ng-click="toggle(item)")
diff --git a/public/app/host/database.jade b/public/app/host/database.jade
index e440791..6169f68 100644
--- a/public/app/host/database.jade
+++ b/public/app/host/database.jade
@@ -1,40 +1,43 @@
.container
h1 Database
- a.btn.btn-default(ng-click="isAdding=true")
- span.glyphicon.glyphicon-plus
- form.well(ng-submit="add()",name="addform",ng-if="isAdding")
- .form-group
- label(for="password") Password
- input.form-control(id="password",name="password",ng-model="obj.password",ng-minlength="3")
- .form-group
- label(for="comment") Comment
- input.form-control(id="comment",name="comment",ng-model="obj.comment")
- 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="'Database/User'")
- span(ng-if="!item.isEditing") warehost_db{{item.ID}}
- h4(ng-if="item.isEditing") Database: warehost_db{{item.ID}}
- form(name="myform",ng-if="item.isEditing")
- .form-group
- label(for="password") Password
- input.form-control(id="password",name="password",ng-model="item.password",ng-minlength="3")
- .form-group
- label(for="comment") Comment
- input.form-control(id="comment",name="comment",ng-model="item.comment")
- button.btn.btn-primary(type="submit",ng-click="edit(item)")
- span.glyphicon.glyphicon-floppy-disk
- | Save
- td(data-title="'Kommentar'")
- span.glyphicon.glyphicon-lock(ng-if="item.password")
- span(ng-if="!item.isEditing") {{item.comment}}
- 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
+ .panel.panel-default
+ .panel-heading All
+ a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
+ span.glyphicon.glyphicon-plus
+ .panel-body(ng-if="isAdding")
+ form(ng-submit="add()",name="addform")
+ .form-group
+ label(for="password") Password
+ input.form-control(id="password",name="password",ng-model="obj.password",ng-minlength="3")
+ .form-group
+ label(for="comment") Comment
+ input.form-control(id="comment",name="comment",ng-model="obj.comment")
+ button.btn.btn-primary(type="submit")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ table.table(ng-table="tableParams")
+ tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
+ td(data-title="'Database/User'")
+ span(ng-if="!item.isEditing") warehost_db{{item.ID}}
+ h4(ng-if="item.isEditing") Database: warehost_db{{item.ID}}
+ form(name="myform",ng-if="item.isEditing")
+ .form-group
+ label(for="password") Password
+ input.form-control(id="password",name="password",ng-model="item.password",ng-minlength="3")
+ .form-group
+ label(for="comment") Comment
+ input.form-control(id="comment",name="comment",ng-model="item.comment")
+ button.btn.btn-primary(type="submit",ng-click="edit(item)")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ td(data-title="'Kommentar'")
+ span.glyphicon.glyphicon-lock(ng-if="item.password")
+ span(ng-if="!item.isEditing") {{item.comment}}
+ 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
diff --git a/public/app/host/domain.jade b/public/app/host/domain.jade
index 947bb06..36e5aa7 100644
--- a/public/app/host/domain.jade
+++ b/public/app/host/domain.jade
@@ -1,65 +1,68 @@
.container
h1 Domains
- a.btn.btn-default(ng-click="isAdding=true")
- span.glyphicon.glyphicon-plus
- form.well(ng-submit="add()",name="addform",ng-if="isAdding")
- .form-group
- label(for="domain") Domain
- input.form-control(id="domain",name="domain",ng-model="obj.fqdn",ng-minlength="3")
- .form-group(ng-if="session.login.superadmin")
- label
- input(type="checkbox",ng-model="obj.active")
- | Active
- .form-group
- label
- input(type="checkbox",ng-model="obj.web")
- | Web
- .form-group
- label
- input(type="checkbox",ng-model="obj.mail")
- | Mail
- 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="'Domain'", filter="{'fqdn': 'text'}")
- span(ng-if="!item.isEditing") {{item.fqdn}}
- h4(ng-if="item.isEditing") Domain: {{item.fqdn}}
- form(name="myform",ng-if="item.isEditing")
- .form-group
- label(for="domain") Domain
- input.form-control(id="domain",name="domain",ng-model="item.fqdn",ng-minlength="3")
- .form-group(ng-if="session.login.superadmin")
- label
- input(type="checkbox",ng-model="item.active")
- | Active
- .form-group
- label
- input(type="checkbox",ng-model="item.web")
- | Web
- .form-group
- label
- input(type="checkbox",ng-model="item.mail")
- | Mail
- button.btn.btn-primary(type="submit",ng-click="edit(item)")
- span.glyphicon.glyphicon-floppy-disk
- | Save
- td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}")
- span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.active")
- span.glyphicon.glyphicon-lock(aria-hidden="true",ng-if="!item.active")
- td(data-title="'Funktions'")
- a(ng-if="item.mail && !item.isEditing && item.active",ui-sref="app.host.mail({domainid:item.ID})")
- span.glyphicon.glyphicon-envelope(aria-hidden="true")
- | Mail
- a(ng-if="item.web && !item.isEditing && item.active",ui-sref="app.host.web({domainid:item.ID})")
- span.glyphicon.glyphicon-globe(aria-hidden="true")
- | Web
- 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
+ .panel.panel-default
+ .panel-heading All
+ a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
+ span.glyphicon.glyphicon-plus
+ .panel-body(ng-if="isAdding")
+ form(ng-submit="add()",name="addform")
+ .form-group
+ label(for="domain") Domain
+ input.form-control(id="domain",name="domain",ng-model="obj.fqdn",ng-minlength="3")
+ .form-group(ng-if="session.login.superadmin")
+ label
+ input(type="checkbox",ng-model="obj.active")
+ | Active
+ .form-group
+ label
+ input(type="checkbox",ng-model="obj.web")
+ | Web
+ .form-group
+ label
+ input(type="checkbox",ng-model="obj.mail")
+ | Mail
+ button.btn.btn-primary(type="submit")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ table.table(ng-table="tableParams")
+ tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
+ td(data-title="'Domain'", filter="{'fqdn': 'text'}")
+ span(ng-if="!item.isEditing") {{item.fqdn}}
+ h4(ng-if="item.isEditing") Domain: {{item.fqdn}}
+ form(name="myform",ng-if="item.isEditing")
+ .form-group
+ label(for="domain") Domain
+ input.form-control(id="domain",name="domain",ng-model="item.fqdn",ng-minlength="3")
+ .form-group(ng-if="session.login.superadmin")
+ label
+ input(type="checkbox",ng-model="item.active")
+ | Active
+ .form-group
+ label
+ input(type="checkbox",ng-model="item.web")
+ | Web
+ .form-group
+ label
+ input(type="checkbox",ng-model="item.mail")
+ | Mail
+ button.btn.btn-primary(type="submit",ng-click="edit(item)")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}")
+ span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.active")
+ span.glyphicon.glyphicon-lock(aria-hidden="true",ng-if="!item.active")
+ td(data-title="'Funktions'")
+ a(ng-if="item.mail && !item.isEditing && item.active",ui-sref="app.host.mail({domainid:item.ID})")
+ span.glyphicon.glyphicon-envelope(aria-hidden="true")
+ | Mail
+ a(ng-if="item.web && !item.isEditing && item.active",ui-sref="app.host.web({domainid:item.ID})")
+ span.glyphicon.glyphicon-globe(aria-hidden="true")
+ | Web
+ 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
diff --git a/public/app/host/mail.jade b/public/app/host/mail.jade
index 09b4e21..6ec644b 100644
--- a/public/app/host/mail.jade
+++ b/public/app/host/mail.jade
@@ -1,74 +1,77 @@
.container
h1 Mail
- a.btn.btn-default(ng-click="isAdding=true")
- span.glyphicon.glyphicon-plus
- form.well(ng-submit="add()",name="addform",ng-if="isAdding")
- .form-group
- label(for="name") Name
- .input-group
- input.form-control(id="name",name="name",ng-model="obj.name")
- span.input-group-addon @{{domain.fqdn}}
- .form-group
- label Inbox
- .input-group
- ui-select(ng-model="obj.login")
- ui-select-match
- span(ng-repeat="i in loginlist",ng-show="i.ID == $select.selected.ID") {{i.username}}
- ui-select-choices(repeat="i.ID as i in loginlist | filter: $select.search")
- div(ng-bind-html="i.username | highlight: $select.search")
- span.input-group-btn
- button.btn.btn-default(type="button",ng-click="obj.login = undefined")
- span.glyphicon.glyphicon-trash
- .form-group
- label Forwards
- ui-select(ng-model="obj.forwards",multiple,tagging="newMail")
- ui-select-match {{$item.to}}
- ui-select-choices(repeat="i in obj.forwards")
- div(ng-bind-html="i.to | highlight: $select.search")
- 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="'Mail-Adresse'")
- span(ng-if="!item.isEditing") {{item.name}}@{{item.domain.fqdn}}
- h4(ng-if="item.isEditing") {{item.name}}@{{item.domain.fqdn}}
- form(name="myform",ng-if="item.isEditing")
- .form-group
- label(for="name") Name
- .input-group
- input.form-control(id="name",name="name",ng-model="item.name")
- span.input-group-addon @{{item.domain.fqdn}}
+ .panel.panel-default
+ .panel-heading All
+ a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
+ span.glyphicon.glyphicon-plus
+ .panel-body(ng-if="isAdding")
+ form(ng-submit="add()",name="addform")
+ .form-group
+ label(for="name") Name
+ .input-group
+ input.form-control(id="name",name="name",ng-model="obj.name")
+ span.input-group-addon @{{domain.fqdn}}
.form-group
label Inbox
.input-group
- ui-select(ng-model="item.login")
+ ui-select(ng-model="obj.login")
ui-select-match
span(ng-repeat="i in loginlist",ng-show="i.ID == $select.selected.ID") {{i.username}}
ui-select-choices(repeat="i.ID as i in loginlist | filter: $select.search")
div(ng-bind-html="i.username | highlight: $select.search")
span.input-group-btn
- button.btn.btn-default(type="button",ng-click="item.login = undefined")
+ button.btn.btn-default(type="button",ng-click="obj.login = undefined")
span.glyphicon.glyphicon-trash
.form-group
label Forwards
- ui-select(ng-model="item.forwards",multiple,tagging="newMail")
+ ui-select(ng-model="obj.forwards",multiple,tagging="newMail")
ui-select-match {{$item.to}}
- ui-select-choices(repeat="i in item.forwards")
+ ui-select-choices(repeat="i in obj.forwards")
div(ng-bind-html="i.to | highlight: $select.search")
- button.btn.btn-primary(type="submit",ng-click="edit(item)")
- span.glyphicon.glyphicon-floppy-disk
- | Save
- td(data-title="'Inbox'")
- span(ng-repeat="i in loginlist",ng-if="i.ID == item.login") {{i.username}}
- td(data-title="'Forwards'")
- ul
- li(ng-repeat="i in item.forwards") {{i.to}}
- 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
+ button.btn.btn-primary(type="submit")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ table.table(ng-table="tableParams")
+ tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
+ td(data-title="'Mail-Adresse'")
+ span(ng-if="!item.isEditing") {{item.name}}@{{item.domain.fqdn}}
+ h4(ng-if="item.isEditing") {{item.name}}@{{item.domain.fqdn}}
+ form(name="myform",ng-if="item.isEditing")
+ .form-group
+ label(for="name") Name
+ .input-group
+ input.form-control(id="name",name="name",ng-model="item.name")
+ span.input-group-addon @{{item.domain.fqdn}}
+ .form-group
+ label Inbox
+ .input-group
+ ui-select(ng-model="item.login")
+ ui-select-match
+ span(ng-repeat="i in loginlist",ng-show="i.ID == $select.selected.ID") {{i.username}}
+ ui-select-choices(repeat="i.ID as i in loginlist | filter: $select.search")
+ div(ng-bind-html="i.username | highlight: $select.search")
+ span.input-group-btn
+ button.btn.btn-default(type="button",ng-click="item.login = undefined")
+ span.glyphicon.glyphicon-trash
+ .form-group
+ label Forwards
+ ui-select(ng-model="item.forwards",multiple,tagging="newMail")
+ ui-select-match {{$item.to}}
+ ui-select-choices(repeat="i in item.forwards")
+ div(ng-bind-html="i.to | highlight: $select.search")
+ button.btn.btn-primary(type="submit",ng-click="edit(item)")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ td(data-title="'Inbox'")
+ span(ng-repeat="i in loginlist",ng-if="i.ID == item.login") {{i.username}}
+ td(data-title="'Forwards'")
+ ul
+ li(ng-repeat="i in item.forwards") {{i.to}}
+ 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
diff --git a/public/app/host/web.jade b/public/app/host/web.jade
index ac26aca..6c67241 100644
--- a/public/app/host/web.jade
+++ b/public/app/host/web.jade
@@ -1,109 +1,112 @@
.container
h1 Web
- a.btn.btn-default(ng-click="isAdding=true")
- span.glyphicon.glyphicon-plus
- form.well(ng-submit="add()",name="addform",ng-if="isAdding")
- .form-group
- label(for="subdomain") Subdomain
- .input-group
- input.form-control(id="subdomain",name="subdomain",ng-model="obj.subdomain")
- span.input-group-addon .{{domain.fqdn}}
- .form-group
- label
- input(type="checkbox",ng-model="obj.php")
- | PHP
- .form-group
- label
- input(type="checkbox",ng-model="obj.ssl")
- | SSL
- .form-group
- label
- input(type="checkbox",ng-model="obj.sslredirect")
- | SSL-Redirect
- .form-group
- label(for="redirect") Redirect
- input.form-control(id="redirect",name="redirect",ng-model="obj.redirect")
- .form-group
- label(for="proxy") Proxy
- input.form-control(id="proxy",name="proxy",ng-model="obj.proxy")
- .form-group
- label FTP Access
- ui-select(ng-model="obj.ftpaccess",multiple,on-select="newUser(obj.ftpaccess, $model)")
- ui-select-match {{$item.login.username}}
- ui-select-choices(repeat="i in loginlist | afterKeyID:obj.ftpaccess:'login' | filter: $select.search")
- div(ng-bind-html="i.username | highlight: $select.search")
- .form-group
- label HTTP Access
- ui-select(ng-model="obj.httpaccess",multiple,on-select="newUser(obj.httpaccess, $model)")
- ui-select-match {{$item.login.username}}
- ui-select-choices(repeat="i in loginlist | afterKeyID:obj.httpaccess:'login' | filter: $select.search")
- div(ng-bind-html="i.username | highlight: $select.search")
- 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="'Domain'")
- span(ng-if="!item.isEditing")
- span(ng-if="item.subdomain != ''") {{item.subdomain}}.
- | {{item.domain.fqdn}}
- h4(ng-if="item.isEditing") {{item.subdomain}}.{{item.domain.fqdn}}
- form(name="myform",ng-if="item.isEditing")
- .form-group
- label(for="subdomain") Subdomain
- .input-group
- input.form-control(id="subdomain",name="subdomain",ng-model="item.subdomain")
- span.input-group-addon .{{item.domain.fqdn}}
- .form-group
- label
- input(type="checkbox",ng-model="item.php")
- | PHP
- .form-group
- label
- input(type="checkbox",ng-model="item.ssl")
- | SSL
- .form-group
- label
- input(type="checkbox",ng-model="item.sslredirect")
- | SSL-Redirect
- .form-group
- label(for="redirect") Redirect
- input.form-control(id="redirect",name="redirect",ng-model="item.redirect")
- .form-group
- label(for="proxy") Proxy
- input.form-control(id="proxy",name="proxy",ng-model="item.proxy")
- .form-group
- label FTP Access
- ui-select(ng-model="item.ftpaccess",multiple,on-select="newUser(item.ftpaccess, $model)")
- ui-select-match {{$item.login.username}}
- ui-select-choices(repeat="i in loginlist | afterKeyID:item.ftpaccess:'login' | filter: $select.search")
- div(ng-bind-html="i.username | highlight: $select.search")
- .form-group
- label HTTP Access
- ui-select(ng-model="item.httpaccess",multiple,on-select="newUser(item.httpaccess, $model)")
- ui-select-match {{$item.login.username}}
- ui-select-choices(repeat="i in loginlist | afterKeyID:item.httpaccess:'login' | filter: $select.search")
- div(ng-bind-html="i.username | highlight: $select.search")
- button.btn.btn-primary(type="submit",ng-click="edit(item)")
- span.glyphicon.glyphicon-floppy-disk
- | Save
- td(data-title="'FTPAccess'")
- ul
- li(ng-repeat="i in item.ftpaccess") {{i.login.username}}
- td(data-title="'HTTPAccess'")
- ul
- li(ng-repeat="i in item.httpaccess") {{i.login.username}}
- td(data-title="'Features'")
- span.glyphicon.glyphicon-cd(ng-if="item.php")
- span.glyphicon.glyphicon-lock(ng-if="item.ssl")
- span.glyphicon.glyphicon-share(ng-if="item.sslredirect")
- span.glyphicon.glyphicon-share-alt(ng-if="item.redirect")
- span.glyphicon.glyphicon-send(ng-if="item.proxy")
- 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
+ .panel.panel-default
+ .panel-heading All
+ a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
+ span.glyphicon.glyphicon-plus
+ .panel-body(ng-if="isAdding")
+ form(ng-submit="add()",name="addform")
+ .form-group
+ label(for="subdomain") Subdomain
+ .input-group
+ input.form-control(id="subdomain",name="subdomain",ng-model="obj.subdomain")
+ span.input-group-addon .{{domain.fqdn}}
+ .form-group
+ label
+ input(type="checkbox",ng-model="obj.php")
+ | PHP
+ .form-group
+ label
+ input(type="checkbox",ng-model="obj.ssl")
+ | SSL
+ .form-group
+ label
+ input(type="checkbox",ng-model="obj.sslredirect")
+ | SSL-Redirect
+ .form-group
+ label(for="redirect") Redirect
+ input.form-control(id="redirect",name="redirect",ng-model="obj.redirect")
+ .form-group
+ label(for="proxy") Proxy
+ input.form-control(id="proxy",name="proxy",ng-model="obj.proxy")
+ .form-group
+ label FTP Access
+ ui-select(ng-model="obj.ftpaccess",multiple,on-select="newUser(obj.ftpaccess, $model)")
+ ui-select-match {{$item.login.username}}
+ ui-select-choices(repeat="i in loginlist | afterKeyID:obj.ftpaccess:'login' | filter: $select.search")
+ div(ng-bind-html="i.username | highlight: $select.search")
+ .form-group
+ label HTTP Access
+ ui-select(ng-model="obj.httpaccess",multiple,on-select="newUser(obj.httpaccess, $model)")
+ ui-select-match {{$item.login.username}}
+ ui-select-choices(repeat="i in loginlist | afterKeyID:obj.httpaccess:'login' | filter: $select.search")
+ div(ng-bind-html="i.username | highlight: $select.search")
+ button.btn.btn-primary(type="submit")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ table.table(ng-table="tableParams")
+ tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
+ td(data-title="'Domain'")
+ span(ng-if="!item.isEditing")
+ span(ng-if="item.subdomain != ''") {{item.subdomain}}.
+ | {{item.domain.fqdn}}
+ h4(ng-if="item.isEditing") {{item.subdomain}}.{{item.domain.fqdn}}
+ form(name="myform",ng-if="item.isEditing")
+ .form-group
+ label(for="subdomain") Subdomain
+ .input-group
+ input.form-control(id="subdomain",name="subdomain",ng-model="item.subdomain")
+ span.input-group-addon .{{item.domain.fqdn}}
+ .form-group
+ label
+ input(type="checkbox",ng-model="item.php")
+ | PHP
+ .form-group
+ label
+ input(type="checkbox",ng-model="item.ssl")
+ | SSL
+ .form-group
+ label
+ input(type="checkbox",ng-model="item.sslredirect")
+ | SSL-Redirect
+ .form-group
+ label(for="redirect") Redirect
+ input.form-control(id="redirect",name="redirect",ng-model="item.redirect")
+ .form-group
+ label(for="proxy") Proxy
+ input.form-control(id="proxy",name="proxy",ng-model="item.proxy")
+ .form-group
+ label FTP Access
+ ui-select(ng-model="item.ftpaccess",multiple,on-select="newUser(item.ftpaccess, $model)")
+ ui-select-match {{$item.login.username}}
+ ui-select-choices(repeat="i in loginlist | afterKeyID:item.ftpaccess:'login' | filter: $select.search")
+ div(ng-bind-html="i.username | highlight: $select.search")
+ .form-group
+ label HTTP Access
+ ui-select(ng-model="item.httpaccess",multiple,on-select="newUser(item.httpaccess, $model)")
+ ui-select-match {{$item.login.username}}
+ ui-select-choices(repeat="i in loginlist | afterKeyID:item.httpaccess:'login' | filter: $select.search")
+ div(ng-bind-html="i.username | highlight: $select.search")
+ button.btn.btn-primary(type="submit",ng-click="edit(item)")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ td(data-title="'FTPAccess'")
+ ul
+ li(ng-repeat="i in item.ftpaccess") {{i.login.username}}
+ td(data-title="'HTTPAccess'")
+ ul
+ li(ng-repeat="i in item.httpaccess") {{i.login.username}}
+ td(data-title="'Features'")
+ span.glyphicon.glyphicon-cd(ng-if="item.php")
+ span.glyphicon.glyphicon-lock(ng-if="item.ssl")
+ span.glyphicon.glyphicon-share(ng-if="item.sslredirect")
+ span.glyphicon.glyphicon-share-alt(ng-if="item.redirect")
+ span.glyphicon.glyphicon-send(ng-if="item.proxy")
+ 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
diff --git a/public/app/invite.jade b/public/app/invite.jade
index d129db0..e27cac7 100644
--- a/public/app/invite.jade
+++ b/public/app/invite.jade
@@ -1,47 +1,54 @@
.container
h1 Invites
- a.btn.btn.default(ng-click="toggleAdmin()")
- span.glyphicon.glyphicon-ok(ng-if="invitor.admin")
- span.glyphicon.glyphicon-remove(ng-if="!invitor.admin")
- a.btn.btn-default(ng-click="isAdding=true")
- span.glyphicon.glyphicon-plus
- form.well(ng-submit="add()",name="addform",ng-if="isAdding")
- .form-group
- label(for="username") Username
- input.form-control(id="username",name="username",ng-model="obj.username",ng-minlength="3")
- .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !addform.newPassword.$valid)}")
- label(for="newPassword") New Password
- input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.password",ng-minlength="3")
- .form-group(ng-class="{'has-error': (obj.password != obj.repeatPassword && addform.repeatPassword.$dirty)}")
- label(for="repeatPassword") Again Password
- input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword")
- 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.invited.ID}}
- td(data-title="'Username'", filter="{'invited.username': 'text'}")
- span(ng-if="!item.isEditing") {{item.invited.username}}
- h4(ng-if="item.isEditing") Username: {{item.invited.username}}
- form(name="myform",ng-if="item.isEditing")
- .form-group(ng-if="session.login.superadmin",ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !myform.username.$valid)}")
- label(for="username") Username
- input.form-control(id="username",name="username",ng-model="item.invited.username")
- .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}")
- label(for="newPassword") New Password
- input.form-control(id="newPassword",type="password",name="newPassword",ng-model="item.newPassword",ng-minlength="3")
- .form-group(ng-class="{'has-error': (item.newPassword != item.repeatPassword && myform.repeatPassword.$dirty)}")
- label(for="repeatPassword") Again Password
- input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="item.repeatPassword")
- td(data-title="'Administrator'", filter="{'admin': 'components/ngfilter-boolean.html'}")
- span.glyphicon.glyphicon-ok(ng-if="item.admin")
- span.glyphicon.glyphicon-remove(ng-if="!item.admin")
- td(data-title="'Option'")
- .btn-group.btn-group-xs(ng-if="item.admin || item.invited.createat >= item.invited.lastloginat")
- 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
+ .panel.panel-default
+ .panel-heading All
+ .btn-group.pull-right.btn-group-xs
+ a.btn.btn-default(ng-click="toggleAdmin()") Admin
+ span.glyphicon.glyphicon-ok(ng-if="invitor.admin")
+ span.glyphicon.glyphicon-remove(ng-if="!invitor.admin")
+ a.btn.btn-default(ng-click="isAdding=true") Add
+ span.glyphicon.glyphicon-plus
+ .panel-body(ng-if="isAdding")
+ form(ng-submit="add()",name="addform")
+ .form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !addform.username.$valid)}")
+ label(for="username") Username
+ input.form-control(id="username",name="username",ng-model="obj.username",ng-minlength="3")
+ .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !addform.newPassword.$valid)}")
+ label(for="newPassword") New Password
+ input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.password",ng-minlength="3")
+ .form-group(ng-class="{'has-error': (obj.password != obj.repeatPassword && addform.repeatPassword.$dirty)}")
+ label(for="repeatPassword") Again Password
+ input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword")
+ button.btn.btn-primary(type="submit")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ table.table(ng-table="tableParams")
+ tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
+ td(data-title="'#'") {{item.invited.ID}}
+ td(data-title="'Username'", filter="{'invited.username': 'text'}")
+ span(ng-if="!item.isEditing") {{item.invited.username}}
+ h4(ng-if="item.isEditing") Username: {{item.invited.username}}
+ form(name="myform",ng-if="item.isEditing",ng-submit="edit(item)")
+ .form-group(ng-if="session.login.superadmin",ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !myform.username.$valid)}")
+ label(for="username") Username
+ input.form-control(id="username",name="username",ng-model="item.invited.username")
+ .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}")
+ label(for="newPassword") New Password
+ input.form-control(id="newPassword",type="password",name="newPassword",ng-model="item.newPassword",ng-minlength="3")
+ .form-group(ng-class="{'has-error': (item.newPassword != item.repeatPassword && myform.repeatPassword.$dirty)}")
+ label(for="repeatPassword") Again Password
+ input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="item.repeatPassword")
+ button.btn.btn-primary(type="submit")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ td(data-title="'Administrator'", filter="{'admin': 'components/ngfilter-boolean.html'}")
+ span.glyphicon.glyphicon-ok(ng-if="item.admin")
+ span.glyphicon.glyphicon-remove(ng-if="!item.admin")
+ td(data-title="'Option'")
+ .btn-group.btn-group-xs(ng-if="item.admin || item.invited.createat >= item.invited.lastloginat")
+ 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
diff --git a/public/app/setting.jade b/public/app/setting.jade
index c4a45e9..90dfd4d 100644
--- a/public/app/setting.jade
+++ b/public/app/setting.jade
@@ -1,24 +1,25 @@
.container
h1 Settings
- form.well(ng-submit="submit()",name="myform")
- .form-group
- label(for="globalUsername") Username
- input.form-control(id="globalUsername",ng-model="session.login.username",readonly)
- .form-group(ng-class="{'has-error': (error.fields.indexOf('currentpassword') >= 0)}")
- label(for="currentPassword") Current Password
- input.form-control(id="currentPassword",type="password",ng-model="obj.currentPassword")
- .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}")
- label(for="newPassword") New Password
- input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.newPassword",ng-minlength="3")
- .form-group(ng-class="{'has-error': (obj.newPassword != obj.repeatPassword && myform.repeatPassword.$dirty)}")
- label(for="repeatPassword") Again Password
- input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword")
- .row
- .col-xs-6
- button.btn.btn-primary(type="submit")
- span.glyphicon.glyphicon-floppy-disk
- | Save
- .col-xs-6.text-right
- a.btn.btn-danger(ng-click="delete()")
- span.glyphicon.glyphicon-trash
- | Delete
+ .panel.panel-default
+ form.panel-body(ng-submit="submit()",name="myform")
+ .form-group
+ label(for="globalUsername") Username
+ input.form-control(id="globalUsername",ng-model="session.login.username",readonly)
+ .form-group(ng-class="{'has-error': (error.fields.indexOf('currentpassword') >= 0)}")
+ label(for="currentPassword") Current Password
+ input.form-control(id="currentPassword",type="password",ng-model="obj.currentPassword")
+ .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}")
+ label(for="newPassword") New Password
+ input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.newPassword",ng-minlength="3")
+ .form-group(ng-class="{'has-error': (obj.newPassword != obj.repeatPassword && myform.repeatPassword.$dirty)}")
+ label(for="repeatPassword") Again Password
+ input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword")
+ .row
+ .col-xs-6
+ button.btn.btn-primary(type="submit")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ .col-xs-6.text-right
+ a.btn.btn-danger(ng-click="delete()")
+ span.glyphicon.glyphicon-trash
+ | Delete
diff --git a/public/app/user.jade b/public/app/user.jade
index 8a08d93..c54037c 100644
--- a/public/app/user.jade
+++ b/public/app/user.jade
@@ -1,55 +1,61 @@
.container
h1 User Managment
- a.btn.btn-default(ng-click="isAdding=true")
- span.glyphicon.glyphicon-plus
- form.well(ng-submit="add()",name="addform",ng-if="isAdding")
- .form-group
- label(for="username") Username
- input.form-control(id="username",name="username",ng-model="obj.username",ng-minlength="3")
- .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !addform.newPassword.$valid)}")
- label(for="newPassword") New Password
- input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.password",ng-minlength="3")
- .form-group(ng-class="{'has-error': (obj.password != obj.repeatPassword && addform.repeatPassword.$dirty)}")
- label(for="repeatPassword") Again Password
- input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword")
- 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.ID}}
- td(data-title="'Username'", filter="{'username': 'text'}")
- span(ng-if="!item.isEditing") {{item.username}}
- h4(ng-if="item.isEditing") Username: {{item.username}}
- form(name="myform",ng-if="item.isEditing")
- .form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !myform.username.$valid)}")
- label(for="username") Username
- input.form-control(id="username",name="username",ng-model="item.username")
- .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}")
- label(for="newPassword") New Password
- input.form-control(id="newPassword",type="password",name="newPassword",ng-model="item.newPassword",ng-minlength="3")
- .form-group(ng-class="{'has-error': (item.newPassword != item.repeatPassword && myform.repeatPassword.$dirty)}")
- label(for="repeatPassword") Again Password
- input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="item.repeatPassword")
- .form-group
- label
- input(type="checkbox",ng-model="item.active")
- | Active
- .form-group
- label
- input(type="checkbox",ng-model="item.superadmin")
- | Administrator
- td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}")
- span.glyphicon.glyphicon-ok(ng-if="item.active")
- span.glyphicon.glyphicon-remove(ng-if="!item.active")
- td(data-title="'Administrator'", filter="{'superadmin': 'components/ngfilter-boolean.html'}")
- span.glyphicon.glyphicon-ok(ng-if="item.superadmin")
- span.glyphicon.glyphicon-remove(ng-if="!item.superadmin")
- td(data-title="'Option'")
- .btn-group.btn-group-xs(ng-if="item.admin || item.createat >= item.lastloginat")
- 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
+ .panel.panel-default
+ .panel-heading All
+ a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
+ span.glyphicon.glyphicon-plus
+ .panel-body(ng-if="isAdding")
+ form(ng-submit="add()",name="addform")
+ .form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !addform.username.$valid)}")
+ label(for="username") Username
+ input.form-control(id="username",name="username",ng-minlength="3",ng-model="obj.username")
+ .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !addform.newPassword.$valid)}")
+ label(for="newPassword") New Password
+ input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.password",ng-minlength="3")
+ .form-group(ng-class="{'has-error': (obj.password != obj.repeatPassword && addform.repeatPassword.$dirty)}")
+ label(for="repeatPassword") Again Password
+ input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword")
+ button.btn.btn-primary(type="submit")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ table.table(ng-table="tableParams")
+ tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
+ td(data-title="'#'") {{item.ID}}
+ td(data-title="'Username'", filter="{'username': 'text'}")
+ span(ng-if="!item.isEditing") {{item.username}}
+ h4(ng-if="item.isEditing") Username: {{item.username}}
+ form(name="myform",ng-if="item.isEditing",ng-submit="edit(item)")
+ .form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !myform.username.$valid)}")
+ label(for="username") Username
+ input.form-control(id="username",name="username",ng-model="item.username")
+ .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}")
+ label(for="newPassword") New Password
+ input.form-control(id="newPassword",type="password",name="newPassword",ng-model="item.newPassword",ng-minlength="3")
+ .form-group(ng-class="{'has-error': (item.newPassword != item.repeatPassword && myform.repeatPassword.$dirty)}")
+ label(for="repeatPassword") Again Password
+ input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="item.repeatPassword")
+ .form-group
+ label
+ input(type="checkbox",ng-model="item.active")
+ | Active
+ .form-group
+ label
+ input(type="checkbox",ng-model="item.superadmin")
+ | Administrator
+ button.btn.btn-primary(type="submit")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}")
+ span.glyphicon.glyphicon-ok(ng-if="item.active")
+ span.glyphicon.glyphicon-remove(ng-if="!item.active")
+ td(data-title="'Administrator'", filter="{'superadmin': 'components/ngfilter-boolean.html'}")
+ span.glyphicon.glyphicon-ok(ng-if="item.superadmin")
+ span.glyphicon.glyphicon-remove(ng-if="!item.superadmin")
+ td(data-title="'Option'")
+ .btn-group.btn-group-xs(ng-if="item.admin || item.createat >= item.lastloginat")
+ 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
diff --git a/public/app/web/blog.jade b/public/app/web/blog.jade
new file mode 100644
index 0000000..df8e7ba
--- /dev/null
+++ b/public/app/web/blog.jade
@@ -0,0 +1,31 @@
+.container
+ h1 Blogs
+ .row
+ ul.nav.nav-tabs
+ li(ng-repeat="item in bloglist", ng-class="{'active':item.ID == blog.ID}")
+ a(ui-sref="app.webS.blog.post({websiteid:websiteid, blogid:item.ID})",ui-sref-active="active") {{item.title}}
+ li
+ a(ui-sref="app.webS.blog({websiteid:websiteid, blogid:-1})")
+ span.glyphicon.glyphicon-plus
+ li(style="float:right")
+ a(ui-sref="app.webS.blog({websiteid:websiteid, blogid:blog.ID})",ui-sref-active="active")
+ span.glyphicon.glyphicon-cog
+ .row(ui-view="posts")
+ form(ng-submit="save()")
+ h3(ng-if="blog.ID") Edit
+ h3(ng-if="!blog.ID") New
+ .form-group
+ label(for="title") Title
+ input.form-control(id="title",ng-model="blog.title")
+ .form-group
+ label(for="url") URL
+ br
+ i (http(s)://DOMAIN/{{blog.url.path}})
+ input.form-control(id="url",ng-model="blog.url.path")
+ .form-group
+ label(for="posturl") Post URL Schema
+ .form-group
+ label(for="content") Content
+ div(id="content",text-angular,ta-text-editor-class="clearfix border-around" ta-html-editor-class="border-around",ng-model="blog.content")
+ input.btn.btn-default(type="submit",value="Save")
+ input.btn.btn-danger(ng-if="blog.ID",value="Delete",ng-click="delete(blog)")
diff --git a/public/app/web/blog.js b/public/app/web/blog.js
new file mode 100644
index 0000000..4989c4b
--- /dev/null
+++ b/public/app/web/blog.js
@@ -0,0 +1,51 @@
+'use strict';
+
+angular.module('warehost')
+ .controller('BlogWebCtrl',function(session,config,alert,NgTableParams,$scope,$rootScope,$http,$stateParams){
+ $scope.bloglist = [];
+ alert.set({});
+ $scope.blog = {};
+ $scope.websiteid = $stateParams.websiteid;
+
+ function resetBlog(){
+ $scope.blog = {};
+ }
+ function load(){
+ $http.get(config.api+'/web/website/'+$stateParams.websiteid+'/blog').then(function(res){
+ session.set(res);
+ resetBlog();
+ $scope.bloglist = res.data.data;
+ var blog;
+ for(blog in $scope.bloglist){
+ if(blog.ID === $stateParams.blogid) {
+ $scope.blog = blog;
+ return;
+ }
+ }
+ if($scope.bloglist.length > 0 && $stateParams.blogid !== '-1'){
+ $scope.blog = $scope.bloglist[0];
+ }
+ });
+ }
+ function submitresult(res){
+ session.set(res);
+ alert.set(res);
+ if(res.data.data){
+ load();
+ }
+ }
+ resetBlog();
+ load();
+ $rootScope.$on('warehost.session',load);
+
+ $scope.save = function(){
+ if($scope.blog.ID){
+ $http.patch(config.api+'/web/website/'+$stateParams.websiteid+'/blog/'+$scope.blog.ID,$scope.blog).then(submitresult);
+ }else{
+ $http.post(config.api+'/web/website/'+$stateParams.websiteid+'/blog',$scope.blog).then(submitresult);
+ }
+ };
+ $scope.delete = function(a){
+ $http.delete(config.api+'/web/website/'+$stateParams.websiteid+'/blog/'+a.ID).then(submitresult);
+ };
+ });
diff --git a/public/app/web/blogpost.jade b/public/app/web/blogpost.jade
new file mode 100644
index 0000000..b6369c5
--- /dev/null
+++ b/public/app/web/blogpost.jade
@@ -0,0 +1,31 @@
+h2 Posts
+.row
+ .well.col-md-3
+ .btn-toolbar
+ .btn-group
+ a.btn.btn-default(ng-click="add()")
+ span.glyphicon.glyphicon-plus
+ br
+ .list-group
+ .list-group-item(ng-repeat="item in data")
+ .angular-ui-tree-handle {{item.title}}
+ .pull-right.btn-group.btn-group-xs
+ a.btn.btn-default(ng-click="edit(item)")
+ span.glyphicon.glyphicon-pencil
+ a.btn.btn-default(ng-click="delete(item)")
+ span.glyphicon.glyphicon-remove
+ form.col-md-9(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(for="url") URL
+ br
+ i (http(s)://DOMAIN/{{obj.url.path}})
+ input.form-control(id="url",ng-model="obj.url.path")
+ .form-group
+ label(for="content") Content
+ div(id="content",text-angular,ta-text-editor-class="clearfix border-around" ta-html-editor-class="border-around",ng-model="obj.content")
+ input.btn.btn-default(type="submit",value="Save")
diff --git a/public/app/web/domain.jade b/public/app/web/domain.jade
index 94c61ab..98220c5 100644
--- a/public/app/web/domain.jade
+++ b/public/app/web/domain.jade
@@ -1,19 +1,22 @@
.container
h1 Domains
- a.btn.btn-default(ng-click="isAdding=true")
- span.glyphicon.glyphicon-plus
- form.well(ng-submit="add()",name="addform",ng-if="isAdding")
- .form-group
- label(for="domain") Domain
- input.form-control(id="domain",name="domain",ng-model="obj.domain",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="'Domain'")
- span(ng-if="!item.isEditing") {{item.name}}
- td(data-title="'Option'")
- .btn-group.btn-group-xs
- span.btn.btn-default(ng-click="delete(item)")
- span.glyphicon.glyphicon-trash
+ .panel.panel-default
+ .panel-heading All
+ a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
+ span.glyphicon.glyphicon-plus
+ .panel-body(ng-if="isAdding")
+ form(ng-submit="add()",name="addform")
+ .form-group
+ label(for="domain") Domain
+ input.form-control(id="domain",name="domain",ng-model="obj.domain",ng-minlength="3")
+ button.btn.btn-primary(type="submit")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ table.table(ng-table="tableParams")
+ tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
+ td(data-title="'Domain'")
+ span(ng-if="!item.isEditing") {{item.name}}
+ td(data-title="'Option'")
+ .btn-group.btn-group-xs
+ span.btn.btn-default(ng-click="delete(item)")
+ span.glyphicon.glyphicon-trash
diff --git a/public/app/web/index.js b/public/app/web/index.js
index 16b9bfb..dda42e4 100644
--- a/public/app/web/index.js
+++ b/public/app/web/index.js
@@ -50,6 +50,24 @@ angular.module('warehost')
}
}
})
+ .state('app.webS.blog', {
+ url:'/blog/:blogid',
+ views:{
+ '@app':{
+ templateUrl: 'app/web/blog.html',
+ controller:'BlogWebCtrl'
+ }
+ }
+ })
+ .state('app.webS.blog.post', {
+ url:'/post',
+ views:{
+ 'posts':{
+ templateUrl: 'app/web/blogpost.html',
+ controller:'BlogWebCtrl'
+ }
+ }
+ })
.state('app.webS.permission', {
url:'/permission',
views:{
diff --git a/public/app/web/list.jade b/public/app/web/list.jade
index 918237c..bc91274 100644
--- a/public/app/web/list.jade
+++ b/public/app/web/list.jade
@@ -1,34 +1,37 @@
.container
h1 Websites
div (where you are involved)
- a.btn.btn-default(ng-click="isAdding=true")
- span.glyphicon.glyphicon-plus
- form.well(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",ng-submit="edit(item)")
- .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")
- button.btn.btn-primary(type="submit")
- span.glyphicon.glyphicon-floppy-disk
- | Save
- td(data-title="'Option'")
- .btn-group.btn-group-xs
- a.btn.btn-default(ui-sref="app.webS.page({websiteid:item.website.ID})")
- span.glyphicon.glyphicon-dashboard
- 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-floppy-disk
- span.btn.btn-default(ng-click="delete(item)")
- span.glyphicon.glyphicon-trash
+ .panel.panel-default
+ .panel-heading All
+ a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
+ span.glyphicon.glyphicon-plus
+ .panel-body(ng-if="isAdding")
+ form(ng-submit="add()",name="addform")
+ .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(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",ng-submit="edit(item)")
+ .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")
+ button.btn.btn-primary(type="submit")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ td(data-title="'Option'")
+ .btn-group.btn-group-xs
+ a.btn.btn-default(ui-sref="app.webS.blog.post({websiteid:item.website.ID})")
+ span.glyphicon.glyphicon-dashboard
+ 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-floppy-disk
+ span.btn.btn-default(ng-click="delete(item)")
+ span.glyphicon.glyphicon-trash
diff --git a/public/app/web/menu.jade b/public/app/web/menu.jade
index 3abef51..9cd2706 100644
--- a/public/app/web/menu.jade
+++ b/public/app/web/menu.jade
@@ -10,7 +10,9 @@ ui.nav.navbar-nav
a(href="",ng-click="add()") Add
li.dropdown-header Websites:
li(ng-repeat="item in list")
- a(ui-sref="app.webS.page({websiteid:item.website.ID})") {{item.website.name}}
+ a(ui-sref="app.webS.blog.post({websiteid:item.website.ID})") {{item.website.name}}
+ li(ng-if="website.name")
+ a(ui-sref="app.webS.blog.post({websiteid:website.ID})") Blog
li(ng-if="website.name")
a(ui-sref="app.webS.menu({websiteid:website.ID})") Menu
li(ng-if="website.name")
diff --git a/public/app/web/page.jade b/public/app/web/page.jade
index ac65c58..30783f7 100644
--- a/public/app/web/page.jade
+++ b/public/app/web/page.jade
@@ -1,20 +1,21 @@
.container
- h1 Pages
+ .page-header
+ h1 Pages
.row
- .well.col-md-3(ui-tree)
- .btn-toolbar
- .btn-group
- a.btn.btn-default(ng-click="add()")
+ .col-md-3
+ .panel.panel-default
+ .panel-heading Pages
+ a.pull-right.btn.btn-default.btn-xs(ng-click="add()")
span.glyphicon.glyphicon-plus
- br
- .list-group
- .list-group-item(ng-repeat="item in data")
- .angular-ui-tree-handle {{item.title}}
- .pull-right.btn-group.btn-group-xs
- a.btn.btn-default(ng-click="edit(item)")
- span.glyphicon.glyphicon-pencil
- a.btn.btn-default(ng-click="delete(item)")
- span.glyphicon.glyphicon-remove
+ table.table
+ tr(ng-repeat="item in data")
+ td {{item.title}}
+ td
+ .pull-right.btn-group.btn-group-xs
+ a.btn.btn-default(ng-click="edit(item)")
+ span.glyphicon.glyphicon-pencil
+ a.btn.btn-default(ng-click="delete(item)")
+ span.glyphicon.glyphicon-remove
form.col-md-9(ng-submit="save()")
h3(ng-if="obj.ID") Edit
h3(ng-if="!obj.ID") New
@@ -28,5 +29,5 @@
input.form-control(id="url",ng-model="obj.url.path")
.form-group
label(for="content") Content
- textarea.form-control(id="content",markdown-editor="{hiddenButtons:'cmdImage',addExtraButtons: true, resize: 'vertical'}",ng-model="obj.content",rows="10")
+ div(id="content",text-angular,ta-text-editor-class="clearfix border-around" ta-html-editor-class="border-around",ng-model="obj.content")
input.btn.btn-default(type="submit",value="Save")
diff --git a/public/app/web/page.js b/public/app/web/page.js
index 6b9a897..5e22b78 100644
--- a/public/app/web/page.js
+++ b/public/app/web/page.js
@@ -3,7 +3,6 @@
angular.module('warehost')
.controller('PageWebCtrl',function(session,config,alert,NgTableParams,$scope,$rootScope,$http,$stateParams){
$scope.data = [];
- $scope.menulist = [];
alert.set({});
$scope.obj = {};
diff --git a/public/app/web/permission.jade b/public/app/web/permission.jade
index 99daf3b..6f16866 100644
--- a/public/app/web/permission.jade
+++ b/public/app/web/permission.jade
@@ -1,22 +1,25 @@
.container
h1 Permissions
- a.btn.btn-default(ng-click="isAdding=true")
- span.glyphicon.glyphicon-plus
- form.well(ng-submit="add()",name="addform",ng-if="isAdding")
- .form-group
- ui-select(ng-model="obj.login",theme="bootstrap")
- ui-select-match {{$select.selected.username}}
- ui-select-choices(repeat="item in loginlist | filter: $select.search")
- div(ng-bind-html="item.username | highlight: $select.search")
- 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.login.ID}}
- td(data-title="'Username'")
- span(ng-if="!item.isEditing") {{item.login.username}}
- td(data-title="'Option'")
- .btn-group.btn-group-xs
- span.btn.btn-default(ng-click="delete(item)")
- span.glyphicon.glyphicon-trash
+ .panel.panel-default
+ .panel-heading All
+ a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
+ span.glyphicon.glyphicon-plus
+ .panel-body(ng-if="isAdding")
+ form(ng-submit="add()",name="addform")
+ .form-group
+ ui-select(ng-model="obj.login",theme="bootstrap")
+ ui-select-match {{$select.selected.username}}
+ ui-select-choices(repeat="item in loginlist | filter: $select.search")
+ div(ng-bind-html="item.username | highlight: $select.search")
+ button.btn.btn-primary(type="submit")
+ span.glyphicon.glyphicon-floppy-disk
+ | Save
+ table.table(ng-table="tableParams")
+ tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
+ td(data-title="'#'") {{item.login.ID}}
+ td(data-title="'Username'")
+ span(ng-if="!item.isEditing") {{item.login.username}}
+ td(data-title="'Option'")
+ .btn-group.btn-group-xs
+ span.btn.btn-default(ng-click="delete(item)")
+ span.glyphicon.glyphicon-trash
diff --git a/public/components/config.js b/public/components/config.js
index 8fc7b42..582a254 100644
--- a/public/components/config.js
+++ b/public/components/config.js
@@ -2,7 +2,7 @@
angular.module('config', [])
.factory('config', function() {
return {
- api: 'https://api.warehost.de',
+ api: 'http://[::1]:8080',
table: {
count: 25
}
diff --git a/public/index.html b/public/index.html
index ce35dc1..beb2d03 100644
--- a/public/index.html
+++ b/public/index.html
@@ -18,11 +18,11 @@
-
-
+
+
-
+
@@ -47,13 +47,16 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
@@ -73,6 +76,7 @@
+