Changeset 29325

Show
Ignore:
Timestamp:
22.09.2014 14:12:00 (5 years ago)
Author:
kjdon
Message:

get rid of dev servlet name. Use library name instead. Changed the way we add on params so we are not doing a string comparison each time we add another one. We end up with & at the end, but it doesn't seem to matter.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/pref.xsl

    r26470 r29325  
    7676            function assembleURLFromForm(formElem) 
    7777            { 
    78                 var url = "dev"; 
     78                var url = gs.xsltParams.library_name + "?"; 
    7979                var selectNodes = formElem.getElementsByTagName("select"); 
    8080                var inputNodes = formElem.getElementsByTagName("input"); 
     
    8383                { 
    8484                    var current = selectNodes[i]; 
    85                     url += (url == "dev") ? "?" : "&"; 
    8685                    url += current.name + "="; 
    87                     url += current.options[current.selectedIndex].text; 
     86                    url += current.options[current.selectedIndex].text + "&"; 
    8887                } 
    8988                 
     
    9392                    if (current.type == "hidden" || current.type == "text") 
    9493                    { 
    95                         url += (url == "dev") ? "?" : "&"; 
    9694                        url += current.name + "="; 
    97                         url += current.value; 
     95                        url += current.value + "&"; 
    9896                    } 
    9997                }