upload image design thing

(also fixes bug on quitter.se causing images not to preview, caused by
our https substitutions in apache)
This commit is contained in:
Hannes Mannerheim 2014-11-25 10:01:57 +01:00
parent 010666c20c
commit b69f5d364a
2 changed files with 5 additions and 2 deletions

View File

@ -719,7 +719,7 @@ class QvitterAction extends ApiAction
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/misc-functions.js?v=40"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/ajax-functions.js?v=40"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lan.js?v=40"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/qvitter.js?v=41"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/qvitter.js?v=42"></script>
</body>
</html>

View File

@ -912,7 +912,7 @@ $('body').on('click','a', function(e) {
var noticeHtml = buildQueetHtml(data.status);
}
var profileCard = '<div class="profile-card"><div class="profile-header-inner" style="background-image:url(' + cover_photo + ')"><div class="profile-header-inner-overlay"></div><a class="profile-picture"><img src="' + data.profile_image_url_profile_size + '" /></a><div class="profile-card-inner"><h1 class="fullname">' + data.name + '<span></span></h1><h2 class="username"><span class="screen-name"><a target="_blank" href="' + data.statusnet_profile_url + '">' + screenNameWithServer + '</a></span><span class="follow-status"></span></h2><div class="bio-container"><p>' + data.description + '</p></div><p class="location-and-url"><span class="location">' + data.location + '</span><span class="url' + emptyWebpage + '"><span class="divider"> · </span><a target="_blank" href="' + data.url + '">' + data.url.replace('http://','').replace('https://','') + '</a></span></p></div></div><div class="profile-banner-footer"><ul class="stats"><li><a target="_blank" href="' + data.statusnet_profile_url + '">' + window.sL.notices + '<strong>' + data.statuses_count + '</strong></a></li><li><a target="_blank" href="' + data.statusnet_profile_url + '/subscriptions">' + window.sL.following + '<strong>' + data.friends_count + '</strong></a></li><li><a target="_blank" href="' + data.statusnet_profile_url + '/subscribers">' + window.sL.followers + '<strong>' + data.followers_count + '</strong></a></li></ul>' + followButton + '<div class="clearfix"></div></div></div><div class="clearfix"></div>';
var profileCard = '<div class="profile-card"><div class="profile-header-inner" style="background-image:url(\'' + cover_photo + '\')"><div class="profile-header-inner-overlay"></div><a class="profile-picture"><img src="' + data.profile_image_url_profile_size + '" /></a><div class="profile-card-inner"><h1 class="fullname">' + data.name + '<span></span></h1><h2 class="username"><span class="screen-name"><a target="_blank" href="' + data.statusnet_profile_url + '">' + screenNameWithServer + '</a></span><span class="follow-status"></span></h2><div class="bio-container"><p>' + data.description + '</p></div><p class="location-and-url"><span class="location">' + data.location + '</span><span class="url' + emptyWebpage + '"><span class="divider"> · </span><a target="_blank" href="' + data.url + '">' + data.url.replace('http://','').replace('https://','') + '</a></span></p></div></div><div class="profile-banner-footer"><ul class="stats"><li><a target="_blank" href="' + data.statusnet_profile_url + '">' + window.sL.notices + '<strong>' + data.statuses_count + '</strong></a></li><li><a target="_blank" href="' + data.statusnet_profile_url + '/subscriptions">' + window.sL.following + '<strong>' + data.friends_count + '</strong></a></li><li><a target="_blank" href="' + data.statusnet_profile_url + '/subscribers">' + window.sL.followers + '<strong>' + data.followers_count + '</strong></a></li></ul>' + followButton + '<div class="clearfix"></div></div></div><div class="clearfix"></div>';
popUpAction('popup-external-profile', screenNameWithServer,profileCard + noticeHtml,'<a class="go-to-external-profile" href="' + data.statusnet_profile_url + '">' + window.sL.goToExternalProfile + '</a>');
@ -2467,6 +2467,9 @@ function uploadImage(e, thisUploadButton) {
$('img.to-upload').addClass('uploaded');
$('img.to-upload').removeClass('to-upload');
// remove http and https (not needed, just design choice)
data.shorturl = data.shorturl.replace('http://','').replace('https://','');
// insert shorturl in queet box
deleteBetweenCharacterIndices(queetBox[0], caretPos[0], caretPos[1]);
var range = createRangeFromCharacterIndices(queetBox[0], caretPos[0], caretPos[0]);