File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -394,7 +394,7 @@ function initInvVm() {
394394 read: target,
395395 write: function(newValue) {
396396 let current = target();
397- newValue = newValue.toLowerCase().replaceAll(/([^a-z0-9]+)+/g, '-')
397+ newValue = newValue.toLowerCase().replaceAll(/([^a-z0-9/ ]+)+/g, '-')
398398
399399 //only write if it changed
400400 if (newValue !== current) {
Original file line number Diff line number Diff line change @@ -118,27 +118,6 @@ function LocationsVM(locationData) {
118118 }
119119
120120 function initLocationVM() {
121- // noinspection JSUnusedLocalSymbols
122- ko.extenders.slug = function(target, option) {
123- let result = ko.pureComputed({
124- read: target,
125- write: function(newValue) {
126- let current = target();
127- newValue = newValue.toLowerCase().replaceAll(/([^a-z0-9/]+)+/g, '-')
128-
129- //only write if it changed
130- if (newValue !== current) {
131- target(newValue);
132- }
133- }
134- }).extend({ notify: 'always' });
135-
136- //initialize
137- result(target());
138-
139- return result;
140- }
141-
142121 let formElt = document.getElementById('locations_json'),
143122 locationData = JSON.parse(formElt.innerText);
144123 tpvm._vmContext.locationsVM = new LocationsVM(locationData)
You can’t perform that action at this time.
0 commit comments