]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Remove hardcoded #notice_action-submit from JS/CSS (prep for reusable notice forms)
authorBrion Vibber <brion@pobox.com>
Fri, 4 Mar 2011 01:48:16 +0000 (17:48 -0800)
committerBrion Vibber <brion@pobox.com>
Fri, 4 Mar 2011 01:48:16 +0000 (17:48 -0800)
26 files changed:
js/util.js
js/util.min.js
plugins/MobileProfile/mp-screen.css
theme/base/css/display.css
theme/base/css/ie.css
theme/biz/css/base.css
theme/clean/css/display.css
theme/clean/css/ie.css
theme/clean/css/mp-screen.css
theme/cleaner/css/display.css
theme/cleaner/css/ie.css
theme/cleaner/css/mp-screen.css
theme/cloudy/css/display.css
theme/cloudy/css/ie.css
theme/h4ck3r/css/base.css
theme/h4ck3r/css/display.css
theme/mnml/css/display.css
theme/mnml/css/ie.css
theme/mnml/css/mp-screen.css
theme/pigeonthoughts/css/base.css
theme/rebase/css/display.css
theme/rebase/css/ie.css
theme/shiny/css/display.css
theme/shiny/css/ie.css
theme/shiny/css/mp-screen.css
theme/victorian/css/mp-screen.css

