Commit 3e13ba07 authored by hannes's avatar hannes

hi res icons and avatars

parent d9fa43b2
......@@ -60,21 +60,36 @@ ul.queet-actions li .icon,
.dogear,
.chev-right,
.close-right,
button.icon.nav-search {
background-image: url("../img/sprite.png");
button.icon.nav-search,
.member-button .join-text i,
.external-follow-button .follow-text i,
.follow-button .follow-text i,
#birds-top,
#logo,
.topbar .global-nav {
background-image: url("../img/sprite-2x.png");
background-size: 500px 1329px;
}
.topbar .global-nav {
background-image: url("../img/sprite_bgs.png");
#logo {
width:89px;
height:34px;
display:block;
position:fixed;
z-index:1001;
margin-top:3px;
left:50%;
margin-left:-420px;
background-position:0 5px;
cursor:pointer;
}
#logo:hover {
background-position: 0 -24px;
}
#top-compose {
display:none;
}
#logo {
background-image:url("../img/logo.png");
}
#settingslink {
display:none;
......@@ -168,7 +183,7 @@ button.icon.nav-search {
display: inline-block;
vertical-align: text-top;
height: 14px;
width: 12px;
width: 14px;
background-position: -20px -710px;
background-color: transparent;
margin-left: 7px;
......@@ -374,18 +389,20 @@ body.rtl .dropdown-menu li:not(.dropdown-caret) {
}
#birds-top {
display:block;
position:fixed;
z-index:1001;
margin-top:-1px;
right:-3px;
background-position: -193px -3px;
display: block;
height: 64px;
position: fixed;
right: 0;
width: 103px;
z-index: 1001;
}
.topbar .global-nav {
position: relative;
width: 100%;
height: 40px;
background-color: #252525;
background-position: 0 0;
background-position: 0 -1200px;
background-repeat: repeat-x;
}
......@@ -800,6 +817,7 @@ button#submit-login:hover {
border-color: #EC8B11;
}
.modal-body .front-signup {
width:100%;
opacity: 1;
......@@ -835,6 +853,15 @@ button#submit-login:hover {
.modal-body .front-signup .signup-input-container input.nickname-taken {
background-color:pink;
}
#other-servers-link {
height:150px;
position: absolute;
bottom:-170px;
padding:10px;
text-shadow:1px 1px 3px rgba(0, 0, 0, 0.6);
color:rgba(255,255,255,0.8);
}
#page-container {
width:837px;
......@@ -912,15 +939,15 @@ button#submit-login:hover {
font-size: 14px;
}
.menu-container a .chev-right {
background-position: 0 -140px;
background-repeat: no-repeat;
display: block;
height: 13px;
width: 9px;
background-position: 0 -140px;
height: 15px;
position: absolute;
right: 12px;
top: 9px;
}
right: 10px;
top: 9px;
width: 12px;
}
.menu-container a .close-right {
background-repeat: no-repeat;
display: none;
......@@ -1430,7 +1457,7 @@ body.rtl .view-more-container-bottom { direction:rtl; }
}
.queet-text img {
width:100%;
max-width:100%;
}
.stream-item .queet-text p {
......@@ -1549,14 +1576,14 @@ ul.queet-actions li .icon.sm-reply {
}
ul.queet-actions li .icon.sm-rt {
background-position: -20px -190px;
width: 12px;
width: 14px;
}
ul.queet-actions li .icon.sm-trash {
background-position: -160px -190px;
width: 12px;
}
ul.queet-actions li .icon.sm-fav {
background-position: -40px -190px;
background-position: -39px -190px;
width: 12px;
}
.stream-item:not(.expanded):hover ul.queet-actions li .icon.sm-reply,
......@@ -1644,8 +1671,8 @@ ul.queet-actions li .icon.sm-fav {
background-color: transparent;
background-repeat: no-repeat;
background-position: -60px -350px;
width: 16px;
height: 12px;
width: 18px;
height: 11px;
margin-right: 1px;
display: inline-block;
cursor: pointer;
......@@ -2334,22 +2361,7 @@ button.signup-btn.disabled,
border-color:#096eb3;
color:#fff;
}
#logo {
width:89px;
height:34px;
display:block;
position:fixed;
z-index:1001;
margin-top:3px;
left:50%;
margin-left:-420px;
background-position:0 0;
cursor:pointer;
}
#logo:hover {
background-position: 0 34px;
}
#settingslink:hover i.nav-session {
background-position: -160px -80px;
}
......@@ -2375,8 +2387,8 @@ button.signup-btn.disabled,
background-repeat: no-repeat;
vertical-align: text-top;
background-position: -160px -50px;
height: 21px;
width: 20px;
height: 25px;
width: 25px;
margin: -4px 6px 0 0;
cursor: pointer;
display: block;
......@@ -2426,7 +2438,7 @@ button.signup-btn.disabled,
height: 200px;
position: absolute;
top: 60px;
width: 520px;
width: 100%;
}
.profile-header-inner .profile-picture {
outline: 0 none;
......@@ -2616,7 +2628,7 @@ div.clearfix {
.member-button .join-text i,
.external-follow-button .follow-text i,
.follow-button .follow-text i {
background-image: url("../img/button_birds.png");
background-position: -90px -92px;
display: block;
height: 28px;
margin-left: -50px;
......@@ -3144,6 +3156,7 @@ body.rtl #feed {
float: left;
}
body.rtl #birds-top {
background-position: -205px -74px;
right:auto;
left:-3px;
}
......@@ -3540,7 +3553,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.front-welcome-text {
opacity:0;
height:250px;
height:320px;
overflow:hidden;
}
#page-container {
......@@ -3570,9 +3583,9 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
}
#search-query {
background-image: url("../img/mobile-sprite-2x.png");
background-position: -100px -4px;
background-size: 800px 600px;
background-image: url("../img/sprite-2x.png");
background-size: 500px 1329px;
background-position: -100px -804px;
border: 0 none;
border-radius: 0;
box-shadow: none;
......@@ -3629,9 +3642,9 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
#top-compose {
background-image: url("../img/mobile-sprite-2x.png");
background-position: -55px 0;
background-size: 800px 600px;
background-image: url("../img/sprite-2x.png");
background-size: 500px 1329px;
background-position: -55px -800px;
cursor: pointer;
display: block;
height: 49px;
......@@ -3810,9 +3823,9 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
display:none;
}
.nav-session {
background-image: url("../img/mobile-sprite-2x.png");
background-size:800px 600px;
background-position: 0 0;
background-image: url("../img/sprite-2x.png");
background-size: 500px 1329px;
background-position: 0 -800px;
height: 49px;
width: 49px;
}
......@@ -3870,9 +3883,9 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
padding:0;
margin:0;
border-radius:0 0 0 0 !important;
background-image: url("../img/mobile-sprite-2x.png");
background-size:800px 600px;
background-position: center -203px;
background-image: url("../img/sprite-2x.png");
background-size: 500px 1329px;
background-position: center -1003px;
}
.menu-container a:hover,
.menu-container a.current:hover {
......@@ -3904,21 +3917,21 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
margin-left: -35px;
width: 70px;
height: 55px;
background-image: url("../img/mobile-sprite-2x.png");
background-size:800px 600px;
background-image: url("../img/sprite-2x.png");
background-size: 500px 1329px;
background-color:#ccc;
}
.stream-selection.friends-timeline:after {
background-position:0px -61px ;
background-position:0px -861px ;
}
.stream-selection.mentions:after {
background-position:-78px -61px ;
background-position:-78px -861px ;
}
.stream-selection.my-timeline:after {
background-position:-150px -61px ;
background-position:-150px -861px ;
}
.stream-selection.public-timeline:after {
background-position:-230px -61px ;
background-position:-230px -861px ;
}
.stream-selection.current:after {
background-color:transparent;
......@@ -4050,34 +4063,34 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
ul.queet-actions li .icon.sm-rt,
ul.queet-actions li .icon.sm-trash,
ul.queet-actions li .icon.sm-reply {
background-image: url("../img/mobile-sprite-2x.png");
background-size:800px 600px;
background-image: url("../img/sprite-2x.png");
background-size: 500px 1329px;
width:35px;
height:35px;
}
ul.queet-actions li .icon.sm-reply {
background-position: -10px -120px;
background-position: -10px -920px;
}
ul.queet-actions li .icon.sm-rt {
background-position: -60px -120px;
background-position: -60px -920px;
}
ul.queet-actions li .icon.sm-fav {
background-position:-110px -120px;
background-position:-110px -920px;
}
ul.queet-actions li .icon.sm-trash {
background-position:-145px -121px;
background-position:-145px -921px;
}
.stream-item.expanded > .stream-item.expanded .queet ul.queet-actions li .icon.sm-reply {
background-position: -10px -162px;
background-position: -10px -962px;
}
.stream-item.expanded > .stream-item.expanded .queet ul.queet-actions li .icon.sm-rt {
background-position: -60px -162px;
background-position: -60px -962px;
}
.stream-item.expanded > .stream-item.expanded .queet ul.queet-actions li .icon.sm-fav {
background-position:-110px -162px;
background-position:-110px -962px;
}
.stream-item.expanded > .stream-item.expanded .queet ul.queet-actions li .icon.sm-trash {
background-position:-145px -163px;
background-position:-145px -963px;
}
.queet ul.stats {
......
......@@ -60,10 +60,10 @@ if($usehistorypushstate) {
<head>
<title><?php print $sitetitle; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/4.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
<link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/7.css" />
<link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/jquery.minicolors.css" />
<link rel="shortcut icon" type="image/x-icon" href="<?php print $qvitterpath; ?>favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="<?php print $qvitterpath; ?>favicon.ico?v=2">
<?php
// if qvitter is a webapp and this is a users url we add feeds
......@@ -77,8 +77,8 @@ if($usehistorypushstate) {
else {
print '<link title="Notice feed for '.$nickname.' (Activity Streams JSON)" type="application/stream+json" href="'.$apiroot.'statuses/user_timeline/'.$user->id.'.as" rel="alternate">'."\n";
print ' <link title="Notice feed for '.$nickname.' (RSS 1.0)" type="application/rdf+xml" href="'.$instanceurl.$nickname.'/rss" rel="alternate">'."\n";
print ' <link title="Notice feed for '.$nickname.' (RSS 2.0)" type="application/rss+xml" href="'.$apiroot.'statuses/user_timeline/'.$user->id.'.rss" rel="alternate">'."\n";
print ' <link title="Notice feed for '.$nickname.' (Atom)" type="application/atom+xml" href="'.$apiroot.'statuses/user_timeline/'.$user->id.'.atom" rel="alternate">'."\n";
print ' <link title="Notice feed for '.$nickname.' (RSS 2.0)" type="application/rss+xml" href="'.$instanceurl.'api/statuses/user_timeline/'.$user->id.'.rss" rel="alternate">'."\n";
print ' <link title="Notice feed for '.$nickname.' (Atom)" type="application/atom+xml" href="'.$instanceurl.'api/statuses/user_timeline/'.$user->id.'.atom" rel="alternate">'."\n";
print ' <link title="FOAF for '.$nickname.'" type="application/rdf+xml" href="'.$instanceurl.$nickname.'/foaf" rel="meta">'."\n";
print ' <link href="'.$instanceurl.$nickname.'/microsummary" rel="microsummary">'."\n";
}
......@@ -100,8 +100,8 @@ if($usehistorypushstate) {
if(preg_match("/^[a-zA-Z0-9]+$/", $group_id_or_name) == 1) {
print '<link rel="alternate" href="'.$apiroot.'statusnet/groups/timeline/'.$group_id.'.as" type="application/stream+json" title="Notice feed for '.$group_id_or_name.' group (Activity Streams JSON)"/>'."\n";
print ' <link rel="alternate" href="'.$instanceurl.'group/'.$group_name.'/rss" type="application/rdf+xml" title="Notice feed for '.$group_id_or_name.' group (RSS 1.0)"/>'."\n";
print ' <link rel="alternate" href="'.$apiroot.'statusnet/groups/timeline/'.$group_id.'.rss" type="application/rss+xml" title="Notice feed for '.$group_id_or_name.' group (RSS 2.0)"/>'."\n";
print ' <link rel="alternate" href="'.$apiroot.'statusnet/groups/timeline/'.$group_id.'.atom" type="application/atom+xml" title="Notice feed for '.$group_id_or_name.' group (Atom)"/>'."\n";
print ' <link rel="alternate" href="'.$instanceurl.'api/statusnet/groups/timeline/'.$group_id.'.rss" type="application/rss+xml" title="Notice feed for '.$group_id_or_name.' group (RSS 2.0)"/>'."\n";
print ' <link rel="alternate" href="'.$instanceurl.'api/statusnet/groups/timeline/'.$group_id.'.atom" type="application/atom+xml" title="Notice feed for '.$group_id_or_name.' group (Atom)"/>'."\n";
print ' <link rel="meta" href="'.$instanceurl.'group/'.$group_name.'/foaf" type="application/rdf+xml" title="FOAF for '.$group_id_or_name.' group"/>'."\n";
}
}
......@@ -176,7 +176,7 @@ if($usehistorypushstate) {
<li class="language"><a class="language-link" title="Italian" data-lang-code="it">Italiano</a></li>
<li class="language"><a class="language-link" title="Swedish" data-lang-code="sv">svenska</a></li>
</ul>
<img id="birds-top" src="<?php print $qvitterpath; ?>img/birds.png" />
<div id="birds-top"></div>
<div class="global-nav">
<div class="global-nav-inner">
<div class="container">
......@@ -247,6 +247,7 @@ if($usehistorypushstate) {
<div class="signup-input-container"><input placeholder="" type="text" name="user[email]" autocomplete="off" id="signup-user-email"></div>
<div class="signup-input-container"><input placeholder="" type="password" name="user[user_password]" class="text-input" id="signup-user-password"></div>
<button id="signup-btn-step1" class="signup-btn" type="submit"></button>
<div id="other-servers-link"></div>
</div>
<div id="user-header">
<img id="user-avatar" src="" />
......@@ -292,15 +293,15 @@ if($usehistorypushstate) {
<div id="footer"></div>
</div>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/codemirror.3.14.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/codemirror.3.20.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/jquery-2.0.2.min.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/jquery-ui-1.10.3.min.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/jquery.minicolors.min.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/dom-functions-4.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/misc-functions-4.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/dom-functions-7.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/misc-functions-7.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/ajax-functions-4.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lan-4.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/qvitter-4.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lan-7.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/qvitter-7.js"></script>
</body>
</html>
\ No newline at end of file
......@@ -142,6 +142,7 @@ window.l.es.registerBio = 'Biografía';
window.l.es.registerLocation = 'Ubicación';
window.l.es.registerRepeatPassword = 'Verificar contraseña';
window.l.es.moreSettings = 'Más configuraciones';
window.l.es.otherServers = 'De manera alternativa, puedes crear una cuenta en otro servidor de la red GNUsocial. <a href="http://federation.skilledtests.com/select_your_server.html">Comparativa</a>';
......@@ -250,6 +251,7 @@ window.l.fr.registerBio = 'Biographie';
window.l.fr.registerLocation = 'Localisation';
window.l.fr.registerRepeatPassword = 'Vérifiez votre mot de passe';
window.l.fr.moreSettings = 'Plus de paramètres';
window.l.fr.otherServers = '';
// deutsch
......@@ -369,6 +371,7 @@ window.l.de.registerBio = 'Bio';
window.l.de.registerLocation = 'Standort';
window.l.de.registerRepeatPassword = 'Passwort bestätigen';
window.l.de.moreSettings = 'Weitere Einstellungen';
window.l.de.otherServers = 'Du kannst Dir auch gerne ein Konto auf einem anderen Server des GNUsocial-Netzwerks einrichten. <a href="http://federation.skilledtests.com/select_your_server.html">Übersicht</a>';
// english
......@@ -485,6 +488,7 @@ window.l.en.registerBio = 'Bio';
window.l.en.registerLocation = 'Location';
window.l.en.registerRepeatPassword = 'Repeat password';
window.l.en.moreSettings = 'More settings';
window.l.en.otherServers = 'Alternatively you can create an account on another server of the GNU social network. <a href="http://federation.skilledtests.com/select_your_server.html">Comparison</a>';
// svenska
......@@ -592,6 +596,7 @@ window.l.sv.registerBio = 'Biografi';
window.l.sv.registerLocation = 'Plats';
window.l.sv.registerRepeatPassword = 'Upprepa lösenord';
window.l.sv.moreSettings = 'Fler inställningar';
window.l.sv.otherServers = 'Men du kan lika gärna skapa ett konto på en annan server som är del av GNU social-nätverket. <a href="http://federation.skilledtests.com/select_your_server.html">Här är en jämförelse.</a>';
......@@ -700,6 +705,7 @@ window.l.fa.registerBio = 'زندگینامه';
window.l.fa.registerLocation = 'مکان';
window.l.fa.registerRepeatPassword = 'تایید گذرواژه';
window.l.fa.moreSettings = 'تنظیمات بیشتر';
window.l.fa.otherServers = '';
// arabic
......@@ -807,6 +813,7 @@ window.l.ar.registerBio = 'النبذة التعريفيّة';
window.l.ar.registerLocation = 'الموقع الجغرافي';
window.l.ar.registerRepeatPassword = 'تأكيد كلمة المرور';
window.l.ar.moreSettings = 'مزيد من الإعدادات';
window.l.ar.otherServers = '';
// esperanto
......@@ -923,6 +930,7 @@ window.l.eo.registerBio = 'Biografio';
window.l.eo.registerLocation = 'Loko';
window.l.eo.registerRepeatPassword = 'Ripeti pasvorton';
window.l.eo.moreSettings = 'Pli agordoj';
window.l.eo.otherServers = '';
// italian
......@@ -1039,6 +1047,7 @@ window.l.it.registerBio = 'Biografia';
window.l.it.registerLocation = 'Posizione';
window.l.it.registerRepeatPassword = 'Ripetere la password';
window.l.it.moreSettings = 'Altre configurazioni';
window.l.it.otherServers = '';
// set language, from local storage, else browser language, else english (english also if no localstorage availible)
......@@ -1057,12 +1066,10 @@ window.sL = window.l[selectedLanguage];
// if this is a RTL-language, add rt classes and change some things
if(selectedLanguage == 'ar') {
$('body').addClass('rtl');
$('#birds-top').attr('src',window.fullUrlToThisQvitterApp + 'img/birds_rtl.png');
$('title').html('&#x202b;ترك');
}
else if(selectedLanguage == 'fa') {
$('body').addClass('rtl');
$('#birds-top').attr('src', window.fullUrlToThisQvitterApp + 'img/birds_rtl.png');
$('title').html('&#x202b;واگذارنده');
}
......@@ -1090,6 +1097,7 @@ $('#queet').html(window.sL.queetVerb);
$('#feed-header-inner h2').html(window.sL.queetsNounPlural);
$('#logout').html(window.sL.logout);
$('#settings').html(window.sL.settings);
$('#other-servers-link').html(window.sL.otherServers);
$('.language-dropdown .dropdown-toggle small').html(window.sL.languageSelected);
$('.language-dropdown .current-language').html(window.sL.languageName);
$('.stream-selection[data-stream-name="statuses/friends_timeline.json"]').prepend(window.sL.timeline);
......
......@@ -174,10 +174,10 @@ function changeDesign(obj) {
· · · · · · · · · */
function changeLinkColor(newLinkColor) {
var linkstyle = $('style').text();
$('style').text(linkstyle.substring(0,linkstyle.indexOf('color:')+6) + newLinkColor + linkstyle.substring(linkstyle.indexOf(';/*COLOREND*/')));
var linkstyle = $('style').html();
$('style').html(linkstyle.substring(0,linkstyle.indexOf('color:')+6) + newLinkColor + linkstyle.substring(linkstyle.indexOf(';/*COLOREND*/')));
var linkstyle = $('style').html();
$('style').html(linkstyle.substring(0,linkstyle.indexOf('background-color:')+17) + newLinkColor + linkstyle.substring(linkstyle.indexOf(';/*BACKGROUNDCOLOREND*/')));
$('style').text(linkstyle.substring(0,linkstyle.indexOf('background-color:')+17) + newLinkColor + linkstyle.substring(linkstyle.indexOf(';/*BACKGROUNDCOLOREND*/')));
}
......
......@@ -95,6 +95,7 @@ $('#what-is-federation').on('mouseleave',function(){
$('.front-signup input, .front-signup button').removeAttr('disabled'); // clear this onload
$('#signup-btn-step1').click(function(){
display_spinner();
$('.front-signup input, .front-signup button').addClass('disabled');
$('.front-signup input, .front-signup button').attr('disabled','disabled');
......@@ -328,7 +329,7 @@ function doLogin(streamToSet) {
// add user data to DOM, show search form, remeber user id, show the feed
$('#user-container').css('z-index','1000');
$('#top-compose').removeClass('hidden');
$('#user-avatar').attr('src', user.profile_image_url);
$('#user-avatar').attr('src', user.profile_image_url_profile_size);
$('#user-name').append(user.name);
$('#user-screen-name').append(user.screen_name);
$('#user-profile-link').append('<a href="' + user.statusnet_profile_url + '">' + window.sL.viewMyProfilePage + '</a>');
......@@ -578,7 +579,7 @@ $('#settingslink').click(function(){
$('body').on('click','.external-follow-button',function(event){
popUpAction('popup-external-follow', window.sL.userExternalFollow + ' ' + $('.profile-card-inner .screen-name').html(),'<form method="post" action="' + window.siteInstanceURL + 'main/ostatus"><input type="hidden" id="nickname" name="nickname" value="' + $('.profile-card-inner .screen-name').html().substring(1) + '"><input type="text" id="profile" name="profile" placeholder="' + window.sL.userExternalFollowHelp + '" /></form>','<div class="right"><button class="close">' + window.sL.cancelVerb + '</button><button class="primary">' + window.sL.userExternalFollow + '</button></div>');
popUpAction('popup-external-follow', window.sL.userExternalFollow + ' ' + $('.profile-card-inner .screen-name').html(),'<form method="post" action="' + window.siteInstanceURL.replace('https://','http://') + 'main/ostatus"><input type="hidden" id="nickname" name="nickname" value="' + $('.profile-card-inner .screen-name').html().substring(1) + '"><input type="text" id="profile" name="profile" placeholder="' + window.sL.userExternalFollowHelp + '" /></form>','<div class="right"><button class="close">' + window.sL.cancelVerb + '</button><button class="primary">' + window.sL.userExternalFollow + '</button></div>');
$('#popup-external-follow form input#profile').focus();
$('#popup-external-follow button.primary').click(function(){
$('#popup-external-follow form').submit();
......@@ -993,8 +994,8 @@ $('#history-container').on("sortupdate", function() {
$(window).scroll(function() {
if($(window).scrollTop() + $(window).height() > $(document).height() - 1000) {
// not if we're already loading
if(!$('body').hasClass('loading-older')) {
// not if we're already loading or if no stream is set yet
if(!$('body').hasClass('loading-older') && typeof window.currentStream != "undefined") {
$('body').addClass('loading-older');
// remove loading class in 10 seconds, i.e. try again if failed to load within 10 s
......@@ -1542,7 +1543,7 @@ $('#queet-toolbar button').click(function () {
CodeMirror.defaults.lineWrapping = true;
CodeMirror.defineMode("css-base", function(config, parserConfig) {
CodeMirror.defineMode("gnusocial", function(config, parserConfig) {
function tokenBase(stream, state) {
stream.string = stream.string + ' '; // makes regexping easier..
......@@ -1568,13 +1569,13 @@ CodeMirror.defineMode("css-base", function(config, parserConfig) {
else if (stream.start == 0 && ch == "#" && stream.match(tagInBeginningRE)) { return "mention"}
else if (stream.start == 0 && ch == "!" && stream.match(groupInBeginningRE)) { return "mention"}
else if (stream.start == 0 && ch.match(/[a-z0-9]/) && stream.match(urlWithoutHttpInBeginningRE)) { stream.backUp(1); return "url"; }
else if (stream.start == 0 && ch == "h" && stream.match(urlInBeginningRE)) { return "url"; }
else if (stream.start == 0 && ch == "h" && stream.match(urlInBeginningRE)) { stream.backUp(1); return "url"; }
else if (ch == " " && stream.match(externalMentionRE)) { return "mention"}
else if (ch == " " && stream.match(mentionRE)) { return "mention"}
else if (ch == " " && stream.match(tagRE)) { return "tag"; }
else if (ch == " " && stream.match(groupRE)) { return "group"; }
else if (ch == " " && stream.match(urlWithoutHttpRE)) { stream.backUp(1); return "url"; }
else if (ch == " " && stream.match(urlRE)) { return "url"; }
else if (ch == " " && stream.match(urlRE)) { stream.backUp(1); return "url"; }
else if(!(ch == ' ' && stream.next() == '.') && !(stream.start == 0 && ch == '.') && (stream.start == 0 || ch == ' ') && stream.match(emailRE)) {
stream.backUp(1);
return "email";
......@@ -1602,9 +1603,10 @@ var codemirrorQueetBox = CodeMirror.fromTextArea(document.getElementById("codemi
if(enterKeyHasBeenPressed ){
$('#queet-toolbar button').trigger('click');
}
}
});
/* ·
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment