X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Ftemplates%2Fjot-header.tpl;h=27fc608e7cc0d1bde2196d7f2b1c290bc57b2e8f;hb=4ad6a7f073c14c58a0acec2d5354a16433043b57;hp=145667be9b412ef0a53fa43de827e7e3d9e518da;hpb=425bd83c8d257c0c2de7d3b7c104df6caa504ed8;p=friendica.git diff --git a/view/theme/frio/templates/jot-header.tpl b/view/theme/frio/templates/jot-header.tpl index 145667be9b..27fc608e7c 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}} @@ -397,13 +269,18 @@ var modal = $('#jot-modal').modal(); jotcache = $("#jot-sections"); + // Auto focus on the first enabled field in the modal + modal.on('shown.bs.modal', function (e) { + $('#jot-modal-content').find('select:not([disabled]), input:not([type=hidden]):not([disabled]), textarea:not([disabled])').first().focus(); + }) + modal .find('#jot-modal-content') .append(jotcache) .modal.show; } - // the following functions show/hide the specific jot content + // 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();