1/** 2 * @file 3 * Javascript for disqus configuration form. 4 */ 5 6(function ($) { 7 8"use strict"; 9 10Drupal.behaviors.disqusSettingsForm = { 11 attach: function (context) { 12 var $context = $(context); 13 14 $context.find('#edit-visibility').drupalSetSummary(function (context) { 15 var vals = []; 16 17 $('#edit-disqus-nodetypes div.form-type-checkbox').each(function () { 18 var vals_node_types = []; 19 if ($(this).find('input').is(':checked')) { 20 vals_node_types.push(Drupal.checkPlain($(this).find('label').text())); 21 } 22 23 if (vals_node_types.length) { 24 vals.push($('label[for="edit-disqus-nodetypes"]').text() + ': ' + vals_node_types.join(', ')); 25 } 26 }); 27 28 vals.push(Drupal.t('Location: ') + Drupal.checkPlain($('#edit-disqus-location').val())); 29 vals.push(Drupal.t('Weight: ') + Drupal.checkPlain($('#edit-disqus-weight').val())); 30 31 return vals.join('<br />'); 32 }); 33 34 $context.find('#edit-behavior').drupalSetSummary(function (context) { 35 var vals = []; 36 37 if ($('#edit-disqus-userapikey').val()) { 38 vals.push($('#edit-disqus-userapikey').parent().find('label').text()); 39 } 40 41 var checkboxes = ['#edit-disqus-localization', '#edit-disqus-inherit-login']; 42 for (var i in checkboxes) { 43 if ($(checkboxes[i]).is(':checked')) { 44 vals.push($(checkboxes[i]).parent().find('label').text()); 45 } 46 } 47 48 return vals.join(', '); 49 }); 50 51 $context.find('#edit-advanced').drupalSetSummary(function (context) { 52 var vals = []; 53 54 if ($('#edit-disqus-publickey').val()) { 55 vals.push($('#edit-disqus-publickey').parent().find('label').text()); 56 } 57 58 if ($('#edit-disqus-secretkey').val()) { 59 vals.push($('#edit-disqus-secretkey').parent().find('label').text()); 60 } 61 62 return vals.join(', '); 63 }); 64 } 65}; 66 67})(jQuery);
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.