2008-06-09 06:20:15 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
var model = {
|
2008-11-18 02:55:25 +00:00
|
|
|
|
2008-06-09 06:20:15 +00:00
|
|
|
onRenderEnd: function() {
|
2008-11-18 02:55:25 +00:00
|
|
|
|
2008-06-09 06:20:15 +00:00
|
|
|
$.ui.disableSelection($('#sortable-ex').get(0));
|
2008-11-18 02:55:25 +00:00
|
|
|
|
2008-06-09 06:20:15 +00:00
|
|
|
},
|
2008-11-18 02:55:25 +00:00
|
|
|
|
2008-06-09 06:20:15 +00:00
|
|
|
renderAt: '#containerDemo',
|
|
|
|
|
|
|
|
title: 'Sortable Demos',
|
2008-11-18 02:55:25 +00:00
|
|
|
|
2008-06-09 06:20:15 +00:00
|
|
|
demos: [
|
|
|
|
|
|
|
|
{
|
2008-11-18 02:55:25 +00:00
|
|
|
|
2008-06-09 06:20:15 +00:00
|
|
|
title: 'Sortable',
|
|
|
|
desc: 'With few lines of code you could have sortable elements. You can try more options on the fly!',
|
|
|
|
html: { url: 'templates/ui.sortable.ex1.html' },
|
|
|
|
destroy: '$("#selectedUsers").sortable("destroy");',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
desc: 'Make a simple sortable list',
|
|
|
|
source:
|
|
|
|
'$("#selectedUsers").sortable({ connectWith: ["#userList"] }); ' +
|
|
|
|
'$("#userList").sortable({ connectWith: ["#selectedUsers"] });'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
title: 'Sortable',
|
|
|
|
desc: 'Floating, with defined placeholder class',
|
|
|
|
html: { url: 'templates/ui.sortable.ex3.html' },
|
|
|
|
destroy: '$("#placeholderSortable").sortable("destroy");',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
desc: 'Floating, with defined placeholder class',
|
2008-09-16 12:40:48 +00:00
|
|
|
source: '$("#placeholderSortable").sortable({ placeholder: "ui-selected", forcePlaceholderSize: true, revert: true });'
|
2008-06-09 06:20:15 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
|
|
|
|
uiRenderDemo(model);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|