X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ftestbubble%2Fjot-header.tpl;h=0d11da271758c35e6df778d90fbae59f9b17ea37;hb=203aa819e2309e3e776aa1eaedb26b08d8336288;hp=0d9a824f750b1c0078cb9180a95b87076bb962b7;hpb=4d07cfa2d09eb05d4c5f6fb6f319865e4bab6c8a;p=friendica.git diff --git a/view/theme/testbubble/jot-header.tpl b/view/theme/testbubble/jot-header.tpl index 0d9a824f75..0d11da2717 100644 --- a/view/theme/testbubble/jot-header.tpl +++ b/view/theme/testbubble/jot-header.tpl @@ -4,10 +4,38 @@ var editor=false; var textlen = 0; +var plaintext = '$editselect'; function initEditor(cb) { if (editor==false) { $("#profile-jot-text-loading").show(); + if(plaintext == 'none') { + $("#profile-jot-text-loading").hide(); + $("#profile-jot-text").css({ 'height': 200, 'color': '#000' }); + $(".jothidden").show(); + editor = true; + $("a#jot-perms-icon").fancybox({ + 'transitionIn' : 'elastic', + 'transitionOut' : 'elastic' + }); + $("#profile-jot-submit-wrapper").show(); + {{ if $newpost }} + $("#profile-upload-wrapper").show(); + $("#profile-attach-wrapper").show(); + $("#profile-link-wrapper").show(); + $("#profile-video-wrapper").show(); + $("#profile-audio-wrapper").show(); + $("#profile-location-wrapper").show(); + $("#profile-nolocation-wrapper").show(); + $("#profile-title-wrapper").show(); + $("#profile-jot-plugin-wrapper").show(); + $("#jot-preview-link").show(); + {{ endif }} + + + if (typeof cb!="undefined") cb(); + return; + } tinyMCE.init({ theme : "advanced", mode : "specific_textareas", @@ -132,7 +160,7 @@ function initEditor(cb) { name: 'userfile', onSubmit: function(file,ext) { $('#profile-rotator').show(); }, onComplete: function(file,response) { - tinyMCE.execCommand('mceInsertRawHTML',false,response); + addeditortext(response); $('#profile-rotator').hide(); } } @@ -143,7 +171,7 @@ function initEditor(cb) { name: 'userfile', onSubmit: function(file,ext) { $('#profile-rotator').show(); }, onComplete: function(file,response) { - tinyMCE.execCommand('mceInsertRawHTML',false,response); + addeditortext(response); $('#profile-rotator').hide(); } } @@ -190,7 +218,7 @@ function initEditor(cb) { reply = bin2hex(reply); $('#profile-rotator').show(); $.get('parse_url?binurl=' + reply, function(data) { - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(data); $('#profile-rotator').hide(); }); } @@ -199,14 +227,14 @@ function initEditor(cb) { function jotVideoURL() { reply = prompt("$vidurl"); if(reply && reply.length) { - tinyMCE.execCommand('mceInsertRawHTML',false,'[video]' + reply + '[/video]'); + addeditortext('[video]' + reply + '[/video]'); } } function jotAudioURL() { reply = prompt("$audurl"); if(reply && reply.length) { - tinyMCE.execCommand('mceInsertRawHTML',false,'[audio]' + reply + '[/audio]'); + addeditortext('[audio]' + reply + '[/audio]'); } } @@ -230,7 +258,7 @@ function initEditor(cb) { $.get('share/' + id, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(data); $('#like-rotator-' + id).hide(); $(window).scrollTop(0); }); @@ -253,7 +281,7 @@ function initEditor(cb) { $.get('parse_url?binurl=' + reply, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(data); $('#profile-rotator').hide(); }); }); @@ -276,12 +304,57 @@ function initEditor(cb) { } } } + + function itemFiler(id) { + + var bordercolor = $("input").css("border-color"); + + $.get('filer/', function(data){ + $.fancybox(data); + $("#id_term").keypress(function(){ + $(this).css("border-color",bordercolor); + }) + $("#select_term").change(function(){ + $("#id_term").css("border-color",bordercolor); + }) + + $("#filer_save").click(function(e){ + e.preventDefault(); + reply = $("#id_term").val(); + if(reply && reply.length) { + commentBusy = true; + $('body').css('cursor', 'wait'); + $.get('filer/' + id + '?term=' + reply); + if(timer) clearTimeout(timer); + timer = setTimeout(NavUpdate,3000); + liking = 1; + $.fancybox.close(); + } else { + $("#id_term").css("border-color","#FF0000"); + } + return false; + }); + }); + + } + + function jotClearLocation() { $('#jot-coord').val(''); $('#profile-nolocation-wrapper').hide(); } + function addeditortext(data) { + if(plaintext == 'none') { + var currentText = $("#profile-jot-text").val(); + $("#profile-jot-text").val(currentText + data); + } + else + tinyMCE.execCommand('mceInsertRawHTML',false,data); + } + + $geotag