Cette fois c'est bon, le css est dans le header.
Je vois des slashs et des antislashs dans l'url, c'est normal ?
<link href="[URL="http://digigrids.no-ip.org/private/joomla30/modules/mod_helloworld/elements/custom.css"]/modules\mod_helloworld\elements/custom.css[/URL]" rel="stylesheet" />
<fields name="params" addfieldpath="/modules/mod_custom/elements/"> <fieldset name="basic"> <field name="xtitle" type="radio" class="btn-group btn-group-yesno" default="0" label="MOD_CUSTOM_LABEL" description="MOD_CUSTOM_LABEL_DESC"> <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields>
[for="jform_params_xtitle0"].active { background-color: orange; color: blue; } [for="jform_params_xtitle1"].active { background-color: blue; color: orange; }
label[for="jform_params_backtotoptype0"].active, label[for="jform_params_backtotoptype1"].active { background:#FF8000; border-color:#FF8000; }
$assetpath = JUri::base(true)."/modules/mod_custom_test/assets/"; $doc->addStyleSheet($assetpath.'mod_custom_test.css');
[for="jform_params_balanceposition0"].active { background-color: blue; color: red; }
// Turn radios into btn-group $('.radio.btn-group label').addClass('btn'); $('fieldset.btn-group').each(function() { // Handle disabled, prevent clicks on the container, and add disabled style to each button if ($(this).prop('disabled')) { $(this).css('pointer-events', 'none').off('click'); $(this).find('.btn').addClass('disabled'); } }); $('.btn-group label:not(.active)').click(function() { var label = $(this); var input = $('#' + label.attr('for')); if (!input.prop('checked')) { label.closest('.btn-group').find('label').removeClass('active btn-success btn-danger btn-primary'); if (label.closest('.btn-group').hasClass('btn-group-reversed')) { if (input.val() == '') { label.addClass('active btn-primary'); } else if (input.val() == 0) { label.addClass('active btn-success'); } else { label.addClass('active btn-danger'); } } else { if (input.val() == '') { label.addClass('active btn-primary'); } else if (input.val() == 0) { label.addClass('active btn-danger'); } else { label.addClass('active btn-success'); } } input.prop('checked', true); input.trigger('change'); } }); $('.btn-group input[checked=checked]').each(function() { var $self = $(this); var attrId = $self.attr('id'); if ($self.parent().hasClass('btn-group-reversed')) { if ($self.val() == '') { $('label[for=' + attrId + ']').addClass('active btn-primary'); } else if ($self.val() == 0) { $('label[for=' + attrId + ']').addClass('active btn-success'); } else { $('label[for=' + attrId + ']').addClass('active btn-danger'); } } else { if ($self.val() == '') { $('label[for=' + attrId + ']').addClass('active btn-primary'); } else if ($self.val() == 0) { $('label[for=' + attrId + ']').addClass('active btn-danger'); } else { $('label[for=' + attrId + ']').addClass('active btn-success'); } } });
[for="jform_params_nomparamx"][B].active[/B] { background-color: orange; color: red; }
<field name="bgtest" type="radio" class="btn-group btn-group-yesno" default="1" label="Background Test" description="Ceci est un test."> <option value="1">Avant</option> <option value="0">Après</option> </field>
[for="jform_params_nomparamx"] { background-color: orange; color: red; }
INFO_LABEL="<b style='color:blue'>info</b>"
Laisser un commentaire: