Sha256: 57ab9940923557b527f4a1a4e361f9bc0eb47e4265103ab38bd9e99622f0dcbf

Contents?: true

Size: 485 Bytes

Versions: 6

Compression:

Stored size: 485 Bytes

Contents

IQVOC.labelResolver = (function($) {

"use strict";

return function(context) {
	$("a.unlabeled", context).each(processNode);
};

function retrieveLabel(conceptURL, el, callback) {
  var proxy = $("body").data("remote-label-path");
	$.get(proxy, { concept_url: conceptURL }, function(data, status, xhr) {
		el.text(data.label);
		el.removeClass("unlabeled");
	});
}

function processNode(i, node) {
	var el = $(node);
	var uri = el.attr("href");
	retrieveLabel(uri, el);
}

}(jQuery))

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
iqvoc-4.3.3 app/assets/javascripts/iqvoc/label_resolver.js
iqvoc-4.5.0 app/assets/javascripts/iqvoc/label_resolver.js
iqvoc-4.4.0 app/assets/javascripts/iqvoc/label_resolver.js
iqvoc-4.3.2 app/assets/javascripts/iqvoc/label_resolver.js
iqvoc-4.3.1 app/assets/javascripts/iqvoc/label_resolver.js
iqvoc-4.3.0 app/assets/javascripts/iqvoc/label_resolver.js