/*jslint vars: true, unparam: true */ /*global jQuery, IQVOC */ IQVOC.EntitySelector = (function($) { "use strict"; var EntitySelector = function(node) { if(!(this instanceof EntitySelector)) { // "new" keyword optional return new EntitySelector(node); } this.el = $(node).hide(); // XXX: rename this.container = $('
').data("widget", this); this.delimiter = ","; this.singular = this.el.data("singular") || false; this.entities = this.getSelection(); this.uriTemplate = this.el.data("entity-uri"); var self = this; var selection = $.map(this.el.data("entities"), function(entity, i) { return self.createEntity(entity); }); selection = $('