From: Brion Vibber Date: Fri, 4 Mar 2011 01:15:17 +0000 (-0800) Subject: Notice form cleanup: removing hardcoded id from counter references; prep for reusable... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b58aa291686b9ccc6db4ca79f9d52a2e2b6220a5;p=quix0rs-gnu-social.git Notice form cleanup: removing hardcoded id from counter references; prep for reusable notice forms. --- diff --git a/js/util.js b/js/util.js index 0834a2f2d3..538eb44602 100644 --- a/js/util.js +++ b/js/util.js @@ -50,7 +50,6 @@ var SN = { // StatusNet Processing: 'processing', CommandResult: 'command_result', FormNotice: 'form_notice', - NoticeTextCount: 'notice_text-count', NoticeInReplyTo: 'notice_in-reply-to', NoticeActionSubmit: 'notice_action-submit', NoticeLat: 'notice_data-lat', @@ -103,7 +102,7 @@ var SN = { // StatusNet */ FormNoticeEnhancements: function(form) { if (jQuery.data(form[0], 'ElementData') === undefined) { - MaxLength = form.find('#'+SN.C.S.NoticeTextCount).text(); + MaxLength = form.find('.count').text(); if (typeof(MaxLength) == 'undefined') { MaxLength = SN.C.I.MaxLength; } @@ -131,7 +130,7 @@ var SN = { // StatusNet .bind('paste', delayedUpdate); } else { - form.find('#'+SN.C.S.NoticeTextCount).text(jQuery.data(form[0], 'ElementData').MaxLength); + form.find('.count').text(jQuery.data(form[0], 'ElementData').MaxLength); } }, @@ -159,7 +158,7 @@ var SN = { // StatusNet } var remaining = MaxLength - SN.U.CharacterCount(form); - var counter = form.find('#'+SN.C.S.NoticeTextCount); + var counter = form.find('.count'); if (remaining.toString() != counter.text()) { if (!SN.C.I.CounterBlackout || remaining === 0) { diff --git a/js/util.min.js b/js/util.min.js index 81494c9100..40b534cc87 100644 --- a/js/util.min.js +++ b/js/util.min.js @@ -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",NoticeTextCount:"notice_text-count",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("#"+SN.C.S.NoticeTextCount).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("#"+SN.C.S.NoticeTextCount).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("#"+SN.C.S.NoticeTextCount);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('');b.attr("action",SN.U.RewriteAjaxAction(b.attr("action")));var c=function(d,e){b.append($('

').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('')}$($(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);$("#"+SN.C.S.NoticeLat).val(SN.C.I.NoticeDataGeo.NLat);$("#"+SN.C.S.NoticeLon).val(SN.C.I.NoticeDataGeo.NLon);if($("#"+SN.C.S.NoticeLocationNs)){$("#"+SN.C.S.NoticeLocationNs).val(SN.C.I.NoticeDataGeo.NLNS);$("#"+SN.C.S.NoticeLocationId).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=$('');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=$('
  • ');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=$('
  • ');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('').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=$('
    ');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;eg){f=false}if(f){h(c,function(j){var i=$("").attr("title",e).attr("alt",e).attr("src",j).attr("style","height: 120px");d.find(".attach-status").append(i)})}else{var b=$("
    ").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");$("#"+SN.C.S.NoticeLat).val("");$("#"+SN.C.S.NoticeLon).val("");$("#"+SN.C.S.NoticeLocationNs).val("");$("#"+SN.C.S.NoticeLocationId).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+")");$("#"+SN.C.S.NoticeLat).val(l.lat);$("#"+SN.C.S.NoticeLon).val(l.lon);$("#"+SN.C.S.NoticeLocationNs).val(n);$("#"+SN.C.S.NoticeLocationId).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){$("#"+SN.C.S.NoticeLat).val(m.coords.latitude);$("#"+SN.C.S.NoticeLon).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));$("#"+SN.C.S.NoticeLat).val(l.NLat);$("#"+SN.C.S.NoticeLon).val(l.NLon);$("#"+SN.C.S.NoticeLocationNs).val(l.NLNS);$("#"+SN.C.S.NoticeLocationId).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=$('
    ');h.find("button.close").click(function(){$("#"+SN.C.S.NoticeDataGeo).removeAttr("checked").change()});e.append(h)}var b;if(c){b=$("").attr("href",c)}else{b=$("")}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('');$(".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;b0&&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;c0){for(var c=0,b=e.childNodes.length;c0){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",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('');b.attr("action",SN.U.RewriteAjaxAction(b.attr("action")));var c=function(d,e){b.append($('

    ').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('
      ')}$($(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);$("#"+SN.C.S.NoticeLat).val(SN.C.I.NoticeDataGeo.NLat);$("#"+SN.C.S.NoticeLon).val(SN.C.I.NoticeDataGeo.NLon);if($("#"+SN.C.S.NoticeLocationNs)){$("#"+SN.C.S.NoticeLocationNs).val(SN.C.I.NoticeDataGeo.NLNS);$("#"+SN.C.S.NoticeLocationId).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=$('
        ');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=$('
      • ');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=$('
      • ');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('').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=$('
        ');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;eg){f=false}if(f){h(c,function(j){var i=$("").attr("title",e).attr("alt",e).attr("src",j).attr("style","height: 120px");d.find(".attach-status").append(i)})}else{var b=$("
        ").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");$("#"+SN.C.S.NoticeLat).val("");$("#"+SN.C.S.NoticeLon).val("");$("#"+SN.C.S.NoticeLocationNs).val("");$("#"+SN.C.S.NoticeLocationId).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+")");$("#"+SN.C.S.NoticeLat).val(l.lat);$("#"+SN.C.S.NoticeLon).val(l.lon);$("#"+SN.C.S.NoticeLocationNs).val(n);$("#"+SN.C.S.NoticeLocationId).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){$("#"+SN.C.S.NoticeLat).val(m.coords.latitude);$("#"+SN.C.S.NoticeLon).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));$("#"+SN.C.S.NoticeLat).val(l.NLat);$("#"+SN.C.S.NoticeLon).val(l.NLon);$("#"+SN.C.S.NoticeLocationNs).val(l.NLNS);$("#"+SN.C.S.NoticeLocationId).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=$('
        ');h.find("button.close").click(function(){$("#"+SN.C.S.NoticeDataGeo).removeAttr("checked").change()});e.append(h)}var b;if(c){b=$("").attr("href",c)}else{b=$("")}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('');$(".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;b0&&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;c0){for(var c=0,b=e.childNodes.length;c0){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 diff --git a/lib/messageform.php b/lib/messageform.php index 7f21f7ecd0..9a4dfbb0f5 100644 --- a/lib/messageform.php +++ b/lib/messageform.php @@ -163,8 +163,7 @@ class MessageForm extends Form if ($contentLimit > 0) { $this->out->element('span', - array('id' => 'notice_text-count', - 'class' => 'form_note'), + array('class' => 'count'), $contentLimit); } } diff --git a/lib/noticeform.php b/lib/noticeform.php index 4e8b842078..cd2d2cb979 100644 --- a/lib/noticeform.php +++ b/lib/noticeform.php @@ -183,8 +183,7 @@ class NoticeForm extends Form if ($contentLimit > 0) { $this->out->element('span', - array('id' => 'notice_text-count', - 'class' => 'form_note'), + array('class' => 'count'), $contentLimit); } diff --git a/plugins/GroupPrivateMessage/groupmessageform.php b/plugins/GroupPrivateMessage/groupmessageform.php index 7205d3f0b9..a832ce5978 100644 --- a/plugins/GroupPrivateMessage/groupmessageform.php +++ b/plugins/GroupPrivateMessage/groupmessageform.php @@ -141,7 +141,7 @@ class GroupMessageForm extends Form if ($contentLimit > 0) { $this->out->elementStart('dl', 'form_note'); $this->out->element('dt', null, _('Available characters')); - $this->out->element('dd', array('id' => 'notice_text-count'), + $this->out->element('dd', array('class' => 'count'), $contentLimit); $this->out->elementEnd('dl'); } diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index ec08fa1e2c..fa0c4e7c22 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -355,7 +355,7 @@ class MobileProfilePlugin extends WAP20Plugin $contentLimit = Notice::maxContent(); if ($contentLimit > 0) { - $form->out->element('div', array('id' => 'notice_text-count'), + $form->out->element('div', array('class' => 'count'), $contentLimit); } diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css index 1f70b5612d..4b9930584f 100644 --- a/plugins/MobileProfile/mp-screen.css +++ b/plugins/MobileProfile/mp-screen.css @@ -94,7 +94,7 @@ width:60%; height:20px; } -#notice_text-count { +.form_notice .count { position:absolute; bottom:2px; right:40%; @@ -104,7 +104,7 @@ z-index:9; /*input type=file no good in iPhone/iPod Touch, Android, Opera Mini Simulator */ -#form_notice #notice_text-count + label, +.form_notice .count + label, #form_notice label[for="notice_data-attach"] { display:none; } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 085bfa66f9..f4a3a12b13 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -611,17 +611,17 @@ height:16px; padding:0; height:16px; } -.form_notice .form_note { +.form_notice .count { position:absolute; bottom:2px; right:21.715%; z-index:9; } -.form_notice .form_note dt { +.form_notice .count dt { font-weight:bold; display:none; } -.form_notice #notice_text-count { +.form_notice .count { font-weight:bold; line-height:1.15; padding:1px 2px; diff --git a/theme/base/css/ie.css b/theme/base/css/ie.css index 4efc56a338..0a26f238b9 100644 --- a/theme/base/css/ie.css +++ b/theme/base/css/ie.css @@ -13,7 +13,7 @@ top:0; .form_notice textarea { width:78%; } -.form_notice .form_note + label { +.form_notice .count + label { position:absolute; top:25px; left:83%; diff --git a/theme/biz/css/base.css b/theme/biz/css/base.css index c14d4cd1e9..d0c445f482 100644 --- a/theme/biz/css/base.css +++ b/theme/biz/css/base.css @@ -480,17 +480,17 @@ text-indent:-279px; #form_notice #notice_submit label { display:none; } -#form_notice .form_note { +.form_notice .count { position:absolute; top:99px; right:98px; z-index:9; } -#form_notice .form_note dt { +.form_notice .count dt { font-weight:bold; display:none; } -#notice_text-count { +.form_notice .count { font-weight:bold; line-height:1.15; padding:1px 2px; diff --git a/theme/biz/css/display.css b/theme/biz/css/display.css index c39464385e..e562f7072a 100644 --- a/theme/biz/css/display.css +++ b/theme/biz/css/display.css @@ -60,12 +60,12 @@ border-color:#DDDDDD; background:none; } -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note { background-color:#9BB43E; } input.submit, -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note, .entity_actions a, .entity_actions input, @@ -83,7 +83,7 @@ background-color:transparent; } input:focus, textarea:focus, select:focus, .form_notice.warning textarea, -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note { border-color:#9BB43E; } @@ -166,10 +166,10 @@ background-image:url(../images/illustrations/illu_pattern-02.png); background-repeat:no-repeat; } -#notice_text-count { +.form_notice .count { color:#333333; } -#form_notice.warning #notice_text-count { +#form_notice.warning .count { color:#000000; } .form_notice label[for=notice_data-attach] { diff --git a/theme/clean/css/ie.css b/theme/clean/css/ie.css index 9eb4d6db60..9e26313b0e 100644 --- a/theme/clean/css/ie.css +++ b/theme/clean/css/ie.css @@ -7,7 +7,7 @@ top:0; .form_notice textarea { width: 362px; } -.form_notice .form_note + label { +.form_notice .count + label { position:absolute; top:25px; left:83%; @@ -65,7 +65,7 @@ line-height:auto; filter: alpha(opacity=0); } -.form_notice .form_note + label { +.form_notice .count + label { background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -328px; } diff --git a/theme/clean/css/mp-screen.css b/theme/clean/css/mp-screen.css index d544fcb767..4b19afd117 100644 --- a/theme/clean/css/mp-screen.css +++ b/theme/clean/css/mp-screen.css @@ -75,7 +75,7 @@ float:left; padding: 4px; } -#notice_text-count { +.form_notice .count { position:absolute; bottom:2px; left: 175px; @@ -83,14 +83,14 @@ bottom:2px; z-index:9; } -#form_notice-direct.form_notice #notice_text-count { +#form_notice-direct.form_notice .count { left: 0px; } /*input type=file no good in iPhone/iPod Touch, Android, Opera Mini Simulator */ -.form_notice #notice_text-count + label, +.form_notice .count + label, .form_notice label[for="notice_data-attach"] { display:none; } diff --git a/theme/cleaner/css/ie.css b/theme/cleaner/css/ie.css index 97957afd21..af883e7b4f 100644 --- a/theme/cleaner/css/ie.css +++ b/theme/cleaner/css/ie.css @@ -7,7 +7,7 @@ top:0; .form_notice textarea { width: 328px; } -.form_notice .form_note + label { +.form_notice .count + label { position:absolute; top:25px; left:83%; @@ -69,7 +69,7 @@ line-height:auto; filter: alpha(opacity=0); } -.form_notice .form_note + label { +.form_notice .count + label { background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -328px; } diff --git a/theme/cleaner/css/mp-screen.css b/theme/cleaner/css/mp-screen.css index d3f95db9b6..22cc923e81 100644 --- a/theme/cleaner/css/mp-screen.css +++ b/theme/cleaner/css/mp-screen.css @@ -80,7 +80,7 @@ float:left; padding: 4px; } -#notice_text-count { +.form_notice .count { position:absolute; bottom:2px; left: 175px; @@ -88,14 +88,14 @@ bottom:2px; z-index:9; } -#form_notice-direct.form_notice #notice_text-count { +#form_notice-direct.form_notice .count { left: 0px; } /*input type=file no good in iPhone/iPod Touch, Android, Opera Mini Simulator */ -.form_notice #notice_text-count + label, +.form_notice .count + label, .form_notice label[for="notice_data-attach"] { display:none; } diff --git a/theme/cloudy/css/display.css b/theme/cloudy/css/display.css index 6787d9f2b4..814f879bc3 100644 --- a/theme/cloudy/css/display.css +++ b/theme/cloudy/css/display.css @@ -509,17 +509,17 @@ height:16px; padding:0; height:16px; } -.form_notice .form_note { +.form_notice .count { position:absolute; bottom:2px; right:21.715%; z-index:9; } -.form_notice .form_note dt { +.form_notice .count dt { font-weight:bold; display:none; } -.form_notice #notice_text-count { +.form_notice .count { font-weight:bold; line-height:1.15; padding:1px 2px; @@ -1673,7 +1673,7 @@ background-position:0 -1912px; } input.submit, -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note, .entity_actions a, .entity_actions input, @@ -1691,7 +1691,7 @@ background-color:transparent; } input:focus, textarea:focus, select:focus, .form_notice.warning textarea, -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note { border-color:#9BB43E; } @@ -1706,7 +1706,7 @@ background-color:transparent; } input:focus, textarea:focus, select:focus, .form_notice.warning textarea, -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note { border-color:#9BB43E; } @@ -1781,10 +1781,10 @@ border-color:#AAAAAA; background-color:#DDFFCC; } -#notice_text-count { +.form_notice .count { color:#000000; } -#form_notice.warning #notice_text-count { +#form_notice.warning .count { color:#000000; } #form_notice label[for=notice_data-attach] { @@ -2071,7 +2071,7 @@ border-color:#FFFF00; } -#form_notice .form_note { +.form_notice .count { color:#CCC; } diff --git a/theme/cloudy/css/ie.css b/theme/cloudy/css/ie.css index a7b34a2f39..03cfb23d3b 100644 --- a/theme/cloudy/css/ie.css +++ b/theme/cloudy/css/ie.css @@ -18,14 +18,14 @@ background-color:#ddffcc; #form_notice { width:525px; } -#form_notice .form_note { +.form_notice .count { top:-5px; right:0; } #form_notice textarea { width:97.75%; } -#form_notice .form_note + label { +.form_notice .count + label { position:absolute; top:87px; left:77%; diff --git a/theme/default/css/display.css b/theme/default/css/display.css index 17f10c30e7..63554aae18 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -57,12 +57,12 @@ border-color:#DDDDDD; background:none; } -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note { background-color:#9BB43E; } input.submit, -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note, .entity_actions a, .entity_actions input, @@ -81,7 +81,7 @@ background-color:transparent; } input:focus, textarea:focus, select:focus, .form_notice.warning textarea, -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note, .entity_actions .dialogbox .form_data input:focus { border-color:#9BB43E; @@ -144,10 +144,10 @@ border-top-color:#C8D1D5; background-color:#C8D1D5; } -#notice_text-count { +.form_notice .count { color:#333333; } -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .dialogbox, .entity_actions .dialogbox input { color:#000000; diff --git a/theme/default/css/ie.css b/theme/default/css/ie.css index 6a95e0369e..2bbeb7ffa4 100644 --- a/theme/default/css/ie.css +++ b/theme/default/css/ie.css @@ -13,7 +13,7 @@ color:#FFFFFF; #site_nav_local_views a { background-color:#C8D1D5; } -.form_notice .form_note + label { +.form_notice .count + label { background:transparent url(../../base/images/icons/icons-01.gif) no-repeat 0 -328px; } .form_notice #notice_data-attach { diff --git a/theme/h4ck3r/css/base.css b/theme/h4ck3r/css/base.css index a4dac0145a..22daceeba8 100644 --- a/theme/h4ck3r/css/base.css +++ b/theme/h4ck3r/css/base.css @@ -432,17 +432,17 @@ margin-bottom:7px; #form_notice #notice_submit label { display:none; } -#form_notice .form_note { +.form_notice .count { position:absolute; top:99px; right:98px; z-index:9; } -#form_notice .form_note dt { +.form_notice .count dt { font-weight:bold; display:none; } -#notice_text-count { +.form_notice .count { font-weight:bold; line-height:1.15; padding:1px 2px; diff --git a/theme/h4ck3r/css/display.css b/theme/h4ck3r/css/display.css index 96b9ce5661..8bd5ad9f4c 100644 --- a/theme/h4ck3r/css/display.css +++ b/theme/h4ck3r/css/display.css @@ -44,7 +44,7 @@ background:none; } input.submit, -#form_notice.warning #notice_text-count, +#form_notice.warning .count, .form_settings .form_note, .entity_remote_subscribe { background-color:rgba(0, 255, 0, 0.5); @@ -82,10 +82,10 @@ border-top-color:#87B4C8; background-color:rgba(0,128,0,0.3); } -#notice_text-count { +.form_notice .count { color:#0f0; } -#form_notice.warning #notice_text-count { +#form_notice.warning .count { color:#000; } #form_notice.processing #notice_action-submit { diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index 32b8d88d0b..211c539dcb 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -57,12 +57,12 @@ border-color:#DDDDDD; background:none; } -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note { background-color:#9BB43E; } input.submit, -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note, .entity_actions a, .entity_actions input, @@ -81,7 +81,7 @@ background-color:transparent; } input:focus, textarea:focus, select:focus, .form_notice.warning textarea, -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note, .entity_actions .dialogbox .form_data input:focus { border-color:#9BB43E; @@ -145,10 +145,10 @@ border-top-color:#CEE1E9; background-color:#CEE1E9; } -#notice_text-count { +.form_notice .count { color:#333333; } -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .dialogbox, .entity_actions .dialogbox input { color:#000000; diff --git a/theme/identica/css/ie.css b/theme/identica/css/ie.css index 62b62748b0..888c486f40 100644 --- a/theme/identica/css/ie.css +++ b/theme/identica/css/ie.css @@ -13,7 +13,7 @@ color:#FFFFFF; #site_nav_local_views a { background-color:#D9DADB; } -.form_notice .form_note + label { +.form_notice .count + label { background:transparent url(../../base/images/icons/icons-01.gif) no-repeat 0 -328px; } .form_notice #notice_data-attach { diff --git a/theme/mnml/css/display.css b/theme/mnml/css/display.css index e4b9012955..ee2cefe619 100644 --- a/theme/mnml/css/display.css +++ b/theme/mnml/css/display.css @@ -954,17 +954,17 @@ opacity: 0; padding:0; height:1.6em; } -.form_notice .form_note { +.form_notice .count { position:absolute; bottom:2px; right:21.715%; z-index:9; } -.form_notice .form_note dt { +.form_notice .count dt { font-weight:bold; display:none; } -.form_notice #notice_text-count { +.form_notice .count { font-family: 'TeXGyreHerosBold', sans-serif; line-height:1.15; padding:1px 2px; diff --git a/theme/mnml/css/ie.css b/theme/mnml/css/ie.css index 0cc8c3acfa..c694d76404 100644 --- a/theme/mnml/css/ie.css +++ b/theme/mnml/css/ie.css @@ -20,7 +20,7 @@ img.logo { .form_notice textarea { width:78%; } -.form_notice .form_note + label { +.form_notice .count + label { position:absolute; top:25px; left:83%; @@ -41,7 +41,7 @@ width:78.75%; .form_notice #notice_data-geo_selected button { padding:0 4px; } -.form_notice .form_note + label { +.form_notice .count + label { background:transparent url(../images/icons/icons-01.png) no-repeat 0 -328px; } diff --git a/theme/mnml/css/mp-screen.css b/theme/mnml/css/mp-screen.css index cc9514174a..ff8f044ca9 100644 --- a/theme/mnml/css/mp-screen.css +++ b/theme/mnml/css/mp-screen.css @@ -100,7 +100,7 @@ width:60%; height:20px; } -#notice_text-count { +.form_notice .count { position:absolute; bottom:2px; right:40%; @@ -110,7 +110,7 @@ z-index:9; /*input type=file no good in iPhone/iPod Touch, Android, Opera Mini Simulator */ -#form_notice #notice_text-count + label, +.form_notice .count + label, #form_notice label[for="notice_data-attach"] { display:none; } diff --git a/theme/pigeonthoughts/css/base.css b/theme/pigeonthoughts/css/base.css index 66948f7318..20a4f31548 100644 --- a/theme/pigeonthoughts/css/base.css +++ b/theme/pigeonthoughts/css/base.css @@ -467,17 +467,17 @@ left:183px; padding:0; height:16px; } -#form_notice .form_note { +.form_notice .count { position:absolute; top:76px; right:98px; z-index:9; } -#form_notice .form_note dt { +.form_notice .count dt { font-weight:bold; display:none; } -#notice_text-count { +.form_notice .count { font-weight:bold; line-height:1.15; padding:1px 2px; diff --git a/theme/pigeonthoughts/css/display.css b/theme/pigeonthoughts/css/display.css index 768d030376..155a473519 100644 --- a/theme/pigeonthoughts/css/display.css +++ b/theme/pigeonthoughts/css/display.css @@ -43,7 +43,7 @@ background:none; } input.submit, -#form_notice.warning #notice_text-count, +#form_notice.warning .count, .form_settings .form_note, .entity_remote_subscribe { background-color:#8F0000; @@ -186,10 +186,10 @@ border-top-color:#87B4C8; background:url(../images/illustrations/illu_pigeons-02.png) no-repeat 10% 100%; } -#notice_text-count { +.form_notice .count { color:#333333; } -#form_notice.warning #notice_text-count { +#form_notice.warning .count { color:#000000; } #form_notice label[for=notice_data-attach] { diff --git a/theme/rebase/css/display.css b/theme/rebase/css/display.css index ad462b947e..21ef1988a7 100644 --- a/theme/rebase/css/display.css +++ b/theme/rebase/css/display.css @@ -245,7 +245,7 @@ address .poweredby { height:16px; } -.form_notice .form_note { +.form_notice .count { position: absolute; bottom: 0px; right: 125px; @@ -253,15 +253,15 @@ address .poweredby { font-size: 0.8em; } -.form_notice .form_note dt { +.form_notice .count dt { display:none; } -.form_notice #notice_text-count { +.form_notice .count { color: #777; } -.form_notice.warning #notice_text-count { +.form_notice.warning .count { color: #ff0000; } diff --git a/theme/rebase/css/ie.css b/theme/rebase/css/ie.css index f02a07c7b8..e56c0c7810 100644 --- a/theme/rebase/css/ie.css +++ b/theme/rebase/css/ie.css @@ -7,7 +7,7 @@ top:0; .form_notice textarea { width: 485px; } -.form_notice .form_note + label { +.form_notice .count + label { position:absolute; top:25px; left:83%; @@ -65,7 +65,7 @@ line-height:auto; filter: alpha(opacity=0); } -.form_notice .form_note + label { +.form_notice .count + label { background:transparent url(../images/icons/icons-01.gif) no-repeat 0 -328px; } diff --git a/theme/shiny/css/ie.css b/theme/shiny/css/ie.css index 792c94a9d7..a24ad40194 100644 --- a/theme/shiny/css/ie.css +++ b/theme/shiny/css/ie.css @@ -7,7 +7,7 @@ top:0; .form_notice textarea { width: 362px; } -.form_notice .form_note + label { +.form_notice .count + label { position:absolute; top:25px; left:83%; @@ -67,7 +67,7 @@ line-height:auto; filter: alpha(opacity=0); } -.form_notice .form_note + label { +.form_notice .count + label { background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -328px; } diff --git a/theme/shiny/css/mp-screen.css b/theme/shiny/css/mp-screen.css index 6a47b8e7f4..4bde3db71e 100644 --- a/theme/shiny/css/mp-screen.css +++ b/theme/shiny/css/mp-screen.css @@ -80,7 +80,7 @@ float:left; padding: 4px; } -#notice_text-count { +.form_notice .count { position:absolute; bottom:2px; left: 175px; @@ -88,14 +88,14 @@ bottom:2px; z-index:9; } -#form_notice-direct.form_notice #notice_text-count { +#form_notice-direct.form_notice .count { left: -185px; } /*input type=file no good in iPhone/iPod Touch, Android, Opera Mini Simulator */ -.form_notice #notice_text-count + label, +.form_notice .count + label, .form_notice label[for="notice_data-attach"] { display:none; } diff --git a/theme/victorian/css/display.css b/theme/victorian/css/display.css index d2695d163f..3ab7fc601a 100644 --- a/theme/victorian/css/display.css +++ b/theme/victorian/css/display.css @@ -43,7 +43,7 @@ /* bolding */ -caption, legend, input.submit, form label, .form_settings #settings_autosubscribe label, address .fn, .system_notice dt, #anon_notice, #site_nav_local_views a, #licenses dt, .form_notice .form_note dt, .form_notice #notice_text-count, button.close, button.minimize, .entity_profile dt, #entity_statistics dt, .entity_profile .fn, .entity_profile .nickname, .entity_actions a, .entity_moderation p, .entity_role p, #showapplication .entity_data dt, .notice .author .fn, .dialogbox .submit_dialogbox, #attachments dt, #attachment_view #oembed_info dt, #filter_tags_all a, .pagination dt, .pagination a, #tagcloud.section dt { +caption, legend, input.submit, form label, .form_settings #settings_autosubscribe label, address .fn, .system_notice dt, #anon_notice, #site_nav_local_views a, #licenses dt, .form_notice .count dt, .form_notice .count, button.close, button.minimize, .entity_profile dt, #entity_statistics dt, .entity_profile .fn, .entity_profile .nickname, .entity_actions a, .entity_moderation p, .entity_role p, #showapplication .entity_data dt, .notice .author .fn, .dialogbox .submit_dialogbox, #attachments dt, #attachment_view #oembed_info dt, #filter_tags_all a, .pagination dt, .pagination a, #tagcloud.section dt { font-weight: normal; font-family: 'LinuxLibertineBold', serif; } @@ -228,13 +228,13 @@ h1, h2, h3, h4, h5, h6 { background:none; } -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note { background-color:#9BB43E; } input.submit, -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note, .entity_actions a, .entity_actions input, @@ -255,7 +255,7 @@ button { input:focus, textarea:focus, select:focus, .form_notice.warning textarea, -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .form_settings .form_note, .entity_actions .dialogbox .form_data input:focus { border-color:#9BB43E; @@ -318,11 +318,11 @@ a, border-top-color:#C8D1D5; } -#notice_text-count { +.form_notice .count { color:#333333; } -.form_notice.warning #notice_text-count, +.form_notice.warning .count, .dialogbox, .entity_actions .dialogbox input { color:#000000; diff --git a/theme/victorian/css/ie.css b/theme/victorian/css/ie.css index 2283471661..038195faaf 100644 --- a/theme/victorian/css/ie.css +++ b/theme/victorian/css/ie.css @@ -6,7 +6,7 @@ color:#FFFFFF; #site_nav_local_views a { background-color:#C8D1D5; } -.form_notice .form_note + label { +.form_notice .count + label { background:transparent url(../../base/images/icons/icons-01.gif) no-repeat 0 -328px; } .form_notice #notice_data-attach { diff --git a/theme/victorian/css/mp-screen.css b/theme/victorian/css/mp-screen.css index 5639f290fb..89f168fe0a 100644 --- a/theme/victorian/css/mp-screen.css +++ b/theme/victorian/css/mp-screen.css @@ -95,7 +95,7 @@ width:60%; height:20px; } -#notice_text-count { +.form_notice .count { position:absolute; bottom:2px; right:40%; @@ -105,7 +105,7 @@ z-index:9; /*input type=file no good in iPhone/iPod Touch, Android, Opera Mini Simulator */ -#form_notice #notice_text-count + label, +.form_notice .count + label, #form_notice label[for="notice_data-attach"] { display:none; }