Jump to content
Che

Nu merge JavaScript.

Recommended Posts

Posted

Cand dai la postari noi si in josul paginii pe "Load more" te trimite in susul paginii inapoi in loc sa incarce mai multe postari noi. Nu merge deloc. Si nici atunci cand dai click pe quote la postarea cuiva ca sa-l citezi nu merge, pur si simplu nu se intampla nimic. Cred ca este vorba de JavaScript care nu functioneaza cum trebuie. Nu am nici o extensie in browser de genul NoScript. Folosesc Chrome si problema este de acum o saptamana sau doua dar am crezut initial ca poate se lucreaza la site si de asta.

  • Like 1
Posted

@Nytro daca tot e deschis topicul:

 

e normal sa isi dea refresh pagina dupa ce dau un like la o postare? gen daca dau like la primul post si is multe posturi pe pagina si eu dau scroll rpd in jos dupa like, isi da refresh la postul la care am dat like

Posted

Pare sa vina de undeva de la codu asta

;;(function($, _, undefined) {
    "use strict";
    ips.controller.register('core.front.core.quickSearch', {
        initialize: function() {
            this.on('mouseup', '.cSearchFilter__menu', this.updateAndClose);
            this.on('change', 'input[name="type"]', this.updateFilter);
            this.on('focus', '.cSearchSubmit', this.a11yFocusSubmit);
            this.on('keypress', '.cSearchFilter__text', this.a11yOpenDetails);
            this.setup();
        },
        setup: function() {
            document.querySelector('.cSearchFilter__text').innerText = document.querySelector('.cSearchFilter__menu input:checked + .cSearchFilter__menuText').innerHTML;
        },
        updateFilter: function(e) {
            document.querySelector('.cSearchFilter__text').innerText = e.target.nextElementSibling.innerHTML;
        },
        updateAndClose: function(e) {
            setTimeout(()=>{
                document.querySelector('.cSearchFilter').open = false;
                document.querySelector('#elSearchField').focus();
            }
            , "500");
        },
        a11yOpenDetails: function(e) {
            if (e.key === "Enter") {
                e.preventDefault();
                document.querySelector('.cSearchFilter').open = true;
                document.querySelector('.cSearchFilter__menu input:checked').focus();
            }
        },
        a11yFocusSubmit: function(e) {
            document.querySelector('.cSearchFilter').open = false;
        }
    });
}(jQuery, _));

 

 

Daca s-a facut vreo modificare la search sau vreun update, aparent selectorii aia nu exista. Fix la functia de setup da si eroarea. Poate ajuta...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...