index 72eaa16d10cc81c598fb04812054ae2a42dfb1e0..47b8bbe6caaef32bbdc2ab4dc297224a05defcd8 100644 (file)
@@ -51,7 +51,6 @@ var SN = { // StatusNet
             CommandResult: 'command_result',
             FormNotice: 'form_notice',
             NoticeInReplyTo: 'notice_in-reply-to',
-            NoticeActionSubmit: 'notice_action-submit',
             NoticeLat: 'notice_data-lat',
             NoticeLon: 'notice_data-lon',
             NoticeLocationId: 'notice_data-location_id',
@@ -336,7 +335,7 @@ var SN = { // StatusNet
                     }
                     form
                         .addClass(SN.C.S.Processing)
-                        .find('#'+SN.C.S.NoticeActionSubmit)
+                        .find('.submit')
                             .addClass(SN.C.S.Disabled)
                             .attr(SN.C.S.Disabled, SN.C.S.Disabled);
 
@@ -347,7 +346,7 @@ var SN = { // StatusNet
                 error: function (xhr, textStatus, errorThrown) {
                     form
                         .removeClass(SN.C.S.Processing)
-                        .find('#'+SN.C.S.NoticeActionSubmit)
+                        .find('.submit')
                             .removeClass(SN.C.S.Disabled)
                             .removeAttr(SN.C.S.Disabled, SN.C.S.Disabled);
                     removeFeedback();
@@ -429,7 +428,7 @@ var SN = { // StatusNet
                 complete: function(xhr, textStatus) {
                     form
                         .removeClass(SN.C.S.Processing)
-                        .find('#'+SN.C.S.NoticeActionSubmit)
+                        .find('.submit')
                             .removeAttr(SN.C.S.Disabled)
                             .removeClass(SN.C.S.Disabled);
 
index 791d19f6e9e913540f6113ed3227a24653a2938c..556a8b795e786f626a7a02c3b96b9739aa05ae70 100644 (file)
@@ -1 +1 @@
-var SN={C:{I:{CounterBlackout:false,MaxLength:140,PatternUsername:/^[0-9a-zA-Z\-_.]*$/,HTTP20x30x:[200,201,202,203,204,205,206,300,301,302,303,304,305,306,307]},S:{Disabled:"disabled",Warning:"warning",Error:"error",Success:"success",Processing:"processing",CommandResult:"command_result",FormNotice:"form_notice",NoticeInReplyTo:"notice_in-reply-to",NoticeActionSubmit:"notice_action-submit",NoticeLat:"notice_data-lat",NoticeLon:"notice_data-lon",NoticeLocationId:"notice_data-location_id",NoticeLocationNs:"notice_data-location_ns",NoticeGeoName:"notice_data-geo_name",NoticeDataGeo:"notice_data-geo",NoticeDataGeoCookie:"NoticeDataGeo",NoticeDataGeoSelected:"notice_data-geo_selected",StatusNetInstance:"StatusNetInstance"}},messages:{},msg:function(a){if(typeof SN.messages[a]=="undefined"){return"["+a+"]"}else{return SN.messages[a]}},U:{FormNoticeEnhancements:function(b){if(jQuery.data(b[0],"ElementData")===undefined){MaxLength=b.find(".count").text();if(typeof(MaxLength)=="undefined"){MaxLength=SN.C.I.MaxLength}jQuery.data(b[0],"ElementData",{MaxLength:MaxLength});SN.U.Counter(b);NDT=b.find("[name=status_textarea]");NDT.bind("keyup",function(c){SN.U.Counter(b)});var a=function(c){window.setTimeout(function(){SN.U.Counter(b)},50)};NDT.bind("cut",a).bind("paste",a)}else{b.find(".count").text(jQuery.data(b[0],"ElementData").MaxLength)}},Counter:function(d){SN.C.I.FormNoticeCurrent=d;var b=jQuery.data(d[0],"ElementData").MaxLength;if(b<=0){return}var c=b-SN.U.CharacterCount(d);var a=d.find(".count");if(c.toString()!=a.text()){if(!SN.C.I.CounterBlackout||c===0){if(a.text()!=String(c)){a.text(c)}if(c<0){d.addClass(SN.C.S.Warning)}else{d.removeClass(SN.C.S.Warning)}if(!SN.C.I.CounterBlackout){SN.C.I.CounterBlackout=true;SN.C.I.FormNoticeCurrent=d;window.setTimeout("SN.U.ClearCounterBlackout(SN.C.I.FormNoticeCurrent);",500)}}}},CharacterCount:function(a){return a.find("[name=status_textarea]").val().length},ClearCounterBlackout:function(a){SN.C.I.CounterBlackout=false;SN.U.Counter(a)},RewriteAjaxAction:function(a){if(document.location.protocol=="https:"&&a.substr(0,5)=="http:"){return a.replace(/^http:\/\/[^:\/]+/,"https://"+document.location.host)}else{return a}},FormXHR:function(a){$.ajax({type:"POST",dataType:"xml",url:SN.U.RewriteAjaxAction(a.attr("action")),data:a.serialize()+"&ajax=1",beforeSend:function(b){a.addClass(SN.C.S.Processing).find(".submit").addClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,SN.C.S.Disabled)},error:function(c,d,b){alert(b||d)},success:function(b,c){if(typeof($("form",b)[0])!="undefined"){form_new=document._importNode($("form",b)[0],true);a.replaceWith(form_new)}else{a.replaceWith(document._importNode($("p",b)[0],true))}}})},FormNoticeXHR:function(b){SN.C.I.NoticeDataGeo={};b.append('<input type="hidden" name="ajax" value="1"/>');b.attr("action",SN.U.RewriteAjaxAction(b.attr("action")));var c=function(d,e){b.append($('<p class="form_response"></p>').addClass(d).text(e))};var a=function(){b.find(".form_response").remove()};b.ajaxForm({dataType:"xml",timeout:"60000",beforeSend:function(d){if(b.find("[name=status_textarea]").val()==""){b.addClass(SN.C.S.Warning);return false}b.addClass(SN.C.S.Processing).find("#"+SN.C.S.NoticeActionSubmit).addClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,SN.C.S.Disabled);SN.U.normalizeGeoData(b);return true},error:function(f,g,e){b.removeClass(SN.C.S.Processing).find("#"+SN.C.S.NoticeActionSubmit).removeClass(SN.C.S.Disabled).removeAttr(SN.C.S.Disabled,SN.C.S.Disabled);a();if(g=="timeout"){c("error","Sorry! We had trouble sending your notice. The servers are overloaded. Please try again, and contact the site administrator if this problem persists.")}else{var d=SN.U.GetResponseXML(f);if($("."+SN.C.S.Error,d).length>0){b.append(document._importNode($("."+SN.C.S.Error,d)[0],true))}else{if(parseInt(f.status)===0||jQuery.inArray(parseInt(f.status),SN.C.I.HTTP20x30x)>=0){b.resetForm().find(".attach-status").remove();SN.U.FormNoticeEnhancements(b)}else{c("error","(Sorry! We had trouble sending your notice ("+f.status+" "+f.statusText+"). Please report the problem to the site administrator if this happens again.")}}}},success:function(i,k){a();var e=$("#"+SN.C.S.Error,i);if(e.length>0){c("error",e.text())}else{if($("body")[0].id=="bookmarklet"){self.close()}var d=$("#"+SN.C.S.CommandResult,i);if(d.length>0){c("success",d.text())}else{var h=document._importNode($("li",i)[0],true);var j=$("#notices_primary .notices:first");if(j.length>0&&SN.U.belongsOnTimeline(h)){if($("#"+h.id).length===0){var f=$("#"+SN.C.S.NoticeInReplyTo).val();var g="#notices_primary #notice-"+f;if($("body")[0].id=="conversation"){if(f.length>0&&$(g+" .notices").length<1){$(g).append('<ul class="notices"></ul>')}$($(g+" .notices")[0]).append(h)}else{j.prepend(h)}$("#"+h.id).css({display:"none"}).fadeIn(2500);SN.U.NoticeWithAttachment($("#"+h.id));SN.U.NoticeReplyTo($("#"+h.id))}}else{c("success",$("title",i).text())}}b.resetForm();b.find("[name=inreplyto]").val("");b.find(".attach-status").remove();SN.U.FormNoticeEnhancements(b)}},complete:function(d,e){b.removeClass(SN.C.S.Processing).find("#"+SN.C.S.NoticeActionSubmit).removeAttr(SN.C.S.Disabled).removeClass(SN.C.S.Disabled);b.find("[name=lat]").val(SN.C.I.NoticeDataGeo.NLat);b.find("[name=lon]").val(SN.C.I.NoticeDataGeo.NLon);b.find("[name=location_ns]").val(SN.C.I.NoticeDataGeo.NLNS);b.find("[name=location_id]").val(SN.C.I.NoticeDataGeo.NLID);$("#"+SN.C.S.NoticeDataGeo).attr("checked",SN.C.I.NoticeDataGeo.NDG)}})},normalizeGeoData:function(a){SN.C.I.NoticeDataGeo.NLat=a.find("[name=lat]").val();SN.C.I.NoticeDataGeo.NLon=a.find("[name=lon]").val();SN.C.I.NoticeDataGeo.NLNS=a.find("[name=location_ns]").val();SN.C.I.NoticeDataGeo.NLID=a.find("[name=location_id]").val();SN.C.I.NoticeDataGeo.NDG=$("#"+SN.C.S.NoticeDataGeo).attr("checked");var b=$.cookie(SN.C.S.NoticeDataGeoCookie);if(b!==null&&b!="disabled"){b=JSON.parse(b);SN.C.I.NoticeDataGeo.NLat=a.find("[name=lat]").val(b.NLat).val();SN.C.I.NoticeDataGeo.NLon=a.find("[name=lon]").val(b.NLon).val();if(b.NLNS){SN.C.I.NoticeDataGeo.NLNS=a.find("[name=location_ns]").val(b.NLNS).val();SN.C.I.NoticeDataGeo.NLID=a.find("[name=location_id]").val(b.NLID).val()}else{a.find("[name=location_ns]").val("");a.find("[name=location_id]").val("")}}if(b=="disabled"){SN.C.I.NoticeDataGeo.NDG=$("#"+SN.C.S.NoticeDataGeo).attr("checked",false).attr("checked")}else{SN.C.I.NoticeDataGeo.NDG=$("#"+SN.C.S.NoticeDataGeo).attr("checked",true).attr("checked")}},GetResponseXML:function(b){try{return b.responseXML}catch(a){return(new DOMParser()).parseFromString(b.responseText,"text/xml")}},NoticeReply:function(){if($("#content .notice_reply").length>0){$("#content .notice").each(function(){SN.U.NoticeReplyTo($(this))})}},NoticeReplyTo:function(a){a.find(".notice_reply").live("click",function(c){c.preventDefault();var b=($(".author .nickname",a).length>0)?$($(".author .nickname",a)[0]):$(".author .nickname.uid");SN.U.NoticeInlineReplyTrigger(a,"@"+b.text());return false})},NoticeInlineReplyTrigger:function(h,i){var c=$($(".notice_id",h)[0]).text();var d=h;var f=h.closest(".notices");if(f.hasClass("threaded-replies")){d=f.closest(".notice")}else{f=$("ul.threaded-replies",h);if(f.length==0){f=$('<ul class="notices threaded-replies xoxo"></ul>');h.append(f)}}var k=$(".notice-reply-form",f);if(k.length==0){$("li.notice-reply-placeholder").remove();var g=$("li.notice-reply",f);if(g.length==0){g=$('<li class="notice-reply"><form class="notice-reply-form" method="post"><textarea name="status_textarea"></textarea><div class="controls"><input type="hidden" name="token"><input type="hidden" name="inreplyto"><input type="submit" class="submit"></div></form></li>');var b=$("#form_notice");k=g.find("form");k.attr("action",b.attr("action"));k.find('input[name="token"]').val(b.find("input[name=token]").val());k.find('input[type="submit"]').val(SN.msg("reply_submit"));f.append(g);k.find("textarea").blur(function(){var m=$(this);var l=$.trim(m.val());if(l==""||l==m.data("initialText")){g.remove();if(f.find("li").length>0){SN.U.NoticeInlineReplyPlaceholder(d)}else{f.remove()}}});k.submit(function(m){var l=k;$.ajax({type:"POST",dataType:"xml",url:SN.U.RewriteAjaxAction(l.attr("action")),data:l.serialize()+"&ajax=1",beforeSend:function(n){l.addClass(SN.C.S.Processing).find(".submit").addClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,SN.C.S.Disabled).end().find("textarea").addClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,SN.C.S.Disabled)},error:function(o,p,n){alert(n||p)},success:function(p,r){var o=$("li",p)[0];if(o){var n=document._importNode(o,true);var q=$(n).attr("id");if($("#"+q).length==0){g.replaceWith(n);SN.U.NoticeInlineReplyPlaceholder(d)}else{g.remove()}}}});m.preventDefault();return false})}}k.find("input[name=inreplyto]").val(c);var j=k.find("textarea");if(j.length==0){throw"No textarea"}var a="";if(i){a=i+" "}j.val(a+j.val().replace(RegExp(a,"i"),""));j.data("initialText",$.trim(i+""));j.focus();if(j[0].setSelectionRange){var e=j.val().length;j[0].setSelectionRange(e,e)}},NoticeFavor:function(){$(".form_favor").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_disfavor").live("click",function(){SN.U.FormXHR($(this));return false})},NoticeInlineReplyPlaceholder:function(b){var a=b.find("ul.threaded-replies");var c=$('<li class="notice-reply-placeholder"><input class="placeholder"></li>');c.click(function(){SN.U.NoticeInlineReplyTrigger(b)});c.find("input").val(SN.msg("reply_placeholder"));a.append(c)},NoticeInlineReplySetup:function(){$(".threaded-replies").each(function(){var b=$(this);var a=b.closest(".notice");SN.U.NoticeInlineReplyPlaceholder(a)})},NoticeRepeat:function(){$(".form_repeat").live("click",function(a){a.preventDefault();SN.U.NoticeRepeatConfirmation($(this));return false})},NoticeRepeatConfirmation:function(a){var c=a.find(".submit");var b=c.clone();b.addClass("submit_dialogbox").removeClass("submit");a.append(b);b.bind("click",function(){SN.U.FormXHR(a);return false});c.hide();a.addClass("dialogbox").append('<button class="close">&#215;</button>').closest(".notice-options").addClass("opaque");a.find("button.close").click(function(){$(this).remove();a.removeClass("dialogbox").closest(".notice-options").removeClass("opaque");a.find(".submit_dialogbox").remove();a.find(".submit").show();return false})},NoticeAttachments:function(){$(".notice a.attachment").each(function(){SN.U.NoticeWithAttachment($(this).closest(".notice"))})},NoticeWithAttachment:function(b){if(b.find(".attachment").length===0){return}var a=b.find(".attachment.more");if(a.length>0){$(a[0]).click(function(){var c=$(this);c.addClass(SN.C.S.Processing);$.get(c.attr("href")+"/ajax",null,function(d){c.parent(".entry-content").html($(d).find("#attachment_view .entry-content").html())});return false}).attr("title",SN.msg("showmore_tooltip"))}},NoticeDataAttach:function(b){var a=b.find("input[type=file]");a.change(function(f){b.find(".attach-status").remove();var d=$(this).val();if(!d){return false}var c=$('<div class="attach-status '+SN.C.S.Success+'"><code></code> <button class="close">&#215;</button></div>');c.find("code").text(d);c.find("button").click(function(){c.remove();a.val("");return false});b.append(c);if(typeof this.files=="object"){for(var e=0;e<this.files.length;e++){SN.U.PreviewAttach(b,this.files[e])}}})},maxFileSize:function(b){var a=$(b).find("input[name=MAX_FILE_SIZE]").attr("value");if(a){return parseInt(a)}else{return 0}},PreviewAttach:function(d,c){var e=c.type+" "+Math.round(c.size/1024)+"KB";var f=true;var h;if(typeof window.createObjectURL!="undefined"){h=function(i,j){j(window.createObjectURL(i))}}else{if(typeof window.FileReader!="undefined"){h=function(j,k){var i=new FileReader();i.onload=function(l){k(i.result)};i.readAsDataURL(j)}}else{f=false}}var a=["image/png","image/jpeg","image/gif","image/svg+xml"];if($.inArray(c.type,a)==-1){f=false}var g=8*1024*1024;if(c.size>g){f=false}if(f){h(c,function(j){var i=$("<img>").attr("title",e).attr("alt",e).attr("src",j).attr("style","height: 120px");d.find(".attach-status").append(i)})}else{var b=$("<div></div>").text(e);d.find(".attach-status").append(b)}},NoticeLocationAttach:function(){var c=$("#"+SN.C.S.NoticeLat).val();var h=$("#"+SN.C.S.NoticeLon).val();var d=$("#"+SN.C.S.NoticeLocationNs).val();var i=$("#"+SN.C.S.NoticeLocationId).val();var a=$("#"+SN.C.S.NoticeGeoName).text();var b=$("#"+SN.C.S.NoticeDataGeo);function e(k){$("label[for="+SN.C.S.NoticeDataGeo+"]").attr("title",jQuery.trim($("label[for="+SN.C.S.NoticeDataGeo+"]").text())).removeClass("checked");$(".form_notice [name=lat]").val("");$(".form_notice [name=lon]").val("");$(".form_notice [name=location_ns]").val("");$(".form_notice [name=location_id]").val("");$("#"+SN.C.S.NoticeDataGeo).attr("checked",false);$.cookie(SN.C.S.NoticeDataGeoCookie,"disabled",{path:"/"});if(k){$(".geo_status_wrapper").removeClass("success").addClass("error");$(".geo_status_wrapper .geo_status").text(k)}else{$(".geo_status_wrapper").remove()}}function j(k,l){SN.U.NoticeGeoStatus("Looking up place name...");$.getJSON(k,l,function(m){var n,o;if(typeof(m.location_ns)!="undefined"){$("#"+SN.C.S.NoticeLocationNs).val(m.location_ns);n=m.location_ns}if(typeof(m.location_id)!="undefined"){$("#"+SN.C.S.NoticeLocationId).val(m.location_id);o=m.location_id}if(typeof(m.name)=="undefined"){NLN_text=l.lat+";"+l.lon}else{NLN_text=m.name}SN.U.NoticeGeoStatus(NLN_text,l.lat,l.lon,m.url);$("label[for="+SN.C.S.NoticeDataGeo+"]").attr("title",NoticeDataGeo_text.ShareDisable+" ("+NLN_text+")");$(".form_notice [name=lat]").val(l.lat);$(".form_notice [name=lon]").val(l.lon);$(".form_notice [name=location_ns]").val(n);$(".form_notice [name=location_id]").val(o);$("#"+SN.C.S.NoticeDataGeo).attr("checked",true);var p={NLat:l.lat,NLon:l.lon,NLNS:n,NLID:o,NLN:NLN_text,NLNU:m.url,NDG:true};$.cookie(SN.C.S.NoticeDataGeoCookie,JSON.stringify(p),{path:"/"})})}if(b.length>0){if($.cookie(SN.C.S.NoticeDataGeoCookie)=="disabled"){b.attr("checked",false)}else{b.attr("checked",true)}var f=$("#notice_data-geo_wrap");var g=f.attr("title");f.removeAttr("title");$("label[for="+SN.C.S.NoticeDataGeo+"]").attr("title",jQuery.trim($("label[for="+SN.C.S.NoticeDataGeo+"]").text()));b.change(function(){if($("#"+SN.C.S.NoticeDataGeo).attr("checked")===true||$.cookie(SN.C.S.NoticeDataGeoCookie)===null){$("label[for="+SN.C.S.NoticeDataGeo+"]").attr("title",NoticeDataGeo_text.ShareDisable).addClass("checked");if($.cookie(SN.C.S.NoticeDataGeoCookie)===null||$.cookie(SN.C.S.NoticeDataGeoCookie)=="disabled"){if(navigator.geolocation){SN.U.NoticeGeoStatus("Requesting location from browser...");navigator.geolocation.getCurrentPosition(function(m){$(".form_notice [name=lat]").val(m.coords.latitude);$(".form_notice [name=lon]").val(m.coords.longitude);var n={lat:m.coords.latitude,lon:m.coords.longitude,token:$("#token").val()};j(g,n)},function(m){switch(m.code){case m.PERMISSION_DENIED:e("Location permission denied.");break;case m.TIMEOUT:e("Location lookup timeout.");break}},{timeout:10000})}else{if(c.length>0&&h.length>0){var k={lat:c,lon:h,token:$("#token").val()};j(g,k)}else{e();$("#"+SN.C.S.NoticeDataGeo).remove();$("label[for="+SN.C.S.NoticeDataGeo+"]").remove()}}}else{var l=JSON.parse($.cookie(SN.C.S.NoticeDataGeoCookie));$(".form_notice [name=lat]").val(l.NLat);$(".form_notice [name=lon]").val(l.NLon);$(".form_notice [name=location_ns]").val(l.NLNS);$(".form_notice [name=location_id]").val(l.NLID);$("#"+SN.C.S.NoticeDataGeo).attr("checked",l.NDG);SN.U.NoticeGeoStatus(l.NLN,l.NLat,l.NLon,l.NLNU);$("label[for="+SN.C.S.NoticeDataGeo+"]").attr("title",NoticeDataGeo_text.ShareDisable+" ("+l.NLN+")").addClass("checked")}}else{e()}}).change()}},NoticeGeoStatus:function(a,f,g,c){var e=$("#form_notice");var h=e.find(".geo_status_wrapper");if(h.length==0){h=$('<div class="'+SN.C.S.Success+' geo_status_wrapper"><button class="close" style="float:right">&#215;</button><div class="geo_status"></div></div>');h.find("button.close").click(function(){$("#"+SN.C.S.NoticeDataGeo).removeAttr("checked").change()});e.append(h)}var b;if(c){b=$("<a></a>").attr("href",c)}else{b=$("<span></span>")}b.text(a);if(f||g){var d=f+";"+g;b.attr("title",d);if(!a){b.text(d)}}h.find(".geo_status").empty().append(b)},NewDirectMessage:function(){NDM=$(".entity_send-a-message a");NDM.attr({href:NDM.attr("href")+"&ajax=1"});NDM.bind("click",function(){var a=$(".entity_send-a-message form");if(a.length===0){$(this).addClass(SN.C.S.Processing);$.get(NDM.attr("href"),null,function(b){$(".entity_send-a-message").append(document._importNode($("form",b)[0],true));a=$(".entity_send-a-message .form_notice");SN.U.FormNoticeXHR(a);SN.U.FormNoticeEnhancements(a);a.append('<button class="close">&#215;</button>');$(".entity_send-a-message button").click(function(){a.hide();return false});NDM.removeClass(SN.C.S.Processing)})}else{a.show();$(".entity_send-a-message textarea").focus()}return false})},GetFullYear:function(c,d,a){var b=new Date();b.setFullYear(c,d,a);return b},StatusNetInstance:{Set:function(b){var a=SN.U.StatusNetInstance.Get();if(a!==null){b=$.extend(a,b)}$.cookie(SN.C.S.StatusNetInstance,JSON.stringify(b),{path:"/",expires:SN.U.GetFullYear(2029,0,1)})},Get:function(){var a=$.cookie(SN.C.S.StatusNetInstance);if(a!==null){return JSON.parse(a)}return null},Delete:function(){$.cookie(SN.C.S.StatusNetInstance,null)}},belongsOnTimeline:function(b){var a=$("body").attr("id");if(a=="public"){return true}var c=$("#nav_profile a").attr("href");if(c){var d=$(b).find(".entry-title .author a.url").attr("href");if(d==c){if(a=="all"||a=="showstream"){return true}}}return false}},Init:{NoticeForm:function(){if($("body.user_in").length>0){SN.U.NoticeLocationAttach();$("."+SN.C.S.FormNotice).each(function(){SN.U.FormNoticeXHR($(this));SN.U.FormNoticeEnhancements($(this));SN.U.NoticeDataAttach($(this))})}},Notices:function(){if($("body.user_in").length>0){SN.U.NoticeFavor();SN.U.NoticeRepeat();SN.U.NoticeReply();SN.U.NoticeInlineReplySetup()}SN.U.NoticeAttachments()},EntityActions:function(){if($("body.user_in").length>0){$(".form_user_subscribe").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_user_unsubscribe").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_group_join").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_group_leave").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_user_nudge").live("click",function(){SN.U.FormXHR($(this));return false});SN.U.NewDirectMessage()}},Login:function(){if(SN.U.StatusNetInstance.Get()!==null){var a=SN.U.StatusNetInstance.Get().Nickname;if(a!==null){$("#form_login #nickname").val(a)}}$("#form_login").bind("submit",function(){SN.U.StatusNetInstance.Set({Nickname:$("#form_login #nickname").val()});return true})},UploadForms:function(){$("input[type=file]").change(function(d){if(typeof this.files=="object"&&this.files.length>0){var c=0;for(var b=0;b<this.files.length;b++){c+=this.files[b].size}var a=SN.U.maxFileSize($(this.form));if(a>0&&c>a){var e="File too large: maximum upload size is %d bytes.";alert(e.replace("%d",a));$(this).val("");d.preventDefault();return false}}})}}};$(document).ready(function(){SN.Init.UploadForms();if($("."+SN.C.S.FormNotice).length>0){SN.Init.NoticeForm()}if($("#content .notices").length>0){SN.Init.Notices()}if($("#content .entity_actions").length>0){SN.Init.EntityActions()}if($("#form_login").length>0){SN.Init.Login()}});if(!document.ELEMENT_NODE){document.ELEMENT_NODE=1;document.ATTRIBUTE_NODE=2;document.TEXT_NODE=3;document.CDATA_SECTION_NODE=4;document.ENTITY_REFERENCE_NODE=5;document.ENTITY_NODE=6;document.PROCESSING_INSTRUCTION_NODE=7;document.COMMENT_NODE=8;document.DOCUMENT_NODE=9;document.DOCUMENT_TYPE_NODE=10;document.DOCUMENT_FRAGMENT_NODE=11;document.NOTATION_NODE=12}document._importNode=function(e,a){switch(e.nodeType){case document.ELEMENT_NODE:var d=document.createElement(e.nodeName);if(e.attributes&&e.attributes.length>0){for(var c=0,b=e.attributes.length;c<b;){if(e.attributes[c].nodeName=="class"){d.className=e.getAttribute(e.attributes[c++].nodeName)}else{d.setAttribute(e.attributes[c].nodeName,e.getAttribute(e.attributes[c++].nodeName))}}}if(a&&e.childNodes&&e.childNodes.length>0){for(var c=0,b=e.childNodes.length;c<b;){d.appendChild(document._importNode(e.childNodes[c++],a))}}return d;break;case document.TEXT_NODE:case document.CDATA_SECTION_NODE:case document.COMMENT_NODE:return document.createTextNode(e.nodeValue);break}};if(typeof navigator.geolocation=="undefined"||navigator.geolocation.shim){(function(){(function(){if(window.google&&google.gears){return}var c=null;if(typeof GearsFactory!="undefined"){c=new GearsFactory()}else{try{c=new ActiveXObject("Gears.Factory");if(c.getBuildInfo().indexOf("ie_mobile")!=-1){c.privateSetGlobalObject(this)}}catch(d){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){c=document.createElement("object");c.style.display="none";c.width=0;c.height=0;c.type="application/x-googlegears";document.documentElement.appendChild(c)}}}if(!c){return}if(!window.google){google={}}if(!google.gears){google.gears={factory:c}}})();var a=(function(){var d=google.gears.factory.create("beta.geolocation");var c=function(f,e){return function(g){f(g);e.lastPosition=g}};return{shim:true,type:"Gears",lastPosition:null,getCurrentPosition:function(e,g,h){var f=this;var i=c(e,f);d.getCurrentPosition(i,g,h)},watchPosition:function(e,f,g){d.watchPosition(e,f,g)},clearWatch:function(e){d.clearWatch(e)},getPermission:function(g,e,f){d.getPermission(g,e,f)}}});var b=(function(){var i=false;var e=function(){if(!d()&&!i){i=true;var j=document.createElement("script");j.src=(document.location.protocol=="https:"?"https://":"http://")+"www.google.com/jsapi?callback=_google_loader_apiLoaded";j.type="text/javascript";document.getElementsByTagName("body")[0].appendChild(j)}};var c=[];var h=function(j){c.push(j)};var f=function(){if(d()){while(c.length>0){var j=c.pop();j()}}};window._google_loader_apiLoaded=function(){f()};var d=function(){return(window.google&&google.loader)};var g=function(j){if(d()){return true}h(j);e();return false};e();return{shim:true,type:"ClientLocation",lastPosition:null,getCurrentPosition:function(k,n,o){var m=this;if(!g(function(){m.getCurrentPosition(k,n,o)})){return}if(google.loader.ClientLocation){var l=google.loader.ClientLocation;var j={coords:{latitude:l.latitude,longitude:l.longitude,altitude:null,accuracy:43000,altitudeAccuracy:null,heading:null,speed:null},address:{city:l.address.city,country:l.address.country,country_code:l.address.country_code,region:l.address.region},timestamp:new Date()};k(j);this.lastPosition=j}else{if(n==="function"){n({code:3,message:"Using the Google ClientLocation API and it is not able to calculate a location."})}}},watchPosition:function(j,l,m){this.getCurrentPosition(j,l,m);var k=this;var n=setInterval(function(){k.getCurrentPosition(j,l,m)},10000);return n},clearWatch:function(j){clearInterval(j)},getPermission:function(l,j,k){return true}}});navigator.geolocation=(window.google&&google.gears)?a():b()})()};
\ No newline at end of file
+var SN={C:{I:{CounterBlackout:false,MaxLength:140,PatternUsername:/^[0-9a-zA-Z\-_.]*$/,HTTP20x30x:[200,201,202,203,204,205,206,300,301,302,303,304,305,306,307]},S:{Disabled:"disabled",Warning:"warning",Error:"error",Success:"success",Processing:"processing",CommandResult:"command_result",FormNotice:"form_notice",NoticeInReplyTo:"notice_in-reply-to",NoticeLat:"notice_data-lat",NoticeLon:"notice_data-lon",NoticeLocationId:"notice_data-location_id",NoticeLocationNs:"notice_data-location_ns",NoticeGeoName:"notice_data-geo_name",NoticeDataGeo:"notice_data-geo",NoticeDataGeoCookie:"NoticeDataGeo",NoticeDataGeoSelected:"notice_data-geo_selected",StatusNetInstance:"StatusNetInstance"}},messages:{},msg:function(a){if(typeof SN.messages[a]=="undefined"){return"["+a+"]"}else{return SN.messages[a]}},U:{FormNoticeEnhancements:function(b){if(jQuery.data(b[0],"ElementData")===undefined){MaxLength=b.find(".count").text();if(typeof(MaxLength)=="undefined"){MaxLength=SN.C.I.MaxLength}jQuery.data(b[0],"ElementData",{MaxLength:MaxLength});SN.U.Counter(b);NDT=b.find("[name=status_textarea]");NDT.bind("keyup",function(c){SN.U.Counter(b)});var a=function(c){window.setTimeout(function(){SN.U.Counter(b)},50)};NDT.bind("cut",a).bind("paste",a)}else{b.find(".count").text(jQuery.data(b[0],"ElementData").MaxLength)}},Counter:function(d){SN.C.I.FormNoticeCurrent=d;var b=jQuery.data(d[0],"ElementData").MaxLength;if(b<=0){return}var c=b-SN.U.CharacterCount(d);var a=d.find(".count");if(c.toString()!=a.text()){if(!SN.C.I.CounterBlackout||c===0){if(a.text()!=String(c)){a.text(c)}if(c<0){d.addClass(SN.C.S.Warning)}else{d.removeClass(SN.C.S.Warning)}if(!SN.C.I.CounterBlackout){SN.C.I.CounterBlackout=true;SN.C.I.FormNoticeCurrent=d;window.setTimeout("SN.U.ClearCounterBlackout(SN.C.I.FormNoticeCurrent);",500)}}}},CharacterCount:function(a){return a.find("[name=status_textarea]").val().length},ClearCounterBlackout:function(a){SN.C.I.CounterBlackout=false;SN.U.Counter(a)},RewriteAjaxAction:function(a){if(document.location.protocol=="https:"&&a.substr(0,5)=="http:"){return a.replace(/^http:\/\/[^:\/]+/,"https://"+document.location.host)}else{return a}},FormXHR:function(a){$.ajax({type:"POST",dataType:"xml",url:SN.U.RewriteAjaxAction(a.attr("action")),data:a.serialize()+"&ajax=1",beforeSend:function(b){a.addClass(SN.C.S.Processing).find(".submit").addClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,SN.C.S.Disabled)},error:function(c,d,b){alert(b||d)},success:function(b,c){if(typeof($("form",b)[0])!="undefined"){form_new=document._importNode($("form",b)[0],true);a.replaceWith(form_new)}else{a.replaceWith(document._importNode($("p",b)[0],true))}}})},FormNoticeXHR:function(b){SN.C.I.NoticeDataGeo={};b.append('<input type="hidden" name="ajax" value="1"/>');b.attr("action",SN.U.RewriteAjaxAction(b.attr("action")));var c=function(d,e){b.append($('<p class="form_response"></p>').addClass(d).text(e))};var a=function(){b.find(".form_response").remove()};b.ajaxForm({dataType:"xml",timeout:"60000",beforeSend:function(d){if(b.find("[name=status_textarea]").val()==""){b.addClass(SN.C.S.Warning);return false}b.addClass(SN.C.S.Processing).find(".submit").addClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,SN.C.S.Disabled);SN.U.normalizeGeoData(b);return true},error:function(f,g,e){b.removeClass(SN.C.S.Processing).find(".submit").removeClass(SN.C.S.Disabled).removeAttr(SN.C.S.Disabled,SN.C.S.Disabled);a();if(g=="timeout"){c("error","Sorry! We had trouble sending your notice. The servers are overloaded. Please try again, and contact the site administrator if this problem persists.")}else{var d=SN.U.GetResponseXML(f);if($("."+SN.C.S.Error,d).length>0){b.append(document._importNode($("."+SN.C.S.Error,d)[0],true))}else{if(parseInt(f.status)===0||jQuery.inArray(parseInt(f.status),SN.C.I.HTTP20x30x)>=0){b.resetForm().find(".attach-status").remove();SN.U.FormNoticeEnhancements(b)}else{c("error","(Sorry! We had trouble sending your notice ("+f.status+" "+f.statusText+"). Please report the problem to the site administrator if this happens again.")}}}},success:function(i,k){a();var e=$("#"+SN.C.S.Error,i);if(e.length>0){c("error",e.text())}else{if($("body")[0].id=="bookmarklet"){self.close()}var d=$("#"+SN.C.S.CommandResult,i);if(d.length>0){c("success",d.text())}else{var h=document._importNode($("li",i)[0],true);var j=$("#notices_primary .notices:first");if(j.length>0&&SN.U.belongsOnTimeline(h)){if($("#"+h.id).length===0){var f=$("#"+SN.C.S.NoticeInReplyTo).val();var g="#notices_primary #notice-"+f;if($("body")[0].id=="conversation"){if(f.length>0&&$(g+" .notices").length<1){$(g).append('<ul class="notices"></ul>')}$($(g+" .notices")[0]).append(h)}else{j.prepend(h)}$("#"+h.id).css({display:"none"}).fadeIn(2500);SN.U.NoticeWithAttachment($("#"+h.id));SN.U.NoticeReplyTo($("#"+h.id))}}else{c("success",$("title",i).text())}}b.resetForm();b.find("[name=inreplyto]").val("");b.find(".attach-status").remove();SN.U.FormNoticeEnhancements(b)}},complete:function(d,e){b.removeClass(SN.C.S.Processing).find(".submit").removeAttr(SN.C.S.Disabled).removeClass(SN.C.S.Disabled);b.find("[name=lat]").val(SN.C.I.NoticeDataGeo.NLat);b.find("[name=lon]").val(SN.C.I.NoticeDataGeo.NLon);b.find("[name=location_ns]").val(SN.C.I.NoticeDataGeo.NLNS);b.find("[name=location_id]").val(SN.C.I.NoticeDataGeo.NLID);$("#"+SN.C.S.NoticeDataGeo).attr("checked",SN.C.I.NoticeDataGeo.NDG)}})},normalizeGeoData:function(a){SN.C.I.NoticeDataGeo.NLat=a.find("[name=lat]").val();SN.C.I.NoticeDataGeo.NLon=a.find("[name=lon]").val();SN.C.I.NoticeDataGeo.NLNS=a.find("[name=location_ns]").val();SN.C.I.NoticeDataGeo.NLID=a.find("[name=location_id]").val();SN.C.I.NoticeDataGeo.NDG=$("#"+SN.C.S.NoticeDataGeo).attr("checked");var b=$.cookie(SN.C.S.NoticeDataGeoCookie);if(b!==null&&b!="disabled"){b=JSON.parse(b);SN.C.I.NoticeDataGeo.NLat=a.find("[name=lat]").val(b.NLat).val();SN.C.I.NoticeDataGeo.NLon=a.find("[name=lon]").val(b.NLon).val();if(b.NLNS){SN.C.I.NoticeDataGeo.NLNS=a.find("[name=location_ns]").val(b.NLNS).val();SN.C.I.NoticeDataGeo.NLID=a.find("[name=location_id]").val(b.NLID).val()}else{a.find("[name=location_ns]").val("");a.find("[name=location_id]").val("")}}if(b=="disabled"){SN.C.I.NoticeDataGeo.NDG=$("#"+SN.C.S.NoticeDataGeo).attr("checked",false).attr("checked")}else{SN.C.I.NoticeDataGeo.NDG=$("#"+SN.C.S.NoticeDataGeo).attr("checked",true).attr("checked")}},GetResponseXML:function(b){try{return b.responseXML}catch(a){return(new DOMParser()).parseFromString(b.responseText,"text/xml")}},NoticeReply:function(){if($("#content .notice_reply").length>0){$("#content .notice").each(function(){SN.U.NoticeReplyTo($(this))})}},NoticeReplyTo:function(a){a.find(".notice_reply").live("click",function(c){c.preventDefault();var b=($(".author .nickname",a).length>0)?$($(".author .nickname",a)[0]):$(".author .nickname.uid");SN.U.NoticeInlineReplyTrigger(a,"@"+b.text());return false})},NoticeInlineReplyTrigger:function(h,i){var c=$($(".notice_id",h)[0]).text();var d=h;var f=h.closest(".notices");if(f.hasClass("threaded-replies")){d=f.closest(".notice")}else{f=$("ul.threaded-replies",h);if(f.length==0){f=$('<ul class="notices threaded-replies xoxo"></ul>');h.append(f)}}var k=$(".notice-reply-form",f);if(k.length==0){$("li.notice-reply-placeholder").remove();var g=$("li.notice-reply",f);if(g.length==0){g=$('<li class="notice-reply"><form class="notice-reply-form" method="post"><textarea name="status_textarea"></textarea><div class="controls"><input type="hidden" name="token"><input type="hidden" name="inreplyto"><input type="submit" class="submit"></div></form></li>');var b=$("#form_notice");k=g.find("form");k.attr("action",b.attr("action"));k.find('input[name="token"]').val(b.find("input[name=token]").val());k.find('input[type="submit"]').val(SN.msg("reply_submit"));f.append(g);k.find("textarea").blur(function(){var m=$(this);var l=$.trim(m.val());if(l==""||l==m.data("initialText")){g.remove();if(f.find("li").length>0){SN.U.NoticeInlineReplyPlaceholder(d)}else{f.remove()}}});k.submit(function(m){var l=k;$.ajax({type:"POST",dataType:"xml",url:SN.U.RewriteAjaxAction(l.attr("action")),data:l.serialize()+"&ajax=1",beforeSend:function(n){l.addClass(SN.C.S.Processing).find(".submit").addClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,SN.C.S.Disabled).end().find("textarea").addClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,SN.C.S.Disabled)},error:function(o,p,n){alert(n||p)},success:function(p,r){var o=$("li",p)[0];if(o){var n=document._importNode(o,true);var q=$(n).attr("id");if($("#"+q).length==0){g.replaceWith(n);SN.U.NoticeInlineReplyPlaceholder(d)}else{g.remove()}}}});m.preventDefault();return false})}}k.find("input[name=inreplyto]").val(c);var j=k.find("textarea");if(j.length==0){throw"No textarea"}var a="";if(i){a=i+" "}j.val(a+j.val().replace(RegExp(a,"i"),""));j.data("initialText",$.trim(i+""));j.focus();if(j[0].setSelectionRange){var e=j.val().length;j[0].setSelectionRange(e,e)}},NoticeFavor:function(){$(".form_favor").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_disfavor").live("click",function(){SN.U.FormXHR($(this));return false})},NoticeInlineReplyPlaceholder:function(b){var a=b.find("ul.threaded-replies");var c=$('<li class="notice-reply-placeholder"><input class="placeholder"></li>');c.click(function(){SN.U.NoticeInlineReplyTrigger(b)});c.find("input").val(SN.msg("reply_placeholder"));a.append(c)},NoticeInlineReplySetup:function(){$(".threaded-replies").each(function(){var b=$(this);var a=b.closest(".notice");SN.U.NoticeInlineReplyPlaceholder(a)})},NoticeRepeat:function(){$(".form_repeat").live("click",function(a){a.preventDefault();SN.U.NoticeRepeatConfirmation($(this));return false})},NoticeRepeatConfirmation:function(a){var c=a.find(".submit");var b=c.clone();b.addClass("submit_dialogbox").removeClass("submit");a.append(b);b.bind("click",function(){SN.U.FormXHR(a);return false});c.hide();a.addClass("dialogbox").append('<button class="close">&#215;</button>').closest(".notice-options").addClass("opaque");a.find("button.close").click(function(){$(this).remove();a.removeClass("dialogbox").closest(".notice-options").removeClass("opaque");a.find(".submit_dialogbox").remove();a.find(".submit").show();return false})},NoticeAttachments:function(){$(".notice a.attachment").each(function(){SN.U.NoticeWithAttachment($(this).closest(".notice"))})},NoticeWithAttachment:function(b){if(b.find(".attachment").length===0){return}var a=b.find(".attachment.more");if(a.length>0){$(a[0]).click(function(){var c=$(this);c.addClass(SN.C.S.Processing);$.get(c.attr("href")+"/ajax",null,function(d){c.parent(".entry-content").html($(d).find("#attachment_view .entry-content").html())});return false}).attr("title",SN.msg("showmore_tooltip"))}},NoticeDataAttach:function(b){var a=b.find("input[type=file]");a.change(function(f){b.find(".attach-status").remove();var d=$(this).val();if(!d){return false}var c=$('<div class="attach-status '+SN.C.S.Success+'"><code></code> <button class="close">&#215;</button></div>');c.find("code").text(d);c.find("button").click(function(){c.remove();a.val("");return false});b.append(c);if(typeof this.files=="object"){for(var e=0;e<this.files.length;e++){SN.U.PreviewAttach(b,this.files[e])}}})},maxFileSize:function(b){var a=$(b).find("input[name=MAX_FILE_SIZE]").attr("value");if(a){return parseInt(a)}else{return 0}},PreviewAttach:function(d,c){var e=c.type+" "+Math.round(c.size/1024)+"KB";var f=true;var h;if(typeof window.createObjectURL!="undefined"){h=function(i,j){j(window.createObjectURL(i))}}else{if(typeof window.FileReader!="undefined"){h=function(j,k){var i=new FileReader();i.onload=function(l){k(i.result)};i.readAsDataURL(j)}}else{f=false}}var a=["image/png","image/jpeg","image/gif","image/svg+xml"];if($.inArray(c.type,a)==-1){f=false}var g=8*1024*1024;if(c.size>g){f=false}if(f){h(c,function(j){var i=$("<img>").attr("title",e).attr("alt",e).attr("src",j).attr("style","height: 120px");d.find(".attach-status").append(i)})}else{var b=$("<div></div>").text(e);d.find(".attach-status").append(b)}},NoticeLocationAttach:function(){var c=$("#"+SN.C.S.NoticeLat).val();var h=$("#"+SN.C.S.NoticeLon).val();var d=$("#"+SN.C.S.NoticeLocationNs).val();var i=$("#"+SN.C.S.NoticeLocationId).val();var a=$("#"+SN.C.S.NoticeGeoName).text();var b=$("#"+SN.C.S.NoticeDataGeo);function e(k){$("label[for="+SN.C.S.NoticeDataGeo+"]").attr("title",jQuery.trim($("label[for="+SN.C.S.NoticeDataGeo+"]").text())).removeClass("checked");$(".form_notice [name=lat]").val("");$(".form_notice [name=lon]").val("");$(".form_notice [name=location_ns]").val("");$(".form_notice [name=location_id]").val("");$("#"+SN.C.S.NoticeDataGeo).attr("checked",false);$.cookie(SN.C.S.NoticeDataGeoCookie,"disabled",{path:"/"});if(k){$(".geo_status_wrapper").removeClass("success").addClass("error");$(".geo_status_wrapper .geo_status").text(k)}else{$(".geo_status_wrapper").remove()}}function j(k,l){SN.U.NoticeGeoStatus("Looking up place name...");$.getJSON(k,l,function(m){var n,o;if(typeof(m.location_ns)!="undefined"){$("#"+SN.C.S.NoticeLocationNs).val(m.location_ns);n=m.location_ns}if(typeof(m.location_id)!="undefined"){$("#"+SN.C.S.NoticeLocationId).val(m.location_id);o=m.location_id}if(typeof(m.name)=="undefined"){NLN_text=l.lat+";"+l.lon}else{NLN_text=m.name}SN.U.NoticeGeoStatus(NLN_text,l.lat,l.lon,m.url);$("label[for="+SN.C.S.NoticeDataGeo+"]").attr("title",NoticeDataGeo_text.ShareDisable+" ("+NLN_text+")");$(".form_notice [name=lat]").val(l.lat);$(".form_notice [name=lon]").val(l.lon);$(".form_notice [name=location_ns]").val(n);$(".form_notice [name=location_id]").val(o);$("#"+SN.C.S.NoticeDataGeo).attr("checked",true);var p={NLat:l.lat,NLon:l.lon,NLNS:n,NLID:o,NLN:NLN_text,NLNU:m.url,NDG:true};$.cookie(SN.C.S.NoticeDataGeoCookie,JSON.stringify(p),{path:"/"})})}if(b.length>0){if($.cookie(SN.C.S.NoticeDataGeoCookie)=="disabled"){b.attr("checked",false)}else{b.attr("checked",true)}var f=$("#notice_data-geo_wrap");var g=f.attr("title");f.removeAttr("title");$("label[for="+SN.C.S.NoticeDataGeo+"]").attr("title",jQuery.trim($("label[for="+SN.C.S.NoticeDataGeo+"]").text()));b.change(function(){if($("#"+SN.C.S.NoticeDataGeo).attr("checked")===true||$.cookie(SN.C.S.NoticeDataGeoCookie)===null){$("label[for="+SN.C.S.NoticeDataGeo+"]").attr("title",NoticeDataGeo_text.ShareDisable).addClass("checked");if($.cookie(SN.C.S.NoticeDataGeoCookie)===null||$.cookie(SN.C.S.NoticeDataGeoCookie)=="disabled"){if(navigator.geolocation){SN.U.NoticeGeoStatus("Requesting location from browser...");navigator.geolocation.getCurrentPosition(function(m){$(".form_notice [name=lat]").val(m.coords.latitude);$(".form_notice [name=lon]").val(m.coords.longitude);var n={lat:m.coords.latitude,lon:m.coords.longitude,token:$("#token").val()};j(g,n)},function(m){switch(m.code){case m.PERMISSION_DENIED:e("Location permission denied.");break;case m.TIMEOUT:e("Location lookup timeout.");break}},{timeout:10000})}else{if(c.length>0&&h.length>0){var k={lat:c,lon:h,token:$("#token").val()};j(g,k)}else{e();$("#"+SN.C.S.NoticeDataGeo).remove();$("label[for="+SN.C.S.NoticeDataGeo+"]").remove()}}}else{var l=JSON.parse($.cookie(SN.C.S.NoticeDataGeoCookie));$(".form_notice [name=lat]").val(l.NLat);$(".form_notice [name=lon]").val(l.NLon);$(".form_notice [name=location_ns]").val(l.NLNS);$(".form_notice [name=location_id]").val(l.NLID);$("#"+SN.C.S.NoticeDataGeo).attr("checked",l.NDG);SN.U.NoticeGeoStatus(l.NLN,l.NLat,l.NLon,l.NLNU);$("label[for="+SN.C.S.NoticeDataGeo+"]").attr("title",NoticeDataGeo_text.ShareDisable+" ("+l.NLN+")").addClass("checked")}}else{e()}}).change()}},NoticeGeoStatus:function(a,f,g,c){var e=$("#form_notice");var h=e.find(".geo_status_wrapper");if(h.length==0){h=$('<div class="'+SN.C.S.Success+' geo_status_wrapper"><button class="close" style="float:right">&#215;</button><div class="geo_status"></div></div>');h.find("button.close").click(function(){$("#"+SN.C.S.NoticeDataGeo).removeAttr("checked").change()});e.append(h)}var b;if(c){b=$("<a></a>").attr("href",c)}else{b=$("<span></span>")}b.text(a);if(f||g){var d=f+";"+g;b.attr("title",d);if(!a){b.text(d)}}h.find(".geo_status").empty().append(b)},NewDirectMessage:function(){NDM=$(".entity_send-a-message a");NDM.attr({href:NDM.attr("href")+"&ajax=1"});NDM.bind("click",function(){var a=$(".entity_send-a-message form");if(a.length===0){$(this).addClass(SN.C.S.Processing);$.get(NDM.attr("href"),null,function(b){$(".entity_send-a-message").append(document._importNode($("form",b)[0],true));a=$(".entity_send-a-message .form_notice");SN.U.FormNoticeXHR(a);SN.U.FormNoticeEnhancements(a);a.append('<button class="close">&#215;</button>');$(".entity_send-a-message button").click(function(){a.hide();return false});NDM.removeClass(SN.C.S.Processing)})}else{a.show();$(".entity_send-a-message textarea").focus()}return false})},GetFullYear:function(c,d,a){var b=new Date();b.setFullYear(c,d,a);return b},StatusNetInstance:{Set:function(b){var a=SN.U.StatusNetInstance.Get();if(a!==null){b=$.extend(a,b)}$.cookie(SN.C.S.StatusNetInstance,JSON.stringify(b),{path:"/",expires:SN.U.GetFullYear(2029,0,1)})},Get:function(){var a=$.cookie(SN.C.S.StatusNetInstance);if(a!==null){return JSON.parse(a)}return null},Delete:function(){$.cookie(SN.C.S.StatusNetInstance,null)}},belongsOnTimeline:function(b){var a=$("body").attr("id");if(a=="public"){return true}var c=$("#nav_profile a").attr("href");if(c){var d=$(b).find(".entry-title .author a.url").attr("href");if(d==c){if(a=="all"||a=="showstream"){return true}}}return false}},Init:{NoticeForm:function(){if($("body.user_in").length>0){SN.U.NoticeLocationAttach();$("."+SN.C.S.FormNotice).each(function(){SN.U.FormNoticeXHR($(this));SN.U.FormNoticeEnhancements($(this));SN.U.NoticeDataAttach($(this))})}},Notices:function(){if($("body.user_in").length>0){SN.U.NoticeFavor();SN.U.NoticeRepeat();SN.U.NoticeReply();SN.U.NoticeInlineReplySetup()}SN.U.NoticeAttachments()},EntityActions:function(){if($("body.user_in").length>0){$(".form_user_subscribe").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_user_unsubscribe").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_group_join").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_group_leave").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_user_nudge").live("click",function(){SN.U.FormXHR($(this));return false});SN.U.NewDirectMessage()}},Login:function(){if(SN.U.StatusNetInstance.Get()!==null){var a=SN.U.StatusNetInstance.Get().Nickname;if(a!==null){$("#form_login #nickname").val(a)}}$("#form_login").bind("submit",function(){SN.U.StatusNetInstance.Set({Nickname:$("#form_login #nickname").val()});return true})},UploadForms:function(){$("input[type=file]").change(function(d){if(typeof this.files=="object"&&this.files.length>0){var c=0;for(var b=0;b<this.files.length;b++){c+=this.files[b].size}var a=SN.U.maxFileSize($(this.form));if(a>0&&c>a){var e="File too large: maximum upload size is %d bytes.";alert(e.replace("%d",a));$(this).val("");d.preventDefault();return false}}})}}};$(document).ready(function(){SN.Init.UploadForms();if($("."+SN.C.S.FormNotice).length>0){SN.Init.NoticeForm()}if($("#content .notices").length>0){SN.Init.Notices()}if($("#content .entity_actions").length>0){SN.Init.EntityActions()}if($("#form_login").length>0){SN.Init.Login()}});if(!document.ELEMENT_NODE){document.ELEMENT_NODE=1;document.ATTRIBUTE_NODE=2;document.TEXT_NODE=3;document.CDATA_SECTION_NODE=4;document.ENTITY_REFERENCE_NODE=5;document.ENTITY_NODE=6;document.PROCESSING_INSTRUCTION_NODE=7;document.COMMENT_NODE=8;document.DOCUMENT_NODE=9;document.DOCUMENT_TYPE_NODE=10;document.DOCUMENT_FRAGMENT_NODE=11;document.NOTATION_NODE=12}document._importNode=function(e,a){switch(e.nodeType){case document.ELEMENT_NODE:var d=document.createElement(e.nodeName);if(e.attributes&&e.attributes.length>0){for(var c=0,b=e.attributes.length;c<b;){if(e.attributes[c].nodeName=="class"){d.className=e.getAttribute(e.attributes[c++].nodeName)}else{d.setAttribute(e.attributes[c].nodeName,e.getAttribute(e.attributes[c++].nodeName))}}}if(a&&e.childNodes&&e.childNodes.length>0){for(var c=0,b=e.childNodes.length;c<b;){d.appendChild(document._importNode(e.childNodes[c++],a))}}return d;break;case document.TEXT_NODE:case document.CDATA_SECTION_NODE:case document.COMMENT_NODE:return document.createTextNode(e.nodeValue);break}};if(typeof navigator.geolocation=="undefined"||navigator.geolocation.shim){(function(){(function(){if(window.google&&google.gears){return}var c=null;if(typeof GearsFactory!="undefined"){c=new GearsFactory()}else{try{c=new ActiveXObject("Gears.Factory");if(c.getBuildInfo().indexOf("ie_mobile")!=-1){c.privateSetGlobalObject(this)}}catch(d){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){c=document.createElement("object");c.style.display="none";c.width=0;c.height=0;c.type="application/x-googlegears";document.documentElement.appendChild(c)}}}if(!c){return}if(!window.google){google={}}if(!google.gears){google.gears={factory:c}}})();var a=(function(){var d=google.gears.factory.create("beta.geolocation");var c=function(f,e){return function(g){f(g);e.lastPosition=g}};return{shim:true,type:"Gears",lastPosition:null,getCurrentPosition:function(e,g,h){var f=this;var i=c(e,f);d.getCurrentPosition(i,g,h)},watchPosition:function(e,f,g){d.watchPosition(e,f,g)},clearWatch:function(e){d.clearWatch(e)},getPermission:function(g,e,f){d.getPermission(g,e,f)}}});var b=(function(){var i=false;var e=function(){if(!d()&&!i){i=true;var j=document.createElement("script");j.src=(document.location.protocol=="https:"?"https://":"http://")+"www.google.com/jsapi?callback=_google_loader_apiLoaded";j.type="text/javascript";document.getElementsByTagName("body")[0].appendChild(j)}};var c=[];var h=function(j){c.push(j)};var f=function(){if(d()){while(c.length>0){var j=c.pop();j()}}};window._google_loader_apiLoaded=function(){f()};var d=function(){return(window.google&&google.loader)};var g=function(j){if(d()){return true}h(j);e();return false};e();return{shim:true,type:"ClientLocation",lastPosition:null,getCurrentPosition:function(k,n,o){var m=this;if(!g(function(){m.getCurrentPosition(k,n,o)})){return}if(google.loader.ClientLocation){var l=google.loader.ClientLocation;var j={coords:{latitude:l.latitude,longitude:l.longitude,altitude:null,accuracy:43000,altitudeAccuracy:null,heading:null,speed:null},address:{city:l.address.city,country:l.address.country,country_code:l.address.country_code,region:l.address.region},timestamp:new Date()};k(j);this.lastPosition=j}else{if(n==="function"){n({code:3,message:"Using the Google ClientLocation API and it is not able to calculate a location."})}}},watchPosition:function(j,l,m){this.getCurrentPosition(j,l,m);var k=this;var n=setInterval(function(){k.getCurrentPosition(j,l,m)},10000);return n},clearWatch:function(j){clearInterval(j)},getPermission:function(l,j,k){return true}}});navigator.geolocation=(window.google&&google.gears)?a():b()})()};
\ No newline at end of file
index 4b9930584f1d1b8ac0ed055e10232e731b3f37f2..fcd88277e5a26d9f56598294b2f8adeba616e2d9 100644 (file)
@@ -121,7 +121,7 @@ background:none;
 opacity:1;
 }
 
-#form_notice #notice_action-submit {
+#form_notice .submit {
 width:20%;
 right:2%;
 text-align:center;
index f4a3a12b131a6d66457762a036714018a03eeb0b..3605a448c33a2cc1d16dd2130a621425b8307210 100644 (file)
@@ -626,7 +626,7 @@ font-weight:bold;
 line-height:1.15;
 padding:1px 2px;
 }
-.form_notice #notice_action-submit {
+.form_notice .submit {
 width:14%;
 height:47px;
 padding:0;
index 0a26f238b93bf61099758feebabc977329d3e9b2..b8b5e00bbc6bb66710921cc07039bbe12335cc29 100644 (file)
@@ -22,7 +22,7 @@ height:16px;
 width:16px;
 display:block;
 }
-.form_notice #notice_action-submit {
+.form_notice .submit {
 width:17%;
 max-width:17%;
 }
index d0c445f482761b69d4fd4256884005f60a2c7424..a92cc0b5ea2db7f4de1b54cba07fe43a638862e0 100644 (file)
@@ -495,7 +495,7 @@ font-weight:bold;
 line-height:1.15;
 padding:1px 2px;
 }
