Browse Source

Merge branch 'pr/218'

master
Miguel Freitas 10 years ago
parent
commit
32217ae150
  1. 8
      css/profile.css
  2. 238
      css/style.css
  3. 20
      home.html
  4. 210
      js/interface_common.js
  5. 21
      js/twister_actions.js
  6. 47
      js/twister_directmsg.js
  7. 7
      js/twister_following.js
  8. 1
      js/twister_io.js
  9. 22
      theme_calm/css/style.css
  10. 3147
      theme_nin/css/style.css
  11. 4
      theme_nin/js/theme_option.js
  12. 33
      theme_nin/sass/style.sass

8
css/profile.css

@ -177,7 +177,7 @@ @@ -177,7 +177,7 @@
}
/*************************************
****************** PROFILE MODAL
**************************************/
*************************************
.profile-modal .modal-wrapper
{
width: 580px;
@ -186,13 +186,13 @@ @@ -186,13 +186,13 @@
position: absolute;
top:10%;
height: 80%;
margin-left: -300px;
margin-left: -290px;
}
}*/
.profile-modal .modal-content
{
padding: 3px;
height: 90%;
height: 100%;
}
#msngrswr {
display: none;

238
css/style.css

@ -809,9 +809,9 @@ ol.toptrends-list { @@ -809,9 +809,9 @@ ol.toptrends-list {
font-variant: small-caps;
border-bottom: solid 1px rgba( 69, 71, 77, .1 );
margin: 0 0 5px 0;
padding-left: 5px;
padding-left: 10px;
background: #e34f42;
width: 513px;
width: 100%;
}
.postboard h2.fixed
{
@ -1253,19 +1253,31 @@ ol.toptrends-list { @@ -1253,19 +1253,31 @@ ol.toptrends-list {
}
.modal-wrapper
{
width: 580px;
border-radius: 5px;
overflow: hidden;
position: absolute;
top: 50%;
left: 50%;
background: rgba( 255, 255, 255, 1.0 );
box-shadow: 0 0 30px rgba( 0, 0, 0, .6 );
top:10%;
left: 50%;
height: 80%;
margin-left: -290px;
box-shadow: 0 0 30px rgba( 0, 0, 0, .6 );
background: rgba( 255, 255,255, 1.0 );
z-index: 3;
}
.modal-content{
height: 100%;
overflow-y: auto;
}
.modal-header
{
position: relative;
}
.modal-header h3
{
padding: 5px;
padding: 5px 10px;
font-weight: bold;
background: #e34f42;
color: #fff;
@ -1314,73 +1326,10 @@ ol.toptrends-list { @@ -1314,73 +1326,10 @@ ol.toptrends-list {
{
padding: 5px 20px;
}
/*************************************
*************** FOLLOWING-CONFIG MODAL
**************************************/
.following-config-modal .modal-wrapper
{
top: 43%;
left: 25%;
width: 50%;
}
.following-config-modal .modal-content
{
padding: 10px;
text-align: center;
}
.following-config-modal .modal-buttons
{
display: none;
}
.following-config-method-buttons
{
padding: 10px;
}
/*************************************
****************** RETWIST POSTS MODAL
**************************************/
.reTwist .modal-wrapper
{
width: 520px;
margin: -100px 0 0 -260px;
}
.reTwist .post-expand,
.reTwist .post-interactions
{
display: none;
}
/*************************************
****************** REPLY POSTS MODAL
**************************************/
.reply .modal-wrapper
{
width: 520px;
margin: -100px 0 0 -260px;
}
.reply .modal-buttons
{
display: none;
}
.reply .post-expand,
.reply .post-interactions
{
display: none;
}
/*************************************
****************** DIRECT MESSAGES MODAL
**************************************/
.directMessages .modal-wrapper
{
width: 540px;
height: 470px;
margin: -200px 0 0 -280px;
overflow-x: hidden;
}
.directMessages .modal-content
{
overflow-y: auto;
height: 300px;
}
.directMessages .modal-buttons
{
display: none;
@ -1500,19 +1449,8 @@ ol.toptrends-list { @@ -1500,19 +1449,8 @@ ol.toptrends-list {
}
/*************************************
****************** HASHTAG MODAL
**************************************/
.hashtag-modal .modal-wrapper
{
width: 560px;
height: 470px;
margin: -200px 0 0 -280px;
overflow: hidden;
}
.hashtag-modal .modal-content
{
overflow-y: auto;
height: 440px;
}
*************************************/
.hashtag-modal .modal-buttons
{
display: none;
@ -1523,21 +1461,8 @@ ol.toptrends-list { @@ -1523,21 +1461,8 @@ ol.toptrends-list {
}
/*************************************
****************** CONVERSATION MODAL
**************************************/
.conversation-modal .modal-wrapper
{
position: absolute;
width: 560px;
height: 80%;
top: 10%;
margin: 0 0 0 -330px;
overflow: hidden;
}
.conversation-modal .modal-content
{
overflow-y: auto;
height: 90%;
}
*************************************/
.conversation-modal .modal-buttons
{
display: none;
@ -1548,20 +1473,8 @@ ol.toptrends-list { @@ -1548,20 +1473,8 @@ ol.toptrends-list {
}
/*************************************
****************** FOLLOWING MODAL
**************************************/
.following-modal .modal-wrapper
{
width: 560px;
height: 470px;
margin: -200px 0 0 -280px;
overflow-x: hidden;
}
.following-modal .modal-content
{
padding: 15px;
height: 400px;
overflow-y: auto;
}
************************************/
.following-modal .modal-buttons
{
display: none;
@ -1588,20 +1501,7 @@ ol.toptrends-list { @@ -1588,20 +1501,7 @@ ol.toptrends-list {
}
/*************************************
******************* WHO TO FOLLOW MODAL
**************************************/
.who-to-follow-modal .modal-wrapper
{
width: 560px;
height: 470px;
margin: -200px 0 0 -280px;
overflow-x: hidden;
}
.who-to-follow-modal .modal-content
{
padding: 15px;
height: 400px;
overflow-y: auto;
}
*************************************/
.who-to-follow-modal .modal-buttons
{
display: none;
@ -1636,6 +1536,90 @@ ol.toptrends-list { @@ -1636,6 +1536,90 @@ ol.toptrends-list {
font-size: 12px;
color: rgba( 0, 0, 0, .6 );
}
/*************************************
****************** POPUP PROMPT ******
**************************************/
.prompt-wrapper
{
position: fixed;
top: 50%;
left: 50%;
background: rgba( 255, 255,255, 1.0 );
box-shadow: 0 0 30px rgba( 0, 0, 0, .6 );
z-index: 5;
width: 600px;
margin-left:-300px;
}
.prompt-wrapper .modal-header h3{
background: #45474D;
}
/*************************************
*************** FOLLOWING-CONFIG PROMPT
**************************************/
.following-config-modal .modal-content
{
padding: 10px;
text-align: center;
}
.following-config-modal .modal-buttons
{
display: none;
}
.following-config-method-buttons
{
padding: 10px;
}
/*************************************
****************** RETWIST POSTS PROMPT
**************************************/
.reTwist .post-expand,
.reTwist .post-interactions
{
display: none;
}
.reTwist .post {
margin: 10px;
padding: 5px;
min-height: 68px;
}
/*************************************
****************** REPLY POSTS PROMPT
**************************************/
.reply .modal-buttons
{
display: none;
}
.reply .post-expand,
.reply .post-interactions
{
display: none;
}
.reply .textcomplete-wrapper{
padding-top: 10px;
}
.reply .textcomplete-wrapper textarea{
margin: 10px;
width: 580px;
}
.reply .post {
margin: 10px;
padding: 5px;
min-height: 68px;
}
/*************************************
****************** LOADER ************
**************************************/

20
home.html

@ -157,7 +157,7 @@ @@ -157,7 +157,7 @@
<small>.</small>
<a class="refresh-users">Refresh</a>
<small>.</small>
<a class="view-all-users">View All</a>
<a class="view-all-users" href="#whotofollow">View All</a>
<ol class="follow-suggestions">
<!-- use "follow-suggestion-template" here -->
</ol>
@ -330,7 +330,7 @@ @@ -330,7 +330,7 @@
<div class="modal-header">
<h3></h3>
<span id="closeModal" class="modal-close cancel">&times;</span>
<span class="modal-back">&lt;</span>
<span class="modal-back" onClick="history.back();">&lt;</span>
<span class="mark-all-as-read"></span>
</div>
<div class="modal-content"></div>
@ -342,6 +342,20 @@ @@ -342,6 +342,20 @@
</div>
<!-- TEMPLATE DO MODAL GENÉRICO END -->
<!-- TEMPLATE GENERAL PROMPT -->
<div class="prompt-wrapper">
<div class="modal-header">
<h3></h3>
<span class="modal-close prompt-close">&times;</span>
</div>
<div class="modal-content"></div>
<div class="modal-buttons">
<button class="modal-cancel prompt-close">Cancel</button>
<button class="modal-propagate">Retransmit</button>
</div>
</div>
<!-- TEMPLATE GENERAL PROMPT END-->
<!-- MODAL DE RETWEET INIT -->
<!-- MODAL DE RETWEET END -->
@ -477,7 +491,7 @@ @@ -477,7 +491,7 @@
<button class="postboard-news" style="display:none;"></button>
</h2>
<span class="no-posts-found-message" style="display:none;">There aren't any posts with this hashtag.</span>
<span class="no-posts-found-message" style="display:none;">Couldn't find any posts with this hashtag. Still searching.</span>
<ol id="profile-posts" class="postboard-posts">
</ol>

210
js/interface_common.js

@ -32,7 +32,7 @@ function openModal( modalClass ) @@ -32,7 +32,7 @@ function openModal( modalClass )
function closeModal($this)
{
closeModalHandler($this);
window.location.hash = '';
window.location.hash = '#';
}
function closeModalHandler($this)
@ -50,6 +50,45 @@ function closeModalHandler($this) @@ -50,6 +50,45 @@ function closeModalHandler($this)
});
}
function openPrompt( modalClass )
{
var $oldModal = $("body").children(".prompt-wrapper");
var $template = $( "#templates" );
var $templateModal = $template.find( ".prompt-wrapper" ).clone(true);
$templateModal.addClass( modalClass );
if( $oldModal.length ) {
$templateModal.show();
$oldModal.replaceWith($templateModal);
} else {
$templateModal.prependTo( "body" ).fadeIn( "fast" );
}
//escondo o overflow da tela
var $body = $( "body" );
$body.css({
"overflow": "hidden"
});
}
function closePrompt()
{
var $body = $( "body" );
var $modalWindows = $( "body" ).children( ".prompt-wrapper" );
$modalWindows.fadeOut( "fast", function()
{
$modalWindows.detach();
});
$body.css({
"overflow": "auto",
"margin-right": "0"
});
}
function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) {
networkUpdate(function(args) {
if( !twisterdConnectedAndUptodate ) {
@ -102,26 +141,6 @@ function newProfileModal(username) { @@ -102,26 +141,6 @@ function newProfileModal(username) {
return profileModalContent;
}
function openProfileModal(e)
{
e.stopPropagation();
e.preventDefault();
var $this = $( this );
var username = $.MAL.urlToUser( $this.attr("href") );
openProfileModalWithUsername(username);
}
function openProfileModalWithUsername(username)
{
if(!username)
{
alert(polyglot.t("You don't have any profile because you are not logged in."));
return;
}
window.location.hash = '#profile?user=' + username;
}
function openProfileModalWithUsernameHandler(username)
{
var profileModalClass = "profile-modal";
@ -137,9 +156,7 @@ function openProfileModalWithUsernameHandler(username) @@ -137,9 +156,7 @@ function openProfileModalWithUsernameHandler(username)
if(followingUsers.indexOf(username) != -1){
$('.profile-card button.dinamicFollowButton').first().addClass('profileUnfollow').text(polyglot.t('Unfollow')).on('click', function(){
unfollow(username);
closeModal($(this));
// delay reload so dhtput may do it's job
window.setTimeout("location.reload();",500);
window.setTimeout("loadModalFromHash();",500);
});
} else {
$('.profile-card button.dinamicFollowButton').first().addClass('follow').text(polyglot.t('Follow')).on('click', userClickFollow );
@ -162,21 +179,6 @@ function newHashtagModal(hashtag) { @@ -162,21 +179,6 @@ function newHashtagModal(hashtag) {
return hashtagModalContent;
}
function openHashtagModal(e)
{
e.stopPropagation();
e.preventDefault();
var $this = $( this );
var hashtag = $this.text().substring(1).toLowerCase();
openHashtagModalFromSearch(hashtag);
}
function openHashtagModalFromSearch(hashtag)
{
window.location.hash = '#hashtag?hashtag=' + encodeURIComponent(hashtag);
}
function openHashtagModalFromSearchHandler(hashtag)
{
var hashtagModalClass = "hashtag-modal";
@ -253,13 +255,8 @@ function newFollowingModal(username) { @@ -253,13 +255,8 @@ function newFollowingModal(username) {
return followingModalContent;
}
function openFollowingModal(e)
function openFollowingModal(username)
{
e.stopPropagation();
e.preventDefault();
var $this = $( this );
var username = $.MAL.followingUrlToUser( $this.attr("href") );
var followingModalClass = "following-modal";
openModal( followingModalClass );
@ -325,9 +322,7 @@ function fillWhoToFollowModal(list, hlist, start) { @@ -325,9 +322,7 @@ function fillWhoToFollowModal(list, hlist, start) {
return true;
}
function openWhoToFollowModal(e) {
e.stopPropagation();
e.preventDefault();
function openWhoToFollowModal() {
var whoToFollowModalClass = "who-to-follow-modal";
openModal( whoToFollowModalClass );
@ -349,62 +344,113 @@ function openWhoToFollowModal(e) { @@ -349,62 +344,113 @@ function openWhoToFollowModal(e) {
$( "." + whoToFollowModalClass + " h3" ).text( polyglot.t("Who to Follow") );
}
function newConversationModal(postLi) {
function newConversationModal(username,resource) {
var hashtagModalContent = $( "#hashtag-modal-template" ).children().clone(true);
requestPost(hashtagModalContent.find(".postboard-posts"),username,resource,
function(args){
postLi=args.hashtagModalContent.find(".postboard-posts").children().first();
postLi.css('display','none');
getTopPostOfConversation(postLi,null,args.hashtagModalContent.find(".postboard-posts"));
},{ hashtagModalContent:hashtagModalContent }
);
hashtagModalContent.find( ".postboard-news").click(function (){
$(this).hide();
displayHashtagPending($(".conversation-modal .postboard-posts"));
});
getTopPostOfConversation(postLi, null, hashtagModalContent.find(".postboard-posts"));
return hashtagModalContent;
}
function openConversationModal(e)
{
function openConversationClick(e){
e.stopPropagation();
e.preventDefault();
var $this = $( this );
var postLi = $this.parents(".module.post.original.open").find('.module.post.original');
var username=postLi.find('.post-data').attr('data-screen-name');
var resource='post'+postLi.find('.post-data').attr('data-id');
window.location.hash="#conversation?post="+username+':'+resource;
}
function openConversationModal(username,resource)
{
var conversationModalClass = "conversation-modal";
openModal( conversationModalClass );
//$( "." + threadingModalClass ).attr("data-resource","hashtag");
openModal( conversationModalClass );
var hashtagModalContent = newConversationModal( postLi );
hashtagModalContent.appendTo("." + conversationModalClass + " .modal-content");
var conversationModalContent = newConversationModal(username,resource);
conversationModalContent.appendTo("." + conversationModalClass + " .modal-content");
//título do modal
$( "." + conversationModalClass + " h3" ).text( polyglot.t('conversation_title', {'username': postLi.find('.post-data').attr('data-screen-name')}) );
$( "." + conversationModalClass + " h3" ).text( polyglot.t('conversation_title', {'username': username} ) );
}
function watchHashChange(e)
{
if(e!=null){
var prevurlsplit = e.oldURL.split('#');
var prevhashstring=prevurlsplit[1];
var notFirstModalView=(prevhashstring!=undefined && prevhashstring.length>0 );
var notNavigatedBackToFirstModalView=(window.history.state==null || ( window.history.state!=null && window.history.state.showCloseButton!=false ) )
if(notFirstModalView && notNavigatedBackToFirstModalView ) ){
$('.modal-back').css('display','inline');
} else {
window.history.pushState({showCloseButton:false},null,null);
$('.modal-back').css('display','none');
}
}
loadModalFromHash();
}
function loadModalFromHash(){
var hashstring = window.location.hash
hashstring = decodeURIComponent(hashstring);
var hashdata = hashstring.split(':');
if (hashdata[0] != '#web+twister') {
hashdata = hashstring.match(/(hashtag|profile|mentions)\?(?:user|hashtag)=(.+)/);
hashdata = hashstring.match(/(hashtag|profile|mentions|directmessages|following|conversation)\?(?:user|hashtag|post)=(.+)/);
}
if (hashdata && hashdata[1] != undefined && hashdata[2] != undefined)
{
if (hashdata && hashdata[1] != undefined && hashdata[2] != undefined) {
if(hashdata[1] == 'profile') {
openProfileModalWithUsernameHandler(hashdata[2]);
}else if (hashdata[1] == 'hashtag') {
openHashtagModalFromSearchHandler(hashdata[2]);
}else if (hashdata[1] == 'mentions') {
openMentionsModalHandler(hashdata[2]);
}else if (hashdata[1] == 'directmessages') {
openDmWithUserModal(hashdata[2]);
}else if (hashdata[1] == 'following') {
openFollowingModal(hashdata[2]);
}else if (hashdata[1] == 'conversation') {
splithashdata2=hashdata[2].split(':')
//console.log('username='+splithashdata2[0]+' resource='+splithashdata2[1]);
openConversationModal(splithashdata2[0],splithashdata2[1]);
}
} else {
} else if (hashstring == '#directmessages') {
directMessagesPopup();
} else if (hashstring == '#whotofollow'){
openWhoToFollowModal();
} else{
closeModalHandler();
}
}
}
function initHashWatching()
{
@ -419,7 +465,8 @@ function initHashWatching() @@ -419,7 +465,8 @@ function initHashWatching()
// Register hash spy and launch it once
window.addEventListener('hashchange', watchHashChange, false);
watchHashChange(null);
//watchHashChange(null);
window.location.hash="#";
}
@ -437,7 +484,7 @@ var reTwistPopup = function( e ) @@ -437,7 +484,7 @@ var reTwistPopup = function( e )
}
var reTwistClass = "reTwist";
openModal( reTwistClass );
openPrompt( reTwistClass );
//título do modal
$( ".reTwist h3" ).text( polyglot.t("retransmit_this") );
@ -453,7 +500,7 @@ var reTwistPopup = function( e ) @@ -453,7 +500,7 @@ var reTwistPopup = function( e )
var replyInitPopup = function(e, post)
{
var replyClass = "reply";
openModal( replyClass );
openPrompt( replyClass );
//título do modal
var fullname = post.find(".post-info-name").text();
@ -1253,7 +1300,13 @@ var postSubmit = function(e, oldLastPostId) @@ -1253,7 +1300,13 @@ var postSubmit = function(e, oldLastPostId)
var remainingCount = tweetForm.find(".post-area-remaining");
remainingCount.text(140);
$replyText.attr("placeholder", "Your message was sent!");
closeModal($this);
if ($this.parents('.modal-wrapper').length) {
closeModal($this);
} else if ($this.parents('.prompt-wrapper').length) {
closePrompt();
}
if($this.closest('.post-area,.post-reply-content')){
$('.post-area-new').removeClass('open').find('textarea').blur();
};
@ -1269,11 +1322,11 @@ var retweetSubmit = function(e) @@ -1269,11 +1322,11 @@ var retweetSubmit = function(e)
e.preventDefault();
var $this = $( this );
var $postOrig = $this.closest(".modal-wrapper").find(".post-data");
var $postOrig = $this.closest(".prompt-wrapper").find(".post-data");
newRtMsg($postOrig);
closeModal($this);
closePrompt();
}
function changeStyle() {
@ -1349,24 +1402,33 @@ function replaceDashboards() { @@ -1349,24 +1402,33 @@ function replaceDashboards() {
}
$( ".who-to-follow .refresh-users" ).bind( "click", refreshWhoToFollow );
$( ".who-to-follow .view-all-users" ).bind( "click", openWhoToFollowModal );
//$( ".who-to-follow .view-all-users" ).bind( "click", function(){window.location.hash = "#whotofollow"} );
}
function initInterfaceCommon() {
$( "body" ).on( "click", function(event) {
if($(event.target).hasClass('cancel')) closeModal($(this));
});
$(".cancel").on('click', function(event){
if(!$(event.target).hasClass("cancel")) return;
if($(".modal-content").attr("style") != undefined){$(".modal-content").removeAttr("style")};
$('.modal-back').css('display', 'none');
$('.mark-all-as-read').css('display', 'none');
});
$(".prompt-close").on('click', function(event){
closePrompt();
});
/*
$('.modal-back').on('click', function(){
if($('.modal-content .direct-messages-list')[0]) return;
directMessagesPopup();
$(".modal-content").removeAttr("style");
});
*/
$('.dropdown-menu').on('keydown', function(e){
e = event || window.event;
e.stopPropagation();
@ -1385,7 +1447,7 @@ function initInterfaceCommon() { @@ -1385,7 +1447,7 @@ function initInterfaceCommon() {
$( ".post-area-new" ).clickoutside( unfocusThis );
$( ".post-submit").click( postSubmit );
$( ".modal-propagate").click( retweetSubmit );
$( ".expanded-content .show-more").bind('click', openConversationModal);
$( ".expanded-content .show-more").bind('click', openConversationClick);
if ($.Options.getUnicodeConversionOpt() === "disable")
$( ".undo-unicode" ).click( undoLastUnicode ).css("display", "none");
@ -1395,9 +1457,9 @@ function initInterfaceCommon() { @@ -1395,9 +1457,9 @@ function initInterfaceCommon() {
var $replyText = $( ".post-area-new textarea" );
$replyText.on("keyup", replyTextKeypress );
$( ".open-profile-modal").bind( "click", openProfileModal );
$( ".open-hashtag-modal").bind( "click", openHashtagModal );
$( ".open-following-modal").bind( "click", openFollowingModal );
$( ".open-profile-modal").bind( "click", function(e){ e.stopPropagation(); } );
//$( ".open-hashtag-modal").bind( "click", openHashtagModal );
//$( ".open-following-modal").bind( "click", openFollowingModal );
$( ".userMenu-connections a").bind( "click", openMentionsModal );
$( ".mentions-from-user").bind( "click", openMentionsModal );

21
js/twister_actions.js

@ -147,6 +147,27 @@ function appendPostToContainer(postFromJson, containerToAppend) @@ -147,6 +147,27 @@ function appendPostToContainer(postFromJson, containerToAppend)
var profilePostsLoading = false;
function requestPost(containerToAppend,username,resource,cbFunc,cbArgs){
console.log('dhtget '+username+' '+resource);
dhtget( username, resource, "s",
function(args, postFromJson) {
if( postFromJson ) {
console.log(postFromJson);
appendPostToContainer(postFromJson,args.containerToAppend);
if(args.cbFunc!=undefined) args.cbFunc(args.cbArgs);
}
},
{containerToAppend:containerToAppend,cbFunc:cbFunc,cbArgs:cbArgs}
);
}
function requestPostRecursively(containerToAppend,username,resource,count,useGetposts)
{
var max_id = -1;

47
js/twister_directmsg.js

@ -158,7 +158,6 @@ function directMessagesPopup() @@ -158,7 +158,6 @@ function directMessagesPopup()
$( ".directMessages h3" ).text( polyglot.t("Direct Messages") );
requestDMsnippetList($(".directMessages").find(".direct-messages-list"));
$('.modal-back').css('display','inline');
$('.mark-all-as-read').css('display', 'inline');
$('.mark-all-as-read').attr('title', polyglot.t("Mark all as read"));
@ -171,35 +170,13 @@ function directMessagesPopup() @@ -171,35 +170,13 @@ function directMessagesPopup()
});
}
//exibe a thread de mensagens individual
function hideDmSnippetShowDmThread()
{
var $this = $( this );
//escondo a listagem de mensagens diretas...
var containerToAnimate = $this.parents( ".direct-messages-list" );
containerToAnimate.hide();
var dm_screenname = $this.attr("data-dm-screen-name");
openDmWithUserModal(dm_screenname);
}
function directMessagesWithUserPopup()
function openDmWithUserModal(dm_screenname)
{
if(!defaultScreenName)
{
alert(polyglot.t("You have to log in to use direct messages."));
return;
if(!defaultScreenName){
alert(polyglot.t("You have to log in to use direct messages."));
return;
}
var $userInfo = $(this).closest("[data-screen-name]");
var dm_screenname = $userInfo.attr("data-screen-name");
openDmWithUserModal( dm_screenname );
}
function openDmWithUserModal(dm_screenname)
{
var directMessagesClass = "directMessages";
openModal( directMessagesClass );
@ -220,10 +197,18 @@ function openDmWithUserModal(dm_screenname) @@ -220,10 +197,18 @@ function openDmWithUserModal(dm_screenname)
function initInterfaceDirectMsg() {
$( ".direct-messages" ).bind( "click", directMessagesPopup );
$( "#dm-snippet-template" ).bind( "click", hideDmSnippetShowDmThread );
$( ".direct-messages" ).attr("href","#directmessages");
$( ".userMenu-messages a" ).attr("href","#directmessages");
$( "#dm-snippet-template" ).bind( "click", function(){
window.location.hash='#directmessages?user='+$(this).attr("data-dm-screen-name");
} );
$( ".dm-submit").click( directMsgSubmit );
$( ".userMenu-messages a" ).bind( "click", directMessagesPopup );
$( ".direct-messages-with-user" ).bind( "click", directMessagesWithUserPopup );
$( ".direct-messages-with-user" ).bind( "click", function() {
window.location.hash='#directmessages?user='+$(this).closest("[data-screen-name]").attr("data-screen-name");
} );
}

7
js/twister_following.js

@ -464,7 +464,6 @@ function fillWhoFollows(list, item, offset, size) { @@ -464,7 +464,6 @@ function fillWhoFollows(list, item, offset, size) {
follower_link.attr("data-screen-name", list[i]);
follower_link.attr("href", $.MAL.userUrl(list[i]));
follower_link.text(list[i]);
follower_link.on("click", openProfileModal);
getFullname( list[i], follower_link );
item.append( follower_link );
@ -690,7 +689,7 @@ function userClickFollow(e) { @@ -690,7 +689,7 @@ function userClickFollow(e) {
}
var FollowingConfigClass = "following-config-modal";
openModal( FollowingConfigClass );
openPrompt( FollowingConfigClass );
var FollowingConfigContent = newFollowingConfigModal(username);
FollowingConfigContent.appendTo("." +FollowingConfigClass +" .modal-content");
@ -709,9 +708,9 @@ function initUserSearch() { @@ -709,9 +708,9 @@ function initUserSearch() {
$(".following-config-method-buttons .public-following").bind( "click", setFollowingMethod );
$(".following-config-method-buttons .public-following").click( function() {
closeModal($(this));
closePrompt();
// delay reload so dhtput may do it's job
window.setTimeout("location.reload();",500);
window.setTimeout("loadModalFromHash();",500);
});
}

1
js/twister_io.js

@ -93,6 +93,7 @@ function _dhtgetAbortPending(locator) @@ -93,6 +93,7 @@ function _dhtgetAbortPending(locator)
// the value ["v"] is extracted from response and returned to callback
// null is passed to callback in case of an error
function dhtget( username, resource, multi, cbFunc, cbArg, timeoutArgs ) {
//console.log('dhtget '+username+' '+resource+' '+multi);
var locator = _dhtgetLocator(username, resource, multi);
if( locator in _dhtgetPendingMap) {
_dhtgetAddPending(locator, cbFunc, cbArg);

22
theme_calm/css/style.css

@ -1645,6 +1645,26 @@ textarea.splited-post { @@ -1645,6 +1645,26 @@ textarea.splited-post {
.login .module input::-ms-input-placeholder {
color: #fff;
}
/*************************************
****************** POPUP PROMPT ******
**************************************/
.prompt-wrapper
{
position: absolute;
top: 50%;
left: 50%;
background: rgba( 255, 255,255, 1.0 );
box-shadow: 0 0 30px rgba( 0, 0, 0, .6 );
z-index: 5;
width: 600px;
margin-left:-300px;
}
/*************************************
**************************** POPUP MODAL
**************************************/
@ -2314,4 +2334,4 @@ p.post-text img { @@ -2314,4 +2334,4 @@ p.post-text img {
.reply textarea{
margin-top: 20px;
}
}

3147
theme_nin/css/style.css

File diff suppressed because one or more lines are too long

4
theme_nin/js/theme_option.js

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
$(function(){
$('#closeModal').html('');
$('.modal-close').html('');
$('.modal-back').html('');
$('.twister-user-remove').html('');
$('.profile-card-main').attr('style', '');
$('img[src$="img/tornado_avatar.png"]').attr("src","theme_nin/img/tornado_avatar.png");
$('.userMenu-search-profiles button').html('').attr('title',polyglot.t('Follow'));

33
theme_nin/sass/style.sass

@ -554,9 +554,18 @@ ol.toptrends-list @@ -554,9 +554,18 @@ ol.toptrends-list
/*********** POPUP PROMPT *************/
.prompt-wrapper
position: fixed
top: 50%
left: 50%
background: rgba( 255, 255,255, 1.0 )
box-shadow: 0 0 30px rgba( 0, 0, 0, .6 )
z-index: 5
width: 600px
margin-left: -300px
/*********** POPUP MODAL*************/
/*********** POPUP MODAL **************/
.modal-blackout
position: fixed
@ -653,11 +662,17 @@ ol.toptrends-list @@ -653,11 +662,17 @@ ol.toptrends-list
.modal-back
@extend .extend-icon
@extend .icon-left
@extend button
margin: 0
background: $main-color-color
display: none!important
float: left
position: absolute
right: 35px
top: 0
font-size: 14px
line-height: 40px
cursor: pointer
color: rgba(white, 0.7)
&:hover
color: white
b
display: none
.modal-buttons
padding: 10px
@ -703,6 +718,8 @@ ol.toptrends-list @@ -703,6 +718,8 @@ ol.toptrends-list
margin: 0 0 0 0-($postboard-modal-width/2)
.modal-buttons, .post-expand, .post-interactions
display: none
.post-area
padding-bottom: 6px
/****** DIRECT MESSAGES MODAL**********/
@ -1097,4 +1114,4 @@ ul.dropdown-menu @@ -1097,4 +1114,4 @@ ul.dropdown-menu
transition: all 200ms
@import _responsive
@import _responsive

Loading…
Cancel
Save