1/** 2 * @file 3 * Core JS file. 4 * global: jQuery, Drupal 5 */ 6(function ($, Drupal) { 7 'use strict'; 8 Drupal.behaviors.curatorio = { 9 attach: function (context, settings) { 10 // Push all ids into array for curator widget. 11 var id_array =[]; 12 13 $('.curator-feed').each(function () { 14 id_array.push(this.id); 15 }); 16 17 // Curator Elements process. 18 $.each(id_array, function( index, value ) { 19 var feed_id = $('#' + value).attr("data-feed-id"); 20 var widget_type = $('#' + value).attr("data-widget-type"); 21 22 if(widget_type == 'Panel'){ 23 new Curator.Widgets.Panel({ 24 feedId: feed_id, // FEED_ID to load 25 container:'#' + value, // HTML element to hold the feed 26 debug: false, // turn debugging on or off 27 filter: { 28 showNetworks: true, // show Networks filter bar 29 showSources: true // show Sources filter bar 30 } 31 }); 32 }else if(widget_type == 'Grid'){ 33 new Curator.Widgets.Grid({ 34 feedId: feed_id, // FEED_ID to load 35 container:'#' + value, // HTML element to hold the feed 36 debug: false, // turn debugging on or off 37 filter: { 38 showNetworks: true, // show Networks filter bar 39 showSources: true // show Sources filter bar 40 } 41 }); 42 }else if(widget_type == 'Carousel'){ 43 new Curator.Widgets.Carousel({ 44 feedId: feed_id, // FEED_ID to load 45 container:'#' + value, // HTML element to hold the feed 46 debug: false, // turn debugging on or off 47 filter: { 48 showNetworks: true, // show Networks filter bar 49 showSources: true // show Sources filter bar 50 } 51 }); 52 }else{ 53 new Curator.Widgets.Waterfall({ 54 feedId: feed_id, // FEED_ID to load 55 container:'#' + value, // HTML element to hold the feed 56 postsPerPage: 9, // number of posts per page 57 debug: false, // turn debugging on or off 58 filter: { 59 showNetworks: true, // show Networks filter bar 60 showSources: true // show Sources filter bar 61 } 62 }); 63 } 64 }); 65 } 66 }; 67})(jQuery, Drupal);
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.