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

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 8月 12日 (木) 16:53:15 JST


Revision: 873
          http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=873
Author:   rsk
Date:     2010-08-12 16:53:15 +0900 (Thu, 12 Aug 2010)

Log Message:
-----------
expack:
- read.phpの変更漏れを修正。
- iPhone用JavaScriptでDOMContentLoadイベントを監視する
  オブジェクトをwindowからdocumentに変更。

Modified Paths:
--------------
    p2ex/trunk/js/ic2_iphone.js
    p2ex/trunk/js/iphone.js
    p2ex/trunk/js/iv2_iphone.js
    p2ex/trunk/js/sb_iphone.js
    p2ex/trunk/read.php


-------------- next part --------------
Modified: p2ex/trunk/js/ic2_iphone.js
===================================================================
--- p2ex/trunk/js/ic2_iphone.js	2010-08-11 16:25:24 UTC (rev 872)
+++ p2ex/trunk/js/ic2_iphone.js	2010-08-12 07:53:15 UTC (rev 873)
@@ -9,9 +9,7 @@
 // }}}
 // {{{ DOMContentLoaded
 
-window.addEventListener('DOMContentLoaded', function(event) {
-	this.removeEventListener('DOMContentLoaded', arguments.callee, false);
-
+document.addEventListener('DOMContentLoaded', function(event) {
 	// {{{ initiaize
 
 	ic2info._targetId = null;
@@ -196,6 +194,8 @@
 			return function(){ ic2info.updateRank(n); };
 		})(i - 1);
 	}
+
+	document.removeEventListener('DOMContentLoaded', arguments.callee, false);
 }, false);
 
 // }}}

Modified: p2ex/trunk/js/iphone.js
===================================================================
--- p2ex/trunk/js/iphone.js	2010-08-11 16:25:24 UTC (rev 872)
+++ p2ex/trunk/js/iphone.js	2010-08-12 07:53:15 UTC (rev 873)
@@ -1248,9 +1248,7 @@
 // }}}
 // {{{ DOMContentLoaded
 
-window.addEventListener('DOMContentLoaded', function(event) {
-	window.removeEventListener('DOMContentLoaded', arguments.callee, false);
-
+document.addEventListener('DOMContentLoaded', function(event) {
 	if (typeof window.iphone_js_no_modification === 'undefined' || !window.iphone_js_no_modification) {
 		// ƒŠƒ“ƒN‚ɃCƒxƒ“ƒgƒnƒ“ƒhƒ‰‚ð“o˜^‚·‚é
 		iutil.modifyExternalLink(document.body);
@@ -1280,6 +1278,8 @@
 	} else if (!window.location.hash.length && iutil.getScrollX() < 1) {
 		window.scrollTo(0, 1);
 	}
+
+	document.removeEventListener('DOMContentLoaded', arguments.callee, false);
 }, false);
 
 // }}}

Modified: p2ex/trunk/js/iv2_iphone.js
===================================================================
--- p2ex/trunk/js/iv2_iphone.js	2010-08-11 16:25:24 UTC (rev 872)
+++ p2ex/trunk/js/iv2_iphone.js	2010-08-12 07:53:15 UTC (rev 873)
@@ -4,9 +4,7 @@
 
 // {{{ DOMContentLoaded
 
-window.addEventListener('DOMContentLoaded', function(event) {
-	this.removeEventListener('DOMContentLoaded', arguments.callee, false);
-
+document.addEventListener('DOMContentLoaded', function(event) {
 	var styleSheets    = document.styleSheets;
 	var commonStyle    = styleSheets[styleSheets.length - 3];
 	var landscapeStyle = styleSheets[styleSheets.length - 2];
@@ -45,6 +43,8 @@
 		landscapeStyle.disabled = true;
 		portraitStyle.disabled = true;
 	}
+
+	document.removeEventListener('DOMContentLoaded', arguments.callee, false);
 }, false);
 
 // }}}

Modified: p2ex/trunk/js/sb_iphone.js
===================================================================
--- p2ex/trunk/js/sb_iphone.js	2010-08-11 16:25:24 UTC (rev 872)
+++ p2ex/trunk/js/sb_iphone.js	2010-08-12 07:53:15 UTC (rev 873)
@@ -410,7 +410,7 @@
 	// }}}
 	// {{{ on DOMContentLoaded
 
-	window.addEventListener('DOMContentLoaded', function(event) {
+	document.addEventListener('DOMContentLoaded', function(event) {
 		// iutil/JSON‚ª—˜—p‰Â”\‚É‚È‚é‚Ü‚Å‘Ò‚Â
 		if (typeof window.iutil === 'undefined' ||
 			typeof window.JSON  === 'undefined')
@@ -418,7 +418,7 @@
 			window.setTimeout(arguments.callee, 50);
 		} else {
 			setup(window.iutil, window.JSON);
-			window.removeEventListener('DOMContentLoaded', arguments.callee, false);
+			document.removeEventListener('DOMContentLoaded', arguments.callee, false);
 		}
 	}, false);
 

Modified: p2ex/trunk/read.php
===================================================================
--- p2ex/trunk/read.php	2010-08-11 16:25:24 UTC (rev 872)
+++ p2ex/trunk/read.php	2010-08-12 07:53:15 UTC (rev 873)
@@ -29,7 +29,7 @@
         $resFilter->save();
     }
 } else {
-    ResFilter::restore();
+    $resFilter = ResFilter::restore();
 }
 
 //=================================================
@@ -172,7 +172,7 @@
 }
 
 // ƒtƒBƒ‹ƒ^ƒŠƒ“ƒO‚ÌŽž‚́AallŒÅ’è‚Æ‚·‚é
-if (isset($word)) {
+if ($resFilter && $resFilter->word !== null) {
     $aThread->ls = 'all';
 }
 
@@ -243,7 +243,7 @@
     // ƒ[ƒJƒ‹Dat‚ð•ÏŠ·‚µ‚ÄHTML•\Ž¦
     //===========================================================
     // ƒŒƒX‚ª‚ ‚èAŒŸõŽw’肪‚ ‚ê‚Î
-    if (isset($word) && $aThread->rescount) {
+    if ($resFilter && $resFilter->word !== null && $aThread->rescount) {
 
         $all = $aThread->rescount;
 
@@ -282,7 +282,7 @@
     //$GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection("datToHtml");
 
     // ƒtƒBƒ‹ƒ^Œ‹‰Ê‚ð•\Ž¦
-    if ($word && $aThread->rescount) {
+    if ($resFilter && $resFilter->word !== null && $aThread->rescount) {
         echo <<<EOP
 <script type="text/javascript">
 //<![CDATA[



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