Changeset 23423
- Timestamp:
- 2014/05/16 14:46:38 (10 years ago)
- Location:
- branches/version-2_13-dev
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/Smarty/templates/sphone/frontparts/bloc/news.tpl
r23419 r23423 122 122 } 123 123 else if (result != null) { 124 var news = result; 125 var maxCnt = 0; 124 var dialog = $("#news-dialog"); 126 125 127 126 //件名をセット 128 $($("#windowcolumn dl.view_detail dt a").get(maxCnt)).text(news.news_title); 129 if (news.news_url != null) { 130 $($("#windowcolumn dl.view_detail dt a").get(maxCnt)).attr("href", news.news_url); 127 $("#news-dialog-title").remove(); 128 if (result.news_url != null) { 129 dialog.find(".dialog-content").append( 130 $('<h3 id="news-dialog-title">').append( 131 $('<a>') 132 .attr('href', result.news_url) 133 .attr('rel', "external") 134 .attr('target', "_blank") 135 .text(result.news_title) 136 ) 137 ); 131 138 } else { 132 $($("#windowcolumn dl.view_detail dt a").get(maxCnt)).attr("href", "#"); 139 dialog.find(".dialog-content").append( 140 $('<h3 id="news-dialog-title">').text(result.news_title) 141 ); 133 142 } 134 143 135 //年月をセット 136 //var newsDateDispArray = news.cast_news_date.split("-"); //ハイフンで年月日を分解 137 //var newsDateDisp = newsDateDispArray[0] + "年 " + newsDateDispArray[1] + "月 " + newsDateDispArray[2] + "日"; 138 //$($("#windowcolumn dl.view_detail dt").get(maxCnt)).text(newsDateDisp); 144 //本文をセット 145 $("#news-dialog-body").remove(); 146 if (result.news_comment != null) { 147 dialog.find(".dialog-content").append( 148 $('<div id="news-dialog-body">').html(result.news_comment.replace(/\n/g,"<br />")) 149 ); 150 } 139 151 140 //コメントをセット(iphone4の場合、innerHTMLの再描画が行われない為、タイマーで無理やり再描画させる) 141 setTimeout( function() { 142 news.news_comment == null ? $("#newsComment").html("") : $("#newsComment").html(news.news_comment.replace(/\n/g,"<br />")); 143 }, 10); 144 $.mobile.changePage('#windowcolumn', {transition: "slideup"}); 145 //ダイアログが開き終わるまで待機 146 setTimeout( function() { 152 //ダイアログをモーダルウィンドウで表示 153 $.colorbox({inline: true, href: dialog, onOpen: function(){ 154 dialog.show().css('width', String($('body').width() * 0.9) + 'px'); 155 }, onComplete: function(){ 147 156 eccube.hideLoading(); 148 157 loadingState = 0; 149 }, 1000); 158 }, onClosed: function(){ 159 dialog.hide(); 160 }}); 150 161 } 151 162 else { … … 159 170 } 160 171 </script> 172 173 <!--{include file="`$smarty.const.SMARTPHONE_TEMPLATE_REALDIR`frontparts/dialog_modal.tpl" dialog_id="news-dialog" dialog_title="新着情報"}--> -
branches/version-2_13-dev/data/Smarty/templates/sphone/mypage/history.tpl
r23419 r23423 192 192 }, 193 193 success: function(result){ 194 var maxCnt = 0; 195 $("#windowcolumn h2").text('メール詳細'); 196 $("#windowcolumn a[data-rel=back]").text('購入履歴詳細にもどる'); 197 $($("#windowcolumn dl.view_detail dt").get(maxCnt)).text(result[0].subject); 198 $($("#windowcolumn dl.view_detail dd").get(maxCnt)).html(result[0].mail_body.replace(/\n/g,"<br />")); 199 $("#windowcolumn dl.view_detail dd").css('font-family', 'monospace'); 200 $.mobile.changePage('#windowcolumn', {transition: "slideup"}); 201 //ダイアログが開き終わるまで待機 202 setTimeout( function() { 203 loadingState = 0; 204 eccube.hideLoading(); 205 }, 1000); 194 var dialog = $("#mail-dialog"); 195 196 //件名をセット 197 $("#mail-dialog-title").remove(); 198 dialog.find(".dialog-content").append( 199 $('<h3 id="mail-dialog-title">').text(result[0].subject) 200 ); 201 202 //本文をセット 203 $("#mail-dialog-body").remove(); 204 dialog.find(".dialog-content").append( 205 $('<div id="mail-dialog-body">') 206 .html(result[0].mail_body.replace(/\n/g,"<br />")) 207 .css('font-family', 'monospace') 208 ); 209 210 //ダイアログをモーダルウィンドウで表示 211 $.colorbox({inline: true, href: dialog, onOpen: function(){ 212 dialog.show().css('width', String($('body').width() * 0.9) + 'px'); 213 }, onComplete: function(){ 214 eccube.hideLoading(); 215 }, onClosed: function(){ 216 dialog.hide(); 217 }}); 206 218 } 207 219 }); 208 220 } 209 221 </script> 222 223 <!--{include file="`$smarty.const.SMARTPHONE_TEMPLATE_REALDIR`frontparts/dialog_modal.tpl" dialog_id="mail-dialog" dialog_title="メール詳細"}--> -
branches/version-2_13-dev/data/Smarty/templates/sphone/site_main.tpl
r22363 r23423 147 147 148 148 </div> 149 150 <!-- ▼明細情報 -->151 <div id="windowcolumn" data-role="dialog">152 <div data-role="header" data-backbtn="true" data-theme="f">153 <h2>新着情報</h2>154 </div>155 156 <div data-role="content" data-theme="d">157 <dl class="view_detail">158 <dt><a href="javascript:;" rel="external" target="_blank"></a></dt>159 <dd id="newsComment"></dd>160 </dl>161 <p><a href="<!--{$smarty.const.HTTP_URL}-->" class="btn_more" data-rel="back">新着一覧にもどる</a></p>162 </div>163 </div>164 <!-- ▲明細情報 -->165 166 149 </body> -
branches/version-2_13-dev/html/user_data/packages/sphone/css/common.css
r23419 r23423 702 702 height: 32px; 703 703 } 704 /*------------------------------------------------- 705 ダイアログ 706 ----------------------------------------------- */ 707 .dialog-modal { 708 display: none; 709 background: #FFFFFF; 710 } 711 .dialog-inner { 712 padding: 1.5em; 713 }
Note: See TracChangeset
for help on using the changeset viewer.