Browse Source

added ability to select themes between calm and original

added ability to select themes between calm and original
master
Hedgehog 11 years ago
parent
commit
759ac71d0c
  1. 17
      abort.html
  2. 4
      css/style.css
  3. 21
      following.html
  4. 27
      home.html
  5. 112
      js/calm.js
  6. 107
      js/options.js
  7. 21
      login.html
  8. 21
      network.html
  9. 62
      options.html
  10. 21
      profile-edit.html

17
abort.html

@ -3,18 +3,9 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>Aborting...</title> <title>Aborting...</title>
<script> <link id="stylecss" rel="stylesheet" href="css/style.css">
var theme = localStorage.getItem('theme'); <link id="profilecss" rel="stylesheet" href="css/profile.css">
if (theme=='calm') { <link rel="stylesheet" href="jquery-emotions/jquery.emotions.calm.css">
document.write('<link rel="stylesheet" type="text/css" href="css/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/profile.css">');
document.write('<link rel="stylesheet" type="text/css" href="jquery-emotions/jquery.emotions.calm.css">');
} else {
document.write('<link rel="stylesheet" type="text/css" href="css/orange/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/orange/profile.css">');
}
</script>
<script src="jquery.min.js"></script> <script src="jquery.min.js"></script>
<script src="jQueryPlugins.js"></script> <script src="jQueryPlugins.js"></script>
<script src="jquery.json-2.4.js"></script> <script src="jquery.json-2.4.js"></script>
@ -28,7 +19,7 @@ if (theme=='calm') {
<script src="twister_newmsgs.js"></script> <script src="twister_newmsgs.js"></script>
<script src="twister_network.js"></script> <script src="twister_network.js"></script>
<script src="interface_common.js"></script> <script src="interface_common.js"></script>
<script>changeStyle();</script>
<link rel="icon" type="image/png" href="img/twister_mini.png" /> <link rel="icon" type="image/png" href="img/twister_mini.png" />
</head> </head>

4
css/style.css

@ -1429,7 +1429,7 @@ input.userMenu-search-field:focus::-ms-input-placeholder {
background: #fff; background: #fff;
transition: background-color 100ms linear; transition: background-color 100ms linear;
} }
.login .module select.local-usernames, .sndOpt, #keysOpt select, #choseLanguage select{ .login .module select.local-usernames, .sndOpt, #keysOpt select, #selectLanguage select, #selectTheme select {
height: 30px; height: 30px;
font: 13px/24px "Open sans"; font: 13px/24px "Open sans";
text-align: center; text-align: center;
@ -1909,7 +1909,7 @@ input.userMenu-search-field:focus::-ms-input-placeholder {
margin-right: -163px; margin-right: -163px;
font: 12px "Open Sans", sans-serif; font: 12px "Open Sans", sans-serif;
} }
#notifyForm p, #choseLanguage p, #keysOpt p { #notifyForm p, #selectLanguage p, #keysOpt p {
margin-top: 15px; margin-top: 15px;
} }
/* Following page */ /* Following page */

21
following.html

