1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 09:34:10 +02:00

Fix saving schema to cookie in Opera and Firefox 4

This commit is contained in:
Jakub Vrana
2011-02-08 20:58:31 +01:00
parent 806264851e
commit 3eba7310da
4 changed files with 11 additions and 6 deletions

View File

@@ -397,8 +397,9 @@ function schemaMousemove(ev) {
/** Finish move
* @param MouseEvent
* @param string
*/
function schemaMouseup(ev) {
function schemaMouseup(ev, db) {
if (that !== undefined) {
ev = ev || event;
tablePos[that.firstChild.firstChild.firstChild.data] = [ (ev.clientY - y) / em, (ev.clientX - x) / em ];
@@ -410,6 +411,6 @@ function schemaMouseup(ev) {
s = encodeURIComponent(s.substr(1));
var link = document.getElementById('schema-link');
link.href = link.href.replace(/[^=]+$/, '') + s;
cookie('adminer_schema=' + s, 30, '; path="' + location.pathname + location.search + '"');
cookie('adminer_schema-' + db + '=' + s, 30); //! special chars in db
}
}