Changeset 7651


Ignore:
Timestamp:
2004-06-29T09:16:13+12:00 (20 years ago)
Author:
kjdon
Message:

added in some stuff to stop the cc args being added again and again to the url when changing preferences

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/macros/pref.dm

    r7503 r7651  
    230230  else href += "&l=" + value;
    231231  if (!location.href.match(/&nl=1$/)) href += "&nl=1";
     232  while (href.match(/&cc=[\\w]+/)) href = href.replace(/&cc=[\\w]+/, "");
    232233  location.href = href + getargs();
    233234\}
     
    238239  if (href.match(/&v=\\d/)) href = href.replace(/&v=\\d/, "&v=" + value);
    239240  else href += "&v=" + value;
     241  while (href.match(/&cc=[\\w]+/)) href = href.replace(/&cc=[\\w]+/, "");
    240242  location.href = href + getargs();
    241243\}
     
    247249  else href += "&nw=" + value;
    248250  if (!location.href.match(/&nl=0$/)) href += "&nl=0";
     251  while (href.match(/&cc=[\\w]+/)) href = href.replace(/&cc=[\\w]+/, "");
    249252  location.href = href + getargs();
    250253\}
    251254
    252255function updateqt (value) \{
    253   if (value != _cgiargqt_) location.href = location.href + "&qt=" + value + getargs();
     256  if (value != _cgiargqt_) \{
     257    while (href.match(/&cc=[\\w]+/)) href = href.replace(/&cc=[\\w]+/, "");
     258    location.href = location.href + "&qt=" + value + getargs();
     259  \}   
    254260\}
    255261}
     
    445451
    446452<input type="hidden" name="e" value="_decodedcompressedoptions_">
    447 
    448453_If_(_collectionoption_,_collectionprefs_)
    449454_presentationprefs_
Note: See TracChangeset for help on using the changeset viewer.