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){
|
||||
const messages = [
|
||||
settingDefinition.name + "_title",
|
||||
settingDefinition.name + "_description",
|
||||
];
|
||||
if (settingDefinition.urlSpecific){
|
||||
messages.push(settingDefinition.name + "_urlSpecific");
|
||||
}
|
||||
if (settingDefinition.options){
|
||||
settingDefinition.options.forEach(function(option){
|
||||
if (option !== null){
|
||||
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);
|
||||
}
|
||||
});
|
||||
const messages = [];
|
||||
if (settingDefinition){
|
||||
messages.push(settingDefinition.name + "_title");
|
||||
messages.push(settingDefinition.name + "_description");
|
||||
if (settingDefinition.urlSpecific){
|
||||
messages.push(settingDefinition.name + "_urlSpecific");
|
||||
}
|
||||
if (settingDefinition.options){
|
||||
settingDefinition.options.forEach(function(option){
|
||||
if (option !== null){
|
||||
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.action){
|
||||
messages.push(settingDefinition.name + "_label");
|
||||
}
|
||||
if (settingDefinition.actions){
|
||||
settingDefinition.actions.forEach(function(action){
|
||||
messages.push(action.name + "_label");
|
||||
});
|
||||
}
|
||||
}
|
||||
return messages;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user