mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/13713] Use format buttons div as mentions data container
PHPBB3-13713
This commit is contained in:
parent
50400cb785
commit
b66d298dde
3 changed files with 6 additions and 12 deletions
|
@ -8,15 +8,12 @@
|
||||||
// ]]>
|
// ]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- IF S_ALLOW_MENTIONS -->
|
|
||||||
<div id="mention_params" style="display: none;" data-mention-url="{U_MENTION_URL}" data-mention-names-limit="{S_MENTION_NAMES_LIMIT}" data-topic-id="{S_TOPIC_ID}"></div>
|
|
||||||
<!-- ENDIF -->
|
|
||||||
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/jquery.caret.min.js -->
|
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/jquery.caret.min.js -->
|
||||||
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/jquery.atwho.min.js -->
|
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/jquery.atwho.min.js -->
|
||||||
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
|
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
|
||||||
|
|
||||||
<!-- EVENT acp_posting_buttons_before -->
|
<!-- EVENT acp_posting_buttons_before -->
|
||||||
<div id="format-buttons">
|
<div id="format-buttons"<!-- IF S_ALLOW_MENTIONS --> data-mention-url="{U_MENTION_URL}" data-mention-names-limit="{S_MENTION_NAMES_LIMIT}" data-topic-id="{S_TOPIC_ID}"<!-- ENDIF -->>
|
||||||
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
|
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
|
||||||
<input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" />
|
<input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" />
|
||||||
<input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" />
|
<input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" />
|
||||||
|
|
|
@ -386,10 +386,10 @@ function getCaretPosition(txtarea) {
|
||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
function handle_mentions(txtarea) {
|
function handle_mentions(txtarea) {
|
||||||
var $mentionParams = $('#mention_params'),
|
var $mentionDataContainer = $('#format-buttons'),
|
||||||
mentionURL = $mentionParams.data('mentionUrl'),
|
mentionURL = $mentionDataContainer.data('mentionUrl'),
|
||||||
mentionNamesLimit = $mentionParams.data('mentionNamesLimit'),
|
mentionNamesLimit = $mentionDataContainer.data('mentionNamesLimit'),
|
||||||
mentionTopicId = $mentionParams.data('topicId');
|
mentionTopicId = $mentionDataContainer.data('topicId');
|
||||||
$(txtarea).atwho({
|
$(txtarea).atwho({
|
||||||
at: "@",
|
at: "@",
|
||||||
displayTpl: function(data) {
|
displayTpl: function(data) {
|
||||||
|
|
|
@ -26,9 +26,6 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- IF S_ALLOW_MENTIONS -->
|
|
||||||
<div id="mention_params" style="display: none;" data-mention-url="{U_MENTION_URL}" data-mention-names-limit="{S_MENTION_NAMES_LIMIT}" data-topic-id="{S_TOPIC_ID}"></div>
|
|
||||||
<!-- ENDIF -->
|
|
||||||
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/jquery.caret.min.js -->
|
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/jquery.caret.min.js -->
|
||||||
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/jquery.atwho.min.js -->
|
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/jquery.atwho.min.js -->
|
||||||
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
|
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
|
||||||
|
@ -42,7 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- EVENT posting_editor_buttons_before -->
|
<!-- EVENT posting_editor_buttons_before -->
|
||||||
<div id="format-buttons" class="format-buttons">
|
<div id="format-buttons" class="format-buttons"<!-- IF S_ALLOW_MENTIONS --> data-mention-url="{U_MENTION_URL}" data-mention-names-limit="{S_MENTION_NAMES_LIMIT}" data-topic-id="{S_TOPIC_ID}"<!-- ENDIF -->>
|
||||||
<button type="button" class="button button-icon-only bbcode-b" accesskey="b" name="addbbcode0" value=" B " onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}">
|
<button type="button" class="button button-icon-only bbcode-b" accesskey="b" name="addbbcode0" value=" B " onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}">
|
||||||
{{ Icon('iconify', 'mdi:format-bold', '', true, 'c-button-icon') }}
|
{{ Icon('iconify', 'mdi:format-bold', '', true, 'c-button-icon') }}
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Add table
Reference in a new issue