X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Ftemplates%2Fjot-header.tpl;h=d52f4b98dec41eac862d5ce3ebff8c0c937166f0;hb=000e6457b4c460aa5a1850b812dc5e622a237685;hp=af9951528cbb1cc427b6b50ad32bd3698518df7d;hpb=b17f032b6a67f2e7c7855fa4c07ad21b07d1239c;p=friendica.git
diff --git a/view/theme/frio/templates/jot-header.tpl b/view/theme/frio/templates/jot-header.tpl
index af9951528c..d52f4b98de 100644
--- a/view/theme/frio/templates/jot-header.tpl
+++ b/view/theme/frio/templates/jot-header.tpl
@@ -2,134 +2,37 @@
@@ -140,7 +43,7 @@
$(document).ready(function() {
- /* enable tinymce on focus and click */
+ /* enable editor on focus and click */
$("#profile-jot-text").focus(enableOnUser);
$("#profile-jot-text").click(enableOnUser);
@@ -177,33 +80,6 @@
Dialog.doFileBrowser("main");
jotActive();
});
-
- /**
- var uploader = new window.AjaxUpload(
- 'wall-image-upload',
- { action: 'wall_upload/{{$nickname}}',
- name: 'userfile',
- onSubmit: function(file,ext) { $('#profile-rotator').show(); },
- onComplete: function(file,response) {
- addeditortext(response);
- $('#profile-rotator').hide();
- }
- }
- );
- var file_uploader = new window.AjaxUpload(
- 'wall-file-upload',
- { action: 'wall_attach/{{$nickname}}',
- name: 'userfile',
- onSubmit: function(file,ext) { $('#profile-rotator').show(); },
- onComplete: function(file,response) {
- addeditortext(response);
- $('#profile-rotator').hide();
- }
- }
- );
-
- }
- **/
});
function deleteCheckedItems() {
@@ -377,18 +253,14 @@
}
function addeditortext(data) {
- if(plaintext == 'none') {
- // get the textfield
- var textfield = document.getElementById("profile-jot-text");
- // check if the textfield does have the default-value
- jotTextOpenUI(textfield);
- // save already existent content
- var currentText = $("#profile-jot-text").val();
- //insert the data as new value
- textfield.value = currentText + data;
- }
- else
- tinyMCE.execCommand('mceInsertRawHTML',false,data);
+ // get the textfield
+ var textfield = document.getElementById("profile-jot-text");
+ // check if the textfield does have the default-value
+ jotTextOpenUI(textfield);
+ // save already existent content
+ var currentText = $("#profile-jot-text").val();
+ //insert the data as new value
+ textfield.value = currentText + data;
}
{{$geotag}}
@@ -408,36 +280,14 @@
.modal.show;
}
- // the following functions show/hide the specific jot content
- // in dependence of the selected nav
- function aclActive() {
- $(".modal-body #profile-jot-wrapper, .modal-body #jot-preview-content, .modal-body #jot-fbrowser-wrapper").hide();
- $(".modal-body #profile-jot-acl-wrapper").show();
- }
-
-
- function previewActive() {
- $(".modal-body #profile-jot-wrapper, .modal-body #profile-jot-acl-wrapper,.modal-body #jot-fbrowser-wrapper").hide();
- preview_post();
- }
-
+ // Activate the jot text section in the jot modal
function jotActive() {
- $(".modal-body #profile-jot-acl-wrapper, .modal-body #jot-preview-content, .modal-body #jot-fbrowser-wrapper").hide();
- $(".modal-body #profile-jot-wrapper").show();
-
- //make sure jot text does have really the active class (we do this because there are some
- // other events which trigger jot text
- toggleJotNav($("#jot-modal .jot-nav #jot-text-lnk"));
- }
-
- function fbrowserActive() {
- $(".modal-body #profile-jot-wrapper, .modal-body #jot-preview-content, .modal-body #profile-jot-acl-wrapper").hide();
-
- $(".modal-body #jot-fbrowser-wrapper").show();
-
- $(function() {Dialog.showJot();});
+ // Make sure jot text does have really the active class (we do this because there are some
+ // other events which trigger jot text (we need to do this for the desktop and mobile
+ // jot nav
+ var elem = $("#jot-modal .jot-nav #jot-text-lnk");
+ var elemMobile = $("#jot-modal .jot-nav #jot-text-lnk-mobile")
+ toggleJotNav(elem[0]);
+ toggleJotNav(elemMobile[0]);
}
-
-
-