Skip to content

A free open source IT asset/license management system

Partial - add support for drag+drop reordering

snipe679a6a5522ba
diff --git a/resources/views/custom_fields/show.blade.php b/resources/views/custom_fields/show.blade.php
index ad20adae84..446c5a6444 100644
--- a/resources/views/custom_fields/show.blade.php
+++ b/resources/views/custom_fields/show.blade.php
@@ -53,7 +53,7 @@
</tfoot>
<tbody>
@foreach($custom_fieldset->fields AS $field)
- <tr class="cansort">
+ <tr class="cansort" data-index="{{ $field->pivot->custom_field_id }}">
<td>
<!-- drag handle -->
<span class="handle">
@@ -93,6 +93,13 @@
updateIndex = function(e, ui) {
$('td.index', ui.item.parent()).each(function (i) {
$(this).html(i + 1);
+ $.ajax({
+ url: "{{config('app.url') }}/api/custom_fields/order",
+ success: function(data) {
+ // do some stuff here
+
+ }
+ });
});
};