User tests: Successful: Unsuccessful:
Chosen dropdown provides 2 ways to set the width of the dropdown element:
<select style="width: 500px;" ...
) orwidth: '600px'
)The new style introduced in the Isis template forces the width to a different value (which also causes a horizontal collapse in case of blank items).
There is no reasonable way for third party extensions developers to specify a custom with for their own dropdown elements.
To fix this problem, I've removed two css lines that in principle, we should not use anyway, since the chosen dropdown control offers other ways to set its width.
However it's possible that @ciar4n remembers the reason for these lines and can help us by providing further details.
Create a select anywhere in the back-end
<?php
JFactory::getDocument()->addStyleSheet(JUri::root(true) . "/media/jui/css/chosen.css");
JFactory::getDocument()->addScript(JUri::root(true) . "/media/jui/js/chosen.jquery.js");
<div class="control-group">
<select style="width: 500px;" class="chosenize">
<option>Option</option>
</select>
</div>
Pay attention to encase it in a "control-group" wrapper as shown, since the issue only affects dropdown elements within a "control-group" wrapper.
Also pay attention to the class assigned (in this case "chosenize"), which must correspond to that used in the following JavaScript.
Run the following JavaScript to transform the select into a chosen dropdown:
jQuery(document).ready(function ($)
{
// 600px overrides the value of 500px specified in the PHP code
$('.chosenize').chosen({ width: '600px' });
});
I expect the dropdown was 500 or 600 px wide, with the precedence to the value specified in the JavaScript.
The dropdown is 220 px wide.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Templates (admin) |
Thanks.
That explains the warning I saw: "Can't merge it automatically".
The warning because you had conflicts - probably not related to not generating the less file
Brian, please bear with me. Should I also include the regenerated .css file in my PR, or should I limit the commit to the .less file?
the PR should include the less file and any generated css files. Remember it might generate more than you expect
Thanks.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-28 16:58:19 |
Closed_By | ⇒ | demis-palma | |
Labels |
Added:
?
|
please dont directly edit any css files. You should make the edit in the respective less file and then run generatecess.php from the /build folder