aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl')
-rwxr-xr-xview/tpl/edpost_head.tpl7
-rwxr-xr-xview/tpl/jot-header.tpl10
2 files changed, 14 insertions, 3 deletions
diff --git a/view/tpl/edpost_head.tpl b/view/tpl/edpost_head.tpl
index b2ab5db4e..4f39137ab 100755
--- a/view/tpl/edpost_head.tpl
+++ b/view/tpl/edpost_head.tpl
@@ -1,10 +1,13 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
- {{if $delete}}
<div class="pull-right">
+ {{if $cancel}}
+ <button id="dbtn-cancel" class="btn btn-warning btn-sm" onclick="itemCancel(); return false;">{{$cancel}}</button>
+ {{/if}}
+ {{if $delete}}
<a href="item/drop/{{$id}}" id="delete-btn" class="btn btn-sm btn-danger" onclick="return confirmDelete();"><i class="fa fa-trash-o"></i>&nbsp;{{$delete}}</a>
+ {{/if}}
</div>
- {{/if}}
<h2>{{$title}}</h2>
<div class="clear"></div>
</div>
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index df67e9b2d..f2b68ece0 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -357,6 +357,14 @@ var activeCommentText = '';
}
}
+ function itemCancel() {
+ $("#jot-title").val('');
+ $("#profile-jot-text").val('');
+ $("#jot-category").val('');
+ postSaveChanges('clean','');
+ window.history.back();
+ }
+
function itemFiler(id) {
if($('#item-filer-dialog').length)
$('#item-filer-dialog').remove();
@@ -575,7 +583,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del
localStorage.setItem("post_title" + postid, $("#jot-title").val());
localStorage.setItem("post_body" + postid, $("#profile-jot-text").val());
if($("#jot-category").length)
- localStorage.setItem("post_category + postid", $("#jot-category").val());
+ localStorage.setItem("post_category" + postid, $("#jot-category").val());
}
if(action == 'start') {