Merge pull request #24 from rozzin/bugfixes

Bugfixes
This commit is contained in:
Hannes Mannerheim 2014-12-02 23:52:51 +01:00
commit ecc0aa8d36
5 changed files with 10 additions and 12 deletions

View File

@ -73,11 +73,11 @@ class ApiQvitterAllFollowingAction extends ApiBareAuthAction
$this->profiles = $this->getProfiles();
// only keep id, name, nickname and avatar filename
// only keep id, name, nickname and avatar URL
foreach($this->profiles as $p) {
try {
$avatar = Avatar::byProfile($p, AVATAR_STREAM_SIZE);
$avatar = $avatar->filename;
$avatar = $avatar->url;
} catch (Exception $e) {
$avatar = false;
}

View File

@ -78,8 +78,8 @@ class QvitterAction extends ApiAction
$sitetitle = common_config('site','name');
$siterootdomain = common_config('site','server');
$qvitterpath = Plugin::staticPath('Qvitter', '');
$apiroot = common_path('api/', true);
$instanceurl = common_path('', true);
$apiroot = common_path('api/', StatusNet::isHTTPS());
$instanceurl = common_path('', StatusNet::isHTTPS());
common_set_returnto(''); // forget this
@ -175,8 +175,7 @@ class QvitterAction extends ApiAction
?>;
window.timeBetweenPolling = <?php print QvitterPlugin::settings("timebetweenpolling"); ?>;
window.apiRoot = '<?php print common_path("api/", true); ?>';
window.avatarRoot = '<?php print common_path("avatar/", true); ?>';
window.apiRoot = '<?php print common_path("api/", StatusNet::isHTTPS()); ?>';
window.fullUrlToThisQvitterApp = '<?php print $qvitterpath; ?>';
window.siteRootDomain = '<?php print $siterootdomain; ?>';
window.siteInstanceURL = '<?php print $instanceurl; ?>';

View File

@ -3442,7 +3442,6 @@ background:rgba(0,0,0,0.2);
border-radius: 6px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
position: relative;
overflow:hidden;
}
.modal-close {
margin: 0;

View File

@ -1090,7 +1090,7 @@ function replyFormHtml(q,qid) {
});
var startText = encodeURIComponent(window.sL.replyTo + ' ' + user_screen_name_html + reply_to_screen_name_html + more_reply_tos + '&nbsp;<br>');
var repliesText = encodeURIComponent(user_screen_name_text + reply_to_screen_name_text + more_reply_tos_text + '&nbsp;&nbsp;');
var repliesText = encodeURIComponent(user_screen_name_text + reply_to_screen_name_text + more_reply_tos_text + '&nbsp;');
return '<div class="inline-reply-queetbox"><span class="inline-reply-caret"><span class="caret-inner"></span></span><img class="reply-avatar" src="' + $('#user-avatar').attr('src') + '" /><div class="queet-box queet-box-syntax" id="queet-box-' + qid + '" data-start-text="' + startText + '" data-replies-text="' + repliesText + '">' + decodeURIComponent(startText) + '</div><div class="syntax-middle"></div><div class="syntax-two" contenteditable="true"></div><div class="mentions-suggestions"></div><div class="queet-toolbar toolbar-reply"><div class="queet-box-extras"><button class="upload-image"></button><button class="shorten disabled">URL</button></div><div class="queet-button"><span class="queet-counter"></span><button>' + window.sL.queetVerb + '</button></div></div></div>';
}

View File

@ -324,7 +324,7 @@ function doLogin(streamToSet) {
var i=0;
$.each(data,function(k,v){
if(v[2] === false) { var avatar = window.defaultAvatarStreamSize; }
else { var avatar = window.avatarRoot + v[2]; }
else { var avatar = v[2]; }
v[0] = v[0] || v[1]; // if name is null we go with username there too
window.following[i] = { 'id': k,'name': v[0], 'username': v[1],'avatar': avatar };
i++;
@ -1642,11 +1642,11 @@ $('body').on('click contextmenu','.queet-box-syntax',function () {
$(this)[0].addEventListener("paste", stripHtmlFromPaste);
if(typeof $(this).attr('data-replies-text') != 'undefined') {
$(this).html(decodeURIComponent($(this).attr('data-replies-text')));
var repliesLen = decodeURIComponent($(this).attr('data-replies-text')).length-11;
var repliesLen = decodeURIComponent($(this).attr('data-replies-text')).length-5;
setSelectionRange($(this)[0], repliesLen, repliesLen);
}
else {
$(this).html('&nbsp;');
$(this).html('');
}
$(this).trigger('input');
}
@ -2537,4 +2537,4 @@ $('body').on('click','#mini-edit-profile-button, #edit-profile-header-link',func
$('.edit-profile-button').trigger('click');
},true);
}
});
});