-#form_notice #notice_action-submit {
+#form_notice .submit {
 width:14%;
 height:47px;
 padding:0;
index 9cc8346fdf21c53bcca8d00c25b669f1aaec1488..36d05d1a5513026acbb4a41d0c9793fdd493d63d 100644 (file)
@@ -124,7 +124,7 @@ address {
     top: 52px;
 }
 
-.form_notice #notice_action-submit {
+.form_notice .submit {
     font-size: 0.9em;
     top: 80px;
     right:0;
index 9e26313b0e29d824739026c82dab418f1afea78e..7c8054b28c760270288afddf50985fd5e0baeb48 100644 (file)
@@ -18,7 +18,7 @@ display:block;
     left: 390px;
     top: 27px;
 }
-.form_notice #notice_action-submit {
+.form_notice .submit {
     width: 96px;
     max-width: 96px;
 }
index 4b19afd1171bef7325c7342aa4d06c677b78dc5b..35d8326a41779fb8b5153b6b0f4f38289e136e63 100644 (file)
@@ -107,7 +107,7 @@ background:none;
 opacity:1;
 }
 
-.form_notice #notice_action-submit {
+.form_notice .submit {
     text-align: center;
     left: 230px;
     top: 32px;
@@ -115,7 +115,7 @@ opacity:1;
     font-size: 0.8em;
 }
 
