Преглед изворни кода

displayed footer icon link tooltip

Bachir Soussi Chiadmi пре 6 година
родитељ
комит
96bd3dc133

+ 1 - 1
sites/all/modules/figli/edlp_search/src/Plugin/Block/EdlpSearchLinkBlock.php

@@ -29,7 +29,7 @@ class EdlpSearchLinkBlock extends BlockBase {
         'attributes' => array(
           'data-drupal-link-system-path' => $url->getInternalPath(),
           'class' => array('ajax-link'),
-          'title' => t('Search sounds by title, speaker, language, genre or entry'),
+          'alt' => t('Search sounds by title, speaker, language, genre or entry'),
         )
       )
     );

+ 1 - 1
sites/all/modules/figli/edlp_studio/src/Plugin/Block/StudioLinkBlock.php

@@ -60,7 +60,7 @@ class StudioLinkBlock extends BlockBase  implements ContainerFactoryPluginInterf
           'attributes' => array(
             'data-drupal-link-system-path' => $url->getInternalPath(),
             'class' => array('ajax-link'),
-            'title' => t('The studio displays your bookmarked sounds. You can save them and create your own playlists'),
+            'alt' => t('The studio displays your bookmarked sounds. You can save them and create your own playlists'),
           )
         )
       );

+ 1 - 1
sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js

