зеркало из https://github.com/mozilla/pjs.git
b=383293
- add ability to persist single form variables - only persist subgroup variable when repopulating subgroups
This commit is contained in:
Родитель
2577056d79
Коммит
2b0fce4aeb
|
@ -41,7 +41,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
function FormInit(/*HTMLFormElement */ aForm, /* String */ aQueryString)
|
||||
function FormInit(/*HTMLFormElement */ aForm, /* String */ aQueryString, /* String */ targetElm)
|
||||
{
|
||||
var type;
|
||||
var options;
|
||||
|
@ -63,7 +63,11 @@ function FormInit(/*HTMLFormElement */ aForm, /* String */ aQueryString)
|
|||
{
|
||||
var element = elements[iElm];
|
||||
var nodeName = element.nodeName.toLowerCase();
|
||||
|
||||
if (targetElm &&
|
||||
targetElm != element.id) {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(nodeName)
|
||||
{
|
||||
case 'input':
|
||||
|
@ -109,6 +113,11 @@ function FormInit(/*HTMLFormElement */ aForm, /* String */ aQueryString)
|
|||
var name = parms[0];
|
||||
var value;
|
||||
|
||||
if (targetElm &&
|
||||
targetElm != name) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (parms.length == 1)
|
||||
{
|
||||
value = true;
|
||||
|
|
|
@ -228,7 +228,7 @@ function populateSubgroups(data) {
|
|||
}
|
||||
}
|
||||
toggleMessage('none');
|
||||
FormInit(document.forms[formName], document.location.search);
|
||||
FormInit(document.forms[formName], document.location.search, 'subgroup'+suffix);
|
||||
enableForm(formName);
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ function populateTestcases(data,mySuffix) {
|
|||
subgroup.testcases[i].testcase_id);
|
||||
}
|
||||
toggleMessage('none');
|
||||
FormInit(document.forms[formName], document.location.search);
|
||||
FormInit(document.forms[formName], document.location.search, 'testcase'+mySuffix);
|
||||
enableForm(formName);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче