Index: /branches/version-2_13-dev/html/js/eccube.js
===================================================================
--- /branches/version-2_13-dev/html/js/eccube.js	(revision 23264)
+++ /branches/version-2_13-dev/html/js/eccube.js	(revision 23379)
@@ -1,23 +1,23 @@
 /*
- * This file is part of EC-CUBE
- *
- * Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved.
- *
- * http://www.lockon.co.jp/
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
+* This file is part of EC-CUBE
+*
+* Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved.
+*
+* http://www.lockon.co.jp/
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
 
 (function( window, undefined ){
@@ -53,11 +53,11 @@
         }
         features = features + ",scrollbars=" + option.scrollbars +
-                ",resizable=" + option.resizable +
-                ",toolbar=" + option.toolbar +
-                ",location=" + option.location +
-                ",directories=" + option.directories +
-                ",status=" + option.status;
+            ",resizable=" + option.resizable +
+            ",toolbar=" + option.toolbar +
+            ",location=" + option.location +
+            ",directories=" + option.directories +
+            ",status=" + option.status;
         if (option.hasOwnProperty('menubar')) {
-            features = features + ",menubar=" + option['menubar'];
+            features = features + ",menubar=" + option.menubar;
         }
         var WIN = window.open(URL,name,features);
@@ -76,5 +76,5 @@
             if( ua.indexOf('MSIE 4') !== -1 && ua.indexOf('Win') !== -1 ) {
                 if (window.opener.hasOwnProperty('closed')) {
-                    return !window.opener['closed'];
+                    return !window.opener.closed;
                 } else {
                     return false;
@@ -90,6 +90,6 @@
     // 郵便番号入力呼び出し.
     eccube.getAddress = function(php_url, tagname1, tagname2, input1, input2) {
-        var zip1 = document['form1'][tagname1].value;
-        var zip2 = document['form1'][tagname2].value;
+        var zip1 = document.form1[tagname1].value;
+        var zip2 = document.form1[tagname2].value;
 
         if(zip1.length === 3 && zip2.length === 4) {
@@ -115,12 +115,12 @@
         if(state !== "") {
             // 項目に値を入力する.
-            document['form1'][input1].selectedIndex = state;
-            document['form1'][input2].value = city + town;
+            document.form1[input1].selectedIndex = state;
+            document.form1[input2].value = city + town;
         }
     };
 
     eccube.setFocus = function(name) {
-        if(document['form1'].hasOwnProperty(name)) {
-            document['form1'][name].focus();
+        if(document.form1.hasOwnProperty(name)) {
+            document.form1[name].focus();
         }
     };
@@ -152,9 +152,9 @@
                 break;
         }
-        document['form1']['mode'].value = mode;
+        document.form1.mode.value = mode;
         if(keyname !== undefined && keyname !== "" && keyid !== undefined && keyid !== "") {
-            document['form1'][keyname].value = keyid;
-        }
-        document['form1'].submit();
+            document.form1[keyname].value = keyid;
+        }
+        document.form1.submit();
     };
 
@@ -221,9 +221,9 @@
 
     /**
-     * フォームを送信する.
-     *
-     * @param values
-     * @param form
-     */
+    * フォームを送信する.
+    *
+    * @param values
+    * @param form
+    */
     eccube.submitForm = function(values, form){
         var formElement = eccube.getFormElement(form);
@@ -237,9 +237,9 @@
 
     /**
-     * フォームを特定してエレメントを返す.
-     *
-     * @param form
-     * @returns {*}
-     */
+    * フォームを特定してエレメントを返す.
+    *
+    * @param form
+    * @returns {*}
+    */
     eccube.getFormElement = function(form){
         var formElement;
@@ -256,10 +256,10 @@
     // ポイント入力制限。
     eccube.togglePointForm = function() {
-        if(document['form1']['point_check']) {
+        if(document.form1.point_check) {
             var list = ['use_point'];
             var color;
             var flag;
 
-            if(!document['form1']['point_check'][0].checked) {
+            if(!document.form1.point_check[0].checked) {
                 color = "#dddddd";
                 flag = true;
@@ -271,12 +271,12 @@
             var len = list.length;
             for(var i = 0; i < len; i++) {
-                if(document['form1'][list[i]]) {
-                    var current_color = document['form1'][list[i]].style.backgroundColor;
+                if(document.form1[list[i]]) {
+                    var current_color = document.form1[list[i]].style.backgroundColor;
                     if (color !== "#dddddd" && (current_color === "#ffe8e8" || current_color === "rgb(255, 232, 232)"))
                     {
                         continue;
                     }
-                    document['form1'][list[i]].disabled = flag;
-                    document['form1'][list[i]].style.backgroundColor = color;
+                    document.form1[list[i]].disabled = flag;
+                    document.form1[list[i]].style.backgroundColor = color;
                 }
             }
@@ -286,8 +286,8 @@
     // 別のお届け先入力制限。
     eccube.toggleDeliveryForm = function() {
-        if(!document['form1']) {
+        if(!document.form1) {
             return;
         }
-        if(document['form1']['deliv_check']) {
+        if(document.form1.deliv_check) {
             var list = [
                 'shipping_name01',
@@ -311,5 +311,5 @@
             ];
 
-            if(!document['form1']['deliv_check'].checked) {
+            if(!document.form1.deliv_check.checked) {
                 eccube.changeDisabled(list, '#dddddd');
             } else {
@@ -326,14 +326,14 @@
 
         for(var i = 0; i < len; i++) {
-            if(document['form1'][list[i]]) {
+            if(document.form1[list[i]]) {
                 if(color === "") {
                     // 有効にする。
-                    document['form1'][list[i]].removeAttribute('disabled');
-                    document['form1'][list[i]].style.backgroundColor = eccube.savedColor[list[i]];
+                    document.form1[list[i]].removeAttribute('disabled');
+                    document.form1[list[i]].style.backgroundColor = eccube.savedColor[list[i]];
                 } else {
                     // 無効にする。
-                    document['form1'][list[i]].setAttribute('disabled', 'disabled');
-                    eccube.savedColor[list[i]] = document['form1'][list[i]].style.backgroundColor;
-                    document['form1'][list[i]].style.backgroundColor = color;//"#f0f0f0";
+                    document.form1[list[i]].setAttribute('disabled', 'disabled');
+                    eccube.savedColor[list[i]] = document.form1[list[i]].style.backgroundColor;
+                    document.form1[list[i]].style.backgroundColor = color;//"#f0f0f0";
                 }
             }
@@ -408,6 +408,6 @@
 
     /**
-     * 規格2のプルダウンを設定する.
-     */
+    * 規格2のプルダウンを設定する.
+    */
     eccube.setClassCategories = function($form, product_id, $sele1, $sele2, selected_id2) {
         if ($sele1 && $sele1.length) {
@@ -421,9 +421,9 @@
                 // 商品一覧時
                 if (eccube.hasOwnProperty('productsClassCategories')) {
-                    classcat2 = eccube['productsClassCategories'][product_id][classcat_id1];
+                    classcat2 = eccube.productsClassCategories[product_id][classcat_id1];
                 }
                 // 詳細表示時
                 else {
-                    classcat2 = eccube['classCategories'][classcat_id1];
+                    classcat2 = eccube.classCategories[classcat_id1];
                 }
 
@@ -431,6 +431,6 @@
                 for (var key in classcat2) {
                     if (classcat2.hasOwnProperty(key)) {
-                        var id = classcat2[key]['classcategory_id2'];
-                        var name = classcat2[key]['name'];
+                        var id = classcat2[key].classcategory_id2;
+                        var name = classcat2[key].name;
                         var option = $('<option />').val(id ? id : '').text(name);
                         if (id === selected_id2) {
@@ -441,5 +441,5 @@
                 }
                 eccube.checkStock($form, product_id, $sele1.val() ? $sele1.val() : '__unselected2',
-                    $sele2.val() ? $sele2.val() : '');
+                $sele2.val() ? $sele2.val() : '');
             }
         }
@@ -447,6 +447,6 @@
 
     /**
-     * 規格の選択状態に応じて, フィールドを設定する.
-     */
+    * 規格の選択状態に応じて, フィールドを設定する.
+    */
     eccube.checkStock = function($form, product_id, classcat_id1, classcat_id2) {
 
@@ -457,9 +457,9 @@
         // 商品一覧時
         if (eccube.hasOwnProperty('productsClassCategories')) {
-            classcat2 = eccube['productsClassCategories'][product_id][classcat_id1]['#' + classcat_id2];
+            classcat2 = eccube.productsClassCategories[product_id][classcat_id1]['#' + classcat_id2];
         }
         // 詳細表示時
         else {
-            classcat2 = eccube['classCategories'][classcat_id1]['#' + classcat_id2];
+            classcat2 = eccube.classCategories[classcat_id1]['#' + classcat_id2];
         }
 
@@ -467,8 +467,8 @@
         var $product_code_default = $form.find('[id^=product_code_default]');
         var $product_code_dynamic = $form.find('[id^=product_code_dynamic]');
-        if (classcat2 && typeof classcat2['product_code'] !== 'undefined') {
+        if (classcat2 && typeof classcat2.product_code !== 'undefined') {
             $product_code_default.hide();
             $product_code_dynamic.show();
-            $product_code_dynamic.text(classcat2['product_code']);
+            $product_code_dynamic.text(classcat2.product_code);
         } else {
             $product_code_default.show();
@@ -479,5 +479,5 @@
         var $cartbtn_default = $form.find('[id^=cartbtn_default]');
         var $cartbtn_dynamic = $form.find('[id^=cartbtn_dynamic]');
-        if (classcat2 && classcat2['stock_find'] === false) {
+        if (classcat2 && classcat2.stock_find === false) {
 
             $cartbtn_dynamic.text('申し訳ございませんが、只今品切れ中です。').show();
@@ -491,7 +491,7 @@
         var $price01_default = $form.find('[id^=price01_default]');
         var $price01_dynamic = $form.find('[id^=price01_dynamic]');
-        if (classcat2 && typeof classcat2['price01'] !== 'undefined' && String(classcat2['price01']).length >= 1) {
-
-            $price01_dynamic.text(classcat2['price01']).show();
+        if (classcat2 && typeof classcat2.price01 !== 'undefined' && String(classcat2.price01).length >= 1) {
+
+            $price01_dynamic.text(classcat2.price01).show();
             $price01_default.hide();
         } else {
@@ -503,7 +503,7 @@
         var $price02_default = $form.find('[id^=price02_default]');
         var $price02_dynamic = $form.find('[id^=price02_dynamic]');
-        if (classcat2 && typeof classcat2['price02'] !== 'undefined' && String(classcat2['price02']).length >= 1) {
-
-            $price02_dynamic.text(classcat2['price02']).show();
+        if (classcat2 && typeof classcat2.price02 !== 'undefined' && String(classcat2.price02).length >= 1) {
+
+            $price02_dynamic.text(classcat2.price02).show();
             $price02_default.hide();
         } else {
@@ -515,7 +515,7 @@
         var $point_default = $form.find('[id^=point_default]');
         var $point_dynamic = $form.find('[id^=point_dynamic]');
-        if (classcat2 && typeof classcat2['point'] !== 'undefined' && String(classcat2['point']).length >= 1) {
-
-            $point_dynamic.text(classcat2['point']).show();
+        if (classcat2 && typeof classcat2.point !== 'undefined' && String(classcat2.point).length >= 1) {
+
+            $point_dynamic.text(classcat2.point).show();
             $point_default.hide();
         } else {
@@ -526,6 +526,6 @@
         // 商品規格
         var $product_class_id_dynamic = $form.find('[id^=product_class_id]');
-        if (classcat2 && typeof classcat2['product_class_id'] !== 'undefined' && String(classcat2['product_class_id']).length >= 1) {
-            $product_class_id_dynamic.val(classcat2['product_class_id']);
+        if (classcat2 && typeof classcat2.product_class_id !== 'undefined' && String(classcat2.product_class_id).length >= 1) {
+            $product_class_id_dynamic.val(classcat2.product_class_id);
         } else {
             $product_class_id_dynamic.val('');
@@ -537,33 +537,33 @@
 
     /**
-     * Initialize.
-     */
+    * Initialize.
+    */
     $(function() {
         // 規格1選択時
         $('select[name=classcategory_id1]')
-            .change(function() {
-                var $form = $(this).parents('form');
-                var product_id = $form.find('input[name=product_id]').val();
-                var $sele1 = $(this);
-                var $sele2 = $form.find('select[name=classcategory_id2]');
-
-                // 規格1のみの場合
-                if (!$sele2.length) {
-                    eccube.checkStock($form, product_id, $sele1.val(), '0');
-                    // 規格2ありの場合
-                } else {
-                    eccube.setClassCategories($form, product_id, $sele1, $sele2);
-                }
-            });
+        .change(function() {
+            var $form = $(this).parents('form');
+            var product_id = $form.find('input[name=product_id]').val();
+            var $sele1 = $(this);
+            var $sele2 = $form.find('select[name=classcategory_id2]');
+
+            // 規格1のみの場合
+            if (!$sele2.length) {
+                eccube.checkStock($form, product_id, $sele1.val(), '0');
+                // 規格2ありの場合
+            } else {
+                eccube.setClassCategories($form, product_id, $sele1, $sele2);
+            }
+        });
 
         // 規格2選択時
         $('select[name=classcategory_id2]')
-            .change(function() {
-                var $form = $(this).parents('form');
-                var product_id = $form.find('input[name=product_id]').val();
-                var $sele1 = $form.find('select[name=classcategory_id1]');
-                var $sele2 = $(this);
-                eccube.checkStock($form, product_id, $sele1.val(), $sele2.val());
-            });
+        .change(function() {
+            var $form = $(this).parents('form');
+            var product_id = $form.find('input[name=product_id]').val();
+            var $sele1 = $form.find('select[name=classcategory_id1]');
+            var $sele2 = $(this);
+            eccube.checkStock($form, product_id, $sele1.val(), $sele2.val());
+        });
 
         // マウスオーバーで画像切り替え
@@ -583,6 +583,6 @@
 
         // モーダルウィンドウ
-        if ($('a.expansion').length) { 
-            $('a.expansion').colorbox(); 
+        if ($('a.expansion').length) {
+            $('a.expansion').colorbox();
         }
     });
