mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 10:34:17 +00:00
Don't use extra variable for one-time use.
This commit is contained in:
parent
d30980bfa9
commit
ff837aa943
@ -16,7 +16,7 @@ class CorpusList extends List {
|
|||||||
|
|
||||||
|
|
||||||
_update(patch) {
|
_update(patch) {
|
||||||
var item, operation, pathArray, valueName;
|
var item, operation, pathArray;
|
||||||
|
|
||||||
for (operation of patch) {
|
for (operation of patch) {
|
||||||
/* "/corpusId/valueName" -> ["corpusId", "valueName"] */
|
/* "/corpusId/valueName" -> ["corpusId", "valueName"] */
|
||||||
@ -33,8 +33,7 @@ class CorpusList extends List {
|
|||||||
break;
|
break;
|
||||||
case "replace":
|
case "replace":
|
||||||
item = this.get("id", pathArray[0])[0];
|
item = this.get("id", pathArray[0])[0];
|
||||||
valueName = pathArray[1];
|
switch(pathArray[1]) {
|
||||||
switch(valueName) {
|
|
||||||
case "description":
|
case "description":
|
||||||
item.values({"description": operation.value});
|
item.values({"description": operation.value});
|
||||||
break;
|
break;
|
||||||
|
@ -17,7 +17,7 @@ class JobList extends List {
|
|||||||
|
|
||||||
_update(patch) {
|
_update(patch) {
|
||||||
var item, jobStatusElement, newStatusColor, operation, pathArray, status,
|
var item, jobStatusElement, newStatusColor, operation, pathArray, status,
|
||||||
statusColor, valueName;
|
statusColor;
|
||||||
|
|
||||||
for (operation of patch) {
|
for (operation of patch) {
|
||||||
/* "/jobId/valueName" -> ["jobId", "valueName"] */
|
/* "/jobId/valueName" -> ["jobId", "valueName"] */
|
||||||
@ -34,8 +34,7 @@ class JobList extends List {
|
|||||||
break;
|
break;
|
||||||
case "replace":
|
case "replace":
|
||||||
item = this.get("id", pathArray[0])[0];
|
item = this.get("id", pathArray[0])[0];
|
||||||
valueName = pathArray[1];
|
switch(pathArray[1]) {
|
||||||
switch(valueName) {
|
|
||||||
case "description":
|
case "description":
|
||||||
item.values({"description": operation.value});
|
item.values({"description": operation.value});
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user