| //- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| mixin ignite-form-field-bsdropdown({label, model, name, disabled, required, options, tip}) |
| .dropdown--ignite.ignite-form-field |
| .btn-ignite.btn-ignite--primary-outline( |
| ng-model=model |
| |
| ng-required=required && `${required}` |
| ng-disabled=disabled && `${disabled}` || `!${options}.length` |
| |
| bs-dropdown='' |
| |
| data-trigger='hover focus' |
| data-placement='bottom-right' |
| data-container='self' |
| |
| tabindex='0' |
| aria-haspopup='true' |
| aria-expanded='false' |
| )&attributes(attributes) |
| | !{label} |
| span.icon-right.fa.fa-caret-down |
| |
| ul.dropdown-menu(role='menu') |
| li(ng-repeat=`item in ${options}` ng-if='item.available') |
| a(ng-if='item.click' ng-click='item.click()') {{ item.action }} |
| a(ng-if='item.sref' ui-sref='{{:: item.sref}}') {{ item.action }} |
| |