Skip to content

Commit 3305e2b

Browse files
author
root
committed
Move Sortable helper method to RedmineBootstrapKit
1 parent 351e449 commit 3305e2b

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

Diff for: app/views/repository_protected_branches/index.html.haml

+1-15
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,7 @@
4343
%p{ class: 'nodata' }= l(:label_no_data)
4444

4545
:javascript
46-
// Return a helper with preserved width of cells
47-
var fixHelper = function(e, ui) {
48-
ui.children().each(function() {
49-
$(this).width($(this).width());
50-
});
51-
return ui;
52-
};
53-
5446
$(document).ready(function() {
5547
initModalBoxes(modals);
56-
$('#protected_branches tbody').sortable({
57-
helper: fixHelper,
58-
axis: 'y',
59-
update: function(event, ui) {
60-
$.post($('#protected_branches').data('update-url'), $(this).sortable('serialize'));
61-
}
62-
});
48+
setSortableElement('#protected_branches tbody', '#protected_branches');
6349
});

0 commit comments

Comments
 (0)