rename models and associates, isolate botanic with shop

This commit is contained in:
Ludovic CANDELLIER
2020-04-21 00:09:32 +02:00
parent c80b0f1edf
commit 4ad1f18310
234 changed files with 13899 additions and 3230 deletions

View File

@@ -0,0 +1,18 @@
function setOptions(selector,data,selected,all) {
// console.log(data);
var $el = $(selector);
$el.empty(); // remove old options
if (all) {
$el.append($("<option></option>").attr("value",'').text('Tous'));
}
$.each(data, function(key, name) {
// console.log(name);
if (key != null) {
if (key == selected) {
$el.append($("<option selected='selected'></option>").attr("value", key).text(name));
} else {
$el.append($("<option></option>").attr("value", key).text(name));
}
}
});
}