[geeklog-hg] geeklog: Denim: fixed issue the left and right blocks were not d...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Sep 4 04:14:53 EDT 2012
changeset 8795:6b5caaa7312b
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/6b5caaa7312b
user: dengen
date: Tue Sep 04 17:00:40 2012 +0900
description:
Denim: fixed issue the left and right blocks were not displayed correctly on the tablet devices. And more, added the Up or Down arrow icons to the block title bar in order to improve the usability.
diffstat:
public_html/layout/denim/css_ltr/style.css | 14 ++++++++
public_html/layout/denim/css_rtl/style.css | 14 ++++++++
public_html/layout/denim/images/arrow-down.png | Bin
public_html/layout/denim/images/arrow-up.png | Bin
public_html/layout/denim/javascript/script.js | 40 +++++++++++++++----------
5 files changed, 52 insertions(+), 16 deletions(-)
diffs (101 lines):
diff -r 7da22bf9f0ac -r 6b5caaa7312b public_html/layout/denim/css_ltr/style.css
--- a/public_html/layout/denim/css_ltr/style.css Tue Sep 04 16:34:02 2012 +0900
+++ b/public_html/layout/denim/css_ltr/style.css Tue Sep 04 17:00:40 2012 +0900
@@ -3446,6 +3446,20 @@
border-top: 1px solid #6F99C7;
border-bottom: 1px solid #1F364F;
}
+
+ h2.show,
+ #block-left-search > h2.show {
+ background: url(../images/arrow-down.png) no-repeat #3B6998;
+ background-size: 36px auto;
+ background-position: right 50%;
+ }
+ h2.hide,
+ #block-left-search > h2.hide {
+ background: url(../images/arrow-up.png) no-repeat #3B6998;
+ background-size: 36px auto;
+ background-position: right 50%;
+ }
+
h2.block-title {
margin-top: 0;
margin-bottom: 0;
diff -r 7da22bf9f0ac -r 6b5caaa7312b public_html/layout/denim/css_rtl/style.css
--- a/public_html/layout/denim/css_rtl/style.css Tue Sep 04 16:34:02 2012 +0900
+++ b/public_html/layout/denim/css_rtl/style.css Tue Sep 04 17:00:40 2012 +0900
@@ -3446,6 +3446,20 @@
border-top: 1px solid #6F99C7;
border-bottom: 1px solid #1F364F;
}
+
+ h2.show,
+ #block-left-search > h2.show {
+ background: url(../images/arrow-down.png) no-repeat #3B6998;
+ background-size: 36px auto;
+ background-position: right 50%;
+ }
+ h2.hide,
+ #block-left-search > h2.hide {
+ background: url(../images/arrow-up.png) no-repeat #3B6998;
+ background-size: 36px auto;
+ background-position: right 50%;
+ }
+
h2.block-title {
margin-top: 0;
margin-bottom: 0;
diff -r 7da22bf9f0ac -r 6b5caaa7312b public_html/layout/denim/images/arrow-down.png
Binary file public_html/layout/denim/images/arrow-down.png has changed
diff -r 7da22bf9f0ac -r 6b5caaa7312b public_html/layout/denim/images/arrow-up.png
Binary file public_html/layout/denim/images/arrow-up.png has changed
diff -r 7da22bf9f0ac -r 6b5caaa7312b public_html/layout/denim/javascript/script.js
--- a/public_html/layout/denim/javascript/script.js Tue Sep 04 16:34:02 2012 +0900
+++ b/public_html/layout/denim/javascript/script.js Tue Sep 04 17:00:40 2012 +0900
@@ -114,21 +114,29 @@
});
var istouch = ('ontouchstart' in window);
if (istouch) {
- var obj = $('.block-title');
- $(".block-left-content").css("display", "none");
- $(".block-right-content").css("display", "none");
- obj.live('touchstart', function() {
- this.touched = true;
- });
- obj.live('touchmove', function() {
- this.touchmoved = true;
- });
- obj.live('touchend', function() {
- if (this.touched && !this.touchmoved) {
- $(this).next().toggle();
- }
- this.touched = false;
- this.touchmoved = false;
- });
+ var ua = navigator.userAgent;
+ var istablet = ((ua.indexOf('Android') > 0 && ua.indexOf('Mobile') == -1)
+ || ua.indexOf('iPad') > 0 || ua.indexOf('SC-01C') > 0);
+ if (!istablet) {
+ var obj = $('.block-title');
+ obj.addClass("show");
+ $(".block-left-content").css("display", "none");
+ $(".block-right-content").css("display", "none");
+ obj.live('touchstart', function() {
+ this.touched = true;
+ });
+ obj.live('touchmove', function() {
+ this.touchmoved = true;
+ });
+ obj.live('touchend', function() {
+ if (this.touched && !this.touchmoved) {
+ $(this).next().toggle();
+ $(this).toggleClass("show");
+ $(this).toggleClass("hide");
+ }
+ this.touched = false;
+ this.touchmoved = false;
+ });
+ }
}
});
More information about the geeklog-cvs
mailing list