Browse Source

Merge pull request #295 from slr/tasty-fixes-13

#letsfixeverythin
master
miguelfreitas 9 years ago
parent
commit
422cb44e3c
  1. 4
      AUTHORS
  2. 13
      css/style.css
  3. 8
      js/options.js
  4. 13
      js/twister_formatpost.js
  5. 27
      js/twister_network.js
  6. 37
      network.html
  7. 3
      options.html
  8. 13
      theme_calm/css/style.css
  9. 7
      theme_nin/css/style.css
  10. 7
      theme_nin/sass/_network.sass
  11. 1
      theme_nin/sass/style.sass

4
AUTHORS

@ -11,7 +11,7 @@ Msjoinder @@ -11,7 +11,7 @@ Msjoinder
Polyglot support (internationalization), multiple fixes
erkan yüksel
Image preview, automatic unicode conversion, split long posts, hiding posts with mentions and more.
Image preview, automatic unicode conversion, split long posts, hiding posts with mentions, retwists with comment and more.
Hedgehog
Calm theme, CSS + artwork and more.
@ -38,5 +38,5 @@ Julian Steinwachs @@ -38,5 +38,5 @@ Julian Steinwachs
UI navigation overhaul with proper browser's back button support
Сёма Мрачный
Desktop notifications, language filtering, ~markdown, ton of fixes.
Desktop notifications, language filtering, twistday observation, Markout markup, post preview, retwists with comment, ton of fixes.

13
css/style.css

