diff --git a/actions/invite.php b/actions/invite.php
index 0e3a878f2e..1bfc9f76d3 100644
--- a/actions/invite.php
+++ b/actions/invite.php
@@ -60,7 +60,6 @@ class InviteAction extends CurrentUserDesignAction
function sendInvitations()
{
if (Event::handle('StartSendInvitations', array(&$this))) {
-
// CSRF protection
$token = $this->trimmed('token');
if (!$token || $token != common_session_token()) {
@@ -162,7 +161,6 @@ class InviteAction extends CurrentUserDesignAction
function showInvitationSuccess()
{
if (Event::handle('StartShowInvitationSuccess', array($this))) {
-
if ($this->already) {
// TRANS: Message displayed inviting users to use a StatusNet site while the inviting user
// TRANS: is already subscribed to one or more users with the given e-mail address(es).
diff --git a/classes/Invitation.php b/classes/Invitation.php
index 0e87c1629c..27ff400883 100644
--- a/classes/Invitation.php
+++ b/classes/Invitation.php
@@ -14,6 +14,7 @@ class Invitation extends Memcached_DataObject
public $user_id; // int(4) not_null
public $address; // varchar(255) multiple_key not_null
public $address_type; // varchar(8) multiple_key not_null
+ public $registered_user_id; // int(4) not_null
public $created; // datetime() not_null
/* Static get */
@@ -22,4 +23,11 @@ class Invitation extends Memcached_DataObject
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
+
+ function convert($user)
+ {
+ $orig = clone($this);
+ $this->registered_user_id = $user->id;
+ return $this->update($orig);
+ }
}
diff --git a/classes/User.php b/classes/User.php
index 8642c78c27..9f79549327 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -263,6 +263,8 @@ class User extends Memcached_DataObject
$user->nickname = $nickname;
+ $invite = null;
+
// Users who respond to invite email have proven their ownership of that address
if (!empty($code)) {
@@ -353,6 +355,12 @@ class User extends Memcached_DataObject
return false;
}
+ // Mark that this invite was converted
+
+ if (!empty($invite)) {
+ $invite->convert($user);
+ }
+
if (!empty($email) && !$user->email) {
$confirm = new Confirm_address();
diff --git a/classes/statusnet.ini b/classes/statusnet.ini
index bdf96c1ddc..c5c126a133 100644
--- a/classes/statusnet.ini
+++ b/classes/statusnet.ini
@@ -258,6 +258,7 @@ user_id = 129
address = 130
address_type = 130
created = 142
+registered_user_id = 1
[invitation__keys]
code = K
diff --git a/db/core.php b/db/core.php
index 10d8e51b9b..626672bf5f 100644
--- a/db/core.php
+++ b/db/core.php
@@ -542,14 +542,17 @@ $schema['invitation'] = array(
'address' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'invitation sent to'),
'address_type' => array('type' => 'varchar', 'length' => 8, 'not null' => true, 'description' => 'address type ("email", "xmpp", "sms")'),
'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
+ 'registered_user_id' => array('type' => 'int', 'not null' => false, 'description' => 'if the invitation is converted, who the new user is'),
),
'primary key' => array('code'),
'foreign keys' => array(
'invitation_user_id_fkey' => array('user', array('user_id' => 'id')),
+ 'invitation_registered_user_id_fkey' => array('user', array('registered_user_id' => 'id')),
),
'indexes' => array(
'invitation_address_idx' => array('address', 'address_type'),
'invitation_user_id_idx' => array('user_id'),
+ 'invitation_registered_user_id_idx' => array('registered_user_id'),
),
);
diff --git a/js/util.js b/js/util.js
index 5c12ab111d..979415c639 100644
--- a/js/util.js
+++ b/js/util.js
@@ -735,7 +735,7 @@ var SN = { // StatusNet
list = notice.find('ul.threaded-replies');
}
var placeholder = $('
' +
- ' ' +
+ ' ' +
' ');
placeholder.find('input')
.val(SN.msg('reply_placeholder'));
diff --git a/js/util.min.js b/js/util.min.js
index 1b3867b7ca..1dd11c2852 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],NoticeFormMaster:null},S:{Disabled:"disabled",Warning:"warning",Error:"error",Success:"success",Processing:"processing",CommandResult:"command_result",FormNotice:"form_notice",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(".notice_data-text:first");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(".notice_data-text:first").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,b){$.ajax({type:"POST",dataType:"xml",url:SN.U.RewriteAjaxAction(a.attr("action")),data:a.serialize()+"&ajax=1",beforeSend:function(c){a.addClass(SN.C.S.Processing).find(".submit").addClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,SN.C.S.Disabled)},error:function(e,f,d){var c=null;if(e.responseXML){c=$("#error",e.responseXML).text()}alert(c||d||f);a.removeClass(SN.C.S.Processing).find(".submit").removeClass(SN.C.S.Disabled).removeAttr(SN.C.S.Disabled)},success:function(c,d){if(typeof($("form",c)[0])!="undefined"){form_new=document._importNode($("form",c)[0],true);a.replaceWith(form_new);if(b){b()}}else{if(typeof($("p",c)[0])!="undefined"){a.replaceWith(document._importNode($("p",c)[0],true));if(b){b()}}else{alert("Unknown error.")}}}})},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(".notice_data-text:first").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(j,f){a();var p=$("#"+SN.C.S.Error,j);if(p.length>0){c("error",p.text())}else{if($("body")[0].id=="bookmarklet"){self.close()}var d=$("#"+SN.C.S.CommandResult,j);if(d.length>0){c("success",d.text())}else{var o=document._importNode($("li",j)[0],true);var k=$("#notices_primary .notices:first");var m=b.closest("li.notice-reply");if(m.length>0){var l=b.closest(".threaded-replies");var n=l.find(".notice-reply-placeholder");m.remove();var e=$(o).attr("id");if($("#"+e).length==0){$(o).insertBefore(n)}else{}n.show()}else{if(k.length>0&&SN.U.belongsOnTimeline(o)){if($("#"+o.id).length===0){var h=b.find("[name=inreplyto]").val();var g="#notices_primary #notice-"+h;if($("body")[0].id=="conversation"){if(h.length>0&&$(g+" .notices").length<1){$(g).append('')}$($(g+" .notices")[0]).append(o)}else{k.prepend(o)}$("#"+o.id).css({display:"none"}).fadeIn(2500);SN.U.NoticeWithAttachment($("#"+o.id));SN.U.switchInputFormTab("placeholder")}}else{c("success",$("title",j).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);b.find("[name=notice_data-geo]").attr("checked",SN.C.I.NoticeDataGeo.NDG)}})},FormProfileSearchXHR:function(a){$.ajax({type:"POST",dataType:"xml",url: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(d,f){var b=$("#profile_search_results");if(typeof($("ul",d)[0])!="undefined"){var c=document._importNode($("ul",d)[0],true);b.replaceWith(c)}else{var e=$(" ").append(document._importNode($("p",d)[0],true));b.html(e)}a.removeClass(SN.C.S.Processing).find(".submit").removeClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,false)}})},FormPeopletagsXHR:function(a){$.ajax({type:"POST",dataType:"xml",url:a.attr("action"),data:a.serialize()+"&ajax=1",beforeSend:function(b){a.find(".submit").addClass(SN.C.S.Processing).addClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,SN.C.S.Disabled)},error:function(c,d,b){alert(b||d)},success:function(d,e){var c=a.parents(".entity_tags");if(typeof($(".entity_tags",d)[0])!="undefined"){var b=document._importNode($(".entity_tags",d)[0],true);$(b).find(".editable").append($(' '));c.replaceWith(b)}else{c.find("p").remove();c.append(document._importNode($("p",d)[0],true));a.removeClass(SN.C.S.Processing).find(".submit").removeClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,false)}}})},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=a.find("[name=notice_data-geo]").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=a.find("[name=notice_data-geo]").attr("checked",false).attr("checked")}else{SN.C.I.NoticeDataGeo.NDG=a.find("[name=notice_data-geo]").attr("checked",true).attr("checked")}},GetResponseXML:function(b){try{return b.responseXML}catch(a){return(new DOMParser()).parseFromString(b.responseText,"text/xml")}},NoticeReply:function(){$("#content .notice_reply").live("click",function(b){b.preventDefault();var a=$(this).closest("li.notice");SN.U.NoticeInlineReplyTrigger(a);return false})},NoticeReplyTo:function(a){},NoticeInlineReplyTrigger:function(j,k){var b=$($(".notice_id",j)[0]).text();var e=j;var f=j.closest(".notices");if(f.hasClass("threaded-replies")){e=f.closest(".notice")}else{f=$("ul.threaded-replies",j);if(f.length==0){SN.U.NoticeInlineReplyPlaceholder(j);f=$("ul.threaded-replies",j)}else{var h=$("li.notice-reply-placeholder",j);if(h.length==0){SN.U.NoticeInlineReplyPlaceholder(j)}}}var l=$(".notice-reply-form",f);var d=function(){l.find("input[name=inreplyto]").val(b);l.find("#notice_to").attr("disabled","disabled").hide();l.find("#notice_private").attr("disabled","disabled").hide();l.find("label[for=notice_to]").hide();l.find("label[for=notice_private]").hide();var o=l.find("textarea");if(o.length==0){throw"No textarea"}var n="";if(k){n=k+" "}o.val(n+o.val().replace(RegExp(n,"i"),""));o.data("initialText",$.trim(k+""));o.focus();if(o[0].setSelectionRange){var m=o.val().length;o[0].setSelectionRange(m,m)}};if(l.length>0){d()}else{var h=f.find("li.notice-reply-placeholder").hide();var g=$("li.notice-reply",f);if(g.length==0){g=$(' ');var c=function(m){var n=document._importNode(m,true);g.append(n);f.append(g);var o=l=$(n);SN.Init.NoticeFormSetup(o);d()};if(SN.C.I.NoticeFormMaster){c(SN.C.I.NoticeFormMaster)}else{var a=$("#form_notice").attr("action");$.get(a,{ajax:1},function(m,o,n){c($("form",m)[0])})}}}},NoticeInlineReplyPlaceholder:function(b){var a=b.find("ul.threaded-replies");if(a.length==0){a=$('');b.append(a);a=b.find("ul.threaded-replies")}var c=$(' ');c.find("input").val(SN.msg("reply_placeholder"));a.append(c)},NoticeInlineReplySetup:function(){$("li.notice-reply-placeholder input").live("focus",function(){var a=$(this).closest("li.notice");SN.U.NoticeInlineReplyTrigger(a);return false});$("li.notice-reply-comments a").live("click",function(){var a=$(this).attr("href");var b=$(this).closest(".threaded-replies");$.get(a,{ajax:1},function(d,f,e){var c=$(".threaded-replies",d);if(c.length){b.replaceWith(document._importNode(c[0],true))}});return false})},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(k){var j=$(" ").attr("title",e).attr("alt",e).attr("src",k).attr("style","height: 120px");d.find(".attach-status").append(j)})}else{var b=$("
").text(e);d.find(".attach-status").append(b)}},NoticeLocationAttach:function(a){var e=a.find("[name=lat]");var l=a.find("[name=lon]");var g=a.find("[name=location_ns]").val();var m=a.find("[name=location_id]").val();var b="";var d=a.find("[name=notice_data-geo]");var c=a.find("[name=notice_data-geo]");var k=a.find("label.notice_data-geo");function f(o){k.attr("title",jQuery.trim(k.text())).removeClass("checked");a.find("[name=lat]").val("");a.find("[name=lon]").val("");a.find("[name=location_ns]").val("");a.find("[name=location_id]").val("");a.find("[name=notice_data-geo]").attr("checked",false);$.cookie(SN.C.S.NoticeDataGeoCookie,"disabled",{path:"/"});if(o){a.find(".geo_status_wrapper").removeClass("success").addClass("error");a.find(".geo_status_wrapper .geo_status").text(o)}else{a.find(".geo_status_wrapper").remove()}}function n(o,p){SN.U.NoticeGeoStatus(a,"Looking up place name...");$.getJSON(o,p,function(q){var r,s;if(typeof(q.location_ns)!="undefined"){a.find("[name=location_ns]").val(q.location_ns);r=q.location_ns}if(typeof(q.location_id)!="undefined"){a.find("[name=location_id]").val(q.location_id);s=q.location_id}if(typeof(q.name)=="undefined"){NLN_text=p.lat+";"+p.lon}else{NLN_text=q.name}SN.U.NoticeGeoStatus(a,NLN_text,p.lat,p.lon,q.url);k.attr("title",NoticeDataGeo_text.ShareDisable+" ("+NLN_text+")");a.find("[name=lat]").val(p.lat);a.find("[name=lon]").val(p.lon);a.find("[name=location_ns]").val(r);a.find("[name=location_id]").val(s);a.find("[name=notice_data-geo]").attr("checked",true);var t={NLat:p.lat,NLon:p.lon,NLNS:r,NLID:s,NLN:NLN_text,NLNU:q.url,NDG:true};$.cookie(SN.C.S.NoticeDataGeoCookie,JSON.stringify(t),{path:"/"})})}if(c.length>0){if($.cookie(SN.C.S.NoticeDataGeoCookie)=="disabled"){c.attr("checked",false)}else{c.attr("checked",true)}var h=a.find(".notice_data-geo_wrap");var j=h.attr("data-api");k.attr("title",k.text());c.change(function(){if(c.attr("checked")===true||$.cookie(SN.C.S.NoticeDataGeoCookie)===null){k.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(a,"Requesting location from browser...");navigator.geolocation.getCurrentPosition(function(q){a.find("[name=lat]").val(q.coords.latitude);a.find("[name=lon]").val(q.coords.longitude);var r={lat:q.coords.latitude,lon:q.coords.longitude,token:$("#token").val()};n(j,r)},function(q){switch(q.code){case q.PERMISSION_DENIED:f("Location permission denied.");break;case q.TIMEOUT:f("Location lookup timeout.");break}},{timeout:10000})}else{if(e.length>0&&l.length>0){var o={lat:e,lon:l,token:$("#token").val()};n(j,o)}else{f();c.remove();k.remove()}}}else{var p=JSON.parse($.cookie(SN.C.S.NoticeDataGeoCookie));a.find("[name=lat]").val(p.NLat);a.find("[name=lon]").val(p.NLon);a.find("[name=location_ns]").val(p.NLNS);a.find("[name=location_id]").val(p.NLID);a.find("[name=notice_data-geo]").attr("checked",p.NDG);SN.U.NoticeGeoStatus(a,p.NLN,p.NLat,p.NLon,p.NLNU);k.attr("title",NoticeDataGeo_text.ShareDisable+" ("+p.NLN+")").addClass("checked")}}else{f()}}).change()}},NoticeGeoStatus:function(e,a,f,g,c){var h=e.find(".geo_status_wrapper");if(h.length==0){h=$('');h.find("button.close").click(function(){e.find("[name=notice_data-geo]").removeAttr("checked").change();return false});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(".vcard.author a.url").attr("href");if(d==c){if(a=="all"||a=="showstream"){return true}}}return false},switchInputFormTab:function(a){$(".input_form_nav_tab.current").removeClass("current");if(a=="placeholder"){$("#input_form_nav_status").addClass("current")}else{$("#input_form_nav_"+a).addClass("current")}var b=$(".input_form.current.nonav");if(b.length>0){return}$(".input_form.current").removeClass("current");$("#input_form_"+a).addClass("current").find(".ajax-notice").each(function(){var c=$(this);SN.Init.NoticeFormSetup(c)}).find(".notice_data-text").focus()}},Init:{NoticeForm:function(){if($("body.user_in").length>0){$("#input_form_placeholder input.placeholder").focus(function(){SN.U.switchInputFormTab("status")});$("body").bind("click",function(g){var d=$("#content .input_forms div.current");if(d.length>0){if($("#content .input_forms").has(g.target).length==0){var a=d.find('textarea, input[type=text], input[type=""]');var c=false;a.each(function(){c=c||$(this).val()});if(!c){SN.U.switchInputFormTab("placeholder")}}}var b=$("li.notice-reply");if(b.length>0){var f=$(g.target);b.each(function(){var k=$(this);if(k.has(g.target).length==0){var h=k.find(".notice_data-text:first");var j=$.trim(h.val());if(j==""||j==h.data("initialText")){var e=k.closest("li.notice");k.remove();e.find("li.notice-reply-placeholder").show()}}})}});$(".input_forms fieldset fieldset label").inFieldLabels({fadeOpacity:0})}},NoticeFormSetup:function(a){if(!a.data("NoticeFormSetup")){SN.U.NoticeLocationAttach(a);SN.U.FormNoticeXHR(a);SN.U.FormNoticeEnhancements(a);SN.U.NoticeDataAttach(a);a.data("NoticeFormSetup",true)}},Notices:function(){if($("body.user_in").length>0){var a=$(".form_notice:first");if(a.length>0){SN.C.I.NoticeFormMaster=document._importNode(a[0],true)}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});$(".form_peopletag_subscribe").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_peopletag_unsubscribe").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_user_add_peopletag").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_user_remove_peopletag").live("click",function(){SN.U.FormXHR($(this));return false});SN.U.NewDirectMessage()}},ProfileSearch:function(){if($("body.user_in").length>0){$(".form_peopletag_edit_user_search input.submit").live("click",function(){SN.U.FormProfileSearchXHR($(this).parents("form"));return false})}},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})},PeopletagAutocomplete:function(b){var a=function(d){return d.split(/\s+/)};var c=function(d){return a(d).pop()};b.live("keydown",function(d){if(d.keyCode===$.ui.keyCode.TAB&&$(this).data("autocomplete").menu.active){d.preventDefault()}}).autocomplete({minLength:0,source:function(e,d){d($.ui.autocomplete.filter(SN.C.PtagACData,c(e.term)))},focus:function(){return false},select:function(e,f){var d=a(this.value);d.pop();d.push(f.item.value);d.push("");this.value=d.join(" ");return false}}).data("autocomplete")._renderItem=function(e,f){var d=''+f.tag+' '+f.mode+' '+f.freq+" ";return $(" ").addClass("mode-"+f.mode).addClass("ptag-ac-line").data("item.autocomplete",f).append(d).appendTo(e)}},PeopleTags:function(){$(".user_profile_tags .editable").append($(' '));$(".peopletags_edit_button").live("click",function(){var a=$(this).parents("dd").eq(0).find("form");$.ajax({url:_peopletagAC,dataType:"json",data:{token:$("#token").val()},ifModified:true,success:function(b){for(i=0;i ').attr("name",a.attr("name")).val(a.val()).appendTo(b)})},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}}})},CheckBoxes:function(){$("span[class='checkbox-wrapper']").addClass("unchecked");$(".checkbox-wrapper").click(function(){if($(this).children("input").attr("checked")){$(this).children("input").attr({checked:""});$(this).removeClass("checked");$(this).addClass("unchecked");$(this).children("label").text("Private?")}else{$(this).children("input").attr({checked:"checked"});$(this).removeClass("unchecked");$(this).addClass("checked");$(this).children("label").text("Private")}})}}};$(document).ready(function(){SN.Init.AjaxForms();SN.Init.UploadForms();SN.Init.CheckBoxes();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($("#profile_search_results").length>0){SN.Init.ProfileSearch()}if($(".user_profile_tags .editable").length>0){SN.Init.PeopleTags()}});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 k=c.pop();k()}}};window._google_loader_apiLoaded=function(){f()};var d=function(){return(window.google&&google.loader)};var g=function(k){if(d()){return true}h(k);e();return false};e();return{shim:true,type:"ClientLocation",lastPosition:null,getCurrentPosition:function(l,o,p){var n=this;if(!g(function(){n.getCurrentPosition(l,o,p)})){return}if(google.loader.ClientLocation){var m=google.loader.ClientLocation;var k={coords:{latitude:m.latitude,longitude:m.longitude,altitude:null,accuracy:43000,altitudeAccuracy:null,heading:null,speed:null},address:{city:m.address.city,country:m.address.country,country_code:m.address.country_code,region:m.address.region},timestamp:new Date()};l(k);this.lastPosition=k}else{if(o==="function"){o({code:3,message:"Using the Google ClientLocation API and it is not able to calculate a location."})}}},watchPosition:function(k,m,n){this.getCurrentPosition(k,m,n);var l=this;var o=setInterval(function(){l.getCurrentPosition(k,m,n)},10000);return o},clearWatch:function(k){clearInterval(k)},getPermission:function(m,k,l){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],NoticeFormMaster:null},S:{Disabled:"disabled",Warning:"warning",Error:"error",Success:"success",Processing:"processing",CommandResult:"command_result",FormNotice:"form_notice",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(".notice_data-text:first");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(".notice_data-text:first").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,b){$.ajax({type:"POST",dataType:"xml",url:SN.U.RewriteAjaxAction(a.attr("action")),data:a.serialize()+"&ajax=1",beforeSend:function(c){a.addClass(SN.C.S.Processing).find(".submit").addClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,SN.C.S.Disabled)},error:function(e,f,d){var c=null;if(e.responseXML){c=$("#error",e.responseXML).text()}alert(c||d||f);a.removeClass(SN.C.S.Processing).find(".submit").removeClass(SN.C.S.Disabled).removeAttr(SN.C.S.Disabled)},success:function(c,d){if(typeof($("form",c)[0])!="undefined"){form_new=document._importNode($("form",c)[0],true);a.replaceWith(form_new);if(b){b()}}else{if(typeof($("p",c)[0])!="undefined"){a.replaceWith(document._importNode($("p",c)[0],true));if(b){b()}}else{alert("Unknown error.")}}}})},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(".notice_data-text:first").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(j,f){a();var p=$("#"+SN.C.S.Error,j);if(p.length>0){c("error",p.text())}else{if($("body")[0].id=="bookmarklet"){self.close()}var d=$("#"+SN.C.S.CommandResult,j);if(d.length>0){c("success",d.text())}else{var o=document._importNode($("li",j)[0],true);var k=$("#notices_primary .notices:first");var m=b.closest("li.notice-reply");if(m.length>0){var l=b.closest(".threaded-replies");var n=l.find(".notice-reply-placeholder");m.remove();var e=$(o).attr("id");if($("#"+e).length==0){$(o).insertBefore(n)}else{}n.show()}else{if(k.length>0&&SN.U.belongsOnTimeline(o)){if($("#"+o.id).length===0){var h=b.find("[name=inreplyto]").val();var g="#notices_primary #notice-"+h;if($("body")[0].id=="conversation"){if(h.length>0&&$(g+" .notices").length<1){$(g).append('')}$($(g+" .notices")[0]).append(o)}else{k.prepend(o)}$("#"+o.id).css({display:"none"}).fadeIn(2500);SN.U.NoticeWithAttachment($("#"+o.id));SN.U.switchInputFormTab("placeholder")}}else{c("success",$("title",j).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);b.find("[name=notice_data-geo]").attr("checked",SN.C.I.NoticeDataGeo.NDG)}})},FormProfileSearchXHR:function(a){$.ajax({type:"POST",dataType:"xml",url: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(d,f){var b=$("#profile_search_results");if(typeof($("ul",d)[0])!="undefined"){var c=document._importNode($("ul",d)[0],true);b.replaceWith(c)}else{var e=$(" ").append(document._importNode($("p",d)[0],true));b.html(e)}a.removeClass(SN.C.S.Processing).find(".submit").removeClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,false)}})},FormPeopletagsXHR:function(a){$.ajax({type:"POST",dataType:"xml",url:a.attr("action"),data:a.serialize()+"&ajax=1",beforeSend:function(b){a.find(".submit").addClass(SN.C.S.Processing).addClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,SN.C.S.Disabled)},error:function(c,d,b){alert(b||d)},success:function(d,e){var c=a.parents(".entity_tags");if(typeof($(".entity_tags",d)[0])!="undefined"){var b=document._importNode($(".entity_tags",d)[0],true);$(b).find(".editable").append($(' '));c.replaceWith(b)}else{c.find("p").remove();c.append(document._importNode($("p",d)[0],true));a.removeClass(SN.C.S.Processing).find(".submit").removeClass(SN.C.S.Disabled).attr(SN.C.S.Disabled,false)}}})},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=a.find("[name=notice_data-geo]").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=a.find("[name=notice_data-geo]").attr("checked",false).attr("checked")}else{SN.C.I.NoticeDataGeo.NDG=a.find("[name=notice_data-geo]").attr("checked",true).attr("checked")}},GetResponseXML:function(b){try{return b.responseXML}catch(a){return(new DOMParser()).parseFromString(b.responseText,"text/xml")}},NoticeReply:function(){$("#content .notice_reply").live("click",function(b){b.preventDefault();var a=$(this).closest("li.notice");SN.U.NoticeInlineReplyTrigger(a);return false})},NoticeReplyTo:function(a){},NoticeInlineReplyTrigger:function(j,k){var b=$($(".notice_id",j)[0]).text();var e=j;var f=j.closest(".notices");if(f.hasClass("threaded-replies")){e=f.closest(".notice")}else{f=$("ul.threaded-replies",j);if(f.length==0){SN.U.NoticeInlineReplyPlaceholder(j);f=$("ul.threaded-replies",j)}else{var h=$("li.notice-reply-placeholder",j);if(h.length==0){SN.U.NoticeInlineReplyPlaceholder(j)}}}var l=$(".notice-reply-form",f);var d=function(){l.find("input[name=inreplyto]").val(b);l.find("#notice_to").attr("disabled","disabled").hide();l.find("#notice_private").attr("disabled","disabled").hide();l.find("label[for=notice_to]").hide();l.find("label[for=notice_private]").hide();var o=l.find("textarea");if(o.length==0){throw"No textarea"}var n="";if(k){n=k+" "}o.val(n+o.val().replace(RegExp(n,"i"),""));o.data("initialText",$.trim(k+""));o.focus();if(o[0].setSelectionRange){var m=o.val().length;o[0].setSelectionRange(m,m)}};if(l.length>0){d()}else{var h=f.find("li.notice-reply-placeholder").hide();var g=$("li.notice-reply",f);if(g.length==0){g=$(' ');var c=function(m){var n=document._importNode(m,true);g.append(n);f.append(g);var o=l=$(n);SN.Init.NoticeFormSetup(o);d()};if(SN.C.I.NoticeFormMaster){c(SN.C.I.NoticeFormMaster)}else{var a=$("#form_notice").attr("action");$.get(a,{ajax:1},function(m,o,n){c($("form",m)[0])})}}}},NoticeInlineReplyPlaceholder:function(b){var a=b.find("ul.threaded-replies");if(a.length==0){a=$('');b.append(a);a=b.find("ul.threaded-replies")}var c=$(' ');c.find("input").val(SN.msg("reply_placeholder"));a.append(c)},NoticeInlineReplySetup:function(){$("li.notice-reply-placeholder input").live("focus",function(){var a=$(this).closest("li.notice");SN.U.NoticeInlineReplyTrigger(a);return false});$("li.notice-reply-comments a").live("click",function(){var a=$(this).attr("href");var b=$(this).closest(".threaded-replies");$.get(a,{ajax:1},function(d,f,e){var c=$(".threaded-replies",d);if(c.length){b.replaceWith(document._importNode(c[0],true))}});return false})},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(k){var j=$(" ").attr("title",e).attr("alt",e).attr("src",k).attr("style","height: 120px");d.find(".attach-status").append(j)})}else{var b=$("
").text(e);d.find(".attach-status").append(b)}},NoticeLocationAttach:function(a){var e=a.find("[name=lat]");var l=a.find("[name=lon]");var g=a.find("[name=location_ns]").val();var m=a.find("[name=location_id]").val();var b="";var d=a.find("[name=notice_data-geo]");var c=a.find("[name=notice_data-geo]");var k=a.find("label.notice_data-geo");function f(o){k.attr("title",jQuery.trim(k.text())).removeClass("checked");a.find("[name=lat]").val("");a.find("[name=lon]").val("");a.find("[name=location_ns]").val("");a.find("[name=location_id]").val("");a.find("[name=notice_data-geo]").attr("checked",false);$.cookie(SN.C.S.NoticeDataGeoCookie,"disabled",{path:"/"});if(o){a.find(".geo_status_wrapper").removeClass("success").addClass("error");a.find(".geo_status_wrapper .geo_status").text(o)}else{a.find(".geo_status_wrapper").remove()}}function n(o,p){SN.U.NoticeGeoStatus(a,"Looking up place name...");$.getJSON(o,p,function(q){var r,s;if(typeof(q.location_ns)!="undefined"){a.find("[name=location_ns]").val(q.location_ns);r=q.location_ns}if(typeof(q.location_id)!="undefined"){a.find("[name=location_id]").val(q.location_id);s=q.location_id}if(typeof(q.name)=="undefined"){NLN_text=p.lat+";"+p.lon}else{NLN_text=q.name}SN.U.NoticeGeoStatus(a,NLN_text,p.lat,p.lon,q.url);k.attr("title",NoticeDataGeo_text.ShareDisable+" ("+NLN_text+")");a.find("[name=lat]").val(p.lat);a.find("[name=lon]").val(p.lon);a.find("[name=location_ns]").val(r);a.find("[name=location_id]").val(s);a.find("[name=notice_data-geo]").attr("checked",true);var t={NLat:p.lat,NLon:p.lon,NLNS:r,NLID:s,NLN:NLN_text,NLNU:q.url,NDG:true};$.cookie(SN.C.S.NoticeDataGeoCookie,JSON.stringify(t),{path:"/"})})}if(c.length>0){if($.cookie(SN.C.S.NoticeDataGeoCookie)=="disabled"){c.attr("checked",false)}else{c.attr("checked",true)}var h=a.find(".notice_data-geo_wrap");var j=h.attr("data-api");k.attr("title",k.text());c.change(function(){if(c.attr("checked")===true||$.cookie(SN.C.S.NoticeDataGeoCookie)===null){k.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(a,"Requesting location from browser...");navigator.geolocation.getCurrentPosition(function(q){a.find("[name=lat]").val(q.coords.latitude);a.find("[name=lon]").val(q.coords.longitude);var r={lat:q.coords.latitude,lon:q.coords.longitude,token:$("#token").val()};n(j,r)},function(q){switch(q.code){case q.PERMISSION_DENIED:f("Location permission denied.");break;case q.TIMEOUT:f("Location lookup timeout.");break}},{timeout:10000})}else{if(e.length>0&&l.length>0){var o={lat:e,lon:l,token:$("#token").val()};n(j,o)}else{f();c.remove();k.remove()}}}else{var p=JSON.parse($.cookie(SN.C.S.NoticeDataGeoCookie));a.find("[name=lat]").val(p.NLat);a.find("[name=lon]").val(p.NLon);a.find("[name=location_ns]").val(p.NLNS);a.find("[name=location_id]").val(p.NLID);a.find("[name=notice_data-geo]").attr("checked",p.NDG);SN.U.NoticeGeoStatus(a,p.NLN,p.NLat,p.NLon,p.NLNU);k.attr("title",NoticeDataGeo_text.ShareDisable+" ("+p.NLN+")").addClass("checked")}}else{f()}}).change()}},NoticeGeoStatus:function(e,a,f,g,c){var h=e.find(".geo_status_wrapper");if(h.length==0){h=$('');h.find("button.close").click(function(){e.find("[name=notice_data-geo]").removeAttr("checked").change();return false});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(".vcard.author a.url").attr("href");if(d==c){if(a=="all"||a=="showstream"){return true}}}return false},switchInputFormTab:function(a){$(".input_form_nav_tab.current").removeClass("current");if(a=="placeholder"){$("#input_form_nav_status").addClass("current")}else{$("#input_form_nav_"+a).addClass("current")}var b=$(".input_form.current.nonav");if(b.length>0){return}$(".input_form.current").removeClass("current");$("#input_form_"+a).addClass("current").find(".ajax-notice").each(function(){var c=$(this);SN.Init.NoticeFormSetup(c)}).find(".notice_data-text").focus()}},Init:{NoticeForm:function(){if($("body.user_in").length>0){$("#input_form_placeholder input.placeholder").focus(function(){SN.U.switchInputFormTab("status")});$("body").bind("click",function(g){var d=$("#content .input_forms div.current");if(d.length>0){if($("#content .input_forms").has(g.target).length==0){var a=d.find('textarea, input[type=text], input[type=""]');var c=false;a.each(function(){c=c||$(this).val()});if(!c){SN.U.switchInputFormTab("placeholder")}}}var b=$("li.notice-reply");if(b.length>0){var f=$(g.target);b.each(function(){var k=$(this);if(k.has(g.target).length==0){var h=k.find(".notice_data-text:first");var j=$.trim(h.val());if(j==""||j==h.data("initialText")){var e=k.closest("li.notice");k.remove();e.find("li.notice-reply-placeholder").show()}}})}});$(".input_forms fieldset fieldset label").inFieldLabels({fadeOpacity:0})}},NoticeFormSetup:function(a){if(!a.data("NoticeFormSetup")){SN.U.NoticeLocationAttach(a);SN.U.FormNoticeXHR(a);SN.U.FormNoticeEnhancements(a);SN.U.NoticeDataAttach(a);a.data("NoticeFormSetup",true)}},Notices:function(){if($("body.user_in").length>0){var a=$(".form_notice:first");if(a.length>0){SN.C.I.NoticeFormMaster=document._importNode(a[0],true)}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});$(".form_peopletag_subscribe").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_peopletag_unsubscribe").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_user_add_peopletag").live("click",function(){SN.U.FormXHR($(this));return false});$(".form_user_remove_peopletag").live("click",function(){SN.U.FormXHR($(this));return false});SN.U.NewDirectMessage()}},ProfileSearch:function(){if($("body.user_in").length>0){$(".form_peopletag_edit_user_search input.submit").live("click",function(){SN.U.FormProfileSearchXHR($(this).parents("form"));return false})}},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})},PeopletagAutocomplete:function(b){var a=function(d){return d.split(/\s+/)};var c=function(d){return a(d).pop()};b.live("keydown",function(d){if(d.keyCode===$.ui.keyCode.TAB&&$(this).data("autocomplete").menu.active){d.preventDefault()}}).autocomplete({minLength:0,source:function(e,d){d($.ui.autocomplete.filter(SN.C.PtagACData,c(e.term)))},focus:function(){return false},select:function(e,f){var d=a(this.value);d.pop();d.push(f.item.value);d.push("");this.value=d.join(" ");return false}}).data("autocomplete")._renderItem=function(e,f){var d=''+f.tag+' '+f.mode+' '+f.freq+" ";return $(" ").addClass("mode-"+f.mode).addClass("ptag-ac-line").data("item.autocomplete",f).append(d).appendTo(e)}},PeopleTags:function(){$(".user_profile_tags .editable").append($(' '));$(".peopletags_edit_button").live("click",function(){var a=$(this).parents("dd").eq(0).find("form");$.ajax({url:_peopletagAC,dataType:"json",data:{token:$("#token").val()},ifModified:true,success:function(b){for(i=0;i ').attr("name",a.attr("name")).val(a.val()).appendTo(b)})},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}}})},CheckBoxes:function(){$("span[class='checkbox-wrapper']").addClass("unchecked");$(".checkbox-wrapper").click(function(){if($(this).children("input").attr("checked")){$(this).children("input").attr({checked:""});$(this).removeClass("checked");$(this).addClass("unchecked");$(this).children("label").text("Private?")}else{$(this).children("input").attr({checked:"checked"});$(this).removeClass("unchecked");$(this).addClass("checked");$(this).children("label").text("Private")}})}}};$(document).ready(function(){SN.Init.AjaxForms();SN.Init.UploadForms();SN.Init.CheckBoxes();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($("#profile_search_results").length>0){SN.Init.ProfileSearch()}if($(".user_profile_tags .editable").length>0){SN.Init.PeopleTags()}});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 k=c.pop();k()}}};window._google_loader_apiLoaded=function(){f()};var d=function(){return(window.google&&google.loader)};var g=function(k){if(d()){return true}h(k);e();return false};e();return{shim:true,type:"ClientLocation",lastPosition:null,getCurrentPosition:function(l,o,p){var n=this;if(!g(function(){n.getCurrentPosition(l,o,p)})){return}if(google.loader.ClientLocation){var m=google.loader.ClientLocation;var k={coords:{latitude:m.latitude,longitude:m.longitude,altitude:null,accuracy:43000,altitudeAccuracy:null,heading:null,speed:null},address:{city:m.address.city,country:m.address.country,country_code:m.address.country_code,region:m.address.region},timestamp:new Date()};l(k);this.lastPosition=k}else{if(o==="function"){o({code:3,message:"Using the Google ClientLocation API and it is not able to calculate a location."})}}},watchPosition:function(k,m,n){this.getCurrentPosition(k,m,n);var l=this;var o=setInterval(function(){l.getCurrentPosition(k,m,n)},10000);return o},clearWatch:function(k){clearInterval(k)},getPermission:function(m,k,l){return true}}});navigator.geolocation=(window.google&&google.gears)?a():b()})()};
\ No newline at end of file
diff --git a/lib/adminpanelnav.php b/lib/adminpanelnav.php
index b64a2a6a96..245438c614 100644
--- a/lib/adminpanelnav.php
+++ b/lib/adminpanelnav.php
@@ -61,6 +61,7 @@ class AdminPanelNav extends Menu
// Stub section w/ home link
$this->action->elementStart('ul');
+ $this->action->elementStart('li');
// TRANS: Header in administrator navigation panel.
$this->action->element('h3', null, _m('HEADER','Home'));
$this->action->elementStart('ul', 'nav');
@@ -74,9 +75,11 @@ class AdminPanelNav extends Menu
$this->action == 'all', 'nav_timeline_personal');
$this->action->elementEnd('ul');
+ $this->action->elementEnd('li');
$this->action->elementEnd('ul');
$this->action->elementStart('ul');
+ $this->action->elementStart('li');
// TRANS: Header in administrator navigation panel.
$this->action->element('h3', null, _m('HEADER','Admin'));
$this->action->elementStart('ul', array('class' => 'nav'));
@@ -166,6 +169,7 @@ class AdminPanelNav extends Menu
Event::handle('EndAdminPanelNav', array($this));
}
$this->action->elementEnd('ul');
+ $this->action->elementEnd('li');
$this->action->elementEnd('ul');
}
}
diff --git a/lib/inviteform.php b/lib/inviteform.php
index 7b3c164cc8..364ca75b9b 100644
--- a/lib/inviteform.php
+++ b/lib/inviteform.php
@@ -41,7 +41,6 @@ require_once INSTALLDIR . '/lib/form.php';
* @author Zach Copley
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
- *
*/
class InviteForm extends Form
{
@@ -65,16 +64,6 @@ class InviteForm extends Form
return 'form_invite';
}
- /**
- * class of the form
- *
- * @return string of the form class
- */
- function formClass()
- {
- return 'form_settings';
- }
-
/**
* Action of the form
*
@@ -105,21 +94,21 @@ class InviteForm extends Form
{
$this->out->elementStart('ul', 'form_data');
$this->out->elementStart('li');
- // TRANS: Field label for a list of e-mail addresses.
$this->out->textarea(
'addresses',
+ // TRANS: Field label for a list of e-mail addresses.
_('Email addresses'),
$this->out->trimmed('addresses'),
- // TRANS: Tooltip for field label for a list of e-mail addresses.
+ // TRANS: Field title for a list of e-mail addresses.
_('Addresses of friends to invite (one per line).')
);
$this->out->elementEnd('li');
$this->out->elementStart('li');
- // TRANS: Field label for a personal message to send to invitees.
$this->out->textarea(
+ // TRANS: Field label for a personal message to send to invitees.
'personal', _('Personal message'),
$this->out->trimmed('personal'),
- // TRANS: Tooltip for field label for a personal message to send to invitees.
+ // TRANS: Field title for a personal message to send to invitees.
_('Optionally add a personal message to the invitation.')
);
$this->out->elementEnd('li');
@@ -133,13 +122,13 @@ class InviteForm extends Form
*/
function formActions()
{
- // TRANS: Send button for inviting friends
$this->out->submit(
'send',
+ // TRANS: Send button for inviting friends
_m('BUTTON','Send'), 'submit form_action-primary',
- // TRANS: Submit button title.
'send',
- _('Send')
+ // TRANS: Submit button title.
+ _('Send invitations.')
);
}
}
diff --git a/lib/noticelistitem.php b/lib/noticelistitem.php
index 05b0dab16e..2d41e53017 100644
--- a/lib/noticelistitem.php
+++ b/lib/noticelistitem.php
@@ -245,7 +245,6 @@ class NoticeListItem extends Widget
if (!$first) {
$this->out->text( _m('SEPARATOR',', '));
} else {
- $this->out->text(_(' ▸ '));
$first = false;
}
$this->out->element('a', array('href' => $group->homeUrl(),
@@ -272,7 +271,6 @@ class NoticeListItem extends Widget
$this->out->text(_m('SEPARATOR',', '));
} else {
// TRANS: Start of profile addressees list.
- $this->out->text(_(' ▸ '));
$first = false;
}
$this->out->element('a', array('href' => $reply->profileurl,
diff --git a/lib/settingsnav.php b/lib/settingsnav.php
index 14eab6dc1d..f8c78ec6f1 100644
--- a/lib/settingsnav.php
+++ b/lib/settingsnav.php
@@ -61,6 +61,7 @@ class SettingsNav extends Menu
// Stub section w/ home link
$this->action->elementStart('ul');
+ $this->action->elementStart('li');
// TRANS: Header in settings navigation panel.
$this->action->element('h3', null, _m('HEADER','Home'));
$this->action->elementStart('ul', 'nav');
@@ -72,11 +73,12 @@ class SettingsNav extends Menu
// TRANS: %s is a username.
sprintf(_('%s and friends'), $name),
$this->action == 'all', 'nav_timeline_personal');
-
$this->action->elementEnd('ul');
+ $this->action->elementEnd('li');
$this->action->elementEnd('ul');
$this->action->elementStart('ul');
+ $this->action->elementStart('li');
// TRANS: Header in settings navigation panel.
$this->action->element('h3', null, _m('HEADER','Settings'));
$this->action->elementStart('ul', array('class' => 'nav'));
@@ -155,6 +157,7 @@ class SettingsNav extends Menu
}
$this->action->elementEnd('ul');
+ $this->action->elementEnd('li');
$this->action->elementEnd('ul');
}
}
diff --git a/plugins/DomainStatusNetwork/DomainStatusNetworkPlugin.php b/plugins/DomainStatusNetwork/DomainStatusNetworkPlugin.php
index e79a445f20..9390a6e083 100644
--- a/plugins/DomainStatusNetwork/DomainStatusNetworkPlugin.php
+++ b/plugins/DomainStatusNetwork/DomainStatusNetworkPlugin.php
@@ -77,6 +77,7 @@ class DomainStatusNetworkPlugin extends Plugin
$sn = Status_network::staticGet('nickname', $nickname);
} catch (Exception $e) {
$this->log(LOG_ERR, $e->getMessage());
+ return;
}
$tags = $sn->getTags();
diff --git a/plugins/DomainWhitelist/DomainWhitelistPlugin.php b/plugins/DomainWhitelist/DomainWhitelistPlugin.php
index e320fb2490..da49338fe7 100644
--- a/plugins/DomainWhitelist/DomainWhitelistPlugin.php
+++ b/plugins/DomainWhitelist/DomainWhitelistPlugin.php
@@ -118,7 +118,7 @@ class DomainWhitelistPlugin extends Plugin
} else {
// TRANS: Client exception thrown when a given e-mailaddress is not in the domain whitelist.
// TRANS: %s are whitelisted e-mail domains separated by comma's (localisable).
- $message = sprintf(_('Email address must be in one of these domains: %s.'),
+ $message = sprintf(_m('Email address must be in one of these domains: %s.'),
// TRANS: Separator for whitelisted domains.
implode(_m('SEPARATOR',', '), $whitelist));
}
@@ -132,7 +132,7 @@ class DomainWhitelistPlugin extends Plugin
{
if (!$this->matchesWhitelist($email)) {
// TRANS: Exception thrown when an e-mail address does not match the site's domain whitelist.
- throw new Exception(_('That email address is not allowed on this site.'));
+ throw new Exception(_m('That email address is not allowed on this site.'));
}
return true;
@@ -231,8 +231,9 @@ class DomainWhitelistPlugin extends Plugin
)
);
- array_unshift($orderedWhitelist, $userDomain);
-
+ if (in_array($userDomain, $whitelist)) {
+ array_unshift($orderedWhitelist, $userDomain);
+ }
return $orderedWhitelist;
}
@@ -248,11 +249,25 @@ class DomainWhitelistPlugin extends Plugin
*/
function onStartShowInviteForm($action)
{
+ $this->showConfirmDialog($action);
$form = new WhitelistInviteForm($action, $this->getWhitelist());
$form->show();
return false;
}
+ function showConfirmDialog($action)
+ {
+ // For JQuery UI modal dialog
+ $action->elementStart(
+ 'div',
+ // TRANS: Title for invitiation deletion dialog.
+ array('id' => 'confirm-dialog', 'title' => _m('Confirmation Required'))
+ );
+ // TRANS: Confirmation text for invitation deletion dialog.
+ $action->text(_m('Really delete this invitation?'));
+ $action->elementEnd('div');
+ }
+
/**
* This is a bit of a hack. We take the values from the custom
* whitelist invite form and reformat them so they look like
diff --git a/plugins/DomainWhitelist/js/whitelistinvite.js b/plugins/DomainWhitelist/js/whitelistinvite.js
index d6a5a29eed..01e493fa6a 100644
--- a/plugins/DomainWhitelist/js/whitelistinvite.js
+++ b/plugins/DomainWhitelist/js/whitelistinvite.js
@@ -2,12 +2,16 @@
var SN_WHITELIST = SN_WHITELIST || {};
SN_WHITELIST.updateButtons = function() {
+ $("ul > li > a.remove_row").show();
+ $("ul > li > a.add_row").hide();
+
var lis = $('ul > li > input[name^="username[]"]');
if (lis.length === 1) {
$("ul > li > a.remove_row").hide();
} else {
$("ul > li > a.remove_row:first").show();
}
+ $("ul > li > a.add_row:last").show();
};
SN_WHITELIST.resetRow = function(row) {
@@ -20,21 +24,49 @@ SN_WHITELIST.resetRow = function(row) {
SN_WHITELIST.addRow = function() {
var row = $(this).closest("li");
var newRow = row.clone();
+ $(row).find('a.add_row').hide();
SN_WHITELIST.resetRow(newRow);
- $(newRow).insertAfter(row).show("blind", "slow", function() {
+ $(newRow).insertAfter(row).show("blind", "fast", function() {
SN_WHITELIST.updateButtons();
});
};
SN_WHITELIST.removeRow = function() {
- $(this).closest("li").hide("blind", "slow", function() {
- $(this).remove();
- SN_WHITELIST.updateButtons();
+ var that = this;
+
+ $("#confirm-dialog").dialog({
+ buttons : {
+ "Confirm" : function() {
+ $(this).dialog("close");
+ $(that).closest("li").hide("blind", "fast", function() {
+ $(this).remove();
+ SN_WHITELIST.updateButtons();
+ });
+ },
+ "Cancel" : function() {
+ $(this).dialog("close");
+ }
+ }
});
+
+ if ($(this).closest('li').find(':input[name^=username]').val()) {
+ $("#confirm-dialog").dialog("open");
+ } else {
+ $(that).closest("li").hide("blind", "fast", function() {
+ $(this).remove();
+ SN_WHITELIST.updateButtons();
+ });
+ }
};
$(document).ready(function() {
+ $("#confirm-dialog").dialog({
+ autoOpen: false,
+ modal: true
+ });
+
$('.add_row').live('click', SN_WHITELIST.addRow);
$('.remove_row').live('click', SN_WHITELIST.removeRow);
-});
+ SN_WHITELIST.updateButtons();
+});
diff --git a/plugins/DomainWhitelist/lib/whitelistinviteform.php b/plugins/DomainWhitelist/lib/whitelistinviteform.php
index 72029bc3e8..77a48f92fa 100644
--- a/plugins/DomainWhitelist/lib/whitelistinviteform.php
+++ b/plugins/DomainWhitelist/lib/whitelistinviteform.php
@@ -46,7 +46,7 @@ require_once INSTALLDIR . '/lib/form.php';
class WhitelistInviteForm extends Form
{
private $whitelist = null;
-
+
/**
* Constructor
*
@@ -86,7 +86,7 @@ class WhitelistInviteForm extends Form
function formLegend()
{
// TRANS: Form legend.
- $this->out->element('legend', null, _('Invite collegues'));
+ $this->out->element('legend', null, _m('Invite collegues'));
}
/**
@@ -101,17 +101,17 @@ class WhitelistInviteForm extends Form
$this->showEmailLI();
}
$this->out->elementStart('li');
- // TRANS: Field label for a personal message to send to invitees.
$this->out->textarea(
- 'personal', _('Personal message'),
+ // TRANS: Field label for a personal message to send to invitees.
+ 'personal', _m('Personal message'),
$this->out->trimmed('personal'),
- // TRANS: Tooltip for field label for a personal message to send to invitees.
- _('Optionally add a personal message to the invitation.')
+ // TRANS: Field title for a personal message to send to invitees.
+ _m('Optionally add a personal message to the invitation.')
);
$this->out->elementEnd('li');
$this->out->elementEnd('ul');
}
-
+
function showEmailLI()
{
$this->out->elementStart('li');
@@ -119,8 +119,8 @@ class WhitelistInviteForm extends Form
$this->out->text('@');
if (count($this->whitelist) == 1) {
$this->out->element(
- 'span',
- array('class' => 'email_invite'),
+ 'span',
+ array('class' => 'email_invite'),
$this->whitelist[0]
);
$this->out->hidden('domain[]', $this->whitelist[0]);
@@ -134,14 +134,15 @@ class WhitelistInviteForm extends Form
$this->showMultiControls();
$this->out->elementEnd('li');
}
-
+
function showMultiControls()
{
$this->out->element(
'a',
array(
'class' => 'remove_row',
- 'href' => 'javascript://',
+ 'href' => 'javascript://',
+ 'style' => 'display: none;'
),
'-'
);
@@ -150,21 +151,14 @@ class WhitelistInviteForm extends Form
'a',
array(
'class' => 'add_row',
- 'href' => 'javascript://',
+ 'href' => 'javascript://',
+ 'style' => 'display: none;'
),
- '+'
+ // TRANS: Link description to action to add another item to a list.
+ _m('Add another item')
);
}
-
- function getUsersDomain()
- {
- $user = common_current_user();
-
- assert(!empty($user));
-
-
- }
-
+
/**
* Action elements
*
@@ -172,13 +166,13 @@ class WhitelistInviteForm extends Form
*/
function formActions()
{
- // TRANS: Send button for inviting friends
$this->out->submit(
'send',
+ // TRANS: Send button for inviting friends.
_m('BUTTON','Send'), 'submit form_action-primary',
- // TRANS: Submit button title.
'send',
- _('Send')
+ // TRANS: Submit button title.
+ _m('Send invitations.')
);
}
}
diff --git a/plugins/EmailRegistration/emailregister.php b/plugins/EmailRegistration/emailregister.php
index a7c8e8a2da..1b0902587f 100644
--- a/plugins/EmailRegistration/emailregister.php
+++ b/plugins/EmailRegistration/emailregister.php
@@ -107,7 +107,11 @@ class EmailregisterAction extends Action
$this->invitation = Invitation::staticGet('code', $this->code);
- if (empty($this->invitation)) {
+ if (!empty($this->invitation)) {
+ if (!empty($this->invitation->registered_user_id)) {
+ throw new ClientException(_m('Invitation already used.'), 403);
+ }
+ } else {
$this->confirmation = Confirm_address::staticGet('code', $this->code);
@@ -133,6 +137,9 @@ class EmailregisterAction extends Action
} else {
$this->invitation = Invitation::staticGet('code', $this->code);
if (!empty($this->invitation)) {
+ if (!empty($this->invitation->registered_user_id)) {
+ throw new ClientException(_m('Invitation already used.'), 403);
+ }
$this->state = self::CONFIRMINVITE;
} else {
$this->state = self::CONFIRMREGISTER;
@@ -283,10 +290,15 @@ class EmailregisterAction extends Action
$nickname = $this->nicknameFromEmail($email);
try {
- $this->user = User::register(array('nickname' => $nickname,
- 'email' => $email,
- 'password' => $this->password1,
- 'email_confirmed' => true));
+ $fields = array('nickname' => $nickname,
+ 'email' => $email,
+ 'password' => $this->password1,
+ 'email_confirmed' => true);
+
+ if (!empty($this->invitation)) {
+ $fields['code'] = $this->invitation->code;
+ }
+ $this->user = User::register($fields);
} catch (ClientException $e) {
$this->error = $e->getMessage();
$nickname = $this->nicknameFromEmail($email);
@@ -306,18 +318,8 @@ class EmailregisterAction extends Action
// Re-init language env in case it changed (not yet, but soon)
common_init_language();
- if (!empty($this->invitation)) {
- $inviter = User::staticGet('id', $this->invitation->user_id);
- if (!empty($inviter)) {
- Subscription::start($inviter->getProfile(),
- $this->user->getProfile());
- }
-
- $this->invitation->delete();
- } else if (!empty($this->confirmation)) {
+ if (!empty($this->confirmation)) {
$this->confirmation->delete();
- } else {
- throw new Exception('No confirmation thing.');
}
Event::handle('EndRegistrationTry', array($this));
diff --git a/plugins/EmailRegistration/scripts/cancelemailregistration.php b/plugins/EmailRegistration/scripts/cancelemailregistration.php
index e6430e850f..d834aade60 100644
--- a/plugins/EmailRegistration/scripts/cancelemailregistration.php
+++ b/plugins/EmailRegistration/scripts/cancelemailregistration.php
@@ -27,7 +27,7 @@ $helptext = <<
Options:
--d --dryrun Don't actually delete the email registration and confirmation code
+-d --dryrun Do not actually delete the email registration and confirmation code
Cancel an email registration code
diff --git a/plugins/ExtendedProfile/css/profiledetail.css b/plugins/ExtendedProfile/css/profiledetail.css
index 7de7e88ff5..def07f3beb 100644
--- a/plugins/ExtendedProfile/css/profiledetail.css
+++ b/plugins/ExtendedProfile/css/profiledetail.css
@@ -119,7 +119,7 @@
height: 16px;
width: 16px;
overflow: hidden;
- background-image: url('../../../theme/rebase/images/icons/icons-01.gif');
+ background-image: url('../../../theme/base/images/icons/icons-01.gif');
background-repeat: no-repeat;
}
diff --git a/plugins/ExtendedProfile/lib/extendedprofilewidget.php b/plugins/ExtendedProfile/lib/extendedprofilewidget.php
index 03be420bea..f04dccd0ae 100644
--- a/plugins/ExtendedProfile/lib/extendedprofilewidget.php
+++ b/plugins/ExtendedProfile/lib/extendedprofilewidget.php
@@ -328,7 +328,7 @@ class ExtendedProfileWidget extends Form
if (!empty($field['company'])) {
$this->out->element('div', 'field', $field['company']);
- // TRANS: Field label in experience area of extended profile (when did one start a position).
+ // TRANS: Field label in extended profile (when did one start a position or education).
$this->out->element('div', 'label', _m('Start'));
$this->out->element(
'div',
@@ -336,7 +336,7 @@ class ExtendedProfileWidget extends Form
date('j M Y', strtotime($field['start'])
)
);
- // TRANS: Field label in experience area of extended profile (when did one end a position).
+ // TRANS: Field label in extended profile (when did one end a position or education).
$this->out->element('div', 'label', _m('End'));
$this->out->element(
'div',
@@ -376,7 +376,7 @@ class ExtendedProfileWidget extends Form
isset($field['company']) ? $field['company'] : null
);
- // TRANS: Field label in experience edit area of extended profile (when did one start at a company).
+ // TRANS: Field label in extended profile (when did one start a position or education).
$this->out->element('div', 'label', _m('Start'));
$this->out->input(
$id . '-start',
@@ -384,7 +384,7 @@ class ExtendedProfileWidget extends Form
isset($field['start']) ? date('j M Y', strtotime($field['start'])) : null
);
- // TRANS: Field label in experience edit area of extended profile (when did one terminate at a company).
+ // TRANS: Field label in extended profile (when did one end a position or education).
$this->out->element('div', 'label', _m('End'));
$this->out->input(
@@ -416,13 +416,13 @@ class ExtendedProfileWidget extends Form
$this->out->element('div', 'label', _m('Institution'));
if (!empty($field['school'])) {
$this->out->element('div', 'field', $field['school']);
- // TRANS: Field label in education area of extended profile.
+ // TRANS: Field label in extended profile for specifying an academic degree.
$this->out->element('div', 'label', _m('Degree'));
$this->out->element('div', 'field', $field['degree']);
// TRANS: Field label in education area of extended profile.
$this->out->element('div', 'label', _m('Description'));
$this->out->element('div', 'field', $field['description']);
- // TRANS: Field label in education area of extended profile (when did one start an education).
+ // TRANS: Field label in extended profile (when did one start a position or education).
$this->out->element('div', 'label', _m('Start'));
$this->out->element(
'div',
@@ -430,7 +430,7 @@ class ExtendedProfileWidget extends Form
date('j M Y', strtotime($field['start'])
)
);
- // TRANS: Field label in education area of extended profile (when did one end a education).
+ // TRANS: Field label in extended profile (when did one end a position or education).
$this->out->element('div', 'label', _m('End'));
$this->out->element(
'div',
@@ -460,7 +460,7 @@ class ExtendedProfileWidget extends Form
isset($field['school']) ? $field['school'] : null
);
- // TRANS: Field label in education edit area of extended profile.
+ // TRANS: Field label in extended profile for specifying an academic degree.
$this->out->element('div', 'label', _m('Degree'));
$this->out->input(
$id . '-degree',
@@ -477,7 +477,7 @@ class ExtendedProfileWidget extends Form
isset($field['description']) ? $field['description'] : null
);
- // TRANS: Field label in education edit area of extended profile (when did one start an education).
+ // TRANS: Field label in extended profile (when did one start a position or education).
$this->out->element('div', 'label', _m('Start'));
$this->out->input(
$id . '-start',
@@ -486,7 +486,7 @@ class ExtendedProfileWidget extends Form
isset($field['start']) ? date('j M Y', strtotime($field['start'])) : null
);
- // TRANS: Field label in education edit area of extended profile (when did one end an education).
+ // TRANS: Field label in extended profile (when did one end a position or education).
$this->out->element('div', 'label', _m('End'));
$this->out->input(
$id . '-end',
diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php
index 7e005731b6..796bd3b529 100644
--- a/plugins/MobileProfile/MobileProfilePlugin.php
+++ b/plugins/MobileProfile/MobileProfilePlugin.php
@@ -277,10 +277,7 @@ class MobileProfilePlugin extends WAP20Plugin
$action->elementStart('div', array('id' => 'header'));
$this->_showLogo($action);
- $this->_showPrimaryNav($action);
- if (common_logged_in()) {
- $action->showNoticeForm();
- }
+ $action->showPrimaryNav();
$action->elementEnd('div');
return false;
@@ -305,91 +302,6 @@ class MobileProfilePlugin extends WAP20Plugin
$action->elementEnd('address');
}
- function _showPrimaryNav($action)
- {
- $user = common_current_user();
- $action->elementStart('ul', array('id' => 'site_nav_global_primary'));
- if ($user) {
- $action->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
- // TRANS: Menu item in mobile profile to go to start page of site.
- _m('Home'));
- $action->menuItem(common_local_url('profilesettings'),
- // TRANS: Menu item in mobile profile to go to user account settings.
- _m('Account'));
- $action->menuItem(common_local_url('oauthconnectionssettings'),
- // TRANS: Menu item in mobile profile to connect to other services.
- _m('Connect'));
- if ($user->hasRight(Right::CONFIGURESITE)) {
- $action->menuItem(common_local_url('siteadminpanel'),
- // TRANS: Menu item in mobile profile to manage site settings.
- _m('Admin'),
- _m('Change site configuration'), false, 'nav_admin');
- }
- if (common_config('invite', 'enabled')) {
- $action->menuItem(common_local_url('invite'),
- // TRANS: Menu item in mobile profile to invite other people.
- _m('Invite'));
- }
- $action->menuItem(common_local_url('logout'),
- // TRANS: Menu item in mobile profile log the current user off.
- _m('Logout'));
- } else {
- if (!common_config('site', 'closed')) {
- $action->menuItem(common_local_url('register'),
- // TRANS: Menu item in mobile profile to register with the site.
- _m('Register'));
- }
- $action->menuItem(common_local_url('login'),
- // TRANS: Menu item in mobile profile to log in.
- _m('Login'));
- }
- if ($user || !common_config('site', 'private')) {
- $action->menuItem(common_local_url('peoplesearch'),
- // TRANS: Menu item in mobile profile to search the site.
- _m('Search'));
- }
- $action->elementEnd('ul');
- }
-
- function onStartShowNoticeFormData($form)
- {
- if (!$this->serveMobile) {
- return true;
- }
-
- $form->out->element('textarea', array('id' => 'notice_data-text',
- 'cols' => 15,
- 'rows' => 4,
- 'name' => 'status_textarea'),
- ($form->content) ? $form->content : '');
-
- $contentLimit = Notice::maxContent();
-
- if ($contentLimit > 0) {
- $form->out->element('div', array('class' => 'count'),
- $contentLimit);
- }
-
- if (common_config('attachments', 'uploads')) {
- if ($this->mobileFeatures['inputfiletype']) {
- $form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
- // TRANS: Field label in mobile profile to attach a file to a status.
- $form->out->element('label', array('for' => 'notice_data-attach'), _m('Attach'));
- $form->out->element('input', array('id' => 'notice_data-attach',
- 'type' => 'file',
- 'name' => 'attach',
- // TRANS: Field title in mobile profile to attach a file to a status.
- 'title' => _m('Attach a file.')));
- }
- }
- if ($form->action) {
- $form->out->hidden('notice_return-to', $form->action, 'returnto');
- }
- $form->out->hidden('notice_in-reply-to', $form->inreplyto, 'inreplyto');
-
- return false;
- }
-
function onStartShowAside($action)
{
if ($this->serveMobile) {
@@ -397,8 +309,18 @@ class MobileProfilePlugin extends WAP20Plugin
}
}
+ function onStartShowLocalNavBlock($action)
+ {
+ if ($this->serveMobile) {
+ // @todo FIXME: "Show Navigation" / "Hide Navigation" needs i18n
+ $action->element('a', array('href' => '#', 'id' => 'navtoggle'), 'Show Navigation');
+ return true;
+ }
+ }
+
function onEndShowScripts($action)
{
+ // @todo FIXME: "Show Navigation" / "Hide Navigation" needs i18n
$action->inlineScript('
$(function() {
$("#mobile-toggle-disable").click(function() {
@@ -411,6 +333,12 @@ class MobileProfilePlugin extends WAP20Plugin
window.location.reload();
return false;
});
+ $("#navtoggle").click(function () {
+ $("#site_nav_local_views").fadeToggle();
+ var text = $("#navtoggle").text();
+ $("#navtoggle").text(
+ text == "Show Navigation" ? "Hide Navigation" : "Show Navigation");
+ });
});'
);
}
diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php
index af343362fb..1a02cdc8d3 100644
--- a/plugins/OStatus/OStatusPlugin.php
+++ b/plugins/OStatus/OStatusPlugin.php
@@ -327,7 +327,8 @@ class OStatusPlugin extends Plugin
return false;
} catch (Exception $e) {
- // TRANS: Error message in OStatus plugin.
+ // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
+ // TRANS: and example.net, as these are official standard domain names for use in examples.
$err = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
}
@@ -360,7 +361,8 @@ class OStatusPlugin extends Plugin
return $this->filter(array($oprofile->localProfile()));
} catch (Exception $e) {
- // TRANS: Error message in OStatus plugin.
+ // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
+ // TRANS: and example.net, as these are official standard domain names for use in examples.
$this->msg = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
return array();
}
diff --git a/plugins/OStatus/actions/ostatusgroup.php b/plugins/OStatus/actions/ostatusgroup.php
index f2170c0346..e2c4121c3f 100644
--- a/plugins/OStatus/actions/ostatusgroup.php
+++ b/plugins/OStatus/actions/ostatusgroup.php
@@ -77,7 +77,8 @@ class OStatusGroupAction extends OStatusSubAction
// TRANS: Field label.
_m('Join group'),
$this->profile_uri,
- // TRANS: Tooltip for field label "Join group".
+ // TRANS: Tooltip for field label "Join group". Do not translate the "example.net"
+ // TRANS: domain name in the URL, as it is an official standard domain name for examples.
_m("OStatus group's address, like http://example.net/group/nickname."));
$this->elementEnd('li');
$this->elementEnd('ul');
diff --git a/plugins/OStatus/actions/ostatussub.php b/plugins/OStatus/actions/ostatussub.php
index c592e8b380..00f9c81faa 100644
--- a/plugins/OStatus/actions/ostatussub.php
+++ b/plugins/OStatus/actions/ostatussub.php
@@ -228,14 +228,16 @@ class OStatusSubAction extends Action
} else if (Validate::uri($this->profile_uri)) {
$this->oprofile = Ostatus_profile::ensureProfileURL($this->profile_uri);
} else {
- // TRANS: Error text.
+ // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
+ // TRANS: and example.net, as these are official standard domain names for use in examples.
$this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
common_debug('Invalid address format.', __FILE__);
return false;
}
return true;
} catch (FeedSubBadURLException $e) {
- // TRANS: Error text.
+ // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
+ // TRANS: and example.net, as these are official standard domain names for use in examples.
$this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
common_debug('Invalid URL or could not reach server.', __FILE__);
} catch (FeedSubBadResponseException $e) {
@@ -260,7 +262,8 @@ class OStatusSubAction extends Action
common_debug('Not a recognized feed type.', __FILE__);
} catch (Exception $e) {
// Any new ones we forgot about
- // TRANS: Error text.
+ // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
+ // TRANS: and example.net, as these are official standard domain names for use in examples.
$this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
common_debug(sprintf('Bad feed URL: %s %s', get_class($e), $e->getMessage()), __FILE__);
}
diff --git a/plugins/OStatus/actions/ostatustag.php b/plugins/OStatus/actions/ostatustag.php
index 95f56bbfc4..1df74d9079 100644
--- a/plugins/OStatus/actions/ostatustag.php
+++ b/plugins/OStatus/actions/ostatustag.php
@@ -74,7 +74,7 @@ class OStatusTagAction extends OStatusInitAction
// TRANS: Field label.
$this->input('profile', _m('Profile Account'), $this->profile,
// TRANS: Field title.
- _m('Your account id (i.e. user@identi.ca).'));
+ _m('Your account id (for example user@identi.ca).'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('submit', $submit);
diff --git a/theme/base/css/display.css b/theme/base/css/display.css
index c6247522c2..6ae14d2c7d 100644
--- a/theme/base/css/display.css
+++ b/theme/base/css/display.css
@@ -414,6 +414,14 @@ address .poweredby {
margin-right: 8px;
}
+.notice .addressees:before {
+ content: '\25B8';
+}
+
+.notice .addressees:empty:before {
+ content: none;
+}
+
.fn {
overflow: hidden;
}
diff --git a/theme/neo/css/display.css b/theme/neo/css/display.css
index 2ca9831963..2ab4b9158d 100644
--- a/theme/neo/css/display.css
+++ b/theme/neo/css/display.css
@@ -1057,7 +1057,7 @@ background-color:rgba(200, 200, 200, 0.300);
background-color: #f2f2f2;
}
-.form_notice input.submit, .form_settings input.submit, .form_settings input.cancel {
+.form_notice input.submit, .form_settings input.submit, .form_settings input.cancel, #form_invite input.submit {
height: 1.9em;
padding: 0px 10px;
color:#fff;
@@ -1075,7 +1075,7 @@ background-color:rgba(200, 200, 200, 0.300);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff9d63', endColorstr='#FB6104',GradientType=0 );
}
-.form_notice input.submit:hover, .form_settings input.submit:hover, .form_settings input.cancel:hover {
+.form_notice input.submit:hover, .form_settings input.submit:hover, .form_settings input.cancel:hover, #form_invite input.submit:hover {
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.6);
background: #ff9d63;
background: -moz-linear-gradient(top, #FB6104 , #fc8035);
@@ -1128,6 +1128,78 @@ background-color:rgba(200, 200, 200, 0.300);
padding-top: 25px;
}
+#invite #content p {
+ margin-bottom: 15px;
+}
+
+#invite #content ul {
+ list-style-type: none;
+ margin-bottom: 25px;
+ margin-left: 25px;
+}
+
+#invite #content li {
+ background: url(../images/resultset_next.png) no-repeat 0px 3px;
+ padding-left: 20px;
+ margin-bottom: 10px;
+}
+
+#invite #content #form_invite ul, #invite #content #form_invite li {
+ margin-left: 0px;
+ padding-left: 0px;
+ background: none;
+}
+
+#form_invite input[type=text], #form_invite textarea {
+ width: 250px;
+ padding: 5px;
+ border: 1px solid #a6a6a6;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
+ -webkit-box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
+}
+
+#form_invite textarea {
+ clear: left;
+ width: 508px;
+ height: 48px;
+}
+
+#form_invite a.add_row, #form_invite a.remove_row {
+ display: block;
+ height: 16px;
+ width: 16px;
+ overflow: hidden;
+ background-image: url('../../base/images/icons/icons-01.gif');
+ background-repeat: no-repeat;
+}
+
+#form_invite a.remove_row {
+ background-position: 0px -1252px;
+ display: inline-block;
+ position: relative;
+ top: 4px;
+ left: 10px;
+ line-height: 4em;
+}
+
+#form_invite a.add_row {
+ clear: both;
+ position: relative;
+ top: 10px;
+ background-position: 0px -1186px;
+ width: 120px;
+ padding-left: 20px;
+ line-height: 1.2em;
+}
+
+#form_invite label[for=personal] {
+ display: block;
+ margin-top: 25px;
+}
#content thead th {
text-align:left;
@@ -1339,6 +1411,11 @@ ul.bookmark-tags a:hover {
padding: 10px;
}
+.onboard_iframe #wrap {
+ width: auto;
+ background: none;
+}
+
.onboard_welcome p {
margin-bottom: 10px;
}
diff --git a/theme/neo/css/mp-screen.css b/theme/neo/css/mp-screen.css
index 1b7480ecaf..559e71ce00 100644
--- a/theme/neo/css/mp-screen.css
+++ b/theme/neo/css/mp-screen.css
@@ -10,36 +10,41 @@ body {
padding: 0;
min-width:0;
max-width:100%;
+ width: auto;
+ border: none;
}
#header {
- width: 96%;
- padding: 0 2%;
- padding-top: 20px;
-}
-
-.user_in #header {
- padding-top: 40px;
+ width: 100%;
+ padding: 0;
}
address {
-margin:1em 0 0 0;
-float:left;
-width:100%;
+ float:left;
+ margin: 0px;
+ width: auto;
+ left: 0px;
+}
+
+address img {
+ float: left;
+ background: #fff;
+ padding: 2px 2px 2px 6px;
}
address img + .fn {
-display:block;
-margin-top:1em;
- margin-right: 10px;
-clear: left;
-float:left;
+ display:block;
+ margin-top: 8px;
+ clear: left;
+ float: left;
+ color: #000;
+ margin-left: 6px;
}
#site_nav_global_primary {
margin:0;
width: 100%;
- padding: 4px 0;
+ padding: 2px 0;
height: auto;
position:absolute;
top:0;
@@ -47,11 +52,16 @@ float:left;
font-size: 1em;
letter-spacing: 0em;
border-top: none;
+ -webkit-border-top-right-radius: 0px;
+ -moz-border-radius-topright: 0px;
+ border-top-right-radius: 0px;
+ height: 24px;
+ line-height: 16px;
}
#site_nav_global_primary li {
margin-left:0;
- margin-right:0px;
+ margin-right: 2px;
float:left;
font-size:0.9em;
padding: 2px 4px;
@@ -59,96 +69,100 @@ float:left;
height: auto;
}
-#site_nav_global_primary li a {
- height: auto;
+#site_nav_global_primary li:last-child {
+ margin-right: 0px;
}
-.form_notice {
- float: left;
- margin-left: 0px;
- width: 300px;
- padding: 4px;
-}
-
-#form_notice-direct.form_notice {
- padding-top: 10px;
-}
-
-.form_notice textarea {
- width: 210px;
- height: 50px;
- padding: 4px;
-}
-
-#notice_text-count {
-position:absolute;
-bottom:2px;
- left: 175px;
- font-size: 0.8em;
-z-index:9;
-}
-
-#form_notice-direct.form_notice #notice_text-count {
- left: 0px;
-}
-
-/*input type=file no good in
-iPhone/iPod Touch, Android, Opera Mini Simulator
-*/
-.form_notice #notice_text-count + label,
-.form_notice label[for="notice_data-attach"] {
-display:none;
-}
-.form_notice input.notice_data-attach {
-position:static;
-clear:both;
-width:65%;
-height:auto;
-display:block;
-z-index:9;
-padding:0;
-margin:0;
-background:none;
-opacity:1;
-}
-
-.form_notice #notice_action-submit {
- text-align: center;
- left: 230px;
- top: 32px;
- width: 70px;
- font-size: 0.8em;
-}
-
-#form_notice-direct.form_notice #notice_action-submit {
- top: 62px;
-}
-
-#site_nav_local_views {
- height: auto;
- font-size: 0.9em;
- line-height: 2em;
- margin-bottom: 0px;
- padding-left: 4px;
- background: none;
-}
-
-#site_nav_local_views li {
- margin-right: 6px;
-}
-
-#site_nav_local_views a {
- background-color: #7080aa;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- margin-right: 2px;
- margin-bottom: 2px;
+#site_nav_global_primary a {
+ padding: 2px 4px;
+ height: 20px;
}
#core {
width: 100%;
- margin: 0;
+ border-left: none;
+ border-right: none;
+}
+
+#aside_primary_wrapper {
+ background: none;
+}
+
+#content_wrapper {
+ right: 0px;
+ border: none;
+}
+
+#site_nav_local_views_wrapper {
+ right: 0px;
+ border: none;
+}
+
+#navtoggle {
+ float: right;
+ padding: 2px 6px;
+ text-decoration: none;
+}
+
+#site_nav_local_views {
+ height: auto;
+ font-size: 1em;
+ line-height: 2em;
+ margin-bottom: 0px;
+ padding: 10px 0px 10px 6px;
+ background: none;
+ left: 0px;
+ width: 100%;
+ display: none;
+}
+
+#site_nav_local_views h3 {
+ color: #333;
+ font-size: 1em;
+ margin-bottom: 0px;
+}
+
+#site_nav_local_views li {
+ margin-right: 6px;
+ margin-bottom: 0px;
+ clear: left;
+}
+
+#site_nav_local_views li li {
+ float: left;
+ clear: none;
+ margin-bottom: 6px;
+}
+
+#site_nav_local_views a {
+ color: #fff;
+ text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.5);;
+ background: #364a84;
+ background: -moz-linear-gradient(top, #7b8dbb , #364a84);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7b8dbb), color-stop(100%,#364a84));
+ font-size: 0.9em;
+ width: auto;
+}
+
+#site_nav_local_views a:hover {
+ background: #7b8dbb;
+ background: -moz-linear-gradient(top, #364a84 , #7b8dbb);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#364a84), color-stop(100%,#7b8dbb));
+}
+
+#login #site_nav_local_views, #register #site_nav_local_views, #openidlogin #site_nav_local_views {
+ display: block;
+ margin-top: 25px;
+}
+
+#login #navtoggle, #register #navtoggle, #openidlogin #navtoggle {
+ display: none;
+}
+
+#login #site_nav_local_views li, #register #site_nav_local_views li, #openidlogin #site_nav_local_views li {
+ float: left;
+ clear: none;
+ margin-bottom: 6px;
}
#content {
@@ -156,6 +170,11 @@ opacity:1;
padding: 10px 2%;
margin: 0;
min-height: auto;
+ left: 0px;
+}
+
+#content h1 {
+ clear: left;
}
#footer {
@@ -163,6 +182,178 @@ opacity:1;
padding: 10px 4px 4px 4px;
}
+.input_forms {
+ display: block;
+ width: 102%;
+ top: -10px;
+ left: -2%;
+ padding-left: 2%;
+ padding-right: 0;
+}
+
+#input_form_nav li a {
+ padding: 0px 4px 1px 4px;
+ margin-right: 6px;
+}
+
+.input_form {
+ clear: left;
+ width: 100%;
+ padding-bottom: 0px;
+}
+
+#input_form_status, #input_form_direct {
+ padding-bottom: 40px;
+}
+
+.form_notice_placeholder .placeholder {
+ width: 290px;
+ margin-bottom: 20px;
+}
+
+.form_notice {
+ float: left;
+ margin-left: 0px;
+ width: 300px;
+ padding: 4px 0px;
+}
+
+#form_notice-direct.form_notice {
+ padding-top: 0px;
+}
+
+.form_notice textarea, #form_notice-direct.form_notice textarea {
+ width: 292px;
+ height: 36px;
+ padding: 4px 4px 16px 4px;
+ font-size: 1em;
+}
+
+.form_notice .count {
+ position: absolute;
+ top: 44px;
+ left: 270px;
+}
+
+#form_notice-direct.form_notice .count {
+ top: 70px;
+ left: 270px;
+}
+
+
+/*input type=file no good in
+iPhone/iPod Touch, Android, Opera Mini Simulator
+*/
+
+.form_notice .notice_data-attach, .form_notice .notice_data-geo_wrap label, .form_notice .notice_data-geo_wrap input {
+ display:none;
+}
+
+.checkbox-wrapper {
+ margin-left: 0px;
+ clear: left;
+ float: left;
+ width: 200px;
+}
+
+.form_notice .checkbox-wrapper {
+ display: inline;
+ margin-left: 0px;
+}
+
+.checkbox-wrapper label.checkbox {
+ display: none;
+}
+
+.checkbox-wrapper #notice_private {
+ display: inline;
+ margin-top: 10px;
+ margin-left: 20px;
+}
+
+.form_notice .checkbox-wrapper #notice_private {
+ margin-left: 0px;
+}
+
+.checkbox-wrapper:before {
+ content: "Send privately?";
+}
+
+.input_form fieldset fieldset {
+ width: 300px;
+}
+
+.input_form .form_settings li input {
+ width: 292px;
+}
+
+.input_form .form_settings li textarea {
+ width: 292px;
+}
+
+.bookmarkform-thumbnail {
+ display: none;
+}
+
+.input_form .form_settings .submit {
+ font-size: 1em;
+ margin: 10px 0;
+ clear: left;
+ float: left;
+}
+
+.form_notice #notice_action-submit {
+ text-align: center;
+ left: 0px;
+ top: 192px;
+ width: 80px;
+ font-size: 1em;
+}
+
+#form_notice-direct.form_notice #notice_action-submit {
+ top: 148px;
+}
+
+.threaded-replies {
+ width: 80%;
+ margin-left: 59px;
+}
+
+#content .notice .threaded-replies .notice {
+ width: 95%;
+}
+
+.threaded-replies .placeholder {
+ margin: 10px;
+ width: 92%;
+}
+
+.threaded-replies .form_notice {
+ margin-bottom: 10px;
+}
+
+.threaded-replies .form_notice textarea {
+ width: 220px;
+}
+
+.threaded-replies .form_notice .count {
+ left: 205px;
+ top: 53px;
+}
+
+.threaded-replies .form_notice #notice_action-submit {
+ position: relative;
+ top: 0;
+ bottom: 0px;
+ left: 0;
+ margin-top: 10px;
+}
+
+.threaded-replies .form_notice .error,
+.threaded-replies .form_notice .success,
+.threaded-replies .form_notice .notice-status {
+ width: 210px;
+}
.form_settings fieldset {
margin-bottom:7px;
@@ -195,10 +386,52 @@ float:none;
.form_settings .form_data p.form_guide {
width:auto;
-margin-left:0;
+margin-left:0 !important;
}
#settings_design_color .form_data {
width: auto;
margin-right: 0;
}
+
+.form_settings input.checkbox, .form_settings input.radio {
+ left: 0px;
+}
+
+.form_settings label.checkbox, .form_settings label.radio {
+ left: -10px;
+}
+
+.notice .addressees:before {
+ content: '\003E';
+}
+
+.notice .addressees:empty:before {
+ content: none;
+}
+
+.user_in .notice div.entry-content {
+ max-width: 150px;
+}
+
+ul.qna-dummy {
+ width: 80%;
+}
+
+.qna-dummy-placeholder input {
+ width: 92%;
+}
+
+.question #qna-answer, .qna-full-question #qna-answer {
+ width: 220px;
+}
+
+.threaded-replies #qna-answer-submit {
+ float: left;
+ clear: left;
+ position: relative;
+ top: 0;
+ bottom: 0px;
+ left: 0;
+ margin-top: 10px;
+}
diff --git a/theme/neo/mobilelogo.png b/theme/neo/mobilelogo.png
index 781e79578c..cd2e0e7f16 100644
Binary files a/theme/neo/mobilelogo.png and b/theme/neo/mobilelogo.png differ