diff options
Diffstat (limited to 'public/javascripts/admin_interface.js')
| -rw-r--r-- | public/javascripts/admin_interface.js | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/public/javascripts/admin_interface.js b/public/javascripts/admin_interface.js index f378c46..f6d915f 100644 --- a/public/javascripts/admin_interface.js +++ b/public/javascripts/admin_interface.js | |||
| @@ -45,10 +45,6 @@ $(document).ready(function () { | |||
| 45 | menu_item_sorter.initialize(); | 45 | menu_item_sorter.initialize(); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | if ($("#metadata").length != 0) { | ||
| 49 | meta_data.initialize(); | ||
| 50 | } | ||
| 51 | |||
| 52 | if ($("#parent_search_term").length != 0) { | 48 | if ($("#parent_search_term").length != 0) { |
| 53 | parent_search.initialize_search(); | 49 | parent_search.initialize_search(); |
| 54 | } | 50 | } |
| @@ -110,14 +106,6 @@ $(document).ready(function () { | |||
| 110 | }); | 106 | }); |
| 111 | 107 | ||
| 112 | 108 | ||
| 113 | meta_data = { | ||
| 114 | initialize : function() { | ||
| 115 | document.getElementById("metadata_details").addEventListener("toggle", function() { | ||
| 116 | if (this.open) image_interface.initialize(); | ||
| 117 | }); | ||
| 118 | } | ||
| 119 | }; | ||
| 120 | |||
| 121 | cccms = { | 109 | cccms = { |
| 122 | setup_autosave : function() { | 110 | setup_autosave : function() { |
| 123 | 111 | ||
| @@ -364,77 +352,6 @@ menu_item_sorter = { | |||
| 364 | } | 352 | } |
| 365 | } | 353 | } |
| 366 | 354 | ||
| 367 | image_interface = { | ||
| 368 | |||
| 369 | initialize : function() { | ||
| 370 | |||
| 371 | $("#image_browser").hide(); | ||
| 372 | image_interface.initialize_sortable_image_box(); | ||
| 373 | image_interface.connect_browser_and_box(); | ||
| 374 | image_interface.set_droppable_behavior(); | ||
| 375 | image_interface.bind_image_browser_toggle(); | ||
| 376 | }, | ||
| 377 | |||
| 378 | |||
| 379 | set_droppable_behavior : function() { | ||
| 380 | $("ul#image_box").droppable({ | ||
| 381 | out : function(event, ui) { | ||
| 382 | $(ui.draggable).fadeTo("fast", 0.4); | ||
| 383 | |||
| 384 | $(ui.draggable).bind("mouseup", function() { | ||
| 385 | $(this).remove(); | ||
| 386 | }); | ||
| 387 | }, | ||
| 388 | over : function(event, ui) { | ||
| 389 | $(ui.draggable).fadeTo("fast", 1.0); | ||
| 390 | $(ui.draggable).unbind("mouseup"); | ||
| 391 | } | ||
| 392 | }); | ||
| 393 | }, | ||
| 394 | |||
| 395 | connect_browser_and_box : function() { | ||
| 396 | $("#image_browser ul li").draggable({ | ||
| 397 | connectToSortable : 'ul#image_box', | ||
| 398 | helper : 'clone', | ||
| 399 | revert : 'invalid' | ||
| 400 | }); | ||
| 401 | }, | ||
| 402 | |||
| 403 | initialize_sortable_image_box : function() { | ||
| 404 | |||
| 405 | $("ul#image_box").sortable({ | ||
| 406 | revert : true, | ||
| 407 | update : function(event, ui) { | ||
| 408 | images = $("ul#image_box").sortable("serialize", {attribute : "rel"}); | ||
| 409 | |||
| 410 | $.ajax({ | ||
| 411 | type : "POST", | ||
| 412 | url : "/pages/" + $("ul#image_box").attr("rel") + "/sort_images", | ||
| 413 | dataType : "json", | ||
| 414 | data : images + "&_method=put", | ||
| 415 | success : function() { | ||
| 416 | } | ||
| 417 | }); | ||
| 418 | } | ||
| 419 | }); | ||
| 420 | }, | ||
| 421 | |||
| 422 | bind_image_browser_toggle : function() { | ||
| 423 | $("#image_browser_toggle").bind("click", function(){ | ||
| 424 | if ($("#image_browser_toggle").attr("class") == "unselected") { | ||
| 425 | $("#image_browser_toggle").attr("class", "selected"); | ||
| 426 | $("#image_browser").show(); | ||
| 427 | } | ||
| 428 | else { | ||
| 429 | $("#image_browser_toggle").attr("class", "unselected"); | ||
| 430 | $("#image_browser").hide(); | ||
| 431 | } | ||
| 432 | |||
| 433 | return false; | ||
| 434 | }); | ||
| 435 | } | ||
| 436 | } | ||
| 437 | |||
| 438 | rrule_builder = { | 355 | rrule_builder = { |
| 439 | initialize : function() { | 356 | initialize : function() { |
| 440 | rrule_builder.try_populate_from_rrule($("#event_rrule").val()); | 357 | rrule_builder.try_populate_from_rrule($("#event_rrule").val()); |
