From 01961f7caa8e6c8ecaaaad9d28c61883863eab68 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Sat, 7 Apr 2012 23:46:47 -0400 Subject: minor dispy* fixes Signed-off-by: Simon L'nu --- view/theme/dispy-dark/theme.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'view/theme/dispy-dark/theme.php') diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index 17d31feda..e1dc8ba0c 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -9,6 +9,10 @@ * Screenshot: Screenshot */ +$a->theme_info = array( + 'extends' => 'dispy-dark', +); + $a->page['htmlhead'] .= <<< EOT + EOT; +} -function dispydark_community_info() { +function dispy_dark_community_info() { $a = get_app(); + $url = $a->get_baseurl($ssl_state); + $aside['$url'] = $url; - $aside['$lastusers_title'] = t('Last users'); - $aside['$lastusers_items'] = array(); - $publish = (get_config('system','publish_all') ? '' : " AND `publish` = 1 " ); - - $fostitJS = "javascript: (function() { - the_url = '".$a->get_baseurl($ssl_state)."/view/theme/dispy-dark/fpostit/fpostit.php?url=' + + $fpostitJS = <<theme_info['name'] . '/fpostit/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text)); @@ -135,18 +144,11 @@ function dispydark_community_info() { } else { a_funct(); } - })();"; + })(); +FPI; - $aside['$fostitJS'] = $fostitJS; - $url = $a->get_baseurl($ssl_state); - $aside['$url'] = $url; - - $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl'); - $a->page['aside_bottom'] = replace_macros($tpl, $aside); + $aside['$fpostitJS'] = $fpostitJS; + $tpl = file_get_contents(dirname(__file__) . '/communityhome.tpl'); + return $a->page['aside_bottom'] = replace_macros($tpl, $aside); } -// aside on profile page -//if (($a->argv[0] . $a->argv[1]) === ("profile" . $a->user['nickname'])) { - dispydark_community_info(); -//} - -- cgit v1.2.3 From 6b46fe3dfeeae89e00991d8e8f8d9ec0dadbb5bc Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Fri, 13 Apr 2012 19:30:07 -0400 Subject: neat little changes. hopefully the shadow will be well recieved Signed-off-by: Simon L'nu --- view/theme/dispy-dark/theme.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'view/theme/dispy-dark/theme.php') diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index c9028b9a9..affffc9cb 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -114,11 +114,27 @@ function dispy_dark_init(&$a) { return false; }); - // (attempt) to change the text colour in a top post + // (attempt to) change the text colour in a top post $('#profile-jot-text').focusin(function() { $(this).css({color: '#eec'}); }); + $('a[href=#top]').click(function() { + $('html, body').animate({scrollTop:0}, '500'); + return false; + }); + + }); + // shadowing effect for floating toolbars + $(document).scroll(function(e) { + var pageTop = $('html').scrollTop(); + if (pageTop) { + $('#nav-floater').css({boxShadow: '3px 3px 10px rgba(0, 0, 0, 0.7)'}); + $('.search-box').css({boxShadow: '3px 3px 10px rgba(0, 0, 0, 0.7)'}); + } else { + $('#nav-floater').css({boxShadow: '0 0 0 0'}); + $('.search-box').css({boxShadow: '0 0 0 0'}); + } }); EOT; -- cgit v1.2.3 From 6278b2a923a89fbf2e77aee367dd6499e48f8c1b Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Sat, 14 Apr 2012 16:24:35 -0400 Subject: string fix: typo. slow down scroll to top in dispys Signed-off-by: Simon L'nu --- view/theme/dispy-dark/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/theme/dispy-dark/theme.php') diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index affffc9cb..d5d489be2 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -120,7 +120,7 @@ function dispy_dark_init(&$a) { }); $('a[href=#top]').click(function() { - $('html, body').animate({scrollTop:0}, '500'); + $('html, body').animate({scrollTop:0}, 'slow'); return false; }); -- cgit v1.2.3 From 6a2f0eb475356ebe946a499a7a8bdee487b7ff32 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Sun, 15 Apr 2012 03:18:55 -0400 Subject: REALLY fix fpostit this time Signed-off-by: Simon L'nu --- view/theme/dispy-dark/theme.php | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'view/theme/dispy-dark/theme.php') diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index d5d489be2..6275980bc 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -76,7 +76,7 @@ function dispy_dark_init(&$a) { // click outside notifications menu closes it $('html').click(function() { $('#nav-notifications-linkmenu').removeClass('selected'); - document.getElementById("nav-notifications-menu").style.display = "none"; + $('#nav-notifications-menu').css({display: 'none'}); }); $('#nav-notifications-linkmenu').click(function(event) { @@ -85,7 +85,7 @@ function dispy_dark_init(&$a) { // click outside profiles menu closes it $('html').click(function() { $('#profiles-menu-trigger').removeClass('selected'); - document.getElementById("profiles-menu").style.display = "none"; + $('#profiles-menu').css({display: 'none'}); }); $('#profiles-menu').click(function(event) { @@ -138,6 +138,8 @@ function dispy_dark_init(&$a) { }); EOT; + + js_in_foot(); } function dispy_dark_community_info() { @@ -145,26 +147,25 @@ function dispy_dark_community_info() { $url = $a->get_baseurl($ssl_state); $aside['$url'] = $url; - $fpostitJS = <<theme_info['name'] . '/fpostit/fpostit.php?url=' + - encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + - encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ? - document.getSelection() : document.selection.createRange().text)); - a_funct = function() { - if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) { - location.href = the_url; - } - if (/Firefox/.test(navigator.userAgent)) { - setTimeout(a_funct, 0) - } else { - a_funct(); - } - })(); -FPI; + $fpostitJS = "javascript:(function() {" + . "the_url = '" . $url . "/view/theme/".$a->theme_info['name']."/fpostit/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text)); + a_funct = function() { + if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) location.href = the_url;}; + if (/Firefox/.test(navigator.userAgent)) {setTimeout(a_funct, 0);} + else {a_funct();}})()"; $aside['$fpostitJS'] = $fpostitJS; $tpl = file_get_contents(dirname(__file__) . '/communityhome.tpl'); return $a->page['aside_bottom'] = replace_macros($tpl, $aside); } +function js_in_foot() { + /** @purpose insert stuff in bottom of page + */ + $a = get_app(); + $baseurl = $a->get_baseurl($ssl_state); + $bottom['$baseurl'] = $baseurl; + $tpl = file_get_contents(dirname(__file__) . '/bottom.tpl'); + + return $a->page['bottom'] = replace_macros($tpl, $bottom); +} -- cgit v1.2.3 From 1b2209fb3c9223d356979aa0200aa39cc66c9fe8 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Tue, 17 Apr 2012 13:15:11 -0400 Subject: rip out fpostit Signed-off-by: Simon L'nu --- view/theme/dispy-dark/theme.php | 8 -------- 1 file changed, 8 deletions(-) (limited to 'view/theme/dispy-dark/theme.php') diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index 6275980bc..57e0fbe5c 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -147,14 +147,6 @@ function dispy_dark_community_info() { $url = $a->get_baseurl($ssl_state); $aside['$url'] = $url; - $fpostitJS = "javascript:(function() {" - . "the_url = '" . $url . "/view/theme/".$a->theme_info['name']."/fpostit/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text)); - a_funct = function() { - if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) location.href = the_url;}; - if (/Firefox/.test(navigator.userAgent)) {setTimeout(a_funct, 0);} - else {a_funct();}})()"; - - $aside['$fpostitJS'] = $fpostitJS; $tpl = file_get_contents(dirname(__file__) . '/communityhome.tpl'); return $a->page['aside_bottom'] = replace_macros($tpl, $aside); } -- cgit v1.2.3