chore: initial import for test contour with k3s CI
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { Controller } from 'stimulus'
|
||||
import selectpicker from 'bootstrap-select'
|
||||
import 'bootstrap-select/dist/css/bootstrap-select.css'
|
||||
|
||||
/*
|
||||
* This is an example Stimulus controller!
|
||||
*
|
||||
* Any element with a data-controller="selectpicker" attribute will cause
|
||||
* this controller to be executed. The name "selectpicker" comes from the filename:
|
||||
* selectpicker_controller.js -> "selectpicker"
|
||||
*
|
||||
* Delete this file or adapt it for your use!
|
||||
*/
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
var placeholder = 'ничего не выбрано'
|
||||
|
||||
if (this.element.dataset.placeholder) {
|
||||
placeholder = this.element.dataset.placeholder;
|
||||
}
|
||||
|
||||
jQuery(this.element).selectpicker({
|
||||
noneSelectedText : placeholder
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user