# HG changeset patch # User Matti Hamalainen # Date 1294643891 -7200 # Node ID 2369d74f50a1c39021f893e6dbebbf50de5570ae # Parent 2aa632a8610f475ea9420bea0c7f839a60796464 Fix cleaning of containers. diff -r 2aa632a8610f -r 2369d74f50a1 index.php --- a/index.php Mon Jan 10 09:11:49 2011 +0200 +++ b/index.php Mon Jan 10 09:18:11 2011 +0200 @@ -455,6 +455,7 @@ statusMsg('Welcome to the editor. (c) Copyright 2011 Matti Hämäläinen aka Ggr Pupunen.'); } + function clearContainers() { var answer = confirm("Really clear (empty) all defined containers and reset item pool to original state?"); @@ -462,10 +463,17 @@ statusMsg("Clear operation cancelled."); return; } + initItems(); + for (var i = 0; i < list_containers.length; i++) { list_containers[i].items = []; + if (i == 0) { + curr_container = list_containers[i]; + curr_container.changed = true; + } } + updatePage(); }