Changeset 904655
- Timestamp:
- 04/29/2014 09:19:41 AM (12 years ago)
- Location:
- aparg-slider
- Files:
-
- 2 edited
-
tags/1.2/js/main.js (modified) (4 diffs)
-
trunk/js/main.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
aparg-slider/tags/1.2/js/main.js
r902345 r904655 27 27 28 28 } 29 30 31 function sorting_slides(){ 32 if(jQuery("#img_cont").size() > 0 && jQuery("#img_cont").children().size()>=2) 33 { 34 var sortable_container = jQuery("#img_cont").height(); 35 36 jQuery("#slide_img_container tbody").sortable({ 37 items: "tr.sortable-row", 38 cursor:"move", 39 start: function(e, ui){ 40 ui.placeholder.height(ui.item.height()); 41 jQuery(this).children("tr.sortable-row").height(ui.item.height()); 42 }, 43 helper: function(e, ui) { 44 ui.children().each(function() { 45 jQuery(this).width(jQuery(this).width()); 46 47 }); 48 ui.height(ui.height()); 49 50 return ui; 51 }, 52 stop: function(event,ui){ 53 jQuery(this).children("tr.sortable-row").height("auto"); 54 }, 55 update: function(e,ui) 56 { 57 jQuery(".row").each(function(row_id){ 58 jQuery(this).attr("id","row_"+row_id); 59 60 jQuery(this).find("table").attr("id","table_"+row_id); 61 jQuery(this).find(".hidden_img").attr("name","img["+row_id+"]"); 62 jQuery(this).find(".hidden_title").attr("name","title["+row_id+"]"); 63 jQuery(this).find(".addinput").attr("id", row_id); 64 jQuery(this).find(".desc").each(function(i) 65 { 66 jQuery(this).attr("id","desc_"+row_id+""+i); 67 jQuery(this).attr("name","desc["+row_id+"]["+i+"]"); 68 }); 69 jQuery(this).find(".delete_img").attr("deleted_row_id",row_id); 70 }); 71 warn_on_unload = "Leaving this page will cause any unsaved data to be lost."; 72 } 73 }); 74 } 75 } 76 29 77 /* **** */ 30 78 … … 82 130 }); 83 131 } 132 133 sorting_slides() 84 134 /* **** */ 85 135 … … 207 257 } 208 258 }); 259 209 260 // **** // 210 261 … … 376 427 /* **** */ 377 428 jQuery(window).load(function (){ 378 if(jQuery("#img_cont").size() > 0 && jQuery("#img_cont").children().size()>=2) 379 { 380 var sortable_container = jQuery("#img_cont").height(); 381 jQuery("#slide_img_container tbody").sortable({ 382 items: "tr.sortable-row", 383 cursor:"move", 384 start: function(e, ui){ 385 ui.placeholder.height(ui.item.height()); 386 jQuery(this).children("tr.sortable-row").height(ui.item.height()); 387 }, 388 helper: function(e, ui) { 389 ui.children().each(function() { 390 jQuery(this).width(jQuery(this).width()); 391 392 }); 393 ui.height(ui.height()); 394 395 return ui; 396 }, 397 stop: function(event,ui){ 398 jQuery(this).children("tr.sortable-row").height("auto"); 399 }, 400 update: function(e,ui) 401 { 402 jQuery(".row").each(function(row_id){ 403 jQuery(this).attr("id","row_"+row_id); 404 405 jQuery(this).find("table").attr("id","table_"+row_id); 406 jQuery(this).find(".hidden_img").attr("name","img["+row_id+"]"); 407 jQuery(this).find(".hidden_title").attr("name","title["+row_id+"]"); 408 jQuery(this).find(".addinput").attr("id", row_id); 409 jQuery(this).find(".desc").each(function(i) 410 { 411 jQuery(this).attr("id","desc_"+row_id+""+i); 412 jQuery(this).attr("name","desc["+row_id+"]["+i+"]"); 413 }); 414 jQuery(this).find(".delete_img").attr("deleted_row_id",row_id); 415 }); 416 warn_on_unload = "Leaving this page will cause any unsaved data to be lost."; 417 } 418 }); 419 } 429 430 sorting_slides(); 420 431 421 432 switchopt(); -
aparg-slider/trunk/js/main.js
r902345 r904655 27 27 28 28 } 29 30 31 function sorting_slides(){ 32 if(jQuery("#img_cont").size() > 0 && jQuery("#img_cont").children().size()>=2) 33 { 34 var sortable_container = jQuery("#img_cont").height(); 35 36 jQuery("#slide_img_container tbody").sortable({ 37 items: "tr.sortable-row", 38 cursor:"move", 39 start: function(e, ui){ 40 ui.placeholder.height(ui.item.height()); 41 jQuery(this).children("tr.sortable-row").height(ui.item.height()); 42 }, 43 helper: function(e, ui) { 44 ui.children().each(function() { 45 jQuery(this).width(jQuery(this).width()); 46 47 }); 48 ui.height(ui.height()); 49 50 return ui; 51 }, 52 stop: function(event,ui){ 53 jQuery(this).children("tr.sortable-row").height("auto"); 54 }, 55 update: function(e,ui) 56 { 57 jQuery(".row").each(function(row_id){ 58 jQuery(this).attr("id","row_"+row_id); 59 60 jQuery(this).find("table").attr("id","table_"+row_id); 61 jQuery(this).find(".hidden_img").attr("name","img["+row_id+"]"); 62 jQuery(this).find(".hidden_title").attr("name","title["+row_id+"]"); 63 jQuery(this).find(".addinput").attr("id", row_id); 64 jQuery(this).find(".desc").each(function(i) 65 { 66 jQuery(this).attr("id","desc_"+row_id+""+i); 67 jQuery(this).attr("name","desc["+row_id+"]["+i+"]"); 68 }); 69 jQuery(this).find(".delete_img").attr("deleted_row_id",row_id); 70 }); 71 warn_on_unload = "Leaving this page will cause any unsaved data to be lost."; 72 } 73 }); 74 } 75 } 76 29 77 /* **** */ 30 78 … … 82 130 }); 83 131 } 132 133 sorting_slides() 84 134 /* **** */ 85 135 … … 207 257 } 208 258 }); 259 209 260 // **** // 210 261 … … 376 427 /* **** */ 377 428 jQuery(window).load(function (){ 378 if(jQuery("#img_cont").size() > 0 && jQuery("#img_cont").children().size()>=2) 379 { 380 var sortable_container = jQuery("#img_cont").height(); 381 jQuery("#slide_img_container tbody").sortable({ 382 items: "tr.sortable-row", 383 cursor:"move", 384 start: function(e, ui){ 385 ui.placeholder.height(ui.item.height()); 386 jQuery(this).children("tr.sortable-row").height(ui.item.height()); 387 }, 388 helper: function(e, ui) { 389 ui.children().each(function() { 390 jQuery(this).width(jQuery(this).width()); 391 392 }); 393 ui.height(ui.height()); 394 395 return ui; 396 }, 397 stop: function(event,ui){ 398 jQuery(this).children("tr.sortable-row").height("auto"); 399 }, 400 update: function(e,ui) 401 { 402 jQuery(".row").each(function(row_id){ 403 jQuery(this).attr("id","row_"+row_id); 404 405 jQuery(this).find("table").attr("id","table_"+row_id); 406 jQuery(this).find(".hidden_img").attr("name","img["+row_id+"]"); 407 jQuery(this).find(".hidden_title").attr("name","title["+row_id+"]"); 408 jQuery(this).find(".addinput").attr("id", row_id); 409 jQuery(this).find(".desc").each(function(i) 410 { 411 jQuery(this).attr("id","desc_"+row_id+""+i); 412 jQuery(this).attr("name","desc["+row_id+"]["+i+"]"); 413 }); 414 jQuery(this).find(".delete_img").attr("deleted_row_id",row_id); 415 }); 416 warn_on_unload = "Leaving this page will cause any unsaved data to be lost."; 417 } 418 }); 419 } 429 430 sorting_slides(); 420 431 421 432 switchopt();
Note: See TracChangeset
for help on using the changeset viewer.