PageSourceSearch

https://catalog.kuzcolighting.com/assets/controllers/orderable_con…f322fe574a4fe92ac3a9782637406261ccecff49.js

js kuzcolighting.com collected 2026-09-30 15:24:03 UTC 599 bytes, 21 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2
3// Orderable Controller
4// This controller adds reordering functionality to a list of elements
5// It requires the elements to have a data-id attribute with a unique value
6export default class extends Controller {
7  static targets = [ "list", "reorderForm"]
8
9  connect() {
10    // Enable ordering the list through JQuery UI sortable()
11    // Whenever the order is updated submit the form
12   $(this.listTarget).sortable({
13      update: this.submitForm.bind(this)
14    });
15  }
16
17  submitForm(event, ui) {
18    this.reorderFormTarget.requestSubmit()
19  }
20}
21;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.