mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-03 10:31:54 +01:00
parent
ccc36a2154
commit
95605ef746
@ -14,32 +14,41 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
scope.getMessages = function(settingDefinition){
|
scope.getMessages = function(settingDefinition){
|
||||||
const messages = [
|
const messages = [];
|
||||||
settingDefinition.name + "_title",
|
if (settingDefinition){
|
||||||
settingDefinition.name + "_description",
|
messages.push(settingDefinition.name + "_title");
|
||||||
];
|
messages.push(settingDefinition.name + "_description");
|
||||||
if (settingDefinition.urlSpecific){
|
if (settingDefinition.urlSpecific){
|
||||||
messages.push(settingDefinition.name + "_urlSpecific");
|
messages.push(settingDefinition.name + "_urlSpecific");
|
||||||
}
|
}
|
||||||
if (settingDefinition.options){
|
if (settingDefinition.options){
|
||||||
settingDefinition.options.forEach(function(option){
|
settingDefinition.options.forEach(function(option){
|
||||||
if (option !== null){
|
if (option !== null){
|
||||||
messages.push(settingDefinition.name + "_options." + option);
|
messages.push(settingDefinition.name + "_options." + option);
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (settingDefinition.inputs){
|
|
||||||
settingDefinition.inputs.forEach(function(input){
|
|
||||||
if (input){
|
|
||||||
if (input.options){
|
|
||||||
input.options.forEach(function(option){
|
|
||||||
if (option !== null){
|
|
||||||
messages.push(input.name + "_options." + option);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
if (settingDefinition.inputs){
|
||||||
|
settingDefinition.inputs.forEach(function(input){
|
||||||
|
if (input){
|
||||||
|
if (input.options){
|
||||||
|
input.options.forEach(function(option){
|
||||||
|
if (option !== null){
|
||||||
|
messages.push(input.name + "_options." + option);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (settingDefinition.action){
|
||||||
|
messages.push(settingDefinition.name + "_label");
|
||||||
|
}
|
||||||
|
if (settingDefinition.actions){
|
||||||
|
settingDefinition.actions.forEach(function(action){
|
||||||
|
messages.push(action.name + "_label");
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return messages;
|
return messages;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user