1/* 2 * DokuWiki Bootstrap3 Template: Plugins Hacks! 3 * 4 * Home http://dokuwiki.org/template:bootstrap3 5 * Author Giuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com> 6 * License GPL 2 (http://www.gnu.org/licenses/gpl.html) 7 */ 8 9// Translation Plugin 10var $translation = jQuery('#dw__translation'); 11 12if ($translation.length) { 13 14 var $current = $translation.find('.cur'), 15 $lang = $current.text(), 16 $iso = $lang.match(/\(([a-z]*)\)/), 17 $flag = $current.find('img'); 18 19 $current.parent().addClass('active'); 20 $translation.find('.wikilink2').removeClass('wikilink2').css('opacity', '0.5'); 21 22 if ($flag.length) { 23 $translation.find('.dropdown-toggle .iconify').hide(); 24 $translation.find('.dropdown-toggle').prepend( 25 jQuery('<img/>').attr({ 26 'src': $flag.attr('src'), 27 'title': $flag.attr('title') 28 })); 29 } 30 31} 32