aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl')
-rwxr-xr-xview/tpl/jot-header.tpl15
-rwxr-xr-xview/tpl/jot.tpl6
2 files changed, 18 insertions, 3 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index f2b68ece0..39aa9d9c4 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -7,10 +7,11 @@ var pretext = '{{$pretext}}';
function initEditor(cb){
if (editor==false){
$("#profile-jot-text-loading").show();
+ $("#profile-jot-reset").removeClass('d-none');
{{$geotag}}
if(plaintext == 'none') {
$("#profile-jot-text-loading").hide();
- $("#profile-jot-text").css({ 'height': 200 });
+ //$("#profile-jot-text").css({ 'height': 200 });
{{if $bbco_autocomplete}}
$("#profile-jot-text").bbco_autocomplete('{{$bbco_autocomplete}}'); // autocomplete bbcode
{{/if}}
@@ -361,8 +362,16 @@ var activeCommentText = '';
$("#jot-title").val('');
$("#profile-jot-text").val('');
$("#jot-category").val('');
- postSaveChanges('clean','');
+ postSaveChanges('clean');
+
+ {{if $reset}}
+ $(".jothidden").hide();
+ $("#profile-jot-text").removeClass('jot-expanded');
+ $("#profile-jot-reset").addClass('d-none');
+ editor = false;
+ {{else}}
window.history.back();
+ {{/if}}
}
function itemFiler(id) {
@@ -573,7 +582,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del
<script>
var postSaveTimer = null;
- function postSaveChanges(action, type) {
+ function postSaveChanges(action) {
if({{$auto_save_draft}}) {
var doctype = $('#jot-webpage').val();
diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl
index 9aa330c40..0d1b4bd0d 100755
--- a/view/tpl/jot.tpl
+++ b/view/tpl/jot.tpl
@@ -9,6 +9,7 @@
</div>
{{/if}}
<div class="mb-4" id="profile-jot-wrapper">
+
{{if $parent}}
<input type="hidden" name="parent" value="{{$parent}}" />
{{/if}}
@@ -41,6 +42,11 @@
</div>
{{/if}}
<div id="jot-text-wrap">
+ {{if $reset}}
+ <button id="profile-jot-reset" class="btn btn-outline-secondary btn-sm d-none border-0" title="{{$reset}}" onclick="itemCancel(); return false;">
+ <i class="fa fa-close"></i>
+ </button>
+ {{/if}}
<textarea class="profile-jot-text" id="profile-jot-text" name="body" tabindex="2" placeholder="{{$placeholdtext}}" >{{$content}}</textarea>
</div>
{{if $attachment}}