Merge pull request #2037 from prototech/ticket/12080

[ticket/12080] Fix color palettes when responsive.
This commit is contained in:
Nathan Guse 2014-02-20 20:59:14 -06:00
commit 4f6b9080e8
4 changed files with 23 additions and 6 deletions

View file

@ -87,7 +87,7 @@
</div> </div>
<!-- EVENT acp_users_signature_editor_buttons_after --> <!-- EVENT acp_users_signature_editor_buttons_after -->
<dl> <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-orientation="v" data-height="12" data-width="15" data-bbcode="true">
</dt> </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;"><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>

View file

@ -1045,6 +1045,14 @@ table.styles td.users, table td.mark {
table.responsive.styles td:first-child > dfn, table.responsive td.actions > dfn { table.responsive.styles td:first-child > dfn, table.responsive td.actions > dfn {
display: none !important; display: none !important;
} }
.horizontal-palette td:nth-child(2n), .vertical-palette tr:nth-child(2n) {
display: none;
}
.colour-palette a {
display: inline-block !important;
}
} }
/* General form styles /* General form styles
@ -1353,6 +1361,10 @@ fieldset dt {
border-left: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC;
} }
fieldset #color_palette_placeholder {
padding-top: 0;
}
fieldset dd { fieldset dd {
margin: 0 0 0 45%; margin: 0 0 0 45%;
padding: 0 0 0 5px; padding: 0 0 0 5px;
@ -1419,6 +1431,10 @@ input:focus, textarea:focus {
width: auto; width: auto;
} }
fieldset .responsive-columns dt {
float: left;
}
.ltr fieldset dd { .ltr fieldset dd {
padding-left: 20px; padding-left: 20px;
} }

View file

@ -994,7 +994,8 @@ phpbb.colorPalette = function(dir, width, height) {
numberList[3] = 'BF'; numberList[3] = 'BF';
numberList[4] = 'FF'; numberList[4] = 'FF';
html += '<table style="width: auto;">'; var table_class = (dir == 'h') ? 'horizontal-palette' : 'vertical-palette';
html += '<table class="not-responsive colour-palette ' + table_class + '" style="width: auto;">';
for (r = 0; r < 5; r++) { for (r = 0; r < 5; r++) {
if (dir == 'h') { if (dir == 'h') {

View file

@ -303,20 +303,20 @@ dl.pmlist dd:first-of-type {
display: none; display: none;
} }
#colour_palette table, #colour_palette tbody, #colour_palette tr { .colour-palette, .colour-palette tbody, .colour-palette tr {
display: block; display: block;
} }
#colour_palette td { .colour-palette td {
display: inline-block; display: inline-block;
margin-right: 2px; margin-right: 2px;
} }
#colour_palette td:nth-child(2n) { .horizontal-palette td:nth-child(2n), .vertical-palette tr:nth-child(2n) {
display: none; display: none;
} }
#colour_palette a { .colour-palette a {
display: inline-block !important; display: inline-block !important;
} }