Support for Input Append Chosen Select Boxes #461

Closed
wants to merge 7 commits into
from

Projects

None yet

5 participants

@Bakual
Contributor
Bakual commented Sep 28, 2012

Adding support for Input Append Chosen Select Boxes in LESS file "bootstrap-extended". Only Prepend ones were supported so far.

@Bakual Bakual Support for Input Append Chosen Select Boxes
Adding support for Input Append Chosen Select Boxes. Only Prepend ones were supported so far.
1e7932e
@Bakual
Contributor
Bakual commented Dec 26, 2012

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

@phproberto
Member

This patch doesn't modify the parent less files so even being merged changes will be lost in the next compile.

@Bakual
Contributor
Bakual commented Oct 5, 2013

@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?

@phproberto
Member

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?

@Bakual
Contributor
Bakual commented Oct 5, 2013

Updated to master. Should be fine now.

@phproberto
Member

Yes it looks so. Thanks!

@phproberto
Member

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:

chosen-input-append

@mbabker
Member
mbabker commented Oct 10, 2013

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.

@Bakual
Contributor
Bakual commented Oct 11, 2013

@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.

Bakual added some commits Oct 12, 2013
@Bakual Bakual Merge branch 'master' c58463e
@Bakual Bakual Organising the rules better to avoid double rules. Added rule for whe…
…n input-append AND input-prepend is applied (no border-radius then).
98085ec
@Bakual
Contributor
Bakual commented Oct 12, 2013

@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.

@Bakual
Contributor
Bakual commented Oct 12, 2013

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>
@Hackwar
Member
Hackwar commented Mar 2, 2014

Marked as RTC in the tracker. :-)

@Bakual Bakual added the RTC label Mar 3, 2014
@Bakual Bakual closed this in 7503c12 Mar 15, 2014
@Bakual Bakual deleted the Bakual:patch-3 branch Mar 15, 2014
@Bakual Bakual added a commit to Bakual/joomla-cms that referenced this pull request May 12, 2014
@Bakual @Bakual Bakual + Bakual [#29718] Missing support for Input Append Chosen Select Boxes (Fix 0e583e9
@zero-24 zero-24 removed the RTC label Oct 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment