Sortable elements
This commit is contained in:
parent
54faa4dca2
commit
e3599a446f
3 changed files with 19 additions and 3 deletions
|
|
@ -28,3 +28,17 @@ label {
|
|||
#list {
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.entry {
|
||||
margin: 0 3px 3px 3px;
|
||||
padding: 0.4em;
|
||||
padding-left: 1.5em;
|
||||
width: 75%;
|
||||
height: 18px;
|
||||
border: 2px outset rgb(255,228,196);
|
||||
background-color: rgb(245,245,220);
|
||||
}
|
||||
|
||||
.entry span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
|
@ -113,10 +113,13 @@ edit button.
|
|||
|
||||
buildlist: (data) ->
|
||||
$('#list').show 100
|
||||
@.additem item for item in @data.filedata
|
||||
$('#sortlist').append @.additem item for item in @data.filedata
|
||||
$('#sortlist').sortable().disableSelection()
|
||||
|
||||
|
||||
additem: (item) ->
|
||||
alert dumpjson item
|
||||
$("<li class='entry' id='#{item.file}'><span class='ui-icon ui-icon-arrowthick-2-n-s'></span>#{item.author} : #{item.name} : #{item.file}</li>")
|
||||
|
||||
|
||||
editline: (data) ->
|
||||
$("#formica").dialog {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
<div class='hidden' id='list'>
|
||||
<ol id='sortlist'>
|
||||
<li class='entry'author - title></li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue