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. 11
      js/calm.js
  5. 8
      js/interface_common.js
  6. 2
      js/twister_actions.js

16
css/profile.css

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

1
css/style.css

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

1
following.html

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

11
js/calm.js

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

8
js/interface_common.js

@ -93,7 +93,6 @@ function newProfileModal(username) {
var profileModalContent = $( "#profile-modal-template" ).children().clone(true); var profileModalContent = $( "#profile-modal-template" ).children().clone(true);
updateProfileData(profileModalContent, username); updateProfileData(profileModalContent, username);
return profileModalContent; return profileModalContent;
} }
@ -113,6 +112,13 @@ function openProfileModal(e)
//título do modal //título do modal
$( "."+profileModalClass + " h3" ).text( polyglot.t("users_profile", { username: username }) ); $( "."+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) { function newHashtagModal(hashtag) {

2
js/twister_actions.js

@ -191,7 +191,7 @@ function clearHashtagProcessed() {
} }
function requestHashtag(postboard,hashtag,resource) { 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", dhtget( hashtag, resource, "m",
function(args, data) { function(args, data) {
processHashtag(args.postboard, args.hashtag, data); processHashtag(args.postboard, args.hashtag, data);

Loading…
Cancel
Save