-#form_notice-direct.form_notice #notice_action-submit {
+#form_notice-direct.form_notice .submit {
     top: 62px;
 }
 
index 8d27c64732297257b5e1bfbdc54a463df4bac182..37de39be88dfb90d4673b2b2f79757acfa1bd518 100644 (file)
@@ -173,7 +173,7 @@ address {
     right: 86px;
 }
 
-.form_notice #notice_action-submit {
+.form_notice .submit {
     font-size: 0.9em;
     top: 80px;
        right: -2px;
@@ -409,7 +409,7 @@ div.entry-content a.response:after {
     border: 1px solid #7B4E82;
 }
 
-.entity_send-a-message .form_notice #notice_action-submit {
+.entity_send-a-message .form_notice .submit {
     color: #fff !important;
     top: 46px;
 }
@@ -589,7 +589,7 @@ padding-right:0;
     width: 325px !important;
 }
 
-.realtime-popup .form_notice #notice_action-submit {
+.realtime-popup .form_notice .submit {
     top: 59px !important;
     right: 6px !important;
 }
index af883e7b4fcdb556f8772c0d3d79b6fe26b409fa..8d9cf961dd76059d09cb5c9885fec306f6ee80a4 100644 (file)
@@ -18,7 +18,7 @@ display:block;
     left: 390px;
     top: 27px;
 }
