|
273 | 273 | + 'advanced/workingSet'
|
274 | 274 | + (query ? '.jsp?' + query + '&' : 'Manager.jsp?')
|
275 | 275 | + 't=' + Date.now(),
|
276 |
| - function(responseText) { |
| 276 | + function(responseText, scopeIndex) { |
277 | 277 | var match = SEARCH_SCOPE_NAME_PATTERN.exec(responseText);
|
278 | 278 | if (match) {
|
279 | 279 | createElement(scopesPage, 'span', 'g', '<%js:scopes_scope_field_label%>');
|
|
352 | 352 | var deleteButton = createButton(scopesPage, '<%js:scopes_scope_delete_button_label%>', '<%js:scopes_scope_delete_button_description%>', function() {
|
353 | 353 |
|
354 | 354 | // if the scope to be deleted is set, unset it first
|
355 |
| - if (searchScope.level == SEARCH_SCOPE_LEVEL_CUSTOM && searchScope.customIndex == scopeNr) { |
| 355 | + if (searchScope.level == SEARCH_SCOPE_LEVEL_CUSTOM && searchScope.customIndex == scopeIndex) { |
356 | 356 | setSearchScope([SEARCH_SCOPE_LEVEL_ALL]);
|
357 | 357 | }
|
358 | 358 |
|
|
365 | 365 | + '&workingSet='
|
366 | 366 | + encodeURIComponent(nameInput.value)
|
367 | 367 | + getHrefs());
|
368 |
| - setSearchScope([SEARCH_SCOPE_LEVEL_CUSTOM, scopeIndex, scopeName]); |
| 368 | + setSearchScope([SEARCH_SCOPE_LEVEL_CUSTOM, scopeName, scopeIndex]); |
369 | 369 | });
|
370 | 370 | }
|
371 | 371 | createButton(scopesPage, '<%js:scopes_scope_cancel_button_label%>', '<%js:scopes_scope_cancel_button_description%>', function() { showScopesPage(); });
|
|
386 | 386 | createButton(scopesPage, '<%js:scopes_new_button_label%>', '<%js:scopes_new_button_description%>', function() { showScopesPage('operation=add'); });
|
387 | 387 | createButton(scopesPage, '<%js:scopes_close_button_label%>', '<%js:scopes_close_button_description%>', function() { scopesPage.s(); });
|
388 | 388 | }
|
389 |
| - }); |
| 389 | + }, 0, scopeIndex); |
390 | 390 | }
|
391 | 391 | function doScopesOperation(query) {
|
392 | 392 | remoteRequest( BASE_URL
|
|
2749 | 2749 | }
|
2750 | 2750 |
|
2751 | 2751 | var openRequests = {};
|
2752 |
| - function remoteRequest(url, callbackFn, cancelId) { |
| 2752 | + function remoteRequest(url, callbackFn, cancelId, callbackFnParam2) { |
2753 | 2753 | var request = new XMLHttpRequest();
|
2754 | 2754 | if (callbackFn) request.onreadystatechange = function() {
|
2755 |
| - if (request.readyState == 4 && request.status == 200) callbackFn(request.responseText); |
| 2755 | + if (request.readyState == 4 && request.status == 200) callbackFn(request.responseText, callbackFnParam2); |
2756 | 2756 | }
|
2757 | 2757 | request.open('GET', url);
|
2758 | 2758 | request.send();
|
|
0 commit comments