diff --git a/view/theme/frio/js/modal.js b/view/theme/frio/js/modal.js index 2b3059eaf1..3f96eeca7d 100644 --- a/view/theme/frio/js/modal.js +++ b/view/theme/frio/js/modal.js @@ -332,6 +332,8 @@ function toggleJotNav (elm) { // For some some tab panels we need to execute other js functions. if (tabpanel === "jot-preview-content") { preview_post(); + // Make Share button visivle in preview + $('#jot-preview-share').removeClass("minimize").attr("aria-hidden" ,"false"); } else if (tabpanel === "jot-fbrowser-wrapper") { $(function() { Dialog.showJot(); diff --git a/view/theme/frio/js/textedit.js b/view/theme/frio/js/textedit.js index 2079c20cdc..ad5f950234 100644 --- a/view/theme/frio/js/textedit.js +++ b/view/theme/frio/js/textedit.js @@ -27,6 +27,22 @@ function insertFormatting(BBcode, id) { return true; } +function insertFormattingToPost(BBcode) { + textarea = document.getElementById("profile-jot-text"); + if (document.selection) { + textarea.focus(); + selected = document.selection.createRange(); + selected.text = "[" + BBcode + "]" + selected.text + "[/" + BBcode + "]"; + } else if (textarea.selectionStart || textarea.selectionStart == "0") { + var start = textarea.selectionStart; + var end = textarea.selectionEnd; + textarea.value = textarea.value.substring(0, start) + "[" + BBcode + "]" + textarea.value.substring(start, end) + "[/" + BBcode + "]" + textarea.value.substring(end, textarea.value.length); + } + + $(textarea).trigger('change'); + + return true; +} function showThread(id) { $("#collapsed-comments-" + id).show() diff --git a/view/theme/frio/templates/jot.tpl b/view/theme/frio/templates/jot.tpl index 423be5a5d9..14f383ac8d 100644 --- a/view/theme/frio/templates/jot.tpl +++ b/view/theme/frio/templates/jot.tpl @@ -93,6 +93,10 @@