2010-02-27 01:16:44 +01:00
|
|
|
function ListFacet(div, config, options, selection) {
|
2010-01-30 02:05:30 +01:00
|
|
|
this._div = div;
|
|
|
|
this._config = config;
|
2010-02-02 02:36:02 +01:00
|
|
|
|
|
|
|
this._options = options || {};
|
|
|
|
if (!("sort" in this._options)) {
|
|
|
|
this._options.sort = "name";
|
|
|
|
}
|
|
|
|
|
2010-02-27 01:16:44 +01:00
|
|
|
this._selection = selection || [];
|
2010-02-27 07:59:55 +01:00
|
|
|
this._blankChoice = null;
|
|
|
|
this._errorChoice = null;
|
|
|
|
|
2010-01-30 02:05:30 +01:00
|
|
|
this._data = null;
|
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
this._initializeUI();
|
|
|
|
this._update();
|
2010-01-30 02:05:30 +01:00
|
|
|
}
|
|
|
|
|
2010-02-27 01:16:44 +01:00
|
|
|
ListFacet.reconstruct = function(div, uiState) {
|
|
|
|
return new ListFacet(div, uiState.c, uiState.o, uiState.s);
|
|
|
|
};
|
|
|
|
|
2010-04-17 08:58:30 +02:00
|
|
|
ListFacet.prototype.dispose = function() {
|
|
|
|
};
|
|
|
|
|
2010-03-23 19:53:29 +01:00
|
|
|
ListFacet.prototype.reset = function() {
|
|
|
|
this._selection = [];
|
|
|
|
this._blankChoice = null;
|
|
|
|
this._errorChoice = null;
|
|
|
|
};
|
|
|
|
|
2010-02-27 01:16:44 +01:00
|
|
|
ListFacet.prototype.getUIState = function() {
|
|
|
|
var json = {
|
|
|
|
c: this.getJSON(),
|
|
|
|
o: this._options
|
|
|
|
};
|
|
|
|
|
|
|
|
json.s = json.c.selection;
|
|
|
|
delete json.c.selection;
|
|
|
|
|
|
|
|
return json;
|
2010-04-08 21:52:23 +02:00
|
|
|
};
|
2010-02-27 01:16:44 +01:00
|
|
|
|
2010-01-30 02:05:30 +01:00
|
|
|
ListFacet.prototype.getJSON = function() {
|
2010-02-19 00:27:40 +01:00
|
|
|
var o = {
|
|
|
|
type: "list",
|
|
|
|
name: this._config.name,
|
|
|
|
columnName: this._config.columnName,
|
|
|
|
expression: this._config.expression,
|
2010-03-07 23:54:02 +01:00
|
|
|
omitBlank: "omitBlank" in this._config ? this._config.omitBlank : false,
|
|
|
|
omitError: "omitError" in this._config ? this._config.omitError : false,
|
2010-02-27 07:59:55 +01:00
|
|
|
selection: [],
|
2010-04-09 03:00:44 +02:00
|
|
|
selectBlank: this._blankChoice !== null && this._blankChoice.s,
|
|
|
|
selectError: this._errorChoice !== null && this._errorChoice.s
|
2010-04-08 21:52:23 +02:00
|
|
|
};
|
2010-01-30 02:05:30 +01:00
|
|
|
for (var i = 0; i < this._selection.length; i++) {
|
2010-02-19 00:27:40 +01:00
|
|
|
var choice = {
|
|
|
|
v: cloneDeep(this._selection[i].v)
|
|
|
|
};
|
2010-01-30 02:05:30 +01:00
|
|
|
o.selection.push(choice);
|
|
|
|
}
|
|
|
|
return o;
|
|
|
|
};
|
|
|
|
|
2010-02-01 01:19:41 +01:00
|
|
|
ListFacet.prototype.hasSelection = function() {
|
2010-02-27 07:59:55 +01:00
|
|
|
return this._selection.length > 0 ||
|
2010-04-09 03:00:44 +02:00
|
|
|
(this._blankChoice !== null && this._blankChoice.s) ||
|
|
|
|
(this._errorChoice !== null && this._errorChoice.s);
|
2010-02-01 01:19:41 +01:00
|
|
|
};
|
|
|
|
|
2010-01-30 02:05:30 +01:00
|
|
|
ListFacet.prototype.updateState = function(data) {
|
|
|
|
this._data = data;
|
|
|
|
|
2010-03-12 21:08:50 +01:00
|
|
|
if ("choices" in data) {
|
|
|
|
var selection = [];
|
|
|
|
var choices = data.choices;
|
|
|
|
for (var i = 0; i < choices.length; i++) {
|
|
|
|
var choice = choices[i];
|
|
|
|
if (choice.s) {
|
|
|
|
selection.push(choice);
|
|
|
|
}
|
2010-01-30 02:05:30 +01:00
|
|
|
}
|
2010-03-12 21:08:50 +01:00
|
|
|
this._selection = selection;
|
|
|
|
this._reSortChoices();
|
2010-01-30 02:05:30 +01:00
|
|
|
|
2010-03-12 21:08:50 +01:00
|
|
|
this._blankChoice = data.blankChoice || null;
|
|
|
|
this._errorChoice = data.errorChoice || null;
|
|
|
|
}
|
2010-02-27 07:59:55 +01:00
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
this._update();
|
2010-01-30 02:05:30 +01:00
|
|
|
};
|
|
|
|
|
2010-02-02 02:36:02 +01:00
|
|
|
ListFacet.prototype._reSortChoices = function() {
|
|
|
|
this._data.choices.sort(this._options.sort == "name" ?
|
|
|
|
function(a, b) {
|
|
|
|
return a.v.l.localeCompare(b.v.l);
|
|
|
|
} :
|
|
|
|
function(a, b) {
|
|
|
|
return b.c - a.c;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
ListFacet.prototype._initializeUI = function() {
|
2010-01-30 02:05:30 +01:00
|
|
|
var self = this;
|
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
this._div.empty().show().html(
|
2010-04-13 07:41:32 +02:00
|
|
|
'<div class="facet-title">' +
|
|
|
|
'<img src="images/close.png" title="Remove this facet" class="facet-choice-link" bind="removeButton"/>' +
|
|
|
|
'<span bind="titleSpan"></span>' +
|
2010-04-21 09:04:44 +02:00
|
|
|
'</div>' +
|
|
|
|
'<div class="facet-status" bind="statusDiv" style="display:none;"><div class="grid-layout layout-tightest layout-full">' +
|
|
|
|
'<table><tr>' +
|
|
|
|
'<td bind="choiceCountContainer"></td>' +
|
|
|
|
'<td width="1%"><a href="javascript:{}" class="action" bind="clusterLink">Cluster</a></td>' +
|
|
|
|
'</tr></table>' +
|
|
|
|
'</div></div>' +
|
|
|
|
'<div class="facet-controls" bind="controlsDiv" style="display:none;"><div class="grid-layout layout-tightest layout-full">' +
|
|
|
|
'<table><tr>' +
|
|
|
|
'<td>Sort by ' +
|
|
|
|
'<a href="javascript:{}" bind="sortByNameLink" class="facet-mode-link">Name</a> ' +
|
|
|
|
'<a href="javascript:{}" bind="sortByCountLink" class="facet-mode-link">Count</a>' +
|
|
|
|
'</td>' +
|
|
|
|
'<td width="1%">' +
|
|
|
|
'<a href="javascript:{}" class="action" bind="resetButton">Reset</a>' +
|
|
|
|
'</td>' +
|
|
|
|
'</tr></table>' +
|
|
|
|
'</div></div>' +
|
|
|
|
'<div class="facet-body" bind="bodyDiv"></div>'
|
2010-04-13 07:41:32 +02:00
|
|
|
);
|
2010-04-21 09:04:44 +02:00
|
|
|
this._elmts = DOM.bind(this._div);
|
2010-01-30 02:05:30 +01:00
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
this._elmts.titleSpan.text(this._config.name);
|
|
|
|
this._elmts.removeButton.click(function() { self._remove(); });
|
|
|
|
this._elmts.resetButton.click(function() { self._reset(); });
|
|
|
|
|
|
|
|
this._elmts.sortByCountLink.click(function() {
|
|
|
|
if (self._options.sort != "count") {
|
|
|
|
self._options.sort = "count";
|
|
|
|
self._reSortChoices();
|
|
|
|
self._update(true);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
this._elmts.sortByNameLink.click(function() {
|
|
|
|
if (self._options.sort != "name") {
|
|
|
|
self._options.sort = "name";
|
|
|
|
self._reSortChoices();
|
|
|
|
self._update(true);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
if (this._config.expression == "value") {
|
|
|
|
this._elmts.clusterLink.click(function() { self._doEdit(); });
|
|
|
|
} else {
|
|
|
|
this._elmts.clusterLink.hide();
|
|
|
|
}
|
2010-02-01 01:19:41 +01:00
|
|
|
|
2010-02-02 02:36:02 +01:00
|
|
|
if (!("scroll" in this._options) || this._options.scroll) {
|
2010-04-21 09:04:44 +02:00
|
|
|
this._elmts.bodyDiv.addClass("facet-body-scrollable");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
ListFacet.prototype._update = function(resetScroll) {
|
|
|
|
var self = this;
|
|
|
|
|
|
|
|
var scrollTop = 0;
|
|
|
|
if (!resetScroll) {
|
|
|
|
try {
|
|
|
|
scrollTop = this._elmts.bodyDiv[0].scrollTop;
|
|
|
|
} catch (e) {
|
|
|
|
}
|
2010-02-02 02:36:02 +01:00
|
|
|
}
|
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
this._elmts.bodyDiv.empty();
|
|
|
|
|
2010-04-08 22:16:08 +02:00
|
|
|
if (!this._data) {
|
2010-04-21 09:04:44 +02:00
|
|
|
this._elmts.statusDiv.hide();
|
|
|
|
this._elmts.controlsDiv.hide();
|
|
|
|
|
|
|
|
$('<div>').text("Loading...").addClass("facet-body-message").appendTo(this._elmts.bodyDiv);
|
2010-03-12 21:08:50 +01:00
|
|
|
} else if ("error" in this._data) {
|
2010-04-21 09:04:44 +02:00
|
|
|
this._elmts.statusDiv.hide();
|
|
|
|
this._elmts.controlsDiv.hide();
|
2010-04-13 07:41:32 +02:00
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
$('<div>').text(this._data.error).addClass("facet-body-message").appendTo(this._elmts.bodyDiv);
|
2010-01-30 02:05:30 +01:00
|
|
|
} else {
|
2010-04-21 09:04:44 +02:00
|
|
|
this._elmts.statusDiv.show();
|
|
|
|
this._elmts.controlsDiv.show();
|
|
|
|
|
2010-04-13 07:41:32 +02:00
|
|
|
var choices = this._data.choices;
|
2010-04-09 03:48:50 +02:00
|
|
|
var selectionCount = this._selection.length +
|
|
|
|
(this._blankChoice !== null && this._blankChoice.s ? 1 : 0) +
|
|
|
|
(this._errorChoice !== null && this._errorChoice.s ? 1 : 0);
|
2010-04-21 09:04:44 +02:00
|
|
|
|
|
|
|
this._elmts.choiceCountContainer.text(choices.length + " choices");
|
2010-01-30 02:05:30 +01:00
|
|
|
if (selectionCount > 0) {
|
2010-04-21 09:04:44 +02:00
|
|
|
this._elmts.resetButton.show();
|
2010-04-13 07:41:32 +02:00
|
|
|
} else {
|
2010-04-21 09:04:44 +02:00
|
|
|
this._elmts.resetButton.hide();
|
2010-01-30 02:05:30 +01:00
|
|
|
}
|
|
|
|
|
2010-04-13 07:41:32 +02:00
|
|
|
if (this._options.sort == "name") {
|
2010-04-21 09:04:44 +02:00
|
|
|
this._elmts.sortByNameLink.addClass("facet-mode-link-selected");
|
|
|
|
this._elmts.sortByCountLink.removeClass("facet-mode-link-selected");
|
2010-04-13 07:41:32 +02:00
|
|
|
} else {
|
2010-04-21 09:04:44 +02:00
|
|
|
this._elmts.sortByNameLink.removeClass("facet-mode-link-selected");
|
|
|
|
this._elmts.sortByCountLink.addClass("facet-mode-link-selected");
|
2010-04-13 07:41:32 +02:00
|
|
|
}
|
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
var choiceContainer = $('<div>');
|
|
|
|
|
2010-03-08 20:07:16 +01:00
|
|
|
var renderEdit = this._config.expression == "value";
|
2010-02-27 07:59:55 +01:00
|
|
|
var renderChoice = function(choice, customLabel) {
|
|
|
|
var label = customLabel || choice.v.l;
|
2010-01-30 02:05:30 +01:00
|
|
|
var count = choice.c;
|
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
var choiceDiv = $('<div></div>').addClass("facet-choice").appendTo(choiceContainer);
|
2010-01-30 02:05:30 +01:00
|
|
|
if (choice.s) {
|
|
|
|
choiceDiv.addClass("facet-choice-selected");
|
|
|
|
}
|
|
|
|
|
|
|
|
var a = $('<a href="javascript:{}"></a>').addClass("facet-choice-label").text(label).appendTo(choiceDiv);
|
|
|
|
$('<span></span>').addClass("facet-choice-count").text(count).appendTo(choiceDiv);
|
|
|
|
|
|
|
|
var select = function() {
|
|
|
|
self._select(choice, false);
|
|
|
|
};
|
|
|
|
var selectOnly = function() {
|
|
|
|
self._select(choice, true);
|
|
|
|
};
|
|
|
|
var deselect = function() {
|
|
|
|
self._deselect(choice);
|
|
|
|
};
|
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
var editLink = $('<a href="javascript:{}"></a>')
|
|
|
|
.addClass("facet-choice-link")
|
|
|
|
.text("edit")
|
|
|
|
.css("visibility", "hidden")
|
|
|
|
.prependTo(choiceDiv);
|
|
|
|
|
2010-04-13 06:49:28 +02:00
|
|
|
if (renderEdit && customLabel === undefined) {
|
2010-04-21 09:04:44 +02:00
|
|
|
editLink.click(function() {
|
|
|
|
self._editChoice(choice, choiceDiv);
|
|
|
|
})
|
2010-04-13 06:49:28 +02:00
|
|
|
|
|
|
|
choiceDiv
|
|
|
|
.mouseenter(function() {
|
|
|
|
editLink.css("visibility", "visible");
|
|
|
|
})
|
|
|
|
.mouseleave(function() {
|
|
|
|
editLink.css("visibility", "hidden");
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
var includeExcludeLink = $('<a href="javascript:{}"></a>')
|
|
|
|
.addClass("facet-choice-link")
|
|
|
|
.text("include")
|
|
|
|
.css("visibility", "hidden")
|
|
|
|
.click(deselect)
|
|
|
|
.prependTo(choiceDiv);
|
|
|
|
|
2010-01-30 02:05:30 +01:00
|
|
|
if (choice.s) { // selected
|
|
|
|
if (selectionCount > 1) {
|
|
|
|
// select only
|
|
|
|
a.click(selectOnly);
|
|
|
|
} else {
|
|
|
|
// deselect
|
|
|
|
a.click(deselect);
|
|
|
|
}
|
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
includeExcludeLink
|
2010-04-13 06:49:28 +02:00
|
|
|
.text("exclude")
|
2010-04-21 09:04:44 +02:00
|
|
|
.css("visibility", "visible")
|
|
|
|
.click(deselect);
|
2010-04-13 06:49:28 +02:00
|
|
|
|
2010-01-30 02:05:30 +01:00
|
|
|
} else if (selectionCount > 0) {
|
|
|
|
a.click(selectOnly);
|
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
includeExcludeLink.click(select);
|
2010-04-13 06:49:28 +02:00
|
|
|
|
2010-03-08 20:07:16 +01:00
|
|
|
choiceDiv
|
|
|
|
.mouseenter(function() {
|
2010-04-21 09:04:44 +02:00
|
|
|
includeExcludeLink.css("visibility", "visible");
|
2010-03-08 20:07:16 +01:00
|
|
|
})
|
|
|
|
.mouseleave(function() {
|
2010-04-21 09:04:44 +02:00
|
|
|
includeExcludeLink.css("visibility", "hidden");
|
2010-03-08 20:07:16 +01:00
|
|
|
});
|
2010-04-13 06:49:28 +02:00
|
|
|
} else {
|
|
|
|
a.click(select);
|
2010-03-08 20:07:16 +01:00
|
|
|
}
|
2010-01-30 02:05:30 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
for (var i = 0; i < choices.length; i++) {
|
|
|
|
renderChoice(choices[i]);
|
|
|
|
}
|
2010-04-09 03:00:44 +02:00
|
|
|
if (this._blankChoice !== null) {
|
2010-02-27 07:59:55 +01:00
|
|
|
renderChoice(this._blankChoice, "(blank)");
|
|
|
|
}
|
2010-04-09 03:00:44 +02:00
|
|
|
if (this._errorChoice !== null) {
|
2010-02-27 07:59:55 +01:00
|
|
|
renderChoice(this._errorChoice, "(error)");
|
|
|
|
}
|
2010-01-30 02:05:30 +01:00
|
|
|
|
2010-04-21 09:04:44 +02:00
|
|
|
this._elmts.bodyDiv.append(choiceContainer);
|
|
|
|
this._elmts.bodyDiv[0].scrollTop = scrollTop;
|
2010-03-02 20:58:47 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
ListFacet.prototype._doEdit = function() {
|
2010-03-13 10:32:06 +01:00
|
|
|
new ClusteringDialog(this._config.columnName, this._config.expression);
|
2010-01-30 02:05:30 +01:00
|
|
|
};
|
|
|
|
|
2010-03-08 20:07:16 +01:00
|
|
|
ListFacet.prototype._editChoice = function(choice, choiceDiv) {
|
|
|
|
var self = this;
|
|
|
|
|
|
|
|
var menu = MenuSystem.createMenu().addClass("data-table-cell-editor").width("400px");
|
|
|
|
menu.html(
|
|
|
|
'<table class="data-table-cell-editor-layout">' +
|
|
|
|
'<tr>' +
|
|
|
|
'<td colspan="3">' +
|
|
|
|
'<textarea class="data-table-cell-editor-editor" bind="textarea" />' +
|
|
|
|
'</td>' +
|
|
|
|
'</tr>' +
|
|
|
|
'<tr>' +
|
|
|
|
'<td width="1%" align="center">' +
|
|
|
|
'<button bind="okButton">Apply</button><br/>' +
|
|
|
|
'<span class="data-table-cell-editor-key">Enter</span>' +
|
|
|
|
'</td>' +
|
|
|
|
'<td width="1%" align="center">' +
|
|
|
|
'<button bind="cancelButton">Cancel</button><br/>' +
|
|
|
|
'<span class="data-table-cell-editor-key">Esc</span>' +
|
|
|
|
'</td>' +
|
|
|
|
'<td>' +
|
|
|
|
'</td>' +
|
|
|
|
'</tr>' +
|
|
|
|
'</table>'
|
|
|
|
);
|
|
|
|
var elmts = DOM.bind(menu);
|
|
|
|
|
|
|
|
MenuSystem.showMenu(menu, function(){});
|
|
|
|
MenuSystem.positionMenuLeftRight(menu, choiceDiv);
|
|
|
|
|
|
|
|
var originalContent = choice.v.v;
|
|
|
|
var commit = function() {
|
|
|
|
var text = elmts.textarea[0].value;
|
|
|
|
|
|
|
|
MenuSystem.dismissAll();
|
|
|
|
|
|
|
|
Gridworks.postProcess(
|
|
|
|
"mass-edit",
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
columnName: self._config.columnName,
|
|
|
|
expression: "value",
|
|
|
|
edits: JSON.stringify([{
|
|
|
|
from: [ originalContent ],
|
|
|
|
to: text
|
|
|
|
}])
|
|
|
|
},
|
2010-04-09 00:16:12 +02:00
|
|
|
{
|
|
|
|
includeEngine: false, // we're really changing all rows, not just the visible ones
|
|
|
|
cellsChanged: true
|
|
|
|
},
|
2010-03-08 20:07:16 +01:00
|
|
|
{
|
|
|
|
onDone: function(o) {
|
|
|
|
var selection = [];
|
|
|
|
var gotSelection = false;
|
|
|
|
for (var i = 0; i < self._selection.length; i++) {
|
|
|
|
var choice = self._selection[i];
|
|
|
|
if (choice.v.v == originalContent) {
|
|
|
|
if (gotSelection) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
choice.v.v = text;
|
|
|
|
gotSelection = true; // eliminate duplicated selections due to changing one selected choice to another
|
|
|
|
}
|
|
|
|
selection.push(choice);
|
|
|
|
}
|
|
|
|
self._selection = selection;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
elmts.okButton.click(commit);
|
|
|
|
elmts.textarea
|
|
|
|
.text(originalContent)
|
|
|
|
.keydown(function(evt) {
|
2010-03-08 20:27:37 +01:00
|
|
|
if (!evt.shiftKey) {
|
|
|
|
if (evt.keyCode == 13) {
|
|
|
|
commit();
|
|
|
|
} else if (evt.keyCode == 27) {
|
|
|
|
MenuSystem.dismissAll();
|
|
|
|
}
|
2010-03-08 20:07:16 +01:00
|
|
|
}
|
|
|
|
})
|
|
|
|
.select()
|
|
|
|
.focus();
|
|
|
|
|
|
|
|
elmts.cancelButton.click(function() {
|
|
|
|
MenuSystem.dismissAll();
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2010-01-30 02:05:30 +01:00
|
|
|
ListFacet.prototype._select = function(choice, only) {
|
|
|
|
if (only) {
|
|
|
|
this._selection = [];
|
2010-04-09 03:00:44 +02:00
|
|
|
if (this._blankChoice !== null) {
|
2010-02-27 07:59:55 +01:00
|
|
|
this._blankChoice.s = false;
|
|
|
|
}
|
2010-04-09 03:00:44 +02:00
|
|
|
if (this._errorChoice !== null) {
|
2010-02-27 07:59:55 +01:00
|
|
|
this._errorChoice.s = false;
|
|
|
|
}
|
2010-01-30 02:05:30 +01:00
|
|
|
}
|
2010-02-27 07:59:55 +01:00
|
|
|
|
|
|
|
choice.s = true;
|
|
|
|
if (choice !== this._errorChoice && choice !== this._blankChoice) {
|
|
|
|
this._selection.push(choice);
|
|
|
|
}
|
|
|
|
|
2010-01-30 02:05:30 +01:00
|
|
|
this._updateRest();
|
|
|
|
};
|
|
|
|
|
|
|
|
ListFacet.prototype._deselect = function(choice) {
|
2010-02-27 07:59:55 +01:00
|
|
|
if (choice === this._errorChoice || choice === this._blankChoice) {
|
|
|
|
choice.s = false;
|
|
|
|
} else {
|
|
|
|
for (var i = this._selection.length - 1; i >= 0; i--) {
|
|
|
|
if (this._selection[i] === choice) {
|
|
|
|
this._selection.splice(i, 1);
|
|
|
|
break;
|
|
|
|
}
|
2010-01-30 02:05:30 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
this._updateRest();
|
|
|
|
};
|
|
|
|
|
|
|
|
ListFacet.prototype._reset = function() {
|
|
|
|
this._selection = [];
|
2010-02-27 07:59:55 +01:00
|
|
|
this._blankChoice = null;
|
|
|
|
this._errorChoice = null;
|
|
|
|
|
2010-01-30 02:05:30 +01:00
|
|
|
this._updateRest();
|
|
|
|
};
|
|
|
|
|
2010-02-01 01:19:41 +01:00
|
|
|
ListFacet.prototype._remove = function() {
|
|
|
|
ui.browsingEngine.removeFacet(this);
|
|
|
|
|
|
|
|
this._div = null;
|
|
|
|
this._config = null;
|
2010-02-27 07:59:55 +01:00
|
|
|
|
2010-02-01 01:19:41 +01:00
|
|
|
this._selection = null;
|
2010-02-27 07:59:55 +01:00
|
|
|
this._blankChoice = null;
|
|
|
|
this._errorChoice = null;
|
2010-02-01 01:19:41 +01:00
|
|
|
this._data = null;
|
|
|
|
};
|
|
|
|
|
2010-01-30 02:05:30 +01:00
|
|
|
ListFacet.prototype._updateRest = function() {
|
2010-02-26 22:56:41 +01:00
|
|
|
Gridworks.update({ engineChanged: true });
|
2010-02-01 01:19:41 +01:00
|
|
|
};
|