Browse Source

update

added dynamic button in modal profile window instead static
master
Hedgehog 11 years ago
parent
commit
99f83d9ca3
  1. 16
      css/profile.css
  2. 1
      css/style.css
  3. 1
      following.html
  4. 19
      js/calm.js
  5. 8
      js/interface_common.js
  6. 2
      js/twister_actions.js

16
css/profile.css

@ -66,7 +66,8 @@ @@ -66,7 +66,8 @@
}
.profile-card .direct-messages,
.profile-card .direct-messages-with-user,
.profile-card .follow
.profile-card .follow,
.profile-card .profileUnfollow
{
display: block;
position: absolute;
@ -81,13 +82,15 @@ @@ -81,13 +82,15 @@
border: none;
transition: all .2s linear;
}
.profile-card .follow
.profile-card .follow,
.profile-card .profileUnfollow
{
right: 128px;
}
.profile-card .direct-messages:hover,
.profile-card .direct-messages-with-user:hover,
.profile-card .follow:hover
.profile-card .follow:hover,
.profile-card .profileUnfollow:hover
{
background: rgba( 0, 0, 0, .3 );
}
@ -251,6 +254,10 @@ button.follow:hover { @@ -251,6 +254,10 @@ button.follow:hover {
background: #b2d67b;
color: #fff;
}
.profile-card .profileUnfollow:hover {
background: #e18882;
color: #fff;
}
.profile-modal button.direct-messages-with-user:hover {
background: #b2d67b;
color: #fff;
@ -305,7 +312,8 @@ button.follow:hover { @@ -305,7 +312,8 @@ button.follow:hover {
*/
.profile-modal .direct-messages,
.profile-modal .direct-messages-with-user,
.profile-modal .follow
.profile-modal .follow,
.profile-card .profileUnfollow
{
bottom: 10px;
}

1
css/style.css

@ -1984,6 +1984,7 @@ ul.dropdown-menu > li > a { @@ -1984,6 +1984,7 @@ ul.dropdown-menu > li > a {
clear: both;
font: 13px/20px "Open Sans", sans-serif;
white-space: nowrap;
cursor: pointer;
-webkit-transition: all 200ms;
-moz-transition: all 200ms;
-ms-transition: all 200ms;

1
following.html

@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
<script src="js/twister_directmsg.js"></script>
<script src="js/twister_actions.js"></script>
<script src="js/interface_common.js"></script>
<script src="jquery-emotions/jquery.emotions.js"></script>
<script>
$(document).ready(function()

19
js/calm.js

@ -7,10 +7,12 @@ $(function(){ @@ -7,10 +7,12 @@ $(function(){
e.stopPropagation();
});
$('#showqr').on('click', function(){
if($('#qrcode img')[0]) return;
var skey = document.getElementById('skey').innerText;
new QRCode(document.getElementById("qrcode"), skey);
});
if($('#qrcode img')[0]) return;
var skey = document.getElementById('skey').innerText;
new QRCode(document.getElementById("qrcode"), skey);
});
})
function dhtIndicatorBg(){
var bgcolor = '';
@ -27,7 +29,6 @@ $(function(){ @@ -27,7 +29,6 @@ $(function(){
};
setTimeout(dhtIndicatorBg, 300);
setTimeout(function() {setInterval(dhtIndicatorBg, 2000)}, 400);
})
function modalDMIntr() {
$(".cancel").on('click', function(event){
@ -126,11 +127,11 @@ function keysSend() { @@ -126,11 +127,11 @@ function keysSend() {
}
function mensAutocomplete() {
var storFollArr = JSON.parse(localStorage[localStorage.defaultScreenName]), suggests = [];
var suggests = [];
for(var i = 0; i < storFollArr.followingUsers.length; i++){
if(storFollArr.followingUsers[i] == localStorage.defaultScreenName) continue;
suggests.push(storFollArr.followingUsers[i]);
for(var i = 0; i < followingUsers.length; i++){
if(followingUsers[i] == localStorage.defaultScreenName) continue;
suggests.push(followingUsers[i]);
}
suggests.reverse();
$('textarea').textcomplete([

8
js/interface_common.js

@ -93,7 +93,6 @@ function newProfileModal(username) { @@ -93,7 +93,6 @@ function newProfileModal(username) {
var profileModalContent = $( "#profile-modal-template" ).children().clone(true);
updateProfileData(profileModalContent, username);
return profileModalContent;
}
@ -113,6 +112,13 @@ function openProfileModal(e) @@ -113,6 +112,13 @@ function openProfileModal(e)
//título do modal
$( "."+profileModalClass + " h3" ).text( polyglot.t("users_profile", { username: username }) );
//hed//add dinamic follow button in profile modal window
if(followingUsers.indexOf(username) != -1){
$('.profile-card button').first().removeClass('follow').addClass('profileUnfollow').text(polyglot.t('Unfollow')).on('click', function(){
unfollow(username);
});
};
}
function newHashtagModal(hashtag) {

2
js/twister_actions.js

@ -191,7 +191,7 @@ function clearHashtagProcessed() { @@ -191,7 +191,7 @@ function clearHashtagProcessed() {
}
function requestHashtag(postboard,hashtag,resource) {
if(/[a-z]/i.test(hashtag))hashtag = hashtag.toLowerCase(); //hed//fix english hashtag case dependentcy bug
if(/[a-z]/i.test(hashtag))hashtag = hashtag.toLowerCase(); //hed//fix english hashtag case dependency bug
dhtget( hashtag, resource, "m",
function(args, data) {
processHashtag(args.postboard, args.hashtag, data);

Loading…
Cancel
Save