-.form_notice #notice_action-submit {
+.form_notice .submit {
     width: 106px;
     max-width: 106px;
 }
index 22cc923e818c9ac9b8abdb3bcc909b3e135fa167..8b55e596feef240430d2e60c41ec0ca94f23edfa 100644 (file)
@@ -112,7 +112,7 @@ background:none;
 opacity:1;
 }
 
-.form_notice #notice_action-submit {
+.form_notice .submit {
     text-align: center;
     left: 230px;
     top: 32px;
@@ -120,7 +120,7 @@ opacity:1;
     font-size: 0.8em;
 }
 
-#form_notice-direct.form_notice #notice_action-submit {
+#form_notice-direct.form_notice .submit {
     top: 62px;
 }
 
index 814f879bc32a95f306fd9d34405a1d9493fdb63a..6347bab5479d375678e4bc2545b4b5b495daf623 100644 (file)
@@ -524,7 +524,7 @@ font-weight:bold;
 line-height:1.15;
 padding:1px 2px;
 }
-.form_notice #notice_action-submit {
+.form_notice .submit {
 width:14%;
 height:47px;
 padding:0;
@@ -1794,7 +1794,7 @@ background:transparent url(../../base/images/icons/twotone/green/clip-01.gif) no
 opacity:0;
 }
 
-#form_notice.processing #notice_action-submit {
+#form_notice.processing .submit {
 background:#fff url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%;
 cursor:wait;
 text-indent:-9999px;
index 03cfb23d3b2e2e15a99377b2106d0f5883377011..edddc16d88b11ff430e718247d1d60414dcbf356 100644 (file)
@@ -39,7 +39,7 @@ filter: alpha(opacity = 0);
 left:33.5%;
 }
 
-#form_notice #notice_action-submit {
+#form_notice .submit {
 right:0;
 }
 
index 22daceeba811343537e230baed28cc8a3c21f78a..d369a5ecdd98f691f67f7172f833da1264f70dbf 100644 (file)
@@ -447,7 +447,7 @@ font-weight:bold;
 line-height:1.15;
 padding:1px 2px;
 }
-#form_notice #notice_action-submit {
+#form_notice .submit {
 width:14%;
 height:47px;
 padding:0;
index 8bd5ad9f4ccda3bb2fbdea11b7d6e9312f0465f7..45d958bbea6563a9e8010785ab01730dc58cfd4c 100644 (file)
@@ -88,7 +88,7 @@ color:#0f0;
 #form_notice.warning .count {
 color:#000;
 }
-#form_notice.processing #notice_action-submit {
+#form_notice.processing .submit {
 background:#ccc url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%;
 cursor:wait;
 text-indent:-9999px;
