aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/diabook
diff options
context:
space:
mode:
Diffstat (limited to 'view/theme/diabook')
-rwxr-xr-xview/theme/diabook/communityhome.tpl32
-rwxr-xr-xview/theme/diabook/icons/close_box.pngbin0 -> 206 bytes
-rw-r--r--view/theme/diabook/js/jquery.cookie.js47
-rw-r--r--view/theme/diabook/nav.tpl6
-rw-r--r--view/theme/diabook/profile_side.tpl2
-rw-r--r--view/theme/diabook/style-network.css33
-rw-r--r--view/theme/diabook/style-profile.css22
-rw-r--r--view/theme/diabook/style.css3
-rwxr-xr-xview/theme/diabook/theme.php128
9 files changed, 240 insertions, 33 deletions
diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl
index 7e50423ce..a14705ed7 100755
--- a/view/theme/diabook/communityhome.tpl
+++ b/view/theme/diabook/communityhome.tpl
@@ -1,17 +1,22 @@
+<div id="close_pages">
{{ if $page }}
<div>$page</div>
{{ endif }}
+</div>
+<div id="close_helpers">
{{ if $lastusers_title }}
-<h3 style="margin-top:0px;">Help or @NewHere ?</h3>
+<h3 style="margin-top:0px;">Help or @NewHere ?<a id="close_helpers_icon" onClick="close_helpers()" class="icon close_box" title="close"></a></h3>
<a href="https://helpers.pyxis.uberspace.de/profile/helpers" style="margin-left: 10px; " title="Friendica Support" target="blank">Friendica Support</a><br>
<a href="https://letstalk.pyxis.uberspace.de/profile/letstalk" style="margin-left: 10px; " title="Let's talk" target="blank">Let's talk</a><br>
-<a href="http://newzot.hydra.uberspace.de/profile/newzot" title="Local Friendica" style="margin-left: 10px; " target="blank">Local Friendica</a>
+<a href="http://newzot.hydra.uberspace.de/profile/newzot" title="Local Friendica" style="margin-left: 10px; " target="blank">Local Friendica</a><br>
<a href="http://kakste.com/profile/newhere" title="@NewHere" style="margin-left: 10px; " target="blank">NewHere</a>
{{ endif }}
+</div>
+<div id="close_services">
{{ if $lastusers_title }}
-<h3>Connectable Services</h3>
+<h3>Connectable Services<a id="close_services_icon" onClick="close_services()" class="icon close_box" title="close"></a></h3>
<div id="right_service_icons" style="margin-left: 11px; margin-top: 5px;">
<a href="$url/facebook"><img alt="Facebook" src="view/theme/diabook/icons/facebook.png" title="Facebook"></a>
<a href="$url/settings/connectors"><img alt="StatusNet" src="view/theme/diabook/icons/StatusNet.png?" title="StatusNet"></a>
@@ -23,28 +28,35 @@
<a href="$url/settings/connectors"><img alt="E-Mail" src="view/theme/diabook/icons/email.png?" title="E-Mail"></a>
</div>
{{ endif }}
+</div>
+<div id="close_friends">
{{ if $nv }}
-<h3>Find Friends</h3>
+<h3>Find Friends<a id="close_friends_icon" onClick="close_friends()" class="icon close_box" title="close"></a></h3>
<a class="$nv.directory.2" href="$nv.directory.0" style="margin-left: 10px; " title="$nv.directory.3" >$nv.directory.1</a><br>
<a class="$nv.match.2" href="$nv.match.0" style="margin-left: 10px; " title="$nv.match.3" >$nv.match.1</a><br>
<a class="$nv.suggest.2" href="$nv.suggest.0" style="margin-left: 10px; " title="$nv.suggest.3" >$nv.suggest.1</a>
<a class="$nv.invite.2" href="$nv.invite.0" style="margin-left: 10px; " title="$nav.invite.3" >$nv.invite.1</a>
{{ endif }}
+</div>
+<div id="close_postit">
{{ if $lastusers_title }}
-<h3>PostIt to Friendica</h3>
+<h3>PostIt to Friendica<a id="close_postit_icon" onClick="close_postit()" class="icon close_box" title="close"></a></h3>
<div style="padding-left: 8px;"><span ><a href="$fostitJS" title="PostIt">Post to Friendica</a> from anywhere by bookmarking this Link.</span></div>
{{ endif }}
+</div>
+<div id="close_lastusers">
{{ if $lastusers_title }}
-<h3>$lastusers_title</h3>
+<h3>$lastusers_title<a id="close_lastusers_icon" onClick="close_lastusers()" class="icon close_box" title="close"></a></h3>
<div id='lastusers-wrapper' class='items-wrapper'>
{{ for $lastusers_items as $i }}
$i
{{ endfor }}
</div>
{{ endif }}
+</div>
{{ if $activeusers_title }}
<h3>$activeusers_title</h3>
@@ -55,20 +67,24 @@
</div>
{{ endif }}
+<div id="close_lastphotos">
{{ if $photos_title }}
-<h3>$photos_title</h3>
+<h3>$photos_title<a id="close_photos_icon" onClick="close_lastphotos()" class="icon close_box" title="close"></a></h3>
<div id='ra-photos-wrapper' class='items-wrapper'>
{{ for $photos_items as $i }}
$i
{{ endfor }}
</div>
{{ endif }}
+</div>
+<div id="close_lastlikes">
{{ if $like_title }}
-<h3>$like_title</h3>
+<h3>$like_title<a id="close_lastlikes_icon" onClick="close_lastlikes()" class="icon close_box" title="close"></a></h3>
<ul id='likes'>
{{ for $like_items as $i }}
<li id='ra-photos-wrapper'>$i</li>
{{ endfor }}
</ul>
{{ endif }}
+</div>
diff --git a/view/theme/diabook/icons/close_box.png b/view/theme/diabook/icons/close_box.png
new file mode 100755
index 000000000..28e2675b8
--- /dev/null
+++ b/view/theme/diabook/icons/close_box.png
Binary files differ
diff --git a/view/theme/diabook/js/jquery.cookie.js b/view/theme/diabook/js/jquery.cookie.js
new file mode 100644
index 000000000..6d5974a2c
--- /dev/null
+++ b/view/theme/diabook/js/jquery.cookie.js
@@ -0,0 +1,47 @@
+/*!
+ * jQuery Cookie Plugin
+ * https://github.com/carhartl/jquery-cookie
+ *
+ * Copyright 2011, Klaus Hartl
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.opensource.org/licenses/GPL-2.0
+ */
+(function($) {
+ $.cookie = function(key, value, options) {
+
+ // key and at least value given, set cookie...
+ if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
+ options = $.extend({}, options);
+
+ if (value === null || value === undefined) {
+ options.expires = -1;
+ }
+
+ if (typeof options.expires === 'number') {
+ var days = options.expires, t = options.expires = new Date();
+ t.setDate(t.getDate() + days);
+ }
+
+ value = String(value);
+
+ return (document.cookie = [
+ encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
+ options.path ? '; path=' + options.path : '',
+ options.domain ? '; domain=' + options.domain : '',
+ options.secure ? '; secure' : ''
+ ].join(''));
+ }
+
+ // key and possibly options given, get cookie...
+ options = value || {};
+ var decode = options.raw ? function(s) { return s; } : decodeURIComponent;
+
+ var pairs = document.cookie.split('; ');
+ for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) {
+ if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined
+ }
+ return null;
+ };
+})(jQuery);
diff --git a/view/theme/diabook/nav.tpl b/view/theme/diabook/nav.tpl
index 5776b6cf7..9acf1032c 100644
--- a/view/theme/diabook/nav.tpl
+++ b/view/theme/diabook/nav.tpl
@@ -68,13 +68,11 @@
{{ if $nav.help }} <li><a class="$nav.help.2" target="friendika-help" href="$nav.help.0" title="$nav.help.3" >$nav.help.1</a></li>{{ endif }}
-
- <li ><a class="$nav.community.2" href="$nav.community.0" title="$nav.community.3" >$nav.community.1</a></li>
-
-
<li><a class="$nav.search.2" href="$nav.search.0" title="$nav.search.3" >$nav.search.1</a></li>
<li><a class="$nav.search.2" href="friendica" title="Site Info / Impressum" >Info/Impressum</a></li>
+
+ <li><a class="$nav.search.2" onClick="restore_boxes()" title="restore third column" style="cursor: pointer;">Restore right-hand column</a></li>
{{ if $nav.settings }}<li><a class="menu-sep $nav.settings.2" href="$nav.settings.0" title="$nav.settings.3">$nav.settings.1</a></li>{{ endif }}
{{ if $nav.admin }}<li><a class="$nav.admin.2" href="$nav.admin.0" title="$nav.admin.3" >$nav.admin.1</a></li>{{ endif }}
diff --git a/view/theme/diabook/profile_side.tpl b/view/theme/diabook/profile_side.tpl
index fc949639e..0762dbe44 100644
--- a/view/theme/diabook/profile_side.tpl
+++ b/view/theme/diabook/profile_side.tpl
@@ -9,7 +9,7 @@
<ul id="profile-side-menu" class="menu-profile-side">
<li id="profile-side-status" class="menu-profile-list home"><a class="menu-profile-list-item" href="$ps.usermenu.status.0">$ps.usermenu.status.1</a></li>
<li id="profile-side-photos" class="menu-profile-list photos"><a class="menu-profile-list-item" href="$ps.usermenu.photos.0">$ps.usermenu.photos.1</a></li>
- <li id="profile-side-photos" class="menu-profile-list pscontacts"><a class="menu-profile-list-item" href="$ps.usermenu.contacts.0">$ps.usermenu.contacts.1</a></li>
+ <li id="profile-side-photos" class="menu-profile-list pscontacts"><a class="menu-profile-list-item" href="$ps.usermenu.contacts.0">$ps.usermenu.contacts.1</a></li>
<li id="profile-side-events" class="menu-profile-list events"><a class="menu-profile-list-item" href="$ps.usermenu.events.0">$ps.usermenu.events.1</a></li>
<li id="profile-side-notes" class="menu-profile-list notes"><a class="menu-profile-list-item" href="$ps.usermenu.notes.0">$ps.usermenu.notes.1</a></li>
<li id="profile-side-foren" class="menu-profile-list foren"><a class="menu-profile-list-item" href="$ps.usermenu.pgroups.0" target="blanc">$ps.usermenu.pgroups.1</a></li>
diff --git a/view/theme/diabook/style-network.css b/view/theme/diabook/style-network.css
index 20c273ec3..3882e37bd 100644
--- a/view/theme/diabook/style-network.css
+++ b/view/theme/diabook/style-network.css
@@ -909,25 +909,25 @@ ul.menu-popup .empty {
}
/*http://prothemedesign.com/circular-icons/*/
.menu-profile-list.home{
- background: url("../../../view/theme/diabook-blue/icons/home.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/home.png") no-repeat;
}
.menu-profile-list.photos{
- background: url("../../../view/theme/diabook-blue/icons/mess_side.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/mess_side.png") no-repeat;
}
.menu-profile-list.events{
- background: url("../../../view/theme/diabook-blue/icons/events.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/events.png") no-repeat;
}
.menu-profile-list.notes{
- background: url("../../../view/theme/diabook-blue/icons/notes.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/notes.png") no-repeat;
}
.menu-profile-list.foren{
- background: url("../../../view/theme/diabook-blue/icons/pubgroups.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/pubgroups.png") no-repeat;
}
.menu-profile-list.com_side{
- background: url("../../../view/theme/diabook-blue/icons/com_side.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/com_side.png") no-repeat;
}
.menu-profile-list.pscontacts{
- background: url("../../../view/theme/diabook-blue/icons/pscontacts.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/pscontacts.png") no-repeat;
}
/* aside */
@@ -1156,8 +1156,7 @@ body .pageheader{
right_aside {
display: table-cell;
vertical-align: top;
- width: 160px;
- padding-right: 10px;
+ width: 170px;
/*border-left: 1px solid #D2D2D2;*/
/* background: #F1F1F1; */
@@ -1173,10 +1172,22 @@ right_aside #lastusers-wrapper { padding-left: 6px; padding-top: 3px; overflow:
right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; }
#page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;}
#page-sidebar-right_aside ul {margin-top: 0px;}
-.icon.expand {
- background-image: url("../../../view/theme/diabook/icons/expand.png");
+right_aside .icon {width: 10px; height: 10px;}
+.close_box {
+ background-image: url("../../../view/theme/diabook-blue/icons/close_box.png");
+ float: right;
+ opacity: 0.1;
+ }
+.close_box:hover {
+ background-image: url("../../../view/theme/diabook-blue/icons/close_box.png");
float: right;
cursor: pointer;
+ opacity: 1;
+-webkit-transition: all 0.2s ease-in-out;
+-moz-transition: all 0.2s ease-in-out;
+-o-transition: all 0.2s ease-in-out;
+-ms-transition: all 0.2s ease-in-out;
+transition: all 0.2s ease-in-out;
}
/* wall item */
diff --git a/view/theme/diabook/style-profile.css b/view/theme/diabook/style-profile.css
index 0f05bf6c1..249596f9f 100644
--- a/view/theme/diabook/style-profile.css
+++ b/view/theme/diabook/style-profile.css
@@ -1151,8 +1151,8 @@ body .pageheader{
right_aside {
display: table-cell;
vertical-align: top;
- width: 160px;
- padding-right: 10px;
+ width: 170px;
+
/*border-left: 1px solid #D2D2D2;*/
/* background: #F1F1F1; */
@@ -1168,6 +1168,24 @@ right_aside #lastusers-wrapper { padding-left: 6px; padding-top: 3px; overflow:
right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; }
#page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;}
#page-sidebar-right_aside ul {margin-top: 0px;}
+right_aside .icon {width: 10px; height: 10px;}
+.close_box {
+ background-image: url("../../../view/theme/diabook-blue/icons/close_box.png");
+ float: right;
+ cursor: pointer;
+ opacity: 0.1;
+ }
+.close_box:hover {
+ background-image: url("../../../view/theme/diabook-blue/icons/close_box.png");
+ float: right;
+ cursor: pointer;
+ opacity: 1;
+-webkit-transition: all 0.2s ease-in-out;
+-moz-transition: all 0.2s ease-in-out;
+-o-transition: all 0.2s ease-in-out;
+-ms-transition: all 0.2s ease-in-out;
+transition: all 0.2s ease-in-out;
+ }
/* wall item */
.tread-wrapper {
border-bottom: 1px solid #D2D2D2;
diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css
index 5154459d3..d964243a9 100644
--- a/view/theme/diabook/style.css
+++ b/view/theme/diabook/style.css
@@ -924,6 +924,9 @@ ul.menu-popup .empty {
.menu-profile-list.com_side{
background: url("../../../view/theme/diabook-blue/icons/com_side.png") no-repeat;
}
+.menu-profile-list.pscontacts{
+ background: url("../../../view/theme/diabook/icons/pscontacts.png") no-repeat;
+ }
/* aside */
aside {
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index 6eb623d95..a3f0ca0d4 100755
--- a/view/theme/diabook/theme.php
+++ b/view/theme/diabook/theme.php
@@ -151,9 +151,10 @@ function diabook_community_info(){
};
//Community Page
+ if(local_user()) {
$page = '<div id="page-sidebar-right_aside" class="widget">
<div class="title tool">
- <h3>'.t("Community Pages").'</h3></div>
+ <h3>'.t("Community Pages").'<a id="close_pages_icon" onClick="close_pages()" class="icon close_box" title="close"></a></h3></div>
<div id="sidebar-page-list"><ul>';
$pagelist = array();
@@ -178,9 +179,10 @@ function diabook_community_info(){
$contact["name"]."</a></li>";
}
$page .= '</ul></div></div>';
- if (sizeof($contacts) > 0)
+ //if (sizeof($contacts) > 0)
- $aside['$page'] = $page;
+ $aside['$page'] = $page;
+ }
//END Community Page
@@ -216,7 +218,7 @@ if ($a->argv[0] === "network" && local_user()){
$ps['usermenu']['events'] = Array('events/', t('Events'), "", t('Your events'));
$ps['usermenu']['notes'] = Array('notes/', t('Personal notes'), "", t('Your personal photos'));
$ps['usermenu']['community'] = Array('community/', t('Community'), "", "");
- $ps['usermenu']['pgroups'] = Array('http://dir.friendica.com/directory/forum', t('Public Groups'), "", "");
+ $ps['usermenu']['pgroups'] = Array('http://dir.friendica.com/directory/forum', t('Community Pages'), "", "");
$tpl = get_markup_template('profile_side.tpl');
@@ -227,31 +229,38 @@ if ($a->argv[0] === "network" && local_user()){
}
+ $ccCookie = $_COOKIE['close_pages'] + $_COOKIE['close_helpers'] + $_COOKIE['close_services'] + $_COOKIE['close_friends'] + $_COOKIE['close_postit'] + $_COOKIE['close_lastusers'] + $_COOKIE['close_lastphotos'] + $_COOKIE['close_lastlikes'];
+
+ if($ccCookie != "8") {
// COMMUNITY
diabook_community_info();
// CUSTOM CSS
$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-network.css";
-
+ }
}
//right_aside at profile pages
if ($a->argv[0] === "profile"){
-
+ if($ccCookie != "8") {
// COMMUNITY
diabook_community_info();
// CUSTOM CSS
$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-profile.css";
-
+ }
}
// custom css
if (!is_null($cssFile)) $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
+//load jquery.cookie.js
+$cookieJS = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/js/jquery.cookie.js";
+$a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" />', $cookieJS);
+
//js scripts
$a->page['htmlhead'] .= <<< EOT
@@ -262,5 +271,110 @@ $a->page['htmlhead'] .= <<< EOT
});
</script>
+
+<script>
+
+$("right_aside").ready(function(){
+
+ if($.cookie('close_pages') == '1')
+ {
+ document.getElementById( "close_pages" ).style.display = "none";
+ };
+
+ if($.cookie('close_helpers') == '1')
+ {
+ document.getElementById( "close_helpers" ).style.display = "none";
+ };
+
+ if($.cookie('close_services') == '1')
+ {
+ document.getElementById( "close_services" ).style.display = "none";
+ };
+
+ if($.cookie('close_friends') == '1')
+ {
+ document.getElementById( "close_friends" ).style.display = "none";
+ };
+
+ if($.cookie('close_postit') == '1')
+ {
+ document.getElementById( "close_postit" ).style.display = "none";
+ };
+
+ if($.cookie('close_lastusers') == '1')
+ {
+ document.getElementById( "close_lastusers" ).style.display = "none";
+ };
+
+ if($.cookie('close_lastphotos') == '1')
+ {
+ document.getElementById( "close_lastphotos" ).style.display = "none";
+ };
+
+ if($.cookie('close_lastlikes') == '1')
+ {
+ document.getElementById( "close_lastlikes" ).style.display = "none";
+ };}
+
+);
+
+function close_pages(){
+ document.getElementById( "close_pages" ).style.display = "none";
+ $.cookie('close_pages','1', { expires: 365, path: '/' });
+ };
+
+function close_helpers(){
+ document.getElementById( "close_helpers" ).style.display = "none";
+ $.cookie('close_helpers','1', { expires: 365, path: '/' });
+ };
+
+function close_services(){
+ document.getElementById( "close_services" ).style.display = "none";
+ $.cookie('close_services','1', { expires: 365, path: '/' });
+ };
+
+function close_friends(){
+ document.getElementById( "close_friends" ).style.display = "none";
+ $.cookie('close_friends','1', { expires: 365, path: '/' });
+ };
+
+function close_postit(){
+ document.getElementById( "close_postit" ).style.display = "none";
+ $.cookie('close_postit','1', { expires: 365, path: '/' });
+ };
+
+function close_lastusers(){
+ document.getElementById( "close_lastusers" ).style.display = "none";
+ $.cookie('close_lastusers','1', { expires: 365, path: '/' });
+ };
+
+function close_lastphotos(){
+ document.getElementById( "close_lastphotos" ).style.display = "none";
+ $.cookie('close_lastphotos','1', { expires: 365, path: '/' });
+ };
+
+function close_lastlikes(){
+ document.getElementById( "close_lastlikes" ).style.display = "none";
+ $.cookie('close_lastlikes','1', { expires: 365, path: '/' });
+ };
+
+
+
+function restore_boxes(){
+ $.cookie('close_pages','2', { expires: 365, path: '/' });
+ $.cookie('close_helpers','2', { expires: 365, path: '/' });
+ $.cookie('close_services','2', { expires: 365, path: '/' });
+ $.cookie('close_friends','2', { expires: 365, path: '/' });
+ $.cookie('close_postit','2', { expires: 365, path: '/' });
+ $.cookie('close_lastusers','2', { expires: 365, path: '/' });
+ $.cookie('close_lastphotos','2', { expires: 365, path: '/' });
+ $.cookie('close_lastlikes','2', { expires: 365, path: '/' });
+ alert('Right-hand column was restored');
+ };
+
+
+</script>
+
+
EOT;