Mercurial > hg > batmud > chester
comparison index.php @ 16:2369d74f50a1
Fix cleaning of containers.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 10 Jan 2011 09:18:11 +0200 |
parents | 2aa632a8610f |
children | bd6e836f9641 |
comparison
equal
deleted
inserted
replaced
15:2aa632a8610f | 16:2369d74f50a1 |
---|---|
453 initSettings(); | 453 initSettings(); |
454 updatePage(); | 454 updatePage(); |
455 statusMsg('Welcome to the editor. <b>(c) Copyright 2011 Matti Hämäläinen aka Ggr Pupunen.</b>'); | 455 statusMsg('Welcome to the editor. <b>(c) Copyright 2011 Matti Hämäläinen aka Ggr Pupunen.</b>'); |
456 } | 456 } |
457 | 457 |
458 | |
458 function clearContainers() | 459 function clearContainers() |
459 { | 460 { |
460 var answer = confirm("Really clear (empty) all defined containers and reset item pool to original state?"); | 461 var answer = confirm("Really clear (empty) all defined containers and reset item pool to original state?"); |
461 if (!answer) { | 462 if (!answer) { |
462 statusMsg("Clear operation cancelled."); | 463 statusMsg("Clear operation cancelled."); |
463 return; | 464 return; |
464 } | 465 } |
466 | |
465 initItems(); | 467 initItems(); |
468 | |
466 for (var i = 0; i < list_containers.length; i++) { | 469 for (var i = 0; i < list_containers.length; i++) { |
467 list_containers[i].items = []; | 470 list_containers[i].items = []; |
468 } | 471 if (i == 0) { |
472 curr_container = list_containers[i]; | |
473 curr_container.changed = true; | |
474 } | |
475 } | |
476 | |
469 updatePage(); | 477 updatePage(); |
470 } | 478 } |
471 | 479 |
472 | 480 |
473 function setHTML(id, str) | 481 function setHTML(id, str) |