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#initialDatabase').attr('placeholder', $.i18n('database-source/databaseNamePlaceholder'));
|
||||||
$('input#initialSchema').attr('placeholder', $.i18n('database-source/databaseSchemaPlaceholder'));
|
$('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) {
|
this._elmts.newConnectionButton.click(function(evt) {
|
||||||
self._resetDatabaseImportForm();
|
self._resetDatabaseImportForm();
|
||||||
@ -514,7 +514,7 @@ Refine.DatabaseSourceUI.prototype._resetDatabaseImportForm = function() {
|
|||||||
|
|
||||||
$( "#databaseHost" ).val(self._defaultDatabaseHost);
|
$( "#databaseHost" ).val(self._defaultDatabaseHost);
|
||||||
|
|
||||||
$('input#connectionName').attr('value', $.i18n('database-source/connectionNameDefaultValue'));
|
$('input#connectionName').val($.i18n('database-source/connectionNameDefaultValue'));
|
||||||
$( "select#databaseTypeSelect" ).val(self._defaultDatabaseType);
|
$( "select#databaseTypeSelect" ).val(self._defaultDatabaseType);
|
||||||
self._updateDatabaseType(self._defaultDatabaseType);
|
self._updateDatabaseType(self._defaultDatabaseType);
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ Refine.PCAxisParserUI.prototype._initialize = function() {
|
|||||||
this._optionContainerElmts.previewButton.click(function() { self._updatePreview(); });
|
this._optionContainerElmts.previewButton.click(function() { self._updatePreview(); });
|
||||||
|
|
||||||
this._optionContainerElmts.encodingInput
|
this._optionContainerElmts.encodingInput
|
||||||
.attr('value', this._config.encoding || '')
|
.val(this._config.encoding || '')
|
||||||
.click(function() {
|
.click(function() {
|
||||||
Encoding.selectEncoding($(this), function() {
|
Encoding.selectEncoding($(this), function() {
|
||||||
self._updatePreview();
|
self._updatePreview();
|
||||||
|
@ -437,15 +437,15 @@ SchemaAlignmentDialog._addNameDesc = function(item, json) {
|
|||||||
var type_container = $('<div></div>').addClass('wbs-namedesc-type').appendTo(namedesc);
|
var type_container = $('<div></div>').addClass('wbs-namedesc-type').appendTo(namedesc);
|
||||||
var type_input = $('<select></select>').appendTo(type_container);
|
var type_input = $('<select></select>').appendTo(type_container);
|
||||||
$('<option></option>')
|
$('<option></option>')
|
||||||
.attr('value', 'LABEL')
|
.val('LABEL')
|
||||||
.text($.i18n('wikidata-schema/label'))
|
.text($.i18n('wikidata-schema/label'))
|
||||||
.appendTo(type_input);
|
.appendTo(type_input);
|
||||||
$('<option></option>')
|
$('<option></option>')
|
||||||
.attr('value', 'DESCRIPTION')
|
.val('DESCRIPTION')
|
||||||
.text($.i18n('wikidata-schema/description'))
|
.text($.i18n('wikidata-schema/description'))
|
||||||
.appendTo(type_input);
|
.appendTo(type_input);
|
||||||
$('<option></option>')
|
$('<option></option>')
|
||||||
.attr('value', 'ALIAS')
|
.val('ALIAS')
|
||||||
.text($.i18n('wikidata-schema/alias'))
|
.text($.i18n('wikidata-schema/alias'))
|
||||||
.appendTo(type_input);
|
.appendTo(type_input);
|
||||||
type_input.val(term_type);
|
type_input.val(term_type);
|
||||||
@ -487,7 +487,7 @@ SchemaAlignmentDialog._nameDescToJSON = function (namedesc) {
|
|||||||
var term_type = namedesc.find('select').first().val();
|
var term_type = namedesc.find('select').first().val();
|
||||||
var type = term_type;
|
var type = term_type;
|
||||||
if (term_type !== 'ALIAS') {
|
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) {
|
if (!override) {
|
||||||
type = term_type + '_IF_NEW';
|
type = term_type + '_IF_NEW';
|
||||||
}
|
}
|
||||||
|
@ -54,15 +54,15 @@ WikibaseExporterMenuBar.exportTo = function(format) {
|
|||||||
.attr("target", "gridworks-export-"+format);
|
.attr("target", "gridworks-export-"+format);
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "engine")
|
.attr("name", "engine")
|
||||||
.attr("value", JSON.stringify(ui.browsingEngine.getJSON()))
|
.val(JSON.stringify(ui.browsingEngine.getJSON()))
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "project")
|
.attr("name", "project")
|
||||||
.attr("value", theProject.id)
|
.val(theProject.id)
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "format")
|
.attr("name", "format")
|
||||||
.attr("value", format)
|
.val(format)
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
|
|
||||||
document.body.appendChild(form);
|
document.body.appendChild(form);
|
||||||
|
@ -334,19 +334,12 @@ function init() {
|
|||||||
registerOperations();
|
registerOperations();
|
||||||
registerImporting();
|
registerImporting();
|
||||||
|
|
||||||
var RC = Packages.com.google.refine.model.recon.ReconConfig;
|
var commonModules = [
|
||||||
RC.registerReconConfig(module, "standard-service", Packages.com.google.refine.model.recon.StandardReconConfig);
|
"externals/jquery-1.12.4.js",
|
||||||
|
"externals/jquery-migrate-1.4.1.js",
|
||||||
ClientSideResourceManager.addPaths(
|
|
||||||
"index/scripts",
|
|
||||||
module,
|
|
||||||
[
|
|
||||||
|
|
||||||
"externals/jquery-1.11.1.js",
|
|
||||||
"externals/jquery-migrate-1.2.1.js",
|
|
||||||
"externals/js.cookie.js",
|
|
||||||
"externals/jquery-ui/jquery-ui-1.10.3.custom.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/CLDRPluralRuleParser.js",
|
||||||
"externals/jquery.i18n.js",
|
"externals/jquery.i18n.js",
|
||||||
@ -357,13 +350,21 @@ function init() {
|
|||||||
"externals/jquery.i18n.language.js",
|
"externals/jquery.i18n.language.js",
|
||||||
"externals/languages/fi.js",
|
"externals/languages/fi.js",
|
||||||
"externals/languages/ru.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/tablesorter/jquery.tablesorter.min.js",
|
||||||
"externals/moment-with-locales.min.js",
|
"externals/moment-with-locales.min.js",
|
||||||
"externals/select2/select2.min.js",
|
"externals/select2/select2.min.js",
|
||||||
"externals/jquery.lavalamp.min.js",
|
"externals/jquery.lavalamp.min.js",
|
||||||
|
|
||||||
|
|
||||||
"scripts/util/misc.js",
|
"scripts/util/misc.js",
|
||||||
"scripts/util/url.js",
|
"scripts/util/url.js",
|
||||||
"scripts/util/string.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/reconciliation/recon-manager.js", // so that reconciliation functions are available to importers
|
||||||
"scripts/index/edit-metadata-dialog.js"
|
"scripts/index/edit-metadata-dialog.js"
|
||||||
]
|
])
|
||||||
);
|
);
|
||||||
|
|
||||||
ClientSideResourceManager.addPaths(
|
ClientSideResourceManager.addPaths(
|
||||||
@ -436,23 +437,10 @@ function init() {
|
|||||||
ClientSideResourceManager.addPaths(
|
ClientSideResourceManager.addPaths(
|
||||||
"project/scripts",
|
"project/scripts",
|
||||||
module,
|
module,
|
||||||
[
|
commonModules.concat([
|
||||||
"externals/jquery-1.11.1.js",
|
"externals/suggest/suggest-4_3a.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",
|
|
||||||
"externals/date.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/project.js",
|
||||||
|
|
||||||
"scripts/util/misc.js",
|
"scripts/util/misc.js",
|
||||||
@ -481,6 +469,7 @@ function init() {
|
|||||||
"scripts/facets/list-facet.js",
|
"scripts/facets/list-facet.js",
|
||||||
"scripts/facets/range-facet.js",
|
"scripts/facets/range-facet.js",
|
||||||
"scripts/facets/timerange-facet.js",
|
"scripts/facets/timerange-facet.js",
|
||||||
|
"externals/imgareaselect/jquery.imgareaselect.js", // Used by scatterplot facet only
|
||||||
"scripts/facets/scatterplot-facet.js",
|
"scripts/facets/scatterplot-facet.js",
|
||||||
"scripts/facets/text-search-facet.js",
|
"scripts/facets/text-search-facet.js",
|
||||||
|
|
||||||
@ -506,7 +495,7 @@ function init() {
|
|||||||
"scripts/dialogs/sql-exporter-dialog.js",
|
"scripts/dialogs/sql-exporter-dialog.js",
|
||||||
"scripts/dialogs/expression-column-dialog.js",
|
"scripts/dialogs/expression-column-dialog.js",
|
||||||
"scripts/dialogs/http-headers-dialog.js",
|
"scripts/dialogs/http-headers-dialog.js",
|
||||||
]
|
])
|
||||||
);
|
);
|
||||||
|
|
||||||
ClientSideResourceManager.addPaths(
|
ClientSideResourceManager.addPaths(
|
||||||
@ -552,28 +541,9 @@ function init() {
|
|||||||
ClientSideResourceManager.addPaths(
|
ClientSideResourceManager.addPaths(
|
||||||
"preferences/scripts",
|
"preferences/scripts",
|
||||||
module,
|
module,
|
||||||
[
|
commonModules.concat([
|
||||||
"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",
|
|
||||||
"scripts/preferences.js",
|
"scripts/preferences.js",
|
||||||
]
|
])
|
||||||
);
|
);
|
||||||
ClientSideResourceManager.addPaths(
|
ClientSideResourceManager.addPaths(
|
||||||
"preferences/styles",
|
"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
|
* jQuery Migrate - v1.4.1 - 2016-05-19
|
||||||
* https://github.com/jquery/jquery-migrate
|
* Copyright jQuery Foundation and other contributors
|
||||||
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
|
|
||||||
*/
|
*/
|
||||||
(function( jQuery, window, undefined ) {
|
(function( jQuery, window, undefined ) {
|
||||||
// See http://bugs.jquery.com/ticket/13335
|
// See http://bugs.jquery.com/ticket/13335
|
||||||
// "use strict";
|
// "use strict";
|
||||||
|
|
||||||
|
|
||||||
|
jQuery.migrateVersion = "1.4.1";
|
||||||
|
|
||||||
|
|
||||||
var warnedAbout = {};
|
var warnedAbout = {};
|
||||||
|
|
||||||
// List of warnings already given; public read only
|
// List of warnings already given; public read only
|
||||||
@ -17,8 +19,10 @@ jQuery.migrateWarnings = [];
|
|||||||
// jQuery.migrateMute = false;
|
// jQuery.migrateMute = false;
|
||||||
|
|
||||||
// Show a message on the console so devs know we're active
|
// Show a message on the console so devs know we're active
|
||||||
if ( !jQuery.migrateMute && window.console && window.console.log ) {
|
if ( window.console && window.console.log ) {
|
||||||
window.console.log("JQMIGRATE: Logging is active");
|
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
|
// 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
|
// Warn only for attributes that can remain distinct from their properties post-1.9
|
||||||
if ( ruseDefault.test( lowerName ) ) {
|
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,
|
var matched, browser,
|
||||||
oldInit = jQuery.fn.init,
|
oldInit = jQuery.fn.init,
|
||||||
|
oldFind = jQuery.find,
|
||||||
oldParseJSON = jQuery.parseJSON,
|
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
|
// Note: XSS check is done below after string is trimmed
|
||||||
rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
|
rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
|
||||||
|
|
||||||
// $(html) "looks like html" rule change
|
// $(html) "looks like html" rule change
|
||||||
jQuery.fn.init = function( selector, context, rootjQuery ) {
|
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 ] ) {
|
(match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) {
|
||||||
|
|
||||||
// This is an HTML string according to the "old" rules; is it still?
|
// 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");
|
migrateWarn("$(html) HTML strings must start with '<' character");
|
||||||
}
|
}
|
||||||
if ( match[ 3 ] ) {
|
if ( match[ 3 ] ) {
|
||||||
migrateWarn("$(html) HTML text after last tag is ignored");
|
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.
|
// Note that this may break jQuery 1.6.x code that otherwise would work.
|
||||||
if ( match[ 0 ].charAt( 0 ) === "#" ) {
|
if ( match[ 0 ].charAt( 0 ) === "#" ) {
|
||||||
migrateWarn("HTML string cannot start with a '#' character");
|
migrateWarn("HTML string cannot start with a '#' character");
|
||||||
jQuery.error("JQMIGRATE: Invalid selector string (XSS)");
|
jQuery.error("JQMIGRATE: Invalid selector string (XSS)");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now process using loose rules; let pre-1.8 play too
|
// Now process using loose rules; let pre-1.8 play too
|
||||||
if ( context && context.context ) {
|
// Is this a jQuery context? parseHTML expects a DOM element (#178)
|
||||||
// jQuery object as context; parseHTML expects a DOM object
|
if ( context && context.context && context.context.nodeType ) {
|
||||||
context = context.context;
|
context = context.context;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( jQuery.parseHTML ) {
|
if ( jQuery.parseHTML ) {
|
||||||
return oldInit.call( this, jQuery.parseHTML( match[ 2 ], context, true ),
|
return oldInit.call( this,
|
||||||
context, rootjQuery );
|
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.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
|
// Let $.parseJSON(falsy_value) return null
|
||||||
jQuery.parseJSON = function( json ) {
|
jQuery.parseJSON = function( json ) {
|
||||||
if ( !json && json !== null ) {
|
if ( !json ) {
|
||||||
migrateWarn("jQuery.parseJSON requires a valid JSON string");
|
migrateWarn("jQuery.parseJSON requires a valid JSON string");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -274,6 +346,11 @@ if ( !jQuery.browser ) {
|
|||||||
// Warn if the code tries to get jQuery.browser
|
// Warn if the code tries to get jQuery.browser
|
||||||
migrateWarnProp( jQuery, "browser", jQuery.browser, "jQuery.browser is deprecated" );
|
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() {
|
jQuery.sub = function() {
|
||||||
function jQuerySub( selector, context ) {
|
function jQuerySub( selector, context ) {
|
||||||
return new jQuerySub.fn.init( selector, context );
|
return new jQuerySub.fn.init( selector, context );
|
||||||
@ -284,11 +361,10 @@ jQuery.sub = function() {
|
|||||||
jQuerySub.fn.constructor = jQuerySub;
|
jQuerySub.fn.constructor = jQuerySub;
|
||||||
jQuerySub.sub = this.sub;
|
jQuerySub.sub = this.sub;
|
||||||
jQuerySub.fn.init = function init( selector, context ) {
|
jQuerySub.fn.init = function init( selector, context ) {
|
||||||
if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
|
var instance = jQuery.fn.init.call( this, selector, context, rootjQuerySub );
|
||||||
context = jQuerySub( context );
|
return instance instanceof jQuerySub ?
|
||||||
}
|
instance :
|
||||||
|
jQuerySub( instance );
|
||||||
return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
|
|
||||||
};
|
};
|
||||||
jQuerySub.fn.init.prototype = jQuerySub.fn;
|
jQuerySub.fn.init.prototype = jQuerySub.fn;
|
||||||
var rootjQuerySub = jQuerySub(document);
|
var rootjQuerySub = jQuerySub(document);
|
||||||
@ -296,6 +372,57 @@ jQuery.sub = function() {
|
|||||||
return jQuerySub;
|
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
|
// Ensure that $.ajax gets the new parseJSON defined in core.js
|
||||||
jQuery.ajaxSetup({
|
jQuery.ajaxSetup({
|
||||||
@ -324,13 +451,7 @@ jQuery.fn.data = function( name ) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var rscriptType = /\/(java|ecma)script/i,
|
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 );
|
|
||||||
};
|
|
||||||
|
|
||||||
// Since jQuery.clean is used internally on older versions, we only shim if it's missing
|
// Since jQuery.clean is used internally on older versions, we only shim if it's missing
|
||||||
if ( !jQuery.clean ) {
|
if ( !jQuery.clean ) {
|
||||||
@ -388,6 +509,7 @@ var eventAdd = jQuery.event.add,
|
|||||||
oldToggle = jQuery.fn.toggle,
|
oldToggle = jQuery.fn.toggle,
|
||||||
oldLive = jQuery.fn.live,
|
oldLive = jQuery.fn.live,
|
||||||
oldDie = jQuery.fn.die,
|
oldDie = jQuery.fn.die,
|
||||||
|
oldLoad = jQuery.fn.load,
|
||||||
ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
|
ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
|
||||||
rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ),
|
rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ),
|
||||||
rhoverHack = /(?:^|\s)hover(\.\S+|)\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 );
|
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 );
|
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 ) {
|
if ( arguments.length ) {
|
||||||
return this.bind.apply( this, args );
|
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 );
|
this.triggerHandler.apply( this, args );
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
jQuery.fn.toggle = function( fn, fn2 ) {
|
jQuery.fn.toggle = function( fn, fn2 ) {
|
||||||
|
|
||||||
// Don't mess with animation or css toggles
|
// 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
|
// The document needs no shimming; must be !== for oldIE
|
||||||
if ( elem !== document ) {
|
if ( elem !== document ) {
|
||||||
jQuery.event.add( document, name + "." + jQuery.guid, function() {
|
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++ );
|
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 );
|
})( 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.
|
* Copyright 2012, Google Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -239,7 +241,7 @@
|
|||||||
.bind("focus.suggest", function(e) {
|
.bind("focus.suggest", function(e) {
|
||||||
self.focus(e);
|
self.focus(e);
|
||||||
})
|
})
|
||||||
.bind($.browser.msie ? "paste.suggest" : "input.suggest", function(e) {
|
.bind("paste.suggest input.suggest", function(e) {
|
||||||
clearTimeout(self.paste_timeout);
|
clearTimeout(self.paste_timeout);
|
||||||
self.paste_timeout = setTimeout(function() {
|
self.paste_timeout = setTimeout(function() {
|
||||||
self.textchange();
|
self.textchange();
|
||||||
@ -1361,7 +1363,7 @@
|
|||||||
// spell/correction
|
// spell/correction
|
||||||
var correction = response_data.correction;
|
var correction = response_data.correction;
|
||||||
if (correction && correction.length) {
|
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) {
|
.bind("click.suggest", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
@ -132,11 +132,11 @@ ClusteringDialog.prototype._createDialog = function() {
|
|||||||
label = keyers[i];
|
label = keyers[i];
|
||||||
}
|
}
|
||||||
var option = $('<option></option>')
|
var option = $('<option></option>')
|
||||||
.attr('value', keyers[i])
|
.val(keyers[i])
|
||||||
.text(label)
|
.text(label)
|
||||||
.appendTo(self._elmts.keyingFunctionSelector);
|
.appendTo(self._elmts.keyingFunctionSelector);
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
option.attr('selected', 'true');
|
option.prop('selected', 'true');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(i = 0; i < distances.length; i++) {
|
for(i = 0; i < distances.length; i++) {
|
||||||
@ -145,11 +145,11 @@ ClusteringDialog.prototype._createDialog = function() {
|
|||||||
label = distances[i];
|
label = distances[i];
|
||||||
}
|
}
|
||||||
var option = $('<option></option>')
|
var option = $('<option></option>')
|
||||||
.attr('value', distances[i])
|
.val(distances[i])
|
||||||
.text(label)
|
.text(label)
|
||||||
.appendTo(self._elmts.distanceFunctionSelector);
|
.appendTo(self._elmts.distanceFunctionSelector);
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
option.attr('selected', 'true');
|
option.prop('selected', 'true');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self._level = DialogSystem.showDialog(dialog);
|
self._level = DialogSystem.showDialog(dialog);
|
||||||
@ -269,11 +269,11 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
|
|||||||
}).appendTo(tr.insertCell(3));
|
}).appendTo(tr.insertCell(3));
|
||||||
|
|
||||||
if (cluster.edit) {
|
if (cluster.edit) {
|
||||||
editCheck.attr("checked", "true");
|
editCheck.prop('checked', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('<input type="text" size="25" />')
|
$('<input type="text" size="25" />')
|
||||||
.attr("value", cluster.value)
|
.val(cluster.value)
|
||||||
.bind("keyup change input",function() {
|
.bind("keyup change input",function() {
|
||||||
cluster.value = this.value;
|
cluster.value = this.value;
|
||||||
}).appendTo(tr.insertCell(4));
|
}).appendTo(tr.insertCell(4));
|
||||||
@ -367,11 +367,11 @@ ClusteringDialog.prototype._updateData = function(data) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ClusteringDialog.prototype._selectAll = function() {
|
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() {
|
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() {
|
ClusteringDialog.prototype._onApplyClose = function() {
|
||||||
|
@ -148,7 +148,7 @@ CustomTabularExporterDialog.prototype._createDialog = function(options) {
|
|||||||
|
|
||||||
$('<input>')
|
$('<input>')
|
||||||
.attr('type', 'checkbox')
|
.attr('type', 'checkbox')
|
||||||
.attr('checked', 'checked')
|
.prop('checked', true)
|
||||||
.appendTo(div);
|
.appendTo(div);
|
||||||
$('<span>')
|
$('<span>')
|
||||||
.text(name)
|
.text(name)
|
||||||
@ -187,10 +187,10 @@ CustomTabularExporterDialog.prototype._createDialog = function(options) {
|
|||||||
.attr('id', id)
|
.attr('id', id)
|
||||||
.attr('type', 'radio')
|
.attr('type', 'radio')
|
||||||
.attr('name', 'custom-tabular-exporter-upload-format')
|
.attr('name', 'custom-tabular-exporter-upload-format')
|
||||||
.attr('value', target.id)
|
.val(target.id)
|
||||||
.appendTo(td0);
|
.appendTo(td0);
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
input.attr('checked', 'checked');
|
input.prop('checked', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('<label>')
|
$('<label>')
|
||||||
@ -220,11 +220,11 @@ CustomTabularExporterDialog.prototype._createDialog = function(options) {
|
|||||||
self._updateOptionCode();
|
self._updateOptionCode();
|
||||||
});
|
});
|
||||||
this._elmts.selectAllButton.click(function() {
|
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();
|
self._updateOptionCode();
|
||||||
});
|
});
|
||||||
this._elmts.deselectAllButton.click(function() {
|
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();
|
self._updateOptionCode();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -251,23 +251,23 @@ CustomTabularExporterDialog.prototype._configureUIFromOptionCode = function(opti
|
|||||||
var escapeJavascriptString = function(s) {
|
var escapeJavascriptString = function(s) {
|
||||||
return JSON.stringify([s]).replace(/^\[\s*"/, '').replace(/"\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.separatorInput[0].value = escapeJavascriptString(options.separator || ',');
|
||||||
this._elmts.lineSeparatorInput[0].value = escapeJavascriptString(options.lineSeparator || '\n');
|
this._elmts.lineSeparatorInput[0].value = escapeJavascriptString(options.lineSeparator || '\n');
|
||||||
this._elmts.encodingInput[0].value = options.encoding;
|
this._elmts.encodingInput[0].value = options.encoding;
|
||||||
this._elmts.outputColumnHeadersCheckbox.attr('checked', (options.outputColumnHeaders) ? 'checked' : null);
|
this._elmts.outputColumnHeadersCheckbox.prop('checked', options.outputColumnHeaders);
|
||||||
this._elmts.outputEmptyRowsCheckbox.attr('checked', (options.outputBlankRows) ? 'checked' : null);
|
this._elmts.outputEmptyRowsCheckbox.prop('checked', options.outputBlankRows);
|
||||||
this._elmts.quoteAllCheckbox.attr('checked', (options.quoteAll) ? 'checked' : null);
|
this._elmts.quoteAllCheckbox.prop('checked', options.quoteAll);
|
||||||
|
|
||||||
if (options.columns !== null) {
|
if (options.columns !== null) {
|
||||||
var self = this;
|
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() {
|
$.each(options.columns, function() {
|
||||||
var name = this.name;
|
var name = this.name;
|
||||||
self._columnOptionMap[name] = this;
|
self._columnOptionMap[name] = this;
|
||||||
self._elmts.columnList.find('.custom-tabular-exporter-dialog-column').each(function() {
|
self._elmts.columnList.find('.custom-tabular-exporter-dialog-column').each(function() {
|
||||||
if (this.getAttribute('column') == name) {
|
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);
|
var form = ExporterManager.prepareExportRowsForm(format, !exportAllRowsCheckbox, ext);
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "options")
|
.attr("name", "options")
|
||||||
.attr("value", JSON.stringify(options))
|
.val(JSON.stringify(options))
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
if (encoding) {
|
if (encoding) {
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "encoding")
|
.attr("name", "encoding")
|
||||||
.attr("value", encoding)
|
.val(encoding)
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
}
|
}
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "preview")
|
.attr("name", "preview")
|
||||||
.attr("value", preview)
|
.val(preview)
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
|
|
||||||
document.body.appendChild(form);
|
document.body.appendChild(form);
|
||||||
@ -333,15 +333,15 @@ CustomTabularExporterDialog.prototype._selectColumn = function(columnName) {
|
|||||||
var columnOptions = this._columnOptionMap[columnName];
|
var columnOptions = this._columnOptionMap[columnName];
|
||||||
|
|
||||||
this._elmts.columnOptionPane.find('input[name="custom-tabular-exporter-recon"][value="' +
|
this._elmts.columnOptionPane.find('input[name="custom-tabular-exporter-recon"][value="' +
|
||||||
columnOptions.reconSettings.output + '"]').attr('checked', 'checked');
|
columnOptions.reconSettings.output + '"]').prop('checked', true);
|
||||||
this._elmts.reconBlankUnmatchedCheckbox.attr('checked', columnOptions.reconSettings.blankUnmatchedCells ? 'checked' : '');
|
this._elmts.reconBlankUnmatchedCheckbox.prop('checked', columnOptions.reconSettings.blankUnmatchedCells);
|
||||||
this._elmts.reconLinkCheckbox.attr('checked', columnOptions.reconSettings.linkToEntityPages ? 'checked' : '');
|
this._elmts.reconLinkCheckbox.prop('checked', columnOptions.reconSettings.linkToEntityPages);
|
||||||
|
|
||||||
this._elmts.columnOptionPane.find('input[name="custom-tabular-exporter-date"][value="' +
|
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.dateCustomInput.val(columnOptions.dateSettings.custom);
|
||||||
this._elmts.dateLocalTimeZoneCheckbox.attr('checked', columnOptions.dateSettings.useLocalTimeZone ? 'checked' : '');
|
this._elmts.dateLocalTimeZoneCheckbox.prop('checked', columnOptions.dateSettings.useLocalTimeZone);
|
||||||
this._elmts.omitTimeCheckbox.attr('checked', columnOptions.dateSettings.omitTime ? 'checked' : '');
|
this._elmts.omitTimeCheckbox.prop('checked', columnOptions.dateSettings.omitTime);
|
||||||
};
|
};
|
||||||
|
|
||||||
CustomTabularExporterDialog.prototype._updateCurrentColumnOptions = function() {
|
CustomTabularExporterDialog.prototype._updateCurrentColumnOptions = function() {
|
||||||
|
@ -51,7 +51,7 @@ ExpressionColumnDialog.prototype._createDialog = function() {
|
|||||||
|
|
||||||
$('<input>')
|
$('<input>')
|
||||||
.attr('type', 'checkbox')
|
.attr('type', 'checkbox')
|
||||||
.attr('checked', 'checked')
|
.prop('checked', true)
|
||||||
.appendTo(div);
|
.appendTo(div);
|
||||||
$('<span>')
|
$('<span>')
|
||||||
.text(name)
|
.text(name)
|
||||||
@ -69,10 +69,10 @@ ExpressionColumnDialog.prototype._createDialog = function() {
|
|||||||
$(this).addClass('selected');
|
$(this).addClass('selected');
|
||||||
});
|
});
|
||||||
this._elmts.selectAllButton.click(function() {
|
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() {
|
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(); });
|
this._elmts.okButton.click(function() { self._transform(); });
|
||||||
|
@ -127,7 +127,7 @@ ExpressionPreviewDialog.Widget = function(
|
|||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
this._elmts.expressionPreviewTextarea
|
this._elmts.expressionPreviewTextarea
|
||||||
.attr("value", this.expression)
|
.val(this.expression)
|
||||||
.bind("keyup change input",function(){
|
.bind("keyup change input",function(){
|
||||||
self._scheduleUpdate();
|
self._scheduleUpdate();
|
||||||
})
|
})
|
||||||
|
@ -348,12 +348,11 @@ ExtendReconciledDataPreviewDialog.prototype._constrainProperty = function(id) {
|
|||||||
var choice = field.choices[j];
|
var choice = field.choices[j];
|
||||||
var labelElem = $('<label></label>').attr('for', field.name+'_'+choice.value).appendTo(td);
|
var labelElem = $('<label></label>').attr('for', field.name+'_'+choice.value).appendTo(td);
|
||||||
var inputElem = $('<input type="radio" />').attr(
|
var inputElem = $('<input type="radio" />').attr(
|
||||||
'id', field.name+'_'+choice.value).attr(
|
'id', field.name+'_'+choice.value).val(choice.value).attr(
|
||||||
'value', choice.value).attr(
|
|
||||||
'name', field.name).appendTo(labelElem);
|
'name', field.name).appendTo(labelElem);
|
||||||
|
|
||||||
if (choice.value === currentValue) {
|
if (choice.value === currentValue) {
|
||||||
inputElem.attr('checked', 'checked');
|
inputElem.prop('checked', true);
|
||||||
}
|
}
|
||||||
labelElem.append(' '+choice.name);
|
labelElem.append(' '+choice.name);
|
||||||
td.append('<br/>');
|
td.append('<br/>');
|
||||||
@ -363,7 +362,7 @@ ExtendReconciledDataPreviewDialog.prototype._constrainProperty = function(id) {
|
|||||||
var label = $('<label></label>').attr('for', field.name).appendTo(td);
|
var label = $('<label></label>').attr('for', field.name).appendTo(td);
|
||||||
var input = $('<input type="checkbox" />').attr('name', field.name).appendTo(label);
|
var input = $('<input type="checkbox" />').attr('name', field.name).appendTo(label);
|
||||||
if (currentValue === 'on') {
|
if (currentValue === 'on') {
|
||||||
input.attr('checked','checked');
|
input.prop('checked', true);
|
||||||
}
|
}
|
||||||
label.append(' '+field.label);
|
label.append(' '+field.label);
|
||||||
} else if (field.type === 'number' || field.type == 'text') {
|
} else if (field.type === 'number' || field.type == 'text') {
|
||||||
@ -371,8 +370,7 @@ ExtendReconciledDataPreviewDialog.prototype._constrainProperty = function(id) {
|
|||||||
label.append(field.label+': ');
|
label.append(field.label+': ');
|
||||||
var input = $('<input />').attr(
|
var input = $('<input />').attr(
|
||||||
'name', field.name).attr(
|
'name', field.name).attr(
|
||||||
'type', field.type).attr(
|
'type', field.type).val(currentValue).appendTo(label);
|
||||||
'value', currentValue).appendTo(label);
|
|
||||||
}
|
}
|
||||||
if (tr.children().length > 0) {
|
if (tr.children().length > 0) {
|
||||||
table.append(tr);
|
table.append(tr);
|
||||||
|
@ -90,13 +90,13 @@ function SqlExporterDialog(options) {
|
|||||||
|
|
||||||
|
|
||||||
var sel = $('<select>').appendTo('body');
|
var sel = $('<select>').appendTo('body');
|
||||||
sel.append($("<option>").attr('value','VARCHAR').text('VARCHAR'));
|
sel.append($("<option>").val('VARCHAR').text('VARCHAR'));
|
||||||
sel.append($("<option>").attr('value','TEXT').text('TEXT'));
|
sel.append($("<option>").val('TEXT').text('TEXT'));
|
||||||
sel.append($("<option>").attr('value','INT').text('INT'));
|
sel.append($("<option>").val('INT').text('INT'));
|
||||||
sel.append($("<option>").attr('value','NUMERIC').text('NUMERIC'));
|
sel.append($("<option>").val('NUMERIC').text('NUMERIC'));
|
||||||
sel.append($("<option>").attr('value','CHAR').text('CHAR'));
|
sel.append($("<option>").val('CHAR').text('CHAR'));
|
||||||
sel.append($("<option>").attr('value','DATE').text('DATE'));
|
sel.append($("<option>").val('DATE').text('DATE'));
|
||||||
sel.append($("<option>").attr('value','TIMESTAMP').text('TIMESTAMP'));
|
sel.append($("<option>").val('TIMESTAMP').text('TIMESTAMP'));
|
||||||
|
|
||||||
sel.attr('id', selectBoxName);
|
sel.attr('id', selectBoxName);
|
||||||
sel.attr('rowIndex', i);
|
sel.attr('rowIndex', i);
|
||||||
@ -126,7 +126,7 @@ function SqlExporterDialog(options) {
|
|||||||
.appendTo(row);
|
.appendTo(row);
|
||||||
$('<input>')
|
$('<input>')
|
||||||
.attr('type', 'checkbox')
|
.attr('type', 'checkbox')
|
||||||
.attr('checked', 'checked')
|
.prop('checked', true)
|
||||||
.addClass("columnNameCheckboxStyle")
|
.addClass("columnNameCheckboxStyle")
|
||||||
.appendTo(columnCell);
|
.appendTo(columnCell);
|
||||||
$('<span>')
|
$('<span>')
|
||||||
@ -153,7 +153,7 @@ function SqlExporterDialog(options) {
|
|||||||
.appendTo(row);
|
.appendTo(row);
|
||||||
$('<input>')
|
$('<input>')
|
||||||
.attr('type', 'button')
|
.attr('type', 'button')
|
||||||
.attr('value', 'Apply All')
|
.val('Apply All')
|
||||||
.attr('id', applyAllBtnName)
|
.attr('id', applyAllBtnName)
|
||||||
.attr("rowIndex", i)
|
.attr("rowIndex", i)
|
||||||
.appendTo(applyAllCell);
|
.appendTo(applyAllCell);
|
||||||
@ -164,7 +164,7 @@ function SqlExporterDialog(options) {
|
|||||||
.appendTo(row);
|
.appendTo(row);
|
||||||
$('<input>')
|
$('<input>')
|
||||||
.attr('type', 'checkbox')
|
.attr('type', 'checkbox')
|
||||||
.attr('checked', 'checked')
|
.prop('checked', true)
|
||||||
.attr('id', allowNullChkBoxName)
|
.attr('id', allowNullChkBoxName)
|
||||||
.attr("rowIndex", i)
|
.attr("rowIndex", i)
|
||||||
.addClass("allowNullCheckboxStyle")
|
.addClass("allowNullCheckboxStyle")
|
||||||
@ -211,9 +211,8 @@ function SqlExporterDialog(options) {
|
|||||||
$('#' + allowNullChkBoxName).on('click', function() {
|
$('#' + allowNullChkBoxName).on('click', function() {
|
||||||
var rowIndex = this.getAttribute('rowIndex');
|
var rowIndex = this.getAttribute('rowIndex');
|
||||||
var id = this.getAttribute('id');
|
var id = this.getAttribute('id');
|
||||||
var checked = $(this).is(':checked');;
|
|
||||||
|
|
||||||
if(checked == false){
|
if(!this.checked){
|
||||||
$('#defaultValueTextBox'+ rowIndex).prop("disabled", false);
|
$('#defaultValueTextBox'+ rowIndex).prop("disabled", false);
|
||||||
}else{
|
}else{
|
||||||
$('#defaultValueTextBox'+ rowIndex).val("");
|
$('#defaultValueTextBox'+ rowIndex).val("");
|
||||||
@ -230,21 +229,20 @@ function SqlExporterDialog(options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._elmts.allowNullToggleCheckbox.click(function() {
|
this._elmts.allowNullToggleCheckbox.click(function() {
|
||||||
var checked = $(this).is(':checked');
|
if(this.checked){
|
||||||
if(checked == true){
|
|
||||||
$("input:checkbox[class=allowNullCheckboxStyle]").each(function () {
|
$("input:checkbox[class=allowNullCheckboxStyle]").each(function () {
|
||||||
$(this).attr('checked', true);
|
$(this).prop('checked', true);
|
||||||
});
|
});
|
||||||
$("input:text[class=defaultValueTextBoxStyle]").each(function () {
|
$("input:text[class=defaultValueTextBoxStyle]").each(function () {
|
||||||
$(this).attr('disabled', true);
|
$(this).prop('disabled', true);
|
||||||
});
|
});
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$("input:checkbox[class=allowNullCheckboxStyle]").each(function () {
|
$("input:checkbox[class=allowNullCheckboxStyle]").each(function () {
|
||||||
$(this).attr('checked', false);
|
$(this).prop('checked', false);
|
||||||
});
|
});
|
||||||
$("input:text[class=defaultValueTextBoxStyle]").each(function () {
|
$("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() {
|
this._elmts.selectAllButton.click(function() {
|
||||||
$("input:checkbox[class=columnNameCheckboxStyle]").each(function () {
|
$("input:checkbox[class=columnNameCheckboxStyle]").each(function () {
|
||||||
$(this).attr('checked', true);
|
$(this).prop('checked', true);
|
||||||
});
|
});
|
||||||
self._updateOptionCode();
|
self._updateOptionCode();
|
||||||
});
|
});
|
||||||
this._elmts.deselectAllButton.click(function() {
|
this._elmts.deselectAllButton.click(function() {
|
||||||
$("input:checkbox[class=columnNameCheckboxStyle]").each(function () {
|
$("input:checkbox[class=columnNameCheckboxStyle]").each(function () {
|
||||||
$(this).attr('checked', false);
|
$(this).prop('checked', false);
|
||||||
});
|
});
|
||||||
self._updateOptionCode();
|
self._updateOptionCode();
|
||||||
});
|
});
|
||||||
|
|
||||||
this._elmts.includeStructureCheckbox.click(function() {
|
this._elmts.includeStructureCheckbox.click(function() {
|
||||||
var checked = $(this).is(':checked');
|
$('#includeDropStatementCheckboxId').prop("disabled", !this.checked);
|
||||||
//alert('checked ' + checked);
|
$('#includeIfExistDropStatementCheckboxId').prop("disabled", !this.checked);
|
||||||
if(checked == true){
|
|
||||||
$('#includeDropStatementCheckboxId').removeAttr("disabled");
|
|
||||||
$('#includeIfExistDropStatementCheckboxId').removeAttr("disabled");
|
|
||||||
}else{
|
|
||||||
$('#includeDropStatementCheckboxId').attr("disabled", true);
|
|
||||||
$('#includeIfExistDropStatementCheckboxId').attr("disabled", true);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this._elmts.includeContentCheckbox.click(function() {
|
this._elmts.includeContentCheckbox.click(function() {
|
||||||
var checked = $(this).is(':checked');
|
$('#nullCellValueToEmptyStringCheckboxId').prop("disabled", !this.checked);
|
||||||
if(checked == true){
|
|
||||||
$('#nullCellValueToEmptyStringCheckboxId').removeAttr("disabled");
|
|
||||||
}else{
|
|
||||||
$('#nullCellValueToEmptyStringCheckboxId').attr("disabled", true);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -296,9 +281,9 @@ function SqlExporterDialog(options) {
|
|||||||
SqlExporterDialog.prototype._configureUIFromOptionCode = function(options) {
|
SqlExporterDialog.prototype._configureUIFromOptionCode = function(options) {
|
||||||
|
|
||||||
this._elmts.tableNameTextBox.val(theProject.metadata.name.replace(/\W/g, ' ').replace(/\s+/g, '_'));
|
this._elmts.tableNameTextBox.val(theProject.metadata.name.replace(/\W/g, ' ').replace(/\s+/g, '_'));
|
||||||
this._elmts.sqlExportOutputEmptyRowsCheckbox.attr('checked', 'checked');
|
this._elmts.sqlExportOutputEmptyRowsCheckbox.prop('checked', true);
|
||||||
this._elmts.sqlExportTrimAllColumnsCheckbox.attr('checked', 'checked');
|
this._elmts.sqlExportTrimAllColumnsCheckbox.prop('checked', true);
|
||||||
this._elmts.nullCellValueToEmptyStringLabel.attr('checked', 'checked');
|
this._elmts.nullCellValueToEmptyStringLabel.prop('checked', true);
|
||||||
|
|
||||||
$("input:text[class=defaultValueTextBoxStyle]").each(function () {
|
$("input:text[class=defaultValueTextBoxStyle]").each(function () {
|
||||||
$(this).prop("disabled", true);
|
$(this).prop("disabled", true);
|
||||||
@ -349,17 +334,17 @@ function SqlExporterDialog(options) {
|
|||||||
var form = self._prepareSqlExportRowsForm(format, !exportAllRowsCheckbox, "sql");
|
var form = self._prepareSqlExportRowsForm(format, !exportAllRowsCheckbox, "sql");
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "options")
|
.attr("name", "options")
|
||||||
.attr("value", JSON.stringify(options))
|
.val(JSON.stringify(options))
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
if (encoding) {
|
if (encoding) {
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "encoding")
|
.attr("name", "encoding")
|
||||||
.attr("value", encoding)
|
.val(encoding)
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
}
|
}
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "preview")
|
.attr("name", "preview")
|
||||||
.attr("value", preview)
|
.val(preview)
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
|
|
||||||
document.body.appendChild(form);
|
document.body.appendChild(form);
|
||||||
@ -383,16 +368,16 @@ function SqlExporterDialog(options) {
|
|||||||
|
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "project")
|
.attr("name", "project")
|
||||||
.attr("value", theProject.id)
|
.val(theProject.id)
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "format")
|
.attr("name", "format")
|
||||||
.attr("value", format)
|
.val(format)
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
if (includeEngine) {
|
if (includeEngine) {
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "engine")
|
.attr("name", "engine")
|
||||||
.attr("value", JSON.stringify(ui.browsingEngine.getJSON()))
|
.val(JSON.stringify(ui.browsingEngine.getJSON()))
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -465,7 +450,7 @@ function SqlExporterDialog(options) {
|
|||||||
// alert("typeSize::" + typeSize);
|
// alert("typeSize::" + typeSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
var allowNullChkBoxName = $('#allowNullChkBox' + rowIndex).is(':checked');
|
var allowNullChkBoxName = $('#allowNullChkBox' + rowIndex).prop('checked');
|
||||||
var defaultValueTextBoxName = $('#defaultValueTextBox' + rowIndex).val();
|
var defaultValueTextBoxName = $('#defaultValueTextBox' + rowIndex).val();
|
||||||
// alert("allowNullChkBoxName::" + allowNullChkBoxName);
|
// alert("allowNullChkBoxName::" + allowNullChkBoxName);
|
||||||
// alert("defaultValueTextBoxName::" + defaultValueTextBoxName);
|
// alert("defaultValueTextBoxName::" + defaultValueTextBoxName);
|
||||||
|
@ -154,7 +154,7 @@ TemplatingExporterDialog.prototype._export = function() {
|
|||||||
var appendField = function(name, value) {
|
var appendField = function(name, value) {
|
||||||
$('<textarea />')
|
$('<textarea />')
|
||||||
.attr("name", name)
|
.attr("name", name)
|
||||||
.attr("value", value)
|
.val(value)
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ RangeFacet.prototype._renderOtherChoices = function() {
|
|||||||
self._selectNumeric = !self._selectNumeric;
|
self._selectNumeric = !self._selectNumeric;
|
||||||
self._updateRest();
|
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);
|
var numericLabel = $('<label>').attr("for", facet_id + "-numeric").appendTo(numericDiv);
|
||||||
$('<span>').text($.i18n('core-facets/numeric')+" ").addClass("facet-range-choice-label").appendTo(numericLabel);
|
$('<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._selectNonNumeric = !self._selectNonNumeric;
|
||||||
self._updateRest();
|
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);
|
var nonNumericLabel = $('<label>').attr("for", facet_id + "-non-numeric").appendTo(nonNumericDiv);
|
||||||
$('<span>').text("Non-numeric ").addClass("facet-range-choice-label").appendTo(nonNumericLabel);
|
$('<span>').text("Non-numeric ").addClass("facet-range-choice-label").appendTo(nonNumericLabel);
|
||||||
$('<div>').text(this._nonNumericCount).addClass("facet-range-choice-count").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 -----------------
|
// ----------------- blank -----------------
|
||||||
|
|
||||||
@ -241,13 +241,13 @@ RangeFacet.prototype._renderOtherChoices = function() {
|
|||||||
self._selectBlank = !self._selectBlank;
|
self._selectBlank = !self._selectBlank;
|
||||||
self._updateRest();
|
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);
|
var blankLabel = $('<label>').attr("for", facet_id + "-blank").appendTo(blankDiv);
|
||||||
$('<span>').text("Blank ").addClass("facet-range-choice-label").appendTo(blankLabel);
|
$('<span>').text("Blank ").addClass("facet-range-choice-label").appendTo(blankLabel);
|
||||||
$('<div>').text(this._blankCount).addClass("facet-range-choice-count").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 -----------------
|
// ----------------- error -----------------
|
||||||
|
|
||||||
@ -256,13 +256,13 @@ RangeFacet.prototype._renderOtherChoices = function() {
|
|||||||
self._selectError = !self._selectError;
|
self._selectError = !self._selectError;
|
||||||
self._updateRest();
|
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);
|
var errorLabel = $('<label>').attr("for", facet_id + "-error").appendTo(errorDiv);
|
||||||
$('<span>').text("Error ").addClass("facet-range-choice-label").appendTo(errorLabel);
|
$('<span>').text("Error ").addClass("facet-range-choice-label").appendTo(errorLabel);
|
||||||
$('<div>').text(this._errorCount).addClass("facet-range-choice-count").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);
|
this._plotAreaSelector = this._elmts.plotImg.imgAreaSelect(ops);
|
||||||
|
|
||||||
if (this._config.dim_x == 'lin' && this._config.dim_y == 'lin') {
|
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') {
|
} 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') {
|
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') {
|
} 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 {
|
} 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) {
|
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) {
|
} 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 {
|
} 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() {
|
this._elmts.selectors.find(".scatterplot-dim-selector").change(function() {
|
||||||
|
@ -121,10 +121,10 @@ TextSearchFacet.prototype._initializeUI = function() {
|
|||||||
|
|
||||||
this._elmts.titleSpan.text(this._config.name);
|
this._elmts.titleSpan.text(this._config.name);
|
||||||
if (this._config.caseSensitive) {
|
if (this._config.caseSensitive) {
|
||||||
this._elmts.caseSensitiveCheckbox.attr("checked", "true");
|
this._elmts.caseSensitiveCheckbox.prop("checked", true);
|
||||||
}
|
}
|
||||||
if (this._config.mode === "regex") {
|
if (this._config.mode === "regex") {
|
||||||
this._elmts.regexCheckbox.attr("checked", "true");
|
this._elmts.regexCheckbox.prop('checked', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._elmts.removeButton.click(function() { self._remove(); });
|
this._elmts.removeButton.click(function() { self._remove(); });
|
||||||
|
@ -214,7 +214,7 @@ TimeRangeFacet.prototype._renderOtherChoices = function() {
|
|||||||
self._selectTime = !self._selectTime;
|
self._selectTime = !self._selectTime;
|
||||||
self._updateRest();
|
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);
|
var timeLabel = $('<label>').attr("for", facet_id + "-time").appendTo(timeDiv);
|
||||||
$('<span>').text($.i18n('core-facets/time')+" ").addClass("facet-range-choice-label").appendTo(timeLabel);
|
$('<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._selectNonTime = !self._selectNonTime;
|
||||||
self._updateRest();
|
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);
|
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);
|
$('<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);
|
$('<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 -----------------
|
// ----------------- blank -----------------
|
||||||
|
|
||||||
@ -242,13 +242,13 @@ TimeRangeFacet.prototype._renderOtherChoices = function() {
|
|||||||
self._selectBlank = !self._selectBlank;
|
self._selectBlank = !self._selectBlank;
|
||||||
self._updateRest();
|
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);
|
var blankLabel = $('<label>').attr("for", facet_id + "-blank").appendTo(blankDiv);
|
||||||
$('<span>').text($.i18n('core-facets/blank')+" ").addClass("facet-range-choice-label").appendTo(blankLabel);
|
$('<span>').text($.i18n('core-facets/blank')+" ").addClass("facet-range-choice-label").appendTo(blankLabel);
|
||||||
$('<div>').text(this._blankCount).addClass("facet-range-choice-count").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 -----------------
|
// ----------------- error -----------------
|
||||||
|
|
||||||
@ -257,13 +257,13 @@ TimeRangeFacet.prototype._renderOtherChoices = function() {
|
|||||||
self._selectError = !self._selectError;
|
self._selectError = !self._selectError;
|
||||||
self._updateRest();
|
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);
|
var errorLabel = $('<label>').attr("for", facet_id + "-error").appendTo(errorDiv);
|
||||||
$('<span>').text($.i18n('core-facets/error')+" ").addClass("facet-range-choice-label").appendTo(errorLabel);
|
$('<span>').text($.i18n('core-facets/error')+" ").addClass("facet-range-choice-label").appendTo(errorLabel);
|
||||||
$('<div>').text(this._errorCount).addClass("facet-range-choice-count").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() {
|
$(form).find('input:text').filter(function() {
|
||||||
return this.value === "";
|
return this.value === "";
|
||||||
}).attr("disabled", "disabled");
|
}).prop("disabled", true);
|
||||||
|
|
||||||
Refine.wrapCSRF(function(token) {
|
Refine.wrapCSRF(function(token) {
|
||||||
$.post(
|
$.post(
|
||||||
|
@ -161,7 +161,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelFileTable =
|
|||||||
});
|
});
|
||||||
if (fileRecord.selected) {
|
if (fileRecord.selected) {
|
||||||
// Initial selection determined on server side.
|
// Initial selection determined on server side.
|
||||||
checkbox.attr("checked", "checked");
|
checkbox.prop('checked', true);
|
||||||
self._selectedMap[fileRecord.location] = fileRecord;
|
self._selectedMap[fileRecord.location] = fileRecord;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,12 +186,12 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
|
|||||||
var fileRecord = files[i];
|
var fileRecord = files[i];
|
||||||
self._selectedMap[fileRecord.location] = fileRecord;
|
self._selectedMap[fileRecord.location] = fileRecord;
|
||||||
}
|
}
|
||||||
self._fileSelectionPanelElmts.filePanel.find("input").attr("checked", "checked");
|
self._fileSelectionPanelElmts.filePanel.find("input").prop('checked', true);
|
||||||
self._updateFileSelectionSummary();
|
self._updateFileSelectionSummary();
|
||||||
});
|
});
|
||||||
this._fileSelectionPanelElmts.unselectAllButton.unbind().click(function(evt) {
|
this._fileSelectionPanelElmts.unselectAllButton.unbind().click(function(evt) {
|
||||||
self._selectedMap = {};
|
self._selectedMap = {};
|
||||||
self._fileSelectionPanelElmts.filePanel.find("input").removeAttr("checked");
|
self._fileSelectionPanelElmts.filePanel.find("input").prop('checked', false);
|
||||||
self._updateFileSelectionSummary();
|
self._updateFileSelectionSummary();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
|
|||||||
self._selectedMap[file.location] = file;
|
self._selectedMap[file.location] = file;
|
||||||
self._fileSelectionPanelElmts.filePanel
|
self._fileSelectionPanelElmts.filePanel
|
||||||
.find("input[index='" + i + "']")
|
.find("input[index='" + i + "']")
|
||||||
.attr("checked", "checked");
|
.prop('checked', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -232,7 +232,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
|
|||||||
delete self._selectedMap[file.location];
|
delete self._selectedMap[file.location];
|
||||||
self._fileSelectionPanelElmts.filePanel
|
self._fileSelectionPanelElmts.filePanel
|
||||||
.find("input[index='" + i + "']")
|
.find("input[index='" + i + "']")
|
||||||
.removeAttr("checked");
|
.prop('checked', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
|
|||||||
self._selectedMap[file.location] = file;
|
self._selectedMap[file.location] = file;
|
||||||
self._fileSelectionPanelElmts.filePanel
|
self._fileSelectionPanelElmts.filePanel
|
||||||
.find("input[index='" + i + "']")
|
.find("input[index='" + i + "']")
|
||||||
.attr("checked", "checked");
|
.prop('checked', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -298,7 +298,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
|
|||||||
delete self._selectedMap[file.location];
|
delete self._selectedMap[file.location];
|
||||||
self._fileSelectionPanelElmts.filePanel
|
self._fileSelectionPanelElmts.filePanel
|
||||||
.find("input[index='" + i + "']")
|
.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-locate').text($.i18n('core-index-import/locate'));
|
||||||
$('#or-import-file').text($.i18n('core-index-import/file'));
|
$('#or-import-file').text($.i18n('core-index-import/file'));
|
||||||
$('#or-import-rename').text($.i18n('core-index-import/rename'));
|
$('#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({
|
Refine.actionAreas.push({
|
||||||
|
@ -7,7 +7,7 @@ Refine.SetLanguageUI = function(elmt) {
|
|||||||
this._elmts = DOM.bind(elmt);
|
this._elmts = DOM.bind(elmt);
|
||||||
|
|
||||||
this._elmts.or_lang_label.text($.i18n('core-index-lang/label')+":");
|
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({
|
$.ajax({
|
||||||
|
@ -150,9 +150,7 @@ Refine.ExcelParserUI.prototype._initialize = function() {
|
|||||||
.attr('class', 'core-excel-worksheet')
|
.attr('class', 'core-excel-worksheet')
|
||||||
.attr('index', i)
|
.attr('index', i)
|
||||||
.appendTo(td0);
|
.appendTo(td0);
|
||||||
if (this.selected) {
|
checkbox.prop('checked', this.selected);
|
||||||
checkbox.prop('checked', true);
|
|
||||||
}
|
|
||||||
|
|
||||||
$('<label>')
|
$('<label>')
|
||||||
.attr('for', id)
|
.attr('for', id)
|
||||||
|
@ -146,7 +146,7 @@ Refine.FixedWidthParserUI.prototype._initialize = function() {
|
|||||||
|
|
||||||
|
|
||||||
this._optionContainerElmts.encodingInput
|
this._optionContainerElmts.encodingInput
|
||||||
.attr('value', this._config.encoding || '')
|
.val(this._config.encoding || '')
|
||||||
.click(function() {
|
.click(function() {
|
||||||
Encoding.selectEncoding($(this), function() {
|
Encoding.selectEncoding($(this), function() {
|
||||||
self.updatePreview();
|
self.updatePreview();
|
||||||
@ -159,37 +159,37 @@ Refine.FixedWidthParserUI.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.guessCellValueTypes) {
|
if (this._config.guessCellValueTypes) {
|
||||||
this._optionContainerElmts.guessCellValueTypesCheckbox.attr("checked", "checked");
|
this._optionContainerElmts.guessCellValueTypesCheckbox.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);
|
||||||
}
|
}
|
||||||
if (this._config.includeArchiveFileName) {
|
if (this._config.includeArchiveFileName) {
|
||||||
this._optionContainerElmts.includeArchiveFileCheckbox.attr("checked", "checked");
|
this._optionContainerElmts.includeArchiveFileCheckbox.prop('checked', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
var onChange = function() {
|
var onChange = function() {
|
||||||
|
@ -125,10 +125,10 @@ Refine.JsonParserUI.prototype._initialize = function() {
|
|||||||
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.prop("checked", true);
|
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'));
|
$('#or-import-rows2').text($.i18n('core-index-parser/rows-data'));
|
||||||
|
|
||||||
this._optionContainerElmts.encodingInput
|
this._optionContainerElmts.encodingInput
|
||||||
.attr('value', this._config.encoding || '')
|
.val(this._config.encoding || '')
|
||||||
.click(function() {
|
.click(function() {
|
||||||
Encoding.selectEncoding($(this), function() {
|
Encoding.selectEncoding($(this), function() {
|
||||||
self._updatePreview();
|
self._updatePreview();
|
||||||
|
@ -80,7 +80,7 @@ Refine.RdfTriplesParserUI.prototype._initialize = function() {
|
|||||||
$('#or-import-encoding').html($.i18n('core-index-import/char-encoding'));
|
$('#or-import-encoding').html($.i18n('core-index-import/char-encoding'));
|
||||||
|
|
||||||
this._optionContainerElmts.encodingInput
|
this._optionContainerElmts.encodingInput
|
||||||
.attr('value', this._config.encoding || '')
|
.val(this._config.encoding || '')
|
||||||
.click(function() {
|
.click(function() {
|
||||||
Encoding.selectEncoding($(this), function() {
|
Encoding.selectEncoding($(this), function() {
|
||||||
self._updatePreview();
|
self._updatePreview();
|
||||||
|
@ -168,7 +168,7 @@ Refine.SeparatorBasedParserUI.prototype._initialize = function() {
|
|||||||
$('#or-import-archive').html($.i18n('core-index-parser/store-archive'));
|
$('#or-import-archive').html($.i18n('core-index-parser/store-archive'));
|
||||||
|
|
||||||
this._optionContainerElmts.encodingInput
|
this._optionContainerElmts.encodingInput
|
||||||
.attr('value', this._config.encoding || '')
|
.val(this._config.encoding || '')
|
||||||
.click(function() {
|
.click(function() {
|
||||||
Encoding.selectEncoding($(this), function() {
|
Encoding.selectEncoding($(this), function() {
|
||||||
self._updatePreview();
|
self._updatePreview();
|
||||||
@ -244,7 +244,7 @@ Refine.SeparatorBasedParserUI.prototype._initialize = function() {
|
|||||||
this._optionContainerElmts.includeArchiveFileCheckbox.prop("checked", true);
|
this._optionContainerElmts.includeArchiveFileCheckbox.prop("checked", true);
|
||||||
}
|
}
|
||||||
if (this._config.trimStrings) {
|
if (this._config.trimStrings) {
|
||||||
this._optionContainerElmts.trimStringsCheckbox.attr("checked", "unchecked");
|
this._optionContainerElmts.trimStringsCheckbox.prop('checked', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
var onChange = function() {
|
var onChange = function() {
|
||||||
|
@ -134,7 +134,7 @@ Refine.WikitextParserUI.prototype._initialize = function() {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
this._optionContainerElmts.encodingInput
|
this._optionContainerElmts.encodingInput
|
||||||
.attr('value', this._config.encoding || '')
|
.val(this._config.encoding || '')
|
||||||
.click(function() {
|
.click(function() {
|
||||||
Encoding.selectEncoding($(this), function() {
|
Encoding.selectEncoding($(this), function() {
|
||||||
self._updatePreview();
|
self._updatePreview();
|
||||||
|
@ -132,11 +132,11 @@ ExporterManager.prepareExportRowsForm = function(format, includeEngine, ext) {
|
|||||||
|
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "project")
|
.attr("name", "project")
|
||||||
.attr("value", theProject.id)
|
.val(theProject.id)
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "format")
|
.attr("name", "format")
|
||||||
.attr("value", format)
|
.val(format)
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "quoteAll")
|
.attr("name", "quoteAll")
|
||||||
@ -144,7 +144,7 @@ ExporterManager.prepareExportRowsForm = function(format, includeEngine, ext) {
|
|||||||
if (includeEngine) {
|
if (includeEngine) {
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "engine")
|
.attr("name", "engine")
|
||||||
.attr("value", JSON.stringify(ui.browsingEngine.getJSON()))
|
.val(JSON.stringify(ui.browsingEngine.getJSON()))
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ ExporterManager.handlers.exportProjectToLocal = function() {
|
|||||||
.attr("target", "refine-export");
|
.attr("target", "refine-export");
|
||||||
$('<input />')
|
$('<input />')
|
||||||
.attr("name", "project")
|
.attr("name", "project")
|
||||||
.attr("value", theProject.id)
|
.val(theProject.id)
|
||||||
.appendTo(form);
|
.appendTo(form);
|
||||||
|
|
||||||
document.body.appendChild(form);
|
document.body.appendChild(form);
|
||||||
|
@ -243,7 +243,7 @@ HistoryPanel.prototype._showExtractOperationsDialog = function(json) {
|
|||||||
json.entries[i].selected = true;
|
json.entries[i].selected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
frame.find('input[type="checkbox"]').attr("checked", "true");
|
frame.find('input[type="checkbox"]').prop('checked', true);
|
||||||
updateJson();
|
updateJson();
|
||||||
});
|
});
|
||||||
elmts.unselectAllButton.click(function() {
|
elmts.unselectAllButton.click(function() {
|
||||||
@ -251,7 +251,7 @@ HistoryPanel.prototype._showExtractOperationsDialog = function(json) {
|
|||||||
json.entries[i].selected = false;
|
json.entries[i].selected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
frame.find('input[type="checkbox"]').removeAttr("checked");
|
frame.find('input[type="checkbox"]').prop('checked', false);
|
||||||
updateJson();
|
updateJson();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ ReconStandardServicePanel.prototype._populatePanel = function() {
|
|||||||
|
|
||||||
td0.width = "1%";
|
td0.width = "1%";
|
||||||
var radio = $('<input type="radio" name="type-choice">')
|
var radio = $('<input type="radio" name="type-choice">')
|
||||||
.attr("value", typeID)
|
.val(typeID)
|
||||||
.attr("typeName", typeName)
|
.attr("typeName", typeName)
|
||||||
.appendTo(td0)
|
.appendTo(td0)
|
||||||
.click(function() {
|
.click(function() {
|
||||||
@ -148,7 +148,7 @@ ReconStandardServicePanel.prototype._populatePanel = function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (check) {
|
if (check) {
|
||||||
radio.attr("checked", "true");
|
radio.prop('checked', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeName == typeID) {
|
if (typeName == typeID) {
|
||||||
@ -171,7 +171,7 @@ ReconStandardServicePanel.prototype._populatePanel = function() {
|
|||||||
|
|
||||||
this._panel
|
this._panel
|
||||||
.find('input[name="type-choice"][value=""]')
|
.find('input[name="type-choice"][value=""]')
|
||||||
.attr("checked", "true");
|
.prop('checked', true);
|
||||||
|
|
||||||
this._elmts.typeInput.focus();
|
this._elmts.typeInput.focus();
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ ReconStandardServicePanel.prototype._wireEvents = function() {
|
|||||||
input.bind("fb-select", function(e, data) {
|
input.bind("fb-select", function(e, data) {
|
||||||
self._panel
|
self._panel
|
||||||
.find('input[name="type-choice"][value=""]')
|
.find('input[name="type-choice"][value=""]')
|
||||||
.attr("checked", "true");
|
.prop('checked', true);
|
||||||
|
|
||||||
self._rewirePropertySuggests(data.id);
|
self._rewirePropertySuggests(data.id);
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
|
* Derived from Portfolio filterable.js by Joel Sutherland
|
||||||
|
*
|
||||||
* Copyright (C) 2009 Joel Sutherland.
|
* Copyright (C) 2009 Joel Sutherland.
|
||||||
* Liscenced under the MIT liscense
|
* Liscenced under the MIT liscense
|
||||||
|
*
|
||||||
|
* Modified for OpenRefine by Simone Povoscania
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
@ -22,7 +26,7 @@
|
|||||||
listElement.bind("filter", function( e, tagToShow ){
|
listElement.bind("filter", function( e, tagToShow ){
|
||||||
if(settings.useTags){
|
if(settings.useTags){
|
||||||
$(settings.tagSelector).removeClass(settings.selectedTagClass);
|
$(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) ]);
|
$(this).trigger("filterMyList", [ tagToShow.substr(1) ]);
|
||||||
});
|
});
|
||||||
|
@ -411,7 +411,7 @@ DataTableCellUI.prototype._searchForMatch = function(suggestOptions) {
|
|||||||
suggestOptions2.query_param_name = "prefix";
|
suggestOptions2.query_param_name = "prefix";
|
||||||
}
|
}
|
||||||
elmts.input
|
elmts.input
|
||||||
.attr("value", this._cell.v)
|
.val(this._cell.v)
|
||||||
.suggest(suggestOptions2)
|
.suggest(suggestOptions2)
|
||||||
.bind("fb-select", function(e, data) {
|
.bind("fb-select", function(e, data) {
|
||||||
match = data;
|
match = data;
|
||||||
|
@ -266,7 +266,7 @@ DataTableColumnHeaderUI.prototype._showSortingCriterion = function(criterion, ha
|
|||||||
|
|
||||||
elmts.valueTypeOptions
|
elmts.valueTypeOptions
|
||||||
.find("input[type='radio'][value='" + criterion.valueType + "']")
|
.find("input[type='radio'][value='" + criterion.valueType + "']")
|
||||||
.attr("checked", "checked");
|
.prop('checked', true);
|
||||||
|
|
||||||
var setValueType = function(valueType) {
|
var setValueType = function(valueType) {
|
||||||
var forward = elmts.directionForwardLabel;
|
var forward = elmts.directionForwardLabel;
|
||||||
@ -292,12 +292,12 @@ DataTableColumnHeaderUI.prototype._showSortingCriterion = function(criterion, ha
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (criterion.valueType == "string" && criterion.caseSensitive) {
|
if (criterion.valueType == "string" && criterion.caseSensitive) {
|
||||||
elmts.caseSensitiveCheckbox.attr("checked", "checked");
|
elmts.caseSensitiveCheckbox.prop('checked', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
elmts.directionOptions
|
elmts.directionOptions
|
||||||
.find("input[type='radio'][value='" + (criterion.reverse ? "reverse" : "forward") + "']")
|
.find("input[type='radio'][value='" + (criterion.reverse ? "reverse" : "forward") + "']")
|
||||||
.attr("checked", "checked");
|
.prop('checked', true);
|
||||||
|
|
||||||
if (hasOtherCriteria) {
|
if (hasOtherCriteria) {
|
||||||
elmts.sortAloneContainer.show();
|
elmts.sortAloneContainer.show();
|
||||||
|
@ -576,9 +576,9 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
|||||||
|
|
||||||
for (var i = 0; i < columns.length; i++) {
|
for (var i = 0; i < columns.length; i++) {
|
||||||
var column2 = columns[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) {
|
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++) {
|
for (var k = j + 1; k < columns.length; k++) {
|
||||||
var column2 = columns[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>')
|
$('<option>')
|
||||||
.attr("value", "-1")
|
.val("-1")
|
||||||
.attr("selected", "true")
|
.prop("selected", "true")
|
||||||
.text("(last column)")
|
.text("(last column)")
|
||||||
.appendTo(elmts.toColumnSelect);
|
.appendTo(elmts.toColumnSelect);
|
||||||
};
|
};
|
||||||
@ -694,18 +694,18 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
|||||||
for (var i = 0; i < columns.length; i++) {
|
for (var i = 0; i < columns.length; i++) {
|
||||||
var column2 = columns[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) {
|
if (column2.name == column.name) {
|
||||||
keyOption.attr("selected", "true");
|
keyOption.prop("selected", "true");
|
||||||
valueColumnIndex = i + 1;
|
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) {
|
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();
|
var currentHeight = dialog.outerHeight();
|
||||||
|
@ -149,7 +149,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
|||||||
var services = ReconciliationManager.getAllServices();
|
var services = ReconciliationManager.getAllServices();
|
||||||
for (var i = 0; i < services.length; i++) {
|
for (var i = 0; i < services.length; i++) {
|
||||||
var service = services[i];
|
var service = services[i];
|
||||||
$('<option></option>').attr('value', service.url)
|
$('<option></option>').val(service.url)
|
||||||
.text(service.name)
|
.text(service.name)
|
||||||
.appendTo(select);
|
.appendTo(select);
|
||||||
}
|
}
|
||||||
@ -251,7 +251,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
|||||||
for (var i = 0; i < columns.length; i++) {
|
for (var i = 0; i < columns.length; i++) {
|
||||||
var column2 = columns[i];
|
var column2 = columns[i];
|
||||||
if (column !== column2) {
|
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