@@ -47,7 +47,7 @@ Drupal.attachBehaviors(this.$cartel);this.setAutoOpenArticle();if(this.auto_open
 this.event_handlers[event_name].push(handler);return this;},emmit(event_name,args){void 0;var handler;var args=args||{};for(var i=this.event_handlers[event_name].length-1;i>=0;i--){handler=this.event_handlers[event_name][i];(function(handler,args){setTimeout(function(){handler(args);},0);}(handler,args));}
 return this;},}
 function RandomPlayer(playlist){this.active=false;this.playlist=playlist;this.path=drupalSettings.path.baseUrl+drupalSettings.path.pathPrefix+'#random'
-this.$btn=$('<a>').html('Shuffle').attr('href',this.path).attr('title',drupalSettings.edlp_corpus.random_link_title).addClass('random-player-btn');this.init();};RandomPlayer.prototype={init(){$('<div>').addClass('block random-player').append(this.$btn).prependTo('.region-footer-right');this.$btn.on('click',this.toggleActive.bind(this));_audioPlayer.on('audio-play-next',this.onAudioPlayNext.bind(this)).on('audio-ended',this.onAudioPlayerEnded.bind(this)).on('stop-shuffle',this.stop.bind(this));_$corpus_canvas.on('update-random-playlist',this.updatePlaylist.bind(this));if(window.location.hash=='#random'){this.start();}},updatePlaylist(e){this.playlist=e.playlist;this.shuffle();},shuffle(){var tempPLaylist=[];for(var i=this.playlist.length-1;i>=0;i--){tempPLaylist.push(this.playlist[i]);}
+this.$btn=$('<a>').html('Shuffle').attr('href',this.path).attr('alt',drupalSettings.edlp_corpus.random_link_title).addClass('random-player-btn');this.init();};RandomPlayer.prototype={init(){$('<div>').addClass('block random-player').append(this.$btn).prependTo('.region-footer-right');this.$btn.on('click',this.toggleActive.bind(this));_audioPlayer.on('audio-play-next',this.onAudioPlayNext.bind(this)).on('audio-ended',this.onAudioPlayerEnded.bind(this)).on('stop-shuffle',this.stop.bind(this));_$corpus_canvas.on('update-random-playlist',this.updatePlaylist.bind(this));if(window.location.hash=='#random'){this.start();}},updatePlaylist(e){this.playlist=e.playlist;this.shuffle();},shuffle(){var tempPLaylist=[];for(var i=this.playlist.length-1;i>=0;i--){tempPLaylist.push(this.playlist[i]);}
 this.shuffledPlaylist=[];while(tempPLaylist.length>0){var r=Math.floor(Math.random()*tempPLaylist.length);this.shuffledPlaylist.push(tempPLaylist.splice(r,1)[0]);}},toggleActive(e){e.preventDefault();if(this.active){this.stop();}else{this.start();}
 return false;},start(){this.active=_audioPlayer.shuffle_is_active=true;this.$btn.addClass('is-active');this.shuffle();this.next();if(typeof _paq!=='undefined'){_paq.push(['trackEvent','RandomPlayer','start']);}},stop(){this.active=false;this.$btn.removeClass('is-active');history.replaceState(history.state,null,window.location.pathname);_audioPlayer.deActivateRandom();if(typeof _paq!=='undefined'){_paq.push(['trackEvent','RandomPlayer','stop']);}},next(){void 0;if(this.active&&this.shuffledPlaylist.length>0)
 _audioPlayer.openDocument(this.shuffledPlaylist.splice(0,1)[0],'random');},onAudioPlayNext(){void 0;if(this.active){this.next();}},onAudioPlayerEnded(){void 0;if(this.active){this.next();}}};function CompoPlayer(){this.active=false;this.playing=false;this.paused=false;this.playlist=[];this.current_index=0;this.$composer=null;this.$compo=null;this.$controls=null;this.init();};CompoPlayer.prototype={init(){_audioPlayer.on('audio-open-document',this.onAudioOpenDocument.bind(this)).on('audio-play',this.onAudioPlayerPlay.bind(this)).on('audio-pause',this.onAudioPlayerPause.bind(this)).on('audio-ended',this.onAudioPlayerEnded.bind(this));},newCompo(){this.initControls();},initControls(){this.$composer=$('.composition_ui .composer');this.$compo=$('.composition_ui .composer .composition');this.$controls=$('.composition_ui .composer .compo-player-controls');if(!this.$controls.is('.ready')&&this.$compo){this.$previous=$('<div>').addClass('previous').on('click',this.prev.bind(this)).appendTo(this.$controls);this.$playpause=$('<div>').addClass('play-pause').on('click',this.togglePlayPause.bind(this)).appendTo(this.$controls);this.$next=$('<div>').addClass('next').on('click',this.next.bind(this)).appendTo(this.$controls);this.$controls.addClass('ready');this.refresh();this.active=true;}},refresh(){this.stop();this.playlist=[];var that=this;$('.field--name-documents .field__item',this.$compo).each(function(i,el){var $link=$('a.audio-link',this);that.playlist.push({item:$(this),audio_url:$link.attr("audio_url"),nid:$link.attr("nid"),});});this.showHideControls();},togglePlayPause(){if(this.playing&&!this.paused){this.pause();}else{if(this.playing&&this.paused){this.play();}else{this.start();}}},start(){this.playing=true;this.play();},play(){if(this.paused){this.paused=false;_audioPlayer.play();}else{_audioPlayer.emmit('stop-shuffle').openDocument(this.playlist[this.current_index],this);}

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


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

@@ -1319,7 +1319,7 @@
       this.$btn = $('<a>')
         .html('Shuffle')
         .attr('href',this.path)
-        .attr('title', drupalSettings.edlp_corpus.random_link_title)
+        .attr('alt', drupalSettings.edlp_corpus.random_link_title)
         .addClass('random-player-btn');
       this.init();
     };

+ 16 - 0
sites/all/themes/custom/edlptheme/assets/styles/app.scss

@@ -1681,6 +1681,7 @@ body.path-frontpage, body.path-productions{
     font-size: 0.756em;
     white-space: nowrap;
   }
+
 }
 
 footer{
@@ -2087,6 +2088,7 @@ footer{
   @mixin iconlinkblock($bgimgurl, $bgimgurlactive) {
     pointer-events: all;
     margin-left: 0.5em;
+    position: relative;
     // @include btn;
     a{
       box-sizing: border-box;
@@ -2108,6 +2110,20 @@ footer{
         // background-color: red;
         background-image: $bgimgurlactive;
       }
+      &[alt]:hover{
+        // position:relative;
+        &:after{
+          content:attr(alt);
+          position:absolute;
+          right:0; bottom:$icons_w*1.2;
+          width:170px;
+          border: 1px solid red;
+          padding:0.5em;
+          font-size: 0.756em;
+          background-color: white;
+          z-index: 50;
+        }
+      }
       html.is-mobile &{
         $wh:$mobile_icon_w;
         width:$wh; height:$wh;

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