diff options
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-x[-rw-r--r--] | view/tpl/jot-header.tpl | 99 |
1 files changed, 40 insertions, 59 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index e4fb00b7a..810ec866f 100644..100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -1,21 +1,20 @@ - <script language="javascript" type="text/javascript"> var editor=false; var textlen = 0; -var plaintext = '$editselect'; +var plaintext = '{{$editselect}}'; function initEditor(cb){ if (editor==false){ - $("#profile-jot-text-loading").show(); + $("#profile-jot-text-loading").spin('small'); if(plaintext == 'none') { - $("#profile-jot-text-loading").hide(); + $("#profile-jot-text-loading").spin(false); $("#profile-jot-text").css({ 'height': 200, 'color': '#000' }); $("#profile-jot-text").contact_autocomplete(baseurl+"/acl"); editor = true; - $("a#jot-perms-icon").fancybox({ - 'transitionIn' : 'elastic', - 'transitionOut' : 'elastic' + $("a#jot-perms-icon").colorbox({ + 'inline' : true, + 'transition' : 'elastic' }); $(".jothidden").show(); if (typeof cb!="undefined") cb(); @@ -24,7 +23,7 @@ function initEditor(cb){ tinyMCE.init({ theme : "advanced", mode : "specific_textareas", - editor_selector: $editselect, + editor_selector: {{$editselect}}, auto_focus: "profile-jot-text", plugins : "bbcode,paste,autoresize, inlinepopups", theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code", @@ -42,7 +41,7 @@ function initEditor(cb){ force_br_newlines : true, forced_root_block : '', convert_urls: false, - content_css: "$baseurl/view/custom_tinymce.css", + content_css: "{{$baseurl}}/view/custom_tinymce.css", theme_advanced_path : false, file_browser_callback : "fcFileBrowser", setup : function(ed) { @@ -74,29 +73,11 @@ function initEditor(cb){ $('#profile-jot-desc').html(' '); } - //Character count - - if(textlen <= 140) { - $('#character-counter').removeClass('red'); - $('#character-counter').removeClass('orange'); - $('#character-counter').addClass('grey'); - } - if((textlen > 140) && (textlen <= 420)) { - $('#character-counter').removeClass('grey'); - $('#character-counter').removeClass('red'); - $('#character-counter').addClass('orange'); - } - if(textlen > 420) { - $('#character-counter').removeClass('grey'); - $('#character-counter').removeClass('orange'); - $('#character-counter').addClass('red'); - } - $('#character-counter').text(textlen); }); ed.onInit.add(function(ed) { ed.pasteAsPlainText = true; - $("#profile-jot-text-loading").hide(); + $("#profile-jot-text-loading").spin(false); $(".jothidden").show(); if (typeof cb!="undefined") cb(); }); @@ -106,10 +87,10 @@ function initEditor(cb){ editor = true; // setup acl popup - $("a#jot-perms-icon").fancybox({ - 'transitionIn' : 'elastic', - 'transitionOut' : 'elastic' - }); + $("a#jot-perms-icon").colorbox({ + 'inline' : true, + 'transition' : 'elastic' + }); } else { if (typeof cb!="undefined") cb(); } @@ -122,9 +103,9 @@ function enableOnUser(){ } </script> -<script type="text/javascript" src="$baseurl/js/ajaxupload.js" ></script> +<script type="text/javascript" src="{{$baseurl}}/js/ajaxupload.js" ></script> <script> - var ispublic = '$ispublic'; + var ispublic = '{{$ispublic}}'; $(document).ready(function() { @@ -134,23 +115,23 @@ function enableOnUser(){ var uploader = new window.AjaxUpload( 'wall-image-upload', - { action: '$baseurl/wall_upload/$nickname', + { action: '{{$baseurl}}/wall_upload/{{$nickname}}', name: 'userfile', - onSubmit: function(file,ext) { $('#profile-rotator').show(); }, + onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); }, onComplete: function(file,response) { addeditortext(response); - $('#profile-rotator').hide(); + $('#profile-rotator').spin(false); } } ); var file_uploader = new window.AjaxUpload( 'wall-file-upload', - { action: '$baseurl/wall_attach/$nickname', + { action: '{{$baseurl}}/wall_attach/{{$nickname}}', name: 'userfile', - onSubmit: function(file,ext) { $('#profile-rotator').show(); }, + onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); }, onComplete: function(file,response) { addeditortext(response); - $('#profile-rotator').hide(); + $('#profile-rotator').spin(false); } } ); @@ -177,26 +158,26 @@ function enableOnUser(){ } function jotGetLink() { - reply = prompt("$linkurl"); + reply = prompt("{{$linkurl}}"); if(reply && reply.length) { reply = bin2hex(reply); - $('#profile-rotator').show(); - $.get('$baseurl/parse_url?binurl=' + reply, function(data) { + $('#profile-rotator').spin('tiny'); + $.get('{{$baseurl}}/parse_url?binurl=' + reply, function(data) { addeditortext(data); - $('#profile-rotator').hide(); + $('#profile-rotator').spin(false); }); } } function jotVideoURL() { - reply = prompt("$vidurl"); + reply = prompt("{{$vidurl}}"); if(reply && reply.length) { addeditortext('[video]' + reply + '[/video]'); } } function jotAudioURL() { - reply = prompt("$audurl"); + reply = prompt("{{$audurl}}"); if(reply && reply.length) { addeditortext('[audio]' + reply + '[/audio]'); } @@ -204,7 +185,7 @@ function enableOnUser(){ function jotGetLocation() { - reply = prompt("$whereareu", $('#jot-location').val()); + reply = prompt("{{$whereareu}}", $('#jot-location').val()); if(reply && reply.length) { $('#jot-location').val(reply); } @@ -213,12 +194,12 @@ function enableOnUser(){ function jotShare(id) { if ($('#jot-popup').length != 0) $('#jot-popup').show(); - $('#like-rotator-' + id).show(); - $.get('$baseurl/share/' + id, function(data) { + $('#like-rotator-' + id).spin('tiny'); + $.get('{{$baseurl}}/share/' + id, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ addeditortext(data); - $('#like-rotator-' + id).hide(); + $('#like-rotator-' + id).spin(false); $(window).scrollTop(0); }); @@ -237,19 +218,19 @@ function enableOnUser(){ event.preventDefault(); if(reply && reply.length) { reply = bin2hex(reply); - $('#profile-rotator').show(); - $.get('$baseurl/parse_url?binurl=' + reply, function(data) { + $('#profile-rotator').spin('tiny'); + $.get('{{$baseurl}}/parse_url?binurl=' + reply, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ addeditortext(data); - $('#profile-rotator').hide(); + $('#profile-rotator').spin(false); }); }); } } function itemTag(id) { - reply = prompt("$term"); + reply = prompt("{{$term}}"); if(reply && reply.length) { reply = reply.replace('#',''); if(reply.length) { @@ -257,7 +238,7 @@ function enableOnUser(){ commentBusy = true; $('body').css('cursor', 'wait'); - $.get('$baseurl/tagger/' + id + '?term=' + reply); + $.get('{{$baseurl}}/tagger/' + id + '?term=' + reply); if(timer) clearTimeout(timer); timer = setTimeout(NavUpdate,3000); liking = 1; @@ -270,7 +251,7 @@ function enableOnUser(){ var bordercolor = $("input").css("border-color"); $.get('filer/', function(data){ - $.fancybox(data); + $.colorbox({html:data}); $("#id_term").keypress(function(){ $(this).css("border-color",bordercolor); }) @@ -284,11 +265,11 @@ function enableOnUser(){ if(reply && reply.length) { commentBusy = true; $('body').css('cursor', 'wait'); - $.get('$baseurl/filer/' + id + '?term=' + reply, NavUpdate); + $.get('{{$baseurl}}/filer/' + id + '?term=' + reply, NavUpdate); // if(timer) clearTimeout(timer); // timer = setTimeout(NavUpdate,3000); liking = 1; - $.fancybox.close(); + $.colorbox.close(); } else { $("#id_term").css("border-color","#FF0000"); } @@ -312,7 +293,7 @@ function enableOnUser(){ tinyMCE.execCommand('mceInsertRawHTML',false,data); } - $geotag + {{$geotag}} </script> |