From a22a419bc7ea0dc45f9965e6ffebf42417212d52 Mon Sep 17 00:00:00 2001 From: hallgren Date: Wed, 3 Apr 2013 20:24:57 +0000 Subject: Simple Translation Tool: initial support for editing source segments in the minibar --- src/www/gfse/index.html | 3 ++- src/www/gfse/localstorage.js | 29 ++--------------------------- src/www/gfse/share.html | 3 ++- 3 files changed, 6 insertions(+), 29 deletions(-) (limited to 'src/www/gfse') diff --git a/src/www/gfse/index.html b/src/www/gfse/index.html index c607b4374..cfa89762d 100644 --- a/src/www/gfse/index.html +++ b/src/www/gfse/index.html @@ -33,12 +33,13 @@ This page does not work without JavaScript.
HTML -Last modified: Tue Nov 20 13:39:47 CET 2012 +Last modified: Wed Apr 3 20:30:24 CEST 2013
About

  
 
+
 
 
 
diff --git a/src/www/gfse/localstorage.js b/src/www/gfse/localstorage.js
index 162b1db3b..11ae0973c 100644
--- a/src/www/gfse/localstorage.js
+++ b/src/www/gfse/localstorage.js
@@ -1,29 +1,4 @@
 
-// Grammars are stored locally in the browser using localStorage.
-// See http://diveintohtml5.info/storage.html
+//Needs ../js/localstorage.js
 
-function supports_html5_storage() {
-  try {
-    return 'localStorage' in window && window['localStorage'] !== null;
-  } catch (e) {
-    return false;
-  }
-}
-
-var local={
-    prefix:"gf.editor.simple.grammar",
-    get: function (name,def) {
-	var id=this.prefix+name
-	return localStorage[id] ? JSON.parse(localStorage[id]) : def;
-    },
-    put: function (name,value) {
-	var id=this.prefix+name;
-	localStorage[id]=JSON.stringify(value);
-    },
-    remove: function(name) {
-	var id=this.prefix+name;
-	localStorage.removeItem(id);
-    },
-    get count() { return this.get("count",0); },
-    set count(v) { this.put("count",v); }
-}
+var local=appLocalStorage("gf.editor.simple.grammar")
diff --git a/src/www/gfse/share.html b/src/www/gfse/share.html
index ff92d2f73..9a5c0bb7c 100644
--- a/src/www/gfse/share.html
+++ b/src/www/gfse/share.html
@@ -13,8 +13,9 @@
 
 
-Last modified: Tue Nov 20 13:39:57 CET 2012 +Last modified: Wed Apr 3 21:53:09 CEST 2013 + -- cgit v1.2.3