add color swatches to tag category editor
This commit is contained in:
parent
cc8e4ffd47
commit
39ecf9b3eb
2 changed files with 12 additions and 3 deletions
|
@ -23,11 +23,20 @@
|
|||
width:60%;
|
||||
}
|
||||
.tagcategoryblock td:last-child span {
|
||||
width:7ch;
|
||||
padding:0.24rem 0.7rem 0.5rem 0;
|
||||
display:block;
|
||||
display:inline-block;
|
||||
}
|
||||
.tagcategoryblock button {
|
||||
width:100%;
|
||||
margin-top:0.4rem;
|
||||
padding:0.2rem 0.6rem;
|
||||
}
|
||||
|
||||
.tagcategoryblock .tc_colorswatch {
|
||||
display:inline-block;
|
||||
vertical-align:middle;
|
||||
height:1.25rem;
|
||||
width:1.25rem;
|
||||
border-radius:4px;
|
||||
}
|
||||
|
|
|
@ -49,12 +49,12 @@ class TagCategoriesTheme extends Themelet
|
|||
<tr>
|
||||
<td>Color</td>
|
||||
<td>
|
||||
<span>'.$tag_color.'</span>
|
||||
<span>'.$tag_color.'</span><div class="tc_colorswatch" style="background-color:'.$tag_color.'"></div>
|
||||
<input type="text" name="tc_color" style="display:none" value="'.$tag_color.'">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<button class="tc_edit" type="button" onclick="$(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') tr + tr td span\').hide(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') td input\').show(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') .tc_edit\').hide(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') .tc_submit\').show();">Edit</button>
|
||||
<button class="tc_edit" type="button" onclick="$(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') tr + tr td span\').hide(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') td input\').show(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') .tc_edit\').hide(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') .tc_colorswatch\').hide(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') .tc_submit\').show();">Edit</button>
|
||||
<button class="tc_submit" type="submit" style="display:none;" name="tc_status" value="edit">Submit</button>
|
||||
<button class="tc_submit" type="button" style="display:none;" onclick="$(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') .tc_delete\').show(); $(this).hide();">Delete</button>
|
||||
<button class="tc_delete" type="submit" style="display:none;" name="tc_status" value="delete">Really, really delete</button>
|
||||
|
|
Reference in a new issue