summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-10-30 23:38:26 -0700
committerSteve Manuel <nilslice@gmail.com>2016-10-30 23:38:26 -0700
commit431d78eef70c477d1ac36960fc115ce4997ebdfb (patch)
tree45e04009531bcf68f13027208cb35cedcbbf4ed9
parente747830167e22d97ea34969fab3cfe1c71c35f75 (diff)
updating editor js
-rw-r--r--management/editor/editor.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/management/editor/editor.go b/management/editor/editor.go
index 6a17acb..788047c 100644
--- a/management/editor/editor.go
+++ b/management/editor/editor.go
@@ -110,9 +110,11 @@ func Form(post Editable, fields ...Field) ([]byte, error) {
<button class="right waves-effect waves-light btn red delete-post" type="submit">Delete</button>
</div>
+<hr>
+
<div class="input-field external post-controls">
- <div>This post is pending approval. By clicking 'Approve' it will be immediately published.</div>
<button class="right waves-effect waves-light btn blue approve-post" type="submit">Approve</button>
+ <div>This post is pending approval. By clicking 'Approve' it will be immediately published.</div>
</div>
<script>
@@ -122,12 +124,17 @@ func Form(post Editable, fields ...Field) ([]byte, error) {
approve = form.find('.post-controls.external'),
id = form.find('input[name=id]');
- // hide delete button if this is a new post, or a non-post editor page
+ // hide if this is a new post, or a non-post editor page
if (id.val() === '-1' || form.attr('action') !== '/admin/edit') {
del.hide();
approve.hide();
}
+ // hide approval if not on a pending content item
+ if (getParam("status") !== "pending") {
+ approve.hide();
+ }
+
del.on('click', function(e) {
e.preventDefault();
var action = form.attr('action');