kokizzu / wwwsqldesigner

Automatically exported from code.google.com/p/wwwsqldesigner
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Patch to allow loading/saving from localStorage #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
patch to allow loading/saving from localStorage!
tested myself, and seems to work great!
preview url:
https://divinity76-wwwsqldesigner-testbed.googlecode.com/hg/index.html

Original issue reported on code.google.com by divinity76@gmail.com on 19 Jun 2012 at 5:32

Attachments:

GoogleCodeExporter commented 9 years ago
patch for /index.html and /locale/en.xml

again, had to use a different .patch generator, due to googlecode limitations.. 
i hope its compatible

Original comment by divinity76@gmail.com on 19 Jun 2012 at 5:39

Attachments:

GoogleCodeExporter commented 9 years ago
notes: based on clientload and clientsave
should work in Chrome4+, Firefox 3.5+, IE8+, Opera10.50+, Safari/WebKit 4+,
and error-checking code is implemented
( https://developer.mozilla.org/en/DOM/Storage )

Original comment by divinity76@gmail.com on 19 Jun 2012 at 5:43

GoogleCodeExporter commented 9 years ago
wups,
these patches includes the changes i proposed in 
https://code.google.com/p/wwwsqldesigner/issues/detail?id=159
, sorry about that.. i can re-make the above patches without the UNSIGNED code, 
if requested..

Original comment by divinity76@gmail.com on 19 Jun 2012 at 5:48

GoogleCodeExporter commented 9 years ago
Nice, this is a very useful addition. Please re-send the pure patch as per your 
cxomment #3; I will gladly include it.

Original comment by ondrej.zara on 24 Jun 2012 at 3:39

GoogleCodeExporter commented 9 years ago
here you go

also fixed a typo, and learned that javascript strings are UTF-16 (aka 2 bytes 
per character).. although thinking back at it now, that 5MB warning may be 
unnecessary anyway, since it checks that content was saved..

related: 5MB seems to be a w3c recommendation, 
http://dev.w3.org/html5/webstorage/#disk-space

and 5 megabytes would be a crazy big database structure anyway, the biggest i 
ever designed with wwwsqldesigner got approximately 35178 bytes ( .length*2), 
circa 0.67% of 5MB, so i consider it mostly a theoretical limit.

Original comment by divinity76@gmail.com on 24 Jun 2012 at 8:38

Attachments:

GoogleCodeExporter commented 9 years ago
Improved the code, fixed some minor issues, added cs locale.

Original comment by ondrej.zara on 25 Jun 2012 at 2:22