|
574 | 574 | container.append($rule);
|
575 | 575 | $rule.find('.rule-filter-container').append($filterSelect);
|
576 | 576 |
|
| 577 | + if ($.fn.selectpicker) { |
| 578 | + $filterSelect.selectpicker({ |
| 579 | + container: 'body', |
| 580 | + style: 'btn-inverse btn-xs', |
| 581 | + width: 'auto', |
| 582 | + showIcon: false |
| 583 | + }); |
| 584 | + } |
| 585 | + |
577 | 586 | if (this.settings.onAfterAddRule) {
|
578 | 587 | this.settings.onAfterAddRule.call(this, $rule);
|
579 | 588 | }
|
|
597 | 606 | $operatorSelect = $(this.getRuleOperatorSelect($rule.attr('id'), operators));
|
598 | 607 |
|
599 | 608 | $operatorContainer.html($operatorSelect);
|
| 609 | + |
| 610 | + if ($.fn.selectpicker) { |
| 611 | + $operatorSelect.selectpicker({ |
| 612 | + container: 'body', |
| 613 | + style: 'btn-inverse btn-xs', |
| 614 | + width: 'auto', |
| 615 | + showIcon: false |
| 616 | + }); |
| 617 | + } |
600 | 618 | };
|
601 | 619 |
|
602 | 620 | /**
|
|
1077 | 1095 | <dl id="'+ group_id +'" class="rules-group-container" '+ (this.settings.sortable ? 'draggable="true"' : '') +'> \
|
1078 | 1096 | <dt class="rules-group-header"> \
|
1079 | 1097 | <div class="btn-group pull-right"> \
|
1080 |
| - <button type="button" class="btn btn-xs btn-success" data-add="rule"><i class="glyphicon glyphicon-plus"></i> '+ this.lang.add_rule +'</button> \ |
1081 |
| - '+ (this.settings.allow_groups ? '<button type="button" class="btn btn-xs btn-success" data-add="group"><i class="glyphicon glyphicon-plus-sign"></i> '+ this.lang.add_group +'</button>' : '') +' \ |
1082 |
| - '+ (!main ? '<button type="button" class="btn btn-xs btn-danger" data-delete="group"><i class="glyphicon glyphicon-remove"></i> '+ this.lang.delete_group +'</button>' : '') +' \ |
| 1098 | + <button type="button" class="btn btn-xs btn-success" data-add="rule"> \ |
| 1099 | + <i class="glyphicon glyphicon-plus"></i> '+ this.lang.add_rule +' \ |
| 1100 | + </button> \ |
| 1101 | + '+ (this.settings.allow_groups ? '<button type="button" class="btn btn-xs btn-success" data-add="group"> \ |
| 1102 | + <i class="glyphicon glyphicon-plus-sign"></i> '+ this.lang.add_group +' \ |
| 1103 | + </button>' : '') +' \ |
| 1104 | + '+ (!main ? '<button type="button" class="btn btn-xs btn-danger" data-delete="group"> \ |
| 1105 | + <i class="glyphicon glyphicon-remove"></i> '+ this.lang.delete_group +' \ |
| 1106 | + </button>' : '') +' \ |
1083 | 1107 | </div> \
|
1084 | 1108 | <div class="btn-group"> \
|
1085 | 1109 | '+ this.getGroupConditions(group_id) +' \
|
|
1107 | 1131 | active = cond == this.settings.default_condition,
|
1108 | 1132 | label = this.lang['condition_'+ cond.toLowerCase()] || cond;
|
1109 | 1133 |
|
1110 |
| - h+= '<label class="btn btn-xs btn-primary '+ (active?'active':'') +'"><input type="radio" name="'+ group_id +'_cond" value="'+ cond +'" '+ (active?'checked':'') +'> '+ label +'</label>'; |
| 1134 | + h+= '\ |
| 1135 | + <label class="btn btn-xs btn-primary '+ (active?'active':'') +'"> \ |
| 1136 | + <input type="radio" name="'+ group_id +'_cond" value="'+ cond +'" '+ (active?'checked':'') +'> '+ label +' \ |
| 1137 | + </label>'; |
1111 | 1138 | }
|
1112 | 1139 |
|
1113 | 1140 | return h;
|
|
1123 | 1150 | <li id="'+ rule_id +'" class="rule-container" '+ (this.settings.sortable ? 'draggable="true"' : '') +'> \
|
1124 | 1151 | <div class="rule-header"> \
|
1125 | 1152 | <div class="btn-group pull-right"> \
|
1126 |
| - <button type="button" class="btn btn-xs btn-danger" data-delete="rule"><i class="glyphicon glyphicon-remove"></i> '+ this.lang.delete_rule +'</button> \ |
| 1153 | + <button type="button" class="btn btn-xs btn-danger" data-delete="rule"> \ |
| 1154 | + <i class="glyphicon glyphicon-remove"></i> '+ this.lang.delete_rule +' \ |
| 1155 | + </button> \ |
1127 | 1156 | </div> \
|
1128 | 1157 | </div> \
|
1129 | 1158 | '+ (this.settings.sortable ? '<div class="drag-handle"><i class="glyphicon glyphicon-sort"></i></div>' : '') +' \
|
|
0 commit comments