From 42ff95c3003ab0218a3ce2fbcb7ea3b34e005de0 Mon Sep 17 00:00:00 2001 From: Jakub Senko <jakubsenko@gmail.com> Date: Sun, 18 Feb 2018 16:44:05 +0100 Subject: [PATCH] [ticket/15522] Improve color palette syntax PHPBB3-15522 --- phpBB/adm/style/acp_contact.html | 2 +- phpBB/adm/style/acp_groups.html | 2 +- phpBB/adm/style/acp_users_signature.html | 2 +- phpBB/assets/javascript/core.js | 4 ++-- phpBB/styles/prosilver/template/posting_buttons.html | 2 +- phpBB/styles/prosilver/template/ucp_groups_manage.html | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpBB/adm/style/acp_contact.html b/phpBB/adm/style/acp_contact.html index 828fd4b659..f1752d0055 100644 --- a/phpBB/adm/style/acp_contact.html +++ b/phpBB/adm/style/acp_contact.html @@ -44,7 +44,7 @@ <!-- INCLUDE acp_posting_buttons.html --> <dl class="responsive-columns"> - <dt style="width: 90px;" id="color_palette_placeholder" data-orientation="v" data-height="12" data-width="15" data-bbcode="true"> + <dt style="width: 90px;" id="color_palette_placeholder" data-color-palette="v" data-height="12" data-width="15" data-bbcode="true"> </dt> <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px;"> diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index d0096370d9..8eec3b63c6 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -98,7 +98,7 @@ <input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" /> <!-- IF GROUP_COLOUR --> <span style="background-color: #{GROUP_COLOUR}"> </span><!-- ENDIF --> <span> [ <a href="#" id="color_palette_toggle">{L_COLOUR_SWATCH}</a> ]</span> - <div id="color_palette_placeholder" style="display: none;" data-orientation="h" data-height="12" data-width="15" data-target="#group_colour"></div> + <div id="color_palette_placeholder" style="display: none;" data-color-palette="h" data-height="12" data-width="15" data-target="#group_colour"></div> </dd> </dl> <dl> diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html index c7ec5cc0eb..2e57700fd1 100644 --- a/phpBB/adm/style/acp_users_signature.html +++ b/phpBB/adm/style/acp_users_signature.html @@ -26,7 +26,7 @@ <!-- INCLUDE acp_posting_buttons.html --> <dl class="responsive-columns"> - <dt style="width: 90px;" id="color_palette_placeholder" data-orientation="v" data-height="12" data-width="15" data-bbcode="true"> + <dt style="width: 90px;" id="color_palette_placeholder" data-color-palette="v" data-height="12" data-width="15" data-bbcode="true"> </dt> <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px;"><textarea name="signature" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" data-bbcode="true">{SIGNATURE}</textarea></dd> <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 5px;"> diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 726048bfb0..4c60b4332b 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -1482,7 +1482,7 @@ phpbb.colorPalette = function(dir, width, height) { * @param {jQuery} el jQuery object for the palette container. */ phpbb.registerPalette = function(el) { - var orientation = el.attr('data-orientation'), + var orientation = el.attr('data-color-palette'), height = el.attr('data-height'), width = el.attr('data-width'), target = el.attr('data-target'), @@ -1652,7 +1652,7 @@ $(function() { phpbb.registerPageDropdowns(); - $('[data-orientation]').each(function() { + $('[data-color-palette]').each(function() { phpbb.registerPalette($(this)); }); diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html index 14185ed66b..f7a6af21a7 100644 --- a/phpBB/styles/prosilver/template/posting_buttons.html +++ b/phpBB/styles/prosilver/template/posting_buttons.html @@ -55,7 +55,7 @@ <div id="colour_palette" style="display: none;"> <dl style="clear: left;"> <dt><label>{L_FONT_COLOR}{L_COLON}</label></dt> - <dd id="color_palette_placeholder" class="color_palette_placeholder" data-orientation="h" data-height="12" data-width="15" data-bbcode="true"></dd> + <dd id="color_palette_placeholder" class="color_palette_placeholder" data-color-palette="h" data-height="12" data-width="15" data-bbcode="true"></dd> </dl> </div> diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html index 514f12562a..bd3277ba32 100644 --- a/phpBB/styles/prosilver/template/ucp_groups_manage.html +++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html @@ -58,7 +58,7 @@ <input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" class="inputbox narrow" /> <span style="background-color: #{GROUP_COLOUR};"> </span> [ <a href="#" id="color_palette_toggle">{L_COLOUR_SWATCH}</a> ] - <div id="color_palette_placeholder" class="color_palette_placeholder hidden" data-orientation="h" data-height="12" data-width="15" data-target="#group_colour"></div> + <div id="color_palette_placeholder" class="color_palette_placeholder hidden" data-color-palette="h" data-height="12" data-width="15" data-target="#group_colour"></div> </dd> </dl> <dl>