aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/prosilver/template
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2012-04-01 11:28:47 -0700
committerrxu <rxu@mail.ru>2012-04-01 11:28:47 -0700
commitbf0a3ddacafa434f2f33a28124e095e959e164b6 (patch)
treebc4723b9cd03def33316789203687e19a205431e /phpBB/styles/prosilver/template
parent9a075e905d23110f0b3310f9bfe6e89b44be1b57 (diff)
parent5ccd6915e3e8af30856319d84a48dde074fdbaee (diff)
downloadforums-bf0a3ddacafa434f2f33a28124e095e959e164b6.tar
forums-bf0a3ddacafa434f2f33a28124e095e959e164b6.tar.gz
forums-bf0a3ddacafa434f2f33a28124e095e959e164b6.tar.bz2
forums-bf0a3ddacafa434f2f33a28124e095e959e164b6.tar.xz
forums-bf0a3ddacafa434f2f33a28124e095e959e164b6.zip
Merge pull request #670 from imkingdavid/feature/qrpreview
[feature/qrpreview] Preview from Quick Reply
Diffstat (limited to 'phpBB/styles/prosilver/template')
-rw-r--r--phpBB/styles/prosilver/template/ajax.js11
-rw-r--r--phpBB/styles/prosilver/template/quickreply_editor.html6
2 files changed, 14 insertions, 3 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index cc886c42b1..54f34e4204 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -66,6 +66,17 @@ $('[data-ajax]').each(function() {
});
+/**
+ * This simply appends #preview to the action of the
+ * QR action when you click the Full Editor & Preview button
+ */
+$('#qr_full_editor').click(function() {
+ $('#qr_postform').attr('action', function(i, val) {
+ return val + '#preview';
+ });
+});
+
+
/**
* This AJAXifies the quick-mod tools. The reason it cannot be a standard
diff --git a/phpBB/styles/prosilver/template/quickreply_editor.html b/phpBB/styles/prosilver/template/quickreply_editor.html
index 4cd5eedd3e..a08b5dc3cc 100644
--- a/phpBB/styles/prosilver/template/quickreply_editor.html
+++ b/phpBB/styles/prosilver/template/quickreply_editor.html
@@ -1,4 +1,4 @@
-<form method="post" action="{U_QR_ACTION}">
+<form method="post" action="{U_QR_ACTION}" id="qr_postform">
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<h2>{L_QUICKREPLY}</h2>
@@ -14,8 +14,8 @@
<fieldset class="submit-buttons">
{S_FORM_TOKEN}
{QR_HIDDEN_FIELDS}
- <input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
- <input type="submit" accesskey="f" tabindex="7" name="full_editor" value="{L_FULL_EDITOR}" class="button2" data-ajax="false" />&nbsp;
+ <input type="submit" accesskey="f" tabindex="6" name="preview" value="{L_FULL_EDITOR}" class="button2" data-ajax="false" id="qr_full_editor" />&nbsp;
+ <input type="submit" accesskey="s" tabindex="7" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
</fieldset>
<span class="corners-bottom"><span></span></span></div>
</div>