PageSourceSearch

https://bioinformatics.ccap.ac.uk/ccaptools/shiny.semantic/shiny-semantic-rating.js

js ccap.ac.uk collected 2026-10-02 14:33:54 UTC 836 bytes, 30 lines download raw bytes

1var semanticRatingBinding = new Shiny.InputBinding();
2$.extend(semanticRatingBinding, {
3  find: function(scope) {
4    return $(scope).find(".ui.rating");
5  },
6  initialize: function(el){
7    $("#" + el.id).rating('setting', 'clearable', true);
8  },
9  getValue: function(el) {
10    return $(el).rating('get rating') || 0;
11  },
12  subscribe: function(el, callback) {
13    $(el).rating('setting', 'onRate', function() {
14      callback();
15    });
16  },
17  receiveMessage: function(el, data) {
18    var $el = $(el);
19    if (data.hasOwnProperty('label')) {
20      $('label[for="' + el.id + '"]').html(data.label);
21    }
22    if (data.hasOwnProperty('value')) {
23      $(el).rating('set rating', data.value);
24    }
25  },
26  unsubscribe: function(el) {
27    $(el).off();
28  }
29});
30Shiny.inputBindings.register(semanticRatingBinding, 'shiny.semanticRating');

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.