User tests: Successful: Unsuccessful:
Adding support for Input Append Chosen Select Boxes in LESS file "bootstrap-extended". Only Prepend ones were supported so far.
This patch doesn't modify the parent less files so even being merged changes will be lost in the next compile.
@phproberto This patch has two commits, the first does the change in media/jui/less/bootstrap-extended.less
and then the second commit uses generatecss.php
to create the template.css
files for isis and protostar.
I think this is the correct way to do it. Or do I miss something?
Yes but there are changes in properties that doesn't come from your edited less files. Maybe they come from a previous patch that forgot to edit less files and it's reverted but can you double check it recompiling?
Updated to master. Should be fine now.
Yes it looks so. Thanks!
I think we should provide a sample code for this on the tracker or it won't be never tested.
<?php
JHtml::_('formbehavior.chosen', '.chosen');
?>
<div class="input-append input-prepend">
<span class="add-on">$</span>
<select name="jform[metadata][robots]" id="jform_metadata_robots" style="display: none;" class="chosen">
<option selected="selected" value="">Use Global</option>
<option value="index, follow">Index, Follow</option>
<option value="noindex, follow">No index, follow</option>
<option value="index, nofollow">Index, No follow</option>
<option value="noindex, nofollow">No index, no follow</option>
</select>
<span class="add-on">.00</span>
</div>
Will show a field like:
Not knowing this PR was here (or maybe the PR came after), I also had a patch on the tracker using this branch - https://github.com/mbabker/joomla-cms/tree/appendWithLayout - there's a layout there that made it super easy to test the change.
@mbabker I saw your post back in June in the tracker and had a look at the code, but unfortunately never found the time to test it. From looking at it you did the same thing. You did organise it better where I just copy pasted it from the existing code. However I saw that you changed the
.input-prepend .chzn-container-active .chzn-single-with-drop {
-webkit-border-radius: 0 3px 0 0;
-moz-border-radius: 0 3px 0 0;
border-radius: 0 3px 0 0;
}
to
.input-prepend .chzn-container-active .chzn-single-with-drop {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
See that you changed the border-radius from one corner to two corners? I wanted to test this first to see if it maybe was intentional or an accident.
@mbabker I had time to test your patch and the border-radius is indeed wrong there. But it took me some time to realise where it's applied. You have to look at the radius when the select is open, then the bottom radius should be 0, or you have a small dent between the input field and the dropdown part.
However I took the organising from you and put it into my PR as you did it better.
@phproberto While testing also found an issue when you have both, an append and a prepend. Then all radius should be 0. You can see that on your screenshot if you look close enough :)
PR is updated and should again be fine to test.
Updated layout to test all cases at once:
<?php JHtml::_('formbehavior.chosen', '.chosen'); ?>
<div class="input-prepend">
<span class="add-on">$</span>
<select name="test1" id="test1" class="chosen">
<option selected="selected" value="0">No</option>
<option value="1">Yes</option>
</select>
</div><br/>
<div class="input-append">
<select name="test2" id="test2" class="chosen">
<option selected="selected" value="0">No</option>
<option value="1">Yes</option>
</select>
<span class="add-on">.00</span>
</div><br/>
<div class="input-prepend input-append">
<span class="add-on">$</span>
<select name="test3" id="test3" class="chosen">
<option selected="selected" value="0">No</option>
<option value="1">Yes</option>
</select>
<span class="add-on">.00</span>
</div>
Marked as RTC in the tracker. :-)
Compiled the CSS files using generatecss.php.
Also trackeritem is here for reference: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=29718