Skip to content
Snippets Groups Projects
Commit 96eb3adc authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

hotline #58587 : notify input change on complex form elements

parent 47e899e0
Branches
Tags 8.0.14
5 merge requests!2334Master,!2102#57574 : correction orthographe des jours de la semaine,!2101Master,!2100Hotline master,!2096hotline #58587 : notify input change on complex form elements
Pipeline #969 passed with stage
in 19 minutes and 20 seconds
- ticket #58587 : Administration : Correction de la détection de modification des formulaires
\ No newline at end of file
......@@ -45,17 +45,18 @@
});
input.val( values.join(';') );
var labels = [];
$(lists[0]).find('li').each(function() {
labels.push($(this).text());
});
var labels = [];
$(lists[0]).find('li').each(function() {
labels.push($(this).text());
});
widget.find('.show_drag_and_drop').text(labels.join(', '));
widget.find('.show_drag_and_drop').text(labels.join(', '));
widget.find('input').change();
},
remove: function(event, ui) {
if("true" == options.sticky_available)
$(lists[1]).html(fixed_available);
$(lists[1]).html(fixed_available);
}
});
};
......@@ -77,14 +78,14 @@
lists.sortable({
connectWith: 'ul',
update: function() {
var _values = "";
var _labels = "";
widget.find('.selected_items li').each(function() {
_values += $(this).data("id") + ";";
_labels += $(this).data("label") + ",";
});
widget.find('input').val(_values);
widget.find('.show_drag_and_drop').text(_labels);
var _values = "";
var _labels = "";
widget.find('.selected_items li').each(function() {
_values += $(this).data("id") + ";";
_labels += $(this).data("label") + ",";
});
widget.find('input').val(_values);
widget.find('.show_drag_and_drop').text(_labels);
widget.find('input').change();
}
});
......
//OPAC3 : Tags de sélection avec criteres qui s'ouvrent dans un bloc caché d'origine
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//----------------------------------------------------------
// Ouvrir / fermer le bloc de saisie et permuter le picto
//----------------------------------------------------------
function ouvrirFermer(oImg,sId)
{
sImg=oImg.src;
sImg = oImg.src;
if(sImg.indexOf("ouvrir") > 0 )
{
oImg.src=sImg.replace("ouvrir", "fermer");
......@@ -18,9 +33,7 @@ function ouvrirFermer(oImg,sId)
}
}
//----------------------------------------------------------
// Recup. de valeurs des caces a cocher
//----------------------------------------------------------
function getCoches(sIdChamp,allSelectedAsNothingSelected)
{
// Handles
......@@ -58,9 +71,7 @@ function getCoches(sIdChamp,allSelectedAsNothingSelected)
setFlagMaj(true);
}
//----------------------------------------------------------
// Tout cocher ou decocher
//----------------------------------------------------------
function selectAll(sIdChamp,bMode,allSelectedAsNothingSelected)
{
// Handles
......@@ -85,11 +96,10 @@ function selectAll(sIdChamp,bMode,allSelectedAsNothingSelected)
else
getCoches(sIdChamp,allSelectedAsNothingSelected);
setFlagMaj(true);
$('#'+sIdChamp).change();
}
//----------------------------------------------------------
// Lancer recherche ajax
//----------------------------------------------------------
function getSuggest(sRubrique,sChamp,sValeur,nMinCars)
{
if(sValeur.length < nMinCars)
......@@ -106,9 +116,7 @@ function getSuggest(sRubrique,sChamp,sValeur,nMinCars)
$('#'+sChamp+'_liste').load(sUrl);
}
//----------------------------------------------------------
// Champs suggestion selection d'un item
//----------------------------------------------------------
function selectSuggest(sIdChamp, oItem)
{
// Handles
......@@ -148,9 +156,7 @@ function selectSuggest(sIdChamp, oItem)
setFlagMaj(true);
}
//----------------------------------------------------------
// Champs suggestion effacer toute la selection
//----------------------------------------------------------
function suggestClear(sIdChamp)
{
oChampCodes=getId(sIdChamp);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment