reorg repolist
This commit is contained in:
parent
999487e721
commit
6c7ce8f193
6 changed files with 36 additions and 33 deletions
|
@ -1,35 +0,0 @@
|
|||
<div ##{ident}>
|
||||
$if onlyCloud reposelector
|
||||
$if not (null repolist)
|
||||
<h2>
|
||||
Cloud repositories
|
||||
$else
|
||||
No cloud repositories are configured yet.
|
||||
$else
|
||||
$if not (null repolist)
|
||||
<h2>
|
||||
Repositories
|
||||
<table .table .table-condensed>
|
||||
<tbody #costsortable>
|
||||
$forall (_num, name, uuid, actions) <- repolist
|
||||
<tr .repoline ##{fromUUID uuid}>
|
||||
<td .handle>
|
||||
<i .icon-resize-vertical></i>
|
||||
#{name}
|
||||
<td .draghide>
|
||||
$if needsEnabled actions
|
||||
<a href="@{setupRepoLink actions}">
|
||||
<i .icon-warning-sign></i> not enabled
|
||||
$else
|
||||
<a href="@{syncToggleLink actions}">
|
||||
$if notSyncing actions
|
||||
<i .icon-pause></i> syncing paused
|
||||
$else
|
||||
<i .icon-refresh></i> syncing enabled
|
||||
<td .draghide>
|
||||
$if needsEnabled actions
|
||||
<a href="@{setupRepoLink actions}">
|
||||
enable
|
||||
$else
|
||||
<a href="@{setupRepoLink actions}">
|
||||
configure
|
|
@ -1,27 +0,0 @@
|
|||
$(function() {
|
||||
var setup = function() {
|
||||
$("#costsortable").sortable({
|
||||
handle: ".handle",
|
||||
cursor: "move",
|
||||
forceHelperSize: true,
|
||||
start: function(event, ui) {
|
||||
ui.item.children(".draghide").hide();
|
||||
},
|
||||
stop: function(event, ui) {
|
||||
ui.item.children(".draghide").show();
|
||||
var list = $("#costsortable").sortable("toArray");
|
||||
var moved = ui.item.attr("id");
|
||||
$.ajax({
|
||||
'url': "@{RepositoriesReorderR}",
|
||||
'data': {
|
||||
'moved': moved,
|
||||
'list': list
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
longpollcallbacks.add(setup);
|
||||
setup();
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue