diff --git a/resources/www/prod/js/jquery.Selection.js b/resources/www/prod/js/jquery.Selection.js
index c07bfd6e70..74afcc2a05 100644
--- a/resources/www/prod/js/jquery.Selection.js
+++ b/resources/www/prod/js/jquery.Selection.js
@@ -35,10 +35,8 @@
this.$container.data('selectionnable', this);
this.$container.addClass('selectionnable');
-
- jQuery(this.options.selector, this.$container)
- .on('click', function (event) {
-
+ this.$container
+ .on('click', this.options.selector, function(event) {
if (typeof $this.options.selectStart === 'function') {
$this.options.selectStart(jQuery.extend(jQuery.Event('selectStart'), event), $this);
}
diff --git a/resources/www/prod/js/jquery.main-prod.js b/resources/www/prod/js/jquery.main-prod.js
index f97f5ac092..caa679efa7 100644
--- a/resources/www/prod/js/jquery.main-prod.js
+++ b/resources/www/prod/js/jquery.main-prod.js
@@ -207,7 +207,7 @@ function checkFilters(save) {
var nbSelectedColls = 0;
$this.find('.checkbas').each(function (idx, el) {
nbCols++;
- if($(this).attr("checked")) {
+ if($(this).prop('checked')) {
nbSelectedColls++;
nbTotalSelectedColls++;
search.bases[sbas_id].push($(this).val());
@@ -2780,8 +2780,7 @@ function deploy(deployer, todeploy_selector)
}
function clksbas(el, sbas_id) {
- var bool = $(el).attr('checked');
-
+ var bool = $(el).prop('checked');
$.each($('.sbascont_' + sbas_id + ' :checkbox'), function () {
this.checked = bool;
});
@@ -3055,16 +3054,16 @@ function set_up_feed_box(data) {
data: $form.serializeArray(),
dataType: 'json',
beforeSend: function () {
- $('button', dialog.getDomElement()).attr('disabled', 'disabled');
+ $('button', dialog.getDomElement()).prop('disabled', true);
},
error: function () {
- $('button', dialog.getDomElement()).removeAttr('disabled');
+ $('button', dialog.getDomElement()).prop('disabled', false);
},
timeout: function () {
- $('button', dialog.getDomElement()).removeAttr('disabled');
+ $('button', dialog.getDomElement()).prop('disabled', false);
},
success: function (data) {
- $('button', dialog.getDomElement()).removeAttr('disabled');
+ $('button', dialog.getDomElement()).prop('disabled', false);
if (data.error === true) {
alert(data.message);
return;
diff --git a/resources/www/prod/js/record.editor.js b/resources/www/prod/js/record.editor.js
index 42a88ebab7..0908ba0fa6 100644
--- a/resources/www/prod/js/record.editor.js
+++ b/resources/www/prod/js/record.editor.js
@@ -1300,16 +1300,16 @@ function replace() {
var where = $("[name=EditSR_Where]:checked", p4.edit.editBox).val();
var commut = "";
- var rgxp = $("#EditSROptionRX", p4.edit.editBox).attr('checked') ? true : false;
+ var rgxp = $("#EditSROptionRX", p4.edit.editBox).prop('checked') ? true : false;
var r_search;
if (rgxp) {
r_search = search;
- commut = ($("#EditSR_RXG", p4.edit.editBox).attr('checked') ? "g" : "")
- + ($("#EditSR_RXI", p4.edit.editBox).attr('checked') ? "i" : "");
+ commut = ($("#EditSR_RXG", p4.edit.editBox).prop('checked') ? "g" : "")
+ + ($("#EditSR_RXI", p4.edit.editBox).prop('checked') ? "i" : "");
}
else {
- commut = $("#EditSR_case", p4.edit.editBox).attr('checked') ? "g" : "gi";
+ commut = $("#EditSR_case", p4.edit.editBox).prop('checked') ? "g" : "gi";
r_search = "";
for (i = 0; i < search.length; i++) {
var c = search.charAt(i);
diff --git a/resources/www/report/js/report.js b/resources/www/report/js/report.js
index ffa7c102d0..036708ce84 100644
--- a/resources/www/report/js/report.js
+++ b/resources/www/report/js/report.js
@@ -44,14 +44,21 @@ $(document).ready(function () {
$("ul.multiselect .coll-checkbox", $(this).closest('.form2')).attr("checked", false);
});
- $(".multiselect-group").toggle(function () {
- var $this = $(this);
- var groupId = $this.data('group-id');
- $(".checkbox-" + groupId, $this.closest('.form2')).attr("checked", true);
- }, function () {
- var $this = $(this);
- var groupId = $this.data('group-id');
- $(".checkbox-" + groupId, $this.closest('.form2')).attr("checked", false);
+ // toggle is deprecated:
+ var hasMultiSelectionGroup = false;
+ $(".multiselect-group").on('click', function () {
+
+ if( hasMultiSelectionGroup === true) {
+ var $this = $(this);
+ var groupId = $this.data('group-id');
+ $(".checkbox-" + groupId, $this.closest('.form2')).attr("checked", false);
+ hasMultiSelectionGroup = false;
+ } else {
+ var $this = $(this);
+ var groupId = $this.data('group-id');
+ $(".checkbox-" + groupId, $this.closest('.form2')).attr("checked", true);
+ hasMultiSelectionGroup = true;
+ }
});
});
//#############END DOCUMENT READY ######################################//
diff --git a/templates/web/admin/collection/collection.html.twig b/templates/web/admin/collection/collection.html.twig
index 19d7c3c4c5..0bab14c038 100644
--- a/templates/web/admin/collection/collection.html.twig
+++ b/templates/web/admin/collection/collection.html.twig
@@ -302,7 +302,7 @@
url: form.attr('action'),
data: form.serializeArray(),
beforeSend : function() {
- submitLink.attr('disabled', true).addClass('disabled');
+ submitLink.prop('disabled', true).addClass('disabled');
},
success: function(datas) {
if(datas.success) {
@@ -320,7 +320,7 @@
}
},
complete: function() {
- submitLink.attr('disabled', false).removeClass('disabled');
+ submitLink.prop('disabled', false).removeClass('disabled');
}
});
}
diff --git a/templates/web/admin/collection/reorder.html.twig b/templates/web/admin/collection/reorder.html.twig
index bf5f0feb08..083ecf71f0 100644
--- a/templates/web/admin/collection/reorder.html.twig
+++ b/templates/web/admin/collection/reorder.html.twig
@@ -83,7 +83,7 @@
data: {order: order},
url: '{{ path('admin_database_submit_collections_order', {'databox_id': app['request'].attributes.get('databox_id')}) }}',
beforeSend : function() {
- $this.attr('disabled', true);
+ $this.prop('disabled',true)
},
success : function(datas) {
var html = _.template($("#alert_"+ (datas.success ? "success" : "error") +"_tpl").html(), {
@@ -92,7 +92,7 @@
$('#notification').html(html);
},
complete : function() {
- $this.attr('disabled', false);
+ $this.prop('disabled',false)
}
});
});
@@ -118,15 +118,15 @@
var selectedIndex = select.prop("selectedIndex");
if(selectedIndex !== -1 ) {
if (selectedIndex === 0) {
- upButton.attr('disabled', true);
+ upButton.prop('disabled', true)
} else {
- upButton.attr('disabled', false);
+ upButton.prop('disabled', false)
}
if (selectedIndex + 1 === select.find('option').length) {
- downButton.attr('disabled', true);
+ downButton.prop('disabled', true)
} else {
- downButton.attr('disabled', false);
+ downButton.prop('disabled', false)
}
}
}
diff --git a/templates/web/admin/collection/suggested_value.html.twig b/templates/web/admin/collection/suggested_value.html.twig
index e68390f657..509d4ca08f 100644
--- a/templates/web/admin/collection/suggested_value.html.twig
+++ b/templates/web/admin/collection/suggested_value.html.twig
@@ -768,9 +768,9 @@ function activer_bout(idBout,val)
if( o.length > 0 ) {
if (!val) {
- o.attr("disabled", true);
+ o.prop('disabled', true);
} else {
- o.removeAttr("disabled");
+ o.prop('disabled', false);
}
}
}
diff --git a/templates/web/admin/databox/databox.html.twig b/templates/web/admin/databox/databox.html.twig
index e1c677210d..43ed6b8b0d 100644
--- a/templates/web/admin/databox/databox.html.twig
+++ b/templates/web/admin/databox/databox.html.twig
@@ -313,7 +313,7 @@
$('#is_indexable').bind('change', function(){
var form = $(this).closest('form');
- var checked = !!$(this).attr('checked');
+ var checked = !!$(this).prop('checked');
$.ajax({
dataType: 'json',
@@ -366,7 +366,7 @@
url: form.attr('action'),
data: form.serializeArray(),
before : function() {
- submitLink.attr('disabled', true).addClass('disabled');
+ submitLink.prop('disabled', true).addClass('disabled');
},
success: function(datas) {
if(datas.success) {
@@ -380,7 +380,7 @@
}
},
complete: function() {
- submitLink.attr('disabled', false).removeClass('disabled');
+ submitLink.prop('disabled', false).removeClass('disabled');
}
});
}
diff --git a/templates/web/admin/publications/wrapper.html.twig b/templates/web/admin/publications/wrapper.html.twig
index b171659e63..217ed5aa14 100644
--- a/templates/web/admin/publications/wrapper.html.twig
+++ b/templates/web/admin/publications/wrapper.html.twig
@@ -61,10 +61,10 @@
});
$('#edit_pub_public').bind('change', function(){
- if($(this).attr('checked') === true)
- $('#edit_pub_base_id').attr('disabled', 'disabled');
+ if($(this).prop('checked') === true)
+ $('#edit_pub_base_id').prop('disabled', true);
else
- $('#edit_pub_base_id').removeAttr('disabled');
+ $('#edit_pub_base_id').prop('disabled', false);
});
});
diff --git a/templates/web/common/dialog_export.html.twig b/templates/web/common/dialog_export.html.twig
index 8ced25e555..a391a88730 100644
--- a/templates/web/common/dialog_export.html.twig
+++ b/templates/web/common/dialog_export.html.twig
@@ -494,10 +494,10 @@
$('#ftp .ftp_form').hide();
$('#ftp .ftp_form_'+$(this).val()).show();
$('.ftp_folder_check', p4.Dialog.get(1).getDomElement()).unbind('change').bind('change', function(){
- if($(this).attr('checked'))
- $(this).next().removeAttr('disabled');
+ if($(this).prop('checked'))
+ $(this).next().prop('disabled',false);
else
- $(this).next().attr('disabled','disabled');
+ $(this).next().prop('disabled',true);
});
}).trigger('change');
});
@@ -511,7 +511,7 @@
function check_TOU(container)
{
var checkbox = $('input[name="TOU_accept"]', $(container));
- var go = checkbox.length === 0 || checkbox.attr('checked');
+ var go = checkbox.length === 0 || checkbox.prop('checked');
if(!go)
{
@@ -538,7 +538,7 @@
var go = required = false;
$('input[name="obj[]"]', $(container)).each(function(){
- if($(this).attr('checked'))
+ if($(this).prop('checked'))
{
go = true;
}
@@ -689,11 +689,11 @@
var options = $('#order form').serialize();
var $this = $(this);
- $this.attr('disabled', true).addClass('disabled');
+ $this.prop('disabled', true).addClass('disabled');
$.post("../prod/order/"
, options
, function(data){
- $this.attr('disabled', false).removeClass('disabled');
+ $this.prop('disabled', false).removeClass('disabled');
$('#order .order_button_loader').css('visibility','hidden');
@@ -742,11 +742,11 @@
var options_addr = $('#ftp_form_stock form:visible').serialize();
var options_join = $('#ftp_joined').serialize();
- $this.attr('disabled','disabled');
+ $this.prop('disabled',true);
$.post("../prod/export/ftp/"
, options_addr + '&' + options_join
, function(data){
- $this.removeAttr('disabled');
+ $this.prop('disabled', false);
$('#ftp .ftp_button_loader').hide();
if(data.success) {
@@ -771,7 +771,7 @@
$('#ftp .tryftp_button').bind('click',function(){
$('#ftp .tryftp_button_loader').css('visibility','visible');
var $this = $(this);
- $this.attr('disabled','disabled');
+ $this.prop('disabled',true)
var options_addr = $('#ftp_form_stock form:visible').serialize();
$.post("../prod/export/ftp/test/"
@@ -787,7 +787,7 @@
p4.Dialog.Create(options, 3).setContent(data.message);
- $this.removeAttr('disabled');
+ $this.prop('disabled', false);
return;
}
diff --git a/templates/web/common/index_bootstrap.html.twig b/templates/web/common/index_bootstrap.html.twig
index 06f2597ca9..7b68ab72ec 100644
--- a/templates/web/common/index_bootstrap.html.twig
+++ b/templates/web/common/index_bootstrap.html.twig
@@ -19,6 +19,7 @@
+