@ -3,18 +3,9 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>Following</title> <title>Following</title>
<script> <link id="stylecss" rel="stylesheet" href="css/style.css">
var theme = localStorage.getItem('theme'); <link id="profilecss" rel="stylesheet" href="css/profile.css">
if (theme=='calm') { <link rel="stylesheet" href="jquery-emotions/jquery.emotions.calm.css">
document.write('<link rel="stylesheet" type="text/css" href="css/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/profile.css">');
document.write('<link rel="stylesheet" type="text/css" href="jquery-emotions/jquery.emotions.calm.css">');
} else {
document.write('<link rel="stylesheet" type="text/css" href="css/orange/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/orange/profile.css">');
}
</script>
<script src="js/jquery.min.js"></script> <script src="js/jquery.min.js"></script>
<script src="js/jQueryPlugins.js"></script> <script src="js/jQueryPlugins.js"></script>
<script src="js/jquery.json-2.4.js"></script> <script src="js/jquery.json-2.4.js"></script>
@ -35,10 +26,8 @@ if (theme=='calm') {
<script src="jquery-emotions/jquery.emotions.js"></script> <script src="jquery-emotions/jquery.emotions.js"></script>
<script> <script>
$(document).ready(function() $(document).ready(function(){initInterfaceFollowing()});
{ changeStyle();
initInterfaceFollowing();
});
</script> </script>
<link rel="icon" type="image/png" href="img/twister_mini.png" /> <link rel="icon" type="image/png" href="img/twister_mini.png" />

27
home.html

@ -3,6 +3,9 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>twister</title> <title>twister</title>
<link id="stylecss" rel="stylesheet" href="css/style.css">
<link id="profilecss" rel="stylesheet" href="css/profile.css">
<link rel="stylesheet" href="jquery-emotions/jquery.emotions.calm.css">
<script src="js/jquery.min.js"></script> <script src="js/jquery.min.js"></script>
<script src="js/jQueryPlugins.js"></script> <script src="js/jQueryPlugins.js"></script>
<script src="js/jquery.json-2.4.js"></script> <script src="js/jquery.json-2.4.js"></script>
@ -28,20 +31,9 @@
<script src="js/options.js"></script> <script src="js/options.js"></script>
<script src="jquery-emotions/jquery.emotions.js"></script> <script src="jquery-emotions/jquery.emotions.js"></script>
<script> <script>
var theme = localStorage.getItem('theme'); $(function(){setInterval("networkUpdate()", 2000); homeIntInit();})
if (theme=='calm') { changeStyle();
document.write('<link rel="stylesheet" type="text/css" href="css/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/profile.css">');
document.write('<link rel="stylesheet" type="text/css" href="jquery-emotions/jquery.emotions.calm.css">');
} else {
document.write('<link rel="stylesheet" type="text/css" href="css/orange/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/orange/profile.css">');
$(".userMenu-dhtindicator").hide();
}
</script> </script>
<script>$(function(){setInterval("networkUpdate()", 2000); homeIntInit ();})</script>
<link rel="icon" type="image/png" href="img/twister_mini.png" /> <link rel="icon" type="image/png" href="img/twister_mini.png" />
</head> </head>
@ -528,14 +520,5 @@ $(".userMenu-dhtindicator").hide();
<audio id="player"></audio> <audio id="player"></audio>
<audio id="playerSec"></audio> <audio id="playerSec"></audio>
<!-- hide elements --> <!-- hide elements -->
<script>
if (theme=='calm') {
$(".calm_menu").show();
} else {
$(".userMenu-dhtindicator").hide();
$(".original_menu").show();
}
</script>
</body> </body>
</html> </html>

112
js/calm.js

@ -42,89 +42,6 @@ function modalDMIntr() {
$(".modal-content").removeAttr("style"); $(".modal-content").removeAttr("style");
}); });
}; };
//sound notifications
function soundNotifOptions() {
if(!localStorage['sndDM']) localStorage['sndDM'] = false;
if(!localStorage['sndMention']) localStorage['sndMention'] = false;
$('#notifyForm select').each(function(){
this.value = localStorage[this.id];
});
var player = $('#player');
player[0].pause();
$('#player').empty();
$('form#notifyForm').on('change','select',function(){
localStorage.setItem(this.id, this.value);
if(this.value == false) {player[0].pause(); return;}
if (player[0].canPlayType('audio/mpeg;')) {
player.attr('type', 'audio/mpeg');
player.attr('src', 'sound/'+this.value+'.mp3');
} else {
player.attr('type', 'audio/ogg');
player.attr('src', 'sound/'+this.value+'.ogg');
}
player[0].play();
});
}
function volumeControl () {
var playerVol = $('#playerVol');
playerVol[0].value = localStorage[playerVol[0].id] ? localStorage[playerVol[0].id] : 100;
$('.volValue').text((localStorage[playerVol[0].id] * 100).toFixed());
playerVol.on('change',function(){
localStorage.setItem(this.id, this.value);
$('#player')[0].volume = (this.value);
$('.volValue').text((this.value * 100).toFixed());
});
}
function DMsNotif() {
if(localStorage['sndDM'] == "false") return;
var player = $('#player');
$('#player').empty();
if (player[0].canPlayType('audio/mpeg;')) {
player.attr('type', 'audio/mpeg');
player.attr('src', 'sound/'+localStorage['sndDM']+'.mp3');
} else {
player.attr('type', 'audio/ogg');
player.attr('src', 'sound/'+localStorage['sndDM']+'.ogg');
}
player[0].volume = localStorage['playerVol'];
player[0].play();
}
function mensNotif() {
if(localStorage['sndMention'] == "false") return;
var player = $('#player');
$('#playerSec').empty();
if (player[0].canPlayType('audio/mpeg;')) {
player.attr('type', 'audio/mpeg');
player.attr('src', 'sound/'+localStorage['sndMention']+'.mp3');
} else {
player.attr('type', 'audio/ogg');
player.attr('src', 'sound/'+localStorage['sndMention']+'.ogg');
}
player[0].volume = localStorage['playerVol'];
player[0].play();
};
function keysSend() {
if(!localStorage['keysSend']) localStorage['keysSend'] = 1;
$('#keysOpt select')[0].value = localStorage['keysSend'];
$('#keysOpt select').on('change', function(){
localStorage[this.id] = this.value;
})
}
function mensAutocomplete() { function mensAutocomplete() {
var suggests = []; var suggests = [];
@ -151,20 +68,25 @@ function mensAutocomplete() {
]) ])
} }
function setLang() { function changeStyle() {
var style, profile, menu;
$('#language').val(localStorage['locLang'] || 'auto') if(localStorage['theme'] == 'calm')
$('#language').on('change', function(){ {
localStorage['locLang'] = $(this).val(); style = 'css/style.css';
}) profile = 'css/profile.css';
menu = '.calm_menu';
}else if(localStorage['theme'] == 'original')
{
style = 'css/orange/style.css';
profile = 'css/orange/profile.css';
menu = '.original_menu';
$(".userMenu-dhtindicator").hide();
}
$('#stylecss').attr('href', style);
$('#profilecss').attr('href', profile);
setTimeout(function(){$(menu).removeAttr('style')}, 0);
} }
function InitOptions () {
soundNotifOptions();
volumeControl();
keysSend();
setLang();
}
function homeIntInit () { function homeIntInit () {
modalDMIntr (); modalDMIntr ();
setTimeout(mensAutocomplete, 800); setTimeout(mensAutocomplete, 800);

107
js/options.js

@ -1,3 +1,110 @@
$(function() { $(function() {
}); });
function soundNotifOptions() {
if(!localStorage['sndDM']) localStorage['sndDM'] = false;
if(!localStorage['sndMention']) localStorage['sndMention'] = false;
$('#notifyForm select').each(function(){
this.value = localStorage[this.id];
});
var player = $('#player');
player[0].pause();
$('#player').empty();
$('form#notifyForm').on('change','select',function(){
localStorage.setItem(this.id, this.value);
if(this.value == false) {player[0].pause(); return;}
if (player[0].canPlayType('audio/mpeg;')) {
player.attr('type', 'audio/mpeg');
player.attr('src', 'sound/'+this.value+'.mp3');
} else {
player.attr('type', 'audio/ogg');
player.attr('src', 'sound/'+this.value+'.ogg');
}
player[0].play();
});
}
function volumeControl () {
var playerVol = $('#playerVol');
playerVol[0].value = localStorage[playerVol[0].id] ? localStorage[playerVol[0].id] : 100;
$('.volValue').text((localStorage[playerVol[0].id] * 100).toFixed());
playerVol.on('change',function(){
localStorage.setItem(this.id, this.value);
$('#player')[0].volume = (this.value);
$('.volValue').text((this.value * 100).toFixed());
});
}
function DMsNotif() {
if(localStorage['sndDM'] == "false") return;
var player = $('#player');
$('#player').empty();
if (player[0].canPlayType('audio/mpeg;')) {
player.attr('type', 'audio/mpeg');
player.attr('src', 'sound/'+localStorage['sndDM']+'.mp3');
} else {
player.attr('type', 'audio/ogg');
player.attr('src', 'sound/'+localStorage['sndDM']+'.ogg');
}
player[0].volume = localStorage['playerVol'];
player[0].play();
}
function mensNotif() {
if(localStorage['sndMention'] == "false") return;
var player = $('#player');
$('#playerSec').empty();
if (player[0].canPlayType('audio/mpeg;')) {
player.attr('type', 'audio/mpeg');
player.attr('src', 'sound/'+localStorage['sndMention']+'.mp3');
} else {
player.attr('type', 'audio/ogg');
player.attr('src', 'sound/'+localStorage['sndMention']+'.ogg');
}
player[0].volume = localStorage['playerVol'];
player[0].play();
};
function keysSend() {
if(!localStorage['keysSend']) localStorage['keysSend'] = 1;
$('#keysOpt select')[0].value = localStorage['keysSend'];
$('#keysOpt select').on('change', function(){
localStorage[this.id] = this.value;
})
}
function setLang() {
$('#language').val(localStorage['locLang'] || 'auto')
$('#language').on('change', function(){
localStorage['locLang'] = $(this).val();
})
}
function setTheme() {
if(!localStorage['theme']) localStorage['theme'] = 'calm';
$('#theme').val(localStorage['theme']).on('change', function(){
localStorage['theme'] = $(this).val();
location.reload();
});
}
function InitOptions () {
soundNotifOptions();
volumeControl();
keysSend();
setLang();
setTheme();
}

21
login.html

@ -3,18 +3,9 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>twister login</title> <title>twister login</title>
<script> <link id="stylecss" rel="stylesheet" href="css/style.css">
var theme = localStorage.getItem('theme'); <link id="profilecss" rel="stylesheet" href="css/profile.css">
if (theme=='calm') { <link rel="stylesheet" href="jquery-emotions/jquery.emotions.calm.css">
document.write('<link rel="stylesheet" type="text/css" href="css/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/profile.css">');
document.write('<link rel="stylesheet" type="text/css" href="jquery-emotions/jquery.emotions.calm.css">');
} else {
document.write('<link rel="stylesheet" type="text/css" href="css/orange/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/orange/profile.css">');
}
</script>
<script src="js/jquery.min.js"></script> <script src="js/jquery.min.js"></script>
<script src="js/jQueryPlugins.js"></script> <script src="js/jQueryPlugins.js"></script>
<script src="js/jquery.json-2.4.js"></script> <script src="js/jquery.json-2.4.js"></script>
@ -31,10 +22,8 @@ if (theme=='calm') {
<script src="js/options.js"></script> <script src="js/options.js"></script>
<script> <script>
$(document).ready(function() $(document).ready(function(){initInterfaceLogin()});
{ changeStyle();
initInterfaceLogin();
});
</script> </script>
<link rel="icon" type="image/png" href="img/twister_mini.png" /> <link rel="icon" type="image/png" href="img/twister_mini.png" />

21
network.html

@ -3,18 +3,9 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>Network status</title> <title>Network status</title>
<script> <link id="stylecss" rel="stylesheet" href="css/style.css">
var theme = localStorage.getItem('theme'); <link id="profilecss" rel="stylesheet" href="css/profile.css">
if (theme=='calm') { <link rel="stylesheet" href="jquery-emotions/jquery.emotions.calm.css">
document.write('<link rel="stylesheet" type="text/css" href="css/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/profile.css">');
document.write('<link rel="stylesheet" type="text/css" href="jquery-emotions/jquery.emotions.calm.css">');
} else {
document.write('<link rel="stylesheet" type="text/css" href="css/orange/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/orange/profile.css">');
}
</script>
<script src="js/jquery.min.js"></script> <script src="js/jquery.min.js"></script>
<script src="js/jQueryPlugins.js"></script> <script src="js/jQueryPlugins.js"></script>
<script src="js/jquery.json-2.4.js"></script> <script src="js/jquery.json-2.4.js"></script>
@ -33,10 +24,8 @@ if (theme=='calm') {
<script src="js/calm.js"></script> <script src="js/calm.js"></script>
<script> <script>
$(document).ready(function() $(document).ready(function(){initInterfaceNetwork()});
{ changeStyle();
initInterfaceNetwork();
});
</script> </script>
<link rel="icon" type="image/png" href="img/twister_mini.png" /> <link rel="icon" type="image/png" href="img/twister_mini.png" />

62
options.html

@ -2,19 +2,10 @@
<html> <html>
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>twister login</title> <title>Options</title>
<script> <link id="stylecss" rel="stylesheet" href="css/style.css">
var theme = localStorage.getItem('theme'); <link id="profilecss" rel="stylesheet" href="css/profile.css">
if (theme=='calm') { <link rel="stylesheet" href="jquery-emotions/jquery.emotions.calm.css">
document.write('<link rel="stylesheet" type="text/css" href="css/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/profile.css">');
document.write('<link rel="stylesheet" type="text/css" href="jquery-emotions/jquery.emotions.calm.css">');
} else {
document.write('<link rel="stylesheet" type="text/css" href="css/orange/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/orange/profile.css">');
}
</script>
<script src="js/jquery.min.js"></script> <script src="js/jquery.min.js"></script>
<script src="js/jQueryPlugins.js"></script> <script src="js/jQueryPlugins.js"></script>
<script src="js/jquery.json-2.4.js"></script> <script src="js/jquery.json-2.4.js"></script>
@ -30,16 +21,9 @@ if (theme=='calm') {
<script src="js/interface_localization.js"></script> <script src="js/interface_localization.js"></script>
<script src="js/calm.js"></script> <script src="js/calm.js"></script>
<script src="js/options.js"></script> <script src="js/options.js"></script>
<script>$(function(){ <script>
initInterfaceCommon(); $(function(){initInterfaceCommon(); InitOptions()});
InitOptions();}) changeStyle();
$(document).ready(function(){
$('#c_theme').change(function(){
localStorage.setItem('theme', $(this).val());
location.reload();
});
});
</script> </script>
</head> </head>
@ -71,7 +55,7 @@ if (theme=='calm') {
<div class="module"> <div class="module">
<p> Use language </p> <p> Use language </p>
<div> <div>
<form action="" id="choseLanguage"> <form action="" id="selectLanguage">
<select name="" id="language"> <select name="" id="language">
<option value="auto">Auto</option> <option value="auto">Auto</option>
<option value="en">English</option> <option value="en">English</option>
@ -86,6 +70,20 @@ if (theme=='calm') {
</div> </div>
</div> </div>
</div> </div>
<div class="language">
<div class="module">
<p> Theme </p>
<div>
<form action="" id="selectTheme">
<select name="" id="theme">
<option value="calm">Calm</option>
<option value="original">Original</option>
</select>
</form>
</div>
</div>
</div>
<div class="sounds"> <div class="sounds">
@ -131,23 +129,7 @@ if (theme=='calm') {
</form> </form>
</div> </div>
</div> </div>
</div>
<div class="Theme">
<div class="module">
<p> Theme </p>
<div>
<select name="" id="c_theme">
<option value="calm">Calm</option>
<option value="original">Original</option>
</select>
</div>
</div>
</div> </div>
</div> </div>
<script>
var theme = localStorage.getItem('theme');
$("#c_theme").val(theme);
</script>
</body> </body>
</html> </html>

21
profile-edit.html

@ -2,18 +2,9 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Edit profile</title> <title>Edit profile</title>
<script> <link id="stylecss" rel="stylesheet" href="css/style.css">
var theme = localStorage.getItem('theme'); <link id="profilecss" rel="stylesheet" href="css/profile.css">
if (theme=='calm') { <link rel="stylesheet" href="jquery-emotions/jquery.emotions.calm.css">
document.write('<link rel="stylesheet" type="text/css" href="css/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/profile.css">');
document.write('<link rel="stylesheet" type="text/css" href="jquery-emotions/jquery.emotions.calm.css">');
} else {
document.write('<link rel="stylesheet" type="text/css" href="css/orange/style.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/orange/profile.css">');
}
</script>
<script src="js/jquery.min.js"></script> <script src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/qrcode.js"></script> <script type="text/javascript" src="js/qrcode.js"></script>
<script src="js/jQueryPlugins.js"></script> <script src="js/jQueryPlugins.js"></script>
@ -33,10 +24,8 @@ if (theme=='calm') {
<script src="js/calm.js"></script> <script src="js/calm.js"></script>
<script> <script>
$(document).ready(function() $(document).ready(function(){initProfileEdit()});
{ changeStyle();
initProfileEdit();
});
</script> </script>
<link rel="icon" type="image/png" href="img/twister_mini.png" /> <link rel="icon" type="image/png" href="img/twister_mini.png" />

Loading…
Cancel
Save