index ee2cefe619f510166e57073824de22a25e32b15f..7ee72fc4d5a6df4cebc999dc74ecbc2ee4e06735 100644 (file)
@@ -969,7 +969,7 @@ font-family: 'TeXGyreHerosBold', sans-serif;
 line-height:1.15;
 padding:1px 2px;
 }
-.form_notice #notice_action-submit {
+.form_notice .submit {
 width:14%;
 height:47px;
 padding:0;
index c694d76404e51d968cab44aa96417b7eb46cf935..c5fd2a122d4501cc8f8f4ace7cf35213e27138ce 100644 (file)
@@ -29,7 +29,7 @@ height:16px;
 width:16px;
 display:block;
 }
-.form_notice #notice_action-submit {
+.form_notice .submit {
 width:17%;
 max-width:17%;
 }
index ff8f044ca9c98caea5087c014c2a198fe839af34..fdee4cdef325f41da077a56426d53c6f0d038115 100644 (file)
@@ -127,7 +127,7 @@ background:none;
 opacity:1;
 }
 
-#form_notice #notice_action-submit {
+#form_notice .submit {
 width:20%;
 right:2%;
 text-align:center;
index 20a4f3154859d71269dbf3d59d83f9982f394548..b4c79c4185aa607c133e7f0cf5f5d49588cc20ad 100644 (file)
@@ -482,7 +482,7 @@ font-weight:bold;
 line-height:1.15;
 padding:1px 2px;
 }
