diff options
author | Chris Goldthorpe | 2010-04-26 23:55:14 +0000 |
---|---|---|
committer | Chris Goldthorpe | 2010-04-26 23:55:14 +0000 |
commit | d4fe55e9a5e7dc98708fb011e939d822c655e44d (patch) | |
tree | a9e4c74d8b63201f83ab9dec73f87e1132f9aca6 /org.eclipse.help.webapp | |
parent | 55d106dd3a8de141758438e92ca21c6f37b0c82a (diff) | |
download | eclipse.platform.ua-d4fe55e9a5e7dc98708fb011e939d822c655e44d.tar.gz eclipse.platform.ua-d4fe55e9a5e7dc98708fb011e939d822c655e44d.tar.xz eclipse.platform.ua-d4fe55e9a5e7dc98708fb011e939d822c655e44d.zip |
Bug 310530 - [Webapp] Synchronize button incorrectly shows message "This feature requires cookies to be enabled in your browser"
Diffstat (limited to 'org.eclipse.help.webapp')
-rw-r--r-- | org.eclipse.help.webapp/advanced/utils.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/org.eclipse.help.webapp/advanced/utils.js b/org.eclipse.help.webapp/advanced/utils.js index d43a9d9ec..55b9bb61a 100644 --- a/org.eclipse.help.webapp/advanced/utils.js +++ b/org.eclipse.help.webapp/advanced/utils.js @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2009 IBM Corporation and others. + * Copyright (c) 2006, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -159,7 +159,13 @@ function getCookie(name) { function setCookie(name, value) { var date = new Date(); date.setTime(date.getTime()+(365*24*60*60*1000)); - document.cookie = name + "=" + value + "; expires=" + date.toGMTString() + ";path=/"; + var path = window.location.pathname; + var cookiePath = "/help/"; + var slash = path.indexOf('/', 1); + if(slash > 0) { + cookiePath = path.substr(0, slash + 1); + } + document.cookie = name + "=" + value + "; expires=" + date.toGMTString() + ";path=" + cookiePath; } function setCSSRule(selector, property, value) { |