1
1
Fork 0

diabook-themes: fixes in js

This commit is contained in:
tommy tomson 2012-04-02 18:16:58 +02:00
parent b5d57d5313
commit 076b1b374b
4 changed files with 115 additions and 112 deletions

View file

@ -3,7 +3,7 @@
/* /*
* Name: Diabook-aerith * Name: Diabook-aerith
* Description: Diabook-aerith : report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu * Description: Diabook-aerith : report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
* Version: * Version: (Version: 0.010)
* Author: * Author:
*/ */
@ -164,7 +164,8 @@ function diabook_aerith_community_info(){
$pagelist = array(); $pagelist = array();
$contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact` $contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact`
WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d", WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d
ORDER BY `name` ASC",
intval($a->user['uid']) intval($a->user['uid'])
); );
@ -316,56 +317,58 @@ $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></scrip
//js scripts //js scripts
$a->page['htmlhead'] .= <<< EOT $a->page['htmlhead'] .= '
<script> <script>
$(function() { $(function() {
$('a.lightbox').fancybox(); // Select all links with lightbox class $("a.lightbox").fancybox(); // Select all links with lightbox class
}); });
</script>';
</script>
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){
$a->page['htmlhead'] .= '
<script> <script>
$("right_aside").ready(function(){ $("right_aside").ready(function(){
if($.cookie('close_pages') == '1') if($.cookie("close_pages") == "1")
{ {
document.getElementById( "close_pages" ).style.display = "none"; document.getElementById( "close_pages" ).style.display = "none";
}; };
if($.cookie('close_helpers') == '1') if($.cookie("close_helpers") == "1")
{ {
document.getElementById( "close_helpers" ).style.display = "none"; document.getElementById( "close_helpers" ).style.display = "none";
}; };
if($.cookie('close_services') == '1') if($.cookie("close_services") == "1")
{ {
document.getElementById( "close_services" ).style.display = "none"; document.getElementById( "close_services" ).style.display = "none";
}; };
if($.cookie('close_friends') == '1') if($.cookie("close_friends") == "1")
{ {
document.getElementById( "close_friends" ).style.display = "none"; document.getElementById( "close_friends" ).style.display = "none";
}; };
if($.cookie('close_postit') == '1') if($.cookie("close_postit") == "1")
{ {
document.getElementById( "close_postit" ).style.display = "none"; document.getElementById( "close_postit" ).style.display = "none";
}; };
if($.cookie('close_lastusers') == '1') if($.cookie("close_lastusers") == "1")
{ {
document.getElementById( "close_lastusers" ).style.display = "none"; document.getElementById( "close_lastusers" ).style.display = "none";
}; };
if($.cookie('close_lastphotos') == '1') if($.cookie("close_lastphotos") == "1")
{ {
document.getElementById( "close_lastphotos" ).style.display = "none"; document.getElementById( "close_lastphotos" ).style.display = "none";
}; };
if($.cookie('close_lastlikes') == '1') if($.cookie("close_lastlikes") == "1")
{ {
document.getElementById( "close_lastlikes" ).style.display = "none"; document.getElementById( "close_lastlikes" ).style.display = "none";
};} };}
@ -374,57 +377,55 @@ $("right_aside").ready(function(){
function close_pages(){ function close_pages(){
document.getElementById( "close_pages" ).style.display = "none"; document.getElementById( "close_pages" ).style.display = "none";
$.cookie('close_pages','1', { expires: 365, path: '/' }); $.cookie("close_pages","1", { expires: 365, path: "/" });
}; };
function close_helpers(){ function close_helpers(){
document.getElementById( "close_helpers" ).style.display = "none"; document.getElementById( "close_helpers" ).style.display = "none";
$.cookie('close_helpers','1', { expires: 365, path: '/' }); $.cookie("close_helpers","1", { expires: 365, path: "/" });
}; };
function close_services(){ function close_services(){
document.getElementById( "close_services" ).style.display = "none"; document.getElementById( "close_services" ).style.display = "none";
$.cookie('close_services','1', { expires: 365, path: '/' }); $.cookie("close_services","1", { expires: 365, path: "/" });
}; };
function close_friends(){ function close_friends(){
document.getElementById( "close_friends" ).style.display = "none"; document.getElementById( "close_friends" ).style.display = "none";
$.cookie('close_friends','1', { expires: 365, path: '/' }); $.cookie("close_friends","1", { expires: 365, path: "/" });
}; };
function close_postit(){ function close_postit(){
document.getElementById( "close_postit" ).style.display = "none"; document.getElementById( "close_postit" ).style.display = "none";
$.cookie('close_postit','1', { expires: 365, path: '/' }); $.cookie("close_postit","1", { expires: 365, path: "/" });
}; };
function close_lastusers(){ function close_lastusers(){
document.getElementById( "close_lastusers" ).style.display = "none"; document.getElementById( "close_lastusers" ).style.display = "none";
$.cookie('close_lastusers','1', { expires: 365, path: '/' }); $.cookie("close_lastusers","1", { expires: 365, path: "/" });
}; };
function close_lastphotos(){ function close_lastphotos(){
document.getElementById( "close_lastphotos" ).style.display = "none"; document.getElementById( "close_lastphotos" ).style.display = "none";
$.cookie('close_lastphotos','1', { expires: 365, path: '/' }); $.cookie("close_lastphotos","1", { expires: 365, path: "/" });
}; };
function close_lastlikes(){ function close_lastlikes(){
document.getElementById( "close_lastlikes" ).style.display = "none"; document.getElementById( "close_lastlikes" ).style.display = "none";
$.cookie('close_lastlikes','1', { expires: 365, path: '/' }); $.cookie("close_lastlikes","1", { expires: 365, path: "/" });
}; };
function restore_boxes(){ function restore_boxes(){
$.cookie('close_pages','2', { expires: 365, path: '/' }); $.cookie("close_pages","2", { expires: 365, path: "/" });
$.cookie('close_helpers','2', { expires: 365, path: '/' }); $.cookie("close_helpers","2", { expires: 365, path: "/" });
$.cookie('close_services','2', { expires: 365, path: '/' }); $.cookie("close_services","2", { expires: 365, path: "/" });
$.cookie('close_friends','2', { expires: 365, path: '/' }); $.cookie("close_friends","2", { expires: 365, path: "/" });
$.cookie('close_postit','2', { expires: 365, path: '/' }); $.cookie("close_postit","2", { expires: 365, path: "/" });
$.cookie('close_lastusers','2', { expires: 365, path: '/' }); $.cookie("close_lastusers","2", { expires: 365, path: "/" });
$.cookie('close_lastphotos','2', { expires: 365, path: '/' }); $.cookie("close_lastphotos","2", { expires: 365, path: "/" });
$.cookie('close_lastlikes','2', { expires: 365, path: '/' }); $.cookie("close_lastlikes","2", { expires: 365, path: "/" });
alert('Right-hand column was restored. Please refresh your browser'); alert("Right-hand column was restored. Please refresh your browser");
}; };
</script>';}
</script>
EOT;

View file

@ -3,7 +3,7 @@
/* /*
* Name: Diabook-blue * Name: Diabook-blue
* Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
* Version: * Version: (Version: 0.010)
* Author: * Author:
*/ */
@ -164,7 +164,8 @@ function diabook_blue_community_info(){
$pagelist = array(); $pagelist = array();
$contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact` $contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact`
WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d", WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d
ORDER BY `name` ASC",
intval($a->user['uid']) intval($a->user['uid'])
); );
@ -316,56 +317,58 @@ $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></scrip
//js scripts //js scripts
$a->page['htmlhead'] .= <<< EOT $a->page['htmlhead'] .= '
<script> <script>
$(function() { $(function() {
$('a.lightbox').fancybox(); // Select all links with lightbox class $("a.lightbox").fancybox(); // Select all links with lightbox class
}); });
</script>';
</script>
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){
$a->page['htmlhead'] .= '
<script> <script>
$("right_aside").ready(function(){ $("right_aside").ready(function(){
if($.cookie('close_pages') == '1') if($.cookie("close_pages") == "1")
{ {
document.getElementById( "close_pages" ).style.display = "none"; document.getElementById( "close_pages" ).style.display = "none";
}; };
if($.cookie('close_helpers') == '1') if($.cookie("close_helpers") == "1")
{ {
document.getElementById( "close_helpers" ).style.display = "none"; document.getElementById( "close_helpers" ).style.display = "none";
}; };
if($.cookie('close_services') == '1') if($.cookie("close_services") == "1")
{ {
document.getElementById( "close_services" ).style.display = "none"; document.getElementById( "close_services" ).style.display = "none";
}; };
if($.cookie('close_friends') == '1') if($.cookie("close_friends") == "1")
{ {
document.getElementById( "close_friends" ).style.display = "none"; document.getElementById( "close_friends" ).style.display = "none";
}; };
if($.cookie('close_postit') == '1') if($.cookie("close_postit") == "1")
{ {
document.getElementById( "close_postit" ).style.display = "none"; document.getElementById( "close_postit" ).style.display = "none";
}; };
if($.cookie('close_lastusers') == '1') if($.cookie("close_lastusers") == "1")
{ {
document.getElementById( "close_lastusers" ).style.display = "none"; document.getElementById( "close_lastusers" ).style.display = "none";
}; };
if($.cookie('close_lastphotos') == '1') if($.cookie("close_lastphotos") == "1")
{ {
document.getElementById( "close_lastphotos" ).style.display = "none"; document.getElementById( "close_lastphotos" ).style.display = "none";
}; };
if($.cookie('close_lastlikes') == '1') if($.cookie("close_lastlikes") == "1")
{ {
document.getElementById( "close_lastlikes" ).style.display = "none"; document.getElementById( "close_lastlikes" ).style.display = "none";
};} };}
@ -374,57 +377,55 @@ $("right_aside").ready(function(){
function close_pages(){ function close_pages(){
document.getElementById( "close_pages" ).style.display = "none"; document.getElementById( "close_pages" ).style.display = "none";
$.cookie('close_pages','1', { expires: 365, path: '/' }); $.cookie("close_pages","1", { expires: 365, path: "/" });
}; };
function close_helpers(){ function close_helpers(){
document.getElementById( "close_helpers" ).style.display = "none"; document.getElementById( "close_helpers" ).style.display = "none";
$.cookie('close_helpers','1', { expires: 365, path: '/' }); $.cookie("close_helpers","1", { expires: 365, path: "/" });
}; };
function close_services(){ function close_services(){
document.getElementById( "close_services" ).style.display = "none"; document.getElementById( "close_services" ).style.display = "none";
$.cookie('close_services','1', { expires: 365, path: '/' }); $.cookie("close_services","1", { expires: 365, path: "/" });
}; };
function close_friends(){ function close_friends(){
document.getElementById( "close_friends" ).style.display = "none"; document.getElementById( "close_friends" ).style.display = "none";
$.cookie('close_friends','1', { expires: 365, path: '/' }); $.cookie("close_friends","1", { expires: 365, path: "/" });
}; };
function close_postit(){ function close_postit(){
document.getElementById( "close_postit" ).style.display = "none"; document.getElementById( "close_postit" ).style.display = "none";
$.cookie('close_postit','1', { expires: 365, path: '/' }); $.cookie("close_postit","1", { expires: 365, path: "/" });
}; };
function close_lastusers(){ function close_lastusers(){
document.getElementById( "close_lastusers" ).style.display = "none"; document.getElementById( "close_lastusers" ).style.display = "none";
$.cookie('close_lastusers','1', { expires: 365, path: '/' }); $.cookie("close_lastusers","1", { expires: 365, path: "/" });
}; };
function close_lastphotos(){ function close_lastphotos(){
document.getElementById( "close_lastphotos" ).style.display = "none"; document.getElementById( "close_lastphotos" ).style.display = "none";
$.cookie('close_lastphotos','1', { expires: 365, path: '/' }); $.cookie("close_lastphotos","1", { expires: 365, path: "/" });
}; };
function close_lastlikes(){ function close_lastlikes(){
document.getElementById( "close_lastlikes" ).style.display = "none"; document.getElementById( "close_lastlikes" ).style.display = "none";
$.cookie('close_lastlikes','1', { expires: 365, path: '/' }); $.cookie("close_lastlikes","1", { expires: 365, path: "/" });
}; };
function restore_boxes(){ function restore_boxes(){
$.cookie('close_pages','2', { expires: 365, path: '/' }); $.cookie("close_pages","2", { expires: 365, path: "/" });
$.cookie('close_helpers','2', { expires: 365, path: '/' }); $.cookie("close_helpers","2", { expires: 365, path: "/" });
$.cookie('close_services','2', { expires: 365, path: '/' }); $.cookie("close_services","2", { expires: 365, path: "/" });
$.cookie('close_friends','2', { expires: 365, path: '/' }); $.cookie("close_friends","2", { expires: 365, path: "/" });
$.cookie('close_postit','2', { expires: 365, path: '/' }); $.cookie("close_postit","2", { expires: 365, path: "/" });
$.cookie('close_lastusers','2', { expires: 365, path: '/' }); $.cookie("close_lastusers","2", { expires: 365, path: "/" });
$.cookie('close_lastphotos','2', { expires: 365, path: '/' }); $.cookie("close_lastphotos","2", { expires: 365, path: "/" });
$.cookie('close_lastlikes','2', { expires: 365, path: '/' }); $.cookie("close_lastlikes","2", { expires: 365, path: "/" });
alert('Right-hand column was restored. Please refresh your browser'); alert("Right-hand column was restored. Please refresh your browser");
}; };
</script>';}
</script>
EOT;

View file

@ -3,7 +3,7 @@
/* /*
* Name: Diabook-red * Name: Diabook-red
* Description: Diabook-red: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu * Description: Diabook-red: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
* Version: * Version: (Version: 0.010)
* Author: * Author:
*/ */
@ -164,7 +164,8 @@ function diabook_red_community_info(){
$pagelist = array(); $pagelist = array();
$contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact` $contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact`
WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d", WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d
ORDER BY `name` ASC",
intval($a->user['uid']) intval($a->user['uid'])
); );
@ -317,56 +318,58 @@ $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></scrip
//js scripts //js scripts
$a->page['htmlhead'] .= <<< EOT $a->page['htmlhead'] .= '
<script> <script>
$(function() { $(function() {
$('a.lightbox').fancybox(); // Select all links with lightbox class $("a.lightbox").fancybox(); // Select all links with lightbox class
}); });
</script>';
</script>
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){
$a->page['htmlhead'] .= '
<script> <script>
$("right_aside").ready(function(){ $("right_aside").ready(function(){
if($.cookie('close_pages') == '1') if($.cookie("close_pages") == "1")
{ {
document.getElementById( "close_pages" ).style.display = "none"; document.getElementById( "close_pages" ).style.display = "none";
}; };
if($.cookie('close_helpers') == '1') if($.cookie("close_helpers") == "1")
{ {
document.getElementById( "close_helpers" ).style.display = "none"; document.getElementById( "close_helpers" ).style.display = "none";
}; };
if($.cookie('close_services') == '1') if($.cookie("close_services") == "1")
{ {
document.getElementById( "close_services" ).style.display = "none"; document.getElementById( "close_services" ).style.display = "none";
}; };
if($.cookie('close_friends') == '1') if($.cookie("close_friends") == "1")
{ {
document.getElementById( "close_friends" ).style.display = "none"; document.getElementById( "close_friends" ).style.display = "none";
}; };
if($.cookie('close_postit') == '1') if($.cookie("close_postit") == "1")
{ {
document.getElementById( "close_postit" ).style.display = "none"; document.getElementById( "close_postit" ).style.display = "none";
}; };
if($.cookie('close_lastusers') == '1') if($.cookie("close_lastusers") == "1")
{ {
document.getElementById( "close_lastusers" ).style.display = "none"; document.getElementById( "close_lastusers" ).style.display = "none";
}; };
if($.cookie('close_lastphotos') == '1') if($.cookie("close_lastphotos") == "1")
{ {
document.getElementById( "close_lastphotos" ).style.display = "none"; document.getElementById( "close_lastphotos" ).style.display = "none";
}; };
if($.cookie('close_lastlikes') == '1') if($.cookie("close_lastlikes") == "1")
{ {
document.getElementById( "close_lastlikes" ).style.display = "none"; document.getElementById( "close_lastlikes" ).style.display = "none";
};} };}
@ -375,57 +378,55 @@ $("right_aside").ready(function(){
function close_pages(){ function close_pages(){
document.getElementById( "close_pages" ).style.display = "none"; document.getElementById( "close_pages" ).style.display = "none";
$.cookie('close_pages','1', { expires: 365, path: '/' }); $.cookie("close_pages","1", { expires: 365, path: "/" });
}; };
function close_helpers(){ function close_helpers(){
document.getElementById( "close_helpers" ).style.display = "none"; document.getElementById( "close_helpers" ).style.display = "none";
$.cookie('close_helpers','1', { expires: 365, path: '/' }); $.cookie("close_helpers","1", { expires: 365, path: "/" });
}; };
function close_services(){ function close_services(){
document.getElementById( "close_services" ).style.display = "none"; document.getElementById( "close_services" ).style.display = "none";
$.cookie('close_services','1', { expires: 365, path: '/' }); $.cookie("close_services","1", { expires: 365, path: "/" });
}; };
function close_friends(){ function close_friends(){
document.getElementById( "close_friends" ).style.display = "none"; document.getElementById( "close_friends" ).style.display = "none";
$.cookie('close_friends','1', { expires: 365, path: '/' }); $.cookie("close_friends","1", { expires: 365, path: "/" });
}; };
function close_postit(){ function close_postit(){
document.getElementById( "close_postit" ).style.display = "none"; document.getElementById( "close_postit" ).style.display = "none";
$.cookie('close_postit','1', { expires: 365, path: '/' }); $.cookie("close_postit","1", { expires: 365, path: "/" });
}; };
function close_lastusers(){ function close_lastusers(){
document.getElementById( "close_lastusers" ).style.display = "none"; document.getElementById( "close_lastusers" ).style.display = "none";
$.cookie('close_lastusers','1', { expires: 365, path: '/' }); $.cookie("close_lastusers","1", { expires: 365, path: "/" });
}; };
function close_lastphotos(){ function close_lastphotos(){
document.getElementById( "close_lastphotos" ).style.display = "none"; document.getElementById( "close_lastphotos" ).style.display = "none";
$.cookie('close_lastphotos','1', { expires: 365, path: '/' }); $.cookie("close_lastphotos","1", { expires: 365, path: "/" });
}; };
function close_lastlikes(){ function close_lastlikes(){
document.getElementById( "close_lastlikes" ).style.display = "none"; document.getElementById( "close_lastlikes" ).style.display = "none";
$.cookie('close_lastlikes','1', { expires: 365, path: '/' }); $.cookie("close_lastlikes","1", { expires: 365, path: "/" });
}; };
function restore_boxes(){ function restore_boxes(){
$.cookie('close_pages','2', { expires: 365, path: '/' }); $.cookie("close_pages","2", { expires: 365, path: "/" });
$.cookie('close_helpers','2', { expires: 365, path: '/' }); $.cookie("close_helpers","2", { expires: 365, path: "/" });
$.cookie('close_services','2', { expires: 365, path: '/' }); $.cookie("close_services","2", { expires: 365, path: "/" });
$.cookie('close_friends','2', { expires: 365, path: '/' }); $.cookie("close_friends","2", { expires: 365, path: "/" });
$.cookie('close_postit','2', { expires: 365, path: '/' }); $.cookie("close_postit","2", { expires: 365, path: "/" });
$.cookie('close_lastusers','2', { expires: 365, path: '/' }); $.cookie("close_lastusers","2", { expires: 365, path: "/" });
$.cookie('close_lastphotos','2', { expires: 365, path: '/' }); $.cookie("close_lastphotos","2", { expires: 365, path: "/" });
$.cookie('close_lastlikes','2', { expires: 365, path: '/' }); $.cookie("close_lastlikes","2", { expires: 365, path: "/" });
alert('Right-hand column was restored. Please refresh your browser'); alert("Right-hand column was restored. Please refresh your browser");
}; };
</script>';}
</script>
EOT;

View file

@ -3,7 +3,7 @@
/* /*
* Name: Diabook * Name: Diabook
* Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
* Version: * Version: (Version: 0.010)
* Author: * Author:
*/ */