Fix some deprecated uses of attr(). Backward compatible to jQuery 1.6

This commit is contained in:
Tom Morris 2013-09-18 15:38:12 -04:00
parent 094562e54b
commit 0abe663ec0
8 changed files with 43 additions and 43 deletions

View File

@ -471,7 +471,7 @@ SchemaAlignmentDialog.UINode.prototype._showNodeConfigDialog = function() {
}); });
if (column.name in columnMap) { if (column.name in columnMap) {
radio.attr("checked", "true"); radio.prop("checked", true);
} }
$('<span></span>').text(column.name).appendTo(tr.insertCell(1)); $('<span></span>').text(column.name).appendTo(tr.insertCell(1));

View File

@ -246,7 +246,7 @@ Refine.GDataImportingController.prototype._showParsingPanel = function() {
.attr('sheetUrl', this.link) .attr('sheetUrl', this.link)
.appendTo(td0); .appendTo(td0);
if (i === 0) { if (i === 0) {
checkbox.attr('checked', 'true'); checkbox.prop("checked", true);
} }
$('<label>') $('<label>')
@ -261,28 +261,28 @@ Refine.GDataImportingController.prototype._showParsingPanel = function() {
}); });
if (this._options.ignoreLines > 0) { if (this._options.ignoreLines > 0) {
this._parsingPanelElmts.ignoreCheckbox.attr("checked", "checked"); this._parsingPanelElmts.ignoreCheckbox.prop("checked", true);
this._parsingPanelElmts.ignoreInput[0].value = this._options.ignoreLines.toString(); this._parsingPanelElmts.ignoreInput[0].value = this._options.ignoreLines.toString();
} }
if (this._options.headerLines > 0) { if (this._options.headerLines > 0) {
this._parsingPanelElmts.headerLinesCheckbox.attr("checked", "checked"); this._parsingPanelElmts.headerLinesCheckbox.prop("checked", true);
this._parsingPanelElmts.headerLinesInput[0].value = this._options.headerLines.toString(); this._parsingPanelElmts.headerLinesInput[0].value = this._options.headerLines.toString();
} }
} }
if (this._options.limit > 0) { if (this._options.limit > 0) {
this._parsingPanelElmts.limitCheckbox.attr("checked", "checked"); this._parsingPanelElmts.limitCheckbox.prop("checked", true);
this._parsingPanelElmts.limitInput[0].value = this._options.limit.toString(); this._parsingPanelElmts.limitInput[0].value = this._options.limit.toString();
} }
if (this._options.skipDataLines > 0) { if (this._options.skipDataLines > 0) {
this._parsingPanelElmts.skipCheckbox.attr("checked", "checked"); this._parsingPanelElmts.skipCheckbox.prop("checked", true);
this._parsingPanelElmts.skipInput.value[0].value = this._options.skipDataLines.toString(); this._parsingPanelElmts.skipInput.value[0].value = this._options.skipDataLines.toString();
} }
if (this._options.storeBlankRows) { if (this._options.storeBlankRows) {
this._parsingPanelElmts.storeBlankRowsCheckbox.attr("checked", "checked"); this._parsingPanelElmts.storeBlankRowsCheckbox.prop("checked", true);
} }
if (this._options.storeBlankCellsAsNulls) { if (this._options.storeBlankCellsAsNulls) {
this._parsingPanelElmts.storeBlankCellsAsNullsCheckbox.attr("checked", "checked"); this._parsingPanelElmts.storeBlankCellsAsNullsCheckbox.prop("checked", true);
} }
var onChange = function() { var onChange = function() {

View File

@ -110,15 +110,15 @@ Refine.PCAxisParserUI.prototype._initialize = function() {
}); });
if (this._config.limit > 0) { if (this._config.limit > 0) {
this._optionContainerElmts.limitCheckbox.attr("checked", "checked"); this._optionContainerElmts.limitCheckbox.prop("checked", true);
this._optionContainerElmts.limitInput[0].value = this._config.limit.toString(); this._optionContainerElmts.limitInput[0].value = this._config.limit.toString();
} }
if (this._config.skipDataLines > 0) { if (this._config.skipDataLines > 0) {
this._optionContainerElmts.skipCheckbox.attr("checked", "checked"); this._optionContainerElmts.skipCheckbox.prop("checked", true);
this._optionContainerElmts.skipInput.value[0].value = this._config.skipDataLines.toString(); this._optionContainerElmts.skipInput.value[0].value = this._config.skipDataLines.toString();
} }
if (this._config.includeFileSources) { if (this._config.includeFileSources) {
this._optionContainerElmts.includeFileSourcesCheckbox.attr("checked", "checked"); this._optionContainerElmts.includeFileSourcesCheckbox.prop("checked", true);
} }
var onChange = function() { var onChange = function() {

View File

@ -144,7 +144,7 @@ Refine.ExcelParserUI.prototype._initialize = function() {
.attr('index', i) .attr('index', i)
.appendTo(td0); .appendTo(td0);
if (this.selected) { if (this.selected) {
checkbox.attr('checked', 'true'); checkbox.prop('checked', true);
} }
$('<label>') $('<label>')
@ -159,29 +159,29 @@ Refine.ExcelParserUI.prototype._initialize = function() {
}); });
if (this._config.ignoreLines > 0) { if (this._config.ignoreLines > 0) {
this._optionContainerElmts.ignoreCheckbox.attr("checked", "checked"); this._optionContainerElmts.ignoreCheckbox.prop("checked", true);
this._optionContainerElmts.ignoreInput[0].value = this._config.ignoreLines.toString(); this._optionContainerElmts.ignoreInput[0].value = this._config.ignoreLines.toString();
} }
if (this._config.headerLines > 0) { if (this._config.headerLines > 0) {
this._optionContainerElmts.headerLinesCheckbox.attr("checked", "checked"); this._optionContainerElmts.headerLinesCheckbox.prop("checked", true);
this._optionContainerElmts.headerLinesInput[0].value = this._config.headerLines.toString(); this._optionContainerElmts.headerLinesInput[0].value = this._config.headerLines.toString();
} }
if (this._config.limit > 0) { if (this._config.limit > 0) {
this._optionContainerElmts.limitCheckbox.attr("checked", "checked"); this._optionContainerElmts.limitCheckbox.prop("checked", true);
this._optionContainerElmts.limitInput[0].value = this._config.limit.toString(); this._optionContainerElmts.limitInput[0].value = this._config.limit.toString();
} }
if (this._config.skipDataLines > 0) { if (this._config.skipDataLines > 0) {
this._optionContainerElmts.skipCheckbox.attr("checked", "checked"); this._optionContainerElmts.skipCheckbox.prop("checked", true);
this._optionContainerElmts.skipInput.value[0].value = this._config.skipDataLines.toString(); this._optionContainerElmts.skipInput.value[0].value = this._config.skipDataLines.toString();
} }
if (this._config.storeBlankRows) { if (this._config.storeBlankRows) {
this._optionContainerElmts.storeBlankRowsCheckbox.attr("checked", "checked"); this._optionContainerElmts.storeBlankRowsCheckbox.prop("checked", true);
} }
if (this._config.storeBlankCellsAsNulls) { if (this._config.storeBlankCellsAsNulls) {
this._optionContainerElmts.storeBlankCellsAsNullsCheckbox.attr("checked", "checked"); this._optionContainerElmts.storeBlankCellsAsNullsCheckbox.prop("checked", true);
} }
if (this._config.includeFileSources) { if (this._config.includeFileSources) {
this._optionContainerElmts.includeFileSourcesCheckbox.attr("checked", "checked"); this._optionContainerElmts.includeFileSourcesCheckbox.prop("checked", true);
} }
var onChange = function() { var onChange = function() {

View File

@ -115,7 +115,7 @@ Refine.JsonParserUI.prototype._initialize = function() {
$('#or-import-jsonParser').text($.i18n._('core-index-parser')["json-parser"]); $('#or-import-jsonParser').text($.i18n._('core-index-parser')["json-parser"]);
if (this._config.limit > 0) { if (this._config.limit > 0) {
this._optionContainerElmts.limitCheckbox.attr("checked", "checked"); this._optionContainerElmts.limitCheckbox.prop("checked", true);
this._optionContainerElmts.limitInput[0].value = this._config.limit.toString(); this._optionContainerElmts.limitInput[0].value = this._config.limit.toString();
} }
if (this._config.trimStrings) { if (this._config.trimStrings) {
@ -125,10 +125,10 @@ Refine.JsonParserUI.prototype._initialize = function() {
this._optionContainerElmts.guessCellValueTypesCheckbox.attr("checked", "unchecked"); this._optionContainerElmts.guessCellValueTypesCheckbox.attr("checked", "unchecked");
} }
if (this._config.storeEmptyStrings) { if (this._config.storeEmptyStrings) {
this._optionContainerElmts.storeEmptyStringsCheckbox.attr("checked", "checked"); this._optionContainerElmts.storeEmptyStringsCheckbox.prop("checked", true);
} }
if (this._config.includeFileSources) { if (this._config.includeFileSources) {
this._optionContainerElmts.includeFileSourcesCheckbox.attr("checked", "checked"); this._optionContainerElmts.includeFileSourcesCheckbox.prop("checked", true);
} }
this._optionContainerElmts.pickRecordElementsButton.click(function() { this._optionContainerElmts.pickRecordElementsButton.click(function() {
self._showPickRecordNodesUI(); self._showPickRecordNodesUI();

View File

@ -138,25 +138,25 @@ Refine.LineBasedParserUI.prototype._initialize = function() {
this._config.linesPerRow.toString(); this._config.linesPerRow.toString();
if (this._config.ignoreLines > 0) { if (this._config.ignoreLines > 0) {
this._optionContainerElmts.ignoreCheckbox.attr("checked", "checked"); this._optionContainerElmts.ignoreCheckbox.prop("checked", true);
this._optionContainerElmts.ignoreInput[0].value = this._config.ignoreLines.toString(); this._optionContainerElmts.ignoreInput[0].value = this._config.ignoreLines.toString();
} }
if (this._config.limit > 0) { if (this._config.limit > 0) {
this._optionContainerElmts.limitCheckbox.attr("checked", "checked"); this._optionContainerElmts.limitCheckbox.prop("checked", true);
this._optionContainerElmts.limitInput[0].value = this._config.limit.toString(); this._optionContainerElmts.limitInput[0].value = this._config.limit.toString();
} }
if (this._config.skipDataLines > 0) { if (this._config.skipDataLines > 0) {
this._optionContainerElmts.skipCheckbox.attr("checked", "checked"); this._optionContainerElmts.skipCheckbox.prop("checked", true);
this._optionContainerElmts.skipInput.value[0].value = this._config.skipDataLines.toString(); this._optionContainerElmts.skipInput.value[0].value = this._config.skipDataLines.toString();
} }
if (this._config.storeBlankRows) { if (this._config.storeBlankRows) {
this._optionContainerElmts.storeBlankRowsCheckbox.attr("checked", "checked"); this._optionContainerElmts.storeBlankRowsCheckbox.prop("checked", true);
} }
if (this._config.storeBlankCellsAsNulls) { if (this._config.storeBlankCellsAsNulls) {
this._optionContainerElmts.storeBlankCellsAsNullsCheckbox.attr("checked", "checked"); this._optionContainerElmts.storeBlankCellsAsNullsCheckbox.prop("checked", true);
} }
if (this._config.includeFileSources) { if (this._config.includeFileSources) {
this._optionContainerElmts.includeFileSourcesCheckbox.attr("checked", "checked"); this._optionContainerElmts.includeFileSourcesCheckbox.prop("checked", true);
} }
var onChange = function() { var onChange = function() {

View File

@ -159,41 +159,41 @@ Refine.SeparatorBasedParserUI.prototype._initialize = function() {
var columnSeparatorValue = (this._config.separator == ",") ? 'comma' : var columnSeparatorValue = (this._config.separator == ",") ? 'comma' :
((this._config.separator == "\\t") ? 'tab' : 'custom'); ((this._config.separator == "\\t") ? 'tab' : 'custom');
this._optionContainer.find( this._optionContainer.find(
"input[name='column-separator'][value='" + columnSeparatorValue + "']").attr("checked", "checked"); "input[name='column-separator'][value='" + columnSeparatorValue + "']").prop("checked", true);
this._optionContainerElmts.columnSeparatorInput[0].value = this._config.separator; this._optionContainerElmts.columnSeparatorInput[0].value = this._config.separator;
if (this._config.ignoreLines > 0) { if (this._config.ignoreLines > 0) {
this._optionContainerElmts.ignoreCheckbox.attr("checked", "checked"); this._optionContainerElmts.ignoreCheckbox.prop("checked", true);
this._optionContainerElmts.ignoreInput[0].value = this._config.ignoreLines.toString(); this._optionContainerElmts.ignoreInput[0].value = this._config.ignoreLines.toString();
} }
if (this._config.headerLines > 0) { if (this._config.headerLines > 0) {
this._optionContainerElmts.headerLinesCheckbox.attr("checked", "checked"); this._optionContainerElmts.headerLinesCheckbox.prop("checked", true);
this._optionContainerElmts.headerLinesInput[0].value = this._config.headerLines.toString(); this._optionContainerElmts.headerLinesInput[0].value = this._config.headerLines.toString();
} }
if (this._config.limit > 0) { if (this._config.limit > 0) {
this._optionContainerElmts.limitCheckbox.attr("checked", "checked"); this._optionContainerElmts.limitCheckbox.prop("checked", true);
this._optionContainerElmts.limitInput[0].value = this._config.limit.toString(); this._optionContainerElmts.limitInput[0].value = this._config.limit.toString();
} }
if (this._config.skipDataLines > 0) { if (this._config.skipDataLines > 0) {
this._optionContainerElmts.skipCheckbox.attr("checked", "checked"); this._optionContainerElmts.skipCheckbox.prop("checked", true);
this._optionContainerElmts.skipInput.value[0].value = this._config.skipDataLines.toString(); this._optionContainerElmts.skipInput.value[0].value = this._config.skipDataLines.toString();
} }
if (this._config.storeBlankRows) { if (this._config.storeBlankRows) {
this._optionContainerElmts.storeBlankRowsCheckbox.attr("checked", "checked"); this._optionContainerElmts.storeBlankRowsCheckbox.prop("checked", true);
} }
if (this._config.guessCellValueTypes) { if (this._config.guessCellValueTypes) {
this._optionContainerElmts.guessCellValueTypesCheckbox.attr("checked", "checked"); this._optionContainerElmts.guessCellValueTypesCheckbox.prop("checked", true);
} }
if (this._config.processQuotes) { if (this._config.processQuotes) {
this._optionContainerElmts.processQuoteMarksCheckbox.attr("checked", "checked"); this._optionContainerElmts.processQuoteMarksCheckbox.prop("checked", true);
} }
if (this._config.storeBlankCellsAsNulls) { if (this._config.storeBlankCellsAsNulls) {
this._optionContainerElmts.storeBlankCellsAsNullsCheckbox.attr("checked", "checked"); this._optionContainerElmts.storeBlankCellsAsNullsCheckbox.prop("checked", true);
} }
if (this._config.includeFileSources) { if (this._config.includeFileSources) {
this._optionContainerElmts.includeFileSourcesCheckbox.attr("checked", "checked"); this._optionContainerElmts.includeFileSourcesCheckbox.prop("checked", true);
} }
var onChange = function() { var onChange = function() {

View File

@ -112,20 +112,20 @@ Refine.XmlParserUI.prototype._initialize = function() {
$('#or-import-store').html($.i18n._('core-index-parser')["store-source"]); $('#or-import-store').html($.i18n._('core-index-parser')["store-source"]);
if (this._config.limit > 0) { if (this._config.limit > 0) {
this._optionContainerElmts.limitCheckbox.attr("checked", "checked"); this._optionContainerElmts.limitCheckbox.prop("checked", true);
this._optionContainerElmts.limitInput[0].value = this._config.limit.toString(); this._optionContainerElmts.limitInput[0].value = this._config.limit.toString();
} }
if (this._config.trimStrings) { if (this._config.trimStrings) {
this._optionContainerElmts.trimStringsCheckbox.attr("checked", "unchecked"); this._optionContainerElmts.trimStringsCheckbox.prop("checked", false);
} }
if (this._config.guessCellValueTypes) { if (this._config.guessCellValueTypes) {
this._optionContainerElmts.guessCellValueTypesCheckbox.attr("checked", "unchecked"); this._optionContainerElmts.guessCellValueTypesCheckbox.prop("checked", false);
} }
if (this._config.storeEmptyStrings) { if (this._config.storeEmptyStrings) {
this._optionContainerElmts.storeEmptyStringsCheckbox.attr("checked", "checked"); this._optionContainerElmts.storeEmptyStringsCheckbox.prop("checked", true);
} }
if (this._config.includeFileSources) { if (this._config.includeFileSources) {
this._optionContainerElmts.includeFileSourcesCheckbox.attr("checked", "checked"); this._optionContainerElmts.includeFileSourcesCheckbox.prop("checked", true);
} }
this._optionContainerElmts.pickRecordElementsButton.click(function() { this._optionContainerElmts.pickRecordElementsButton.click(function() {
self._showPickRecordElementsUI(); self._showPickRecordElementsUI();