Skip to content

Commit 2c25b42

Browse files
committed
Fix jQuery Migrate warnings #44
1 parent 4658284 commit 2c25b42

File tree

4 files changed

+52
-52
lines changed

4 files changed

+52
-52
lines changed

src/main/resources/module/scripts/menu-bar-extensions.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ RdfExporterMenuBar.rdfExportRows = function(format, ext) {
5858

5959
$('<input />')
6060
.attr("name", "engine")
61-
.attr("value", JSON.stringify(ui.browsingEngine.getJSON()))
61+
.val(JSON.stringify(ui.browsingEngine.getJSON()))
6262
.appendTo(form);
6363
$('<input />')
6464
.attr("name", "project")
65-
.attr("value", theProject.id)
65+
.val(theProject.id)
6666
.appendTo(form);
6767
$('<input />')
6868
.attr("name", "format")
69-
.attr("value", format)
69+
.val(format)
7070
.appendTo(form);
7171

7272
document.body.appendChild(form);
@@ -151,7 +151,7 @@ function ReconciliationStanbolServiceDialog() {
151151
}
152152

153153
if (validateURI(uri)) {
154-
inputUri.attr("disabled", "disabled");
154+
inputUri.prop("disabled", "disabled");
155155
inputUri.after($('<img src="extension/rdf-extension/images/spinner.gif" width="14" height="14" alt="'+$.i18n('rdf-ext-menu/fetching')+'..." class="validation" id="validation-img" />'));
156156
Refine.wrapCSRF(function(token) {
157157
$.post("command/rdf-extension/addStanbolService",
@@ -233,21 +233,21 @@ function ReconciliationRdfServiceDialog(){
233233
this._elmts.rdfext_rdf_fullUri.text($.i18n('rdf-ext-rdf/full-uri'));
234234

235235
this._elmts.other_label_chk.click(function(){
236-
if($(this).attr("checked")){
236+
if($(this).prop("checked")){
237237
self._elmts.other_properties.show();
238238
} else {
239239
self._elmts.other_properties.hide();
240240
}
241241
});
242242

243243
this._elmts.file_source_upload.add(this._elmts.file_source_url).bind("click", function(){
244-
var upload = self._elmts.file_source_upload.attr("checked");
244+
var upload = self._elmts.file_source_upload.prop("checked");
245245
if(upload){
246-
self._elmts.file_upload_input.attr("disabled",false);
247-
self._elmts.file_url_input.attr("disabled",true);
246+
self._elmts.file_upload_input.prop("disabled", false);
247+
self._elmts.file_url_input.prop("disabled", true);
248248
} else {
249-
self._elmts.file_upload_input.attr("disabled",true);
250-
self._elmts.file_url_input.attr("disabled",false);
249+
self._elmts.file_upload_input.prop("disabled", true);
250+
self._elmts.file_url_input.prop("disabled", false);
251251
}
252252
});
253253

@@ -288,7 +288,7 @@ ReconciliationRdfServiceDialog.prototype._footer = function(footer){
288288
return;
289289
}
290290

291-
if (self._elmts.file_source_url.attr('checked')){
291+
if (self._elmts.file_source_url.prop('checked')){
292292
var file_url = self._elmts.file_url_input.val();
293293
var file_format = self._elmts.file_format_input.val();
294294
if(file_url.trim()===""){
@@ -361,7 +361,7 @@ function ReconciliationSparqlServiceDialog(){
361361
this._elmts.rdfext_sparql_fullUri.text($.i18n('rdf-ext-sparql/full-uri'));
362362

363363
this._elmts.other_label_chk.click(function(){
364-
if($(this).attr("checked")){
364+
if($(this).prop("checked")){
365365
self._elmts.other_properties.show();
366366
}else{
367367
self._elmts.other_properties.hide();

src/main/resources/module/scripts/rdf-data-table-view.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ RdfDataTableView.previewOnVisibleRows = function(isLiteral, column, title, expre
8080
});
8181

8282
uriPreviewWidget._elmts.expressionPreviewTextarea
83-
.attr("value", uriPreviewWidget.expression)
83+
.val(uriPreviewWidget.expression)
8484
.keyup(function(){
8585
uriPreviewWidget._scheduleUpdate();
8686
})

src/main/resources/module/scripts/rdf-schema-alignment-ui-node.js

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -369,17 +369,17 @@ RdfSchemaAlignmentDialog.UINode.prototype._showNodeConfigDialog = function(){
369369
var tr = tableColumns.insertRow(tableColumns.rows.length);
370370
var radio = $('<input />')
371371
.attr("type", "radio")
372-
.attr("value",column.name)
372+
.val(column.name)
373373
.attr("name", "rdf-column-radio")
374374
.appendTo(tr.insertCell(0))
375375
.bind("click",function(){
376-
$("#rdf-constant-value-input").attr("disabled","disabled");
376+
$("#rdf-constant-value-input").prop("disabled","disabled");
377377
})
378378
;
379379

380380
var td = tr.insertCell(1);
381381
if (column.name == self._node.columnName) {
382-
radio.attr("checked", "true");
382+
radio.prop("checked", "true");
383383
}
384384
$('<span></span>').text(column.name).appendTo(td);
385385
};
@@ -388,13 +388,13 @@ RdfSchemaAlignmentDialog.UINode.prototype._showNodeConfigDialog = function(){
388388
var tr = tableColumns.insertRow(tableColumns.rows.length);
389389
$('<input />')
390390
.attr("type", "radio")
391-
.attr("checked", checked)
392-
.attr("value","")
391+
.prop("checked", checked)
392+
.val("")
393393
.attr("name", "rdf-column-radio")
394394
.attr("id","rdf-row-index-column-radio")
395395
.appendTo(tr.insertCell(0))
396396
.bind("click",function(){
397-
$("#rdf-constant-value-input").attr("disabled","disabled");
397+
$("#rdf-constant-value-input").prop("disabled","disabled");
398398
})
399399
;
400400

@@ -407,13 +407,13 @@ RdfSchemaAlignmentDialog.UINode.prototype._showNodeConfigDialog = function(){
407407
var tr = tableColumns.insertRow(tableColumns.rows.length);
408408
$('<input />')
409409
.attr("type", "radio")
410-
.attr("checked", checked)
411-
.attr("value","")
410+
.prop("checked", checked)
411+
.val("")
412412
.attr("name", "rdf-column-radio")
413413
.attr("id","rdf-constant-value-radio")
414414
.appendTo(tr.insertCell(0))
415415
.bind("click",function(){
416-
$("#rdf-constant-value-input").removeAttr("disabled");
416+
$("#rdf-constant-value-input").prop("disabled", false);
417417
})
418418
;
419419

@@ -443,39 +443,39 @@ RdfSchemaAlignmentDialog.UINode.prototype._showNodeConfigDialog = function(){
443443

444444

445445
var initInputs = function(){
446-
elmts.rdf_content_lang_input.attr("disabled","disabled");
447-
elmts.rdf_content_type_input.attr("disabled","disabled");
446+
elmts.rdf_content_lang_input.prop("disabled","disabled");
447+
elmts.rdf_content_type_input.prop("disabled","disabled");
448448
//setContentOptions();
449449
if(self._node.nodeType==='resource' || self._node.nodeType==='cell-as-resource'){
450-
elmts.rdf_content_uri_radio.attr("checked",true);
450+
elmts.rdf_content_uri_radio.prop("checked", true);
451451
}else if(self._node.nodeType==='cell-as-literal' || self._node.nodeType==='literal'){
452452
if(self._node.lang){
453-
elmts.rdf_content_lang_radio.attr("checked",true);
454-
elmts.rdf_content_lang_input.removeAttr("disabled").val(self._node.lang);
453+
elmts.rdf_content_lang_radio.prop("checked", true);
454+
elmts.rdf_content_lang_input.prop("disabled", false).val(self._node.lang);
455455
}else{
456456
if(self._node.valueType){
457457
if(self._node.valueType==='http://www.w3.org/2001/XMLSchema#int'){
458-
elmts.rdf_content_int_radio.attr("checked",true);
458+
elmts.rdf_content_int_radio.prop("checked",true);
459459
}else if(self._node.valueType==='http://www.w3.org/2001/XMLSchema#double'){
460-
elmts.rdf_content_non_int_radio.attr("checked",true);
460+
elmts.rdf_content_non_int_radio.prop("checked",true);
461461
}else if(self._node.valueType==='http://www.w3.org/2001/XMLSchema#date'){
462-
elmts.rdf_content_date_radio.attr("checked",true);
462+
elmts.rdf_content_date_radio.prop("checked",true);
463463
}else if(self._node.valueType==='http://www.w3.org/2001/XMLSchema#dateTime'){
464-
elmts.rdf_content_date_time_radio.attr("checked",true);
464+
elmts.rdf_content_date_time_radio.prop("checked",true);
465465
}else if(self._node.valueType==='http://www.w3.org/2001/XMLSchema#boolean'){
466-
elmts.rdf_content_boolean_radio.attr("checked",true);
466+
elmts.rdf_content_boolean_radio.prop("checked",true);
467467
}
468468
else{
469-
elmts.rdf_content_type_radio.attr("checked",true);
470-
elmts.rdf_content_type_input.removeAttr("disabled").val(self._node.valueType);
469+
elmts.rdf_content_type_radio.prop("checked",true);
470+
elmts.rdf_content_type_input.prop("disabled", false).val(self._node.valueType);
471471
}
472472
}else{
473-
elmts.rdf_content_txt_radio.attr("checked",true);
473+
elmts.rdf_content_txt_radio.prop("checked",true);
474474
}
475475
}
476476
}else{
477477
//blank node
478-
elmts.rdf_content_blank_radio.attr("checked",true);
478+
elmts.rdf_content_blank_radio.prop("checked",true);
479479
}
480480

481481
//set cell expression
@@ -488,28 +488,28 @@ RdfSchemaAlignmentDialog.UINode.prototype._showNodeConfigDialog = function(){
488488

489489
//click events
490490
elmts.rdf_content_uri_radio.bind("click",function(){
491-
$('input.rdf-text-attributes-input').add("#rdf-content-type-input").attr("disabled","disabled");
491+
$('input.rdf-text-attributes-input').add("#rdf-content-type-input").prop("disabled","disabled");
492492
});
493493

494494
elmts.rdf_content_txt_radio.add(elmts.rdf_content_int_radio[0]).add(elmts.rdf_content_non_int_radio[0])
495495
.add(elmts.rdf_content_date_radio[0]).add(elmts.rdf_content_date_time_radio[0]).add(elmts.rdf_content_blank_radio[0])
496496
.bind("click",function(){
497-
$('#rdf-content-lang-input').add("#rdf-content-type-input").attr("disabled","disabled");
497+
$('#rdf-content-lang-input').add("#rdf-content-type-input").prop("disabled","disabled");
498498
});
499499

500500
elmts.rdf_content_lang_radio.bind("click",function(){
501-
$('#rdf-content-lang-input').removeAttr("disabled");
501+
$('#rdf-content-lang-input').prop("disabled", false);
502502
});
503503

504504
elmts.rdf_content_type_radio.bind("click",function(){
505-
$('#rdf-content-type-input').removeAttr("disabled");
505+
$('#rdf-content-type-input').prop("disabled", false);
506506
});
507507

508508
//edit/preview
509509
elmts.rdf_cell_expr_preview.bind("click",function(e){
510510
e.preventDefault();
511511
var nodeSubtype = $("input[name='rdf-content-radio']:checked")[0].value;
512-
if($("#rdf-constant-value-radio").attr('checked')){
512+
if($("#rdf-constant-value-radio").prop('checked')){
513513
//constant node
514514
var val = $('#rdf-constant-value-input').val();
515515
if(nodeSubtype === 'blank'){
@@ -546,28 +546,28 @@ RdfSchemaAlignmentDialog.UINode.prototype._showNodeConfigDialog = function(){
546546
*--------------------------------------------------
547547
*/
548548
var getResultJSON = function() {
549-
var nodeType = $("#rdf-constant-value-radio").attr('checked')?'':'cell-as-';
549+
var nodeType = $("#rdf-constant-value-radio").prop('checked')?'':'cell-as-';
550550
var nodeSubtype = $("input[name='rdf-content-radio']:checked")[0].value;
551551
var node = {
552552
nodeType: nodeType + nodeSubtype
553553
};
554554
if (nodeSubtype === "literal") {
555555
//get language
556-
if($('#rdf-content-lang-radio').attr('checked')){
556+
if($('#rdf-content-lang-radio').prop('checked')){
557557
node.lang = $('#rdf-content-lang-input').val();
558558
}else{
559559
//get value type
560-
if($('#rdf-content-int-radio').attr('checked')){
560+
if($('#rdf-content-int-radio').prop('checked')){
561561
node.valueType = 'http://www.w3.org/2001/XMLSchema#int';
562-
}else if($('#rdf-content-non-int-radio').attr('checked')){
562+
}else if($('#rdf-content-non-int-radio').prop('checked')){
563563
node.valueType = 'http://www.w3.org/2001/XMLSchema#double';
564-
}else if($('#rdf-content-date-radio').attr('checked')){
564+
}else if($('#rdf-content-date-radio').prop('checked')){
565565
node.valueType = 'http://www.w3.org/2001/XMLSchema#date';
566-
}else if($('#rdf-content-date-time-radio').attr('checked')){
566+
}else if($('#rdf-content-date-time-radio').prop('checked')){
567567
node.valueType = 'http://www.w3.org/2001/XMLSchema#dateTime';
568-
}else if($('#rdf-content-boolean-radio').attr('checked')){
568+
}else if($('#rdf-content-boolean-radio').prop('checked')){
569569
node.valueType = 'http://www.w3.org/2001/XMLSchema#boolean';
570-
}else if($('#rdf-content-type-radio').attr('checked')){
570+
}else if($('#rdf-content-type-radio').prop('checked')){
571571
//check custom datatype URI
572572
var val = $('#rdf-content-type-input').val();
573573
if(!val){

src/main/resources/module/scripts/rdf-schema-new-prefix-widget.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ NewPrefixWidget.prototype.show = function(msg,def_prefix, onDone){
4949
return;
5050
}
5151

52-
var force_import = (self._elmts.forceImport.attr('checked') !== undefined);
52+
var force_import = (self._elmts.forceImport.prop('checked') !== undefined);
5353
var dismissBusy;
5454

5555
if(fetchOption === 'file'){
@@ -119,7 +119,7 @@ NewPrefixWidget.prototype.show = function(msg,def_prefix, onDone){
119119
self._elmts.advancedButton.click(function() {
120120
self._elmts.fetching_options_table.show();
121121
$('#advanced_options_button').hide();
122-
$('#advanced_options_button').attr("disabled", "true");
122+
$('#advanced_options_button').prop("disabled", "true");
123123
});
124124

125125
self._elmts.fetching_options_table
@@ -128,7 +128,7 @@ NewPrefixWidget.prototype.show = function(msg,def_prefix, onDone){
128128
.click(
129129
function(){
130130
var upload = $(this).val()!=='file';
131-
self._elmts.fetching_options_table.find('.upload_file_inputs').attr('disabled',upload);
131+
self._elmts.fetching_options_table.find('.upload_file_inputs').prop('disabled',upload);
132132
}
133133
);
134134

0 commit comments

Comments
 (0)