[Svn-src-all:4285] [version-2_13_0 23199] #2101 新着情報の本文を未入力で登録した際、スマートフォン版でJavaScriptエラーが発生します used original value instead

michael_nelson admin @ mail.ec-cube.net
2013年 9月 9日 (月) 14:05:28 JST


Subversion committed to /home/svn/open 23199
http://svn.ec-cube.net/open_trac/changeset/23199
┌────────────────────────────┐
│更新者 :  michael_nelson                               │
│更新日時:  2013-09-09 14:05:27 +0900 (月, 09  9月 2013)│
└────────────────────────────┘

Log:
--------------------------------------------------------
#2101 新着情報の本文を未入力で登録した際、スマートフォン版でJavaScriptエラーが発生します used original value instead 

Changed:                      [U:修正,A:追加,D:削除]
--------------------------------------------------------
U   branches/version-2_13_0/data/Smarty/templates/sphone/frontparts/bloc/news.tpl

変更: branches/version-2_13_0/data/Smarty/templates/sphone/frontparts/bloc/news.tpl
===================================================================
--- branches/version-2_13_0/data/Smarty/templates/sphone/frontparts/bloc/news.tpl	2013-09-09 03:52:52 UTC (rev 23198)
+++ branches/version-2_13_0/data/Smarty/templates/sphone/frontparts/bloc/news.tpl	2013-09-09 05:05:27 UTC (rev 23199)
@@ -138,11 +138,9 @@
                         //$($("#windowcolumn dl.view_detail dt").get(maxCnt)).text(newsDateDisp);
 
                         //コメントをセット(iphone4の場合、innerHTMLの再描画が行われない為、タイマーで無理やり再描画させる)
-                        if($("#newsComment").val() != ''){
-                            setTimeout( function() {
-                                $("#newsComment").html(news.news_comment.replace(/\n/g,"<br />"));
-                            }, 10);
-                        }
+                        setTimeout( function() {
+                            news.news_comment == null ? $("#newsComment").html("") : $("#newsComment").html(news.news_comment.replace(/\n/g,"<br />"));
+                        }, 10);
                         $.mobile.changePage('#windowcolumn', {transition: "slideup"});
                         //ダイアログが開き終わるまで待機
                         setTimeout( function() {




Svn-src-all メーリングリストの案内