geodirectory icon indicating copy to clipboard operation
geodirectory copied to clipboard

Set default business hours when adding a new business day

Open nicolaslimet opened this issue 5 months ago • 0 comments

This user (https://secure.helpscout.net/conversation/2711088305/60579/) complains that when adding a new day, the default hours are shown but not set.

If the user adds a new day, and doesn't change the 9:00 - 17:00 default, the new day is not saved.

Can reproduce: yes

Fix (?):

change:

 jQuery(".gd-bh-add", this.$wrap).on("click", function(e) {
            $this.addSlot(jQuery(this));
            $this.onAddSlot();
            e.preventDefault();
        }); 

to:

jQuery(".gd-bh-add", this.$wrap).on("click", function(e) {
    $this.addSlot(jQuery(this));
    $this.onAddSlot();
    $this.handle24Hours(jQuery(this).closest('.gd-bh-item'));
    $this.setValue();
    e.preventDefault();
});

in add-listing.js line 522

nicolaslimet avatar Sep 19 '24 09:09 nicolaslimet