Default error mode to keep original for common transforms.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@2268 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2011-09-30 06:09:55 +00:00
parent 1db293bcf8
commit e55bab31b8
3 changed files with 15 additions and 15 deletions

View File

@ -15,7 +15,7 @@
<input type="radio" name="create-column-dialog-onerror-choice" value="store-error" id="$add-column-error-store-error" />
<label for="$add-column-error-store-error">store error</label>
<input type="radio" name="create-column-dialog-onerror-choice" value="keep-original" id="$add-column-error-keep-original" />
<label for="$add-column-error-keep-original">keep original</label></td>
<label for="$add-column-error-keep-original">copy value from original column</label></td>
</tr>
<tr><td colspan="2">$EXPRESSION_PREVIEW_WIDGET$</td></tr>
</table></div>

View File

@ -154,56 +154,56 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{
id: "core/trim-whitespace",
label: "Trim leading and trailing whitespace",
click: function() { doTextTransform("value.trim()", "store-blank", false, ""); }
click: function() { doTextTransform("value.trim()", "keep-original", false, ""); }
},
{
id: "core/collapse-whitespace",
label: "Collapse consecutive whitespace",
click: function() { doTextTransform("value.replace(/\\s+/,' ')", "store-blank", false, ""); }
click: function() { doTextTransform("value.replace(/\\s+/,' ')", "keep-original", false, ""); }
},
{},
{
id: "core/unescape-html-entities",
label: "Unescape HTML entities",
click: function() { doTextTransform("value.unescape('html')", "store-blank", true, 10); }
click: function() { doTextTransform("value.unescape('html')", "keep-original", true, 10); }
},
{},
{
id: "core/to-titlecase",
label: "To titlecase",
click: function() { doTextTransform("value.toTitlecase()", "store-blank", false, ""); }
click: function() { doTextTransform("value.toTitlecase()", "keep-original", false, ""); }
},
{
id: "core/to-uppercase",
label: "To uppercase",
click: function() { doTextTransform("value.toUppercase()", "store-blank", false, ""); }
click: function() { doTextTransform("value.toUppercase()", "keep-original", false, ""); }
},
{
id: "core/to-lowercase",
label: "To lowercase",
click: function() { doTextTransform("value.toLowercase()", "store-blank", false, ""); }
click: function() { doTextTransform("value.toLowercase()", "keep-original", false, ""); }
},
{},
{
id: "core/to-number",
label: "To number",
click: function() { doTextTransform("value.toNumber()", "store-blank", false, ""); }
click: function() { doTextTransform("value.toNumber()", "keep-original", false, ""); }
},
{
id: "core/to-date",
label: "To date",
click: function() { doTextTransform("value.toDate()", "store-blank", false, ""); }
click: function() { doTextTransform("value.toDate()", "keep-original", false, ""); }
},
{
id: "core/to-text",
label: "To text",
click: function() { doTextTransform("value.toString()", "store-blank", false, ""); }
click: function() { doTextTransform("value.toString()", "keep-original", false, ""); }
},
{},
{
id: "core/to-blank",
label: "Blank out cells",
click: function() { doTextTransform("null", "store-blank", false, ""); }
click: function() { doTextTransform("null", "keep-original", false, ""); }
}
]
},

View File

@ -7,12 +7,12 @@
<tr>
<td>On error</td>
<td>
<input type="radio" name="text-transform-dialog-onerror-choice" value="set-to-blank" checked id="$text-transform-error-set-to-blank" />
<input type="radio" name="text-transform-dialog-onerror-choice" value="keep-original" checked id="$text-transform-error-keep-original" />
<label for="$text-transform-error-keep-original">keep original</label><br/>
<input type="radio" name="text-transform-dialog-onerror-choice" value="set-to-blank" id="$text-transform-error-set-to-blank" />
<label for="$text-transform-error-set-to-blank">set to blank</label><br/>
<input type="radio" name="text-transform-dialog-onerror-choice" value="store-error" id="$text-transform-error-store-error" />
<label for="$text-transform-error-store-error">store error</label><br/>
<input type="radio" name="text-transform-dialog-onerror-choice" value="keep-original" id="$text-transform-error-keep-original" />
<label for="$text-transform-error-keep-original">keep original</label></td>
<label for="$text-transform-error-store-error">store error</label></td>
<td><input type="checkbox" bind="repeatCheckbox" id="$text-transform-repeat" />
<label for="$text-transform-repeat">Re-transform up to</label> <input bind="repeatCountInput" value="10" size="2" />
<label for="$text-transform-repeat">times until no change</label></td>