").addClass(css.item_type).text(data.id));
return li;
},
flyout_request:function(data){
var self = this;
var o = this.options,
sug_data = this.flyoutpane.data("data.suggest");
if (sug_data && data.id === sug_data.id) {
if (!this.flyoutpane.is(":visible")) {
var s = this.get_selected();
this.flyout_position(s);
this.flyoutpane.show();
this.input.trigger("fb-flyoutpane-show", this);
}
return;
}
// check $.suggest.flyout.cache
var cached = $.suggest.flyout.cache[data.id];
if (cached) {
this.flyout_response(cached);
return;
}
clearTimeout(this.flyout_request.timeout);
this.flyout_request.timeout =
setTimeout(function(){self.flyout_response(data);}, o.xhr_delay);
},
flyout_response:function(data){
var o = this.options,
p = this.pane,
s = this.get_selected() || [];
if (p.is(":visible") && s.length) {
var sug_data = s.data("data.suggest");
if (sug_data && data.id === sug_data.id) {
this.flyoutpane.html('
' + data.description + '
');
this.flyout_position(s);
this.flyoutpane.show()
.data("data.suggest", sug_data);
this.input.trigger("fb-flyoutpane-show", this);
}
}
}
}));
$.extend($.suggest.suggestterm, {
defaults: $.extend(true, {}, $.suggest.suggest.defaults, {
service_url: "",
service_path: "/command/rdf-exporter-extension/suggest-term",
type_strict:"classes",
suggest_new:"Add it"
})
});
})(jQuery);