[P2-php-svn] [881] expack:

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 8月 17日 (火) 00:07:08 JST


Revision: 881
          http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=881
Author:   rsk
Date:     2010-08-17 00:07:08 +0900 (Tue, 17 Aug 2010)

Log Message:
-----------
expack:
- rev.100817.0000.
- iPhone用ビューを改良。
-- スレッド表示および新着まとめ読みのデザインをリファイン。
-- レスポップアップ等、一部のXMLHttpRequestを非同期で実行するように変更。
-- iPhone/Safari以外の端末/ブラウザ対応を少しだけ改善。

Modified Paths:
--------------
    p2ex/trunk/conf/conf.inc.php
    p2ex/trunk/css/iphone.css
    p2ex/trunk/js/iphone.js
    p2ex/trunk/js/limelight.js
    p2ex/trunk/js/respopup_iphone.js
    p2ex/trunk/lib/read_footer_i.inc.php
    p2ex/trunk/lib/read_header_i.inc.php
    p2ex/trunk/lib/read_jump_k.inc.php
    p2ex/trunk/lib/sb_footer_i.inc.php
    p2ex/trunk/lib/sb_footer_k.inc.php
    p2ex/trunk/lib/sb_header_i.inc.php
    p2ex/trunk/lib/sb_print_k.inc.php
    p2ex/trunk/lib/toolbar_i.inc.php
    p2ex/trunk/read_new.php
    p2ex/trunk/read_new_k.php
    p2ex/trunk/subject.php


-------------- next part --------------
Modified: p2ex/trunk/conf/conf.inc.php
===================================================================
--- p2ex/trunk/conf/conf.inc.php	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/conf/conf.inc.php	2010-08-16 15:07:08 UTC (rev 881)
@@ -7,7 +7,7 @@
 // ƒo[ƒWƒ‡ƒ“î•ñ
 $_conf = array(
     'p2version' => '1.7.29+1.8.x',  // rep2‚̃o[ƒWƒ‡ƒ“
-    'p2expack'  => '100815.0200',   // Šg’£ƒpƒbƒN‚̃o[ƒWƒ‡ƒ“
+    'p2expack'  => '100817.0000',   // Šg’£ƒpƒbƒN‚̃o[ƒWƒ‡ƒ“
     'p2name'    => 'expack',        // rep2‚Ì–¼‘O
 );
 

Modified: p2ex/trunk/css/iphone.css
===================================================================
--- p2ex/trunk/css/iphone.css	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/css/iphone.css	2010-08-16 15:07:08 UTC (rev 881)
@@ -68,6 +68,13 @@
 	text-align: right;
 }
 
+p.empty {
+	margin: 0;
+	padding: 7px 11px;
+	background-color: #fff;
+	color: #333;;
+}
+
 /* }}} *
 /* {{{ Forms */
 
@@ -131,15 +138,6 @@
 	border-radius: 15px;
 }
 
-div#read_new_header {
-}
-
-div#read_new_footer {
-}
-
-div.read_new_toolbar {
-}
-
 /* }}} *
 /* {{{ SPM */
 
@@ -223,6 +221,10 @@
 	background-color: #ffffff;
 }
 
+div.thread > div.res:not(:first-child) {
+	border-top-width: 4px;	
+}
+
 div.res.aborned {
 	margin: 0;
 	padding: 0;
@@ -242,6 +244,9 @@
 	padding: 8px 10px;
 	line-height: 120%;
 	border-bottom: #808080 solid 1px;
+}
+
+div.thread > div.res > div.res-header {
 	background-color: #fafafa;
 }
 
@@ -293,7 +298,7 @@
 
 div.respop > div.res {
 	margin: 0 0 8px 0 !important;
-	background-color: rgba(255, 255, 246, 0.95) !important;
+	background-color: rgba(255, 255, 250, 0.95) !important;
 	border: rgba(108, 108, 108, 0.8) solid 1px !important;
 	-webkit-border-radius: 8px;
 	border-radius: 8px;
@@ -302,9 +307,6 @@
 }
 
 div.respop > div.res > div.res-header {
-	background-color: rgba(250, 250, 225, 0.8) !important;
-	-webkit-border-top-right-radius: 8px;
-	border-top-right-radius: 8px;
 	border-bottom-color: rgba(108, 108, 108, 0.8) !important;
 }
 
@@ -318,11 +320,6 @@
 div.respop > div.res > div.respop-back {
 	margin: 0;
 	padding: 0;
-	background-color: rgba(250, 250, 225, 0.8) !important;
-	-webkit-border-bottom-left-radius: 8px;
-	-webkit-border-bottom-right-radius: 8px;
-	border-bottom-left-radius: 8px;
-	border-bottom-right-radius: 8px;
 	border-top: rgba(108, 108, 108, 0.8) solid 1px;
 	text-align: center;
 }
@@ -347,17 +344,9 @@
 /* }}} *
 /* {{{ Subject */
 
-p.empty-subject {
-	margin: 10px -10px;
-	padding: 7px 11px;
-	background-color: #ffffff;
-	border-top: #808080 solid 1px;
-	border-bottom: #808080 solid 1px;
-}
-
 ul.subject {
 	display: block;
-	margin: 10px -10px;
+	margin: 0;
 	padding: 0;
 }
 
@@ -582,15 +571,25 @@
 	margin: 0;
 	padding: 0;
 }
- 
-body.nopad p.empty-subject {
-	margin: 10px 0;
-}
- 
-body.nopad ul.subject {
+
+div.info {
 	margin: 0;
+	padding: 5px 10px;
+	border-top: #808080 solid 1px;
+	background-color: #ccf;
+	color: #000;
+	font-size: 14px;
+	line-height: 16px;
 }
 
+a.hoverable {
+	-webkit-tap-highlight-color: transparent;
+}
+
+a > img {
+	border: none;
+}
+
 /* }}} */
 /* {{{ new toolbar */
 
@@ -641,13 +640,6 @@
 	line-height: 16px;
 }
 
