Files
gallery3/modules/gallery/views/admin_dashboard.html.php
jhilden f1c91ab977 fixed that you couldn't copy and paste text from the admin dashboard
* made only the block headers draggable, so that the rest of the block could be normal
* this should fix bug #292
2009-06-09 23:54:02 -04:00

39 lines
1.2 KiB
PHP

<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
update_blocks = function() {
$.get("<?= url::site("admin/dashboard/reorder") ?>",
{"csrf": "<?= $csrf ?>",
"dashboard_center[]": $("#gAdminDashboard").sortable(
"toArray", {attribute: "block_id"}),
"dashboard_sidebar[]": $("#gAdminDashboardSidebar").sortable(
"toArray", {attribute: "block_id"})});
};
$(document).ready(function(){
$("#gAdminDashboard .gBlock .ui-widget-header").addClass("gDraggable");
$("#gAdminDashboard").sortable({
connectWith: ["#gAdminDashboardSidebar"],
containment: "document",
cursor: "move",
handle: $(".ui-widget-header"),
opacity: 0.6,
placeholder: "gDropTarget",
stop: update_blocks
});
$("#gAdminDashboardSidebar .gBlock .ui-widget-header").addClass("gDraggable");
$("#gAdminDashboardSidebar").sortable({
connectWith: ["#gAdminDashboard"],
containment: "document",
cursor: "move",
handle: $(".ui-widget-header"),
opacity: 0.6,
placeholder: "gDropTarget",
stop: update_blocks
});
});
</script>
<div id="gAdminDashboard">
<?= $blocks ?>
</div>