Previous/Next Month Buttons same class as for Time Buttons

WPPizza – A Restaurant Plugin for WordPress Support Add-Ons Extensions Preorder Support Previous/Next Month Buttons same class as for Time Buttons

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #54871
    filipemartins
    Participant

    Hello Oli,
    I think i found a bug that wasn’t really intended. The Buttons for Previous/Next Month has the same Class as the Buttons for Time Up/Down, the problem now here is, you have code that let’s the Buttons for the Previous/Next Month disappear when there is no other month or i can go back to the previous month. Now everytime i switch Months one of the Buttons for the Time Disappears too because of the same Class. For now i just deleted the Code that let the Buttons disappear. Hope there is an Update for this soon.

    #54873
    Olly
    Admin & Mod

    first of all: i dont know why you need that extra code if the previous next months are already not appearing if there’s nothing to choose from (unless you found a bug there somewhere , in which case please direct me to the url where i can see this)

    other than that, there’s no “bug” here with the classes they are the same as they are both prev/next if you want to target them separately use the parent element classes as selector (i.e xdsoft_monthpicker and xdsoft_timepicker)

    #54874
    filipemartins
    Participant

    I don’t think i explained it very well, the Button for going up or down the Timespinner have the same Class as the Buttons for changing months. In your Code you have this

            
    /*
                dont show previous month selector if
                - min year available is > current selected
                - current selected year/month is the same as min year/month
            */
            var showPrevMonth = (ts_min['Y'] > ts_now['Y']) || (ts_min['Y'] == ts_now['Y'] && ts_min['n'] == ts_now['n']) ? false : true;
            if(!showPrevMonth){
                $('.'+pluginElmClassName+' .xdsoft_prev').hide();
            }else{
                $('.'+pluginElmClassName+' .xdsoft_prev').show();
            }
            /*
                dont show next month selector if
                - max year available is < current selected
                - current selected year/month is the same as max year/month
            */
            var showNextMonth = (ts_max['Y'] < ts_now['Y']) || (ts_max['Y'] == ts_now['Y'] && ts_max['n'] == ts_now['n']) ? false : true;
            if(!showNextMonth){
                $('.'+pluginElmClassName+' .xdsoft_next').hide();
            }else{
                $('.'+pluginElmClassName+' .xdsoft_next').show();
            }
    

    the thing here now is, one of the Buttons for the Timespinner automatically disappear too if one button for changing the Month disappears. Thats because of the same Class they share. I don’t really know if this is intended or not, that the buttons for the Time disappear too.

    #54875
    filipemartins
    Participant

    This Code is from wppizza-preorder/v3/js/scripts.source.js

    #54876
    Olly
    Admin & Mod

    ok, now i understand (i thought you were referring to something *you* had added)
    i need to look at the plugin anyway so will see what i find on that front too (looking at the js code you posted above it does indeed look like it’s not targeted as it should be, thanks )

    #54877
    filipemartins
    Participant

    You’re welcome!
    And sorry for explaning it so horribly im fron germany 😀

    #54878
    Olly
    Admin & Mod

    >And sorry for explaining it so horribly
    nothing to apologise for.
    happens often enough that I don’t read things properly either so it evens out no doubt over time….

    #54907
    Olly
    Admin & Mod

    should be fixed now as of 3.6.4
    thanks for letting me know

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.