-div.ntoolbar > div.info {
-	padding: 5px 10px;
-	border-top: #808080 solid 1px;
-	background-color: #ccf;
-	color: #000;
-}
-
 div.ntoolbar > div.hits {
 	padding: 5px 10px;
 	border-top: #808080 solid 1px;
@@ -670,6 +662,7 @@
 div.ntoolbar td {
 	position: relative;
 	width: 20%;
+	min-width: 64px;
 	margin: 0;
 	padding: 8px 0;
 	text-align: center;
@@ -695,10 +688,6 @@
 	width: 100%;
 }
 
-div.ntoolbar > h1.ptitle > a {
-	text-decoration: none;
-}
-
 div.ntoolbar td > a {
 	display: inline-block;
 	position: relative;
@@ -710,32 +699,33 @@
 	text-overflow: ellipsis;
 	text-align: center;
 	text-decoration: none;
-	-webkit-tap-highlight-color: transparent;
 }
 
-div.ntoolbar > h1.ptitle > a:link,
-div.ntoolbar > h1.ptitle > a:visited,
-div.ntoolbar td > a:link,
-div.ntoolbar td > a:visited {
+div.ntoolbar td[colspan] > a {
+	width: 120px;
+}
+
+div.ntoolbar a {
+	text-decoration: none;
+}
+
+div.ntoolbar a:link,
+div.ntoolbar a:visited {
 	color: #fff;
 }
 
-div.ntoolbar td > a.inactive {
+div.ntoolbar a.inactive {
 	color: #888;
 }
 
-div.ntoolbar td > span.unavailable {
+div.ntoolbar span.unavailable {
 	color: #555;
 }
 
-div.ntoolbar > h1.ptitle > a.hover,
-div.ntoolbar > h1.ptitle > a.active,
-div.ntoolbar > h1.ptitle > a:hover,
-div.ntoolbar > h1.ptitle > a:active,
-div.ntoolbar td > a.hover,
-div.ntoolbar td > a.active,
-div.ntoolbar td > a:hover,
-div.ntoolbar td > a:active {
+div.ntoolbar a.hover,
+div.ntoolbar a.active,
+div.ntoolbar a:hover,
+div.ntoolbar a:active {
 	color: #9cf;
 }
 
@@ -781,27 +771,23 @@
 	background-color: #36f;
 }
 
-div.ntoolbar td > a > img {
-	border: none;
-}
-
-div.ntoolbar td > a:link > img,
-div.ntoolbar td > a:visited > img {
+div.ntoolbar a:link > img,
+div.ntoolbar a:visited > img {
 	background-color: #fff;
 }
 
-div.ntoolbar td > a.inactive > img {
+div.ntoolbar a.inactive > img {
 	background-color: #888;
 }
 
-div.ntoolbar td > span.unavailable > img {
+div.ntoolbar span.unavailable > img {
 	background-color: #555;
 }
 
-div.ntoolbar td > a.hover > img,
-div.ntoolbar td > a.active > img,
-div.ntoolbar td > a:hover > img,
-div.ntoolbar td > a:active > img {
+div.ntoolbar a.hover > img,
+div.ntoolbar a.active > img,
+div.ntoolbar a:hover > img,
+div.ntoolbar a:active > img {
 	background-color: #9cf;
 }
 
@@ -814,6 +800,64 @@
 }
 
 /* }}} */
+/* {{{ new toolbar / matome */
+
+div.mtoolbar {
+	position: relative;
+	min-width: 320px;
+	margin: 0;
+	padding: 0;
+	background-color: #000;
+	color: #fff;
+}
+
+div.mtoolbar > .ttitle {
+	margin: 0 56px 0 0;
+	padding: 10px 0 10px 10px;
+	font-weight: bold;
+}
+
+div.mtoolbar > h2.ttitle {
+	font-size: 14px;
+	line-height: 16px;
+}
+
+div.mtoolbar > div.ttitle {
+	font-size: 12px;
+	line-height: 14px;
+}
+
+div.mtoolbar_top {
+	border-top: #808080 solid 1px;
+}
+
+div.mtoolbar_bottom > table {
+	border-bottom: #808080 solid 1px;
+}
+
+div.mtoolbar > div.mover {
+	position: absolute;
+	right: 8px;
+}
+
+div.mtoolbar_top > div.mover {
+	top: 0;
+}
+
+div.mtoolbar_bottom > div.mover {
+	bottom: 2px;
+}
+
+div.mtoolbar > .ttitle a {
+	text-decoration: underline;
+}
+
+div.mtoolbar > .ttitle > span.btitle {
+	display: inline-block;
+	font-weight: normal;
+}
+
+/* }}} */
 /* {{{ Media Queries */
 
 @media screen and (min-width: 340px) {

Modified: p2ex/trunk/js/iphone.js
===================================================================
--- p2ex/trunk/js/iphone.js	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/js/iphone.js	2010-08-16 15:07:08 UTC (rev 881)
@@ -682,7 +682,7 @@
 iutil.httpGetText = function(uri) {
 	var req, err;
 	try {
-		var req = new XMLHttpRequest();
+		req = new XMLHttpRequest();
 		req.open('GET', uri, false);
 		req.send(null);
 
@@ -698,13 +698,36 @@
 };
 
 // }}}
+// {{{ httpGetAsync()
+
+/**
+ * ”ñ“¯ŠúGETƒŠƒNƒGƒXƒg‚ðŽÀs‚·‚é
+ *
+ * @param {String} uri
+ * @param {Function} callback
+ * @return void
+ */
+iutil.httpGetAsync = function(uri, callback) {
+	var req = new XMLHttpRequest();
+	req.open('GET', uri, true);
+	req.onreadystatechange = function() {
+		if (req.readyState == 4) {
+			if (req.status == 200) {
+				callback(this, uri);
+			}
+		}
+	};
+	req.send(null);
+};
+
+// }}}
 // {{{ stopEvent()
 
 /**
  * ƒfƒtƒHƒ‹ƒgƒCƒxƒ“ƒg‚Ì”­¶‚ƃCƒxƒ“ƒg‚Ì“`”d‚ð—}§‚·‚é
  *
  * @param {Event} event
- * @return {false}
+ * @return false
  */
 iutil.stopEvent = function(event) {
 	event.preventDefault();
@@ -713,6 +736,37 @@
 };
 
 // }}}
+// {{{ setHoverable()
+
+/**
+ * ƒ^ƒbƒ`ƒCƒxƒ“ƒg‚Å‹^Ž—hoverŒø‰Ê‚ðŽÀŒ»‚·‚é
+ *
+ * @param {Node|String} contextNode
+ * @return void
+ */
+iutil.setHoverable = function(contextNode) {
+	var anchors, anchor, hoverOn, hoverOff, i, l;
+
+	anchors = document.evaluate('.//a[contains(concat(" ", @class, " "), " hoverable ")]',
+	                            contextNode, null,
+	                            XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+	l = anchors.snapshotLength;
+
+	hoverOn = function(event) {
+		iutil.toggleClass(this, 'hover', true);
+	};
+	hoverOff = function(event) {
+		iutil.toggleClass(this, 'hover', false);
+	};
+
+	for (i = 0; i < l; i++) {
+		anchor = anchors.snapshotItem(i);
+		anchor.addEventListener('touchstart', hoverOn, false);
+		anchor.addEventListener('touchend', hoverOff, false);
+	}
+};
+
+// ]}}
 // {{{ toolbarShowHide()
 
 /**
@@ -720,11 +774,13 @@
  *
  * @param {Element} element
  * @param {Event} event
- * @return {false}
+ * @return false
  */
 iutil.toolbarShowHide = function(element, event) {
 	var url, offset, id, target;
 
+	iutil.stopEvent(event);
+
 	url = element.href;
 	offset = url.indexOf('#');
 	if (offset !== -1) {
@@ -733,10 +789,10 @@
 		if (target) {
 			if (target.style.display === 'block') {
 				target.style.display = 'none';
-				element.className = '';
+				iutil.toggleClass(element, 'active', false);
 			} else {
 				target.style.display = 'block';
-				element.className = 'active';
+				iutil.toggleClass(element, 'active', true);
 
 				if (id.indexOf('toolbar_filter') !== -1) {
 					var i, l, f;
@@ -755,7 +811,7 @@
 		}
 	}
 
-	return iutil.stopEvent(event);
+	return false;
 };
 
 // }}}
@@ -766,16 +822,18 @@
  *
  * @param {Element} element
  * @param {Event} event
- * @return {false}
+ * @return false
  */
 iutil.toolbarRunHttpCommand = function(element, event) {
-	if (iutil.httpGetText(element.href) == '1') {
-		iutil.toggleClass(element, 'inactive');
-	} else {
-		window.alert('ƒRƒ}ƒ“ƒhŽÀs‚ÉŽ¸”s‚µ‚Ü‚µ‚½');
-	}
-
-	return iutil.stopEvent(event);
+	iutil.stopEvent(event);
+	iutil.httpGetAsync(element.href, function(req, uri) {
+		if (req.responseText == '1') {
+			iutil.toggleClass(element, 'inactive');
+		} else {
+			window.alert('ƒRƒ}ƒ“ƒhŽÀs‚ÉŽ¸”s‚µ‚Ü‚µ‚½');
+		}
+	});
+	return false;
 };
 
 // }}}
@@ -1363,6 +1421,7 @@
 		if (iutil.iphone) {
 			iutil.setLabelAction(document.body);
 			//iutil.setHashScrool(document.body);
+			iutil.setHoverable(document.body);
 		}
 
 		// accesskey‚ðƒoƒCƒ“ƒh‚·‚é

Modified: p2ex/trunk/js/limelight.js
===================================================================
--- p2ex/trunk/js/limelight.js	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/js/limelight.js	2010-08-16 15:07:08 UTC (rev 881)
@@ -745,7 +745,9 @@
  * @return {Boolean}
  */
 Limelight.ui.isPortrait = function() {
-	if (typeof window.orientation != 'number' || window.orientation % 180 == 0) {
+	if (typeof window.orientation != 'number') {
+		return null;
+	} else if (window.orientation % 180 == 0) {
 		return true;
 	} else {
 		return false;
@@ -2047,35 +2049,49 @@
 Limelight.prototype.onOrientationChange = function() {
 	var x, y, width, height, isPortrait, viewportSize, margins;
 
-	//isPortrait = Limelight.ui.isPortrait();
-	//viewportSize = Limelight.ui.getViewportSize(isPortrait);
-	//margins = Limelight.ui.getMargins(isPortrait);
-
 	x = 0;
 	y = window.scrollY;
-	if (document.all && !window.opera) {
-		if (document.compatMode === 'BackCompat') {
-			y = document.body.scrollTop;
+
+	if (navigator.userAgent.search(/\bi(Phone|Pod)\b/) !== -1) {
+		isPortrait = Limelight.ui.isPortrait();
+		viewportSize = Limelight.ui.getViewportSize(isPortrait);
+		margins = Limelight.ui.getMargins(isPortrait);
+		width = viewportSize[0] - margins[0];
+		height = viewportSize[1] - margins[1];
+	} else if (navigator.userAgent.search(/\biPad\b/) !== -1) {
+		if (Limelight.ui.isPortrait()) {
+			width = 768;
+			height = 1024;
 		} else {
-			y = document.documentElement.scrollTop;
+			width = 1024;
+			height = 768;
 		}
+		height -= (18 + 58);
 	} else {
-		if (typeof window.scrollX === 'number') {
-			y = window.scrollY;
+		if (document.all && !window.opera) {
+			if (document.compatMode === 'BackCompat') {
+				y = document.body.scrollTop;
+			} else {
+				y = document.documentElement.scrollTop;
+			}
 		} else {
-			y = window.pageYOffset;
+			if (typeof window.scrollX === 'number') {
+				y = window.scrollY;
+			} else {
+				y = window.pageYOffset;
+			}
 		}
+		if (typeof document.compatMode === 'undefined') {
+			width = document.innerWidth;
+			height = document.innerHeight;
+		} else if (document.compatMode === 'BackCompat') {
+			width = document.body.clientWidth;
+			height = document.body.clientHeight;
+		} else {
+			width = document.documentElement.clientWidth;
+			height = document.documentElement.clientHeight;
+		}
 	}
-	if (typeof document.compatMode === 'undefined') {
-		width = document.innerWidth;
-		height = document.innerHeight;
-	} else if (document.compatMode === 'BackCompat') {
-		width = document.body.clientWidth;
-		height = document.body.clientHeight;
-	} else {
-		width = document.documentElement.clientWidth;
-		height = document.documentElement.clientHeight;
-	}
 
 	this.boxX = x;
 	this.boxY = y;

Modified: p2ex/trunk/js/respopup_iphone.js
===================================================================
--- p2ex/trunk/js/respopup_iphone.js	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/js/respopup_iphone.js	2010-08-16 15:07:08 UTC (rev 881)
@@ -66,6 +66,76 @@
 };
 
 // }}}
+// {{{ ipoputil.callback()
+
+/**
+ * iPhone—pƒŒƒXƒ|ƒbƒvƒAƒbƒv‚̃R[ƒ‹ƒoƒbƒNƒƒ\ƒbƒh
+ *
+ * @param {XMLHttpRequest} req
+ * @param {String} url
+ * @param {String} popid
+ * @param {Number} yOffset
+ * @return void
+ * @todo use asynchronous request
+ */
+ipoputil.callback = function(req, url, popid, yOffset) {
+	var container = document.createElement('div');
+	var closer = document.createElement('img');
+
+	container.id = popid;
+	container.className = 'respop';
+	container.innerHTML = req.responseText;
+	/*
+	var rx = req.responseXML;
+	while (rx.hasChildNodes()) {
+		container.appendChild(document.importNode(rx.removeChild(rx.firstChild), true));
+	}
+	*/
+	container.style.top = yOffset.toString() + 'px';
+	container.style.zIndex = ipoputil.getZ();
+	//container.onclick = ipoputil.getActivator(container);
+
+	closer.className = 'close-button';
+	closer.setAttribute('src', 'img/iphone/close.png');
+	closer.onclick = ipoputil.getDeactivator(container, url);
+
+	container.appendChild(closer);
+	document.body.appendChild(container);
+
+	//iutil.modifyInternalLink(container);
+	iutil.modifyExternalLink(container);
+
+	_IRESPOPG.hash[url] = container;
+
+	var lastres = document.evaluate('./div[@class="res" and position() = last()]',
+									container,
+									null,
+									XPathResult.ANY_UNORDERED_NODE_TYPE,
+									null
+									).singleNodeValue;
+
+	if (lastres) {
+		var back = document.createElement('div');
+		back.className = 'respop-back';
+		var anchor = document.createElement('a');
+		anchor.setAttribute('href', '#' + popid);
+		anchor.onclick = function(evt){
+			iutil.stopEvent(evt || window.event);
+			scrollTo(0, yOffset - 10);
+			return false;
+		};
+		anchor.appendChild(document.createTextNode('£'));
+		back.appendChild(anchor);
+		lastres.appendChild(back);
+	}
+
+	var i;
+	for (i = 0; i < _IRESPOPG.callbacks.length; i++) {
+		_IRESPOPG.callbacks[i](container);
+	}
+};
+
+// }}}
 // {{{ ipoputil.popup()
 
 /**
@@ -73,8 +143,7 @@
  *
  * @param {String} url
  * @param {Event} evt
- * @return {Boolean}
- * @todo use asynchronous request
+ * @return void
  */
 ipoputil.popup = function(url, evt) {
 	var yOffset = Math.max(10, iutil.getPageY(evt) - 20);
@@ -90,70 +159,15 @@
 	var popnum = _IRESPOPG.serial;
 	var popid = '_respop' + popnum;
 	var req = new XMLHttpRequest();
-	req.open('GET', url + '&ajax=true&respop_id=' + popnum, false);
-	req.send(null);
-
-	if (req.readyState == 4) {
-		if (req.status == 200) {
-			var container = document.createElement('div');
-			var closer = document.createElement('img');
-
-			container.id = popid;
-			container.className = 'respop';
-			container.innerHTML = req.responseText;
-			/*
-			var rx = req.responseXML;
-			while (rx.hasChildNodes()) {
-				container.appendChild(document.importNode(rx.removeChild(rx.firstChild), true));
+	req.open('GET', url + '&ajax=true&respop_id=' + popnum, true);
+	req.onreadystatechange = function() {
+		if (this.readyState == 4) {
+			if (this.status == 200) {
+				ipoputil.callback(this, url, popid, yOffset);
 			}
-			*/
-			container.style.top = yOffset.toString() + 'px';
-			container.style.zIndex = ipoputil.getZ();
-			//container.onclick = ipoputil.getActivator(container);
-
-			closer.className = 'close-button';
-			closer.setAttribute('src', 'img/iphone/close.png');
-			closer.onclick = ipoputil.getDeactivator(container, url);
-
-			container.appendChild(closer);
-			document.body.appendChild(container);
-
-			//iutil.modifyInternalLink(container);
-			iutil.modifyExternalLink(container);
-
-			_IRESPOPG.hash[url] = container;
-
-			var lastres = document.evaluate('./div[@class="res" and position() = last()]',
-			                                container,
-			                                null,
-			                                XPathResult.ANY_UNORDERED_NODE_TYPE,
-			                                null
-			                                ).singleNodeValue;
-
-			if (lastres) {
-				var back = document.createElement('div');
-				back.className = 'respop-back';
-				var anchor = document.createElement('a');
-				anchor.setAttribute('href', '#' + popid);
-				anchor.onclick = function(evt){
-					iutil.stopEvent(evt || window.event);
-					scrollTo(0, yOffset - 10);
-					return false;
-				};
-				anchor.appendChild(document.createTextNode('£'));
-				back.appendChild(anchor);
-				lastres.appendChild(back);
-			}
-
-			for (var i = 0; i < _IRESPOPG.callbacks.length; i++) {
-				_IRESPOPG.callbacks[i](container);
-			}
-
-			return false;
 		}
-	}
-
-	return true;
+	};
+	req.send(null);
 };
 
 // }}}
@@ -164,20 +178,17 @@
  *
  * @param {String} url
  * @param {Event} evt
- * @return {Boolean}
- * @todo use asynchronous request
+ * @return false
  * @see iutil.popup
  */
 var iResPopUp = function(url, evt) {
+	evt = evt || window.event;
+	iutil.stopEvent(evt);
 	if (typeof url !== 'string' && typeof url.href === 'string') {
 		url = url.href;
 	}
-	evt = evt || window.event;
-	if (false === ipoputil.popup(url, evt)) {
-		iutil.stopEvent(evt);
-		return false;
-	}
-	return true;
+	ipoputil.popup(url, evt);
+	return false;
 };
 
 // }}}

Modified: p2ex/trunk/lib/read_footer_i.inc.php
===================================================================
--- p2ex/trunk/lib/read_footer_i.inc.php	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/lib/read_footer_i.inc.php	2010-08-16 15:07:08 UTC (rev 881)
@@ -3,6 +3,8 @@
  * rep2 - ƒXƒŒƒbƒh•\Ž¦ - ƒtƒbƒ^•”•ª - iPhone—p for read.php
  */
 
+require_once P2_LIB_DIR . '/read_jump_k.inc.php';
+
 // {{{ ‘”
 
 if ($do_filtering) {
@@ -16,8 +18,6 @@
 // }}}
 // {{{ ƒc[ƒ‹ƒo[‚ð•\Ž¦
 
-$newtime = time();
-
 echo '<div class="ntoolbar" id="footer">';
 echo '<table><tbody><tr>';
 
@@ -43,11 +43,11 @@
 
 // ƒy[ƒW”ԍ†‚𒼐ڎw’è
 echo '<td colspan="2">';
-if (!function_exists('get_read_jump')) {
-    include P2_LIB_DIR . '/read_jump_k.inc.php';
+echo get_read_jump($aThread, $rescount_st, true);
+if (empty($_conf['expack.iphone.toolbars.no_label'])) {
+    echo '<br>ƒWƒƒƒ“ƒv';
 }
-echo get_read_jump($aThread, $rescount_st, true);
-echo '<br>ƒWƒƒƒ“ƒv</td>';
+echo '</td>';
 
 // ã‚Ö
 echo '<td>';
@@ -73,7 +73,7 @@
 // ƒXƒŒî•ñ
 echo '<td>';
 $escaped_url = "info.php?{$host_bbs_key_q}{$ttitle_en_q}{$_conf['k_at_a']}";
-echo toolbar_i_opentab_button('img/gp5-info.png', 'ƒXƒŒî•ñ', $escaped_url);
+echo toolbar_i_opentab_button('img/gp5-info.png', 'î•ñ', $escaped_url);
 echo '</td>';
 
 // ƒgƒbƒv‚É–ß‚é
@@ -91,12 +91,12 @@
 if (!$aThread->diedat) {
     if (empty($_conf['disable_res'])) {
         $escaped_url = "post_form.php?{$host_bbs_key_q}&amp;rescount={$aThread->rescount}{$ttitle_en_q}{$_conf['k_at_a']}";
-        echo toolbar_i_standard_button('img/glyphish/icons2/08-chat.png', 'ƒŒƒX', $escaped_url);
+        echo toolbar_i_standard_button('img/glyphish/icons2/08-chat.png', '‘ž', $escaped_url);
     } else {
         echo toolbar_i_opentab_button('img/glyphish/icons2/08-chat.png', 'Œ³ƒXƒŒ', $motothre_url);
     }
 } else {
-    echo toolbar_i_disabled_button('img/glyphish/icons2/08-chat.png', 'ƒŒƒX');
+    echo toolbar_i_disabled_button('img/glyphish/icons2/08-chat.png', '‘ž');
 }
 echo '</td>';
 

Modified: p2ex/trunk/lib/read_header_i.inc.php
===================================================================
--- p2ex/trunk/lib/read_header_i.inc.php	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/lib/read_header_i.inc.php	2010-08-16 15:07:08 UTC (rev 881)
@@ -127,7 +127,7 @@
 </head>
 <body class="nopad">
 <div class="ntoolbar" id="header">
-<h1 class="ptitle">{$aThread->ttitle_hd}</h1>
+<h1 class="ptitle hoverable">{$aThread->ttitle_hd}</h1>
 EOP;
 
 // {{{ ŠeŽíƒ{ƒ^ƒ“—Þ
@@ -142,7 +142,7 @@
 
 // ƒŒƒXŒŸõ
 echo '<td>';
-echo toolbar_i_showhide_button('img/glyphish/icons2/06-magnifying-glass.png', 'ƒŒƒXŒŸõ', 'read_toolbar_filter');
+echo toolbar_i_showhide_button('img/glyphish/icons2/06-magnifying-glass.png', 'ŒŸõ', 'read_toolbar_filter');
 echo '</td>';
 
 // ‚¨‹C‚ɃXƒŒ
@@ -170,11 +170,12 @@
 // {{{ ‚»‚Ì‘¼‚̃c[ƒ‹
 
 echo '<div id="read_toolbar_extra" class="extra">';
+echo '<table><tbody>';
 
 // {{{ ‚»‚Ì‘¼ - ‚¨‹C‚É“ü‚èƒZƒbƒg
 
 if ($thread_info && $_conf['expack.misc.multi_favs']) {
-    echo '<table><tbody><tr>';
+    echo '<tr>';
     for ($i = 1; $i <= $_conf['expack.misc.favset_num']; $i++) {
         echo '<td>';
         echo toolbar_i_fav_button('img/glyphish/icons2/28-star.png', '-', $thread_info, $i);
@@ -190,18 +191,18 @@
             echo '<td>&nbsp;</td>';
         }
     }
-    echo '</tr></tbody></table>';
+    echo '</tr>';
 }
 
 // }}}
 // {{{ ‚»‚Ì‘¼ - ƒ{ƒ^ƒ“—Þ
 
-echo '<table><tbody><tr>';
+echo '<tr>';
 
 // >>1
 echo '<td>';
 $escaped_url = "{$_conf['read_php']}?{$host_bbs_key_q}&amp;ls=1-{$rnum_range}{$offline_q}{$_conf['k_at_a']}";
-echo toolbar_i_standard_button('img/glyphish/icons2/63-runner.png', '&gt;&gt;1-', $escaped_url);
+echo toolbar_i_standard_button('img/glyphish/icons2/63-runner.png', '&gt;&gt;1', $escaped_url);
 echo '</td>';
 
 // —ÞŽ—ƒXƒŒŒŸõ
@@ -214,7 +215,6 @@
 echo toolbar_i_standard_button('img/glyphish/icons2/06-magnifying-glass.png', '—ÞŽ—ƒXƒŒ', $escaped_url);
 echo '</td>';
 
-
 // “a“°“ü‚è
 echo '<td>';
 echo toolbar_i_palace_button('img/glyphish/icons2/108-badge.png', '“a“°“ü‚è', $thread_info);
@@ -235,9 +235,12 @@
 }
 echo '</td>';
 
-echo '</tr></tbody></table>';
+echo '</tr>';
 
 // }}}
+
+echo '</tbody></table>';
+
 // {{{ ‚»‚Ì‘¼ - SPMƒtƒH[ƒ€
 
 echo kspform($aThread);

Modified: p2ex/trunk/lib/read_jump_k.inc.php
===================================================================
--- p2ex/trunk/lib/read_jump_k.inc.php	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/lib/read_jump_k.inc.php	2010-08-16 15:07:08 UTC (rev 881)
@@ -21,7 +21,7 @@
     }
 
     if ($use_onchange) {
-        return "{$jump}<span class=\"large\">/{$label}</span>";
+        return $jump;
     } else {
         return "<form method=\"get\" action=\"{$_conf['read_php']}\" accept-charset=\"{$_conf['accept_charset']}\">{$label}{$jump}</form>";
     }

Modified: p2ex/trunk/lib/sb_footer_i.inc.php
===================================================================
--- p2ex/trunk/lib/sb_footer_i.inc.php	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/lib/sb_footer_i.inc.php	2010-08-16 15:07:08 UTC (rev 881)
@@ -171,7 +171,12 @@
 echo '</td>';
 
 // ƒy[ƒW”ԍ†‚𒼐ڎw’è
-echo "<td colspan=\"2\">{$k_sb_navi_ht}<span class=\"large\">/{$sb_all_pages}</span><br>ƒy[ƒW</td>";
+echo '<td colspan="2">';
+echo "{$k_sb_navi_ht}<span class=\"large\">/{$sb_all_pages}</span>";
+if (empty($_conf['expack.iphone.toolbars.no_label'])) {
+    echo '<br>ƒy[ƒW';
+}
+echo '</td>';
 
 // ã‚Ö
 echo '<td>';
@@ -224,9 +229,9 @@
 echo '<td>';
 if (!$aThreadList->spmode) {
     $escaped_url = "post_form.php?{$host_bbs_q}&amp;newthread=1{$_conf['k_at_a']}";
-    echo toolbar_i_standard_button('img/glyphish/icons2/23-bird.png', 'ƒXƒŒ—§‚Ä', $escaped_url);
+    echo toolbar_i_standard_button('img/glyphish/icons2/08-chat.png', 'ƒXƒŒ—§‚Ä', $escaped_url);
 } else {
-    echo toolbar_i_disabled_button('img/glyphish/icons2/23-bird.png', 'ƒXƒŒ—§‚Ä');
+    echo toolbar_i_disabled_button('img/glyphish/icons2/08-chat.png', 'ƒXƒŒ—§‚Ä');
 }
 echo '</td>';
 

Modified: p2ex/trunk/lib/sb_footer_k.inc.php
===================================================================
--- p2ex/trunk/lib/sb_footer_k.inc.php	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/lib/sb_footer_k.inc.php	2010-08-16 15:07:08 UTC (rev 881)
@@ -139,6 +139,18 @@
             $k_sb_navi_select_from_ht .= '</optgroup>';
         }*/
     }
+
+    $k_sb_navi_ht = <<<EOP
+<div>{$sb_range_on}/{$sb_disp_all_num} {$mae_ht} {$tugi_ht}</div>
+<form method="get" action="{$_conf['subject_php']}">
+<input type="hidden" name="host" value="{$aThreadList->host}">
+<input type="hidden" name="bbs" value="{$aThreadList->bbs}">
+<input type="hidden" name="spmode" value="{$aThreadList->spmode}">
+<input type="hidden" name="norefresh" value="1">
+<select name="from">{$k_sb_navi_select_from_ht}</select><input type="submit" value="GO">
+{$sb_view_input_ht}{$word_input_ht}{$_conf['k_input_ht']}
+</form>
+EOP;
 } else {
     $k_sb_navi_ht = '';
 }

Modified: p2ex/trunk/lib/sb_header_i.inc.php
===================================================================
--- p2ex/trunk/lib/sb_header_i.inc.php	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/lib/sb_header_i.inc.php	2010-08-16 15:07:08 UTC (rev 881)
@@ -103,7 +103,7 @@
 </head>
 <body class="nopad">
 <div class="ntoolbar" id="header">
-<h1 class="ptitle">{$ptitle_ht}</h1>
+<h1 class="ptitle hoverable">{$ptitle_ht}</h1>
 EOP;
 
 // {{{ ŠeŽíƒ{ƒ^ƒ“—Þ
@@ -135,9 +135,9 @@
 // ƒXƒŒŒŸõ
 echo '<td>';
 if (!$spmode_without_palace_or_favita) {
-    echo toolbar_i_showhide_button('img/glyphish/icons2/06-magnifying-glass.png', 'ƒXƒŒŒŸõ', 'sb_toolbar_filter');
+    echo toolbar_i_showhide_button('img/glyphish/icons2/06-magnifying-glass.png', 'ŒŸõ', 'sb_toolbar_filter');
 } else {
-    echo toolbar_i_disabled_button('img/glyphish/icons2/06-magnifying-glass.png', 'ƒXƒŒŒŸõ');
+    echo toolbar_i_disabled_button('img/glyphish/icons2/06-magnifying-glass.png', 'ŒŸõ');
 }
 echo '</td>';
 

Modified: p2ex/trunk/lib/sb_print_k.inc.php
===================================================================
--- p2ex/trunk/lib/sb_print_k.inc.php	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/lib/sb_print_k.inc.php	2010-08-16 15:07:08 UTC (rev 881)
@@ -17,10 +17,18 @@
     //=================================================
 
     if (!$aThreadList->threads) {
-        if ($aThreadList->spmode == 'fav' && $sb_view == 'shinchaku') {
-            echo '<p class="empty-subject">‚¨‹C‚ɽڂɐV’…‚È‚©‚Á‚½‚Û</p>';
+        if ($_conf['iphone']) {
+            if ($aThreadList->spmode == 'fav' && $sb_view == 'shinchaku') {
+                echo '<p class="empty">‚¨‹C‚ɃXƒŒ‚ɐV’…‚È‚©‚Á‚½‚Û</p>';
+            } else {
+                echo '<p class="empty">ŠY“–ƒTƒuƒWƒFƒNƒg‚Í‚È‚©‚Á‚½‚Û</p>';
+            }
         } else {
-            echo '<p class="empty-subject">ŠY“–»ÌÞ¼Þª¸Ä‚Í‚È‚©‚Á‚½‚Û</p>';
+            if ($aThreadList->spmode == 'fav' && $sb_view == 'shinchaku') {
+                echo '<p>‚¨‹C‚ɽڂɐV’…‚È‚©‚Á‚½‚Û</p>';
+            } else {
+                echo '<p>ŠY“–»ÌÞ¼Þª¸Ä‚Í‚È‚©‚Á‚½‚Û</p>';
+            }
         }
         return;
     }

Modified: p2ex/trunk/lib/toolbar_i.inc.php
===================================================================
--- p2ex/trunk/lib/toolbar_i.inc.php	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/lib/toolbar_i.inc.php	2010-08-16 15:07:08 UTC (rev 881)
@@ -16,11 +16,26 @@
  */
 function _toolbar_i_button($icon, $label, $uri, $attrs = '')
 {
-    if ($attrs !== '' && strncmp($attrs, ' ', 1) === 0) {
+    global $_conf;
+
+    if (strncmp($attrs, ' ', 1) === 0) {
         $attrs = ' ' . $attrs;
     }
+
+    if (strpos($attrs, 'class="') === false) {
+        $attrs .= ' class="hoverable"';
+    } else {
+        $attrs = str_replace('class="', 'class="hoverable ', $attrs);
+    }
+
+    if (empty($_conf['expack.iphone.toolbars.no_label'])) {
+        $label = '<br>' . $label;
+    } else {
+        $label = '';
+    }
+
     return <<<EOS
-<a href="{$uri}" ontouchstart="iutil.toggleClass(this, 'hover', true);" ontouchend="iutil.toggleClass(this, 'hover', false);" ontouchcancel="iutil.toggleClass(this, 'hover', false);"{$attrs}><img src="{$icon}" width="48" height="32" alt=""><br>{$label}</a>
+<a href="{$uri}"{$attrs}><img src="{$icon}" width="48" height="32" alt="">{$label}</a>
 EOS;
 }
 
@@ -87,8 +102,16 @@
  */
 function toolbar_i_disabled_button($icon, $label)
 {
+    global $_conf;
+
+    if (empty($_conf['expack.iphone.toolbars.no_label'])) {
+        $label = '<br>' . $label;
+    } else {
+        $label = '';
+    }
+
     return <<<EOS
-<span class="unavailable"><img src="{$icon}" width="48" height="32" alt=""><br>{$label}</span>
+<span class="unavailable"><img src="{$icon}" width="48" height="32" alt="">{$label}</span>
 EOS;
 }
 

Modified: p2ex/trunk/read_new.php
===================================================================
--- p2ex/trunk/read_new.php	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/read_new.php	2010-08-16 15:07:08 UTC (rev 881)
@@ -614,7 +614,6 @@
 $newthre_num++;
 
 if (!$aThreadList->num) {
-    $GLOBALS['matome_naipo'] = TRUE;
     echo "V’…ƒŒƒX‚Í‚È‚¢‚Û";
     echo "<hr>";
 }

Modified: p2ex/trunk/read_new_k.php
===================================================================
--- p2ex/trunk/read_new_k.php	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/read_new_k.php	2010-08-16 15:07:08 UTC (rev 881)
@@ -8,13 +8,17 @@
 
 $_login->authorize(); // ƒ†[ƒU”FØ
 
+if ($_conf['iphone']) {
+    include P2_LIB_DIR . '/toolbar_i.inc.php';
+}
+
 //==================================================================
 // •Ï”
 //==================================================================
 $GLOBALS['rnum_all_range'] = $_conf['mobile.rnum_range'];
 
-$sb_view = "shinchaku";
-$newtime = date("gis");
+$sb_view = 'shinchaku';
+$newtime = date('gis');
 
 $newthre_num = 0;
 $online_num = 0;
@@ -22,22 +26,31 @@
 //=================================================
 // ”‚̎w’è
 //=================================================
-if (isset($_GET['host'])) { $host = $_GET['host']; }
-if (isset($_POST['host'])) { $host = $_POST['host']; }
-if (isset($_GET['bbs'])) { $bbs = $_GET['bbs']; }
-if (isset($_POST['bbs'])) { $bbs = $_POST['bbs']; }
-if (isset($_GET['spmode'])) { $spmode = $_GET['spmode']; }
-if (isset($_POST['spmode'])) { $spmode = $_POST['spmode']; }
+if (isset($_GET['host'])) {
+    $host = $_GET['host'];
+} elseif (isset($_POST['host'])) {
+    $host = $_POST['host'];
+}
+if (isset($_GET['bbs'])) {
+    $bbs = $_GET['bbs'];
+} elseif (isset($_POST['bbs'])) {
+    $bbs = $_POST['bbs'];
+}
+if (isset($_GET['spmode'])) {
+    $spmode = $_GET['spmode'];
+} elseif (isset($_POST['spmode'])) {
+    $spmode = $_POST['spmode'];
+}
 
-if ((!isset($host) || !isset($bbs)) && !isset($spmode)) {
+if (!(isset($host) && isset($bbs)) && !isset($spmode)) {
     p2die('•K—v‚Ȉø”‚ªŽw’肳‚ê‚Ä‚¢‚Ü‚¹‚ñ');
 }
 
 // –¢“ǐ”§ŒÀ
-if (isset($_POST['unum_limit'])) {
+if (isset($_GET['unum_limit'])) {
+    $unum_limit = (int)$_GET['unum_limit'];
+} elseif (isset($_POST['unum_limit'])) {
     $unum_limit = (int)$_POST['unum_limit'];
-} elseif (isset($_GET['unum_limit'])) {
-    $unum_limit = (int)$_GET['unum_limit'];
 } else {
     $unum_limit = 0;
 }
@@ -100,20 +113,16 @@
 
 // &amp;sb_view={$sb_view}
 if ($aThreadList->spmode) {
-    $sb_ht = <<<EOP
-<a href="{$_conf['subject_php']}?host={$aThreadList->host}&amp;bbs={$aThreadList->bbs}&amp;spmode={$aThreadList->spmode}{$_conf['k_at_a']}">{$ptitle_hd}</a>
-EOP;
-    $sb_ht_btm = <<<EOP
-<a href="{$_conf['subject_php']}?host={$aThreadList->host}&amp;bbs={$aThreadList->bbs}&amp;spmode={$aThreadList->spmode}{$_conf['k_at_a']}"{$_conf['k_accesskey_at']['up']}>{$_conf['k_accesskey_st']['up']}{$ptitle_hd}</a>
-EOP;
+    $ita_url = "{$_conf['subject_php']}?host={$aThreadList->host}&amp;bbs={$aThreadList->bbs}&amp;spmode={$aThreadList->spmode}{$_conf['k_at_a']}";
 } else {
-    $sb_ht = <<<EOP
-<a href="{$_conf['subject_php']}?host={$aThreadList->host}&amp;bbs={$aThreadList->bbs}{$_conf['k_at_a']}">{$ptitle_hd}</a>
+    $ita_url = "{$_conf['subject_php']}?host={$aThreadList->host}&amp;bbs={$aThreadList->bbs}{$_conf['k_at_a']}";
+}
+$sb_ht = <<<EOP
+<a href="{$ita_url}">{$ptitle_hd}</a>
 EOP;
-    $sb_ht_btm = <<<EOP
-<a href="{$_conf['subject_php']}?host={$aThreadList->host}&amp;bbs={$aThreadList->bbs}{$_conf['k_at_a']}"{$_conf['k_accesskey_at']['up']}>{$_conf['k_accesskey_st']['up']}{$ptitle_hd}</a>
+$sb_ht_btm = <<<EOP
+<a href="{$ita_url}"{$_conf['k_accesskey_at']['up']}>{$_conf['k_accesskey_st']['up']}{$ptitle_hd}</a>
 EOP;
-}
 
 // iPhone
 if ($_conf['iphone']) {
@@ -166,18 +175,48 @@
 <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
 <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
 {$_conf['extra_headers_ht']}
-<title>{$ptitle_ht}</title>\n
+<title>{$ptitle_ht}</title>
+</head>
 EOHEADER;
 
-echo "</head><body{$_conf['k_colors']}>";
+if ($_conf['iphone']) {
+    echo <<<EOP
+<body class="nopad">
+<div class="ntoolbar" id="header">
+<h1 class="ptitle hoverable">{$sb_ht} <span class="thin">(V‚Ü‚Æ‚ß)</span></h1>
+<table><tbody><tr>
+EOP;
 
-echo <<<EOP
+    // ”‚ɖ߂é
+    echo '<td colspan="2">';
+    echo toolbar_i_standard_button('img/glyphish/icons2/104-index-cards.png', $ptitle_hd, $ita_url);
+    echo '</td>';
+
+    // —\”õx2
+    echo '<td>&nbsp;</td><td>&nbsp;</td>';
+
+    // ‰º‚Ö
+    echo '<td>';
+    echo toolbar_i_standard_button('img/gp2-down.png', '‰º', '#footer');
+    echo '</td>';
+
+    echo '</tr></tbody></table>';
+
+    $info_ht = P2Util::getInfoHtml();
+    if (strlen($info_ht)) {
+        echo "<div class=\"info\">{$info_ht}</div>";
+    }
+
+    echo '</div>';
+} else{
+    echo <<<EOP
+<body{$_conf['k_colors']}>
 <div id="read_new_header">{$sb_ht}‚̐V‚Ü‚Æ‚ß
 <a class="button" id="above" name="above" href="#bottom"{$_conf['k_accesskey_at']['bottom']}>{$_conf['k_accesskey_st']['bottom']}¥</a></div>\n
 EOP;
+    P2Util::printInfoHtml();
+}
 
-P2Util::printInfoHtml();
-
 //==============================================================
 // ‚»‚ꂼ‚ê‚̍s‰ðÍ
 //==============================================================
@@ -332,8 +371,11 @@
 function readNew($aThread)
 {
     global $_conf, $newthre_num, $STYLE;
-    global $spmode, $word;
+    global $spmode, $word, $newtime;
 
+    $orig_no_label = !empty($_conf['expack.iphone.toolbars.no_label']);
+    $_conf['expack.iphone.toolbars.no_label'] = true;
+
     $newthre_num++;
 
     //==========================================================
@@ -399,31 +441,36 @@
     $host_bbs_key_q = 'host=' . $aThread->host . $bbs_q . $key_q;
     $popup_q = '&amp;popup=1';
 
-    // require_once P2_LIB_DIR . '/read_header.inc.php';
-
-    $prev_thre_num = $newthre_num - 1;
-    $next_thre_num = $newthre_num + 1;
-    if ($prev_thre_num != 0) {
-        $prev_thre_ht = "<a class=\"button\" href=\"#ntt{$prev_thre_num}\">£</a>";
-    }
-    //$next_thre_ht = "<a href=\"#ntt{$next_thre_num}\">¥</a> ";
-    $next_thre_ht = "<a class=\"button\" href=\"#ntt_bt{$newthre_num}\">¥</a> ";
-
     $itaj_hd = htmlspecialchars($aThread->itaj, ENT_QUOTES, 'Shift_JIS');
-
     if ($spmode) {
-        $read_header_itaj_ht = " ({$itaj_hd})";
+        $read_header_itaj_ht = "({$itaj_hd})";
     } else {
         $read_header_itaj_ht = '';
     }
 
-    P2Util::printInfoHtml();
+    if ($_conf['iphone']) {
+        if ($read_header_itaj_ht !== '') {
+            $read_header_itaj_ht = "<span class=\"btitle\">{$read_header_itaj_ht}</span>";
+        }
 
-    $read_header_ht = <<<EOP
-<hr><div id="ntt{$newthre_num}" name="ntt{$newthre_num}"><font color="{$STYLE['mobile_read_ttitle_color']}"><b>{$aThread->ttitle_hd}</b></font>{$read_header_itaj_ht} {$next_thre_ht}</div>
+        $read_header_ht = <<<EOP
+<div class="ntoolbar mtoolbar mtoolbar_top" id="ntt{$newthre_num}">
+<h2 class="ttitle">{$aThread->ttitle_hd} {$read_header_itaj_ht}</h2>
 EOP;
-    if (!$_conf['iphone']) {
-        $read_header_ht .= '<hr>';
+        $read_header_ht .= '<div class="mover">';
+        $read_header_ht .= toolbar_i_standard_button('img/gp2-down.png', '', "#ntt_bt{$newthre_num}");
+        $read_header_ht .= '</div>';
+
+        $info_ht = P2Util::getInfoHtml();
+        if (strlen($info_ht)) {
+            $read_header_ht .= "<div class=\"info\">{$info_ht}</div>";
+        }
+        $read_header_ht .= '</div>';
+    } else {
+        P2Util::printInfoHtml();
+        $read_header_ht = <<<EOP
+<hr><div id="ntt{$newthre_num}" name="ntt{$newthre_num}"><font color="{$STYLE['mobile_read_ttitle_color']}"><b>{$aThread->ttitle_hd}</b></font> {$read_header_itaj_ht} <a href="#ntt_bt{$newthre_num}">¥</a></div><hr>
+EOP;
     }
 
     //==================================================================
@@ -447,15 +494,7 @@
     //==================================================================
     // ƒtƒbƒ^ •\Ž¦
     //==================================================================
-    // $read_footer_navi_new  ‘±‚«‚ð“Ç‚Þ V’…ƒŒƒX‚Ì•\Ž¦
-    $newtime = date('gis');  // ƒŠƒ“ƒN‚ðƒNƒŠƒbƒN‚µ‚Ä‚àÄ“Ǎž‚µ‚È‚¢Žd—l‚ɑ΍R‚·‚éƒ_ƒ~[ƒNƒGƒŠ[
 
-    $info_st = 'î';
-    $delete_st = 'í';
-    $prev_st = '‘O';
-    $next_st = 'ŽŸ';
-    //$dores_st = '攴';
-
     // •\Ž¦”͈Í
     if ($aThread->resrange['start'] == $aThread->resrange['to']) {
         $read_range_on = $aThread->resrange['start'];
@@ -464,48 +503,54 @@
     }
     $read_range_ht = "{$read_range_on}/{$aThread->rescount}";
 
-    $read_footer_navi_new = "<a href=\"{$_conf['read_php']}?{$host_bbs_key_q}&amp;ls={$aThread->rescount}-&amp;nt={$newtime}{$_conf['k_at_a']}#r{$aThread->rescount}\" target=\"_blank\">V’…Ú½‚Ì•\Ž¦</a>";
-
-    /*
-    if (!empty($_conf['disable_res'])) {
-        $dores_ht = <<<EOP
-<a href="{$motothre_url}" target="_blank">{$dores_st}</a>
-EOP;
-    } else {
-        $dores_ht = <<<EOP
-<a href="post_form.php?{$host_bbs_key_q}&amp;rescount={$aThread->rescount}{$ttitle_en_q}{$_conf['k_at_a']}">{$dores_st}</a>
-EOP;
-    }
-    */
-
     // ƒc[ƒ‹ƒo[•”•ªHTML =======
     if ($spmode) {
-        $toolbar_itaj_ht = <<<EOP
- (<a href="{$_conf['subject_php']}?{$host_bbs_key_q}{$_conf['k_at_a']}">{$itaj_hd}</a>)
-EOP;
+        $toolbar_itaj_ht = "(<a href=\"{$_conf['subject_php']}?{$host_bbs_key_q}{$_conf['k_at_a']}\">{$itaj_hd}</a>)";
     } else {
         $toolbar_itaj_ht = '';
     }
 
-    /*
-    $toolbar_right_ht .= <<<EOTOOLBAR
-<a href="info.php?{$host_bbs_key_q}{$ttitle_en_q}{$_conf['k_at_a']}">{$info_st}</a>
-<a href="info.php?{$host_bbs_key_q}{$ttitle_en_q}&amp;dele=true{$_conf['k_at_a']}">{$delete_st}</a>
-<a href="{$motothre_url}" target="_blank">Œ³½Ú</a>\n
-EOTOOLBAR;
-    */
+    if ($_conf['iphone']) {
+        if ($toolbar_itaj_ht !== '') {
+            $toolbar_itaj_ht = "<span class=\"btitle\">{$toolbar_itaj_ht}</span>";
+        }
 
-    $read_footer_ht = <<<EOP
+        $read_footer_ht = <<<EOP
+<div class="ntoolbar mtoolbar mtoolbar_bottom" id="ntt_bt{$newthre_num}">
+<table><tbody><tr>
+EOP;
+        // ƒc[ƒ‹
+        $read_footer_ht .= '<td>';
+        $escaped_url = "spm_k.php?{$host_bbs_key_q}&amp;ls={$aThread->ls}&amp;spm_default={$aThread->resrange['to']}&amp;from_read_new=1{$_conf['k_at_a']}";
+        $read_footer_ht .= toolbar_i_opentab_button('img/glyphish/icons2/20-gear2.png', '', $escaped_url);
+        $read_footer_ht .= '</td>';
+        // •\Ž¦”͈Í
+        $read_footer_ht .= "<td colspan=\"3\"><span class=\"large\">{$read_range_ht}</span></td>";
+        // î•ñ
+        $read_footer_ht .= '<td>';
+        $escaped_url = "info.php?{$host_bbs_key_q}{$ttitle_en_q}{$_conf['k_at_a']}";
+        $read_footer_ht .= toolbar_i_opentab_button('img/gp5-info.png', '', $escaped_url);
+        $read_footer_ht .= '</td>';
+        // ƒ^ƒCƒgƒ‹“™
+        $read_footer_ht .= <<<EOP
+</tr></tbody></table>
+<div class="ttitle"><a href="{$_conf['read_php']}?{$host_bbs_key_q}&amp;offline=1&amp;rescount={$aThread->rescount}{$_conf['k_at_a']}#r{$aThread->rescount}" target="_blank">{$aThread->ttitle_hd}</a> {$toolbar_itaj_ht}</div>
+<div class="mover">
+EOP;
+        $read_footer_ht .= toolbar_i_standard_button('img/gp1-up.png', '', "#ntt{$newthre_num}");
+        $read_footer_ht .= '</div></div>';
+    } else {
+        $read_footer_ht = <<<EOP
 <div id="ntt_bt{$newthre_num}" name="ntt_bt{$newthre_num}" class="read_new_toolbar">
 {$read_range_ht}
-<a class="button" href="info.php?{$host_bbs_key_q}{$ttitle_en_q}{$_conf['k_at_a']}">{$info_st}</a>
-<a class="button" href="spm_k.php?{$host_bbs_key_q}&amp;ls={$aThread->ls}&amp;spm_default={$aThread->resrange['to']}&amp;from_read_new=1{$_conf['k_at_a']}">“Á</a>
+<a href="info.php?{$host_bbs_key_q}{$ttitle_en_q}{$_conf['k_at_a']}">î</a>
+<a href="spm_k.php?{$host_bbs_key_q}&amp;ls={$aThread->ls}&amp;spm_default={$aThread->resrange['to']}&amp;from_read_new=1{$_conf['k_at_a']}">“Á</a>
 <br>
-<a href="{$_conf['read_php']}?{$host_bbs_key_q}&amp;offline=1&amp;rescount={$aThread->rescount}{$_conf['k_at_a']}#r{$aThread->rescount}">{$aThread->ttitle_hd}</a>{$toolbar_itaj_ht}
-<a class="button" href="#ntt{$newthre_num}">£</a>
+<a href="{$_conf['read_php']}?{$host_bbs_key_q}&amp;offline=1&amp;rescount={$aThread->rescount}{$_conf['k_at_a']}#r{$aThread->rescount}">{$aThread->ttitle_hd}</a> {$toolbar_itaj_ht} <a href="#ntt{$newthre_num}">£</a>
 </div>
 <hr>\n
 EOP;
+    }
 
     // “§–¾‚ ‚ځ[‚ñ‚â•\Ž¦”§ŒÀ‚ŐV‚µ‚¢ƒŒƒX•\Ž¦‚ª‚È‚¢ê‡‚̓XƒLƒbƒv
     if ($GLOBALS['newres_to_show_flag']) {
@@ -524,12 +569,12 @@
         $newline = $aThread->readnum + 1; // $newline‚Í”pŽ~—\’肾‚ªA‹ŒŒÝŠ·—p‚É”O‚Ì‚½‚ß
 
         $sar = array($aThread->ttitle, $aThread->key, $data[2], $aThread->rescount, $aThread->modified,
-                    $aThread->readnum, $data[6], $data[7], $data[8], $newline,
-                    $data[10], $data[11], $aThread->datochiok);
+                     $aThread->readnum, $data[6], $data[7], $data[8], $newline,
+                     $data[10], $data[11], $aThread->datochiok);
         P2Util::recKeyIdx($aThread->keyidx, $sar); // key.idx‚É‹L˜^
     }
 
-    unset($aThread);
+    $_conf['expack.iphone.toolbars.no_label'] = $orig_no_label;
 }
 
 //==================================================================
@@ -537,12 +582,6 @@
 //==================================================================
 $newthre_num++;
 
-if (!$aThreadList->num) {
-    $GLOBALS['matome_naipo'] = TRUE;
-    echo "V’…Ú½‚Í‚È‚¢‚Û";
-    echo "<hr>";
-}
-
 if ($unum_limit > 0) {
     $unum_limit_at_a = "&amp;unum_limit={$unum_limit}";
 } else {
@@ -555,23 +594,79 @@
     $shinchaku_matome_url .= $_conf['m_favita_set_at_a'];
 }
 
+
 if (!isset($GLOBALS['rnum_all_range']) or $GLOBALS['rnum_all_range'] > 0 or !empty($GLOBALS['limit_to_eq_to'])) {
     if (!empty($GLOBALS['limit_to_eq_to'])) {
-        $str = 'V’…‚܂Ƃ߂̍XV/‘±‚«';
+        $has_next = -1;
     } else {
-        $str = 'V‚Ü‚Æ‚ß‚ðXV';
+        $has_next = 0;
     }
 } else {
-    $str = 'V‚Ü‚Æ‚ß‚Ì‘±‚«';
+    $has_next = 1;
     $shinchaku_matome_url .= '&amp;norefresh=1';
 }
 
-echo <<<EOP
+// {{{ ƒy[ƒWƒtƒbƒ^Eƒc[ƒ‹ƒo[
+
+if ($_conf['iphone']) {
+    if (!$aThreadList->num) {
+        echo '<p class="empty">V’…ƒŒƒX‚Í‚È‚¢‚Û</p>';
+    }
+
+    echo '<div class="ntoolbar" id="footer"><table><tbody><tr>';
+
+    // ƒgƒbƒv‚É–ß‚é
+    echo '<td>';
+    echo toolbar_i_standard_button('img/glyphish/icons2/53-house.png', 'TOP', "index.php{$_conf['k_at_q']}");
+    echo '</td>';
+
+    // ”‚ɖ߂é
+    echo '<td colspan="2">';
+    echo toolbar_i_standard_button('img/glyphish/icons2/104-index-cards.png', $ptitle_hd, $ita_url);
+    echo '</td>';
+
+    // XV/‘±‚«
+    echo '<td>';
+    if ($has_next === 1) {
+        $icon = 'img/gp4-next.png';
+        $label = '‘±‚«';
+    } elseif ($has_next === 0) {
+        $icon = 'img/glyphish/icons2/01-refresh.png';
+        $label = 'XV';
+    } else {
+        $icon = 'img/glyphish/icons2/01-refresh.png';
+        $label = 'XV/‘±‚«';
+    }
+    echo toolbar_i_standard_button($icon, $label, $shinchaku_matome_url);
+    echo '</td>';
+
+    // ã‚Ö
+    echo '<td>';
+    echo toolbar_i_standard_button('img/gp1-up.png', 'ã', '#header');
+    echo '</td>';
+
+    echo '</tr></tbody></table></div>';
+} else {
+    if (!$aThreadList->num) {
+        echo 'V’…Ú½‚Í‚È‚¢‚Û<hr>';
+    }
+
+    if ($has_next === 1) {
+        $str = 'V’…‚Ü‚Æ‚ß‚Ì‘±‚«';
+    } elseif ($has_next === 0) {
+        $str = 'V‚Ü‚Æ‚ß‚ðXV';
+    } else {
+        $str = 'V‚܂Ƃ߂̍XV/‘±‚«';
+    }
+    echo <<<EOP
 <div id="read_new_footer">{$sb_ht_btm}‚Ì<a href="{$shinchaku_matome_url}"{$_conf['k_accesskey_at']['next']}>{$_conf['k_accesskey_st']['next']}{$str}</a>
-<a class="button" id="bottom" name="bottom" href="#above"{$_conf['k_accesskey_at']['above']}>{$_conf['k_accesskey_st']['above']}£</a></div>\n
+<a class="button" id="bottom" name="bottom" href="#above"{$_conf['k_accesskey_at']['above']}>{$_conf['k_accesskey_st']['above']}£</a></div>
+<hr>
+<div class="center">{$_conf['k_to_index_ht']}</div>
 EOP;
+}
 
-echo "<hr><div class=\"center\">{$_conf['k_to_index_ht']}</div>";
+// }}}
 
 // iPhone
 if ($_conf['iphone']) {

Modified: p2ex/trunk/subject.php
===================================================================
--- p2ex/trunk/subject.php	2010-08-15 16:48:11 UTC (rev 880)
+++ p2ex/trunk/subject.php	2010-08-16 15:07:08 UTC (rev 881)
@@ -799,13 +799,9 @@
 
     // }}}
 
-    if (!function_exists('sb_print_k')) {
-        include  P2_LIB_DIR . '/sb_print_k.inc.php';
-    }
+    include  P2_LIB_DIR . '/sb_print_k.inc.php';
     if ($_conf['iphone']) {
-        if (!function_exists('toolbar_i_standard_button')) {
-            include P2_LIB_DIR . '/toolbar_i.inc.php';
-        }
+        include P2_LIB_DIR . '/toolbar_i.inc.php';
         include P2_LIB_DIR . '/sb_header_i.inc.php';
         sb_print_k($aThreadList);
         include P2_LIB_DIR . '/sb_footer_i.inc.php';



P2-php-svn メーリングリストの案内
Back to archive index