[P2-php-svn] [947] p2/ Updated: iphone js

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2013年 6月 4日 (火) 18:06:33 JST


Revision: 947
          http://sourceforge.jp/projects/p2-php/scm/svn/commits/947
Author:   akid
Date:     2013-06-04 18:06:33 +0900 (Tue, 04 Jun 2013)
Log Message:
-----------
p2/ Updated: iphone js

Modified Paths:
--------------
    p2/trunk/iphone/js/iphone.js
    p2/trunk/iphone/read_header_k.inc.php

-------------- next part --------------
Modified: p2/trunk/iphone/js/iphone.js
===================================================================
--- p2/trunk/iphone/js/iphone.js	2013-06-04 08:33:48 UTC (rev 946)
+++ p2/trunk/iphone/js/iphone.js	2013-06-04 09:06:33 UTC (rev 947)
@@ -1,4 +1,20 @@
-// body\x82\xAAonload\x82\xB5\x82Ă\xA9\x82\xE7
+function anchorJump(ancId)
+{
+	var gopos = document.getElementById(ancId);
+	if (gopos.offsetTop) {
+		document.body.scrollTop = parseInt(gopos.offsetTop);
+		//window.scrollBy(0, gopos.offsetTop);
+	}
+}
+
+// iPhone\x82\xCCURL\x95\\x8E\xA6\x95\x94\x95\xAA\x82\xF0\x88\xF8\x82\xC1\x8D\x9E\x82܂\xB9\x82邽\x82߁A\x82킸\x82\xA9\x82ɃX\x83N\x83\x8D\x81[\x83\x8B\x82\xB7\x82\xE9
+function scrollForHideIPhoneUrlMenu()
+{
+	scrollBy(0, 1);
+	//setTimeout(scrollBy, 100, 0, 1); // \x82Ȃ\xBA setTimeout \x82\xB5\x82Ă\xA2\x82\xE9\x82̂\xA9\x95s\x96\xBE
+}
+
+// \x81ibody\x82\xAAonload\x82\xB5\x82Ă\xA9\x82\xE7\x8E\xC0\x8Ds\x82\xB7\x82\xE9\x81j
 function initIPhoneGestures(){
 	if (isAndroidWebkit()) {
 		return;

Modified: p2/trunk/iphone/read_header_k.inc.php
===================================================================
--- p2/trunk/iphone/read_header_k.inc.php	2013-06-04 08:33:48 UTC (rev 946)
+++ p2/trunk/iphone/read_header_k.inc.php	2013-06-04 09:06:33 UTC (rev 947)
@@ -253,26 +253,20 @@
 	<script type="text/javascript" src="iphone/js/setfavjs.js?v=20090428"></script>
 	<script type="text/javascript" src="js/post_form.js?v=201209"></script>
 	<script type="text/javascript" src="js/delelog.js?v=20100127"></script>
-	<script type="text/javascript" src="iphone/js/iphone.js"></script>
+	<script type="text/javascript" src="iphone/js/iphone.js?20130604"></script>
 	<script type="text/javascript"> 
 	<!-- 
-
 	window.onload = function() { 
 		 <?php $jsanc = preg_replace('/[^a-zA-Z0-9_-]/', '', geti($_GET['jsanc'])); ?>
 		if (<?php echo (int)strlen($jsanc); ?>) {
-			var gopos = document.getElementById('<?php eh($jsanc) ?>');
-			if (gopos.offsetTop) {
-				document.body.scrollTop = parseInt(gopos.offsetTop);
-				//window.scrollBy(0, gopos.offsetTop);
-			}
+			anchorJump('<?php eh($jsanc) ?>');
 		} else {
-			setTimeout(scrollTo, 100, 0, 1); // iPhone\x82\xCCURL\x95ҏW\x95\x94\x95\xAA\x82\xF0\x95\\x8E\xA6\x82\xB5\x82Ȃ\xA2\x82悤\x83X\x83N\x83\x8D\x81[\x83\x8B\x82\xB7\x82\xE9
+			scrollForHideIPhoneUrlMenu();
 		}
 
 		initIPhoneGestures();
 	}
 
-
 	// \x83\x8C\x83X\x94͈͂̃t\x83H\x81[\x83\x80\x82̓\xE0\x97e\x82\xF0\x83\x8A\x83Z\x83b\x83g\x82\xB5\x82Ă\xA9\x82\xE7\x83y\x81[\x83W\x88ڍs\x82\xB7\x82郁\x83\\x83b\x83h
 	var onArreyt = 2;
 	function formReset() {



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