Heimdall icon indicating copy to clipboard operation
Heimdall copied to clipboard

Error on javascript console: $(...).sortable is not a function

Open lyricnz opened this issue 1 year ago • 4 comments

jquery.min.js:2 jQuery.Deferred exception: $(...).sortable is not a function TypeError: $(...).sortable is not a function
    at HTMLDocument.<anonymous> (http://heimdalldashboard:7990/js/app.js?id=5446aeb4aa754e641c77:633:18)
    at e (http://heimdalldashboard:7990/js/jquery.min.js:2:30310)
    at t (http://heimdalldashboard:7990/js/jquery.min.js:2:30612) undefined

lyricnz avatar Jul 05 '24 04:07 lyricnz

The code in js/app.js like 633 is the first line of below.

  $('#sortable').sortable({
    stop: function stop(event, ui) {
      var idsInOrder = $('#sortable').sortable('toArray', {
        attribute: 'data-id'
      });
      $.post(base + 'order', {
        order: idsInOrder
      });
    }
  });

lyricnz avatar Jul 05 '24 04:07 lyricnz

This is 2.6.1 btw

lyricnz avatar Jul 05 '24 04:07 lyricnz

It looks like "sortable" is part of jquery-ui not jquery? https://jqueryui.com/sortable/

Certainly adding the middle line below to ./resources/views/layouts/app.blade.php seems to have fixed the specific issue

        <script src="{{ asset('js/jquery.min.js') }}"></script>
        <script src="{{ asset('js/jquery-ui.min.js') }}"></script>
        <script src="{{ asset(mix('js/app.js')) }}"></script>

lyricnz avatar Jul 05 '24 05:07 lyricnz

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

LinuxServer-CI avatar Aug 04 '24 15:08 LinuxServer-CI

This issue is locked due to inactivity

github-actions[bot] avatar Nov 02 '24 15:11 github-actions[bot]