diff options
author | zotlabs <mike@macgirvin.com> | 2020-03-12 17:55:35 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2020-03-12 17:55:35 -0700 |
commit | 8f5cb0c45a4aa2011933087f86333c60a77c3e0f (patch) | |
tree | b9c99fd39711509f7d2e2a459414d819622ac68d /view/tpl/jot-header.tpl | |
parent | 938d26ba3e9c6566d00f7393daa3e1b36f2e5479 (diff) | |
parent | 720d3dcedc96c7aaf6c4444c8b45acd46b8718b0 (diff) | |
download | volse-hubzilla-8f5cb0c45a4aa2011933087f86333c60a77c3e0f.tar.gz volse-hubzilla-8f5cb0c45a4aa2011933087f86333c60a77c3e0f.tar.bz2 volse-hubzilla-8f5cb0c45a4aa2011933087f86333c60a77c3e0f.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-x | view/tpl/jot-header.tpl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 7b1f4ee05..d519fd666 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -58,6 +58,9 @@ var activeCommentText = ''; $('#id_mimetype').on('load', jotSetMime); $('#id_mimetype').on('change', jotSetMime); + $('#jot-add-option').on('click', jotAddOption); + $(document).on('click', '.poll-option-close', jotRemoveOption); + function jotSetMime() { var mtype = $('#id_mimetype').val(); if(mtype == 'text/bbcode') @@ -122,6 +125,7 @@ var activeCommentText = ''; activeCommentID = 0; }, }); + }); function deleteCheckedItems() { @@ -309,6 +313,7 @@ var activeCommentText = ''; function itemCancel() { $("#jot-title").val(''); $("#profile-jot-text").val(''); + $(".jot-poll-option input").val(''); $("#jot-category").tagsinput('removeAll'); postSaveChanges('clean'); @@ -317,6 +322,7 @@ var activeCommentText = ''; $(".jothidden").hide(); $("#profile-jot-text").removeClass('jot-expanded'); $("#profile-jot-tools").addClass('d-none'); + $("#jot-poll-wrap").addClass('d-none'); $("#jot-preview-content").html('').hide(); editor = false; {{else}} @@ -512,6 +518,19 @@ var activeCommentText = ''; } + function initPoll() { + $('#jot-poll-wrap').toggleClass('d-none'); + } + + function jotAddOption() { + var option = '<div class="jot-poll-option form-group"><input class="w-100 border-0" name="poll_answers[]" type="text" value="" placeholder="Option"><div class="poll-option-close"><i class="fa fa-close"></i></div></div>'; + $('#jot-poll-options').append(option); + } + + function jotRemoveOption(e) { + $(this).closest('.jot-poll-option').remove(); + } + </script> <script> |