Update to jQuery 1.12.4 and jQuery Migrate 1.4.1 - fixes 2932 (#2933)
* Refactor module wiring to reduce redundancy * Update to jQuery 1.12.4 & jQuery Migrate 1.4.1 - fixes #2932 This updates to the latest jQuery 1.x and jQuery Migrate 1.x, the first step in upgrading to a modern jQuery. * Add a couple of bug fixes from Google Code SVN This is an unrelease version from the Google Code freebase-site repo which only has a few changes from the v4.3 release, but one of them is removing the `browser.msie` reference that jQuery Migrate is complaining about. * Use prop() for 'checked' and 'disabled' * Update jQuery 'value' property setting code to use val() * Use prop() instead of attr() to set 'selected' * Patch for jQuery >1.9
This commit is contained in:
parent
05fb4e355f
commit
6095c44cb7
@ -92,7 +92,7 @@ Refine.DatabaseSourceUI.prototype.attachUI = function(body) {
|
||||
$('input#initialDatabase').attr('placeholder', $.i18n('database-source/databaseNamePlaceholder'));
|
||||
$('input#initialSchema').attr('placeholder', $.i18n('database-source/databaseSchemaPlaceholder'));
|
||||
|
||||
$('input#connectionName').attr('value', $.i18n('database-source/connectionNameDefaultValue'));
|
||||
$('input#connectionName').val($.i18n('database-source/connectionNameDefaultValue'));
|
||||
|
||||
this._elmts.newConnectionButton.click(function(evt) {
|
||||
self._resetDatabaseImportForm();
|
||||
@ -514,7 +514,7 @@ Refine.DatabaseSourceUI.prototype._resetDatabaseImportForm = function() {
|
||||
|
||||
$( "#databaseHost" ).val(self._defaultDatabaseHost);
|
||||
|
||||
$('input#connectionName').attr('value', $.i18n('database-source/connectionNameDefaultValue'));
|
||||
$('input#connectionName').val($.i18n('database-source/connectionNameDefaultValue'));
|
||||
$( "select#databaseTypeSelect" ).val(self._defaultDatabaseType);
|
||||
self._updateDatabaseType(self._defaultDatabaseType);
|
||||
|
||||
|
@ -103,7 +103,7 @@ Refine.PCAxisParserUI.prototype._initialize = function() {
|
||||
this._optionContainerElmts.previewButton.click(function() { self._updatePreview(); });
|
||||
|
||||
this._optionContainerElmts.encodingInput
|
||||
.attr('value', this._config.encoding || '')
|
||||
.val(this._config.encoding || '')
|
||||
.click(function() {
|
||||
Encoding.selectEncoding($(this), function() {
|
||||
self._updatePreview();
|
||||
|
@ -437,15 +437,15 @@ SchemaAlignmentDialog._addNameDesc = function(item, json) {
|
||||
var type_container = $('<div></div>').addClass('wbs-namedesc-type').appendTo(namedesc);
|
||||
var type_input = $('<select></select>').appendTo(type_container);
|
||||
$('<option></option>')
|
||||
.attr('value', 'LABEL')
|
||||
.val('LABEL')
|
||||
.text($.i18n('wikidata-schema/label'))
|
||||
.appendTo(type_input);
|
||||
$('<option></option>')
|
||||
.attr('value', 'DESCRIPTION')
|
||||
.val('DESCRIPTION')
|
||||
.text($.i18n('wikidata-schema/description'))
|
||||
.appendTo(type_input);
|
||||
$('<option></option>')
|
||||
.attr('value', 'ALIAS')
|
||||
.val('ALIAS')
|
||||
.text($.i18n('wikidata-schema/alias'))
|
||||
.appendTo(type_input);
|
||||
type_input.val(term_type);
|
||||
@ -487,7 +487,7 @@ SchemaAlignmentDialog._nameDescToJSON = function (namedesc) {
|
||||
var term_type = namedesc.find('select').first().val();
|
||||
var type = term_type;
|
||||
if (term_type !== 'ALIAS') {
|
||||
var override = namedesc.find('input[type=checkbox]').first().is(':checked');
|
||||
var override = namedesc.find('input[type=checkbox]').first().prop('checked');
|
||||
if (!override) {
|
||||
type = term_type + '_IF_NEW';
|
||||
}
|
||||
|
@ -54,15 +54,15 @@ WikibaseExporterMenuBar.exportTo = function(format) {
|
||||
.attr("target", "gridworks-export-"+format);
|
||||
$('<input />')
|
||||
.attr("name", "engine")
|
||||
.attr("value", JSON.stringify(ui.browsingEngine.getJSON()))
|
||||
.val(JSON.stringify(ui.browsingEngine.getJSON()))
|
||||
.appendTo(form);
|
||||
$('<input />')
|
||||
.attr("name", "project")
|
||||
.attr("value", theProject.id)
|
||||
.val(theProject.id)
|
||||
.appendTo(form);
|
||||
$('<input />')
|
||||
.attr("name", "format")
|
||||
.attr("value", format)
|
||||
.val(format)
|
||||
.appendTo(form);
|
||||
|
||||
document.body.appendChild(form);
|
||||
|
@ -334,19 +334,12 @@ function init() {
|
||||
registerOperations();
|
||||
registerImporting();
|
||||
|
||||
var RC = Packages.com.google.refine.model.recon.ReconConfig;
|
||||
RC.registerReconConfig(module, "standard-service", Packages.com.google.refine.model.recon.StandardReconConfig);
|
||||
|
||||
ClientSideResourceManager.addPaths(
|
||||
"index/scripts",
|
||||
module,
|
||||
[
|
||||
|
||||
"externals/jquery-1.11.1.js",
|
||||
"externals/jquery-migrate-1.2.1.js",
|
||||
"externals/js.cookie.js",
|
||||
var commonModules = [
|
||||
"externals/jquery-1.12.4.js",
|
||||
"externals/jquery-migrate-1.4.1.js",
|
||||
"externals/jquery-ui/jquery-ui-1.10.3.custom.js",
|
||||
"externals/date.js",
|
||||
"externals/js.cookie.js",
|
||||
"externals/underscore-min.js",
|
||||
|
||||
"externals/CLDRPluralRuleParser.js",
|
||||
"externals/jquery.i18n.js",
|
||||
@ -357,13 +350,21 @@ function init() {
|
||||
"externals/jquery.i18n.language.js",
|
||||
"externals/languages/fi.js",
|
||||
"externals/languages/ru.js",
|
||||
];
|
||||
|
||||
var RC = Packages.com.google.refine.model.recon.ReconConfig;
|
||||
RC.registerReconConfig(module, "standard-service", Packages.com.google.refine.model.recon.StandardReconConfig);
|
||||
|
||||
ClientSideResourceManager.addPaths(
|
||||
"index/scripts",
|
||||
module,
|
||||
commonModules.concat([
|
||||
"externals/date.js",
|
||||
"externals/tablesorter/jquery.tablesorter.min.js",
|
||||
"externals/moment-with-locales.min.js",
|
||||
"externals/select2/select2.min.js",
|
||||
"externals/jquery.lavalamp.min.js",
|
||||
|
||||
|
||||
"scripts/util/misc.js",
|
||||
"scripts/util/url.js",
|
||||
"scripts/util/string.js",
|
||||
@ -399,7 +400,7 @@ function init() {
|
||||
|
||||
"scripts/reconciliation/recon-manager.js", // so that reconciliation functions are available to importers
|
||||
"scripts/index/edit-metadata-dialog.js"
|
||||
]
|
||||
])
|
||||
);
|
||||
|
||||
ClientSideResourceManager.addPaths(
|
||||
@ -436,23 +437,10 @@ function init() {
|
||||
ClientSideResourceManager.addPaths(
|
||||
"project/scripts",
|
||||
module,
|
||||
[
|
||||
"externals/jquery-1.11.1.js",
|
||||
"externals/jquery-migrate-1.2.1.js",
|
||||
"externals/js.cookie.js",
|
||||
"externals/suggest/suggest-4_3.js",
|
||||
"externals/jquery-ui/jquery-ui-1.10.3.custom.js",
|
||||
"externals/imgareaselect/jquery.imgareaselect.js",
|
||||
commonModules.concat([
|
||||
"externals/suggest/suggest-4_3a.js",
|
||||
"externals/date.js",
|
||||
|
||||
"externals/CLDRPluralRuleParser.js",
|
||||
"externals/jquery.i18n.js",
|
||||
"externals/jquery.i18n.messagestore.js",
|
||||
"externals/jquery.i18n.parser.js",
|
||||
"externals/jquery.i18n.emitter.js",
|
||||
"externals/jquery.i18n.language.js",
|
||||
"externals/underscore-min.js",
|
||||
|
||||
"scripts/project.js",
|
||||
|
||||
"scripts/util/misc.js",
|
||||
@ -481,6 +469,7 @@ function init() {
|
||||
"scripts/facets/list-facet.js",
|
||||
"scripts/facets/range-facet.js",
|
||||
"scripts/facets/timerange-facet.js",
|
||||
"externals/imgareaselect/jquery.imgareaselect.js", // Used by scatterplot facet only
|
||||
"scripts/facets/scatterplot-facet.js",
|
||||
"scripts/facets/text-search-facet.js",
|
||||
|
||||
@ -506,7 +495,7 @@ function init() {
|
||||
"scripts/dialogs/sql-exporter-dialog.js",
|
||||
"scripts/dialogs/expression-column-dialog.js",
|
||||
"scripts/dialogs/http-headers-dialog.js",
|
||||
]
|
||||
])
|
||||
);
|
||||
|
||||
ClientSideResourceManager.addPaths(
|
||||
@ -552,28 +541,9 @@ function init() {
|
||||
ClientSideResourceManager.addPaths(
|
||||
"preferences/scripts",
|
||||
module,
|
||||
[
|
||||
"externals/jquery-1.11.1.js",
|
||||
"externals/jquery-migrate-1.2.1.js",
|
||||
"externals/jquery.cookie.js",
|
||||
"externals/suggest/suggest-4_3.js",
|
||||
"externals/jquery-ui/jquery-ui-1.10.3.custom.js",
|
||||
"externals/imgareaselect/jquery.imgareaselect.js",
|
||||
"externals/date.js",
|
||||
|
||||
"externals/CLDRPluralRuleParser.js",
|
||||
"externals/jquery.i18n.js",
|
||||
"externals/jquery.i18n.messagestore.js",
|
||||
"externals/jquery.i18n.fallbacks.js",
|
||||
"externals/jquery.i18n.parser.js",
|
||||
"externals/jquery.i18n.emitter.js",
|
||||
"externals/jquery.i18n.language.js",
|
||||
"externals/languages/fi.js",
|
||||
"externals/languages/ru.js",
|
||||
|
||||
"externals/underscore-min.js",
|
||||
commonModules.concat([
|
||||
"scripts/preferences.js",
|
||||
]
|
||||
])
|
||||
);
|
||||
ClientSideResourceManager.addPaths(
|
||||
"preferences/styles",
|
||||
|
File diff suppressed because it is too large
Load Diff
5
main/webapp/modules/core/externals/jquery-1.12.4.min.js
vendored
Normal file
5
main/webapp/modules/core/externals/jquery-1.12.4.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,13 +1,15 @@
|
||||
/*!
|
||||
* jQuery Migrate - v1.2.1 - 2013-05-08
|
||||
* https://github.com/jquery/jquery-migrate
|
||||
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
|
||||
* jQuery Migrate - v1.4.1 - 2016-05-19
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
*/
|
||||
(function( jQuery, window, undefined ) {
|
||||
// See http://bugs.jquery.com/ticket/13335
|
||||
// "use strict";
|
||||
|
||||
|
||||
jQuery.migrateVersion = "1.4.1";
|
||||
|
||||
|
||||
var warnedAbout = {};
|
||||
|
||||
// List of warnings already given; public read only
|
||||
@ -17,8 +19,10 @@ jQuery.migrateWarnings = [];
|
||||
// jQuery.migrateMute = false;
|
||||
|
||||
// Show a message on the console so devs know we're active
|
||||
if ( !jQuery.migrateMute && window.console && window.console.log ) {
|
||||
window.console.log("JQMIGRATE: Logging is active");
|
||||
if ( window.console && window.console.log ) {
|
||||
window.console.log( "JQMIGRATE: Migrate is installed" +
|
||||
( jQuery.migrateMute ? "" : " with logging active" ) +
|
||||
", version " + jQuery.migrateVersion );
|
||||
}
|
||||
|
||||
// Set to false to disable traces that appear with warnings
|
||||
@ -152,7 +156,7 @@ jQuery.attr = function( elem, name, value, pass ) {
|
||||
|
||||
// Warn only for attributes that can remain distinct from their properties post-1.9
|
||||
if ( ruseDefault.test( lowerName ) ) {
|
||||
migrateWarn( "jQuery.fn.attr('" + lowerName + "') may use property instead of attribute" );
|
||||
migrateWarn( "jQuery.fn.attr('" + lowerName + "') might use property instead of attribute" );
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,46 +193,114 @@ jQuery.attrHooks.value = {
|
||||
|
||||
var matched, browser,
|
||||
oldInit = jQuery.fn.init,
|
||||
oldFind = jQuery.find,
|
||||
oldParseJSON = jQuery.parseJSON,
|
||||
rspaceAngle = /^\s*</,
|
||||
rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
|
||||
rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,
|
||||
// Note: XSS check is done below after string is trimmed
|
||||
rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
|
||||
|
||||
// $(html) "looks like html" rule change
|
||||
jQuery.fn.init = function( selector, context, rootjQuery ) {
|
||||
var match;
|
||||
var match, ret;
|
||||
|
||||
if ( selector && typeof selector === "string" && !jQuery.isPlainObject( context ) &&
|
||||
if ( selector && typeof selector === "string" ) {
|
||||
if ( !jQuery.isPlainObject( context ) &&
|
||||
(match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) {
|
||||
|
||||
// This is an HTML string according to the "old" rules; is it still?
|
||||
if ( selector.charAt( 0 ) !== "<" ) {
|
||||
if ( !rspaceAngle.test( selector ) ) {
|
||||
migrateWarn("$(html) HTML strings must start with '<' character");
|
||||
}
|
||||
if ( match[ 3 ] ) {
|
||||
migrateWarn("$(html) HTML text after last tag is ignored");
|
||||
}
|
||||
// Consistently reject any HTML-like string starting with a hash (#9521)
|
||||
|
||||
// Consistently reject any HTML-like string starting with a hash (gh-9521)
|
||||
// Note that this may break jQuery 1.6.x code that otherwise would work.
|
||||
if ( match[ 0 ].charAt( 0 ) === "#" ) {
|
||||
migrateWarn("HTML string cannot start with a '#' character");
|
||||
jQuery.error("JQMIGRATE: Invalid selector string (XSS)");
|
||||
}
|
||||
|
||||
// Now process using loose rules; let pre-1.8 play too
|
||||
if ( context && context.context ) {
|
||||
// jQuery object as context; parseHTML expects a DOM object
|
||||
// Is this a jQuery context? parseHTML expects a DOM element (#178)
|
||||
if ( context && context.context && context.context.nodeType ) {
|
||||
context = context.context;
|
||||
}
|
||||
|
||||
if ( jQuery.parseHTML ) {
|
||||
return oldInit.call( this, jQuery.parseHTML( match[ 2 ], context, true ),
|
||||
context, rootjQuery );
|
||||
return oldInit.call( this,
|
||||
jQuery.parseHTML( match[ 2 ], context && context.ownerDocument ||
|
||||
context || document, true ), context, rootjQuery );
|
||||
}
|
||||
}
|
||||
return oldInit.apply( this, arguments );
|
||||
}
|
||||
|
||||
ret = oldInit.apply( this, arguments );
|
||||
|
||||
// Fill in selector and context properties so .live() works
|
||||
if ( selector && selector.selector !== undefined ) {
|
||||
// A jQuery object, copy its properties
|
||||
ret.selector = selector.selector;
|
||||
ret.context = selector.context;
|
||||
|
||||
} else {
|
||||
ret.selector = typeof selector === "string" ? selector : "";
|
||||
if ( selector ) {
|
||||
ret.context = selector.nodeType? selector : context || document;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
};
|
||||
jQuery.fn.init.prototype = jQuery.fn;
|
||||
|
||||
jQuery.find = function( selector ) {
|
||||
var args = Array.prototype.slice.call( arguments );
|
||||
|
||||
// Support: PhantomJS 1.x
|
||||
// String#match fails to match when used with a //g RegExp, only on some strings
|
||||
if ( typeof selector === "string" && rattrHashTest.test( selector ) ) {
|
||||
|
||||
// The nonstandard and undocumented unquoted-hash was removed in jQuery 1.12.0
|
||||
// First see if qS thinks it's a valid selector, if so avoid a false positive
|
||||
try {
|
||||
document.querySelector( selector );
|
||||
} catch ( err1 ) {
|
||||
|
||||
// Didn't *look* valid to qSA, warn and try quoting what we think is the value
|
||||
selector = selector.replace( rattrHashGlob, function( _, attr, op, value ) {
|
||||
return "[" + attr + op + "\"" + value + "\"]";
|
||||
} );
|
||||
|
||||
// If the regexp *may* have created an invalid selector, don't update it
|
||||
// Note that there may be false alarms if selector uses jQuery extensions
|
||||
try {
|
||||
document.querySelector( selector );
|
||||
migrateWarn( "Attribute selector with '#' must be quoted: " + args[ 0 ] );
|
||||
args[ 0 ] = selector;
|
||||
} catch ( err2 ) {
|
||||
migrateWarn( "Attribute selector with '#' was not fixed: " + args[ 0 ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return oldFind.apply( this, args );
|
||||
};
|
||||
|
||||
// Copy properties attached to original jQuery.find method (e.g. .attr, .isXML)
|
||||
var findProp;
|
||||
for ( findProp in oldFind ) {
|
||||
if ( Object.prototype.hasOwnProperty.call( oldFind, findProp ) ) {
|
||||
jQuery.find[ findProp ] = oldFind[ findProp ];
|
||||
}
|
||||
}
|
||||
|
||||
// Let $.parseJSON(falsy_value) return null
|
||||
jQuery.parseJSON = function( json ) {
|
||||
if ( !json && json !== null ) {
|
||||
if ( !json ) {
|
||||
migrateWarn("jQuery.parseJSON requires a valid JSON string");
|
||||
return null;
|
||||
}
|
||||
@ -274,6 +346,11 @@ if ( !jQuery.browser ) {
|
||||
// Warn if the code tries to get jQuery.browser
|
||||
migrateWarnProp( jQuery, "browser", jQuery.browser, "jQuery.browser is deprecated" );
|
||||
|
||||
// jQuery.boxModel deprecated in 1.3, jQuery.support.boxModel deprecated in 1.7
|
||||
jQuery.boxModel = jQuery.support.boxModel = (document.compatMode === "CSS1Compat");
|
||||
migrateWarnProp( jQuery, "boxModel", jQuery.boxModel, "jQuery.boxModel is deprecated" );
|
||||
migrateWarnProp( jQuery.support, "boxModel", jQuery.support.boxModel, "jQuery.support.boxModel is deprecated" );
|
||||
|
||||
jQuery.sub = function() {
|
||||
function jQuerySub( selector, context ) {
|
||||
return new jQuerySub.fn.init( selector, context );
|
||||
@ -284,11 +361,10 @@ jQuery.sub = function() {
|
||||
jQuerySub.fn.constructor = jQuerySub;
|
||||
jQuerySub.sub = this.sub;
|
||||
jQuerySub.fn.init = function init( selector, context ) {
|
||||
if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
|
||||
context = jQuerySub( context );
|
||||
}
|
||||
|
||||
return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
|
||||
var instance = jQuery.fn.init.call( this, selector, context, rootjQuerySub );
|
||||
return instance instanceof jQuerySub ?
|
||||
instance :
|
||||
jQuerySub( instance );
|
||||
};
|
||||
jQuerySub.fn.init.prototype = jQuerySub.fn;
|
||||
var rootjQuerySub = jQuerySub(document);
|
||||
@ -296,6 +372,57 @@ jQuery.sub = function() {
|
||||
return jQuerySub;
|
||||
};
|
||||
|
||||
// The number of elements contained in the matched element set
|
||||
jQuery.fn.size = function() {
|
||||
migrateWarn( "jQuery.fn.size() is deprecated; use the .length property" );
|
||||
return this.length;
|
||||
};
|
||||
|
||||
|
||||
var internalSwapCall = false;
|
||||
|
||||
// If this version of jQuery has .swap(), don't false-alarm on internal uses
|
||||
if ( jQuery.swap ) {
|
||||
jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) {
|
||||
var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get;
|
||||
|
||||
if ( oldHook ) {
|
||||
jQuery.cssHooks[ name ].get = function() {
|
||||
var ret;
|
||||
|
||||
internalSwapCall = true;
|
||||
ret = oldHook.apply( this, arguments );
|
||||
internalSwapCall = false;
|
||||
return ret;
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
jQuery.swap = function( elem, options, callback, args ) {
|
||||
var ret, name,
|
||||
old = {};
|
||||
|
||||
if ( !internalSwapCall ) {
|
||||
migrateWarn( "jQuery.swap() is undocumented and deprecated" );
|
||||
}
|
||||
|
||||
// Remember the old values, and insert the new ones
|
||||
for ( name in options ) {
|
||||
old[ name ] = elem.style[ name ];
|
||||
elem.style[ name ] = options[ name ];
|
||||
}
|
||||
|
||||
ret = callback.apply( elem, args || [] );
|
||||
|
||||
// Revert the old values
|
||||
for ( name in options ) {
|
||||
elem.style[ name ] = old[ name ];
|
||||
}
|
||||
|
||||
return ret;
|
||||
};
|
||||
|
||||
|
||||
// Ensure that $.ajax gets the new parseJSON defined in core.js
|
||||
jQuery.ajaxSetup({
|
||||
@ -324,13 +451,7 @@ jQuery.fn.data = function( name ) {
|
||||
};
|
||||
|
||||
|
||||
var rscriptType = /\/(java|ecma)script/i,
|
||||
oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack;
|
||||
|
||||
jQuery.fn.andSelf = function() {
|
||||
migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");
|
||||
return oldSelf.apply( this, arguments );
|
||||
};
|
||||
var rscriptType = /\/(java|ecma)script/i;
|
||||
|
||||
// Since jQuery.clean is used internally on older versions, we only shim if it's missing
|
||||
if ( !jQuery.clean ) {
|
||||
@ -388,6 +509,7 @@ var eventAdd = jQuery.event.add,
|
||||
oldToggle = jQuery.fn.toggle,
|
||||
oldLive = jQuery.fn.live,
|
||||
oldDie = jQuery.fn.die,
|
||||
oldLoad = jQuery.fn.load,
|
||||
ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
|
||||
rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ),
|
||||
rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
|
||||
@ -422,18 +544,36 @@ jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){
|
||||
eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes );
|
||||
};
|
||||
|
||||
jQuery.fn.error = function() {
|
||||
jQuery.each( [ "load", "unload", "error" ], function( _, name ) {
|
||||
|
||||
jQuery.fn[ name ] = function() {
|
||||
var args = Array.prototype.slice.call( arguments, 0 );
|
||||
migrateWarn("jQuery.fn.error() is deprecated");
|
||||
args.splice( 0, 0, "error" );
|
||||
|
||||
// If this is an ajax load() the first arg should be the string URL;
|
||||
// technically this could also be the "Anything" arg of the event .load()
|
||||
// which just goes to show why this dumb signature has been deprecated!
|
||||
// jQuery custom builds that exclude the Ajax module justifiably die here.
|
||||
if ( name === "load" && typeof args[ 0 ] === "string" ) {
|
||||
return oldLoad.apply( this, args );
|
||||
}
|
||||
|
||||
migrateWarn( "jQuery.fn." + name + "() is deprecated" );
|
||||
|
||||
args.splice( 0, 0, name );
|
||||
if ( arguments.length ) {
|
||||
return this.bind.apply( this, args );
|
||||
}
|
||||
// error event should not bubble to window, although it does pre-1.7
|
||||
|
||||
// Use .triggerHandler here because:
|
||||
// - load and unload events don't need to bubble, only applied to window or image
|
||||
// - error event should not bubble to window, although it does pre-1.7
|
||||
// See http://bugs.jquery.com/ticket/11820
|
||||
this.triggerHandler.apply( this, args );
|
||||
return this;
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
jQuery.fn.toggle = function( fn, fn2 ) {
|
||||
|
||||
// Don't mess with animation or css toggles
|
||||
@ -501,7 +641,7 @@ jQuery.each( ajaxEvents.split("|"),
|
||||
// The document needs no shimming; must be !== for oldIE
|
||||
if ( elem !== document ) {
|
||||
jQuery.event.add( document, name + "." + jQuery.guid, function() {
|
||||
jQuery.event.trigger( name, null, elem, true );
|
||||
jQuery.event.trigger( name, Array.prototype.slice.call( arguments, 1 ), elem, true );
|
||||
});
|
||||
jQuery._data( this, name, jQuery.guid++ );
|
||||
}
|
||||
@ -517,5 +657,96 @@ jQuery.each( ajaxEvents.split("|"),
|
||||
}
|
||||
);
|
||||
|
||||
jQuery.event.special.ready = {
|
||||
setup: function() {
|
||||
if ( this === document ) {
|
||||
migrateWarn( "'ready' event is deprecated" );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack,
|
||||
oldFnFind = jQuery.fn.find;
|
||||
|
||||
jQuery.fn.andSelf = function() {
|
||||
migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");
|
||||
return oldSelf.apply( this, arguments );
|
||||
};
|
||||
|
||||
jQuery.fn.find = function( selector ) {
|
||||
var ret = oldFnFind.apply( this, arguments );
|
||||
ret.context = this.context;
|
||||
ret.selector = this.selector ? this.selector + " " + selector : selector;
|
||||
return ret;
|
||||
};
|
||||
|
||||
|
||||
// jQuery 1.6 did not support Callbacks, do not warn there
|
||||
if ( jQuery.Callbacks ) {
|
||||
|
||||
var oldDeferred = jQuery.Deferred,
|
||||
tuples = [
|
||||
// action, add listener, callbacks, .then handlers, final state
|
||||
[ "resolve", "done", jQuery.Callbacks("once memory"),
|
||||
jQuery.Callbacks("once memory"), "resolved" ],
|
||||
[ "reject", "fail", jQuery.Callbacks("once memory"),
|
||||
jQuery.Callbacks("once memory"), "rejected" ],
|
||||
[ "notify", "progress", jQuery.Callbacks("memory"),
|
||||
jQuery.Callbacks("memory") ]
|
||||
];
|
||||
|
||||
jQuery.Deferred = function( func ) {
|
||||
var deferred = oldDeferred(),
|
||||
promise = deferred.promise();
|
||||
|
||||
deferred.pipe = promise.pipe = function( /* fnDone, fnFail, fnProgress */ ) {
|
||||
var fns = arguments;
|
||||
|
||||
migrateWarn( "deferred.pipe() is deprecated" );
|
||||
|
||||
return jQuery.Deferred(function( newDefer ) {
|
||||
jQuery.each( tuples, function( i, tuple ) {
|
||||
var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
|
||||
// deferred.done(function() { bind to newDefer or newDefer.resolve })
|
||||
// deferred.fail(function() { bind to newDefer or newDefer.reject })
|
||||
// deferred.progress(function() { bind to newDefer or newDefer.notify })
|
||||
deferred[ tuple[1] ](function() {
|
||||
var returned = fn && fn.apply( this, arguments );
|
||||
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
||||
returned.promise()
|
||||
.done( newDefer.resolve )
|
||||
.fail( newDefer.reject )
|
||||
.progress( newDefer.notify );
|
||||
} else {
|
||||
newDefer[ tuple[ 0 ] + "With" ](
|
||||
this === promise ? newDefer.promise() : this,
|
||||
fn ? [ returned ] : arguments
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
fns = null;
|
||||
}).promise();
|
||||
|
||||
};
|
||||
|
||||
deferred.isResolved = function() {
|
||||
migrateWarn( "deferred.isResolved is deprecated" );
|
||||
return deferred.state() === "resolved";
|
||||
};
|
||||
|
||||
deferred.isRejected = function() {
|
||||
migrateWarn( "deferred.isRejected is deprecated" );
|
||||
return deferred.state() === "rejected";
|
||||
};
|
||||
|
||||
if ( func ) {
|
||||
func.call( deferred, deferred );
|
||||
}
|
||||
|
||||
return deferred;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
})( jQuery, window );
|
2
main/webapp/modules/core/externals/jquery-migrate-1.4.1.min.js
vendored
Normal file
2
main/webapp/modules/core/externals/jquery-migrate-1.4.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,3 +1,5 @@
|
||||
// This version is slightly later than v4.3 and incorporates a couple
|
||||
// of bug fixes from Google Code SVN as well as a bunch of local changes.
|
||||
/*
|
||||
* Copyright 2012, Google Inc.
|
||||
* All rights reserved.
|
||||
@ -239,7 +241,7 @@
|
||||
.bind("focus.suggest", function(e) {
|
||||
self.focus(e);
|
||||
})
|
||||
.bind($.browser.msie ? "paste.suggest" : "input.suggest", function(e) {
|
||||
.bind("paste.suggest input.suggest", function(e) {
|
||||
clearTimeout(self.paste_timeout);
|
||||
self.paste_timeout = setTimeout(function() {
|
||||
self.textchange();
|
||||
@ -1361,7 +1363,7 @@
|
||||
// spell/correction
|
||||
var correction = response_data.correction;
|
||||
if (correction && correction.length) {
|
||||
var spell_link = $('<a class="fbs-spell-link" href="#">').append(correction[0])
|
||||
var spell_link = $('<a class="fbs-spell-link" href="#">').text(correction[0])
|
||||
.bind("click.suggest", function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
@ -132,11 +132,11 @@ ClusteringDialog.prototype._createDialog = function() {
|
||||
label = keyers[i];
|
||||
}
|
||||
var option = $('<option></option>')
|
||||
.attr('value', keyers[i])
|
||||
.val(keyers[i])
|
||||
.text(label)
|
||||
.appendTo(self._elmts.keyingFunctionSelector);
|
||||
if (i == 0) {
|
||||
option.attr('selected', 'true');
|
||||
option.prop('selected', 'true');
|
||||
}
|
||||
}
|
||||
for(i = 0; i < distances.length; i++) {
|
||||
@ -145,11 +145,11 @@ ClusteringDialog.prototype._createDialog = function() {
|
||||
label = distances[i];
|
||||
}
|
||||
var option = $('<option></option>')
|
||||
.attr('value', distances[i])
|
||||
.val(distances[i])
|
||||
.text(label)
|
||||
.appendTo(self._elmts.distanceFunctionSelector);
|
||||
if (i == 0) {
|
||||
option.attr('selected', 'true');
|
||||
option.prop('selected', 'true');
|
||||
}
|
||||
}
|
||||
self._level = DialogSystem.showDialog(dialog);
|
||||
@ -269,11 +269,11 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
|
||||
}).appendTo(tr.insertCell(3));
|
||||
|
||||
if (cluster.edit) {
|
||||
editCheck.attr("checked", "true");
|
||||
editCheck.prop('checked', true);
|
||||
}
|
||||
|
||||
$('<input type="text" size="25" />')
|
||||
.attr("value", cluster.value)
|
||||
.val(cluster.value)
|
||||
.bind("keyup change input",function() {
|
||||
cluster.value = this.value;
|
||||
}).appendTo(tr.insertCell(4));
|
||||
@ -367,11 +367,11 @@ ClusteringDialog.prototype._updateData = function(data) {
|
||||
};
|
||||
|
||||
ClusteringDialog.prototype._selectAll = function() {
|
||||
$(".clustering-dialog-entry-table input:not(:checked)").attr('checked', true).change();
|
||||
$(".clustering-dialog-entry-table input:not(:checked)").prop('checked', true).change();
|
||||
};
|
||||
|
||||
ClusteringDialog.prototype._deselectAll = function() {
|
||||
$(".clustering-dialog-entry-table input:checked").attr('checked', false).change();
|
||||
$(".clustering-dialog-entry-table input:checked").prop('checked', false).change();
|
||||
};
|
||||
|
||||
ClusteringDialog.prototype._onApplyClose = function() {
|
||||
|
@ -148,7 +148,7 @@ CustomTabularExporterDialog.prototype._createDialog = function(options) {
|
||||
|
||||
$('<input>')
|
||||
.attr('type', 'checkbox')
|
||||
.attr('checked', 'checked')
|
||||
.prop('checked', true)
|
||||
.appendTo(div);
|
||||
$('<span>')
|
||||
.text(name)
|
||||
@ -187,10 +187,10 @@ CustomTabularExporterDialog.prototype._createDialog = function(options) {
|
||||
.attr('id', id)
|
||||
.attr('type', 'radio')
|
||||
.attr('name', 'custom-tabular-exporter-upload-format')
|
||||
.attr('value', target.id)
|
||||
.val(target.id)
|
||||
.appendTo(td0);
|
||||
if (i === 0) {
|
||||
input.attr('checked', 'checked');
|
||||
input.prop('checked', true);
|
||||
}
|
||||
|
||||
$('<label>')
|
||||
@ -220,11 +220,11 @@ CustomTabularExporterDialog.prototype._createDialog = function(options) {
|
||||
self._updateOptionCode();
|
||||
});
|
||||
this._elmts.selectAllButton.click(function() {
|
||||
self._elmts.columnList.find('input[type="checkbox"]').attr('checked', true);
|
||||
self._elmts.columnList.find('input[type="checkbox"]').prop('checked', true);
|
||||
self._updateOptionCode();
|
||||
});
|
||||
this._elmts.deselectAllButton.click(function() {
|
||||
self._elmts.columnList.find('input[type="checkbox"]').attr('checked', false);
|
||||
self._elmts.columnList.find('input[type="checkbox"]').prop('checked', false);
|
||||
self._updateOptionCode();
|
||||
});
|
||||
|
||||
@ -251,23 +251,23 @@ CustomTabularExporterDialog.prototype._configureUIFromOptionCode = function(opti
|
||||
var escapeJavascriptString = function(s) {
|
||||
return JSON.stringify([s]).replace(/^\[\s*"/, '').replace(/"\s*]$/, '');
|
||||
};
|
||||
this._dialog.find('input[name="custom-tabular-exporter-download-format"][value="' + options.format + '"]').attr('checked', 'checked');
|
||||
this._dialog.find('input[name="custom-tabular-exporter-download-format"][value="' + options.format + '"]').prop('checked', true);
|
||||
this._elmts.separatorInput[0].value = escapeJavascriptString(options.separator || ',');
|
||||
this._elmts.lineSeparatorInput[0].value = escapeJavascriptString(options.lineSeparator || '\n');
|
||||
this._elmts.encodingInput[0].value = options.encoding;
|
||||
this._elmts.outputColumnHeadersCheckbox.attr('checked', (options.outputColumnHeaders) ? 'checked' : null);
|
||||
this._elmts.outputEmptyRowsCheckbox.attr('checked', (options.outputBlankRows) ? 'checked' : null);
|
||||
this._elmts.quoteAllCheckbox.attr('checked', (options.quoteAll) ? 'checked' : null);
|
||||
this._elmts.outputColumnHeadersCheckbox.prop('checked', options.outputColumnHeaders);
|
||||
this._elmts.outputEmptyRowsCheckbox.prop('checked', options.outputBlankRows);
|
||||
this._elmts.quoteAllCheckbox.prop('checked', options.quoteAll);
|
||||
|
||||
if (options.columns !== null) {
|
||||
var self = this;
|
||||
this._elmts.columnList.find('.custom-tabular-exporter-dialog-column input[type="checkbox"]').attr('checked', false);
|
||||
this._elmts.columnList.find('.custom-tabular-exporter-dialog-column input[type="checkbox"]').prop('checked', false);
|
||||
$.each(options.columns, function() {
|
||||
var name = this.name;
|
||||
self._columnOptionMap[name] = this;
|
||||
self._elmts.columnList.find('.custom-tabular-exporter-dialog-column').each(function() {
|
||||
if (this.getAttribute('column') == name) {
|
||||
$(this).find('input[type="checkbox"]').attr('checked', 'checked');
|
||||
$(this).find('input[type="checkbox"]').prop('checked', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -306,17 +306,17 @@ CustomTabularExporterDialog.prototype._postExport = function(preview) {
|
||||
var form = ExporterManager.prepareExportRowsForm(format, !exportAllRowsCheckbox, ext);
|
||||
$('<input />')
|
||||
.attr("name", "options")
|
||||
.attr("value", JSON.stringify(options))
|
||||
.val(JSON.stringify(options))
|
||||
.appendTo(form);
|
||||
if (encoding) {
|
||||
$('<input />')
|
||||
.attr("name", "encoding")
|
||||
.attr("value", encoding)
|
||||
.val(encoding)
|
||||
.appendTo(form);
|
||||
}
|
||||
$('<input />')
|
||||
.attr("name", "preview")
|
||||
.attr("value", preview)
|
||||
.val(preview)
|
||||
.appendTo(form);
|
||||
|
||||
document.body.appendChild(form);
|
||||
@ -333,15 +333,15 @@ CustomTabularExporterDialog.prototype._selectColumn = function(columnName) {
|
||||
var columnOptions = this._columnOptionMap[columnName];
|
||||
|
||||
this._elmts.columnOptionPane.find('input[name="custom-tabular-exporter-recon"][value="' +
|
||||
columnOptions.reconSettings.output + '"]').attr('checked', 'checked');
|
||||
this._elmts.reconBlankUnmatchedCheckbox.attr('checked', columnOptions.reconSettings.blankUnmatchedCells ? 'checked' : '');
|
||||
this._elmts.reconLinkCheckbox.attr('checked', columnOptions.reconSettings.linkToEntityPages ? 'checked' : '');
|
||||
columnOptions.reconSettings.output + '"]').prop('checked', true);
|
||||
this._elmts.reconBlankUnmatchedCheckbox.prop('checked', columnOptions.reconSettings.blankUnmatchedCells);
|
||||
this._elmts.reconLinkCheckbox.prop('checked', columnOptions.reconSettings.linkToEntityPages);
|
||||
|
||||
this._elmts.columnOptionPane.find('input[name="custom-tabular-exporter-date"][value="' +
|
||||
columnOptions.dateSettings.format + '"]').attr('checked', 'checked');
|
||||
columnOptions.dateSettings.format + '"]').prop('checked', true);
|
||||
this._elmts.dateCustomInput.val(columnOptions.dateSettings.custom);
|
||||
this._elmts.dateLocalTimeZoneCheckbox.attr('checked', columnOptions.dateSettings.useLocalTimeZone ? 'checked' : '');
|
||||
this._elmts.omitTimeCheckbox.attr('checked', columnOptions.dateSettings.omitTime ? 'checked' : '');
|
||||
this._elmts.dateLocalTimeZoneCheckbox.prop('checked', columnOptions.dateSettings.useLocalTimeZone);
|
||||
this._elmts.omitTimeCheckbox.prop('checked', columnOptions.dateSettings.omitTime);
|
||||
};
|
||||
|
||||
CustomTabularExporterDialog.prototype._updateCurrentColumnOptions = function() {
|
||||
|
@ -51,7 +51,7 @@ ExpressionColumnDialog.prototype._createDialog = function() {
|
||||
|
||||
$('<input>')
|
||||
.attr('type', 'checkbox')
|
||||
.attr('checked', 'checked')
|
||||
.prop('checked', true)
|
||||
.appendTo(div);
|
||||
$('<span>')
|
||||
.text(name)
|
||||
@ -69,10 +69,10 @@ ExpressionColumnDialog.prototype._createDialog = function() {
|
||||
$(this).addClass('selected');
|
||||
});
|
||||
this._elmts.selectAllButton.click(function() {
|
||||
self._elmts.columnList.find('input[type="checkbox"]').attr('checked', true);
|
||||
self._elmts.columnList.find('input[type="checkbox"]').prop('checked', true);
|
||||
});
|
||||
this._elmts.deselectAllButton.click(function() {
|
||||
self._elmts.columnList.find('input[type="checkbox"]').attr('checked', false);
|
||||
self._elmts.columnList.find('input[type="checkbox"]').prop('checked', false);
|
||||
});
|
||||
|
||||
this._elmts.okButton.click(function() { self._transform(); });
|
||||
|
@ -127,7 +127,7 @@ ExpressionPreviewDialog.Widget = function(
|
||||
|
||||
var self = this;
|
||||
this._elmts.expressionPreviewTextarea
|
||||
.attr("value", this.expression)
|
||||
.val(this.expression)
|
||||
.bind("keyup change input",function(){
|
||||
self._scheduleUpdate();
|
||||
})
|
||||
|
@ -348,12 +348,11 @@ ExtendReconciledDataPreviewDialog.prototype._constrainProperty = function(id) {
|
||||
var choice = field.choices[j];
|
||||
var labelElem = $('<label></label>').attr('for', field.name+'_'+choice.value).appendTo(td);
|
||||
var inputElem = $('<input type="radio" />').attr(
|
||||
'id', field.name+'_'+choice.value).attr(
|
||||
'value', choice.value).attr(
|
||||
'id', field.name+'_'+choice.value).val(choice.value).attr(
|
||||
'name', field.name).appendTo(labelElem);
|
||||
|
||||
if (choice.value === currentValue) {
|
||||
inputElem.attr('checked', 'checked');
|
||||
inputElem.prop('checked', true);
|
||||
}
|
||||
labelElem.append(' '+choice.name);
|
||||
td.append('<br/>');
|
||||
@ -363,7 +362,7 @@ ExtendReconciledDataPreviewDialog.prototype._constrainProperty = function(id) {
|
||||
var label = $('<label></label>').attr('for', field.name).appendTo(td);
|
||||
var input = $('<input type="checkbox" />').attr('name', field.name).appendTo(label);
|
||||
if (currentValue === 'on') {
|
||||
input.attr('checked','checked');
|
||||
input.prop('checked', true);
|
||||
}
|
||||
label.append(' '+field.label);
|
||||
} else if (field.type === 'number' || field.type == 'text') {
|
||||
@ -371,8 +370,7 @@ ExtendReconciledDataPreviewDialog.prototype._constrainProperty = function(id) {
|
||||
label.append(field.label+': ');
|
||||
var input = $('<input />').attr(
|
||||
'name', field.name).attr(
|
||||
'type', field.type).attr(
|
||||
'value', currentValue).appendTo(label);
|
||||
'type', field.type).val(currentValue).appendTo(label);
|
||||
}
|
||||
if (tr.children().length > 0) {
|
||||
table.append(tr);
|
||||
|
@ -90,13 +90,13 @@ function SqlExporterDialog(options) {
|
||||
|
||||
|
||||
var sel = $('<select>').appendTo('body');
|
||||
sel.append($("<option>").attr('value','VARCHAR').text('VARCHAR'));
|
||||
sel.append($("<option>").attr('value','TEXT').text('TEXT'));
|
||||
sel.append($("<option>").attr('value','INT').text('INT'));
|
||||
sel.append($("<option>").attr('value','NUMERIC').text('NUMERIC'));
|
||||
sel.append($("<option>").attr('value','CHAR').text('CHAR'));
|
||||
sel.append($("<option>").attr('value','DATE').text('DATE'));
|
||||
sel.append($("<option>").attr('value','TIMESTAMP').text('TIMESTAMP'));
|
||||
sel.append($("<option>").val('VARCHAR').text('VARCHAR'));
|
||||
sel.append($("<option>").val('TEXT').text('TEXT'));
|
||||
sel.append($("<option>").val('INT').text('INT'));
|
||||
sel.append($("<option>").val('NUMERIC').text('NUMERIC'));
|
||||
sel.append($("<option>").val('CHAR').text('CHAR'));
|
||||
sel.append($("<option>").val('DATE').text('DATE'));
|
||||
sel.append($("<option>").val('TIMESTAMP').text('TIMESTAMP'));
|
||||
|
||||
sel.attr('id', selectBoxName);
|
||||
sel.attr('rowIndex', i);
|
||||
@ -126,7 +126,7 @@ function SqlExporterDialog(options) {
|
||||
.appendTo(row);
|
||||
$('<input>')
|
||||
.attr('type', 'checkbox')
|
||||
.attr('checked', 'checked')
|
||||
.prop('checked', true)
|
||||
.addClass("columnNameCheckboxStyle")
|
||||
.appendTo(columnCell);
|
||||
$('<span>')
|
||||
@ -153,7 +153,7 @@ function SqlExporterDialog(options) {
|
||||
.appendTo(row);
|
||||
$('<input>')
|
||||
.attr('type', 'button')
|
||||
.attr('value', 'Apply All')
|
||||
.val('Apply All')
|
||||
.attr('id', applyAllBtnName)
|
||||
.attr("rowIndex", i)
|
||||
.appendTo(applyAllCell);
|
||||
@ -164,7 +164,7 @@ function SqlExporterDialog(options) {
|
||||
.appendTo(row);
|
||||
$('<input>')
|
||||
.attr('type', 'checkbox')
|
||||
.attr('checked', 'checked')
|
||||
.prop('checked', true)
|
||||
.attr('id', allowNullChkBoxName)
|
||||
.attr("rowIndex", i)
|
||||
.addClass("allowNullCheckboxStyle")
|
||||
@ -211,9 +211,8 @@ function SqlExporterDialog(options) {
|
||||
$('#' + allowNullChkBoxName).on('click', function() {
|
||||
var rowIndex = this.getAttribute('rowIndex');
|
||||
var id = this.getAttribute('id');
|
||||
var checked = $(this).is(':checked');;
|
||||
|
||||
if(checked == false){
|
||||
if(!this.checked){
|
||||
$('#defaultValueTextBox'+ rowIndex).prop("disabled", false);
|
||||
}else{
|
||||
$('#defaultValueTextBox'+ rowIndex).val("");
|
||||
@ -230,21 +229,20 @@ function SqlExporterDialog(options) {
|
||||
}
|
||||
|
||||
this._elmts.allowNullToggleCheckbox.click(function() {
|
||||
var checked = $(this).is(':checked');
|
||||
if(checked == true){
|
||||
if(this.checked){
|
||||
$("input:checkbox[class=allowNullCheckboxStyle]").each(function () {
|
||||
$(this).attr('checked', true);
|
||||
$(this).prop('checked', true);
|
||||
});
|
||||
$("input:text[class=defaultValueTextBoxStyle]").each(function () {
|
||||
$(this).attr('disabled', true);
|
||||
$(this).prop('disabled', true);
|
||||
});
|
||||
|
||||
}else{
|
||||
$("input:checkbox[class=allowNullCheckboxStyle]").each(function () {
|
||||
$(this).attr('checked', false);
|
||||
$(this).prop('checked', false);
|
||||
});
|
||||
$("input:text[class=defaultValueTextBoxStyle]").each(function () {
|
||||
$(this).attr('disabled', false);
|
||||
$(this).prop('disabled', false);
|
||||
});
|
||||
}
|
||||
|
||||
@ -252,37 +250,24 @@ function SqlExporterDialog(options) {
|
||||
|
||||
this._elmts.selectAllButton.click(function() {
|
||||
$("input:checkbox[class=columnNameCheckboxStyle]").each(function () {
|
||||
$(this).attr('checked', true);
|
||||
$(this).prop('checked', true);
|
||||
});
|
||||
self._updateOptionCode();
|
||||
});
|
||||
this._elmts.deselectAllButton.click(function() {
|
||||
$("input:checkbox[class=columnNameCheckboxStyle]").each(function () {
|
||||
$(this).attr('checked', false);
|
||||
$(this).prop('checked', false);
|
||||
});
|
||||
self._updateOptionCode();
|
||||
});
|
||||
|
||||
this._elmts.includeStructureCheckbox.click(function() {
|
||||
var checked = $(this).is(':checked');
|
||||
//alert('checked ' + checked);
|
||||
if(checked == true){
|
||||
$('#includeDropStatementCheckboxId').removeAttr("disabled");
|
||||
$('#includeIfExistDropStatementCheckboxId').removeAttr("disabled");
|
||||
}else{
|
||||
$('#includeDropStatementCheckboxId').attr("disabled", true);
|
||||
$('#includeIfExistDropStatementCheckboxId').attr("disabled", true);
|
||||
}
|
||||
$('#includeDropStatementCheckboxId').prop("disabled", !this.checked);
|
||||
$('#includeIfExistDropStatementCheckboxId').prop("disabled", !this.checked);
|
||||
});
|
||||
|
||||
this._elmts.includeContentCheckbox.click(function() {
|
||||
var checked = $(this).is(':checked');
|
||||
if(checked == true){
|
||||
$('#nullCellValueToEmptyStringCheckboxId').removeAttr("disabled");
|
||||
}else{
|
||||
$('#nullCellValueToEmptyStringCheckboxId').attr("disabled", true);
|
||||
|
||||
}
|
||||
$('#nullCellValueToEmptyStringCheckboxId').prop("disabled", !this.checked);
|
||||
});
|
||||
|
||||
|
||||
@ -296,9 +281,9 @@ function SqlExporterDialog(options) {
|
||||
SqlExporterDialog.prototype._configureUIFromOptionCode = function(options) {
|
||||
|
||||
this._elmts.tableNameTextBox.val(theProject.metadata.name.replace(/\W/g, ' ').replace(/\s+/g, '_'));
|
||||
this._elmts.sqlExportOutputEmptyRowsCheckbox.attr('checked', 'checked');
|
||||
this._elmts.sqlExportTrimAllColumnsCheckbox.attr('checked', 'checked');
|
||||
this._elmts.nullCellValueToEmptyStringLabel.attr('checked', 'checked');
|
||||
this._elmts.sqlExportOutputEmptyRowsCheckbox.prop('checked', true);
|
||||
this._elmts.sqlExportTrimAllColumnsCheckbox.prop('checked', true);
|
||||
this._elmts.nullCellValueToEmptyStringLabel.prop('checked', true);
|
||||
|
||||
$("input:text[class=defaultValueTextBoxStyle]").each(function () {
|
||||
$(this).prop("disabled", true);
|
||||
@ -349,17 +334,17 @@ function SqlExporterDialog(options) {
|
||||
var form = self._prepareSqlExportRowsForm(format, !exportAllRowsCheckbox, "sql");
|
||||
$('<input />')
|
||||
.attr("name", "options")
|
||||
.attr("value", JSON.stringify(options))
|
||||
.val(JSON.stringify(options))
|
||||
.appendTo(form);
|
||||
if (encoding) {
|
||||
$('<input />')
|
||||
.attr("name", "encoding")
|
||||
.attr("value", encoding)
|
||||
.val(encoding)
|
||||
.appendTo(form);
|
||||
}
|
||||
$('<input />')
|
||||
.attr("name", "preview")
|
||||
.attr("value", preview)
|
||||
.val(preview)
|
||||
.appendTo(form);
|
||||
|
||||
document.body.appendChild(form);
|
||||
@ -383,16 +368,16 @@ function SqlExporterDialog(options) {
|
||||
|
||||
$('<input />')
|
||||
.attr("name", "project")
|
||||
.attr("value", theProject.id)
|
||||
.val(theProject.id)
|
||||
.appendTo(form);
|
||||
$('<input />')
|
||||
.attr("name", "format")
|
||||
.attr("value", format)
|
||||
.val(format)
|
||||
.appendTo(form);
|
||||
if (includeEngine) {
|
||||
$('<input />')
|
||||
.attr("name", "engine")
|
||||
.attr("value", JSON.stringify(ui.browsingEngine.getJSON()))
|
||||
.val(JSON.stringify(ui.browsingEngine.getJSON()))
|
||||
.appendTo(form);
|
||||
}
|
||||
|
||||
@ -465,7 +450,7 @@ function SqlExporterDialog(options) {
|
||||
// alert("typeSize::" + typeSize);
|
||||
}
|
||||
|
||||
var allowNullChkBoxName = $('#allowNullChkBox' + rowIndex).is(':checked');
|
||||
var allowNullChkBoxName = $('#allowNullChkBox' + rowIndex).prop('checked');
|
||||
var defaultValueTextBoxName = $('#defaultValueTextBox' + rowIndex).val();
|
||||
// alert("allowNullChkBoxName::" + allowNullChkBoxName);
|
||||
// alert("defaultValueTextBoxName::" + defaultValueTextBoxName);
|
||||
|
@ -154,7 +154,7 @@ TemplatingExporterDialog.prototype._export = function() {
|
||||
var appendField = function(name, value) {
|
||||
$('<textarea />')
|
||||
.attr("name", name)
|
||||
.attr("value", value)
|
||||
.val(value)
|
||||
.appendTo(form);
|
||||
};
|
||||
|
||||
|
@ -213,7 +213,7 @@ RangeFacet.prototype._renderOtherChoices = function() {
|
||||
self._selectNumeric = !self._selectNumeric;
|
||||
self._updateRest();
|
||||
});
|
||||
if (this._selectNumeric) numericCheck.attr("checked","checked");
|
||||
if (this._selectNumeric) numericCheck.prop('checked', true);
|
||||
|
||||
var numericLabel = $('<label>').attr("for", facet_id + "-numeric").appendTo(numericDiv);
|
||||
$('<span>').text($.i18n('core-facets/numeric')+" ").addClass("facet-range-choice-label").appendTo(numericLabel);
|
||||
@ -226,13 +226,13 @@ RangeFacet.prototype._renderOtherChoices = function() {
|
||||
self._selectNonNumeric = !self._selectNonNumeric;
|
||||
self._updateRest();
|
||||
});
|
||||
if (this._selectNonNumeric) nonNumericCheck.attr("checked","checked");
|
||||
if (this._selectNonNumeric) nonNumericCheck.prop('checked', true);
|
||||
|
||||
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");
|
||||
if (this._baseNonNumericCount === 0) nonNumericCheck.prop('checked', false);
|
||||
|
||||
// ----------------- blank -----------------
|
||||
|
||||
@ -241,13 +241,13 @@ RangeFacet.prototype._renderOtherChoices = function() {
|
||||
self._selectBlank = !self._selectBlank;
|
||||
self._updateRest();
|
||||
});
|
||||
if (this._selectBlank) blankCheck.attr("checked","checked");
|
||||
if (this._selectBlank) blankCheck.prop('checked', true);
|
||||
|
||||
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");
|
||||
if (this._baseBlankCount === 0) blankCheck.prop('checked', false);
|
||||
|
||||
// ----------------- error -----------------
|
||||
|
||||
@ -256,13 +256,13 @@ RangeFacet.prototype._renderOtherChoices = function() {
|
||||
self._selectError = !self._selectError;
|
||||
self._updateRest();
|
||||
});
|
||||
if (this._selectError) errorCheck.attr("checked","checked");
|
||||
if (this._selectError) errorCheck.prop('checked', true);
|
||||
|
||||
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");
|
||||
if (this._baseErrorCount === 0) errorCheck.prop("checked", false);
|
||||
|
||||
// --------------------------
|
||||
|
||||
|
@ -175,25 +175,25 @@ ScatterplotFacet.prototype._initializeUI = function() {
|
||||
this._plotAreaSelector = this._elmts.plotImg.imgAreaSelect(ops);
|
||||
|
||||
if (this._config.dim_x == 'lin' && this._config.dim_y == 'lin') {
|
||||
this._elmts.selectors.find("#" + facet_id + "-dim-lin").attr('checked','checked');
|
||||
this._elmts.selectors.find("#" + facet_id + "-dim-lin").prop('checked', true);
|
||||
} else if (this._config.dim_x == 'log' && this._config.dim_y == 'log') {
|
||||
this._elmts.selectors.find("#" + facet_id + "-dim-log").attr('checked','checked');
|
||||
this._elmts.selectors.find("#" + facet_id + "-dim-log").prop('checked', true);
|
||||
}
|
||||
|
||||
if (this._config.r == 'cw') {
|
||||
this._elmts.selectors.find("#" + facet_id + "-rot-cw").attr('checked','checked');
|
||||
this._elmts.selectors.find("#" + facet_id + "-rot-cw").prop('checked', true);
|
||||
} else if (this._config.r == 'ccw') {
|
||||
this._elmts.selectors.find("#" + facet_id + "-rot-ccw").attr('checked','checked');
|
||||
this._elmts.selectors.find("#" + facet_id + "-rot-ccw").prop('checked', true);
|
||||
} else {
|
||||
this._elmts.selectors.find("#" + facet_id + "-rot-none").attr('checked','checked');
|
||||
this._elmts.selectors.find("#" + facet_id + "-rot-none").prop('checked', true);
|
||||
}
|
||||
|
||||
if (this._config.dot >= 1.2) {
|
||||
this._elmts.selectors.find("#" + facet_id + "-dot-big").attr('checked','checked');
|
||||
this._elmts.selectors.find("#" + facet_id + "-dot-big").prop('checked', true);
|
||||
} else if (this._config.dot <= 0.4) {
|
||||
this._elmts.selectors.find("#" + facet_id + "-dot-small").attr('checked','checked');
|
||||
this._elmts.selectors.find("#" + facet_id + "-dot-small").prop('checked', true);
|
||||
} else {
|
||||
this._elmts.selectors.find("#" + facet_id + "-dot-regular").attr('checked','checked');
|
||||
this._elmts.selectors.find("#" + facet_id + "-dot-regular").prop('checked', true);
|
||||
}
|
||||
|
||||
this._elmts.selectors.find(".scatterplot-dim-selector").change(function() {
|
||||
|
@ -121,10 +121,10 @@ TextSearchFacet.prototype._initializeUI = function() {
|
||||
|
||||
this._elmts.titleSpan.text(this._config.name);
|
||||
if (this._config.caseSensitive) {
|
||||
this._elmts.caseSensitiveCheckbox.attr("checked", "true");
|
||||
this._elmts.caseSensitiveCheckbox.prop("checked", true);
|
||||
}
|
||||
if (this._config.mode === "regex") {
|
||||
this._elmts.regexCheckbox.attr("checked", "true");
|
||||
this._elmts.regexCheckbox.prop('checked', true);
|
||||
}
|
||||
|
||||
this._elmts.removeButton.click(function() { self._remove(); });
|
||||
|
@ -214,7 +214,7 @@ TimeRangeFacet.prototype._renderOtherChoices = function() {
|
||||
self._selectTime = !self._selectTime;
|
||||
self._updateRest();
|
||||
});
|
||||
if (this._selectTime) timeCheck.attr("checked","checked");
|
||||
if (this._selectTime) timeCheck.prop('checked', true);
|
||||
|
||||
var timeLabel = $('<label>').attr("for", facet_id + "-time").appendTo(timeDiv);
|
||||
$('<span>').text($.i18n('core-facets/time')+" ").addClass("facet-range-choice-label").appendTo(timeLabel);
|
||||
@ -227,13 +227,13 @@ TimeRangeFacet.prototype._renderOtherChoices = function() {
|
||||
self._selectNonTime = !self._selectNonTime;
|
||||
self._updateRest();
|
||||
});
|
||||
if (this._selectNonTime) nonTimeCheck.attr("checked","checked");
|
||||
if (this._selectNonTime) nonTimeCheck.prop('checked', true);
|
||||
|
||||
var nonTimeLabel = $('<label>').attr("for", facet_id + "-non-time").appendTo(nonTimeDiv);
|
||||
$('<span>').text($.i18n('core-facets/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");
|
||||
if (this._baseNonTimeCount === 0) nonTimeCheck.prop("checked", false);
|
||||
|
||||
// ----------------- blank -----------------
|
||||
|
||||
@ -242,13 +242,13 @@ TimeRangeFacet.prototype._renderOtherChoices = function() {
|
||||
self._selectBlank = !self._selectBlank;
|
||||
self._updateRest();
|
||||
});
|
||||
if (this._selectBlank) blankCheck.attr("checked","checked");
|
||||
if (this._selectBlank) blankCheck.prop('checked', true);
|
||||
|
||||
var blankLabel = $('<label>').attr("for", facet_id + "-blank").appendTo(blankDiv);
|
||||
$('<span>').text($.i18n('core-facets/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");
|
||||
if (this._baseBlankCount === 0) blankCheck.prop("checked", false);
|
||||
|
||||
// ----------------- error -----------------
|
||||
|
||||
@ -257,13 +257,13 @@ TimeRangeFacet.prototype._renderOtherChoices = function() {
|
||||
self._selectError = !self._selectError;
|
||||
self._updateRest();
|
||||
});
|
||||
if (this._selectError) errorCheck.attr("checked","checked");
|
||||
if (this._selectError) errorCheck.prop('checked', true);
|
||||
|
||||
var errorLabel = $('<label>').attr("for", facet_id + "-error").appendTo(errorDiv);
|
||||
$('<span>').text($.i18n('core-facets/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");
|
||||
if (this._baseErrorCount === 0) errorCheck.prop("checked", false);
|
||||
|
||||
// --------------------------
|
||||
|
||||
|
@ -76,7 +76,7 @@ Refine.DefaultImportingController.prototype.startImportJob = function(form, prog
|
||||
|
||||
$(form).find('input:text').filter(function() {
|
||||
return this.value === "";
|
||||
}).attr("disabled", "disabled");
|
||||
}).prop("disabled", true);
|
||||
|
||||
Refine.wrapCSRF(function(token) {
|
||||
$.post(
|
||||
|
@ -161,7 +161,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelFileTable =
|
||||
});
|
||||
if (fileRecord.selected) {
|
||||
// Initial selection determined on server side.
|
||||
checkbox.attr("checked", "checked");
|
||||
checkbox.prop('checked', true);
|
||||
self._selectedMap[fileRecord.location] = fileRecord;
|
||||
}
|
||||
|
||||
@ -186,12 +186,12 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
|
||||
var fileRecord = files[i];
|
||||
self._selectedMap[fileRecord.location] = fileRecord;
|
||||
}
|
||||
self._fileSelectionPanelElmts.filePanel.find("input").attr("checked", "checked");
|
||||
self._fileSelectionPanelElmts.filePanel.find("input").prop('checked', true);
|
||||
self._updateFileSelectionSummary();
|
||||
});
|
||||
this._fileSelectionPanelElmts.unselectAllButton.unbind().click(function(evt) {
|
||||
self._selectedMap = {};
|
||||
self._fileSelectionPanelElmts.filePanel.find("input").removeAttr("checked");
|
||||
self._fileSelectionPanelElmts.filePanel.find("input").prop('checked', false);
|
||||
self._updateFileSelectionSummary();
|
||||
});
|
||||
|
||||
@ -214,7 +214,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
|
||||
self._selectedMap[file.location] = file;
|
||||
self._fileSelectionPanelElmts.filePanel
|
||||
.find("input[index='" + i + "']")
|
||||
.attr("checked", "checked");
|
||||
.prop('checked', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -232,7 +232,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
|
||||
delete self._selectedMap[file.location];
|
||||
self._fileSelectionPanelElmts.filePanel
|
||||
.find("input[index='" + i + "']")
|
||||
.removeAttr("checked");
|
||||
.prop('checked', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -276,7 +276,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
|
||||
self._selectedMap[file.location] = file;
|
||||
self._fileSelectionPanelElmts.filePanel
|
||||
.find("input[index='" + i + "']")
|
||||
.attr("checked", "checked");
|
||||
.prop('checked', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -298,7 +298,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
|
||||
delete self._selectedMap[file.location];
|
||||
self._fileSelectionPanelElmts.filePanel
|
||||
.find("input[index='" + i + "']")
|
||||
.removeAttr("checked");
|
||||
.prop('checked', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ Refine.ImportProjectUI = function(elmt) {
|
||||
$('#or-import-locate').text($.i18n('core-index-import/locate'));
|
||||
$('#or-import-file').text($.i18n('core-index-import/file'));
|
||||
$('#or-import-rename').text($.i18n('core-index-import/rename'));
|
||||
$('#import-project-button').attr("value",$.i18n('core-buttons/import-proj'));
|
||||
$('#import-project-button').val($.i18n('core-buttons/import-proj'));
|
||||
};
|
||||
|
||||
Refine.actionAreas.push({
|
||||
|
@ -7,7 +7,7 @@ Refine.SetLanguageUI = function(elmt) {
|
||||
this._elmts = DOM.bind(elmt);
|
||||
|
||||
this._elmts.or_lang_label.text($.i18n('core-index-lang/label')+":");
|
||||
this._elmts.set_lan_btn.attr("value", $.i18n('core-index-lang/send-req'));
|
||||
this._elmts.set_lan_btn.val($.i18n('core-index-lang/send-req'));
|
||||
|
||||
|
||||
$.ajax({
|
||||
|
@ -150,9 +150,7 @@ Refine.ExcelParserUI.prototype._initialize = function() {
|
||||
.attr('class', 'core-excel-worksheet')
|
||||
.attr('index', i)
|
||||
.appendTo(td0);
|
||||
if (this.selected) {
|
||||
checkbox.prop('checked', true);
|
||||
}
|
||||
checkbox.prop('checked', this.selected);
|
||||
|
||||
$('<label>')
|
||||
.attr('for', id)
|
||||
|
@ -146,7 +146,7 @@ Refine.FixedWidthParserUI.prototype._initialize = function() {
|
||||
|
||||
|
||||
this._optionContainerElmts.encodingInput
|
||||
.attr('value', this._config.encoding || '')
|
||||
.val(this._config.encoding || '')
|
||||
.click(function() {
|
||||
Encoding.selectEncoding($(this), function() {
|
||||
self.updatePreview();
|
||||
@ -159,37 +159,37 @@ Refine.FixedWidthParserUI.prototype._initialize = function() {
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
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();
|
||||
}
|
||||
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();
|
||||
}
|
||||
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();
|
||||
}
|
||||
if (this._config.storeBlankRows) {
|
||||
this._optionContainerElmts.storeBlankRowsCheckbox.attr("checked", "checked");
|
||||
this._optionContainerElmts.storeBlankRowsCheckbox.prop('checked', true);
|
||||
}
|
||||
|
||||
if (this._config.guessCellValueTypes) {
|
||||
this._optionContainerElmts.guessCellValueTypesCheckbox.attr("checked", "checked");
|
||||
this._optionContainerElmts.guessCellValueTypesCheckbox.prop('checked', true);
|
||||
}
|
||||
|
||||
if (this._config.storeBlankCellsAsNulls) {
|
||||
this._optionContainerElmts.storeBlankCellsAsNullsCheckbox.attr("checked", "checked");
|
||||
this._optionContainerElmts.storeBlankCellsAsNullsCheckbox.prop('checked', true);
|
||||
}
|
||||
if (this._config.includeFileSources) {
|
||||
this._optionContainerElmts.includeFileSourcesCheckbox.attr("checked", "checked");
|
||||
this._optionContainerElmts.includeFileSourcesCheckbox.prop('checked', true);
|
||||
}
|
||||
if (this._config.includeArchiveFileName) {
|
||||
this._optionContainerElmts.includeArchiveFileCheckbox.attr("checked", "checked");
|
||||
this._optionContainerElmts.includeArchiveFileCheckbox.prop('checked', true);
|
||||
}
|
||||
|
||||
var onChange = function() {
|
||||
|
@ -125,10 +125,10 @@ Refine.JsonParserUI.prototype._initialize = function() {
|
||||
this._optionContainerElmts.limitInput[0].value = this._config.limit.toString();
|
||||
}
|
||||
if (this._config.trimStrings) {
|
||||
this._optionContainerElmts.trimStringsCheckbox.attr("checked", "unchecked");
|
||||
this._optionContainerElmts.trimStringsCheckbox.prop('checked', false);
|
||||
}
|
||||
if (this._config.guessCellValueTypes) {
|
||||
this._optionContainerElmts.guessCellValueTypesCheckbox.attr("checked", "unchecked");
|
||||
this._optionContainerElmts.guessCellValueTypesCheckbox.prop('checked', false);
|
||||
}
|
||||
if (this._config.storeEmptyStrings) {
|
||||
this._optionContainerElmts.storeEmptyStringsCheckbox.prop("checked", true);
|
||||
|
@ -129,7 +129,7 @@ Refine.LineBasedParserUI.prototype._initialize = function() {
|
||||
$('#or-import-rows2').text($.i18n('core-index-parser/rows-data'));
|
||||
|
||||
this._optionContainerElmts.encodingInput
|
||||
.attr('value', this._config.encoding || '')
|
||||
.val(this._config.encoding || '')
|
||||
.click(function() {
|
||||
Encoding.selectEncoding($(this), function() {
|
||||
self._updatePreview();
|
||||
|
@ -80,7 +80,7 @@ Refine.RdfTriplesParserUI.prototype._initialize = function() {
|
||||
$('#or-import-encoding').html($.i18n('core-index-import/char-encoding'));
|
||||
|
||||
this._optionContainerElmts.encodingInput
|
||||
.attr('value', this._config.encoding || '')
|
||||
.val(this._config.encoding || '')
|
||||
.click(function() {
|
||||
Encoding.selectEncoding($(this), function() {
|
||||
self._updatePreview();
|
||||
|
@ -168,7 +168,7 @@ Refine.SeparatorBasedParserUI.prototype._initialize = function() {
|
||||
$('#or-import-archive').html($.i18n('core-index-parser/store-archive'));
|
||||
|
||||
this._optionContainerElmts.encodingInput
|
||||
.attr('value', this._config.encoding || '')
|
||||
.val(this._config.encoding || '')
|
||||
.click(function() {
|
||||
Encoding.selectEncoding($(this), function() {
|
||||
self._updatePreview();
|
||||
@ -244,7 +244,7 @@ Refine.SeparatorBasedParserUI.prototype._initialize = function() {
|
||||
this._optionContainerElmts.includeArchiveFileCheckbox.prop("checked", true);
|
||||
}
|
||||
if (this._config.trimStrings) {
|
||||
this._optionContainerElmts.trimStringsCheckbox.attr("checked", "unchecked");
|
||||
this._optionContainerElmts.trimStringsCheckbox.prop('checked', false);
|
||||
}
|
||||
|
||||
var onChange = function() {
|
||||
|
@ -134,7 +134,7 @@ Refine.WikitextParserUI.prototype._initialize = function() {
|
||||
|
||||
/*
|
||||
this._optionContainerElmts.encodingInput
|
||||
.attr('value', this._config.encoding || '')
|
||||
.val(this._config.encoding || '')
|
||||
.click(function() {
|
||||
Encoding.selectEncoding($(this), function() {
|
||||
self._updatePreview();
|
||||
|
@ -132,11 +132,11 @@ ExporterManager.prepareExportRowsForm = function(format, includeEngine, ext) {
|
||||
|
||||
$('<input />')
|
||||
.attr("name", "project")
|
||||
.attr("value", theProject.id)
|
||||
.val(theProject.id)
|
||||
.appendTo(form);
|
||||
$('<input />')
|
||||
.attr("name", "format")
|
||||
.attr("value", format)
|
||||
.val(format)
|
||||
.appendTo(form);
|
||||
$('<input />')
|
||||
.attr("name", "quoteAll")
|
||||
@ -144,7 +144,7 @@ ExporterManager.prepareExportRowsForm = function(format, includeEngine, ext) {
|
||||
if (includeEngine) {
|
||||
$('<input />')
|
||||
.attr("name", "engine")
|
||||
.attr("value", JSON.stringify(ui.browsingEngine.getJSON()))
|
||||
.val(JSON.stringify(ui.browsingEngine.getJSON()))
|
||||
.appendTo(form);
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ ExporterManager.handlers.exportProjectToLocal = function() {
|
||||
.attr("target", "refine-export");
|
||||
$('<input />')
|
||||
.attr("name", "project")
|
||||
.attr("value", theProject.id)
|
||||
.val(theProject.id)
|
||||
.appendTo(form);
|
||||
|
||||
document.body.appendChild(form);
|
||||
|
@ -243,7 +243,7 @@ HistoryPanel.prototype._showExtractOperationsDialog = function(json) {
|
||||
json.entries[i].selected = true;
|
||||
}
|
||||
|
||||
frame.find('input[type="checkbox"]').attr("checked", "true");
|
||||
frame.find('input[type="checkbox"]').prop('checked', true);
|
||||
updateJson();
|
||||
});
|
||||
elmts.unselectAllButton.click(function() {
|
||||
@ -251,7 +251,7 @@ HistoryPanel.prototype._showExtractOperationsDialog = function(json) {
|
||||
json.entries[i].selected = false;
|
||||
}
|
||||
|
||||
frame.find('input[type="checkbox"]').removeAttr("checked");
|
||||
frame.find('input[type="checkbox"]').prop('checked', false);
|
||||
updateJson();
|
||||
});
|
||||
|
||||
|
@ -140,7 +140,7 @@ ReconStandardServicePanel.prototype._populatePanel = function() {
|
||||
|
||||
td0.width = "1%";
|
||||
var radio = $('<input type="radio" name="type-choice">')
|
||||
.attr("value", typeID)
|
||||
.val(typeID)
|
||||
.attr("typeName", typeName)
|
||||
.appendTo(td0)
|
||||
.click(function() {
|
||||
@ -148,7 +148,7 @@ ReconStandardServicePanel.prototype._populatePanel = function() {
|
||||
});
|
||||
|
||||
if (check) {
|
||||
radio.attr("checked", "true");
|
||||
radio.prop('checked', true);
|
||||
}
|
||||
|
||||
if (typeName == typeID) {
|
||||
@ -171,7 +171,7 @@ ReconStandardServicePanel.prototype._populatePanel = function() {
|
||||
|
||||
this._panel
|
||||
.find('input[name="type-choice"][value=""]')
|
||||
.attr("checked", "true");
|
||||
.prop('checked', true);
|
||||
|
||||
this._elmts.typeInput.focus();
|
||||
}
|
||||
@ -231,7 +231,7 @@ ReconStandardServicePanel.prototype._wireEvents = function() {
|
||||
input.bind("fb-select", function(e, data) {
|
||||
self._panel
|
||||
.find('input[name="type-choice"][value=""]')
|
||||
.attr("checked", "true");
|
||||
.prop('checked', true);
|
||||
|
||||
self._rewirePropertySuggests(data.id);
|
||||
});
|
||||
|
@ -1,6 +1,10 @@
|
||||
/*
|
||||
* Derived from Portfolio filterable.js by Joel Sutherland
|
||||
*
|
||||
* Copyright (C) 2009 Joel Sutherland.
|
||||
* Liscenced under the MIT liscense
|
||||
*
|
||||
* Modified for OpenRefine by Simone Povoscania
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
@ -22,7 +26,7 @@
|
||||
listElement.bind("filter", function( e, tagToShow ){
|
||||
if(settings.useTags){
|
||||
$(settings.tagSelector).removeClass(settings.selectedTagClass);
|
||||
$(settings.tagSelector + '[href=' + tagToShow + ']').addClass(settings.selectedTagClass);
|
||||
$(settings.tagSelector + '[href="' + tagToShow + '"]').addClass(settings.selectedTagClass);
|
||||
}
|
||||
$(this).trigger("filterMyList", [ tagToShow.substr(1) ]);
|
||||
});
|
||||
|
@ -411,7 +411,7 @@ DataTableCellUI.prototype._searchForMatch = function(suggestOptions) {
|
||||
suggestOptions2.query_param_name = "prefix";
|
||||
}
|
||||
elmts.input
|
||||
.attr("value", this._cell.v)
|
||||
.val(this._cell.v)
|
||||
.suggest(suggestOptions2)
|
||||
.bind("fb-select", function(e, data) {
|
||||
match = data;
|
||||
|
@ -266,7 +266,7 @@ DataTableColumnHeaderUI.prototype._showSortingCriterion = function(criterion, ha
|
||||
|
||||
elmts.valueTypeOptions
|
||||
.find("input[type='radio'][value='" + criterion.valueType + "']")
|
||||
.attr("checked", "checked");
|
||||
.prop('checked', true);
|
||||
|
||||
var setValueType = function(valueType) {
|
||||
var forward = elmts.directionForwardLabel;
|
||||
@ -292,12 +292,12 @@ DataTableColumnHeaderUI.prototype._showSortingCriterion = function(criterion, ha
|
||||
});
|
||||
|
||||
if (criterion.valueType == "string" && criterion.caseSensitive) {
|
||||
elmts.caseSensitiveCheckbox.attr("checked", "checked");
|
||||
elmts.caseSensitiveCheckbox.prop('checked', true);
|
||||
}
|
||||
|
||||
elmts.directionOptions
|
||||
.find("input[type='radio'][value='" + (criterion.reverse ? "reverse" : "forward") + "']")
|
||||
.attr("checked", "checked");
|
||||
.prop('checked', true);
|
||||
|
||||
if (hasOtherCriteria) {
|
||||
elmts.sortAloneContainer.show();
|
||||
|
@ -576,9 +576,9 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
||||
|
||||
for (var i = 0; i < columns.length; i++) {
|
||||
var column2 = columns[i];
|
||||
var option = $('<option>').attr("value", column2.name).text(column2.name).appendTo(elmts.fromColumnSelect);
|
||||
var option = $('<option>').val(column2.name).text(column2.name).appendTo(elmts.fromColumnSelect);
|
||||
if (column2.name == column.name) {
|
||||
option.attr("selected", "true");
|
||||
option.prop("selected", "true");
|
||||
}
|
||||
}
|
||||
|
||||
@ -597,12 +597,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
||||
|
||||
for (var k = j + 1; k < columns.length; k++) {
|
||||
var column2 = columns[k];
|
||||
$('<option>').attr("value", k - j + 1).text(column2.name).appendTo(elmts.toColumnSelect);
|
||||
$('<option>').val(k - j + 1).text(column2.name).appendTo(elmts.toColumnSelect);
|
||||
}
|
||||
|
||||
$('<option>')
|
||||
.attr("value", "-1")
|
||||
.attr("selected", "true")
|
||||
.val("-1")
|
||||
.prop("selected", "true")
|
||||
.text("(last column)")
|
||||
.appendTo(elmts.toColumnSelect);
|
||||
};
|
||||
@ -694,18 +694,18 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
||||
for (var i = 0; i < columns.length; i++) {
|
||||
var column2 = columns[i];
|
||||
|
||||
var keyOption = $('<option>').attr("value", column2.name).text(column2.name).appendTo(elmts.keyColumnSelect);
|
||||
var keyOption = $('<option>').val(column2.name).text(column2.name).appendTo(elmts.keyColumnSelect);
|
||||
if (column2.name == column.name) {
|
||||
keyOption.attr("selected", "true");
|
||||
keyOption.prop("selected", "true");
|
||||
valueColumnIndex = i + 1;
|
||||
}
|
||||
|
||||
var valueOption = $('<option>').attr("value", column2.name).text(column2.name).appendTo(elmts.valueColumnSelect);
|
||||
var valueOption = $('<option>').val(column2.name).text(column2.name).appendTo(elmts.valueColumnSelect);
|
||||
if (i === valueColumnIndex) {
|
||||
valueOption.attr("selected", "true");
|
||||
valueOption.prop("selected", "true");
|
||||
}
|
||||
|
||||
$('<option>').attr("value", column2.name).text(column2.name).appendTo(elmts.noteColumnSelect);
|
||||
$('<option>').val(column2.name).text(column2.name).appendTo(elmts.noteColumnSelect);
|
||||
}
|
||||
|
||||
var currentHeight = dialog.outerHeight();
|
||||
|
@ -149,7 +149,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
||||
var services = ReconciliationManager.getAllServices();
|
||||
for (var i = 0; i < services.length; i++) {
|
||||
var service = services[i];
|
||||
$('<option></option>').attr('value', service.url)
|
||||
$('<option></option>').val(service.url)
|
||||
.text(service.name)
|
||||
.appendTo(select);
|
||||
}
|
||||
@ -251,7 +251,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
||||
for (var i = 0; i < columns.length; i++) {
|
||||
var column2 = columns[i];
|
||||
if (column !== column2) {
|
||||
$('<option>').attr("value", column2.name).text(column2.name).appendTo(elmts.toColumnSelect);
|
||||
$('<option>').val(column2.name).text(column2.name).appendTo(elmts.toColumnSelect);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user