more facet tweaks, menu case tweaks

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1622 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
James Home 2010-10-22 23:32:37 +00:00
parent d85ae8c28c
commit cbb73b17be
12 changed files with 111 additions and 120 deletions

View File

@ -201,65 +201,65 @@ RangeFacet.prototype._renderOtherChoices = function() {
// ----------------- numeric -----------------
var numericCheck = $('<input type="checkbox" />').attr("id",facet_id + "-numeric").appendTo(choices).change(function() {
var numericDiv = $('<div class="facet-range-item"></div>').appendTo(choices);
var numericCheck = $('<input type="checkbox" />').attr("id",facet_id + "-numeric").appendTo(numericDiv).change(function() {
self._selectNumeric = !self._selectNumeric;
self._updateRest();
});
if (this._selectNumeric) numericCheck.attr("checked","checked");
var numericLabel = $('<label>').attr("for", facet_id + "-numeric").appendTo(choices);
$('<span>').text("Numeric ").addClass("facet-choice-label").appendTo(numericLabel);
$('<br>').appendTo(numericLabel);
$('<span>').text(this._numericCount).addClass("facet-choice-count").appendTo(numericLabel);
var numericLabel = $('<label>').attr("for", facet_id + "-numeric").appendTo(numericDiv);
$('<span>').text("Numeric ").addClass("facet-range-choice-label").appendTo(numericLabel);
$('<div>').text(this._numericCount).addClass("facet-range-choice-count").appendTo(numericLabel);
// ----------------- non-numeric -----------------
var nonNumericCheck = $('<input type="checkbox" />').attr("id",facet_id + "-non-numeric").appendTo(choices).change(function() {
var nonNumericDiv = $('<div class="facet-range-item"></div>').appendTo(choices);
var nonNumericCheck = $('<input type="checkbox" />').attr("id",facet_id + "-non-numeric").appendTo(nonNumericDiv).change(function() {
self._selectNonNumeric = !self._selectNonNumeric;
self._updateRest();
});
if (this._selectNonNumeric) nonNumericCheck.attr("checked","checked");
var nonNumericLabel = $('<label>').attr("for", facet_id + "-non-numeric").appendTo(choices);
$('<span>').text("Non-numeric ").addClass("facet-choice-label").appendTo(nonNumericLabel);
$('<br>').appendTo(nonNumericLabel);
$('<span>').text(this._nonNumericCount).addClass("facet-choice-count").appendTo(nonNumericLabel);
var nonNumericLabel = $('<label>').attr("for", facet_id + "-non-numeric").appendTo(nonNumericDiv);
$('<span>').text("Non-numeric ").addClass("facet-range-choice-label").appendTo(nonNumericLabel);
$('<div>').text(this._nonNumericCount).addClass("facet-range-choice-count").appendTo(nonNumericLabel);
if (this._baseNonNumericCount === 0) nonNumericCheck.removeAttr("checked");
// ----------------- blank -----------------
var blankCheck = $('<input type="checkbox" />').attr("id",facet_id + "-blank").appendTo(choices).change(function() {
var blankDiv = $('<div class="facet-range-item"></div>').appendTo(choices);
var blankCheck = $('<input type="checkbox" />').attr("id",facet_id + "-blank").appendTo(blankDiv).change(function() {
self._selectBlank = !self._selectBlank;
self._updateRest();
});
if (this._selectBlank) blankCheck.attr("checked","checked");
var blankLabel = $('<label>').attr("for", facet_id + "-blank").appendTo(choices);
$('<span>').text("Blank ").addClass("facet-choice-label").appendTo(blankLabel);
$('<br>').appendTo(blankLabel);
$('<span>').text(this._blankCount).addClass("facet-choice-count").appendTo(blankLabel);
var blankLabel = $('<label>').attr("for", facet_id + "-blank").appendTo(blankDiv);
$('<span>').text("Blank ").addClass("facet-range-choice-label").appendTo(blankLabel);
$('<div>').text(this._blankCount).addClass("facet-range-choice-count").appendTo(blankLabel);
if (this._baseBlankCount === 0) blankCheck.removeAttr("checked");
// ----------------- error -----------------
var errorCheck = $('<input type="checkbox" />').attr("id",facet_id + "-error").appendTo(choices).change(function() {
var errorDiv = $('<div class="facet-range-item"></div>').appendTo(choices);
var errorCheck = $('<input type="checkbox" />').attr("id",facet_id + "-error").appendTo(errorDiv).change(function() {
self._selectError = !self._selectError;
self._updateRest();
});
if (this._selectError) errorCheck.attr("checked","checked");
var errorLabel = $('<label>').attr("for", facet_id + "-error").appendTo(choices);
$('<span>').text("Error ").addClass("facet-choice-label").appendTo(errorLabel);
$('<br>').appendTo(errorLabel);
$('<span>').text(this._errorCount).addClass("facet-choice-count").appendTo(errorLabel);
var errorLabel = $('<label>').attr("for", facet_id + "-error").appendTo(errorDiv);
$('<span>').text("Error ").addClass("facet-range-choice-label").appendTo(errorLabel);
$('<div>').text(this._errorCount).addClass("facet-range-choice-count").appendTo(errorLabel);
if (this._baseErrorCount === 0) errorCheck.removeAttr("checked");
// --------------------------
choices.buttonset().appendTo(container);
choices.appendTo(container);
};
RangeFacet.prototype._setRangeIndicators = function() {

View File

@ -202,65 +202,65 @@ TimeRangeFacet.prototype._renderOtherChoices = function() {
// ----------------- time -----------------
var timeCheck = $('<input type="checkbox" />').attr("id",facet_id + "-time").appendTo(choices).change(function() {
var timeDiv = $('<div class="facet-range-item"></div>').appendTo(choices);
var timeCheck = $('<input type="checkbox" />').attr("id",facet_id + "-time").appendTo(timeDiv).change(function() {
self._selectTime = !self._selectTime;
self._updateRest();
});
if (this._selectTime) timeCheck.attr("checked","checked");
var timeLabel = $('<label>').attr("for", facet_id + "-time").appendTo(choices);
$('<span>').text("Time ").addClass("facet-choice-label").appendTo(timeLabel);
$('<br>').appendTo(timeLabel);
$('<span>').text(this._timeCount).addClass("facet-choice-count").appendTo(timeLabel);
var timeLabel = $('<label>').attr("for", facet_id + "-time").appendTo(timeDiv);
$('<span>').text("Time ").addClass("facet-range-choice-label").appendTo(timeLabel);
$('<div>').text(this._timeCount).addClass("facet-range-choice-count").appendTo(timeLabel);
// ----------------- non-Time -----------------
var nonTimeCheck = $('<input type="checkbox" />').attr("id",facet_id + "-non-time").appendTo(choices).change(function() {
var nonTimeDiv = $('<div class="facet-range-item"></div>').appendTo(choices);
var nonTimeCheck = $('<input type="checkbox" />').attr("id",facet_id + "-non-time").appendTo(nonTimeDiv).change(function() {
self._selectNonTime = !self._selectNonTime;
self._updateRest();
});
if (this._selectNonTime) nonTimeCheck.attr("checked","checked");
var nonTimeLabel = $('<label>').attr("for", facet_id + "-non-time").appendTo(choices);
$('<span>').text("Non-Time ").addClass("facet-choice-label").appendTo(nonTimeLabel);
$('<br>').appendTo(nonTimeLabel);
$('<span>').text(this._nonTimeCount).addClass("facet-choice-count").appendTo(nonTimeLabel);
var nonTimeLabel = $('<label>').attr("for", facet_id + "-non-time").appendTo(nonTimeDiv);
$('<span>').text("Non-Time ").addClass("facet-range-choice-label").appendTo(nonTimeLabel);
$('<div>').text(this._nonTimeCount).addClass("facet-range-choice-count").appendTo(nonTimeLabel);
if (this._baseNonTimeCount === 0) nonTimeCheck.removeAttr("checked");
// ----------------- blank -----------------
var blankCheck = $('<input type="checkbox" />').attr("id",facet_id + "-blank").appendTo(choices).change(function() {
var blankDiv = $('<div class="facet-range-item"></div>').appendTo(choices);
var blankCheck = $('<input type="checkbox" />').attr("id",facet_id + "-blank").appendTo(blankDiv).change(function() {
self._selectBlank = !self._selectBlank;
self._updateRest();
});
if (this._selectBlank) blankCheck.attr("checked","checked");
var blankLabel = $('<label>').attr("for", facet_id + "-blank").appendTo(choices);
$('<span>').text("Blank ").addClass("facet-choice-label").appendTo(blankLabel);
$('<br>').appendTo(blankLabel);
$('<span>').text(this._blankCount).addClass("facet-choice-count").appendTo(blankLabel);
var blankLabel = $('<label>').attr("for", facet_id + "-blank").appendTo(blankDiv);
$('<span>').text("Blank ").addClass("facet-range-choice-label").appendTo(blankLabel);
$('<div>').text(this._blankCount).addClass("facet-range-choice-count").appendTo(blankLabel);
if (this._baseBlankCount === 0) blankCheck.removeAttr("checked");
// ----------------- error -----------------
var errorCheck = $('<input type="checkbox" />').attr("id",facet_id + "-error").appendTo(choices).change(function() {
var errorDiv = $('<div class="facet-range-item"></div>').appendTo(choices);
var errorCheck = $('<input type="checkbox" />').attr("id",facet_id + "-error").appendTo(errorDiv).change(function() {
self._selectError = !self._selectError;
self._updateRest();
});
if (this._selectError) errorCheck.attr("checked","checked");
var errorLabel = $('<label>').attr("for", facet_id + "-error").appendTo(choices);
$('<span>').text("Error ").addClass("facet-choice-label").appendTo(errorLabel);
$('<br>').appendTo(errorLabel);
$('<span>').text(this._errorCount).addClass("facet-choice-count").appendTo(errorLabel);
var errorLabel = $('<label>').attr("for", facet_id + "-error").appendTo(errorDiv);
$('<span>').text("Error ").addClass("facet-range-choice-label").appendTo(errorLabel);
$('<div>').text(this._errorCount).addClass("facet-range-choice-count").appendTo(errorLabel);
if (this._baseErrorCount === 0) errorCheck.removeAttr("checked");
// --------------------------
choices.buttonset().appendTo(container);
choices.appendTo(container);
};
TimeRangeFacet.prototype.steps = [

View File

@ -20,7 +20,7 @@
<div class="dialog-footer" bind="dialogFooter">
<button class="button button-primary" bind="okButton">Match</button>
<button class="button" bind="newButton">New Topic</button>
<button class="button" bind="clearButton">Clear</button>
<button class="button" bind="clearButton">Don't Reconcile Cell</button>
<button class="button" bind="cancelButton">Cancel</button>
</div>
</div>

View File

@ -219,17 +219,7 @@ DataTableCellUI.prototype._render = function() {
})
.text("Search for match")
.appendTo(extraChoices);
$('<span>').html(" &bull; ").appendTo(extraChoices);
}
$('<a href="javascript:{}"></a>')
.click(function(evt) {
self._doClearOneCell();
return false;
})
.text("Clear")
.appendTo(extraChoices);
}
}
}

View File

@ -55,7 +55,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.appendTo(menu, [ "core/facet" ], [
{
id: "core/text-facet",
label: "Text Facet",
label: "Text facet",
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -69,7 +69,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/numeric-facet",
label: "Numeric Facet",
label: "Numeric facet",
click: function() {
ui.browsingEngine.addFacet(
"range",
@ -84,7 +84,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/time-facet",
label: "Timeline Facet",
label: "Timeline facet",
click: function() {
ui.browsingEngine.addFacet(
"timerange",
@ -99,7 +99,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/scatterplot-facet",
label: "Scatterplot Facet",
label: "Scatterplot facet",
click: function() {
new ScatterplotDialog(column.name);
}
@ -107,25 +107,25 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/custom-text-facet",
label: "Custom Text Facet ...",
label: "Custom text facet...",
click: function() {
doFilterByExpressionPrompt(null, "list");
}
},
{
id: "core/custom-numeric-facet",
label: "Custom Numeric Facet ...",
label: "Custom numeric facet...",
click: function() {
doFilterByExpressionPrompt(null, "range");
}
},
{
id: "core/customized-facets",
label: "Customized Facets",
label: "Customized facets",
submenu: [
{
id: "core/word-facet",
label: "Word Facet",
label: "Word facet",
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -140,7 +140,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/numeric-log-facet",
label: "Numeric Log Facet",
label: "Numeric log facet",
click: function() {
ui.browsingEngine.addFacet(
"range",
@ -155,7 +155,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/bounded-numeric-log-facet",
label: "1-bounded Numeric Log Facet",
label: "1-bounded numeric log facet",
click: function() {
ui.browsingEngine.addFacet(
"range",
@ -171,7 +171,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/text-length-facet",
label: "Text Length Facet",
label: "Text length facet",
click: function() {
ui.browsingEngine.addFacet(
"range",
@ -186,7 +186,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/log-text-length-facet",
label: "Log of Text Length Facet",
label: "Log of text length facet",
click: function() {
ui.browsingEngine.addFacet(
"range",
@ -201,7 +201,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/unicode-charcode-facet",
label: "Unicode Char-code Facet",
label: "Unicode char-code facet",
click: function() {
ui.browsingEngine.addFacet(
"range",
@ -217,7 +217,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/error-facet",
label: "Facet by Error",
label: "Facet by error",
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -231,7 +231,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/blank-facet",
label: "Facet by Blank",
label: "Facet by blank",
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -249,7 +249,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.insertAfter(menu, [ "core/facet" ], [
{
label: "Text Filter",
label: "Text filter",
click: function() {
ui.browsingEngine.addFacet(
"text",

View File

@ -180,7 +180,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.appendTo(menu, [ "core/reconcile" ], [
{
id: "core/reconcile",
label: "Start Reconciling ...",
label: "Start reconciling...",
tooltip: "Reconcile text in this column with topics on Freebase",
click: doReconcile
},
@ -191,7 +191,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
submenu: [
{
id: "core/by-judgment",
label: "By Judgment",
label: "By judgment",
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -210,7 +210,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/by-best-candidates-score",
label: "Best Candidate's Score",
label: "Best candidate's score",
click: function() {
ui.browsingEngine.addFacet(
"range",
@ -227,7 +227,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/by-best-candidates-type-match",
label: "Best Candidate's Type Match",
label: "Best candidate's type match",
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -245,7 +245,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/by-best-candidates-name-match",
label: "Best Candidate's Name Match",
label: "Best candidate's name match",
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -264,7 +264,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/by-best-candidates-name-edit-distance",
label: "Best Candidate's Name Edit Distance",
label: "Best candidate's name edit distance",
click: function() {
ui.browsingEngine.addFacet(
"range",
@ -281,7 +281,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/by-best-candidates-name-word-similarity",
label: "Best Candidate's Name Word Similarity",
label: "Best candidate's name word similarity",
click: function() {
ui.browsingEngine.addFacet(
"range",
@ -299,7 +299,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/by-best-candidates-types",
label: "Best Candidate's Types",
label: "Best candidate's types",
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -316,11 +316,11 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/qa-facets",
label: "QA Facets",
label: "QA facets",
submenu: [
{
id: "core/by-qa-results",
label: "QA Results",
label: "QA results",
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -334,7 +334,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/by-judgment-actions",
label: "Judgment Actions",
label: "Judgment actions",
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -348,7 +348,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/by-judgment-history-entries",
label: "Judgment History Entries",
label: "Judgment history entries",
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -368,13 +368,13 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
submenu: [
{
id: "core/match-to-best-candidate",
label: "Match Each Cell to Its Best Candidate",
label: "Match each cell to its best candidate",
tooltip: "Match each cell to its best candidate in this column for all current filtered rows",
click: doReconMatchBestCandidates
},
{
id: "core/match-to-new-topic",
label: "Create a New Topic for Each Cell",
label: "Create a new topic for each cell",
tooltip: "Mark to create one new topic for each cell in this column for all current filtered rows",
click: function() {
doReconMarkNewTopics(false);
@ -383,7 +383,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/match-similar-to-new-topic",
label: "Create One New Topic for Similar Cells",
label: "Create one new topic for similar cells",
tooltip: "Mark to create one new topic for each group of similar cells in this column for all current filtered rows",
click: function() {
doReconMarkNewTopics(true);
@ -391,21 +391,21 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/match-to-specific",
label: "Match All Filtered Cells to ...",
label: "Match all filtered cells to...",
tooltip: "Search for a topic to match all filtered cells to",
click: doSearchToMatch
},
{},
{
id: "core/discard-judgments",
label: "Discard Reconciliation Judgments",
tooltip: "Discard reconciliaton judgments in this column for all current filtered rows",
label: "Discard reconciliation judgments",
tooltip: "Discard reconciliation judgments in this column for all current filtered rows",
click: doReconDiscardJudgments
},
{
id: "core/clear-recon-data",
label: "Clear Recon Data",
tooltip: "Clear recon data in this column for all current filtered rows",
label: "Clear reconciliation data",
tooltip: "Clear reconciliation data in this column for all current filtered rows",
click: doClearReconData
}
]
@ -413,8 +413,8 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/copy-across-columns",
label: "Copy Recon Data ...",
tooltip: "Copy this column's recon data to other columns",
label: "Copy reconciliation data...",
tooltip: "Copy this column's reconciliation data to other columns",
click: doCopyAcrossColumns
}
]);

View File

@ -97,7 +97,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.ui-tabs .ui-tabs-panel {
margin: 0;
padding: 0;
border: 1px solid @chrome_primary;
border-top: 1px solid @chrome_primary;
background: white;
}

View File

@ -79,12 +79,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
padding-top: @padding_tight;
font-size: 1.3em;
background: @chrome_secondary;
.ui-tabs .ui-tabs-panel {
border-left: none;
border-right: none;
border-bottom: none;
}
}
#right-panel {

View File

@ -34,14 +34,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@import-less url("../theme.less");
ul.facets-container {
margin: 0 5px;
margin: 0;
overflow: auto;
}
li.facet-container {
display: block;
clear: both;
margin-bottom: 7px;
margin: 0 5px 7px;
background: @chrome_secondary;
border: 1px solid @chrome_primary;
.rounded_corners(7px);
@ -157,7 +157,7 @@ a.facet-title-remove:hover {
color: black;
}
.facet-choice-count {
.facet-choice-count, .facet-range-choice-count {
padding-left: 5px;
font-size: 0.85em;
color: @light_grey;
@ -197,17 +197,24 @@ img.facet-choice-link {
}
.facet-range-choices {
margin-bottom: 0.8em;
text-align: center;
}
.facet-range-choices .ui-button .ui-button-text {
line-height: 1;
padding: 0.1em 0.4em;
text-decoration: line-through;
}
.facet-range-choices .ui-button.ui-state-active .ui-button-text {
text-decoration: none;
}
padding: 5px 0 30px 0;
}
.facet-range-item {
float: left;
text-align: left;
padding: 0 4px;
}
.facet-range-choice-label {
font-size: 0.85em;
}
.facet-range-choice-count {
margin: -2px 0 0 16px;
}
.facet-text-body {
padding: 5px;
}

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
visibility: hidden;
position: absolute;
width: 50%;
margin: 0px;
margin: 5px;
top: 0em;
left: 20%;
text-align: center;

View File

@ -67,13 +67,13 @@ a.recon-dialog-service-selector-remove {
position: relative;
top: -5px;
left: 5px;
width: 16px;
height: 16px;
width: 12px;
height: 12px;
text-decoration: none;
background-image: url(../../images/close-map.png);
background-repeat: no-repeat;
background-position: 0px 0px;
}
a.recon-dialog-service-selector-remove:hover {
background-position: -16px 0px;
background-position: -12px 0px;
}

View File

@ -306,6 +306,6 @@ ul.sorting-dialog-blank-error-positions > li {
background: #eee;
padding: 5px;
margin: 2px;
.rounded_corners(3px);
cursor: move;
.rounded_corners(3px);
}