From b620b6e60849e8ca7e4b54638a599c1cd2d44572 Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Thu, 27 Dec 2012 10:20:51 -0500 Subject: [PATCH 1/4] api: add 'allow_api' to user authenticated via oauth --- include/oauth.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/oauth.php b/include/oauth.php index 28ac4428f0..de6f1e00db 100644 --- a/include/oauth.php +++ b/include/oauth.php @@ -150,6 +150,7 @@ class FKOAuth1 extends OAuthServer { $_SESSION['page_flags'] = $record['page-flags']; $_SESSION['my_url'] = $a->get_baseurl() . '/profile/' . $record['nickname']; $_SESSION['addr'] = $_SERVER['REMOTE_ADDR']; + $_SESSION["allow_api"] = true; //notice( t("Welcome back ") . $record['username'] . EOL); $a->user = $record; From b6981768ee02da8f56e8943efaa4fe755f71ca9f Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Thu, 27 Dec 2012 09:38:42 -0700 Subject: [PATCH 2/4] remove more dashes in templates --- mod/admin.php | 10 ++++++++++ mod/events.php | 11 +++++++++++ view/admin_users.tpl | 2 +- view/event.tpl | 2 +- view/events.tpl | 2 +- view/smarty3/admin_users.tpl | 2 +- view/smarty3/event.tpl | 2 +- view/smarty3/events.tpl | 2 +- view/theme/diabook/admin_users.tpl | 2 +- view/theme/diabook/smarty3/admin_users.tpl | 2 +- 10 files changed, 29 insertions(+), 8 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 0381fcf4cc..89363541ca 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -710,6 +710,16 @@ function admin_page_users(&$a){ $users = array_map("_setup_users", $users); + // Get rid of dashes in key names, Smarty3 can't handle them + foreach($users as $key => $user) { + $new_user = array(); + foreach($user as $k => $v) { + $k = str_replace('-','_',$k); + $new_user[$k] = $v; + } + $users[$key] = $new_user; + } + $t = get_markup_template("admin_users.tpl"); $o = replace_macros($t, array( // strings // diff --git a/mod/events.php b/mod/events.php index 527e1ec3fd..61f16b50fc 100755 --- a/mod/events.php +++ b/mod/events.php @@ -341,6 +341,17 @@ function events_content(&$a) { // $tpl = get_markup_template("events.tpl"); // } } + + // Get rid of dashes in key names, Smarty3 can't handle them + foreach($events as $key => $event) { + $event_item = array(); + foreach($event['item'] as $k => $v) { + $k = str_replace('-','_',$k); + $event_item[$k] = $v; + } + $events[$key]['item'] = $event_item; + } + $o = replace_macros($tpl, array( '$baseurl' => $a->get_baseurl(), '$tabs' => $tabs, diff --git a/view/admin_users.tpl b/view/admin_users.tpl index c9ab0e3f73..781d538bb7 100644 --- a/view/admin_users.tpl +++ b/view/admin_users.tpl @@ -70,7 +70,7 @@ $u.register_date $u.login_date $u.lastitem_date - $u.page-flags {{ if $u.is_admin }}($siteadmin){{ endif }} + $u.page_flags {{ if $u.is_admin }}($siteadmin){{ endif }} {{ if $u.is_admin }}   diff --git a/view/event.tpl b/view/event.tpl index ac9f889ecf..1f71289b3a 100644 --- a/view/event.tpl +++ b/view/event.tpl @@ -1,7 +1,7 @@ {{ for $events as $event }}
- {{ if $event.item.author-name }}$event.item.author-name{{ endif }} + {{ if $event.item.author_name }}$event.item.author_name{{ endif }} $event.html {{ if $event.item.plink }}{{ endif }} {{ if $event.edit }}{{ endif }} diff --git a/view/events.tpl b/view/events.tpl index 5a9787de36..be7dc2fb2d 100644 --- a/view/events.tpl +++ b/view/events.tpl @@ -14,7 +14,7 @@ $tabs {{ for $events as $event }}
{{ if $event.is_first }}
$event.d
{{ endif }} - {{ if $event.item.author-name }}$event.item.author-name{{ endif }} + {{ if $event.item.author_name }}$event.item.author_name{{ endif }} $event.html {{ if $event.item.plink }}{{ endif }} {{ if $event.edit }}{{ endif }} diff --git a/view/smarty3/admin_users.tpl b/view/smarty3/admin_users.tpl index 987ab4bccf..5658fc7e54 100644 --- a/view/smarty3/admin_users.tpl +++ b/view/smarty3/admin_users.tpl @@ -70,7 +70,7 @@ {{$u.register_date}} {{$u.login_date}} {{$u.lastitem_date}} - {{$u.page-flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}} + {{$u.page_flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}} {{if $u.is_admin}}   diff --git a/view/smarty3/event.tpl b/view/smarty3/event.tpl index c8570cef29..2a0868d25e 100644 --- a/view/smarty3/event.tpl +++ b/view/smarty3/event.tpl @@ -1,7 +1,7 @@ {{foreach $events as $event}}
- {{if $event.item.author-name}}{{$event.item.author-name}}{{/if}} + {{if $event.item.author_name}}{{$event.item.author_name}}{{/if}} {{$event.html}} {{if $event.item.plink}}{{/if}} {{if $event.edit}}{{/if}} diff --git a/view/smarty3/events.tpl b/view/smarty3/events.tpl index 0d20b0a72c..50a8cf3a86 100644 --- a/view/smarty3/events.tpl +++ b/view/smarty3/events.tpl @@ -14,7 +14,7 @@ {{foreach $events as $event}}
{{if $event.is_first}}
{{$event.d}}
{{/if}} - {{if $event.item.author-name}}{{$event.item.author-name}}{{/if}} + {{if $event.item.author_name}}{{$event.item.author_name}}{{/if}} {{$event.html}} {{if $event.item.plink}}{{/if}} {{if $event.edit}}{{/if}} diff --git a/view/theme/diabook/admin_users.tpl b/view/theme/diabook/admin_users.tpl index 8aabb51ec9..609fd5ad2a 100644 --- a/view/theme/diabook/admin_users.tpl +++ b/view/theme/diabook/admin_users.tpl @@ -69,7 +69,7 @@ $u.register_date $u.login_date $u.lastitem_date - $u.page-flags + $u.page_flags diff --git a/view/theme/diabook/smarty3/admin_users.tpl b/view/theme/diabook/smarty3/admin_users.tpl index 67a079a08f..1bc1949b8b 100644 --- a/view/theme/diabook/smarty3/admin_users.tpl +++ b/view/theme/diabook/smarty3/admin_users.tpl @@ -69,7 +69,7 @@ {{$u.register_date}} {{$u.login_date}} {{$u.lastitem_date}} - {{$u.page-flags}} + {{$u.page_flags}} From 659ae4ed04c97304a86ecf35edac4d3dec7903c7 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Thu, 27 Dec 2012 12:20:47 -0700 Subject: [PATCH 3/4] incremental improvements --- view/theme/frost-mobile/admin_users.tpl | 98 ++++++++++++++++++ view/theme/frost-mobile/default.php | 2 +- .../{friendika-16.png => friendica-16.png} | Bin view/theme/frost-mobile/jot.tpl | 10 +- view/theme/frost-mobile/js/main.js | 41 +++++--- view/theme/frost-mobile/js/main.min.js | 2 +- view/theme/frost-mobile/js/theme.js | 7 ++ view/theme/frost-mobile/js/theme.min.js | 2 +- view/theme/frost-mobile/login-style.css | 4 + view/theme/frost-mobile/style.css | 18 ++-- view/theme/frost-mobile/theme.php | 18 ++-- view/theme/frost/admin_users.tpl | 98 ++++++++++++++++++ view/theme/frost/contacts-template.tpl | 4 +- view/theme/frost/default.php | 2 +- .../{friendika-16.png => friendica-16.png} | Bin view/theme/frost/jot.tpl | 8 +- view/theme/frost/js/main.js | 40 ++++--- view/theme/frost/js/main.min.js | 2 +- view/theme/frost/js/theme.js | 17 ++- view/theme/frost/js/theme.min.js | 2 +- view/theme/frost/lock.cur | Bin 4286 -> 4286 bytes view/theme/frost/login-style.css | 4 + view/theme/frost/msg-header.tpl | 3 +- view/theme/frost/nav.tpl | 16 +-- view/theme/frost/style.css | 77 +++++++++++--- view/theme/frost/theme.php | 14 +-- view/theme/frost/threaded_conversation.tpl | 4 + view/theme/frost/wall_thread.tpl | 2 +- 28 files changed, 401 insertions(+), 94 deletions(-) create mode 100644 view/theme/frost-mobile/admin_users.tpl rename view/theme/frost-mobile/{friendika-16.png => friendica-16.png} (100%) create mode 100644 view/theme/frost/admin_users.tpl rename view/theme/frost/{friendika-16.png => friendica-16.png} (100%) diff --git a/view/theme/frost-mobile/admin_users.tpl b/view/theme/frost-mobile/admin_users.tpl new file mode 100644 index 0000000000..0d11934348 --- /dev/null +++ b/view/theme/frost-mobile/admin_users.tpl @@ -0,0 +1,98 @@ + +
+

$title - $page

+ +
+ + +

$h_pending

+ {{ if $pending }} + + + + {{ for $th_pending as $th }}{{ endfor }} + + + + + + {{ for $pending as $u }} + + + + + + + + {{ endfor }} + +
$th
$u.created$u.name + + +
+ +
+ {{ else }} +

$no_pending

+ {{ endif }} + + + + +

$h_users

+ {{ if $users }} + + + + + {{ for $th_users as $th }}{{ endfor }} + + + + + + {{ for $users as $u }} + + + + + + + + + + {{ endif }} + + + {{ endfor }} + +
$th
$u.nickname$u.name$u.register_date$u.lastitem_date + {{ if $u.is_admin }} +   + {{ else }} + + {{ if $u.is_admin }} +   + {{ else }} + + + {{ endif }} +
+ +
+ {{ else }} + NO USERS?!? + {{ endif }} +
+
diff --git a/view/theme/frost-mobile/default.php b/view/theme/frost-mobile/default.php index 0d72aebbdb..7a8a0494de 100644 --- a/view/theme/frost-mobile/default.php +++ b/view/theme/frost-mobile/default.php @@ -5,7 +5,7 @@ - +module === 'home') echo 'onLoad="setTimeout(\'homeRedirect()\', 1500)"'?>> module === 'home' ) { ?> diff --git a/view/theme/frost-mobile/friendika-16.png b/view/theme/frost-mobile/friendica-16.png similarity index 100% rename from view/theme/frost-mobile/friendika-16.png rename to view/theme/frost-mobile/friendica-16.png diff --git a/view/theme/frost-mobile/jot.tpl b/view/theme/frost-mobile/jot.tpl index d8dd44990a..d28cf57e48 100644 --- a/view/theme/frost-mobile/jot.tpl +++ b/view/theme/frost-mobile/jot.tpl @@ -28,6 +28,10 @@
+
+ +
+
@@ -64,10 +68,6 @@ $jotplugins
-
- -
-
@@ -75,8 +75,8 @@ $acl
$emailcc
-
$jotnets +
diff --git a/view/theme/frost-mobile/js/main.js b/view/theme/frost-mobile/js/main.js index a56c313125..1db338fcdf 100644 --- a/view/theme/frost-mobile/js/main.js +++ b/view/theme/frost-mobile/js/main.js @@ -1,20 +1,33 @@ - function openClose(theID) { - if(document.getElementById(theID).style.display == "block") { - document.getElementById(theID).style.display = "none" - } - else { - document.getElementById(theID).style.display = "block" - } - } + function openClose(listID) { +/* if(document.getElementById(theID).style.display == "block") { + document.getElementById(theID).style.display = "none" + } + else { + document.getElementById(theID).style.display = "block" + }*/ + listID = "#" + listID.replace(/:/g, "\\:"); + listID = listID.replace(/\./g, "\\."); + listID = listID.replace(/@/g, "\\@"); - function openMenu(theID) { - document.getElementById(theID).style.display = "block" - } + if($j(listID).is(":visible")) { + $j(listID).hide(); + $j(listID+"-wrapper").show(); + alert($j(listID+"-wrapper").attr("id")); + } + else { + $j(listID).show(); + $j(listID+"-wrapper").hide(); + } + } - function closeMenu(theID) { - document.getElementById(theID).style.display = "none" - } + function openMenu(theID) { + document.getElementById(theID).style.display = "block" + } + + function closeMenu(theID) { + document.getElementById(theID).style.display = "none" + } diff --git a/view/theme/frost-mobile/js/main.min.js b/view/theme/frost-mobile/js/main.min.js index eb91cd947f..807c5327f2 100644 --- a/view/theme/frost-mobile/js/main.min.js +++ b/view/theme/frost-mobile/js/main.min.js @@ -1 +1 @@ -function openClose(e){document.getElementById(e).style.display=="block"?document.getElementById(e).style.display="none":document.getElementById(e).style.display="block"}function openMenu(e){document.getElementById(e).style.display="block"}function closeMenu(e){document.getElementById(e).style.display="none"}function NavUpdate(){if(!stopped){var e="ping"+(localUser!=0?"?f=&uid="+localUser:"");$j.get(e,function(e){$j(e).find("result").each(function(){$j("nav").trigger("nav-update",this),$j("#live-network").length&&(src="network",liveUpdate()),$j("#live-profile").length&&(src="profile",liveUpdate()),$j("#live-community").length&&(src="community",liveUpdate()),$j("#live-notes").length&&(src="notes",liveUpdate()),$j("#live-display").length&&(src="display",liveUpdate()),$j("#live-photos").length&&liking&&(liking=0,window.location.href=window.location.href)})})}timer=setTimeout(NavUpdate,updateInterval)}function liveUpdate(){if(src==null||stopped||!profile_uid){$j(".like-rotator").hide();return}if($j(".comment-edit-text-full").length||in_progress){livetime&&clearTimeout(livetime),livetime=setTimeout(liveUpdate,1e4);return}livetime!=null&&(livetime=null),prev="live-"+src,in_progress=!0;var e=netargs.length?"/"+netargs:"",t="update_"+src+e+"&p="+profile_uid+"&page="+profile_page+"&msie="+(msie?1:0);$j.get(t,function(e){in_progress=!1,$j(".toplevel_item",e).each(function(){var e=$j(this).attr("id");if($j("#"+e).length==0&&profile_page==1)$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))}),$j("#"+prev).after($j(this));else{var t=$j(".hide-comments-total",this).attr("id");if(typeof t!="undefined"){t=t.split("-")[3];var n=$j("#collapsed-comments-"+t).is(":visible")}$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))}),$j("html").height($j("html").height()),$j("#"+e).replaceWith($j(this)),typeof t!="undefined"&&n&&showHideComments(t),$j("html").height("auto")}prev=e}),collapseHeight(),$j(".like-rotator").hide(),commentBusy&&(commentBusy=!1,$j("body").css("cursor","auto")),$j(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl")})}function collapseHeight(e){var t=".wall-item-body:not(.divmore)";typeof e!="undefined"&&(t=e+" "+t),$j(t).each(function(){$j(this).height()>350&&($j("html").height($j("html").height()),$j(this).divgrow({initialHeight:300,showBrackets:!1,speed:0}),$j(this).addClass("divmore"),$j("html").height("auto"))})}function imgbright(e){$j(e).removeClass("drophide").addClass("drop")}function imgdull(e){$j(e).removeClass("drop").addClass("drophide")}function dolike(e,t){unpause(),$j("#like-rotator-"+e.toString()).show(),$j.get("like/"+e.toString()+"?verb="+t,NavUpdate),liking=1}function dostar(e){e=e.toString(),$j.get("starred/"+e,function(t){t.match(/1/)?($j("#starred-"+e).addClass("starred"),$j("#starred-"+e).removeClass("unstarred"),$j("#star-"+e).addClass("hidden"),$j("#unstar-"+e).removeClass("hidden")):($j("#starred-"+e).addClass("unstarred"),$j("#starred-"+e).removeClass("starred"),$j("#star-"+e).removeClass("hidden"),$j("#unstar-"+e).addClass("hidden"))})}function getPosition(e){var t={x:0,y:0};if(e.touches[0].pageX||e.touches[0].pageY)t.x=e.touches[0].pageX,t.y=e.touches[0].pageY;else if(e.touches[0].clientX||e.touches[0].clientY)t.x=e.touches[0].clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft,t.y=e.touches[0].clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop;else if(e.touches[0].x||e.touches[0].y)t.touches[0].x=e.touches[0].x,t.touches[0].y=e.touches[0].y;return t}function lockview(e,t){e=e||window.event,cursor=getPosition(e),lockvisible?lockviewhide():(lockvisible=!0,$j.get("lockview/"+t,function(e){$j("#panel").html(e),$j("#panel").css({left:cursor.x+5,top:cursor.y+5}),$j("#panel").show()}))}function lockviewhide(){lockvisible=!1,$j("#panel").hide()}function post_comment(e){return unpause(),commentBusy=!0,$j("body").css("cursor","wait"),$j("#comment-preview-inp-"+e).val("0"),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){if(t.success){$j("#comment-edit-wrapper-"+e).hide(),$j("#comment-edit-text-"+e).val("");var n=document.getElementById("comment-edit-text-"+e);n&&commentClose(n,e),timer&&clearTimeout(timer),timer=setTimeout(NavUpdate,10)}t.reload&&(window.location.href=t.reload)},"json"),!1}function preview_comment(e){return $j("#comment-preview-inp-"+e).val("1"),$j("#comment-edit-preview-"+e).show(),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){t.preview&&($j("#comment-edit-preview-"+e).html(t.preview),$j("#comment-edit-preview-"+e+" a").click(function(){return!1}))},"json"),!0}function showHideComments(e){$j("#collapsed-comments-"+e).is(":visible")?($j("#collapsed-comments-"+e).hide(),$j("#hide-comments-"+e).html(window.showMore)):($j("#collapsed-comments-"+e).show(),$j("#hide-comments-"+e).html(window.showFewer),collapseHeight("#collapsed-comments-"+e))}function preview_post(){return $j("#jot-preview").val("1"),$j("#jot-preview-content").show(),tinyMCE.triggerSave(),$j.post("item",$j("#profile-jot-form").serialize(),function(e){e.preview&&($j("#jot-preview-content").html(e.preview),$j("#jot-preview-content a").click(function(){return!1}))},"json"),$j("#jot-preview").val("0"),!0}function unpause(){totStopped=!1,stopped=!1,$j("#pause").html("")}function bin2hex(e){var t,n,r=0,i=[];e+="",r=e.length;for(n=0;n'+e.desc+'
'+e.version+'
'+e.credits+"
")})}var src=null,prev=null,livetime=null,msie=!1,stopped=!1,totStopped=!1,timer=null,pr=0,liking=0,in_progress=!1,langSelect=!1,commentBusy=!1,last_popup_menu=null,last_popup_button=null;$j(function(){function e(e){last_popup_menu&&"#"+last_popup_menu.attr("id")!==$j(e.target).attr("rel")&&(last_popup_menu.hide(),last_popup_menu.attr("id")=="nav-notifications-menu"&&$j(".main-container").show(),last_popup_button.removeClass("selected"),last_popup_menu=null,last_popup_button=null)}$j.ajaxSetup({cache:!1}),msie=$j.browser.msie,collapseHeight(),$j(".onoff input").each(function(){val=$j(this).val(),id=$j(this).attr("id"),$j("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden")}),$j(".onoff > a").click(function(e){e.preventDefault();var t=$j(this).siblings("input"),n=1-t.val(),r=t.attr("id");$j("#"+r+"_onoff ."+(n==0?"on":"off")).addClass("hidden"),$j("#"+r+"_onoff ."+(n==1?"on":"off")).removeClass("hidden"),t.val(n)}),$j("img[rel^=#]").click(function(t){return e(t),menu=$j($j(this).attr("rel")),t.preventDefault(),t.stopPropagation(),menu.attr("popup")=="false"?!1:(menu.css("display")=="none"?($j(this).parent().addClass("selected"),menu.show(),menu.attr("id")=="nav-notifications-menu"&&$j(".main-container").hide(),last_popup_menu=menu,last_popup_button=$j(this).parent()):($j(this).parent().removeClass("selected"),menu.hide(),menu.attr("id")=="nav-notifications-menu"&&$j(".main-container").show(),last_popup_menu=null,last_popup_button=null),!1)}),$j("html").click(function(t){e(t)});var t=unescape($j("#nav-notifications-template[rel=template]").html()),n=unescape($j("
").append($j("#nav-notifications-see-all").clone()).html()),r=unescape($j("
").append($j("#nav-notifications-mark-all").clone()).html()),i=unescape($j("#nav-notifications-menu").html());$j("nav").bind("nav-update",function(e,s){var o=$j(s).find("invalid").text();o==1&&(window.location.href=window.location.href);var u=$j(s).find("net").text();u==0?(u="",$j("#net-update").removeClass("show")):$j("#net-update").addClass("show"),$j("#net-update").html(u);var a=$j(s).find("home").text();a==0?(a="",$j("#home-update").removeClass("show")):$j("#home-update").addClass("show"),$j("#home-update").html(a);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update").removeClass("show")):$j("#intro-update").addClass("show"),$j("#intro-update").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update").removeClass("show")):$j("#mail-update").addClass("show"),$j("#mail-update").html(l);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update-li").removeClass("show")):$j("#intro-update-li").addClass("show"),$j("#intro-update-li").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update-li").removeClass("show")):$j("#mail-update-li").addClass("show"),$j("#mail-update-li").html(l);var c=$j(s).find("notif");c.children("note").length==0?$j("#nav-notifications-menu").html(i):(nnm=$j("#nav-notifications-menu"),nnm.html(n+r),c.children("note").each(function(){e=$j(this),text=e.text().format(""+e.attr("name")+""),html=t.format(e.attr("href"),e.attr("photo"),text,e.attr("date"),e.attr("seen")),nnm.append(html)})),notif=c.attr("count"),notif>0?$j("#nav-notifications-linkmenu").addClass("on"):$j("#nav-notifications-linkmenu").removeClass("on"),notif==0?(notif="",$j("#notify-update").removeClass("show")):$j("#notify-update").addClass("show"),$j("#notify-update").html(notif);var h=$j(s).find("sysmsgs");h.children("notice").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"notice",life:1e3})}),h.children("info").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"info",life:1e3})})}),NavUpdate()});var lockvisible=!1;String.prototype.format=function(){var e=this;for(var t=0;t a").click(function(event){event.preventDefault();var input=$j(this).siblings("input");var val=1-input.val();var id=input.attr("id");$j("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden");$j("#"+id+"_onoff ."+(val==1?"on":"off")).removeClass("hidden");input.val(val)});function close_last_popup_menu(e){if(last_popup_menu){if("#"+last_popup_menu.attr("id")!==$j(e.target).attr("rel")){last_popup_menu.hide();if(last_popup_menu.attr("id")=="nav-notifications-menu")$j(".main-container").show();last_popup_button.removeClass("selected");last_popup_menu=null;last_popup_button=null}}}$j("img[rel^=#]").click(function(e){close_last_popup_menu(e);menu=$j($j(this).attr("rel"));e.preventDefault();e.stopPropagation();if(menu.attr("popup")=="false")return false;if(menu.css("display")=="none"){$j(this).parent().addClass("selected");menu.show();if(menu.attr("id")=="nav-notifications-menu")$j(".main-container").hide();last_popup_menu=menu;last_popup_button=$j(this).parent()}else{$j(this).parent().removeClass("selected");menu.hide();if(menu.attr("id")=="nav-notifications-menu")$j(".main-container").show();last_popup_menu=null;last_popup_button=null}return false});$j("html").click(function(e){close_last_popup_menu(e)});var notifications_tpl=unescape($j("#nav-notifications-template[rel=template]").html());var notifications_all=unescape($j("
").append($j("#nav-notifications-see-all").clone()).html());var notifications_mark=unescape($j("
").append($j("#nav-notifications-mark-all").clone()).html());var notifications_empty=unescape($j("#nav-notifications-menu").html());$j("nav").bind("nav-update",function(e,data){var invalid=$j(data).find("invalid").text();if(invalid==1){window.location.href=window.location.href}var net=$j(data).find("net").text();if(net==0){net="";$j("#net-update").removeClass("show")}else{$j("#net-update").addClass("show")}$j("#net-update").html(net);var home=$j(data).find("home").text();if(home==0){home="";$j("#home-update").removeClass("show")}else{$j("#home-update").addClass("show")}$j("#home-update").html(home);var intro=$j(data).find("intro").text();if(intro==0){intro="";$j("#intro-update").removeClass("show")}else{$j("#intro-update").addClass("show")}$j("#intro-update").html(intro);var mail=$j(data).find("mail").text();if(mail==0){mail="";$j("#mail-update").removeClass("show")}else{$j("#mail-update").addClass("show")}$j("#mail-update").html(mail);var intro=$j(data).find("intro").text();if(intro==0){intro="";$j("#intro-update-li").removeClass("show")}else{$j("#intro-update-li").addClass("show")}$j("#intro-update-li").html(intro);var mail=$j(data).find("mail").text();if(mail==0){mail="";$j("#mail-update-li").removeClass("show")}else{$j("#mail-update-li").addClass("show")}$j("#mail-update-li").html(mail);var eNotif=$j(data).find("notif");if(eNotif.children("note").length==0){$j("#nav-notifications-menu").html(notifications_empty)}else{nnm=$j("#nav-notifications-menu");nnm.html(notifications_all+notifications_mark);eNotif.children("note").each(function(){e=$j(this);text=e.text().format(""+e.attr("name")+"");html=notifications_tpl.format(e.attr("href"),e.attr("photo"),text,e.attr("date"),e.attr("seen"));nnm.append(html)})}notif=eNotif.attr("count");if(notif>0){$j("#nav-notifications-linkmenu").addClass("on")}else{$j("#nav-notifications-linkmenu").removeClass("on")}if(notif==0){notif="";$j("#notify-update").removeClass("show")}else{$j("#notify-update").addClass("show")}$j("#notify-update").html(notif);var eSysmsg=$j(data).find("sysmsgs");eSysmsg.children("notice").each(function(){text=$j(this).text();$j.jGrowl(text,{sticky:false,theme:"notice",life:1e3})});eSysmsg.children("info").each(function(){text=$j(this).text();$j.jGrowl(text,{sticky:false,theme:"info",life:1e3})})});NavUpdate()});function NavUpdate(){if(!stopped){var pingCmd="ping"+(localUser!=0?"?f=&uid="+localUser:"");$j.get(pingCmd,function(data){$j(data).find("result").each(function(){$j("nav").trigger("nav-update",this);if($j("#live-network").length){src="network";liveUpdate()}if($j("#live-profile").length){src="profile";liveUpdate()}if($j("#live-community").length){src="community";liveUpdate()}if($j("#live-notes").length){src="notes";liveUpdate()}if($j("#live-display").length){src="display";liveUpdate()}if($j("#live-photos").length){if(liking){liking=0;window.location.href=window.location.href}}})})}timer=setTimeout(NavUpdate,updateInterval)}function liveUpdate(){if(src==null||stopped||!profile_uid){$j(".like-rotator").hide();return}if($j(".comment-edit-text-full").length||in_progress){if(livetime){clearTimeout(livetime)}livetime=setTimeout(liveUpdate,1e4);return}if(livetime!=null)livetime=null;prev="live-"+src;in_progress=true;var udargs=netargs.length?"/"+netargs:"";var update_url="update_"+src+udargs+"&p="+profile_uid+"&page="+profile_page+"&msie="+(msie?1:0);$j.get(update_url,function(data){in_progress=false;$j(".toplevel_item",data).each(function(){var ident=$j(this).attr("id");if($j("#"+ident).length==0&&profile_page==1){$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))});$j("#"+prev).after($j(this))}else{var id=$j(".hide-comments-total",this).attr("id");if(typeof id!="undefined"){id=id.split("-")[3];var commentsOpen=$j("#collapsed-comments-"+id).is(":visible")}$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))});$j("html").height($j("html").height());$j("#"+ident).replaceWith($j(this));if(typeof id!="undefined"){if(commentsOpen)showHideComments(id)}$j("html").height("auto")}prev=ident});collapseHeight();$j(".like-rotator").hide();if(commentBusy){commentBusy=false;$j("body").css("cursor","auto")}$j(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl")})}function collapseHeight(elems){var elemName=".wall-item-body:not(.divmore)";if(typeof elems!="undefined"){elemName=elems+" "+elemName}$j(elemName).each(function(){if($j(this).height()>350){$j("html").height($j("html").height());$j(this).divgrow({initialHeight:300,showBrackets:false,speed:0});$j(this).addClass("divmore");$j("html").height("auto")}})}function imgbright(node){$j(node).removeClass("drophide").addClass("drop")}function imgdull(node){$j(node).removeClass("drop").addClass("drophide")}function dolike(ident,verb){unpause();$j("#like-rotator-"+ident.toString()).show();$j.get("like/"+ident.toString()+"?verb="+verb,NavUpdate);liking=1}function dostar(ident){ident=ident.toString();$j.get("starred/"+ident,function(data){if(data.match(/1/)){$j("#starred-"+ident).addClass("starred");$j("#starred-"+ident).removeClass("unstarred");$j("#star-"+ident).addClass("hidden");$j("#unstar-"+ident).removeClass("hidden")}else{$j("#starred-"+ident).addClass("unstarred");$j("#starred-"+ident).removeClass("starred");$j("#star-"+ident).removeClass("hidden");$j("#unstar-"+ident).addClass("hidden")}})}function getPosition(e){var cursor={x:0,y:0};if(e.touches[0].pageX||e.touches[0].pageY){cursor.x=e.touches[0].pageX;cursor.y=e.touches[0].pageY}else{if(e.touches[0].clientX||e.touches[0].clientY){cursor.x=e.touches[0].clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;cursor.y=e.touches[0].clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop}else{if(e.touches[0].x||e.touches[0].y){cursor.touches[0].x=e.touches[0].x;cursor.touches[0].y=e.touches[0].y}}}return cursor}var lockvisible=false;function lockview(event,id){event=event||window.event;cursor=getPosition(event);if(lockvisible){lockviewhide()}else{lockvisible=true;$j.get("lockview/"+id,function(data){$j("#panel").html(data);$j("#panel").css({left:cursor.x+5,top:cursor.y+5});$j("#panel").show()})}}function lockviewhide(){lockvisible=false;$j("#panel").hide()}function post_comment(id){unpause();commentBusy=true;$j("body").css("cursor","wait");$j("#comment-preview-inp-"+id).val("0");$j.post("item",$j("#comment-edit-form-"+id).serialize(),function(data){if(data.success){$j("#comment-edit-wrapper-"+id).hide();$j("#comment-edit-text-"+id).val("");var tarea=document.getElementById("comment-edit-text-"+id);if(tarea)commentClose(tarea,id);if(timer)clearTimeout(timer);timer=setTimeout(NavUpdate,10)}if(data.reload){window.location.href=data.reload}},"json");return false}function preview_comment(id){$j("#comment-preview-inp-"+id).val("1");$j("#comment-edit-preview-"+id).show();$j.post("item",$j("#comment-edit-form-"+id).serialize(),function(data){if(data.preview){$j("#comment-edit-preview-"+id).html(data.preview);$j("#comment-edit-preview-"+id+" a").click(function(){return false})}},"json");return true}function showHideComments(id){if($j("#collapsed-comments-"+id).is(":visible")){$j("#collapsed-comments-"+id).hide();$j("#hide-comments-"+id).html(window.showMore)}else{$j("#collapsed-comments-"+id).show();$j("#hide-comments-"+id).html(window.showFewer);collapseHeight("#collapsed-comments-"+id)}}function preview_post(){$j("#jot-preview").val("1");$j("#jot-preview-content").show();tinyMCE.triggerSave();$j.post("item",$j("#profile-jot-form").serialize(),function(data){if(data.preview){$j("#jot-preview-content").html(data.preview);$j("#jot-preview-content"+" a").click(function(){return false})}},"json");$j("#jot-preview").val("0");return true}function unpause(){totStopped=false;stopped=false;$j("#pause").html("")}function bin2hex(s){var v,i,f=0,a=[];s+="";f=s.length;for(i=0;i'+data.desc+'
'+data.version+'
'+data.credits+"
")})} \ No newline at end of file diff --git a/view/theme/frost-mobile/js/theme.js b/view/theme/frost-mobile/js/theme.js index 335a69536d..14e4915cd0 100644 --- a/view/theme/frost-mobile/js/theme.js +++ b/view/theme/frost-mobile/js/theme.js @@ -235,6 +235,13 @@ $j(function(){ +function homeRedirect() { + $j('html').fadeOut('slow', function(){ + window.location = baseurl + "/login"; + }); +} + + function insertFormatting(comment,BBcode,id) { var tmpStr = $j("#comment-edit-text-" + id).val(); diff --git a/view/theme/frost-mobile/js/theme.min.js b/view/theme/frost-mobile/js/theme.min.js index f5ac3c5a9f..44b842c637 100644 --- a/view/theme/frost-mobile/js/theme.min.js +++ b/view/theme/frost-mobile/js/theme.min.js @@ -1 +1 @@ -function insertFormatting(e,t,n){var r=$j("#comment-edit-text-"+n).val();r==e&&(r="",$j("#comment-edit-text-"+n).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+n).removeClass("comment-edit-text-empty"),openMenu("comment-edit-submit-wrapper-"+n),$j("#comment-edit-text-"+n).val(r)),textarea=document.getElementById("comment-edit-text-"+n);if(document.selection)textarea.focus(),selected=document.selection.createRange(),t=="url"?selected.text="["+t+"=http://]"+selected.text+"[/"+t+"]":selected.text="["+t+"]"+selected.text+"[/"+t+"]";else if(textarea.selectionStart||textarea.selectionStart=="0"){var i=textarea.selectionStart,s=textarea.selectionEnd;t=="url"?textarea.value=textarea.value.substring(0,i)+"["+t+"=http://]"+textarea.value.substring(i,s)+"[/"+t+"]"+textarea.value.substring(s,textarea.value.length):textarea.value=textarea.value.substring(0,i)+"["+t+"]"+textarea.value.substring(i,s)+"[/"+t+"]"+textarea.value.substring(s,textarea.value.length)}return!0}function cmtBbOpen(e){$j(".comment-edit-bb-"+e).show()}function cmtBbClose(e){$j(".comment-edit-bb-"+e).hide()}function initEditor(e){if(editor==0){if(plaintext=="none"){$j("#profile-jot-text").css({height:200,color:"#000"}),$j("#profile-jot-text").contact_autocomplete(baseurl+"/acl"),editor=!0,$j("a#jot-perms-icon, a#settings-default-perms-menu").click(function(){var e=$j("#profile-jot-acl-wrapper").parent();return e.css("display")=="none"?e.show():e.hide(),!1}),$j(".jothidden").show(),typeof e!="undefined"&&e();return}}else typeof e!="undefined"&&e()}function enableOnUser(){if(editor)return;$j(this).val(""),initEditor()}function wallInitEditor(){var e=window.editSelect;e!="none"?tinyMCE.init({theme:"advanced",mode:"specific_textareas",editor_selector:/(profile-jot-text|prvmail-text)/,plugins:"bbcode,paste",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:!0,paste_text_sticky:!0,entity_encoding:"raw",add_unload_trigger:!1,remove_linebreaks:!1,force_p_newlines:!1,force_br_newlines:!0,forced_root_block:"",convert_urls:!1,content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:!1,setup:function(e){e.onInit.add(function(e){e.pasteAsPlainText=!0;var t=e.editorId,n=$j("#"+t);typeof n.attr("tabindex")!="undefined"&&($j("#"+t+"_ifr").attr("tabindex",n.attr("tabindex")),n.attr("tabindex",null))})}}):$j("#prvmail-text").contact_autocomplete(baseurl+"/acl")}function initCrop(){function e(e,t){$("x1").value=e.x1,$("y1").value=e.y1,$("x2").value=e.x2,$("y2").value=e.y2,$("width").value=t.width,$("height").value=t.height}Event.observe(window,"load",function(){new Cropper.ImgWithPreview("croppa",{previewWrap:"previewWrap",minWidth:175,minHeight:175,maxWidth:640,maxHeight:640,ratioDim:{x:100,y:100},displayOnInit:!0,onEndCrop:e})})}function confirmDelete(){return confirm(window.delItem)}function commentOpen(e,t){e.value==window.commentEmptyText&&(e.value="",$j("#comment-edit-text-"+t).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).removeClass("comment-edit-text-empty"),$j("#mod-cmnt-wrap-"+t).show(),openMenu("comment-edit-submit-wrapper-"+t))}function commentClose(e,t){e.value==""&&(e.value=window.commentEmptyText,$j("#comment-edit-text-"+t).removeClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).addClass("comment-edit-text-empty"),$j("#mod-cmnt-wrap-"+t).hide(),closeMenu("comment-edit-submit-wrapper-"+t))}function commentInsert(e,t){var n=$j("#comment-edit-text-"+t).val();n==window.commentEmptyText&&(n="",$j("#comment-edit-text-"+t).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).removeClass("comment-edit-text-empty"),openMenu("comment-edit-submit-wrapper-"+t));var r=$j(e).html();r=r.replace("<","<"),r=r.replace(">",">"),r=r.replace("&","&"),r=r.replace(""",'"'),$j("#comment-edit-text-"+t).val(n+r)}function qCommentInsert(e,t){var n=$j("#comment-edit-text-"+t).val();n==window.commentEmptyText&&(n="",$j("#comment-edit-text-"+t).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).removeClass("comment-edit-text-empty"),openMenu("comment-edit-submit-wrapper-"+t));var r=$j(e).val();r=r.replace("<","<"),r=r.replace(">",">"),r=r.replace("&","&"),r=r.replace(""",'"'),$j("#comment-edit-text-"+t).val(n+r),$j(e).val("")}function jotVideoURL(){reply=prompt(window.vidURL),reply&&reply.length&&addeditortext("[video]"+reply+"[/video]")}function jotAudioURL(){reply=prompt(window.audURL),reply&&reply.length&&addeditortext("[audio]"+reply+"[/audio]")}function jotGetLocation(){reply=prompt(window.whereAreU,$j("#jot-location").val()),reply&&reply.length&&$j("#jot-location").val(reply)}function jotShare(e){$j("#jot-popup").length!=0&&$j("#jot-popup").show(),$j("#like-rotator-"+e).show(),$j.get("share/"+e,function(t){editor||$j("#profile-jot-text").val(""),initEditor(function(){addeditortext(t),$j("#like-rotator-"+e).hide(),$j(window).scrollTop(0)})})}function linkdropper(e){var t=e.dataTransfer.types.contains("text/uri-list");t&&e.preventDefault()}function showEvent(e){}function itemTag(e){reply=prompt(window.term),reply&&reply.length&&(reply=reply.replace("#",""),reply.length&&(commentBusy=!0,$j("body").css("cursor","wait"),$j.get("tagger/"+e+"?term="+reply,NavUpdate),liking=1))}function itemFiler(e){$j.get("filer/",function(t){var n=$j("#id_term_label",t).text();reply=prompt(n),reply&&reply.length&&(commentBusy=!0,$j("body").css("cursor","wait"),$j.get("filer/"+e+"?term="+reply,NavUpdate),liking=1)})}function jotClearLocation(){$j("#jot-coord").val(""),$j("#profile-nolocation-wrapper").hide()}function addeditortext(e){if(plaintext=="none"){var t=$j("#profile-jot-text").val();$j("#profile-jot-text").val(t+e)}}$j(document).ready(function(){$j("#profile-jot-text").focus(enableOnUser),$j("#profile-jot-text").click(enableOnUser);if(typeof window.AjaxUpload!="undefined")switch(window.ajaxType){case"jot-header":var e=new window.AjaxUpload("wall-image-upload",{action:"wall_upload/"+window.nickname+"?nomce=1",name:"userfile",onSubmit:function(e,t){$j("#profile-rotator").show()},onComplete:function(e,t){addeditortext(t),$j("#profile-rotator").hide()}}),t=new window.AjaxUpload("wall-file-upload",{action:"wall_attach/"+window.nickname+"?nomce=1",name:"userfile",onSubmit:function(e,t){$j("#profile-rotator").show()},onComplete:function(e,t){addeditortext(t),$j("#profile-rotator").hide()}});break;case"msg-header":var e=new window.AjaxUpload("prvmail-upload",{action:"wall_upload/"+window.nickname+"?nomce=1",name:"userfile",onSubmit:function(e,t){$j("#profile-rotator").show()},onComplete:function(e,t){tinyMCE.execCommand("mceInsertRawHTML",!1,t),$j("#profile-rotator").hide()}});break;default:}typeof window.aclInit!="undefined"&&typeof acl=="undefined"&&(acl=new ACL(baseurl+"/acl",[window.allowCID,window.allowGID,window.denyCID,window.denyGID])),window.autoCompleteType=="display-head"&&$j(".comment-wwedit-wrapper textarea").contact_autocomplete(baseurl+"/acl");if(window.aclType=="event_head"){$j("#events-calendar").fullCalendar({events:baseurl+"/events/json/",header:{left:"prev,next today",center:"title",right:"month,agendaWeek,agendaDay"},timeFormat:"H(:mm)",eventClick:function(e,t,n){showEvent(e.id)},eventRender:function(e,t,n){if(e.item["author-name"]==null)return;switch(n.name){case"month":t.find(".fc-event-title").html("{1} : {2}".format(e.item["author-avatar"],e.item["author-name"],e.title));break;case"agendaWeek":t.find(".fc-event-title").html("{1}

{2}

{3}

".format(e.item["author-avatar"],e.item["author-name"],e.item.desc,e.item.location));break;case"agendaDay":t.find(".fc-event-title").html("{1}

{2}

{3}

".format(e.item["author-avatar"],e.item["author-name"],e.item.desc,e.item.location))}}});var n=location.href.replace(baseurl,"").split("/");n.length>=4&&$j("#events-calendar").fullCalendar("gotoDate",n[2],n[3]-1);var r=location.hash.split("-");r.length==2&&r[0]=="#link"&&showEvent(r[1])}(window.aclType=="settings-head"||window.aclType=="photos_head"||window.aclType=="event_head")&&$j("#contact_allow, #contact_deny, #group_allow, #group_deny").change(function(){var e;$j("#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected").each(function(){e=$j(this).text(),$j("#jot-perms-icon").removeClass("unlock").addClass("lock"),$j("#jot-public").hide()}),e==null&&($j("#jot-perms-icon").removeClass("lock").addClass("unlock"),$j("#jot-public").show())}).trigger("change");switch(window.autocompleteType){case"msg-header":var i=$j("#recip").autocomplete({serviceUrl:baseurl+"/acl",minChars:2,width:350,onSelect:function(e,t){$j("#recip-complete").val(t)}});break;case"contacts-head":var i=$j("#contacts-search").autocomplete({serviceUrl:baseurl+"/acl",minChars:2,width:350});i.setOptions({params:{type:"a"}});break;default:}$j("#event-share-checkbox").change(function(){$j("#event-share-checkbox").is(":checked")?$j("#acl-wrapper").show():$j("#acl-wrapper").hide()}).trigger("change"),$j(".popupbox").click(function(){var e=$j($j(this).attr("href")).parent();return e.css("display")=="none"?e.show():e.hide(),!1})}),$j(function(){$j("nav").bind("nav-update",function(e,t){var n=$j("#pending-update"),r=$j(t).find("register").text();r=="0"?(r="",n.hide()):n.show(),n.html(r)})});var editor=!1,textlen=0,plaintext="none",ispublic=window.isPublic;switch(window.ajaxType){case"jot-header":function jotGetLink(){reply=prompt(window.linkURL),reply&&reply.length&&(reply=bin2hex(reply),$j("#profile-rotator").show(),$j.get("parse_url?binurl="+reply,function(e){addeditortext(e),$j("#profile-rotator").hide()}))}function linkdrop(e){var t=e.dataTransfer.getData("text/uri-list");e.target.textContent=t,e.preventDefault(),t&&t.length&&(t=bin2hex(t),$j("#profile-rotator").show(),$j.get("parse_url?binurl="+t,function(e){editor||$j("#profile-jot-text").val(""),initEditor(function(){addeditortext(e),$j("#profile-rotator").hide()})}))}break;case"msg-header":case"wallmsg-header":function jotGetLink(){reply=prompt(window.linkURL),reply&&reply.length&&($j("#profile-rotator").show(),$j.get("parse_url?url="+reply,function(e){tinyMCE.execCommand("mceInsertRawHTML",!1,e),$j("#profile-rotator").hide()}))}function linkdrop(e){var t=e.dataTransfer.getData("text/uri-list");e.target.textContent=t,e.preventDefault(),t&&t.length&&($j("#profile-rotator").show(),$j.get("parse_url?url="+t,function(e){tinyMCE.execCommand("mceInsertRawHTML",!1,e),$j("#profile-rotator").hide()}))}break;default:}typeof window.geoTag=="function"&&window.geoTag(); \ No newline at end of file +$j(document).ready(function(){$j("#profile-jot-text").focus(enableOnUser);$j("#profile-jot-text").click(enableOnUser);if(typeof window.AjaxUpload!="undefined"){switch(window.ajaxType){case"jot-header":var uploader=new window.AjaxUpload("wall-image-upload",{action:"wall_upload/"+window.nickname+"?nomce=1",name:"userfile",onSubmit:function(file,ext){$j("#profile-rotator").show()},onComplete:function(file,response){addeditortext(response);$j("#profile-rotator").hide()}});var file_uploader=new window.AjaxUpload("wall-file-upload",{action:"wall_attach/"+window.nickname+"?nomce=1",name:"userfile",onSubmit:function(file,ext){$j("#profile-rotator").show()},onComplete:function(file,response){addeditortext(response);$j("#profile-rotator").hide()}});break;case"msg-header":var uploader=new window.AjaxUpload("prvmail-upload",{action:"wall_upload/"+window.nickname+"?nomce=1",name:"userfile",onSubmit:function(file,ext){$j("#profile-rotator").show()},onComplete:function(file,response){tinyMCE.execCommand("mceInsertRawHTML",false,response);$j("#profile-rotator").hide()}});break;default:break}}if(typeof window.aclInit!="undefined"&&typeof acl=="undefined"){acl=new ACL(baseurl+"/acl",[window.allowCID,window.allowGID,window.denyCID,window.denyGID])}if(window.autoCompleteType=="display-head"){$j(".comment-wwedit-wrapper textarea").contact_autocomplete(baseurl+"/acl")}if(window.aclType=="event_head"){$j("#events-calendar").fullCalendar({events:baseurl+"/events/json/",header:{left:"prev,next today",center:"title",right:"month,agendaWeek,agendaDay"},timeFormat:"H(:mm)",eventClick:function(calEvent,jsEvent,view){showEvent(calEvent.id)},eventRender:function(event,element,view){if(event.item["author-name"]==null)return;switch(view.name){case"month":element.find(".fc-event-title").html("{1} : {2}".format(event.item["author-avatar"],event.item["author-name"],event.title));break;case"agendaWeek":element.find(".fc-event-title").html("{1}

{2}

{3}

".format(event.item["author-avatar"],event.item["author-name"],event.item.desc,event.item.location));break;case"agendaDay":element.find(".fc-event-title").html("{1}

{2}

{3}

".format(event.item["author-avatar"],event.item["author-name"],event.item.desc,event.item.location));break}}});var args=location.href.replace(baseurl,"").split("/");if(args.length>=4){$j("#events-calendar").fullCalendar("gotoDate",args[2],args[3]-1)}var hash=location.hash.split("-");if(hash.length==2&&hash[0]=="#link")showEvent(hash[1])}if(window.aclType=="settings-head"||window.aclType=="photos_head"||window.aclType=="event_head"){$j("#contact_allow, #contact_deny, #group_allow, #group_deny").change(function(){var selstr;$j("#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected").each(function(){selstr=$j(this).text();$j("#jot-perms-icon").removeClass("unlock").addClass("lock");$j("#jot-public").hide()});if(selstr==null){$j("#jot-perms-icon").removeClass("lock").addClass("unlock");$j("#jot-public").show()}}).trigger("change")}switch(window.autocompleteType){case"msg-header":var a=$j("#recip").autocomplete({serviceUrl:baseurl+"/acl",minChars:2,width:350,onSelect:function(value,data){$j("#recip-complete").val(data)}});break;case"contacts-head":var a=$j("#contacts-search").autocomplete({serviceUrl:baseurl+"/acl",minChars:2,width:350});a.setOptions({params:{type:"a"}});break;default:break}$j("#event-share-checkbox").change(function(){if($j("#event-share-checkbox").is(":checked")){$j("#acl-wrapper").show()}else{$j("#acl-wrapper").hide()}}).trigger("change");$j(".popupbox").click(function(){var parent=$j($j(this).attr("href")).parent();if(parent.css("display")=="none"){parent.show()}else{parent.hide()}return false})});$j(function(){$j("nav").bind("nav-update",function(e,data){var elm=$j("#pending-update");var register=$j(data).find("register").text();if(register=="0"){register="";elm.hide()}else{elm.show()}elm.html(register)})});function homeRedirect(){$j("html").fadeOut("slow",function(){window.location=baseurl+"/login"})}function insertFormatting(comment,BBcode,id){var tmpStr=$j("#comment-edit-text-"+id).val();if(tmpStr==comment){tmpStr="";$j("#comment-edit-text-"+id).addClass("comment-edit-text-full");$j("#comment-edit-text-"+id).removeClass("comment-edit-text-empty");openMenu("comment-edit-submit-wrapper-"+id);$j("#comment-edit-text-"+id).val(tmpStr)}textarea=document.getElementById("comment-edit-text-"+id);if(document.selection){textarea.focus();selected=document.selection.createRange();if(BBcode=="url"){selected.text="["+BBcode+"=http://]"+selected.text+"[/"+BBcode+"]"}else selected.text="["+BBcode+"]"+selected.text+"[/"+BBcode+"]"}else if(textarea.selectionStart||textarea.selectionStart=="0"){var start=textarea.selectionStart;var end=textarea.selectionEnd;if(BBcode=="url"){textarea.value=textarea.value.substring(0,start)+"["+BBcode+"=http://]"+textarea.value.substring(start,end)+"[/"+BBcode+"]"+textarea.value.substring(end,textarea.value.length)}else textarea.value=textarea.value.substring(0,start)+"["+BBcode+"]"+textarea.value.substring(start,end)+"[/"+BBcode+"]"+textarea.value.substring(end,textarea.value.length)}return true}function cmtBbOpen(id){$j(".comment-edit-bb-"+id).show()}function cmtBbClose(id){$j(".comment-edit-bb-"+id).hide()}var editor=false;var textlen=0;var plaintext="none";var ispublic=window.isPublic;function initEditor(cb){if(editor==false){if(plaintext=="none"){$j("#profile-jot-text").css({height:200,color:"#000"});$j("#profile-jot-text").contact_autocomplete(baseurl+"/acl");editor=true;$j("a#jot-perms-icon, a#settings-default-perms-menu").click(function(){var parent=$j("#profile-jot-acl-wrapper").parent();if(parent.css("display")=="none"){parent.show()}else{parent.hide()}return false});$j(".jothidden").show();if(typeof cb!="undefined")cb();return}}else{if(typeof cb!="undefined")cb()}}function enableOnUser(){if(editor)return;$j(this).val("");initEditor()}function wallInitEditor(){var plaintext=window.editSelect;if(plaintext!="none"){tinyMCE.init({theme:"advanced",mode:"specific_textareas",editor_selector:/(profile-jot-text|prvmail-text)/,plugins:"bbcode,paste",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:true,paste_text_sticky:true,entity_encoding:"raw",add_unload_trigger:false,remove_linebreaks:false,force_p_newlines:false,force_br_newlines:true,forced_root_block:"",convert_urls:false,content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:false,setup:function(ed){ed.onInit.add(function(ed){ed.pasteAsPlainText=true;var editorId=ed.editorId;var textarea=$j("#"+editorId);if(typeof textarea.attr("tabindex")!="undefined"){$j("#"+editorId+"_ifr").attr("tabindex",textarea.attr("tabindex"));textarea.attr("tabindex",null)}})}})}else $j("#prvmail-text").contact_autocomplete(baseurl+"/acl")}function initCrop(){function onEndCrop(coords,dimensions){$("x1").value=coords.x1;$("y1").value=coords.y1;$("x2").value=coords.x2;$("y2").value=coords.y2;$("width").value=dimensions.width;$("height").value=dimensions.height}Event.observe(window,"load",function(){new Cropper.ImgWithPreview("croppa",{previewWrap:"previewWrap",minWidth:175,minHeight:175,maxWidth:640,maxHeight:640,ratioDim:{x:100,y:100},displayOnInit:true,onEndCrop:onEndCrop})})}function confirmDelete(){return confirm(window.delItem)}function commentOpen(obj,id){if(obj.value==window.commentEmptyText){obj.value="";$j("#comment-edit-text-"+id).addClass("comment-edit-text-full");$j("#comment-edit-text-"+id).removeClass("comment-edit-text-empty");$j("#mod-cmnt-wrap-"+id).show();openMenu("comment-edit-submit-wrapper-"+id)}}function commentClose(obj,id){if(obj.value==""){obj.value=window.commentEmptyText;$j("#comment-edit-text-"+id).removeClass("comment-edit-text-full");$j("#comment-edit-text-"+id).addClass("comment-edit-text-empty");$j("#mod-cmnt-wrap-"+id).hide();closeMenu("comment-edit-submit-wrapper-"+id)}}function commentInsert(obj,id){var tmpStr=$j("#comment-edit-text-"+id).val();if(tmpStr==window.commentEmptyText){tmpStr="";$j("#comment-edit-text-"+id).addClass("comment-edit-text-full");$j("#comment-edit-text-"+id).removeClass("comment-edit-text-empty");openMenu("comment-edit-submit-wrapper-"+id)}var ins=$j(obj).html();ins=ins.replace("<","<");ins=ins.replace(">",">");ins=ins.replace("&","&");ins=ins.replace(""",'"');$j("#comment-edit-text-"+id).val(tmpStr+ins)}function qCommentInsert(obj,id){var tmpStr=$j("#comment-edit-text-"+id).val();if(tmpStr==window.commentEmptyText){tmpStr="";$j("#comment-edit-text-"+id).addClass("comment-edit-text-full");$j("#comment-edit-text-"+id).removeClass("comment-edit-text-empty");openMenu("comment-edit-submit-wrapper-"+id)}var ins=$j(obj).val();ins=ins.replace("<","<");ins=ins.replace(">",">");ins=ins.replace("&","&");ins=ins.replace(""",'"');$j("#comment-edit-text-"+id).val(tmpStr+ins);$j(obj).val("")}function jotVideoURL(){reply=prompt(window.vidURL);if(reply&&reply.length){addeditortext("[video]"+reply+"[/video]")}}function jotAudioURL(){reply=prompt(window.audURL);if(reply&&reply.length){addeditortext("[audio]"+reply+"[/audio]")}}function jotGetLocation(){reply=prompt(window.whereAreU,$j("#jot-location").val());if(reply&&reply.length){$j("#jot-location").val(reply)}}function jotShare(id){if($j("#jot-popup").length!=0)$j("#jot-popup").show();$j("#like-rotator-"+id).show();$j.get("share/"+id,function(data){if(!editor)$j("#profile-jot-text").val("");initEditor(function(){addeditortext(data);$j("#like-rotator-"+id).hide();$j(window).scrollTop(0)})})}function linkdropper(event){var linkFound=event.dataTransfer.types.contains("text/uri-list");if(linkFound)event.preventDefault()}switch(window.ajaxType){case"jot-header":function jotGetLink(){reply=prompt(window.linkURL);if(reply&&reply.length){reply=bin2hex(reply);$j("#profile-rotator").show();$j.get("parse_url?binurl="+reply,function(data){addeditortext(data);$j("#profile-rotator").hide()})}}function linkdrop(event){var reply=event.dataTransfer.getData("text/uri-list");event.target.textContent=reply;event.preventDefault();if(reply&&reply.length){reply=bin2hex(reply);$j("#profile-rotator").show();$j.get("parse_url?binurl="+reply,function(data){if(!editor)$j("#profile-jot-text").val("");initEditor(function(){addeditortext(data);$j("#profile-rotator").hide()})})}}break;case"msg-header":case"wallmsg-header":function jotGetLink(){reply=prompt(window.linkURL);if(reply&&reply.length){$j("#profile-rotator").show();$j.get("parse_url?url="+reply,function(data){tinyMCE.execCommand("mceInsertRawHTML",false,data);$j("#profile-rotator").hide()})}}function linkdrop(event){var reply=event.dataTransfer.getData("text/uri-list");event.target.textContent=reply;event.preventDefault();if(reply&&reply.length){$j("#profile-rotator").show();$j.get("parse_url?url="+reply,function(data){tinyMCE.execCommand("mceInsertRawHTML",false,data);$j("#profile-rotator").hide()})}}break;default:break}function showEvent(eventid){}function itemTag(id){reply=prompt(window.term);if(reply&&reply.length){reply=reply.replace("#","");if(reply.length){commentBusy=true;$j("body").css("cursor","wait");$j.get("tagger/"+id+"?term="+reply,NavUpdate);liking=1}}}function itemFiler(id){$j.get("filer/",function(data){var promptText=$j("#id_term_label",data).text();reply=prompt(promptText);if(reply&&reply.length){commentBusy=true;$j("body").css("cursor","wait");$j.get("filer/"+id+"?term="+reply,NavUpdate);liking=1}})}function jotClearLocation(){$j("#jot-coord").val("");$j("#profile-nolocation-wrapper").hide()}function addeditortext(data){if(plaintext=="none"){var currentText=$j("#profile-jot-text").val();$j("#profile-jot-text").val(currentText+data)}}if(typeof window.geoTag==="function")window.geoTag(); \ No newline at end of file diff --git a/view/theme/frost-mobile/login-style.css b/view/theme/frost-mobile/login-style.css index 4ebf7d7402..bbb60ebabb 100644 --- a/view/theme/frost-mobile/login-style.css +++ b/view/theme/frost-mobile/login-style.css @@ -36,6 +36,9 @@ div.jGrowl div.info { top: 15px; right: 10px; } +div.jGrowl-notification { + border-radius: 7px; +} .login-button { margin-top: 90px; @@ -89,6 +92,7 @@ div.section-wrapper { #div_id_remember { margin-top: 10px; + margin-bottom: 10px; } #login_openid { diff --git a/view/theme/frost-mobile/style.css b/view/theme/frost-mobile/style.css index 9cf97e0a7a..d2976c20a9 100644 --- a/view/theme/frost-mobile/style.css +++ b/view/theme/frost-mobile/style.css @@ -1164,14 +1164,14 @@ input#dfrn-url { } .wall-item-content-wrapper { - padding-top: 30px; + padding-top: 1em; border-top: 2px solid #AAAAAA; position: relative; } .wall-item-content-wrapper.comment { - margin-top: 30px; + margin-top: 15px; padding-top: 0px; margin-left: 5px; margin-right: 5px; @@ -1261,7 +1261,7 @@ input#dfrn-url { /* z-index: 100;*/ } .wall-item-lock { - margin-top: 30px; + margin-top: 1em; left: 105px; position: absolute; top: 1px; @@ -1355,11 +1355,11 @@ input#dfrn-url { } .wall-item-photo { border: none; + border-radius: 7px; } .comment .wall-item-photo { width: 50px !important; height: 50px !important; - border-top-left-radius: 10px; } .wall-item-content { float: left; @@ -1630,6 +1630,9 @@ input#dfrn-url { #profile-jot-plugin-end{ clear: both; } +input#profile-jot-email { + display: block; +} .profile-jot-net { float: left; margin-right: 10px; @@ -2123,14 +2126,14 @@ input#dfrn-url { } #profile-jot-acl-wrapper{ - width:270px; + /*width:270px;*/ padding-left:10px; height:auto; overflow:visible; } #acl-wrapper { - width: 270px; + /*width: 270px;*/ float:left; } #acl-search { @@ -3898,6 +3901,9 @@ div.jGrowl div.info { top: 15px; right: 10px; } +div.jGrowl-notification { + border-radius: 7px; +} .qcomment { border: 1px solid #EEE; padding: 3px; diff --git a/view/theme/frost-mobile/theme.php b/view/theme/frost-mobile/theme.php index 48dd3ef03d..00a9184dc5 100644 --- a/view/theme/frost-mobile/theme.php +++ b/view/theme/frost-mobile/theme.php @@ -4,18 +4,20 @@ * Name: Frost--mobile version * Description: Like frosted glass * Credits: Navigation icons taken from http://iconza.com. Other icons taken from http://thenounproject.com, including: Like, Dislike, Black Lock, Unlock, Pencil, Tag, Camera, Paperclip (Marie Coons), Folder (Sergio Calcara), Chain-link (Andrew Fortnum), Speaker (Harold Kim), Quotes (Henry Ryder), Video Camera (Anas Ramadan), and Left Arrow, Right Arrow, and Delete X (all three P.J. Onori). All under Attribution (CC BY 3.0). Others from The Noun Project are public domain or No Rights Reserved (CC0). - * Version: Version 0.2.16 + * Version: Version 0.2.17 * Author: Zach P * Maintainer: Zach P */ -$a->theme_info = array(); -$a->sourcename = 'Friendica mobile web'; -$a->videowidth = 250; -$a->videoheight = 200; -$a->theme_thread_allow = false; -$a->force_max_items = 10; -set_template_engine($a, 'smarty3'); +function frost_mobile_init(&$a) { + $a->theme_info = array(); + $a->sourcename = 'Friendica mobile web'; + $a->videowidth = 250; + $a->videoheight = 200; + $a->theme_thread_allow = false; + $a->force_max_items = 10; + set_template_engine($a, 'smarty3'); +} function frost_mobile_content_loaded(&$a) { diff --git a/view/theme/frost/admin_users.tpl b/view/theme/frost/admin_users.tpl new file mode 100644 index 0000000000..0d11934348 --- /dev/null +++ b/view/theme/frost/admin_users.tpl @@ -0,0 +1,98 @@ + +
+

$title - $page

+ +
+ + +

$h_pending

+ {{ if $pending }} + + + + {{ for $th_pending as $th }}{{ endfor }} + + + + + + {{ for $pending as $u }} + + + + + + + + {{ endfor }} + +
$th
$u.created$u.name + + +
+ +
+ {{ else }} +

$no_pending

+ {{ endif }} + + + + +

$h_users

+ {{ if $users }} + + + + + {{ for $th_users as $th }}{{ endfor }} + + + + + + {{ for $users as $u }} + + + + + + + + + + {{ endif }} + + + {{ endfor }} + +
$th
$u.nickname$u.name$u.register_date$u.lastitem_date + {{ if $u.is_admin }} +   + {{ else }} + + {{ if $u.is_admin }} +   + {{ else }} + + + {{ endif }} +
+ +
+ {{ else }} + NO USERS?!? + {{ endif }} +
+
diff --git a/view/theme/frost/contacts-template.tpl b/view/theme/frost/contacts-template.tpl index c7e3ca899d..326c9d7892 100644 --- a/view/theme/frost/contacts-template.tpl +++ b/view/theme/frost/contacts-template.tpl @@ -2,6 +2,8 @@ {{ if $finding }}

$finding

{{ endif }} +$tabs +
$desc @@ -11,8 +13,6 @@
-$tabs -
{{ for $contacts as $c }} diff --git a/view/theme/frost/default.php b/view/theme/frost/default.php index 7ca9603078..95a9b1e8c7 100644 --- a/view/theme/frost/default.php +++ b/view/theme/frost/default.php @@ -5,7 +5,7 @@ - +module === 'home') echo 'onLoad="setTimeout(\'homeRedirect()\', 1500)"'?>> module === 'home' ) { ?> diff --git a/view/theme/frost/friendika-16.png b/view/theme/frost/friendica-16.png similarity index 100% rename from view/theme/frost/friendika-16.png rename to view/theme/frost/friendica-16.png diff --git a/view/theme/frost/jot.tpl b/view/theme/frost/jot.tpl index 48187b4430..ae3ab1d3ba 100644 --- a/view/theme/frost/jot.tpl +++ b/view/theme/frost/jot.tpl @@ -27,6 +27,10 @@
+
+ +
+
@@ -65,10 +69,6 @@ -
- -
-
diff --git a/view/theme/frost/js/main.js b/view/theme/frost/js/main.js index 03ffd0381e..4aaa7ddb74 100644 --- a/view/theme/frost/js/main.js +++ b/view/theme/frost/js/main.js @@ -1,20 +1,32 @@ - function openClose(theID) { - if(document.getElementById(theID).style.display == "block") { - document.getElementById(theID).style.display = "none" - } - else { - document.getElementById(theID).style.display = "block" - } - } + function openClose(listID) { +/* if(document.getElementById(theID).style.display == "block") { + document.getElementById(theID).style.display = "none" + } + else { + document.getElementById(theID).style.display = "block" + }*/ + listID = "#" + listID.replace(/:/g, "\\:"); + listID = listID.replace(/\./g, "\\."); + listID = listID.replace(/@/g, "\\@"); - function openMenu(theID) { - document.getElementById(theID).style.display = "block" - } + if($j(listID).is(":visible")) { + $j(listID).hide(); + $j(listID+"-wrapper").show(); + } + else { + $j(listID).show(); + $j(listID+"-wrapper").hide(); + } + } - function closeMenu(theID) { - document.getElementById(theID).style.display = "none" - } + function openMenu(theID) { + document.getElementById(theID).style.display = "block" + } + + function closeMenu(theID) { + document.getElementById(theID).style.display = "none" + } diff --git a/view/theme/frost/js/main.min.js b/view/theme/frost/js/main.min.js index 3d7ee06237..f021b7befc 100644 --- a/view/theme/frost/js/main.min.js +++ b/view/theme/frost/js/main.min.js @@ -1 +1 @@ -function openClose(e){document.getElementById(e).style.display=="block"?document.getElementById(e).style.display="none":document.getElementById(e).style.display="block"}function openMenu(e){document.getElementById(e).style.display="block"}function closeMenu(e){document.getElementById(e).style.display="none"}function NavUpdate(){if(!stopped){var e="ping"+(localUser!=0?"?f=&uid="+localUser:"");$j.get(e,function(e){$j(e).find("result").each(function(){$j("nav").trigger("nav-update",this),$j("#live-network").length&&(src="network",liveUpdate()),$j("#live-profile").length&&(src="profile",liveUpdate()),$j("#live-community").length&&(src="community",liveUpdate()),$j("#live-notes").length&&(src="notes",liveUpdate()),$j("#live-display").length&&(src="display",liveUpdate()),$j("#live-photos").length&&liking&&(liking=0,window.location.href=window.location.href)})})}timer=setTimeout(NavUpdate,updateInterval)}function liveUpdate(){if(src==null||stopped||!profile_uid){$j(".like-rotator").hide();return}if($j(".comment-edit-text-full").length||in_progress){livetime&&clearTimeout(livetime),livetime=setTimeout(liveUpdate,1e4);return}livetime!=null&&(livetime=null),prev="live-"+src,in_progress=!0;var e=netargs.length?"/"+netargs:"",t="update_"+src+e+"&p="+profile_uid+"&page="+profile_page+"&msie="+(msie?1:0);$j.get(t,function(e){in_progress=!1,$j(".toplevel_item",e).each(function(){var e=$j(this).attr("id");if($j("#"+e).length==0&&profile_page==1)$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))}),$j("#"+prev).after($j(this));else{var t=$j(".hide-comments-total",this).attr("id");if(typeof t!="undefined"){t=t.split("-")[3];var n=$j("#collapsed-comments-"+t).is(":visible")}$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))}),$j("html").height($j("html").height()),$j("#"+e).replaceWith($j(this)),typeof t!="undefined"&&n&&showHideComments(t),$j("html").height("auto")}prev=e}),$j(".like-rotator").hide(),commentBusy&&(commentBusy=!1,$j("body").css("cursor","auto")),$j(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl"),collapseHeight()})}function collapseHeight(e){var t=".wall-item-body:not(.divmore)";typeof e!="undefined"&&(t=e+" "+t),$j(t).each(function(){$j(this).height()>450&&($j("html").height($j("html").height()),$j(this).divgrow({initialHeight:400,showBrackets:!1,speed:0}),$j(this).addClass("divmore"),$j("html").height("auto"))})}function imgbright(e){$j(e).removeClass("drophide").addClass("drop")}function imgdull(e){$j(e).removeClass("drop").addClass("drophide")}function dolike(e,t){unpause(),$j("#like-rotator-"+e.toString()).show(),$j.get("like/"+e.toString()+"?verb="+t,NavUpdate),liking=1}function dostar(e){e=e.toString(),$j.get("starred/"+e,function(t){t.match(/1/)?($j("#starred-"+e).addClass("starred"),$j("#starred-"+e).removeClass("unstarred"),$j("#star-"+e).addClass("hidden"),$j("#unstar-"+e).removeClass("hidden")):($j("#starred-"+e).addClass("unstarred"),$j("#starred-"+e).removeClass("starred"),$j("#star-"+e).removeClass("hidden"),$j("#unstar-"+e).addClass("hidden"))})}function getPosition(e){var t={x:0,y:0};if(e.pageX||e.pageY)t.x=e.pageX,t.y=e.pageY;else if(e.clientX||e.clientY)t.x=e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft,t.y=e.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop;else if(e.x||e.y)t.x=e.x,t.y=e.y;return t}function lockview(e,t){e=e||window.event,cursor=getPosition(e),lockvisible?lockviewhide():(lockvisible=!0,$j.get("lockview/"+t,function(e){$j("#panel").html(e),$j("#panel").css({left:cursor.x+5,top:cursor.y+5}),$j("#panel").show()}))}function lockviewhide(){lockvisible=!1,$j("#panel").hide()}function post_comment(e){return unpause(),commentBusy=!0,$j("body").css("cursor","wait"),$j("#comment-preview-inp-"+e).val("0"),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){if(t.success){$j("#comment-edit-wrapper-"+e).hide(),$j("#comment-edit-text-"+e).val("");var n=document.getElementById("comment-edit-text-"+e);n&&commentClose(n,e),timer&&clearTimeout(timer),timer=setTimeout(NavUpdate,10)}t.reload&&(window.location.href=t.reload)},"json"),!1}function preview_comment(e){return $j("#comment-preview-inp-"+e).val("1"),$j("#comment-edit-preview-"+e).show(),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){t.preview&&($j("#comment-edit-preview-"+e).html(t.preview),$j("#comment-edit-preview-"+e+" a").click(function(){return!1}))},"json"),!0}function showHideComments(e){$j("#collapsed-comments-"+e).is(":visible")?($j("#collapsed-comments-"+e).hide(),$j("#hide-comments-"+e).html(window.showMore)):($j("#collapsed-comments-"+e).show(),$j("#hide-comments-"+e).html(window.showFewer),collapseHeight("#collapsed-comments-"+e))}function preview_post(){return $j("#jot-preview").val("1"),$j("#jot-preview-content").show(),tinyMCE.triggerSave(),$j.post("item",$j("#profile-jot-form").serialize(),function(e){e.preview&&($j("#jot-preview-content").html(e.preview),$j("#jot-preview-content a").click(function(){return!1}))},"json"),$j("#jot-preview").val("0"),!0}function unpause(){totStopped=!1,stopped=!1,$j("#pause").html("")}function bin2hex(e){var t,n,r=0,i=[];e+="",r=e.length;for(n=0;n'+e.desc+'
'+e.version+'
'+e.credits+'
'+theme+'')})}var src=null,prev=null,livetime=null,msie=!1,stopped=!1,totStopped=!1,timer=null,pr=0,liking=0,in_progress=!1,langSelect=!1,commentBusy=!1,last_popup_menu=null,last_popup_button=null;$j(function(){function e(e){last_popup_menu&&"#"+last_popup_menu.attr("id")!==$j(e.target).attr("rel")&&(last_popup_menu.hide(),last_popup_button.removeClass("selected"),last_popup_menu=null,last_popup_button=null)}$j.ajaxSetup({cache:!1}),msie=$j.browser.msie,collapseHeight(),$j(".onoff input").each(function(){val=$j(this).val(),id=$j(this).attr("id"),$j("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden")}),$j(".onoff > a").click(function(e){e.preventDefault();var t=$j(this).siblings("input"),n=1-t.val(),r=t.attr("id");$j("#"+r+"_onoff ."+(n==0?"on":"off")).addClass("hidden"),$j("#"+r+"_onoff ."+(n==1?"on":"off")).removeClass("hidden"),t.val(n)}),setupFieldRichtext(),$j("a[rel^=#]").click(function(t){return e(t),menu=$j($j(this).attr("rel")),t.preventDefault(),t.stopPropagation(),menu.attr("popup")=="false"?!1:($j(this).parent().toggleClass("selected"),menu.slideToggle("fast"),menu.css("display")=="none"?(last_popup_menu=null,last_popup_button=null):(last_popup_menu=menu,last_popup_button=$j(this).parent()),!1)}),$j("html").click(function(t){e(t)}),$j("a.popupbox").fancybox({transitionIn:"none",transitionOut:"none"});var t=unescape($j("#nav-notifications-template[rel=template]").html()),n=unescape($j("
").append($j("#nav-notifications-see-all").clone()).html()),r=unescape($j("
").append($j("#nav-notifications-mark-all").clone()).html()),i=unescape($j("#nav-notifications-menu").html());$j("nav").bind("nav-update",function(e,s){var o=$j(s).find("invalid").text();o==1&&(window.location.href=window.location.href);var u=$j(s).find("net").text();u==0?(u="",$j("#net-update").removeClass("show")):$j("#net-update").addClass("show"),$j("#net-update").html(u);var a=$j(s).find("home").text();a==0?(a="",$j("#home-update").removeClass("show")):$j("#home-update").addClass("show"),$j("#home-update").html(a);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update").removeClass("show")):$j("#intro-update").addClass("show"),$j("#intro-update").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update").removeClass("show")):$j("#mail-update").addClass("show"),$j("#mail-update").html(l);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update-li").removeClass("show")):$j("#intro-update-li").addClass("show"),$j("#intro-update-li").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update-li").removeClass("show")):$j("#mail-update-li").addClass("show"),$j("#mail-update-li").html(l);var c=$j(s).find("notif");c.children("note").length==0?$j("#nav-notifications-menu").html(i):(nnm=$j("#nav-notifications-menu"),nnm.html(n+r),c.children("note").each(function(){e=$j(this),text=e.text().format(""+e.attr("name")+""),html=t.format(e.attr("href"),e.attr("photo"),text,e.attr("date"),e.attr("seen")),nnm.append(html)})),notif=c.attr("count"),notif>0?$j("#nav-notifications-linkmenu").addClass("on"):$j("#nav-notifications-linkmenu").removeClass("on"),notif==0?(notif="",$j("#notify-update").removeClass("show")):$j("#notify-update").addClass("show"),$j("#notify-update").html(notif);var h=$j(s).find("sysmsgs");h.children("notice").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"notice",life:3e3})}),h.children("info").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"info",life:1e3})})}),NavUpdate(),$j(document).keydown(function(e){if(e.keyCode=="8"){var t=e.target||e.srcElement;if(!/input|textarea/i.test(t.nodeName))return!1}e.keyCode=="19"||e.ctrlKey&&e.which=="32"?(e.preventDefault(),stopped==0?(stopped=!0,e.ctrlKey&&(totStopped=!0),$j("#pause").html('pause')):unpause()):totStopped||unpause()})});var lockvisible=!1;String.prototype.format=function(){var e=this;for(var t=0;t a").click(function(event){event.preventDefault();var input=$j(this).siblings("input");var val=1-input.val();var id=input.attr("id");$j("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden");$j("#"+id+"_onoff ."+(val==1?"on":"off")).removeClass("hidden");input.val(val)});setupFieldRichtext();function close_last_popup_menu(e){if(last_popup_menu){if("#"+last_popup_menu.attr("id")!==$j(e.target).attr("rel")){last_popup_menu.hide();last_popup_button.removeClass("selected");last_popup_menu=null;last_popup_button=null}}}$j("a[rel^=#]").click(function(e){close_last_popup_menu(e);menu=$j($j(this).attr("rel"));e.preventDefault();e.stopPropagation();if(menu.attr("popup")=="false")return false;$j(this).parent().toggleClass("selected");menu.slideToggle("fast");if(menu.css("display")=="none"){last_popup_menu=null;last_popup_button=null}else{last_popup_menu=menu;last_popup_button=$j(this).parent()}return false});$j("html").click(function(e){close_last_popup_menu(e)});$j("a.popupbox").fancybox({transitionIn:"none",transitionOut:"none"});var notifications_tpl=unescape($j("#nav-notifications-template[rel=template]").html());var notifications_all=unescape($j("
").append($j("#nav-notifications-see-all").clone()).html());var notifications_mark=unescape($j("
").append($j("#nav-notifications-mark-all").clone()).html());var notifications_empty=unescape($j("#nav-notifications-menu").html());$j("nav").bind("nav-update",function(e,data){var invalid=$j(data).find("invalid").text();if(invalid==1){window.location.href=window.location.href}var net=$j(data).find("net").text();if(net==0){net="";$j("#net-update").removeClass("show")}else{$j("#net-update").addClass("show")}$j("#net-update").html(net);var home=$j(data).find("home").text();if(home==0){home="";$j("#home-update").removeClass("show")}else{$j("#home-update").addClass("show")}$j("#home-update").html(home);var intro=$j(data).find("intro").text();if(intro==0){intro="";$j("#intro-update").removeClass("show")}else{$j("#intro-update").addClass("show")}$j("#intro-update").html(intro);var mail=$j(data).find("mail").text();if(mail==0){mail="";$j("#mail-update").removeClass("show")}else{$j("#mail-update").addClass("show")}$j("#mail-update").html(mail);var intro=$j(data).find("intro").text();if(intro==0){intro="";$j("#intro-update-li").removeClass("show")}else{$j("#intro-update-li").addClass("show")}$j("#intro-update-li").html(intro);var mail=$j(data).find("mail").text();if(mail==0){mail="";$j("#mail-update-li").removeClass("show")}else{$j("#mail-update-li").addClass("show")}$j("#mail-update-li").html(mail);var eNotif=$j(data).find("notif");if(eNotif.children("note").length==0){$j("#nav-notifications-menu").html(notifications_empty)}else{nnm=$j("#nav-notifications-menu");nnm.html(notifications_all+notifications_mark);eNotif.children("note").each(function(){e=$j(this);text=e.text().format(""+e.attr("name")+"");html=notifications_tpl.format(e.attr("href"),e.attr("photo"),text,e.attr("date"),e.attr("seen"));nnm.append(html)})}notif=eNotif.attr("count");if(notif>0){$j("#nav-notifications-linkmenu").addClass("on")}else{$j("#nav-notifications-linkmenu").removeClass("on")}if(notif==0){notif="";$j("#notify-update").removeClass("show")}else{$j("#notify-update").addClass("show")}$j("#notify-update").html(notif);var eSysmsg=$j(data).find("sysmsgs");eSysmsg.children("notice").each(function(){text=$j(this).text();$j.jGrowl(text,{sticky:false,theme:"notice",life:3e3})});eSysmsg.children("info").each(function(){text=$j(this).text();$j.jGrowl(text,{sticky:false,theme:"info",life:1e3})})});NavUpdate();$j(document).keydown(function(event){if(event.keyCode=="8"){var target=event.target||event.srcElement;if(!/input|textarea/i.test(target.nodeName)){return false}}if(event.keyCode=="19"||event.ctrlKey&&event.which=="32"){event.preventDefault();if(stopped==false){stopped=true;if(event.ctrlKey){totStopped=true}$j("#pause").html('pause')}else{unpause()}}else{if(!totStopped){unpause()}}})});function NavUpdate(){if(!stopped){var pingCmd="ping"+(localUser!=0?"?f=&uid="+localUser:"");$j.get(pingCmd,function(data){$j(data).find("result").each(function(){$j("nav").trigger("nav-update",this);if($j("#live-network").length){src="network";liveUpdate()}if($j("#live-profile").length){src="profile";liveUpdate()}if($j("#live-community").length){src="community";liveUpdate()}if($j("#live-notes").length){src="notes";liveUpdate()}if($j("#live-display").length){src="display";liveUpdate()}if($j("#live-photos").length){if(liking){liking=0;window.location.href=window.location.href}}})})}timer=setTimeout(NavUpdate,updateInterval)}function liveUpdate(){if(src==null||stopped||!profile_uid){$j(".like-rotator").hide();return}if($j(".comment-edit-text-full").length||in_progress){if(livetime){clearTimeout(livetime)}livetime=setTimeout(liveUpdate,1e4);return}if(livetime!=null)livetime=null;prev="live-"+src;in_progress=true;var udargs=netargs.length?"/"+netargs:"";var update_url="update_"+src+udargs+"&p="+profile_uid+"&page="+profile_page+"&msie="+(msie?1:0);$j.get(update_url,function(data){in_progress=false;$j(".toplevel_item",data).each(function(){var ident=$j(this).attr("id");if($j("#"+ident).length==0&&profile_page==1){$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))});$j("#"+prev).after($j(this))}else{var id=$j(".hide-comments-total",this).attr("id");if(typeof id!="undefined"){id=id.split("-")[3];var commentsOpen=$j("#collapsed-comments-"+id).is(":visible")}$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))});$j("html").height($j("html").height());$j("#"+ident).replaceWith($j(this));if(typeof id!="undefined"){if(commentsOpen)showHideComments(id)}$j("html").height("auto")}prev=ident});$j(".like-rotator").hide();if(commentBusy){commentBusy=false;$j("body").css("cursor","auto")}$j(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl");collapseHeight()})}function collapseHeight(elems){var elemName=".wall-item-body:not(.divmore)";if(typeof elems!="undefined"){elemName=elems+" "+elemName}$j(elemName).each(function(){if($j(this).height()>450){$j("html").height($j("html").height());$j(this).divgrow({initialHeight:400,showBrackets:false,speed:0});$j(this).addClass("divmore");$j("html").height("auto")}})}function imgbright(node){$j(node).removeClass("drophide").addClass("drop")}function imgdull(node){$j(node).removeClass("drop").addClass("drophide")}function dolike(ident,verb){unpause();$j("#like-rotator-"+ident.toString()).show();$j.get("like/"+ident.toString()+"?verb="+verb,NavUpdate);liking=1}function dostar(ident){ident=ident.toString();$j.get("starred/"+ident,function(data){if(data.match(/1/)){$j("#starred-"+ident).addClass("starred");$j("#starred-"+ident).removeClass("unstarred");$j("#star-"+ident).addClass("hidden");$j("#unstar-"+ident).removeClass("hidden")}else{$j("#starred-"+ident).addClass("unstarred");$j("#starred-"+ident).removeClass("starred");$j("#star-"+ident).removeClass("hidden");$j("#unstar-"+ident).addClass("hidden")}})}function getPosition(e){var cursor={x:0,y:0};if(e.pageX||e.pageY){cursor.x=e.pageX;cursor.y=e.pageY}else{if(e.clientX||e.clientY){cursor.x=e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;cursor.y=e.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop}else{if(e.x||e.y){cursor.x=e.x;cursor.y=e.y}}}return cursor}var lockvisible=false;function lockview(event,id){event=event||window.event;cursor=getPosition(event);if(lockvisible){lockviewhide()}else{lockvisible=true;$j.get("lockview/"+id,function(data){$j("#panel").html(data);$j("#panel").css({left:cursor.x+5,top:cursor.y+5});$j("#panel").show()})}}function lockviewhide(){lockvisible=false;$j("#panel").hide()}function post_comment(id){unpause();commentBusy=true;$j("body").css("cursor","wait");$j("#comment-preview-inp-"+id).val("0");$j.post("item",$j("#comment-edit-form-"+id).serialize(),function(data){if(data.success){$j("#comment-edit-wrapper-"+id).hide();$j("#comment-edit-text-"+id).val("");var tarea=document.getElementById("comment-edit-text-"+id);if(tarea)commentClose(tarea,id);if(timer)clearTimeout(timer);timer=setTimeout(NavUpdate,10)}if(data.reload){window.location.href=data.reload}},"json");return false}function preview_comment(id){$j("#comment-preview-inp-"+id).val("1");$j("#comment-edit-preview-"+id).show();$j.post("item",$j("#comment-edit-form-"+id).serialize(),function(data){if(data.preview){$j("#comment-edit-preview-"+id).html(data.preview);$j("#comment-edit-preview-"+id+" a").click(function(){return false})}},"json");return true}function showHideComments(id){if($j("#collapsed-comments-"+id).is(":visible")){$j("#collapsed-comments-"+id).hide();$j("#hide-comments-"+id).html(window.showMore)}else{$j("#collapsed-comments-"+id).show();$j("#hide-comments-"+id).html(window.showFewer);collapseHeight("#collapsed-comments-"+id)}}function preview_post(){$j("#jot-preview").val("1");$j("#jot-preview-content").show();tinyMCE.triggerSave();$j.post("item",$j("#profile-jot-form").serialize(),function(data){if(data.preview){$j("#jot-preview-content").html(data.preview);$j("#jot-preview-content"+" a").click(function(){return false})}},"json");$j("#jot-preview").val("0");return true}function unpause(){totStopped=false;stopped=false;$j("#pause").html("")}function bin2hex(s){var v,i,f=0,a=[];s+="";f=s.length;for(i=0;i'+data.desc+'
'+data.version+'
'+data.credits+'
'+theme+'')})} \ No newline at end of file diff --git a/view/theme/frost/js/theme.js b/view/theme/frost/js/theme.js index ec00dcfdff..3428842014 100644 --- a/view/theme/frost/js/theme.js +++ b/view/theme/frost/js/theme.js @@ -29,10 +29,10 @@ $j(document).ready(function() { $j("#profile-jot-text").click(enableOnUser); - $j('.nav-menu-link').hover(function() { - showNavMenu($j(this).attr('rel')); + $j('.nav-menu-list, .nav-menu-icon').hover(function() { + showNavMenu($j(this).attr('point')); }, function() { - hideNavMenu($j(this).attr('rel')); + hideNavMenu($j(this).attr('point')); }); /* $j('html').click(function() { $j("#nav-notifications-menu" ).hide(); });*/ @@ -305,6 +305,13 @@ $j(function(){ }); +function homeRedirect() { + $j('html').fadeOut('slow', function(){ + window.location = baseurl + "/login"; + }); +} + + if(typeof window.photoEdit != 'undefined') { $j(document).keydown(function(event) { @@ -616,8 +623,8 @@ function initEditor(cb){ $j("#profile-jot-text").contact_autocomplete(baseurl+"/acl"); editor = true; $j("a#jot-perms-icon").fancybox({ - 'transitionIn' : 'elastic', - 'transitionOut' : 'elastic' + 'transitionIn' : 'none', //'elastic', + 'transitionOut' : 'none' //'elastic' }); $j(".jothidden").show(); if (typeof cb!="undefined") cb(); diff --git a/view/theme/frost/js/theme.min.js b/view/theme/frost/js/theme.min.js index 4fb4aae750..49be57f29d 100644 --- a/view/theme/frost/js/theme.min.js +++ b/view/theme/frost/js/theme.min.js @@ -1 +1 @@ -function showEvent(e){$j.get(baseurl+"/events/?id="+e,function(e){$j.fancybox(e)})}function initCrop(){function e(e,t){$("x1").value=e.x1,$("y1").value=e.y1,$("x2").value=e.x2,$("y2").value=e.y2,$("width").value=t.width,$("height").value=t.height}Event.observe(window,"load",function(){new Cropper.ImgWithPreview("croppa",{previewWrap:"previewWrap",minWidth:175,minHeight:175,maxWidth:640,maxHeight:640,ratioDim:{x:100,y:100},displayOnInit:!0,onEndCrop:e})})}function showNavMenu(e){window.navMenuTimeout[e+"-closing"]?(window.navMenuTimeout[e+"-closing"]=!1,clearTimeout(window.navMenuTimeout[e+"-timeout"])):(window.navMenuTimeout[e+"-opening"]=!0,window.navMenuTimeout[e+"-timeout"]=setTimeout(function(){$j(e).slideDown("fast").show(),window.navMenuTimeout[e+"-opening"]=!1},200))}function hideNavMenu(e){window.navMenuTimeout[e+"-opening"]?(window.navMenuTimeout[e+"-opening"]=!1,clearTimeout(window.navMenuTimeout[e+"-timeout"])):(window.navMenuTimeout[e+"-closing"]=!0,window.navMenuTimeout[e+"-timeout"]=setTimeout(function(){$j(e).slideUp("fast"),window.navMenuTimeout[e+"-closing"]=!1},500))}function insertFormatting(e,t,n){var r=$j("#comment-edit-text-"+n).val();r==e&&(r="",$j("#comment-edit-text-"+n).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+n).removeClass("comment-edit-text-empty"),openMenu("comment-edit-submit-wrapper-"+n),$j("#comment-edit-text-"+n).val(r)),textarea=document.getElementById("comment-edit-text-"+n);if(document.selection)textarea.focus(),selected=document.selection.createRange(),t=="url"?selected.text="["+t+"=http://]"+selected.text+"[/"+t+"]":selected.text="["+t+"]"+selected.text+"[/"+t+"]";else if(textarea.selectionStart||textarea.selectionStart=="0"){var i=textarea.selectionStart,s=textarea.selectionEnd;t=="url"?textarea.value=textarea.value.substring(0,i)+"["+t+"=http://]"+textarea.value.substring(i,s)+"[/"+t+"]"+textarea.value.substring(s,textarea.value.length):textarea.value=textarea.value.substring(0,i)+"["+t+"]"+textarea.value.substring(i,s)+"[/"+t+"]"+textarea.value.substring(s,textarea.value.length)}return!0}function cmtBbOpen(e){$j("#comment-edit-bb-"+e).show()}function cmtBbClose(e){$j("#comment-edit-bb-"+e).hide()}function confirmDelete(){return confirm(window.delItem)}function commentOpen(e,t){e.value==window.commentEmptyText&&(e.value="",$j("#comment-edit-text-"+t).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).removeClass("comment-edit-text-empty"),$j("#mod-cmnt-wrap-"+t).show(),openMenu("comment-edit-submit-wrapper-"+t))}function commentClose(e,t){e.value==""&&(e.value=window.commentEmptyText,$j("#comment-edit-text-"+t).removeClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).addClass("comment-edit-text-empty"),$j("#mod-cmnt-wrap-"+t).hide(),closeMenu("comment-edit-submit-wrapper-"+t))}function commentInsert(e,t){var n=$j("#comment-edit-text-"+t).val();n==window.commentEmptyText&&(n="",$j("#comment-edit-text-"+t).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).removeClass("comment-edit-text-empty"),openMenu("comment-edit-submit-wrapper-"+t));var r=$j(e).html();r=r.replace("<","<"),r=r.replace(">",">"),r=r.replace("&","&"),r=r.replace(""",'"'),$j("#comment-edit-text-"+t).val(n+r)}function qCommentInsert(e,t){var n=$j("#comment-edit-text-"+t).val();n==window.commentEmptyText&&(n="",$j("#comment-edit-text-"+t).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).removeClass("comment-edit-text-empty"),openMenu("comment-edit-submit-wrapper-"+t));var r=$j(e).val();r=r.replace("<","<"),r=r.replace(">",">"),r=r.replace("&","&"),r=r.replace(""",'"'),$j("#comment-edit-text-"+t).val(n+r),$j(e).val("")}function enableOnUser(){if(editor)return;$j(this).val(""),initEditor()}function initEditor(e){if(editor==0){$j("#profile-jot-text-loading").show();if(plaintext=="none"){$j("#profile-jot-text-loading").hide(),$j("#profile-jot-text").css({height:200,color:"#000"}),$j("#profile-jot-text").contact_autocomplete(baseurl+"/acl"),editor=!0,$j("a#jot-perms-icon").fancybox({transitionIn:"elastic",transitionOut:"elastic"}),$j(".jothidden").show(),typeof e!="undefined"&&e();return}tinyMCE.init({theme:"advanced",mode:"specific_textareas",editor_selector:window.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",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:!0,paste_text_sticky:!0,entity_encoding:"raw",add_unload_trigger:!1,remove_linebreaks:!1,force_p_newlines:!1,force_br_newlines:!0,forced_root_block:"",convert_urls:!1,content_css:window.baseURL+"/view/custom_tinymce.css",theme_advanced_path:!1,file_browser_callback:"fcFileBrowser",setup:function(t){cPopup=null,t.onKeyDown.add(function(e,t){cPopup!==null&&cPopup.onkey(t)}),t.onKeyUp.add(function(e,t){var n=tinyMCE.activeEditor.getContent();match=n.match(/@([^ \n]+)$/),match!==null?(cPopup===null&&(cPopup=new ACPopup(this,baseurl+"/acl")),cPopup.ready&&match[1]!==cPopup.searchText&&cPopup.search(match[1]),cPopup.ready||(cPopup=null)):cPopup!==null&&(cPopup.close(),cPopup=null),textlen=n.length,textlen!=0&&$j("#jot-perms-icon").is(".unlock")?$j("#profile-jot-desc").html(ispublic):$j("#profile-jot-desc").html(" "),textlen<=140&&($j("#character-counter").removeClass("red"),$j("#character-counter").removeClass("orange"),$j("#character-counter").addClass("grey")),textlen>140&&textlen<=420&&($j("#character-counter").removeClass("grey"),$j("#character-counter").removeClass("red"),$j("#character-counter").addClass("orange")),textlen>420&&($j("#character-counter").removeClass("grey"),$j("#character-counter").removeClass("orange"),$j("#character-counter").addClass("red")),$j("#character-counter").text(textlen)}),t.onInit.add(function(t){t.pasteAsPlainText=!0,$j("#profile-jot-text-loading").hide(),$j(".jothidden").show(),typeof e!="undefined"&&e()})}}),editor=!0,$j("a#jot-perms-icon").fancybox({transitionIn:"none",transitionOut:"none"})}else typeof e!="undefined"&&e()}function msgInitEditor(){plaintext!="none"?tinyMCE.init({theme:"advanced",mode:"specific_textareas",editor_selector:/(profile-jot-text|prvmail-text)/,plugins:"bbcode,paste",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:!0,paste_text_sticky:!0,entity_encoding:"raw",add_unload_trigger:!1,remove_linebreaks:!1,force_p_newlines:!1,force_br_newlines:!0,forced_root_block:"",convert_urls:!1,content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:!1,setup:function(e){e.onInit.add(function(e){e.pasteAsPlainText=!0;var t=e.editorId,n=$j("#"+t);typeof n.attr("tabindex")!="undefined"&&($j("#"+t+"_ifr").attr("tabindex",n.attr("tabindex")),n.attr("tabindex",null))})}}):$j("#prvmail-text").contact_autocomplete(baseurl+"/acl")}function profInitEditor(){tinyMCE.init({theme:"advanced",mode:window.editSelect,plugins:"bbcode,paste",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:!0,paste_text_sticky:!0,entity_encoding:"raw",add_unload_trigger:!1,remove_linebreaks:!1,force_p_newlines:!1,force_br_newlines:!0,forced_root_block:"",content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:!1,setup:function(e){e.onInit.add(function(e){e.pasteAsPlainText=!0})}})}function eventInitEditor(){tinyMCE.init({theme:"advanced",mode:"textareas",plugins:"bbcode,paste",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:!0,paste_text_sticky:!0,entity_encoding:"raw",add_unload_trigger:!1,remove_linebreaks:!1,force_p_newlines:!1,force_br_newlines:!0,forced_root_block:"",content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:!1,setup:function(e){e.onInit.add(function(e){e.pasteAsPlainText=!0})}})}function contactInitEditor(){tinyMCE.init({theme:"advanced",mode:window.editSelect,elements:"contact-edit-info",plugins:"bbcode",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_styles:"blockquote,code",gecko_spellcheck:!0,entity_encoding:"raw",add_unload_trigger:!1,remove_linebreaks:!1,force_p_newlines:!1,force_br_newlines:!0,forced_root_block:"",content_css:baseurl+"/view/custom_tinymce.css"})}function wallInitEditor(){var e=window.editSelect;e!="none"?tinyMCE.init({theme:"advanced",mode:"specific_textareas",editor_selector:/(profile-jot-text|prvmail-text)/,plugins:"bbcode,paste",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:!0,paste_text_sticky:!0,entity_encoding:"raw",add_unload_trigger:!1,remove_linebreaks:!1,force_p_newlines:!1,force_br_newlines:!0,forced_root_block:"",convert_urls:!1,content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:!1,setup:function(e){e.onInit.add(function(e){e.pasteAsPlainText=!0;var t=e.editorId,n=$j("#"+t);typeof n.attr("tabindex")!="undefined"&&($j("#"+t+"_ifr").attr("tabindex",n.attr("tabindex")),n.attr("tabindex",null))})}}):$j("#prvmail-text").contact_autocomplete(baseurl+"/acl")}function deleteCheckedItems(e){if(confirm(window.delItems)){var t="";$j(e).hide(),$j(e+"-rotator").show(),$j(".item-select").each(function(){$j(this).is(":checked")&&(t.length!=0?t=t+","+$j(this).val():t=$j(this).val())}),$j.post("item",{dropitems:t},function(e){window.location.reload()})}}function jotVideoURL(){reply=prompt(window.vidURL),reply&&reply.length&&addeditortext("[video]"+reply+"[/video]")}function jotAudioURL(){reply=prompt(window.audURL),reply&&reply.length&&addeditortext("[audio]"+reply+"[/audio]")}function jotGetLocation(){reply=prompt(window.whereAreU,$j("#jot-location").val()),reply&&reply.length&&$j("#jot-location").val(reply)}function jotShare(e){$j("#jot-popup").length!=0&&$j("#jot-popup").show(),$j("#like-rotator-"+e).show(),$j.get("share/"+e,function(t){editor||$j("#profile-jot-text").val(""),initEditor(function(){addeditortext(t),$j("#like-rotator-"+e).hide(),$j(window).scrollTop(0)})})}function linkdropper(e){var t=e.dataTransfer.types.contains("text/uri-list");t&&e.preventDefault()}function itemTag(e){reply=prompt(window.term),reply&&reply.length&&(reply=reply.replace("#",""),reply.length&&(commentBusy=!0,$j("body").css("cursor","wait"),$j.get("tagger/"+e+"?term="+reply,NavUpdate),liking=1))}function itemFiler(e){var t=$j("input").css("border-color");$j.get("filer/",function(n){$j.fancybox(n),$j("#id_term").keypress(function(){$j(this).css("border-color",t)}),$j("#select_term").change(function(){$j("#id_term").css("border-color",t)}),$j("#filer_save").click(function(t){return t.preventDefault(),reply=$j("#id_term").val(),reply&&reply.length?(commentBusy=!0,$j("body").css("cursor","wait"),$j.get("filer/"+e+"?term="+reply,NavUpdate),liking=1,$j.fancybox.close()):$j("#id_term").css("border-color","#FF0000"),!1})})}function jotClearLocation(){$j("#jot-coord").val(""),$j("#profile-nolocation-wrapper").hide()}function addeditortext(e){if(plaintext=="none"){var t=$j("#profile-jot-text").val();$j("#profile-jot-text").val(t+e)}else tinyMCE.execCommand("mceInsertRawHTML",!1,e)}$j(document).ready(function(){window.navMenuTimeout={"#network-menu-list-timeout":null,"#contacts-menu-list-timeout":null,"#system-menu-list-timeout":null,"#network-menu-list-opening":!1,"#contacts-menu-list-opening":!1,"#system-menu-list-opening":!1,"#network-menu-list-closing":!1,"#contacts-menu-list-closing":!1,"#system-menu-list-closing":!1},typeof window.aclInit!="undefined"&&typeof acl=="undefined"&&(acl=new ACL(baseurl+"/acl",[window.allowCID,window.allowGID,window.denyCID,window.denyGID])),$j("#profile-jot-text").focus(enableOnUser),$j("#profile-jot-text").click(enableOnUser),$j(".nav-menu-link").hover(function(){showNavMenu($j(this).attr("rel"))},function(){hideNavMenu($j(this).attr("rel"))}),$j(".group-edit-icon").hover(function(){$j(this).addClass("icon"),$j(this).removeClass("iconspacer")},function(){$j(this).removeClass("icon"),$j(this).addClass("iconspacer")}),$j(".sidebar-group-element").hover(function(){id=$j(this).attr("id"),$j("#edit-"+id).addClass("icon"),$j("#edit-"+id).removeClass("iconspacer")},function(){id=$j(this).attr("id"),$j("#edit-"+id).removeClass("icon"),$j("#edit-"+id).addClass("iconspacer")}),$j(".savedsearchdrop").hover(function(){$j(this).addClass("drop"),$j(this).addClass("icon"),$j(this).removeClass("iconspacer")},function(){$j(this).removeClass("drop"),$j(this).removeClass("icon"),$j(this).addClass("iconspacer")}),$j(".savedsearchterm").hover(function(){id=$j(this).attr("id"),$j("#drop-"+id).addClass("icon"),$j("#drop-"+id).addClass("drophide"),$j("#drop-"+id).removeClass("iconspacer")},function(){id=$j(this).attr("id"),$j("#drop-"+id).removeClass("icon"),$j("#drop-"+id).removeClass("drophide"),$j("#drop-"+id).addClass("iconspacer")}),window.autoCompleteType=="display-head"&&$j(".comment-wwedit-wrapper textarea").contact_autocomplete(baseurl+"/acl");if(window.aclType=="event_head"){$j("#events-calendar").fullCalendar({events:baseurl+"/events/json/",header:{left:"prev,next today",center:"title",right:"month,agendaWeek,agendaDay"},timeFormat:"H(:mm)",eventClick:function(e,t,n){showEvent(e.id)},eventRender:function(e,t,n){if(e.item["author-name"]==null)return;switch(n.name){case"month":t.find(".fc-event-title").html("{1} : {2}".format(e.item["author-avatar"],e.item["author-name"],e.title));break;case"agendaWeek":t.find(".fc-event-title").html("{1}

{2}

{3}

".format(e.item["author-avatar"],e.item["author-name"],e.item.desc,e.item.location));break;case"agendaDay":t.find(".fc-event-title").html("{1}

{2}

{3}

".format(e.item["author-avatar"],e.item["author-name"],e.item.desc,e.item.location))}}});var e=location.href.replace(baseurl,"").split("/");e.length>=4&&$j("#events-calendar").fullCalendar("gotoDate",e[2],e[3]-1);var t=location.hash.split("-");t.length==2&&t[0]=="#link"&&showEvent(t[1])}$j("#event-share-checkbox").change(function(){$j("#event-share-checkbox").is(":checked")?$j("#acl-wrapper").show():$j("#acl-wrapper").hide()}).trigger("change"),(window.aclType=="settings-head"||window.aclType=="photos_head"||window.aclType=="event_head")&&$j("#contact_allow, #contact_deny, #group_allow, #group_deny").change(function(){var e;$j("#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected").each(function(){e=$j(this).text(),$j("#jot-perms-icon").removeClass("unlock").addClass("lock"),$j("#jot-public").hide()}),e==null&&($j("#jot-perms-icon").removeClass("lock").addClass("unlock"),$j("#jot-public").show())}).trigger("change");switch(window.autocompleteType){case"msg-header":var n=$j("#recip").autocomplete({serviceUrl:baseurl+"/acl",minChars:2,width:350,onSelect:function(e,t){$j("#recip-complete").val(t)}});break;case"contacts-head":var n=$j("#contacts-search").autocomplete({serviceUrl:baseurl+"/acl",minChars:2,width:350});n.setOptions({params:{type:"a"}});break;default:}if(typeof window.AjaxUpload!="undefined")switch(window.ajaxType){case"jot-header":var r=new window.AjaxUpload("wall-image-upload",{action:"wall_upload/"+window.nickname,name:"userfile",onSubmit:function(e,t){$j("#profile-rotator").show()},onComplete:function(e,t){addeditortext(t),$j("#profile-rotator").hide()}}),i=new window.AjaxUpload("wall-file-upload",{action:"wall_attach/"+window.nickname,name:"userfile",onSubmit:function(e,t){$j("#profile-rotator").show()},onComplete:function(e,t){addeditortext(t),$j("#profile-rotator").hide()}});break;case"msg-header":var r=new window.AjaxUpload("prvmail-upload",{action:"wall_upload/"+window.nickname,name:"userfile",onSubmit:function(e,t){$j("#profile-rotator").show()},onComplete:function(e,t){tinyMCE.execCommand("mceInsertRawHTML",!1,t),$j("#profile-rotator").hide()}});break;default:}}),$j(function(){$j("nav").bind("nav-update",function(e,t){var n=$j("#pending-update"),r=$j(t).find("register").text();r=="0"?(r="",n.hide()):n.show(),n.html(r)})}),$j(function(){$j("#cnftheme").fancybox({width:800,autoDimensions:!1,onStart:function(){var e=$j("#id_theme :selected").val(),t=$j("#id_theme_mobile :selected").val();$j("#cnftheme").attr("href",baseurl+"/admin/themes/"+e)},onComplete:function(){$j("div#fancybox-content form").submit(function(e){var t=$j(this).attr("action"),n={};return $j(this).find("input").each(function(){n[$j(this).attr("name")]=$j(this).val()}),$j(this).find("select").each(function(){n[$j(this).attr("name")]=$j(this).children(":selected").val()}),console.log(":)",t,n),$j.post(t,n,function(e){timer&&clearTimeout(timer),NavUpdate(),$j.fancybox.close()}),!1})}})}),typeof window.photoEdit!="undefined"&&$j(document).keydown(function(e){window.prevLink!=""&&e.ctrlKey&&e.keyCode==37&&(e.preventDefault(),window.location.href=window.prevLink),window.nextLink!=""&&e.ctrlKey&&e.keyCode==39&&(e.preventDefault(),window.location.href=window.nextLink)});switch(window.ajaxType){case"jot-header":function jotGetLink(){reply=prompt(window.linkURL),reply&&reply.length&&(reply=bin2hex(reply),$j("#profile-rotator").show(),$j.get("parse_url?binurl="+reply,function(e){addeditortext(e),$j("#profile-rotator").hide()}))}function linkdrop(e){var t=e.dataTransfer.getData("text/uri-list");e.target.textContent=t,e.preventDefault(),t&&t.length&&(t=bin2hex(t),$j("#profile-rotator").show(),$j.get("parse_url?binurl="+t,function(e){editor||$j("#profile-jot-text").val(""),initEditor(function(){addeditortext(e),$j("#profile-rotator").hide()})}))}break;case"msg-header":case"wallmsg-header":function jotGetLink(){reply=prompt(window.linkURL),reply&&reply.length&&($j("#profile-rotator").show(),$j.get("parse_url?url="+reply,function(e){tinyMCE.execCommand("mceInsertRawHTML",!1,e),$j("#profile-rotator").hide()}))}function linkdrop(e){var t=e.dataTransfer.getData("text/uri-list");e.target.textContent=t,e.preventDefault(),t&&t.length&&($j("#profile-rotator").show(),$j.get("parse_url?url="+t,function(e){tinyMCE.execCommand("mceInsertRawHTML",!1,e),$j("#profile-rotator").hide()}))}break;default:}var editor=!1,textlen=0,plaintext=window.editSelect,ispublic=window.isPublic;typeof window.geoTag=="function"&&window.geoTag(); \ No newline at end of file +$j(document).ready(function(){window.navMenuTimeout={"#network-menu-list-timeout":null,"#contacts-menu-list-timeout":null,"#system-menu-list-timeout":null,"#network-menu-list-opening":false,"#contacts-menu-list-opening":false,"#system-menu-list-opening":false,"#network-menu-list-closing":false,"#contacts-menu-list-closing":false,"#system-menu-list-closing":false};if(typeof window.aclInit!="undefined"&&typeof acl=="undefined"){acl=new ACL(baseurl+"/acl",[window.allowCID,window.allowGID,window.denyCID,window.denyGID])}$j("#profile-jot-text").focus(enableOnUser);$j("#profile-jot-text").click(enableOnUser);$j(".nav-menu-list, .nav-menu-icon").hover(function(){showNavMenu($j(this).attr("point"))},function(){hideNavMenu($j(this).attr("point"))});$j(".group-edit-icon").hover(function(){$j(this).addClass("icon");$j(this).removeClass("iconspacer")},function(){$j(this).removeClass("icon");$j(this).addClass("iconspacer")});$j(".sidebar-group-element").hover(function(){id=$j(this).attr("id");$j("#edit-"+id).addClass("icon");$j("#edit-"+id).removeClass("iconspacer")},function(){id=$j(this).attr("id");$j("#edit-"+id).removeClass("icon");$j("#edit-"+id).addClass("iconspacer")});$j(".savedsearchdrop").hover(function(){$j(this).addClass("drop");$j(this).addClass("icon");$j(this).removeClass("iconspacer")},function(){$j(this).removeClass("drop");$j(this).removeClass("icon");$j(this).addClass("iconspacer")});$j(".savedsearchterm").hover(function(){id=$j(this).attr("id");$j("#drop-"+id).addClass("icon");$j("#drop-"+id).addClass("drophide");$j("#drop-"+id).removeClass("iconspacer")},function(){id=$j(this).attr("id");$j("#drop-"+id).removeClass("icon");$j("#drop-"+id).removeClass("drophide");$j("#drop-"+id).addClass("iconspacer")});if(window.autoCompleteType=="display-head"){$j(".comment-wwedit-wrapper textarea").contact_autocomplete(baseurl+"/acl")}if(window.aclType=="event_head"){$j("#events-calendar").fullCalendar({events:baseurl+"/events/json/",header:{left:"prev,next today",center:"title",right:"month,agendaWeek,agendaDay"},timeFormat:"H(:mm)",eventClick:function(calEvent,jsEvent,view){showEvent(calEvent.id)},eventRender:function(event,element,view){if(event.item["author-name"]==null)return;switch(view.name){case"month":element.find(".fc-event-title").html("{1} : {2}".format(event.item["author-avatar"],event.item["author-name"],event.title));break;case"agendaWeek":element.find(".fc-event-title").html("{1}

{2}

{3}

".format(event.item["author-avatar"],event.item["author-name"],event.item.desc,event.item.location));break;case"agendaDay":element.find(".fc-event-title").html("{1}

{2}

{3}

".format(event.item["author-avatar"],event.item["author-name"],event.item.desc,event.item.location));break}}});var args=location.href.replace(baseurl,"").split("/");if(args.length>=4){$j("#events-calendar").fullCalendar("gotoDate",args[2],args[3]-1)}var hash=location.hash.split("-");if(hash.length==2&&hash[0]=="#link")showEvent(hash[1])}$j("#event-share-checkbox").change(function(){if($j("#event-share-checkbox").is(":checked")){$j("#acl-wrapper").show()}else{$j("#acl-wrapper").hide()}}).trigger("change");if(window.aclType=="settings-head"||window.aclType=="photos_head"||window.aclType=="event_head"){$j("#contact_allow, #contact_deny, #group_allow, #group_deny").change(function(){var selstr;$j("#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected").each(function(){selstr=$j(this).text();$j("#jot-perms-icon").removeClass("unlock").addClass("lock");$j("#jot-public").hide()});if(selstr==null){$j("#jot-perms-icon").removeClass("lock").addClass("unlock");$j("#jot-public").show()}}).trigger("change")}switch(window.autocompleteType){case"msg-header":var a=$j("#recip").autocomplete({serviceUrl:baseurl+"/acl",minChars:2,width:350,onSelect:function(value,data){$j("#recip-complete").val(data)}});break;case"contacts-head":var a=$j("#contacts-search").autocomplete({serviceUrl:baseurl+"/acl",minChars:2,width:350});a.setOptions({params:{type:"a"}});break;default:break}if(typeof window.AjaxUpload!="undefined"){switch(window.ajaxType){case"jot-header":var uploader=new window.AjaxUpload("wall-image-upload",{action:"wall_upload/"+window.nickname,name:"userfile",onSubmit:function(file,ext){$j("#profile-rotator").show()},onComplete:function(file,response){addeditortext(response);$j("#profile-rotator").hide()}});var file_uploader=new window.AjaxUpload("wall-file-upload",{action:"wall_attach/"+window.nickname,name:"userfile",onSubmit:function(file,ext){$j("#profile-rotator").show()},onComplete:function(file,response){addeditortext(response);$j("#profile-rotator").hide()}});break;case"msg-header":var uploader=new window.AjaxUpload("prvmail-upload",{action:"wall_upload/"+window.nickname,name:"userfile",onSubmit:function(file,ext){$j("#profile-rotator").show()},onComplete:function(file,response){tinyMCE.execCommand("mceInsertRawHTML",false,response);$j("#profile-rotator").hide()}});break;default:break}}});$j(function(){$j("nav").bind("nav-update",function(e,data){var elm=$j("#pending-update");var register=$j(data).find("register").text();if(register=="0"){register="";elm.hide()}else{elm.show()}elm.html(register)})});$j(function(){$j("#cnftheme").fancybox({width:800,autoDimensions:false,onStart:function(){var theme=$j("#id_theme :selected").val();var theme_mobile=$j("#id_theme_mobile :selected").val();$j("#cnftheme").attr("href",baseurl+"/admin/themes/"+theme)},onComplete:function(){$j("div#fancybox-content form").submit(function(e){var url=$j(this).attr("action");var data={};$j(this).find("input").each(function(){data[$j(this).attr("name")]=$j(this).val()});$j(this).find("select").each(function(){data[$j(this).attr("name")]=$j(this).children(":selected").val()});console.log(":)",url,data);$j.post(url,data,function(data){if(timer)clearTimeout(timer);NavUpdate();$j.fancybox.close()});return false})}})});function homeRedirect(){$j("html").fadeOut("slow",function(){window.location=baseurl+"/login"})}if(typeof window.photoEdit!="undefined"){$j(document).keydown(function(event){if(window.prevLink!=""){if(event.ctrlKey&&event.keyCode==37){event.preventDefault();window.location.href=window.prevLink}}if(window.nextLink!=""){if(event.ctrlKey&&event.keyCode==39){event.preventDefault();window.location.href=window.nextLink}}})}switch(window.ajaxType){case"jot-header":function jotGetLink(){reply=prompt(window.linkURL);if(reply&&reply.length){reply=bin2hex(reply);$j("#profile-rotator").show();$j.get("parse_url?binurl="+reply,function(data){addeditortext(data);$j("#profile-rotator").hide()})}}function linkdrop(event){var reply=event.dataTransfer.getData("text/uri-list");event.target.textContent=reply;event.preventDefault();if(reply&&reply.length){reply=bin2hex(reply);$j("#profile-rotator").show();$j.get("parse_url?binurl="+reply,function(data){if(!editor)$j("#profile-jot-text").val("");initEditor(function(){addeditortext(data);$j("#profile-rotator").hide()})})}}break;case"msg-header":case"wallmsg-header":function jotGetLink(){reply=prompt(window.linkURL);if(reply&&reply.length){$j("#profile-rotator").show();$j.get("parse_url?url="+reply,function(data){tinyMCE.execCommand("mceInsertRawHTML",false,data);$j("#profile-rotator").hide()})}}function linkdrop(event){var reply=event.dataTransfer.getData("text/uri-list");event.target.textContent=reply;event.preventDefault();if(reply&&reply.length){$j("#profile-rotator").show();$j.get("parse_url?url="+reply,function(data){tinyMCE.execCommand("mceInsertRawHTML",false,data);$j("#profile-rotator").hide()})}}break;default:break}function showEvent(eventid){$j.get(baseurl+"/events/?id="+eventid,function(data){$j.fancybox(data)})}function initCrop(){function onEndCrop(coords,dimensions){$("x1").value=coords.x1;$("y1").value=coords.y1;$("x2").value=coords.x2;$("y2").value=coords.y2;$("width").value=dimensions.width;$("height").value=dimensions.height}Event.observe(window,"load",function(){new Cropper.ImgWithPreview("croppa",{previewWrap:"previewWrap",minWidth:175,minHeight:175,maxWidth:640,maxHeight:640,ratioDim:{x:100,y:100},displayOnInit:true,onEndCrop:onEndCrop})})}function showNavMenu(menuID){if(window.navMenuTimeout[menuID+"-closing"]){window.navMenuTimeout[menuID+"-closing"]=false;clearTimeout(window.navMenuTimeout[menuID+"-timeout"])}else{window.navMenuTimeout[menuID+"-opening"]=true;window.navMenuTimeout[menuID+"-timeout"]=setTimeout(function(){$j(menuID).slideDown("fast").show();window.navMenuTimeout[menuID+"-opening"]=false},200)}}function hideNavMenu(menuID){if(window.navMenuTimeout[menuID+"-opening"]){window.navMenuTimeout[menuID+"-opening"]=false;clearTimeout(window.navMenuTimeout[menuID+"-timeout"])}else{window.navMenuTimeout[menuID+"-closing"]=true;window.navMenuTimeout[menuID+"-timeout"]=setTimeout(function(){$j(menuID).slideUp("fast");window.navMenuTimeout[menuID+"-closing"]=false},500)}}function insertFormatting(comment,BBcode,id){var tmpStr=$j("#comment-edit-text-"+id).val();if(tmpStr==comment){tmpStr="";$j("#comment-edit-text-"+id).addClass("comment-edit-text-full");$j("#comment-edit-text-"+id).removeClass("comment-edit-text-empty");openMenu("comment-edit-submit-wrapper-"+id);$j("#comment-edit-text-"+id).val(tmpStr)}textarea=document.getElementById("comment-edit-text-"+id);if(document.selection){textarea.focus();selected=document.selection.createRange();if(BBcode=="url"){selected.text="["+BBcode+"=http://]"+selected.text+"[/"+BBcode+"]"}else selected.text="["+BBcode+"]"+selected.text+"[/"+BBcode+"]"}else if(textarea.selectionStart||textarea.selectionStart=="0"){var start=textarea.selectionStart;var end=textarea.selectionEnd;if(BBcode=="url"){textarea.value=textarea.value.substring(0,start)+"["+BBcode+"=http://]"+textarea.value.substring(start,end)+"[/"+BBcode+"]"+textarea.value.substring(end,textarea.value.length)}else textarea.value=textarea.value.substring(0,start)+"["+BBcode+"]"+textarea.value.substring(start,end)+"[/"+BBcode+"]"+textarea.value.substring(end,textarea.value.length)}return true}function cmtBbOpen(id){$j("#comment-edit-bb-"+id).show()}function cmtBbClose(id){$j("#comment-edit-bb-"+id).hide()}function confirmDelete(){return confirm(window.delItem)}function commentOpen(obj,id){if(obj.value==window.commentEmptyText){obj.value="";$j("#comment-edit-text-"+id).addClass("comment-edit-text-full");$j("#comment-edit-text-"+id).removeClass("comment-edit-text-empty");$j("#mod-cmnt-wrap-"+id).show();openMenu("comment-edit-submit-wrapper-"+id)}}function commentClose(obj,id){if(obj.value==""){obj.value=window.commentEmptyText;$j("#comment-edit-text-"+id).removeClass("comment-edit-text-full");$j("#comment-edit-text-"+id).addClass("comment-edit-text-empty");$j("#mod-cmnt-wrap-"+id).hide();closeMenu("comment-edit-submit-wrapper-"+id)}}function commentInsert(obj,id){var tmpStr=$j("#comment-edit-text-"+id).val();if(tmpStr==window.commentEmptyText){tmpStr="";$j("#comment-edit-text-"+id).addClass("comment-edit-text-full");$j("#comment-edit-text-"+id).removeClass("comment-edit-text-empty");openMenu("comment-edit-submit-wrapper-"+id)}var ins=$j(obj).html();ins=ins.replace("<","<");ins=ins.replace(">",">");ins=ins.replace("&","&");ins=ins.replace(""",'"');$j("#comment-edit-text-"+id).val(tmpStr+ins)}function qCommentInsert(obj,id){var tmpStr=$j("#comment-edit-text-"+id).val();if(tmpStr==window.commentEmptyText){tmpStr="";$j("#comment-edit-text-"+id).addClass("comment-edit-text-full");$j("#comment-edit-text-"+id).removeClass("comment-edit-text-empty");openMenu("comment-edit-submit-wrapper-"+id)}var ins=$j(obj).val();ins=ins.replace("<","<");ins=ins.replace(">",">");ins=ins.replace("&","&");ins=ins.replace(""",'"');$j("#comment-edit-text-"+id).val(tmpStr+ins);$j(obj).val("")}function enableOnUser(){if(editor)return;$j(this).val("");initEditor()}var editor=false;var textlen=0;var plaintext=window.editSelect;var ispublic=window.isPublic;function initEditor(cb){if(editor==false){$j("#profile-jot-text-loading").show();if(plaintext=="none"){$j("#profile-jot-text-loading").hide();$j("#profile-jot-text").css({height:200,color:"#000"});$j("#profile-jot-text").contact_autocomplete(baseurl+"/acl");editor=true;$j("a#jot-perms-icon").fancybox({transitionIn:"none",transitionOut:"none"});$j(".jothidden").show();if(typeof cb!="undefined")cb();return}tinyMCE.init({theme:"advanced",mode:"specific_textareas",editor_selector:window.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",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:true,paste_text_sticky:true,entity_encoding:"raw",add_unload_trigger:false,remove_linebreaks:false,force_p_newlines:false,force_br_newlines:true,forced_root_block:"",convert_urls:false,content_css:window.baseURL+"/view/custom_tinymce.css",theme_advanced_path:false,file_browser_callback:"fcFileBrowser",setup:function(ed){cPopup=null;ed.onKeyDown.add(function(ed,e){if(cPopup!==null)cPopup.onkey(e)});ed.onKeyUp.add(function(ed,e){var txt=tinyMCE.activeEditor.getContent();match=txt.match(/@([^ \n]+)$/);if(match!==null){if(cPopup===null){cPopup=new ACPopup(this,baseurl+"/acl")}if(cPopup.ready&&match[1]!==cPopup.searchText)cPopup.search(match[1]);if(!cPopup.ready)cPopup=null}else{if(cPopup!==null){cPopup.close();cPopup=null}}textlen=txt.length;if(textlen!=0&&$j("#jot-perms-icon").is(".unlock")){$j("#profile-jot-desc").html(ispublic)}else{$j("#profile-jot-desc").html(" ")}if(textlen<=140){$j("#character-counter").removeClass("red");$j("#character-counter").removeClass("orange");$j("#character-counter").addClass("grey")}if(textlen>140&&textlen<=420){$j("#character-counter").removeClass("grey");$j("#character-counter").removeClass("red");$j("#character-counter").addClass("orange")}if(textlen>420){$j("#character-counter").removeClass("grey");$j("#character-counter").removeClass("orange");$j("#character-counter").addClass("red")}$j("#character-counter").text(textlen)});ed.onInit.add(function(ed){ed.pasteAsPlainText=true;$j("#profile-jot-text-loading").hide();$j(".jothidden").show();if(typeof cb!="undefined")cb()})}});editor=true;$j("a#jot-perms-icon").fancybox({transitionIn:"none",transitionOut:"none"})}else{if(typeof cb!="undefined")cb()}}function msgInitEditor(){if(plaintext!="none"){tinyMCE.init({theme:"advanced",mode:"specific_textareas",editor_selector:/(profile-jot-text|prvmail-text)/,plugins:"bbcode,paste",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:true,paste_text_sticky:true,entity_encoding:"raw",add_unload_trigger:false,remove_linebreaks:false,force_p_newlines:false,force_br_newlines:true,forced_root_block:"",convert_urls:false,content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:false,setup:function(ed){ed.onInit.add(function(ed){ed.pasteAsPlainText=true;var editorId=ed.editorId;var textarea=$j("#"+editorId);if(typeof textarea.attr("tabindex")!="undefined"){$j("#"+editorId+"_ifr").attr("tabindex",textarea.attr("tabindex"));textarea.attr("tabindex",null)}})}})}else $j("#prvmail-text").contact_autocomplete(baseurl+"/acl")}function profInitEditor(){tinyMCE.init({theme:"advanced",mode:window.editSelect,plugins:"bbcode,paste",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:true,paste_text_sticky:true,entity_encoding:"raw",add_unload_trigger:false,remove_linebreaks:false,force_p_newlines:false,force_br_newlines:true,forced_root_block:"",content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:false,setup:function(ed){ed.onInit.add(function(ed){ed.pasteAsPlainText=true})}})}function eventInitEditor(){tinyMCE.init({theme:"advanced",mode:"textareas",plugins:"bbcode,paste",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:true,paste_text_sticky:true,entity_encoding:"raw",add_unload_trigger:false,remove_linebreaks:false,force_p_newlines:false,force_br_newlines:true,forced_root_block:"",content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:false,setup:function(ed){ed.onInit.add(function(ed){ed.pasteAsPlainText=true})}})}function contactInitEditor(){tinyMCE.init({theme:"advanced",mode:window.editSelect,elements:"contact-edit-info",plugins:"bbcode",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_styles:"blockquote,code",gecko_spellcheck:true,entity_encoding:"raw",add_unload_trigger:false,remove_linebreaks:false,force_p_newlines:false,force_br_newlines:true,forced_root_block:"",content_css:baseurl+"/view/custom_tinymce.css"})}function wallInitEditor(){var plaintext=window.editSelect;if(plaintext!="none"){tinyMCE.init({theme:"advanced",mode:"specific_textareas",editor_selector:/(profile-jot-text|prvmail-text)/,plugins:"bbcode,paste",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:true,paste_text_sticky:true,entity_encoding:"raw",add_unload_trigger:false,remove_linebreaks:false,force_p_newlines:false,force_br_newlines:true,forced_root_block:"",convert_urls:false,content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:false,setup:function(ed){ed.onInit.add(function(ed){ed.pasteAsPlainText=true;var editorId=ed.editorId;var textarea=$j("#"+editorId);if(typeof textarea.attr("tabindex")!="undefined"){$j("#"+editorId+"_ifr").attr("tabindex",textarea.attr("tabindex"));textarea.attr("tabindex",null)}})}})}else $j("#prvmail-text").contact_autocomplete(baseurl+"/acl")}function deleteCheckedItems(delID){if(confirm(window.delItems)){var checkedstr="";$j(delID).hide();$j(delID+"-rotator").show();$j(".item-select").each(function(){if($j(this).is(":checked")){if(checkedstr.length!=0){checkedstr=checkedstr+","+$j(this).val()}else{checkedstr=$j(this).val()}}});$j.post("item",{dropitems:checkedstr},function(data){window.location.reload()})}}function jotVideoURL(){reply=prompt(window.vidURL);if(reply&&reply.length){addeditortext("[video]"+reply+"[/video]")}}function jotAudioURL(){reply=prompt(window.audURL);if(reply&&reply.length){addeditortext("[audio]"+reply+"[/audio]")}}function jotGetLocation(){reply=prompt(window.whereAreU,$j("#jot-location").val());if(reply&&reply.length){$j("#jot-location").val(reply)}}function jotShare(id){if($j("#jot-popup").length!=0)$j("#jot-popup").show();$j("#like-rotator-"+id).show();$j.get("share/"+id,function(data){if(!editor)$j("#profile-jot-text").val("");initEditor(function(){addeditortext(data);$j("#like-rotator-"+id).hide();$j(window).scrollTop(0)})})}function linkdropper(event){var linkFound=event.dataTransfer.types.contains("text/uri-list");if(linkFound)event.preventDefault()}function itemTag(id){reply=prompt(window.term);if(reply&&reply.length){reply=reply.replace("#","");if(reply.length){commentBusy=true;$j("body").css("cursor","wait");$j.get("tagger/"+id+"?term="+reply,NavUpdate);liking=1}}}function itemFiler(id){var bordercolor=$j("input").css("border-color");$j.get("filer/",function(data){$j.fancybox(data);$j("#id_term").keypress(function(){$j(this).css("border-color",bordercolor)});$j("#select_term").change(function(){$j("#id_term").css("border-color",bordercolor)});$j("#filer_save").click(function(e){e.preventDefault();reply=$j("#id_term").val();if(reply&&reply.length){commentBusy=true;$j("body").css("cursor","wait");$j.get("filer/"+id+"?term="+reply,NavUpdate);liking=1;$j.fancybox.close()}else{$j("#id_term").css("border-color","#FF0000")}return false})})}function jotClearLocation(){$j("#jot-coord").val("");$j("#profile-nolocation-wrapper").hide()}function addeditortext(data){if(plaintext=="none"){var currentText=$j("#profile-jot-text").val();$j("#profile-jot-text").val(currentText+data)}else tinyMCE.execCommand("mceInsertRawHTML",false,data)}if(typeof window.geoTag==="function")window.geoTag(); \ No newline at end of file diff --git a/view/theme/frost/lock.cur b/view/theme/frost/lock.cur index 892c5e851eedc16e9844061b199e24194cfbc370..011f44705761314a4a9ab5348655aa7dede948f6 100644 GIT binary patch literal 4286 zcmeI0O%lQ&429FR8)uwx-KEFyxZbkn@zbUO3J7gSN1W6)K)&RKx{zq#&o~mU^tuw= ziRi(`E_$-TZwAlZF4nArXqu+KeX$1I$0=n;^wzLrAak_#KU=BV;g6-&+t*q@XE`)k zWB;4j$Q}HcsD=7>;U_eRrKNpQej;9Q)_m`*21_5^vu4GfQ+!^#Ih^j6`AdARrE~-u zKnI}($3d`73-te#@6Uqx&apAS;#aVF@2b{S9GAo1{9F!I{L0$F#*qEi8elqS^B%`X zyqeL4FPMk(1sipr$v0Z6d}6(jIhsAeqV<`8hUf>0Q5Ja(;nkx(4^$gI~*(xpmC$KVDWfom`T#)dc~R#4I^Rs~r4O)` window.nickname = "$nickname"; window.linkURL = "$linkurl"; - var plaintext = "$editselect"; + var none = "none"; // ugly hack: $editselect shouldn't be a string if TinyMCE is enabled, but should if it isn't + window.editSelect = $editselect; window.ajaxType = 'msg-header'; window.autocompleteType = 'msg-header'; diff --git a/view/theme/frost/nav.tpl b/view/theme/frost/nav.tpl index e25f9a1219..ffa4b2fbcf 100644 --- a/view/theme/frost/nav.tpl +++ b/view/theme/frost/nav.tpl @@ -7,10 +7,10 @@