1/*jslint browser: true, nomen: true, white: true */ 2/* global jQuery, $ */ 3jQuery(function($) { 4"use strict"; 5 6 /* 7 * Add bootstrap class to the add file content for filebrowser 8 */ 9 function bootstrapFileBrowser() { 10 // Wrap filebrowser content with Bootstrap classes 11 $('.js-filebrowser').wrapInner('<div class="modal-dialog modal-lg"><div class="modal-content modal-filebrowser"></div></div>'); 12 $('.js-filebrowser').modal('hide'); 13 } 14 15 /* 16 * Display selected file name next to collapsible element title 17 */ 18 function updateFileLegend(e){ 19 // Get collapsible element with select-file class and 20 // title of the file from filebrowser.js 21 var selectfileTitle = $('.select-file legend a'), 22 title = e.originalEvent.data.title; 23 24 // Display the file name 25 if(selectfileTitle.find('.file-name').length > 0) { 26 selectfileTitle.find('.file-name').text(' - ' + title); 27 } else { 28 selectfileTitle.find('.collapse-indicator').before('<span class="text-small text-midtone file-name"> - '+ title + '</span>'); 29 } 30 } 31 32 $(document).on('fileselect', function(e){ 33 updateFileLegend(e); 34 // Collapse the file browser 35 $('.select-file').find('.collapse').collapse('hide'); 36 }); 37 38 bootstrapFileBrowser(); 39});
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.