changeset 10:e2f975b0c518

Fix reset functionality. Add startup message.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 10 Jan 2011 07:35:15 +0200
parents da404b8ff282
children fb503ee5489f
files index.php
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/index.php	Mon Jan 10 07:21:04 2011 +0200
+++ b/index.php	Mon Jan 10 07:35:15 2011 +0200
@@ -411,7 +411,9 @@
   list_containers = [".$str."];
   list_items = ".(isset($data["items"]) ? getContainerObject("items", 10000, $data["items"]) : "null").";
 ".$jsData."
+  curr_container = null;
   updatePage();
+  statusMsg('Welcome to the editor. <b>(c) Copyright 2011 Matti H&auml;m&auml;l&auml;inen aka Ggr Pupunen.</b>');
 }
 ";
 ?>
@@ -425,6 +427,7 @@
     statusMsg("Reset operation cancelled.");
     return;
   }
+  initAll();
 }
 
 function setHTML(id, str)
@@ -551,6 +554,11 @@
 // Change current container
 function containerChange(f)
 {
+  if (curr_container == null) {
+    statusMsg("No current container, create or select one.");
+    return;
+  }
+
   var c = validateContainerData(f);
   if (c == null)
     return;