OSDN Git Service

jQueryのアップデートに伴う変更。 master
authorSFPGMR <sfpg@git.sourceforge.jp>
Sun, 25 Sep 2011 07:24:57 +0000 (16:24 +0900)
committerSFPGMR <sfpg@git.sourceforge.jp>
Sun, 25 Sep 2011 07:24:57 +0000 (16:24 +0900)
インクルードの手直しとbuttonのdisable属性の設定方法を変更。

xm_player.html

index 50b3b36..005b3c1 100644 (file)
@@ -13,9 +13,11 @@ found in the LICENSE file.
 <meta name="keywords" content="Native Client,jQuery,HTML5,MOD,XM" /> \r
 <meta http-equiv="Content-Style-Type" content="text/css" /> \r
 <meta http-equiv="Content-Script-Type" content="text/javascript" /> \r
-<link type="text/css" href="css/smoothness/jquery-ui-1.8.11.custom.css" rel="stylesheet" />    \r
-<script type="text/javascript" src="jquery-1.5.1.js"></script>\r
-<script type="text/javascript" src="jquery-ui-1.8.11.custom.js"></script>\r
+<link type="text/css" href="css/smoothness/jquery-ui-1.8.16.custom.css" rel="stylesheet" />    \r
+<!-- <script type="text/javascript" src="jquery-1.6.4.js"></script>\r
+<script type="text/javascript" src="jquery-ui-1.8.16.custom.js"></script>-->\r
+<script type="text/javascript" src="jquery-1.6.4.min.js"></script>\r
+<script type="text/javascript" src="jquery-ui-1.8.16.custom.min.js"></script>\r
 <script type="text/javascript" src="http://nacl-gallery.appspot.com/check_browser.js"></script> \r
 <!-- <script type="text/javascript" src="jquery-1.5.1.min.js"></script> -->\r
 <script type="text/javascript">\r
@@ -43,6 +45,14 @@ found in the LICENSE file.
       $("#GeneralOutput").append(log + "<br/>");\r
     }\r
 \r
+    function handleMessage(message_event) {\r
+      reportLog("handleMessage::" + message_event);\r
+      if (message_event.data.match(/^GetURLHandler/)) {\r
+        handleMessage_(message_event);\r
+      } else {\r
+        reportLog(message_event.data);\r
+      }\r
+    }\r
     // ロード時処理\r
     $().ready(function () {\r
 \r
@@ -77,12 +87,12 @@ found in the LICENSE file.
       $("button").button().css("font-size", "7pt").css("border", "4px").css("padding", "2px");\r
       $("button").attr("disabled", "true");\r
       $("#tabs").tabs();\r
-      $("#listener").ready( function() {\r
-      reportLog("moduleDidLoad");\r
-      xmPlayer = $("#xmPlayer")[0];\r
-      xmPlayer.addEventListener('message', handleMessage, false);\r
-\r
-      $("#load-file").attr("disabled", "").click(\r
+      $("#listener").ready(function () {\r
+        reportLog("moduleDidLoad");\r
+        xmPlayer = $("#xmPlayer")[0];\r
+        xmPlayer.addEventListener("message", handleMessage,false);\r
+        $("#load-file").attr("disabled", false);\r
+        $("#load-file").click(\r
         function () {\r
           try {\r
             reportLog("LoadFile");\r
@@ -90,7 +100,7 @@ found in the LICENSE file.
 \r
             handleMessage_ = function (message) {\r
               reportLog("### File Loading..." & message.data);\r
-            \r
+\r
               var status_info = message.data.split(":");\r
               var status = parseInt(status_info[1]);\r
               var success = parseInt(status_info[2]) != 0;\r
@@ -107,15 +117,14 @@ found in the LICENSE file.
                 $("#status-dialog")\r
                   .html("<p>ファイルを読み込んでいます。</p><div id='progress'></div>")\r
                   .attr("title", "ファイルロード")\r
-                  .dialog({ buttons: null});\r
+                  .dialog({ buttons: null });\r
 \r
                 $("#progress").progressbar({ value: 0 });\r
               }\r
 \r
-              if (status == status_loading && success)\r
-              {\r
-                  $("GeneralOutput").append( parseInt(status_info[3])+ "<br/>");\r
-                  $("#progress").progressbar("value", parseInt(status_info[3]) * 100 / total_bytes);\r
+              if (status == status_loading && success) {\r
+                $("GeneralOutput").append(parseInt(status_info[3]) + "<br/>");\r
+                $("#progress").progressbar("value", parseInt(status_info[3]) * 100 / total_bytes);\r
               }\r
 \r
               if (status == status_complete && success) {\r
@@ -124,12 +133,12 @@ found in the LICENSE file.
                 $("#Play").click(function () {\r
                   //xmPlayer.playSound();\r
                   xmPlayer.postMessage("playSound");\r
-                }).attr("disabled", "");\r
+                }).attr("disabled", false);\r
 \r
                 $("#Stop").click(function () {\r
                   xmPlayer.postMessage("stopSound");\r
                   //xmPlayer.stopSound();\r
-                }).attr("disabled", "");\r
+                }).attr("disabled", false);\r
 \r
                 $("#status-dialog")\r
                 .html("ファイルの読み込みが完了しました。")\r
@@ -162,15 +171,7 @@ found in the LICENSE file.
 \r
     });\r
 \r
-    function handleMessage(message_event) \r
-    {\r
-      reportLog("handleMessage::" + message_event);\r
-      if (message_event.data.match(/^GetURLHandler/)) {\r
-        handleMessage_(message_event);\r
-      } else {\r
-        reportLog(message_event.data);\r
-      }\r
-    }\r
+\r
 \r
 \r
 </script>\r
@@ -234,5 +235,6 @@ found in the LICENSE file.
          type="application/x-nacl"\r
  />\r
  </div>\r
-  <div id="status-dialog" title=""></div>\r </body>\r
+  <div id="status-dialog" title=""></div>\r
+ </body>\r
 </html>\r