summaryrefslogtreecommitdiffstats
path: root/modules-available/locations/clientscript.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/locations/clientscript.js')
-rw-r--r--modules-available/locations/clientscript.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules-available/locations/clientscript.js b/modules-available/locations/clientscript.js
index 89abcefc..9a434e04 100644
--- a/modules-available/locations/clientscript.js
+++ b/modules-available/locations/clientscript.js
@@ -37,8 +37,8 @@ var slxIdCounter = 0;
/**
* Adds a new opening time to the table in expert mode.
*/
-function newOpeningTime(vals) {
- var $row = $('#expert-template').find('div.row').clone();
+function newOpeningTime($loc, vals) {
+ var $row = $loc.find('.expert-template div.row').clone();
if (vals['days'] && Array.isArray(vals['days'])) {
for (var i = 0; i < allDays.length; ++i) {
$row.find('.i-' + allDays[i]).prop('checked', vals['days'].indexOf(allDays[i]) !== -1);
@@ -53,7 +53,7 @@ function newOpeningTime(vals) {
});
$row.find('.i-openingtime').val(vals['openingtime']);
$row.find('.i-closingtime').val(vals['closingtime']);
- $('#expert-table').append($row);
+ $loc.find('.expert-table').append($row);
return $row;
}
@@ -158,4 +158,4 @@ function validateOpeningTimes(event) {
event.preventDefault();
}
$form.find('input[name="openingtimes"]').val(JSON.stringify(schedule));
-} \ No newline at end of file
+}