export clusters button added
This commit is contained in:
parent
803882d533
commit
e1a8e44a02
@ -644,6 +644,7 @@
|
|||||||
"pick-record": "Pick Record Elements",
|
"pick-record": "Pick Record Elements",
|
||||||
"merge-cluster": "Merge Selected & Re-Cluster",
|
"merge-cluster": "Merge Selected & Re-Cluster",
|
||||||
"merge-close": "Merge Selected & Close",
|
"merge-close": "Merge Selected & Close",
|
||||||
|
"export-cluster": "Export Clusters",
|
||||||
"close": "Close",
|
"close": "Close",
|
||||||
"reset-template": "Reset Template",
|
"reset-template": "Reset Template",
|
||||||
"export": "Export",
|
"export": "Export",
|
||||||
|
@ -644,6 +644,7 @@
|
|||||||
"pick-record": "Pick Record Elements",
|
"pick-record": "Pick Record Elements",
|
||||||
"merge-cluster": "Merge Selected & Re-Cluster",
|
"merge-cluster": "Merge Selected & Re-Cluster",
|
||||||
"merge-close": "Merge Selected & Close",
|
"merge-close": "Merge Selected & Close",
|
||||||
|
"export-cluster": "Export Clusters",
|
||||||
"close": "Close",
|
"close": "Close",
|
||||||
"reset-template": "Reset Template",
|
"reset-template": "Reset Template",
|
||||||
"export": "Export",
|
"export": "Export",
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
<button class="button" bind="deselectAllButton"></button>
|
<button class="button" bind="deselectAllButton"></button>
|
||||||
</td>
|
</td>
|
||||||
<td class="right" style="text-align: right">
|
<td class="right" style="text-align: right">
|
||||||
|
<button class="button" bind="exportClusterButton"></button>
|
||||||
<button class="button button-primary" bind="applyReClusterButton"></button>
|
<button class="button button-primary" bind="applyReClusterButton"></button>
|
||||||
<button class="button" bind="applyCloseButton"></button>
|
<button class="button" bind="applyCloseButton"></button>
|
||||||
<button class="button" bind="closeButton"></button>
|
<button class="button" bind="closeButton"></button>
|
||||||
|
@ -69,6 +69,7 @@ ClusteringDialog.prototype._createDialog = function() {
|
|||||||
this._elmts.or_dialog_blockChars.html($.i18n._('core-dialogs')["block-chars"]);
|
this._elmts.or_dialog_blockChars.html($.i18n._('core-dialogs')["block-chars"]);
|
||||||
this._elmts.selectAllButton.html($.i18n._('core-buttons')["select-all"]);
|
this._elmts.selectAllButton.html($.i18n._('core-buttons')["select-all"]);
|
||||||
this._elmts.deselectAllButton.html($.i18n._('core-buttons')["unselect-all"]);
|
this._elmts.deselectAllButton.html($.i18n._('core-buttons')["unselect-all"]);
|
||||||
|
this._elmts.exportClusterButton.html($.i18n._('core-buttons')["export-cluster"]);
|
||||||
this._elmts.applyReClusterButton.html($.i18n._('core-buttons')["merge-cluster"]);
|
this._elmts.applyReClusterButton.html($.i18n._('core-buttons')["merge-cluster"]);
|
||||||
this._elmts.applyCloseButton.html($.i18n._('core-buttons')["merge-close"]);
|
this._elmts.applyCloseButton.html($.i18n._('core-buttons')["merge-close"]);
|
||||||
this._elmts.closeButton.html($.i18n._('core-buttons')["close"]);
|
this._elmts.closeButton.html($.i18n._('core-buttons')["close"]);
|
||||||
@ -121,6 +122,7 @@ ClusteringDialog.prototype._createDialog = function() {
|
|||||||
|
|
||||||
this._elmts.selectAllButton.click(function() { self._selectAll(); });
|
this._elmts.selectAllButton.click(function() { self._selectAll(); });
|
||||||
this._elmts.deselectAllButton.click(function() { self._deselectAll(); });
|
this._elmts.deselectAllButton.click(function() { self._deselectAll(); });
|
||||||
|
this._elmts.exportClusterButton.click(function() { self._onExportCluster(); });
|
||||||
this._elmts.applyReClusterButton.click(function() { self._onApplyReCluster(); });
|
this._elmts.applyReClusterButton.click(function() { self._onApplyReCluster(); });
|
||||||
this._elmts.applyCloseButton.click(function() { self._onApplyClose(); });
|
this._elmts.applyCloseButton.click(function() { self._onApplyClose(); });
|
||||||
this._elmts.closeButton.click(function() { self._dismiss(); });
|
this._elmts.closeButton.click(function() { self._dismiss(); });
|
||||||
@ -333,6 +335,11 @@ ClusteringDialog.prototype._onApplyReCluster = function() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ClusteringDialog.prototype._onExportCluster = function() {
|
||||||
|
var self = this;
|
||||||
|
self._export();
|
||||||
|
};
|
||||||
|
|
||||||
ClusteringDialog.prototype._apply = function(onDone) {
|
ClusteringDialog.prototype._apply = function(onDone) {
|
||||||
var clusters = this._getRestrictedClusters();
|
var clusters = this._getRestrictedClusters();
|
||||||
var edits = [];
|
var edits = [];
|
||||||
@ -373,6 +380,15 @@ ClusteringDialog.prototype._apply = function(onDone) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ClusteringDialog.prototype._export = function() {
|
||||||
|
var clusters = this._getRestrictedClusters();
|
||||||
|
var data = "text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(clusters));
|
||||||
|
var link=document.createElement('a');
|
||||||
|
link.href='data:' + data;
|
||||||
|
link.download="clusters" + (new Date()).toISOString() + ".json";
|
||||||
|
link.click();
|
||||||
|
};
|
||||||
|
|
||||||
ClusteringDialog.prototype._dismiss = function() {
|
ClusteringDialog.prototype._dismiss = function() {
|
||||||
DialogSystem.dismissUntil(this._level - 1);
|
DialogSystem.dismissUntil(this._level - 1);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user