-#form_notice #notice_action-submit {
+#form_notice .submit {
 width:14%;
 height:47px;
 padding:0;
index 21ef1988a7a5dbaf09f0e74ce04a5ac8d445e8f5..5fbf5c3ba7b3d7233618c30824cc71a6b582007a 100644 (file)
@@ -265,7 +265,7 @@ address .poweredby {
     color: #ff0000;
 }        
 
-.form_notice #notice_action-submit {
+.form_notice .submit {
     padding:0;
     position:absolute;
     right:0;
@@ -1454,7 +1454,7 @@ margin-bottom:11px;
 .entity_send-a-message .form_notice select {
 display:none;
 }
-.entity_send-a-message .form_notice #notice_action-submit {
+.entity_send-a-message .form_notice .submit {
     position: absolute;
     top: 52px;
     right: 0px;
@@ -1717,7 +1717,7 @@ body.realtime-popup {
     width: 340px !important;
 }
 
-.realtime-popup .form_notice #notice_action-submit {
+.realtime-popup .form_notice .submit {
     top: 58px !important;
     height: 2em;
     font-size: 0.8em;
index e56c0c7810ba9a5559c8d0aa493fdc737735c610..c8820ab7a69885d1b52751cdc3bb0dc6dd5655a5 100644 (file)
@@ -17,7 +17,7 @@ width:16px;
 display:block;
     top: 30px;
 }
-.form_notice #notice_action-submit {
+.form_notice .submit {
     width: 106px;
     max-width: 106px;
 }
index eb206e1c25a3860642dd1f643a09ee7fd20b3a11..1e8eb3f465036d6dae6ef314c117565a32070144 100644 (file)
@@ -242,7 +242,7 @@ h6 {font-size: 1em;}
     right: 86px;
 }
 
-.form_notice #notice_action-submit {
+.form_notice .submit {
     top: 79px;
     right: 0;
     width: 102px;
@@ -250,7 +250,7 @@ h6 {font-size: 1em;}
     height: 2.2em;
 }
 
-.entity_send-a-message .form_notice #notice_action-submit {
+.entity_send-a-message .form_notice .submit {
     color: #fff !important;
 }
 
index a24ad401948d3114ee057ee2663f5d5a6d07012f..da3a317fee2649d9c07be6ab867fedfb3ce91e94 100644 (file)
@@ -19,7 +19,7 @@ display:block;
     top: 27px;
     right: 88px;
 }
-.form_notice #notice_action-submit {
+.form_notice .submit {
     width: 96px;
     max-width: 96px;
 }
index 4bde3db71e8459797e3034daa56bcde527af0d3c..cb899b3557f2b57b82ee6a74a264471fe785a460 100644 (file)
@@ -112,7 +112,7 @@ background:none;
 opacity:1;
 }
 
-.form_notice #notice_action-submit {
+.form_notice .submit {
     text-align: center;
     left: 230px;
     top: 34px;
@@ -120,7 +120,7 @@ opacity:1;
     font-size: 0.8em;
 }
 
-#form_notice-direct.form_notice #notice_action-submit {
+#form_notice-direct.form_notice .submit {
     top: 64px;
 }
 
index 89f168fe0a14014b8ff51a11de0bf3d5603d4b6b..94a534912f45cb983f092bee8e4654daff91053d 100644 (file)
@@ -122,7 +122,7 @@ background:none;
 opacity:1;
 }
 
-#form_notice #notice_action-submit {
+#form_notice .submit {
 width:20%;
 right:2%;
 text-align:center;