Browse Source
improved post submit keys combination; removed theme selector; improved options internal mechanism;master
Hedgehog
11 years ago
21 changed files with 230 additions and 2202 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,238 +0,0 @@
@@ -1,238 +0,0 @@
|
||||
/************************************** |
||||
********************* PROFILE PHOTO *** |
||||
***************************************/ |
||||
.profile-card |
||||
{ |
||||
padding: 7px; |
||||
background: rgba( 255, 255, 255, .5 ); |
||||
border: solid 1px rgba( 69, 71, 77, .05 ); |
||||
position: relative; |
||||
} |
||||
.profile-card-main |
||||
{ |
||||
width: 540px; |
||||
text-align: center; |
||||
position: relative; |
||||
transition: all .2s linear; |
||||
} |
||||
.profile-card-main:before |
||||
{ |
||||
content: ""; |
||||
border: solid 0px #fff; |
||||
transition: all .2s linear; |
||||
position: absolute; |
||||
left: 1px; |
||||
top: 1px; |
||||
right: 1px; |
||||
bottom: 1px; |
||||
z-index: 0; |
||||
} |
||||
.profile-card-main * |
||||
{ |
||||
position: relative; |
||||
z-index: 1; |
||||
} |
||||
.profile-card-photo |
||||
{ |
||||
width: 74px; |
||||
height: 74px; |
||||
border: solid 6px #45474d; |
||||
border-radius: 40%; |
||||
border-top-right-radius: 0; |
||||
border-bottom-left-radius: 0; |
||||
box-sizing: content-box; |
||||
float:left; |
||||
top: 50%; |
||||
background-color: #a12a28; |
||||
|
||||
} |
||||
.profile-card-main h1 |
||||
{ |
||||
font-size: 24px; |
||||
font-weight: bold; |
||||
color: #fff; |
||||
} |
||||
.profile-card-main h2 |
||||
{ |
||||
color: #fff; |
||||
} |
||||
.profile-card .direct-messages, |
||||
.profile-card .direct-messages-with-user, |
||||
.profile-card .follow |
||||
{ |
||||
display: block; |
||||
position: absolute; |
||||
bottom: 20px; |
||||
right: 10px; |
||||
padding: 10px; |
||||
font-size: 12px; |
||||
width: 120px; |
||||
text-align: center; |
||||
color: rgba( 0, 0, 0, .7 ); |
||||
background: rgba( 0, 0, 0, .1 ); |
||||
border: none; |
||||
transition: all .2s linear; |
||||
} |
||||
.profile-card .follow |
||||
{ |
||||
right: 135px; |
||||
} |
||||
.profile-card .direct-messages:hover, |
||||
.profile-card .direct-messages-with-user:hover, |
||||
.profile-card .follow:hover |
||||
{ |
||||
background: rgba( 0, 0, 0, .3 ); |
||||
} |
||||
.profile-card.forEdition |
||||
{ |
||||
margin: 0 auto; |
||||
width: 540px; |
||||
} |
||||
.forEdition .profile-card-photo |
||||
{ |
||||
border: solid 2px #fff; |
||||
position: relative; |
||||
cursor: pointer; |
||||
transition: all .2s linear; |
||||
} |
||||
.forEdition .profile-card-main:hover:after, |
||||
.forEdition .profile-card-photo:after |
||||
{ |
||||
content: ""; |
||||
width: 36px; |
||||
height: 36px; |
||||
position: absolute; |
||||
top: 10px; |
||||
right: 10px; |
||||
background: url(../img/edit.png) no-repeat right top; |
||||
} |
||||
.forEdition .profile-card-main:hover:before |
||||
{ |
||||
border: solid 5px #fff; |
||||
} |
||||
.forEdition .profile-card-main h2 |
||||
{ |
||||
margin-bottom: 8px; |
||||
} |
||||
.forEdition .profile-card-main input |
||||
{ |
||||
display: block; |
||||
margin: 0 auto; |
||||
background: rgba( 0, 0, 0, .1 ); |
||||
border: none; |
||||
padding: 6px 4px; |
||||
color: #fff; |
||||
margin-bottom: 4px; |
||||
text-align: center; |
||||
transition: all .2s linear; |
||||
} |
||||
.forEdition .profile-card-main input:hover, |
||||
.forEdition .profile-card-main input:focus, |
||||
.forEdition .profile-card-photo:hover |
||||
{ |
||||
background: rgba( 0, 0, 0, .3 ); |
||||
} |
||||
.input-description |
||||
{ |
||||
width: 90%; |
||||
} |
||||
.input-name |
||||
{ |
||||
font-size: 20px; |
||||
} |
||||
.forEdition .profile-card-main .input-website, |
||||
.forEdition .profile-card-main .input-city |
||||
{ |
||||
display: inline-block; |
||||
} |
||||
.profile-edition-buttons |
||||
{ |
||||
padding: 10px; |
||||
text-align: right; |
||||
} |
||||
/************************************* |
||||
****************** PROFILE MODAL |
||||
**************************************/ |
||||
.profile-modal .modal-wrapper |
||||
{ |
||||
width: 580px; |
||||
border-radius: 5px; |
||||
overflow: hidden; |
||||
position: absolute; |
||||
top:10%; |
||||
height: 80%; |
||||
margin-left: -300px; |
||||
|
||||
} |
||||
.profile-modal .modal-content |
||||
{ |
||||
padding: 3px; |
||||
height: 90%; |
||||
} |
||||
.profile-modal .profile-data |
||||
{ |
||||
display: inline-block; |
||||
margin-left: -4px; |
||||
border-bottom: 0; |
||||
} |
||||
.profile-modal .postboard |
||||
{ |
||||
margin-left: 0; |
||||
padding: 5px 0 5px 0; |
||||
height: 75%; |
||||
} |
||||
.profile-modal .postboard h2 |
||||
{ |
||||
width: auto; |
||||
} |
||||
.profile-modal .postboard-posts |
||||
{ |
||||
display: block; |
||||
height: 90%; |
||||
overflow: auto; |
||||
} |
||||
.profile-modal .profile-card-main |
||||
{ |
||||
background: #45474d; |
||||
color: white; |
||||
width:100%; |
||||
} |
||||
.profile-modal .profile-card-main a { |
||||
color: #8bb9e0; |
||||
} |
||||
.profile-modal .postboard-posts .post |
||||
{ |
||||
padding: 0; |
||||
} |
||||
.profile-modal .post-interactions |
||||
{ |
||||
margin: 2px 10px 3px 60px; |
||||
} |
||||
.profile-modal .profile-card |
||||
{ |
||||
margin: 0; |
||||
padding: 0; |
||||
} |
||||
/* |
||||
.profile-card-main |
||||
{ |
||||
height: 200px; |
||||
} |
||||
*/ |
||||
.profile-modal .direct-messages, |
||||
.profile-modal .direct-messages-with-user, |
||||
.profile-modal .follow |
||||
{ |
||||
bottom: 10px; |
||||
} |
||||
|
||||
h1.profile-name { |
||||
display: inline; |
||||
} |
||||
h2.profile-screen-name { |
||||
display: inline; |
||||
} |
||||
|
||||
.profile-modal .modal-buttons { |
||||
display: none; |
||||
} |
After Width: | Height: | Size: 36 KiB |
@ -1,147 +1,146 @@
@@ -1,147 +1,146 @@
|
||||
$(function() { |
||||
var TwisterOptions = function() |
||||
{ |
||||
this.getOption = function(optionName, defaultValue) { |
||||
var keyName = 'options:' + optionName; |
||||
if ($.localStorage.isSet(keyName)) { |
||||
return $.localStorage.get(keyName); |
||||
}else{ |
||||
return defaultValue; |
||||
} |
||||
}; |
||||
|
||||
}); |
||||
this.setOption = function(optionName, value) { |
||||
var keyName = 'options:' + optionName; |
||||
$.localStorage.set(keyName, value); |
||||
}; |
||||
|
||||
function soundNotifOptions() { |
||||
if(!localStorage['sndDM']) localStorage['sndDM'] = false; |
||||
if(!localStorage['sndMention']) localStorage['sndMention'] = false; |
||||
$('.sndOpt').each(function(){ |
||||
this.value = localStorage[this.id]; |
||||
}); |
||||
this.soundNotifOptions = function() { |
||||
|
||||
var player = $('#player'); |
||||
player[0].pause(); |
||||
$('#player').empty(); |
||||
$('.sndOpt').each(function(){ |
||||
this.value = $.Options.getOption(this.id, 'false'); |
||||
}); |
||||
|
||||
var player = $('#player'); |
||||
player[0].pause(); |
||||
$('#player').empty(); |
||||
|
||||
$('.sndOpt').on('change',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'); |
||||
} |
||||
$('.sndOpt').on('change',function(){ |
||||
$.Options.setOption(this.id, this.value); |
||||
|
||||
player[0].play(); |
||||
}); |
||||
} |
||||
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'); |
||||
} |
||||
|
||||
function volumeControl () { |
||||
var playerVol = $('#playerVol'); |
||||
if(!localStorage[playerVol[0].id]) localStorage[playerVol[0].id] = 1; |
||||
playerVol[0].value = localStorage[playerVol[0].id]; |
||||
$('.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()); |
||||
}); |
||||
} |
||||
player[0].play(); |
||||
}); |
||||
} |
||||
|
||||
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(); |
||||
} |
||||
this.volumeControl = function() { |
||||
var playerVol = $('#playerVol'); |
||||
|
||||
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(); |
||||
}; |
||||
playerVol[0].value = $.Options.getOption(playerVol[0].id, 1) |
||||
|
||||
function keysSend() { |
||||
if(!localStorage['keysSend']) localStorage['keysSend'] = 1; |
||||
$('#keysSend')[0].value = localStorage['keysSend']; |
||||
$('.volValue').text((playerVol[0].value * 100).toFixed()); |
||||
|
||||
$('#keysSend').on('change', function(){ |
||||
localStorage[this.id] = this.value; |
||||
playerVol.on('change',function(){ |
||||
$.Options.setOption(this.id, this.value) |
||||
$('#player')[0].volume = (this.value); |
||||
$('.volValue').text((this.value * 100).toFixed()); |
||||
}); |
||||
} |
||||
|
||||
}) |
||||
} |
||||
this.DMsNotif = function() { |
||||
if($.Options.getOption('sndDM', 'false') === "false") return; |
||||
var player = $('#player'); |
||||
$('#player').empty(); |
||||
|
||||
function setLang() { |
||||
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 = $.Options.getOption('playerVol', 1); |
||||
player[0].play(); |
||||
} |
||||
|
||||
$('#language').val(localStorage['locLang'] || 'auto') |
||||
$('#language').on('change', function(){ |
||||
localStorage['locLang'] = $(this).val(); |
||||
location.reload(); |
||||
}) |
||||
} |
||||
this.mensNotif = function() { |
||||
if($.Options.getOption('sndMention', 'false' === 'false')) return; |
||||
|
||||
function setTheme() { |
||||
if(!localStorage['theme']) localStorage['theme'] = 'calm'; |
||||
$('#theme').val(localStorage['theme']).on('change', function(){ |
||||
localStorage['theme'] = $(this).val(); |
||||
location.reload(); |
||||
}); |
||||
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 = $.Options.getOption('playerVol', 1); |
||||
player[0].play(); |
||||
}; |
||||
|
||||
function setShowPreviewOpt(){ |
||||
if(!localStorage['imagesPreview']) localStorage['imagesPreview'] = 'enable'; |
||||
if(!localStorage['imagesPreviewGif']) localStorage['imagesPreviewGif'] = 'true'; |
||||
if(!localStorage['youtubePreview']) localStorage['youtubePreview'] = 'enable'; |
||||
if(!localStorage['vimeoPreview']) localStorage['vimeoPreview'] = 'enable'; |
||||
this.keysSend = function() { |
||||
|
||||
$('.previewOpt').each(function() { |
||||
this.value = localStorage[this.id]; |
||||
}) |
||||
$('#keysSend')[0].value = $.Options.getOption('keysSend', 2) |
||||
|
||||
$('.gifCheckBox').prop('checked', localStorage['imagesPreviewGif'] === 'true') |
||||
$('#keysSend').on('change', function(){ |
||||
$.Options.setOption(this.id, this.value); |
||||
|
||||
if(localStorage['imagesPreview'] == 'disable'){ |
||||
$('input[type="checkbox"]').prop('disabled', localStorage['imagesPreviewGif']) |
||||
}) |
||||
} |
||||
|
||||
$('.previewOpt').on('change', function(){ |
||||
localStorage[this.id] = $(this).val(); |
||||
if (this.id === 'imagesPreview'){ |
||||
switch($(this).val()){ |
||||
case 'enable': $('.gifCheckBox').prop('disabled', false); break; |
||||
case 'disable': $('.gifCheckBox').prop('disabled', true); break; |
||||
} |
||||
this.locLang = function() { |
||||
$('#locLang').val($.Options.getOption('locLang', 'auto')) |
||||
$('#locLang').on('change', function(){ |
||||
$.Options.setOption(this.id, this.value); |
||||
location.reload(); |
||||
}) |
||||
} |
||||
|
||||
this.showPreviewOpt = function() { |
||||
|
||||
$('.previewOpt').each(function() { |
||||
this.value = $.Options.getOption(this.id, 'enable'); |
||||
}) |
||||
|
||||
$('.gifCheckBox').prop('checked', $.Options.getOption('imagesPreviewGif', 'true')) |
||||
|
||||
if($.Options.getOption('imagesPreview', 'enable') === 'disable'){ |
||||
$('input[type="checkbox"]').prop('disabled', 'true') |
||||
} |
||||
}) |
||||
|
||||
$('input[type="checkbox"]').on('click', function(){ |
||||
localStorage[$(this).attr('name')] = $(this).prop('checked') |
||||
}) |
||||
} |
||||
$('.previewOpt').on('change', function(){ |
||||
$.Options.setOption(this.id, this.value) |
||||
if (this.id === 'imagesPreview'){ |
||||
switch(this.value){ |
||||
case 'enable': $('.gifCheckBox').prop('disabled', false); break; |
||||
case 'disable': $('.gifCheckBox').prop('disabled', true); break; |
||||
} |
||||
} |
||||
}) |
||||
|
||||
$('input[type="checkbox"]').on('click', function(){ |
||||
$.Options.setOption(this.name, this.checked) |
||||
}) |
||||
} |
||||
|
||||
this.initOptions = function() { |
||||
this.soundNotifOptions(); |
||||
this.volumeControl(); |
||||
this.keysSend(); |
||||
this.locLang(); |
||||
this.showPreviewOpt(); |
||||
} |
||||
|
||||
function InitOptions() { |
||||
soundNotifOptions(); |
||||
volumeControl(); |
||||
keysSend(); |
||||
setLang(); |
||||
setTheme(); |
||||
setShowPreviewOpt(); |
||||
} |
||||
function InitOptionsforHome() { |
||||
setShowPreviewOpt(); |
||||
} |
||||
|
||||
jQuery.Options = new TwisterOptions; |
Loading…
Reference in new issue