Open zuphilip opened 9 years ago
These checkboxes only toggle folding of sub-forms right now. It would be wise to find a more generic soliution how to lay out components and options using reflection of the PHP classes and then properly wiring them. For now, I hesitate to hard-code add any component-specific logic to JS logic.
If I understand correctly, then the click on "Go!" is calling some JavaScript. Can we filter out the values of the scraper customizations if the corresponding checkbox is not activated? I.e. at https://github.com/kba/rssscrpr/blob/master/main.js#L54
$("form :input").filter(function(index, element) {
/*
TODO: only return costumization fields
if the corrsponding checkbox is activated
*/
return $(element).val() != "";
}).serialize();
What do you think?
I guess now that the Edit
function has to activate some checkboxes, if some the parameters are entered. For example "Rektoratsnachrichten" is not working currently.
True. But these are just examples and should be tweaked anyway. I'd prefer to fix this by populating the user interface properly from API data.
Steps to reproduce:
\\h1
in "Item Xpath"This will incorrectly run the scraper with the customization and therefore only return 1 result. The deactivitating step seem to miss something. I didn't check if the same is true for the other sections.