Bachir Soussi Chiadmi пре 5 година
родитељ
комит
8a854a45ab

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js


+ 10 - 3
sites/all/themes/custom/edlptheme/assets/scripts/main.js

@@ -1166,14 +1166,19 @@
           .fail(this.onNodeLoadFail.bind(this));
       },
       onNodeLoaded(data){
-        // console.log('AudioPlayer node loaded');
+        console.log('AudioPlayer node loaded', data);
         this.$cartel.html(data.rendered).removeClass('loading');
         _$body.trigger({'type':'new-audio-cartel-loaded'});
         initAjaxLinks();
-        // init cartel auto switch
+        // cartel autoswitch
         this.scndCartel_visible = 0;
         this.$cartel.removeClass('second-visible');
-        this.cartelSwitchInterval = setInterval(this.switchCartel.bind(this), this.cartelSwitchIntervalMS);
+        // if second cartel has special info ?
+        if (this.$cartel.find('.second-cartel .col-left').children().length > 1
+            || this.$cartel.find('.second-cartel').children('.col-right').length){
+          // init cartel auto switch
+          this.cartelSwitchInterval = setInterval(this.switchCartel.bind(this), this.cartelSwitchIntervalMS);
+        }
         // call drupal behaviours (for addtoany)
         Drupal.attachBehaviors(this.$cartel);
         // open automaticly tha article if needed
@@ -1228,6 +1233,8 @@
           // return to first cartel
           this.$cartel.removeClass('second-visible');
           this.scndCartel_visible = 0;
+          // kill the auto switch after one rotation
+          this.clearIntervalAutoCartelSwitch();
         }else{
           // switch to 2nd cartel
           this.$cartel.addClass('second-visible');

Неке датотеке нису приказане због велике количине промена