1Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n!=1)); }, 'strings': {"":{"An AJAX HTTP error occurred.":"Une erreur HTTP AJAX s\u0027est produite.","HTTP Result Code: !status":"Code de statut HTTP : !status","An AJAX HTTP request terminated abnormally.":"Une requ\u00eate HTTP AJAX s\u0027est termin\u00e9e anormalement.","Debugging information follows.":"Informations de d\u00e9bogage ci-dessous.","Path: !uri":"Chemin: !uri","StatusText: !statusText":"StatutTexte: !statusText","ResponseText: !responseText":"ReponseTexte: !responseText","ReadyState: !readyState":"ReadyState: !readyState","Configure":"Configurer","Select all rows in this table":"S\u00e9lectionner toutes les lignes du tableau","Deselect all rows in this table":"D\u00e9s\u00e9lectionner toutes les lignes du tableau","Hide":"Masquer","Show":"Afficher","Edit":"Modifier","@number comments per page":"@number commentaires par page","(active tab)":"(onglet actif)","Requires a title":"Titre obligatoire","Not published":"Non publi\u00e9","Don\u0027t display post information":"Ne pas afficher les informations de la contribution","Next":"Suivant","Cancel":"Annuler","Disabled":"D\u00e9sactiv\u00e9","Enabled":"Activ\u00e9","- None -":"- Aucun -","Save":"Enregistrer","Sunday":"Dimanche","Monday":"Lundi","Tuesday":"Mardi","Wednesday":"Mercredi","Thursday":"Jeudi","Friday":"Vendredi","Saturday":"Samedi","Add":"Ajouter","Upload":"Transf\u00e9rer","All":"Tous \/ Toutes","Done":"Termin\u00e9","This field is required.":"Ce champ est obligatoire.","Prev":"Pr\u00e9c.","Mon":"lun","Tue":"mar","Wed":"mer","Thu":"jeu","Fri":"ven","Sat":"sam","Sun":"dim","January":"janvier","February":"F\u00e9vrier","March":"mars","April":"avril","May":"mai","June":"juin","July":"juillet","August":"ao\u00fbt","September":"septembre","October":"octobre","November":"novembre","December":"d\u00e9cembre","Today":"Aujourd\u0027hui","Jan":"Jan","Feb":"f\u00e9v","Mar":"mar","Apr":"avr","Jun":"juin","Jul":"jui","Aug":"ao\u00fb","Sep":"sep","Oct":"oct","Nov":"nov","Dec":"d\u00e9c","Su":"Di","Mo":"Lu","Tu":"Ma","We":"Me","Th":"Je","Fr":"Ve","Sa":"Sa","Please wait...":"Veuillez patienter...","mm\/dd\/yy":"mm\/jj\/aa","Only files with the following extensions are allowed: %files-allowed.":"Seuls les fichiers se terminant par les extensions suivantes sont autoris\u00e9s\u00a0: %files-allowed.","By @name on @date":"Par @name le @date","By @name":"Par @name","Not in menu":"Pas dans le menu","Alias: @alias":"Alias : @alias","No alias":"Aucun alias","New revision":"Nouvelle r\u00e9vision","Drag to re-order":"Cliquer-d\u00e9poser pour r\u00e9-organiser","Changes made in this table will not be saved until the form is submitted.":"Les changements effectu\u00e9s dans ce tableau ne seront pris en compte que lorsque la configuration aura \u00e9t\u00e9 enregistr\u00e9e.","The changes to these blocks will not be saved until the \u003Cem\u003ESave blocks\u003C\/em\u003E button is clicked.":"N\u0027oubliez pas de cliquer sur \u003Cem\u003EEnregistrer les blocs\u003C\/em\u003E pour confirmer les modifications apport\u00e9es ici.","This permission is inherited from the authenticated user role.":"Ce droit est h\u00e9rit\u00e9e du r\u00f4le de l\u0027utilisateur authentifi\u00e9.","No revision":"Aucune r\u00e9vision","Not restricted":"Non restreint","Not customizable":"Non personnalisable","Restricted to certain pages":"R\u00e9serv\u00e9 \u00e0 certaines pages","The block cannot be placed in this region.":"Le bloc ne peut pas \u00eatre plac\u00e9 dans cette r\u00e9gion.","Customize dashboard":"Personnaliser le tableau de bord","Hide summary":"Masquer le r\u00e9sum\u00e9","Edit summary":"Modifier le r\u00e9sum\u00e9","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"Le fichier s\u00e9lectionn\u00e9 %filename ne peut pas \u00eatre transf\u00e9r\u00e9. Seulement les fichiers avec les extensions suivantes sont permis : %extensions.","Re-order rows by numerical weight instead of dragging.":"R\u00e9-ordonner les lignes avec des poids num\u00e9riques plut\u00f4t qu\u0027e
1n les d\u00e9placant.","Show row weights":"Afficher le poids des lignes","Hide row weights":"Cacher le poids des lignes","Autocomplete popup":"Popup d\u0027auto-compl\u00e9tion","Searching for matches...":"Recherche de correspondances...","Automatic alias":"Alias automatique","Insert this token into your form":"Ins\u00e9rer ce jeton (\u003Cem\u003Etoken\u003C\/em\u003E) dans votre formulaire","First click a text field to insert your tokens into.":"Cliquez d\u0027abord sur un champ de texte pour ins\u00e9rer vos jetons (\u003Cem\u003Etokens\u003C\/em\u003E) dans celui -ci."}} };; 2(function($) { 3 4 /** 5 * Get selects Id 6 */ 7 function getOriginalSelects() 8 { 9 var ids = $.trim(Drupal.settings.nodule_selecttree.ids); 10 var $select = []; 11 12 if (ids.length > 0) 13 { 14 var arr_ids = ids.split("\n"); 15 16 $.each(arr_ids, function(key, value) 17 { 18 if($(value).length != 0) 19 { 20 $select.push($(value)); 21 } 22 }); 23 } 24 25 return $select; 26 } 27 28 /** 29 * Get selects option 30 * 31 * @param $select : contains <select> element 32 */ 33 function getSelectValues( $select ) 34 { 35 if ($select && $select.length > 0) 36 { 37 // Vars 38 var options = [], 39 option_val = '', 40 option_text = ''; 41 42 $select.find("option").each(function() 43 { 44 if ($(this).val() != "_none" && $(this).text().length != 0) 45 { 46 option_val = $(this).val(); 47 option_text = $(this).text(); 48 option_selected = $(this).attr("selected"); 49 50 options.push({ 51 "key": option_val, 52 "value": option_text, 53 "selected": option_selected 54 }); 55 } 56 }); 57 58 return options; 59 } 60 else 61 { 62 return false; 63 } 64 } 65 66 /** 67 * Create multidimensionnal array from select option 68 * 69 * @param option : all datas 70 * @param clean : 71 * - true (do no preselect elements) 72 * - false (pre-select elements) 73 */ 74 function createMultidimensionnalArray( options, clean ) 75 { 76 var mArr = [], 77 pRef = 0, 78 level = 0; 79 80 $.each(options, function(i, data) 81 { 82 if (data != undefined && data.value != '- Aucun -' && data.value != '- None -') 83 { 84 if (data.value.indexOf('-') == 0 && data.value.match(/^\-+/g).length > 0) 85 { 86 level = data.value.match(/^\-+/g).length; 87 clean_option_text = data.value.replace(/^\-+/g,""); 88 89 if (level == 1) 90 { 91 mArr[pRef].children[data.key] = { 92 "key" : data.key, 93 "value" : clean_option_text, 94 "selected" : (clean == true) ? "" : data.selected 95 }; 96 } 97 // TODO: sublevels 98 } 99 else 100 { 101 mArr[data.key] = { 102 "key" : data.key, 103 "value" : data.value, 104 "selected" : (clean == true) ? "" : data.selected, 105 "children" : [] 106 }; 107 pRef = data.key; 108 } 109 } 110 }); 111 112 113 mArr.sort(function (a, b) { 114 if (a.value > b.value) 115 return 1; 116 if (a.value < b.value) 117 return -1; 118 // a doit être égale à b 119 return 0; 120 }); 121 122 return mArr; 123 } 124 /** 125 * createBlockOfSelect() 126 * 127 * @param options : all datas 128 * @param clean : 129 * - true (do no preselect elements) 130 * - false (pre-select elements) 131 */ 132 function createBlockOfSelect( $original_select, options, block_id, clean ) 133 { 134 if (false != options) 135 { 136 var $block = $('<div id="'+block_id+'" class="selectree_block" />'); 137 138 // Create new select for main categories 139 var $main_select = $('<select class="form-select selecttree_main">'+ 140 '<option value="_none">'+Drupal.t('- None -')+'</option>'+ 141 '</select>').appendTo($block); 142 143 // Create selects 144 $.each(options, function(i, parentData) 145 { 146 if (undefined != parentData) 147 { 148 if (clean == false && parentData.selected == "selected") { 149 $main_select.append('<option value="' + i + '" selected="selected">' + parentData.value + '</option>'); 150 } else { 151 $main_select.append('<option value="' + i + '">' + parentData.value + '</option>'); 152 } 153 154 // Children 155 if (parentData.children && parentData.children.length != 0) 156 { 157 var showChildren = false; 158 159 if ( clean == false && parentData.selected == "selected" && showChildren == false ) { 160 showChildren = true; 161 } 162 163 var $sub_select = $('<select class="form-select selecttree_children selecttree_'+i+'" style="display:none;">'+ 164 '<option value="_none">'+Drupal.t('- None -')+'</option>'+ 165 '</select>').hide(); 166 167 168 parentData.children.sort(function (a, b) { 169 if (a.value > b.value) 170 return 1; 171 if (a.value < b.value) 172 return -1; 173 // a doit être égale à b 174 return 0; 175 }); 176 177 $.each(parentData.children, function(j, childData) 178 { 179 180 if (undefined != childData) 181 { 182 if ( clean == false && childData.selected == "selected" && showChildren == false ) { 183 showChildren = true; 184 } 185 $sub_select.append('<option value="' + j + '"'+((clean == false && childData.selected == "selected")? ' selected="selected"' : '')+'>' + childData.value + '</option>'); 186 } 187 }); 188 189 if (showChildren) { 190 $sub_select.show(); 191 } 192 193 // Event 194 $sub_select.change(function(e) 195 { 196 $(this).find("option:selected").each(function() 197 { 198 // Remove selected attribute of options that only have the parent_id class 199 $original_select.find("option[class='"+block_id+"']").not("[value="+parentData.key+"]").removeAttr("selected"); 200
201 // Remove class Block_id 202 $original_select.find("option."+block_id).not("[value="+parentData.key+"]").removeClass(block_id); 203 204 // Add selected attribute and class block_id to the choosen one 205 if ($(this).val() != '_none') { 206 $original_select.find("option[value="+$(this).val()+"]").attr("selected","selected").addClass(block_id); 207 } 208 }); 209 }); 210 211 $sub_select.appendTo($block) 212 } 213 } 214 }); 215 216 // Main select event 217 $main_select.change(function(e) 218 { 219 // Remove selected attribute of option that only have the block_id class 220 $original_select.find("option[class='"+block_id+"']").removeAttr("selected"); 221 222 // Remove class Block_id 223 $original_select.find("option").removeClass(block_id); 224 225 // Add selected attribute and class block_id to the choosen one 226 $(this).find("option:selected").each(function() 227 { 228 // Hide children and remove the selected attribute 229 $block.find(".selecttree_children").hide().find('option').removeAttr('selected'); 230 231 if ($(this).val() != '_none') 232 { 233 // Select parent in the main selectbox 234 $original_select.find('option[value='+$(this).val()+']').attr("selected","selected").addClass(block_id); 235 236 // Show children 237 $block.find(".selecttree_"+$(this).val()).show(); 238 } 239 }); 240 }); 241 242 return $block; 243 } 244 else 245 { 246 return false; 247 } 248 } 249 250 $(function(){ 251 252 var all_selects = getOriginalSelects(); 253 var select_counter = 0; 254 255 if (all_selects.length != 0) 256 { 257 $.each(all_selects, function(s_key, $original_select) 258 { 259 // Parent 260 var $parentDiv = $original_select.parent('div'); 261 262 // Hide original select 263 $original_select.hide(); 264 265 // selectValues (Object) Contains all values 266 var selectValues = getSelectValues($original_select); 267 268 // arrSelects (Array) Contains all values in multidimensionnal array 269 var arrSelects = createMultidimensionnalArray(selectValues, false); 270 271 272 // If the original selectbox contains selected value (node edition), we create corresponding blocks 273 if (window.location.href.indexOf('edit') != -1) 274 { 275 // Cloning arrSelects 276 var cleanArrSelect = createMultidimensionnalArray(selectValues, true); 277 278 $.each(arrSelects, function(i, data) 279 { 280 281 282 if (data != undefined) 283 { 284 if(data.selected != undefined && data.selected == true) data.selected = "selected"; 285 if(data.selected != undefined && data.selected == "selected") { 286 $original_select.find('option[value='+data.key+']').addClass("selecttree_"+s_key+'_'+select_counter); 287 cleanArrSelect[i].selected = "selected"; 288 } 289 290 var selectedChildren = false; 291 $.each(data.children, function(j, dataChild) 292 { 293 if(dataChild != undefined && dataChild.selected != undefined && dataChild.selected == true) dataChild.selected = "selected"; 294 if (dataChild != undefined && dataChild.selected != undefined && dataChild.selected == "selected") 295 { 296 selectedChildren = true; 297 cleanArrSelect[i].selected = "selected"; 298 cleanArrSelect[i].children[j].selected = "selected"; 299 300 // Update main select 301 $original_select.find('option[value='+data.key+']').addClass("selecttree_"+s_key+'_'+select_counter); 302 $original_select.find('option[value='+dataChild.key+']').addClass("selecttree_"+s_key+'_'+select_counter); 303 304 305 // Create new select 306 $(createBlockOfSelect($original_select, cleanArrSelect, "selecttree_"+s_key+'_'+select_counter, false)).appendTo($parentDiv); 307 308 if(cleanArrSelect[i].children[j]) cleanArrSelect[i].children[j].selected = ""; 309 select_counter += 1; 310 } 311 }); 312 313 // Select the parent if no children are selected 314 if (false === selectedChildren && data.selected != undefined && data.selected == "selected") { 315 $(createBlockOfSelect($original_select, cleanArrSelect, "selecttree_"+s_key+'_'+select_counter, false)).appendTo($parentDiv); 316 select_counter += 1; 317 } 318 319 cleanArrSelect[i].selected = ""; 320 } 321 }); 322 } 323 324 325 326 // Add button if select multiple 327 if ($original_select.attr('multiple')) 328 { 329 // Add an empty block 330 $(createBlockOfSelect($original_select, arrSelects, "selecttree_"+s_key+'_'+select_counter, true)).appendTo($parentDiv); 331 332 //var label = $original_select.parent().find("label").text(); 333 var label = "un élément"; 334 $('<p><a href="#" id="add_select_'+s_key+'_'+ (select_counter+1) +'">
334Ajouter '+label+'</a></p>').appendTo($parentDiv); 335 336 // Button event 337 $("#add_select_"+s_key+'_'+(select_counter+1)).click(function(e) 338 { 339 e.preventDefault(); 340 $(this).parent().before(createBlockOfSelect($original_select, arrSelects, "selecttree_"+s_key+'_'+ (select_counter+1), true) 341 .attr("id","selecttree_"+s_key+'_'+ (select_counter+1))); 342 343 select_counter += 1; 344 }); 345 346 } else if(select_counter==0) { //Add button if not select and if not multiple 347 // Add an empty block 348 $(createBlockOfSelect($original_select, arrSelects, "selecttree_"+s_key+'_'+select_counter, true)).appendTo($parentDiv); 349 } 350 351 352 }); 353 } 354 }); 355})(jQuery);; 356(function ($) { 357 358Drupal.googleanalytics = {}; 359 360$(document).ready(function() { 361 362 // Attach mousedown, keyup, touchstart events to document only and catch 363 // clicks on all elements. 364 $(document.body).bind("mousedown keyup touchstart", function(event) { 365 366 // Catch the closest surrounding link of a clicked element. 367 $(event.target).closest("a,area").each(function() { 368 369 // Is the clicked URL internal? 370 if (Drupal.googleanalytics.isInternal(this.href)) { 371 // Skip 'click' tracking, if custom tracking events are bound. 372 if ($(this).is('.colorbox') && (Drupal.settings.googleanalytics.trackColorbox)) { 373 // Do nothing here. The custom event will handle all tracking. 374 //console.info("Click on .colorbox item has been detected."); 375 } 376 // Is download tracking activated and the file extension configured for download tracking? 377 else if (Drupal.settings.googleanalytics.trackDownload && Drupal.googleanalytics.isDownload(this.href)) { 378 // Download link clicked. 379 gtag('event', Drupal.googleanalytics.getDownloadExtension(this.href).toUpperCase(), { 380 event_category: 'Downloads', 381 event_label: Drupal.googleanalytics.getPageUrl(this.href), 382 transport_type: 'beacon' 383 }); 384 } 385 else if (Drupal.googleanalytics.isInternalSpecial(this.href)) { 386 // Keep the internal URL for Google Analytics website overlay intact. 387 // @todo: May require tracking ID 388 var target = this; 389 $.each(Drupal.settings.googleanalytics.account, function () { 390 gtag('config', this, { 391 page_path: Drupal.googleanalytics.getPageUrl(target.href), 392 transport_type: 'beacon' 393 }); 394 }); 395 } 396 } 397 else { 398 if (Drupal.settings.googleanalytics.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) { 399 // Mailto link clicked. 400 gtag('event', 'Click', { 401 event_category: 'Mails', 402 event_label: this.href.substring(7), 403 transport_type: 'beacon' 404 }); 405 } 406 else if (Drupal.settings.googleanalytics.trackOutbound && this.href.match(/^\w+:\/\//i)) { 407 if (Drupal.settings.googleanalytics.trackDomainMode !== 2 || (Drupal.settings.googleanalytics.trackDomainMode === 2 && !Drupal.googleanalytics.isCrossDomain(this.hostname, Drupal.settings.googleanalytics.trackCrossDomains))) { 408 // External link clicked / No top-level cross domain clicked. 409 gtag('event', 'Click', { 410 event_category: 'Outbound links', 411 event_label: this.href, 412 transport_type: 'beacon' 413 }); 414 } 415 } 416 } 417 }); 418 }); 419 420 // Track hash changes as unique pageviews, if this option has been enabled. 421 if (Drupal.settings.googleanalytics.trackUrlFragments) { 422 window.onhashchange = function() { 423 $.each(Drupal.settings.googleanalytics.account, function () { 424 gtag('config', this, { 425 page_path: location.pathname + location.search + location.hash 426 }); 427 }); 428 }; 429 } 430 431 // Colorbox: This event triggers when the transition has completed and the 432 // newly loaded content has been revealed. 433 if (Drupal.settings.googleanalytics.trackColorbox) { 434 $(document).bind("cbox_complete", function () {
435 var href = $.colorbox.element().attr("href"); 436 if (href) { 437 $.each(Drupal.settings.googleanalytics.account, function () { 438 gtag('config', this, { 439 page_path: Drupal.googleanalytics.getPageUrl(href) 440 }); 441 }); 442 } 443 }); 444 } 445 446}); 447 448/** 449 * Check whether the hostname is part of the cross domains or not. 450 * 451 * @param string hostname 452 * The hostname of the clicked URL. 453 * @param array crossDomains 454 * All cross domain hostnames as JS array. 455 * 456 * @return boolean 457 */ 458Drupal.googleanalytics.isCrossDomain = function (hostname, crossDomains) { 459 /** 460 * jQuery < 1.6.3 bug: $.inArray crushes IE6 and Chrome if second argument is 461 * `null` or `undefined`, https://bugs.jquery.com/ticket/10076, 462 * https://github.com/jquery/jquery/commit/a839af034db2bd934e4d4fa6758a3fed8de74174 463 * 464 * @todo: Remove/Refactor in D8 465 */ 466 if (!crossDomains) { 467 return false; 468 } 469 else { 470 return $.inArray(hostname, crossDomains) > -1 ? true : false; 471 } 472}; 473 474/** 475 * Check whether this is a download URL or not. 476 * 477 * @param string url 478 * The web url to check. 479 * 480 * @return boolean 481 */ 482Drupal.googleanalytics.isDownload = function (url) { 483 var isDownload = new RegExp("\\.(" + Drupal.settings.googleanalytics.trackDownloadExtensions + ")([\?#].*)?$", "i"); 484 return isDownload.test(url); 485}; 486 487/** 488 * Check whether this is an absolute internal URL or not. 489 * 490 * @param string url 491 * The web url to check. 492 * 493 * @return boolean 494 */ 495Drupal.googleanalytics.isInternal = function (url) { 496 var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i"); 497 return isInternal.test(url); 498}; 499 500/** 501 * Check whether this is a special URL or not. 502 * 503 * URL types: 504 * - gotwo.module /go/* links. 505 * 506 * @param string url 507 * The web url to check. 508 * 509 * @return boolean 510 */ 511Drupal.googleanalytics.isInternalSpecial = function (url) { 512 var isInternalSpecial = new RegExp("(\/go\/.*)$", "i"); 513 return isInternalSpecial.test(url); 514}; 515 516/** 517 * Extract the relative internal URL from an absolute internal URL. 518 * 519 * Examples: 520 * - https://mydomain.com/node/1 -> /node/1 521 * - https://example.com/foo/bar -> https://example.com/foo/bar 522 * 523 * @param string url 524 * The web url to check. 525 * 526 * @return string 527 * Internal website URL 528 */ 529Drupal.googleanalytics.getPageUrl = function (url) { 530 var extractInternalUrl = new RegExp("^(https?):\/\/" + window.location.host, "i"); 531 return url.replace(extractInternalUrl, ''); 532}; 533 534/** 535 * Extract the download file extension from the URL. 536 * 537 * @param string url 538 * The web url to check. 539 * 540 * @return string 541 * The file extension of the passed url. e.g. "zip", "txt" 542 */ 543Drupal.googleanalytics.getDownloadExtension = function (url) { 544 var extractDownloadextension = new RegExp("\\.(" + Drupal.settings.googleanalytics.trackDownloadExtensions + ")([\?#].*)?$", "i"); 545 var extension = extractDownloadextension.exec(url); 546 return (extension === null) ? '' : extension[1]; 547}; 548 549})(jQuery); 550;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.