Skip to content

Commit

Permalink
スマホ向けreadに書き込みフォームを追加
Browse files Browse the repository at this point in the history
戻るボタンの色を白に変更
  • Loading branch information
2ch774 committed Apr 11, 2015
1 parent be25e8c commit 28746a1
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 7 deletions.
39 changes: 37 additions & 2 deletions lib/read_footer_i.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,37 @@

echo '</tr></tbody></table></div>';

// {{{書き込みフォーム
if ($_conf['bottom_res_form']) {
$bbs = $aThread->bbs;
$key = $aThread->key;
$host = $aThread->host;
$rescount = $aThread->rescount;
$ttitle_en = UrlSafeBase64::encode($aThread->ttitle);

$submit_value = '書き込む';

$key_idx = $aThread->keyidx;

// フォームのオプション読み込み
require_once P2_LIB_DIR . '/post_form_options.inc.php';

$htm['resform_ttitle'] = <<<EOP
<p><b class="thre_title">{$aThread->ttitle_hd}</b></p>
EOP;

require_once P2_LIB_DIR . '/post_form.inc.php';

echo <<<EOP
<div id="kakiko" class="extra">
{$htm['dpreview']}
{$htm['post_form']}
{$htm['dpreview2']}
</div>\n
EOP;
}
// }}}

// {{{ その他ボタン類

echo '<table><tbody><tr>';
Expand Down Expand Up @@ -89,8 +120,12 @@
echo '<td>';
if (!$aThread->diedat) {
if (empty($_conf['disable_res'])) {
$escaped_url = "post_form.php?{$host_bbs_key_q}&amp;rescount={$aThread->rescount}{$ttitle_en_q}{$_conf['k_at_a']}";
echo toolbar_i_standard_button('img/glyphish/icons2/08-chat.png', '書込', $escaped_url);
if ($_conf['bottom_res_form']) {
echo toolbar_i_showhide_button('img/glyphish/icons2/08-chat.png', '書込', 'kakiko');
} else {
$escaped_url = "post_form.php?{$host_bbs_key_q}&amp;rescount={$aThread->rescount}{$ttitle_en_q}{$_conf['k_at_a']}";
echo toolbar_i_standard_button('img/glyphish/icons2/08-chat.png', '書込', $escaped_url);
}
} else {
echo toolbar_i_opentab_button('img/glyphish/icons2/08-chat.png', '元スレ', $motothre_url);
}
Expand Down
10 changes: 5 additions & 5 deletions lib/read_header.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,6 @@
<script type="text/javascript" src="js/ic2_getcount.js?{$_conf['p2_version_id']}"></script>
EOP;
}
if ($_conf['expack.editor.savedraft'] != '0') {
echo <<<EOP
<script type="text/javascript" src="js/post_draft.js?{$_conf['p2_version_id']}"></script>
EOP;
}
if ($_conf['wiki.idsearch.spm.mimizun.enabled'] ||
$_conf['wiki.idsearch.spm.hissi.enabled'] ||
$_conf['wiki.idsearch.spm.stalker.enabled']) {
Expand All @@ -325,6 +320,11 @@
if ($_conf['expack.editor.dpreview']) {
echo "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css.php?css=prvw&amp;skin={$skin_en}\">\n";
}
if ($_conf['expack.editor.savedraft'] != '0') {
echo <<<EOP
<script type="text/javascript" src="js/post_draft.js?{$_conf['p2_version_id']}"></script>
EOP;
}
echo "\t<script type=\"text/javascript\" src=\"js/post_form.js?{$_conf['p2_version_id']}\"></script>\n";
$onload_script .= 'checkSage();';
}
Expand Down
8 changes: 8 additions & 0 deletions lib/read_header_i.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@
EOS;
}

if ($_conf['bottom_res_form']) {
$_conf['extra_headers_ht'] .= "\t<script type=\"text/javascript\" src=\"js/post_form.js?{$_conf['p2_version_id']}\"></script>\n";
if ($_conf['expack.editor.savedraft'] != '0') {
$_conf['extra_headers_ht'] .= <<<EOP
<script type="text/javascript" src="js/post_draft.js?{$_conf['p2_version_id']}"></script>
EOP;
}
}
// }}}
// }}}
// {{{ HTMLプリント
Expand Down
9 changes: 9 additions & 0 deletions rep2/css/iphone.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ p.empty {
color: #333;;
}

/* }}} *
/* {{{ Res */
textarea#MESSAGE {
padding: 6px;
line-height: 132%;
width: 100%;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
/* }}} *
/* {{{ Forms */

Expand Down
Binary file modified rep2/iui/backButton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions rep2/js/iphone.js
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,12 @@ iutil.toolbarShowHide = function(element, event) {
}
}
}

// 書き込みフォームなら画面をスクロール(本家より)
if(id=='kakiko') {
var to = parseInt(target.offsetTop);
document.body.scrollTop = to - 60;
}
}
}
}
Expand Down

0 comments on commit 28746a1

Please sign in to comment.