diff options
| author | Cesar G <prototech91@gmail.com> | 2014-05-31 10:12:24 -0700 |
|---|---|---|
| committer | Cesar G <prototech91@gmail.com> | 2014-05-31 10:12:24 -0700 |
| commit | 95b9c938922a95c5755c66714989e42c03d7ee60 (patch) | |
| tree | 15b24086aa473cf389aae62517b1580d2f9ebb92 | |
| parent | 9c2687ddc9ba7071f7c98c118203f96a412e3d1b (diff) | |
| download | forums-95b9c938922a95c5755c66714989e42c03d7ee60.tar forums-95b9c938922a95c5755c66714989e42c03d7ee60.tar.gz forums-95b9c938922a95c5755c66714989e42c03d7ee60.tar.bz2 forums-95b9c938922a95c5755c66714989e42c03d7ee60.tar.xz forums-95b9c938922a95c5755c66714989e42c03d7ee60.zip | |
[ticket/12640] Preserve the active tab when previewing in posting page.
PHPBB3-12640
| -rw-r--r-- | phpBB/posting.php | 1 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/forum_fn.js | 1 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/posting_editor.html | 2 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/posting_layout.html | 1 |
4 files changed, 4 insertions, 1 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 2516067aae..60bb595da6 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1546,6 +1546,7 @@ $page_data = array( 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '', 'TOPIC_TIME_LIMIT' => (int) $post_data['topic_time_limit'], 'EDIT_REASON' => $request->variable('edit_reason', ''), + 'SHOW_PANEL' => $request->variable('show_panel', ''), 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id"), 'U_VIEW_TOPIC' => ($mode != 'post') ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id") : '', 'U_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", "f=$forum_id&mode=popup"), diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index a4ede51f4b..35a18ddbcc 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -117,6 +117,7 @@ jQuery(document).ready(function() { if (typeof(p) === 'string') { show_panel = p; } + $('input[name="show_panel"]').val(show_panel); for (i = 0; i < panels.length; i++) { jQuery('#' + panels[i]).css('display', panels[i] === show_panel ? 'block' : 'none'); diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html index e311b85cbe..081c267a94 100644 --- a/phpBB/styles/prosilver/template/posting_editor.html +++ b/phpBB/styles/prosilver/template/posting_editor.html @@ -99,7 +99,7 @@ <!-- ENDIF --> <!-- IF not S_PRIVMSGS and not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 --> - <div id="tabs" class="sub-panels" data-show-panel="options-panel"> + <div id="tabs" class="sub-panels" data-show-panel="<!-- IF SHOW_PANEL -->{SHOW_PANEL}<!-- ELSE -->options-panel<!-- ENDIF -->"> <ul> <li id="options-panel-tab" class="activetab"><a href="#tabs" data-subpanel="options-panel"><span>{L_OPTIONS}</span></a></li> <!-- IF S_SHOW_ATTACH_BOX --> diff --git a/phpBB/styles/prosilver/template/posting_layout.html b/phpBB/styles/prosilver/template/posting_layout.html index 4ef0954200..630afdb832 100644 --- a/phpBB/styles/prosilver/template/posting_layout.html +++ b/phpBB/styles/prosilver/template/posting_layout.html @@ -68,6 +68,7 @@ <!-- DEFINE $EXTRA_POSTING_OPTIONS = 1 --> <!-- INCLUDE posting_editor.html --> + <input type="hidden" name="show_panel" value="options-panel" /> {S_FORM_TOKEN} </div> </div> |