@ -652,6 +652,7 @@ textarea.splited-post { @@ -652,6 +652,7 @@ textarea.splited-post {
background-color: #F2FFBA;
border: solid 1px #B4C669;
font-size: 11px;
line-height: normal;
margin: 4px 0;
padding: 4px;
word-wrap: break-word;
@ -1294,10 +1295,7 @@ ol.toptrends-list { @@ -1294,10 +1295,7 @@ ol.toptrends-list {
font-size: 13px;
list-style: circle;
}
.network.singleBlock button
{
padding: 3px 10px;
}
.network.singleBlock ul li > span
{
font-weight: bold;
@ -1335,10 +1333,9 @@ ol.toptrends-list { @@ -1335,10 +1333,9 @@ ol.toptrends-list {
{
border: 2px solid green;
}
.character-limit
{
float: right;
margin-right: 18px;
.network .post-area-extras {
margin-right: 20px;
}
/*************************************

8
js/options.js

@ -377,13 +377,7 @@ function tickOptionsPostPreview() { @@ -377,13 +377,7 @@ function tickOptionsPostPreview() {
if ($.Options.displayPreview.val === 'enable') {
imgPreviewCont.empty();
var links = elem.children().first().find('a[rel="nofollow"]');
if (links.length) {
setPostImagePreview(elem, links);
imgPreviewCont.show();
} else {
imgPreviewCont.hide();
}
setPostImagePreview(elem, elem.children().first().find('a'));
} else {
imgPreviewCont.hide();
}

13
js/twister_formatpost.js

@ -402,14 +402,19 @@ function htmlFormatMsg(msg) { @@ -402,14 +402,19 @@ function htmlFormatMsg(msg) {
if (i !== 0) {
l = kindOfL(i - 1);
} else {
l = 0;
}
if (j !== msg.str.length) {
r = kindOfR(j);
} else {
r = 0;
}
if (i === 0 || l === -10) {
if ((i === 0 && r < 0) || l === -10) {
p.push({i: i, k: j - i, t: -1, w: w, a: -1, p: -1});
w = false;
} else if (j === msg.str.length || r === -10) {
} else if ((j === msg.str.length && l < 0) || r === -10) {
p.push({i: i, k: j - i, t: 1, w: w, a: -1, p: -1});
w = false;
} else {
@ -807,5 +812,9 @@ function setPostImagePreview(elem, links) { @@ -807,5 +812,9 @@ function setPostImagePreview(elem, links) {
}
}
}
if (previewContainer.children().length)
previewContainer.show();
else
previewContainer.hide();
}
}

27
js/twister_network.js

@ -244,17 +244,20 @@ function getSpamMsg() { @@ -244,17 +244,20 @@ function getSpamMsg() {
}, {});
}
function setSpamMsg() {
var $postArea = $(".spam-msg");
var $localUsersList = $("select.local-usernames.spam-user");
var params = [$localUsersList.val(), $postArea.val()]
function setSpamMsg(event) {
event.stopPropagation();
event.preventDefault();
var btnUpdate = $(event.target);
$.MAL.disableButton(btnUpdate);
var params = [$("select.local-usernames.spam-user").val(),
btnUpdate.closest('.post-area-new').find('textarea.spam-msg').val().trim()];
twisterRpc("setspammsg", params,
function(args, ret) {
console.log("setspammsg updated");
}, {},
function(args, ret) {
console.log("setspammsg error");
}, {});
function(args, ret) {console.log("setspammsg updated");}, {},
function(args, ret) {console.log("setspammsg error");}, {}
);
}
function exitDaemon() {
@ -286,7 +289,9 @@ function interfaceNetworkHandlers() { @@ -286,7 +289,9 @@ function interfaceNetworkHandlers() {
$( ".add-dns").bind( "click", addDNSClick );
$( "select.genblock").change( setGenerate );
$( ".genproclimit").change( setGenerate );
$( ".update-spam-msg").bind( "click", setSpamMsg );
$('.network .post-area-new').off('click').on('click',
function (e) {e.stopPropagation(); $(this).addClass('open'); usePostSpliting = false;});
$('.post-submit.update-spam-msg').off('click').on('click', setSpamMsg);
$( ".terminate-daemon").bind( "click", exitDaemon )
}

37
network.html

@ -27,8 +27,8 @@ @@ -27,8 +27,8 @@
</head>
<body>
<!-- MENU SUPERIOR INIT -->
<!-- MENU SUPERIOR INIT -->
<nav class="userMenu">
<ul>
<li class="userMenu-home"><a href="home.html"><span class="selectable_theme theme_original label">Home</span></a></li>
@ -75,7 +75,7 @@ @@ -75,7 +75,7 @@
<button class="terminate-daemon">Exit</button>
</li>
</ul>
<h3> Detailed information </h3>
<ul>
<li class="connections">
@ -191,20 +191,25 @@ @@ -191,20 +191,25 @@
</li>
<li>
<label> Post to promote: </label>
<textarea class="spam-msg" placeholder="Type message here"></textarea>
<div class="post-area">
<form class="post-area-new open">
<textarea class="spam-msg" placeholder="Type message here"></textarea>
<div class="post-area-extras">
<span class="post-area-remaining">140</span>
<button class="undo-unicode disabled" disabled="true">undo</button>
<button class="post-submit update-spam-msg disabled" disabled="true">Update</button>
</div>
</form>
</div>
</li>
<li>
<label> Send post with username </label>
<select class="local-usernames spam-user">
<option value="nobody">nobody</option>
</select>
<div class="character-limit">
<span class="post-area-remaining">140</span>
<button class="update-spam-msg enabled">Update</button>
</div>
</li>
</ul>
<h3> Block generation status</h3>
<ul>
<li>
@ -218,6 +223,20 @@ @@ -218,6 +223,20 @@
</div>
<div id="templates" style="display:none;">
<div id="post-preview-template">
<div id="post-preview" class="post-text">
</div>
</div>
<!-- template for user links in message (open profile modal) -->
<a id="msg-user-link-template" class="open-profile-modal"></a>
<!-- template for user links in message (open profile modal) -->
<a id="external-page-link-template" rel="nofollow" target="_blank"></a>
<!-- template for user links in message (open profile modal) -->
<a id="hashtag-link-template" class="open-hashtag-modal"></a>
</div>
<audio id="player"></audio>
<audio id="playerSec"></audio>
</body>

3
options.html

@ -99,9 +99,6 @@ @@ -99,9 +99,6 @@
<option value="nin">Nin</option>
</select>
</form>
<span class="label selectable_theme theme_calm">
For new features check <a href="https://github.com/iHedgehog/twister-calm">twister-calm repository</a>!
</span>
</div>
</div>
</div>

13
theme_calm/css/style.css

@ -781,6 +781,7 @@ textarea.splited-post { @@ -781,6 +781,7 @@ textarea.splited-post {
background-color: #F2FFBA;
border: solid 1px #B4C669;
font-size: 11px;
line-height: normal;
margin: 4px 0;
padding: 4px;
word-wrap: break-word;
@ -1659,10 +1660,7 @@ textarea.splited-post { @@ -1659,10 +1660,7 @@ textarea.splited-post {
font-size: 13px;
list-style: circle;
}
.network.singleBlock button
{
padding: 3px 10px;
}
.network.singleBlock ul li > span
{
font-weight: bold;
@ -1699,10 +1697,9 @@ textarea.splited-post { @@ -1699,10 +1697,9 @@ textarea.splited-post {
{
border: 2px solid #b2d67b;
}
.character-limit
{
float: right;
margin-right: 18px;
.network .post-area-extras {
margin-right: 20px;
}
/*************************************

7
theme_nin/css/style.css

@ -1501,10 +1501,8 @@ span.connection-status.connected:before { @@ -1501,10 +1501,8 @@ span.connection-status.connected:before {
background: #B4C669;
}
/* line 61, ../sass/_network.sass */
.character-limit {
float: right;
margin-right: 18px;
.network .post-area-extras {
margin-right: 20px;
}
/* line 65, ../sass/_network.sass */
@ -2275,6 +2273,7 @@ textarea.splited-post { @@ -2275,6 +2273,7 @@ textarea.splited-post {
background-color: #FCFFF3;
border: solid 1px #ECEFE3;
font-size: 12px;
line-height: normal;
margin: 4px 0;
padding: 4px;
word-wrap: break-word;

7
theme_nin/sass/_network.sass

@ -47,7 +47,7 @@ span.connection-status @@ -47,7 +47,7 @@ span.connection-status
line-height: 1em
font-weight: 500
font-size: 1em
&:before
&:before
content: ""
display: inline-block
height: .8em
@ -58,9 +58,8 @@ span.connection-status @@ -58,9 +58,8 @@ span.connection-status
&.connected:before
background: $main-color-color
.character-limit
float: right
margin-right: 18px
.network .post-area-extras
margin-right: 20px
.connections span, .known-peers, .dht-nodes, .blocks, .last-block-time, .mining-difficulty
color: #333

1
theme_nin/sass/style.sass

@ -358,6 +358,7 @@ ul.userMenu-search-profiles @@ -358,6 +358,7 @@ ul.userMenu-search-profiles
background-color: #FCFFF3
border: solid 1px #ECEFE3
font-size: 12px
line-height: normal
margin: 4px 0
padding: 4px
word-wrap: break-word

Loading…
Cancel
Save