diff options
author | Adam Kocoloski <adam.kocoloski@gmail.com> | 2011-01-20 12:43:37 -0500 |
---|---|---|
committer | Adam Kocoloski <adam.kocoloski@gmail.com> | 2011-01-20 13:05:41 -0500 |
commit | f79d0a666a5fb9541a0925db5111208a94631065 (patch) | |
tree | 392d85a8a9887ddc8f6268a48a65537b21734a7d /rel/overlay/share/www/script/futon.js | |
parent | 2ea18bdaa19ea7f2da1a5dccce65d50cf0efc64d (diff) | |
parent | 94286611038e661487382ed834103853e88fdf69 (diff) |
Merge CouchDB 1.0.2 release candidate
Conflicts:
Makefile.am
acinclude.m4.in
apps/couch/src/couch_db.erl
apps/couch/src/couch_db_updater.erl
apps/couch/src/couch_rep.erl
apps/couch/src/couch_rep_reader.erl
apps/couch/src/couch_view.erl
apps/couch/src/couch_view_group.erl
rel/overlay/etc/default.ini
share/Makefile.am
src/couchdb/couch_query_servers.erl
src/ibrowse/Makefile.am
src/ibrowse/ibrowse.app.in
src/ibrowse/ibrowse.erl
src/ibrowse/ibrowse_app.erl
src/ibrowse/ibrowse_http_client.erl
src/ibrowse/ibrowse_lb.erl
src/ibrowse/ibrowse_lib.erl
src/ibrowse/ibrowse_sup.erl
src/ibrowse/ibrowse_test.erl
src/mochiweb/mochijson2.erl
test/etap/112-replication-missing-revs.t
test/etap/113-replication-attachment-comp.t
test/etap/140-attachment-comp.t
Diffstat (limited to 'rel/overlay/share/www/script/futon.js')
-rw-r--r-- | rel/overlay/share/www/script/futon.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/rel/overlay/share/www/script/futon.js b/rel/overlay/share/www/script/futon.js index b15a5eec..c4647ed1 100644 --- a/rel/overlay/share/www/script/futon.js +++ b/rel/overlay/share/www/script/futon.js @@ -215,9 +215,10 @@ function $$(node) { recentDbs.sort(); $.each(recentDbs, function(idx, name) { if (name) { + name = encodeURIComponent(name); $("#dbs").append("<li>" + "<button class='remove' title='Remove from list' value='" + name + "'></button>" + - "<a href='database.html?" + encodeURIComponent(name) + "' title='" + name + "'>" + name + + "<a href='database.html?" + name + "' title='" + name + "'>" + name + "</a></li>"); } }); @@ -334,6 +335,14 @@ function $$(node) { return callback(decl); } + function windowName() { + try { + return JSON.parse(window.name || "{}"); + } catch (e) { + return {}; + } + } + // add suffix to cookie names to be able to separate between ports var cookiePrefix = location.port + "_"; @@ -366,15 +375,15 @@ function $$(node) { "window": { get: function(name) { - return JSON.parse(window.name || "{}")[name]; + return windowName()[name]; }, set: function(name, value) { - var obj = JSON.parse(window.name || "{}"); + var obj = windowName(); obj[name] = value || null; window.name = JSON.stringify(obj); }, del: function(name) { - var obj = JSON.parse(window.name || "{}"); + var obj = windowName(); delete obj[name]; window.name = JSON.stringify(obj); } |