forked from Wavyzz/dolibarr
Fix migration to select2 4.0.5
This commit is contained in:
@@ -36,7 +36,7 @@ Stripe 4.7.0 MIT licence Yes
|
|||||||
JS libraries:
|
JS libraries:
|
||||||
jQuery 3.1.1 MIT License Yes JS library
|
jQuery 3.1.1 MIT License Yes JS library
|
||||||
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
|
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
|
||||||
jQuery select2 4.0.4 GPL and Apache License Yes JS library plugin for sexier multiselect
|
jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect
|
||||||
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
||||||
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
||||||
jQuery Flot 0.8.3 MIT License Yes JS library to build graph
|
jQuery Flot 0.8.3 MIT License Yes JS library to build graph
|
||||||
|
|||||||
@@ -5498,7 +5498,7 @@ class Form
|
|||||||
cache: true
|
cache: true
|
||||||
},
|
},
|
||||||
language: select2arrayoflanguage,
|
language: select2arrayoflanguage,
|
||||||
/* dropdownCssClass: "css-'.$htmlname.'", */
|
containerCssClass: \':all:\', /* Line to add class or origin SELECT propagated to the new <span class="select2-selection...> tag */
|
||||||
placeholder: "'.dol_escape_js($placeholder).'",
|
placeholder: "'.dol_escape_js($placeholder).'",
|
||||||
escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
|
escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
|
||||||
minimumInputLength: '.$minimumInputLength.',
|
minimumInputLength: '.$minimumInputLength.',
|
||||||
|
|||||||
@@ -411,8 +411,9 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
|
|||||||
width: \''.$widthTypeOfAutocomplete.'\', /* off or resolve */
|
width: \''.$widthTypeOfAutocomplete.'\', /* off or resolve */
|
||||||
minimumInputLength: '.$minLengthToAutocomplete.',
|
minimumInputLength: '.$minLengthToAutocomplete.',
|
||||||
language: select2arrayoflanguage,
|
language: select2arrayoflanguage,
|
||||||
|
containerCssClass: \':all:\', /* Line to add class or origin SELECT propagated to the new <span class="select2-selection...> tag */
|
||||||
templateResult: function (data, container) { /* Format visible output into combo list */
|
templateResult: function (data, container) { /* Format visible output into combo list */
|
||||||
/* Code to add class of origin option propagated to the new select2 li tag */
|
/* Code to add class of origin OPTION propagated to the new select2 <li> tag */
|
||||||
if (data.element) {
|
if (data.element) {
|
||||||
$(container).addClass($(data.element).attr("class"));
|
$(container).addClass($(data.element).attr("class"));
|
||||||
}
|
}
|
||||||
|
|||||||
56
htdocs/includes/jquery/plugins/select2/dist/js/compat/containerCss.js
vendored
Normal file
56
htdocs/includes/jquery/plugins/select2/dist/js/compat/containerCss.js
vendored
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
define([
|
||||||
|
'jquery',
|
||||||
|
'./utils'
|
||||||
|
], function ($, CompatUtils) {
|
||||||
|
// No-op CSS adapter that discards all classes by default
|
||||||
|
function _containerAdapter (clazz) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function ContainerCSS () { }
|
||||||
|
|
||||||
|
ContainerCSS.prototype.render = function (decorated) {
|
||||||
|
var $container = decorated.call(this);
|
||||||
|
|
||||||
|
var containerCssClass = this.options.get('containerCssClass') || '';
|
||||||
|
|
||||||
|
if ($.isFunction(containerCssClass)) {
|
||||||
|
containerCssClass = containerCssClass(this.$element);
|
||||||
|
}
|
||||||
|
|
||||||
|
var containerCssAdapter = this.options.get('adaptContainerCssClass');
|
||||||
|
containerCssAdapter = containerCssAdapter || _containerAdapter;
|
||||||
|
|
||||||
|
if (containerCssClass.indexOf(':all:') !== -1) {
|
||||||
|
containerCssClass = containerCssClass.replace(':all:', '');
|
||||||
|
|
||||||
|
var _cssAdapter = containerCssAdapter;
|
||||||
|
|
||||||
|
containerCssAdapter = function (clazz) {
|
||||||
|
var adapted = _cssAdapter(clazz);
|
||||||
|
|
||||||
|
if (adapted != null) {
|
||||||
|
// Append the old one along with the adapted one
|
||||||
|
return adapted + ' ' + clazz;
|
||||||
|
}
|
||||||
|
|
||||||
|
return clazz;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var containerCss = this.options.get('containerCss') || {};
|
||||||
|
|
||||||
|
if ($.isFunction(containerCss)) {
|
||||||
|
containerCss = containerCss(this.$element);
|
||||||
|
}
|
||||||
|
|
||||||
|
CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);
|
||||||
|
|
||||||
|
$container.css(containerCss);
|
||||||
|
$container.addClass(containerCssClass);
|
||||||
|
|
||||||
|
return $container;
|
||||||
|
};
|
||||||
|
|
||||||
|
return ContainerCSS;
|
||||||
|
});
|
||||||
6457
htdocs/includes/jquery/plugins/select2/dist/js/select2.full.js
vendored
Normal file
6457
htdocs/includes/jquery/plugins/select2/dist/js/select2.full.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
htdocs/includes/jquery/plugins/select2/dist/js/select2.full.min.js
vendored
Normal file
1
htdocs/includes/jquery/plugins/select2/dist/js/select2.full.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* Select2 4.0.4
|
* Select2 4.0.5
|
||||||
* https://select2.github.io
|
* https://select2.github.io
|
||||||
*
|
*
|
||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
@@ -1855,7 +1855,7 @@ S2.define('select2/selection/search',[
|
|||||||
var $search = $(
|
var $search = $(
|
||||||
'<li class="select2-search select2-search--inline">' +
|
'<li class="select2-search select2-search--inline">' +
|
||||||
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
||||||
' autocomplete="off" autocorrect="off" autocapitalize="off"' +
|
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
||||||
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
|
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
|
||||||
'</li>'
|
'</li>'
|
||||||
);
|
);
|
||||||
@@ -3909,7 +3909,7 @@ S2.define('select2/dropdown/search',[
|
|||||||
var $search = $(
|
var $search = $(
|
||||||
'<span class="select2-search select2-search--dropdown">' +
|
'<span class="select2-search select2-search--dropdown">' +
|
||||||
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
||||||
' autocomplete="off" autocorrect="off" autocapitalize="off"' +
|
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
||||||
' spellcheck="false" role="textbox" />' +
|
' spellcheck="false" role="textbox" />' +
|
||||||
'</span>'
|
'</span>'
|
||||||
);
|
);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1288,7 +1288,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
if (! defined('DISABLE_SELECT2') && (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))) // jQuery plugin "mutiselect", "multiple-select", "select2", ...
|
if (! defined('DISABLE_SELECT2') && (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))) // jQuery plugin "mutiselect", "multiple-select", "select2", ...
|
||||||
{
|
{
|
||||||
$tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT;
|
$tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT;
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/'.$tmpplugin.'/dist/js/'.$tmpplugin.'.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/'.$tmpplugin.'/dist/js/'.$tmpplugin.'.full.min.js'.($ext?'?'.$ext:'').'"></script>'."\n"; // We include full because we need the support of containerCssClass
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4319,9 +4319,6 @@ a span.select2-chosen
|
|||||||
.select2-results {
|
.select2-results {
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
}
|
}
|
||||||
.css-searchselectcombo ul.select2-results {
|
|
||||||
max-height: none;
|
|
||||||
}
|
|
||||||
.select2-container.select2-container-disabled .select2-choice, .select2-container-multi.select2-container-disabled .select2-choices {
|
.select2-container.select2-container-disabled .select2-choice, .select2-container-multi.select2-container-disabled .select2-choices {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
|
|||||||
@@ -4338,9 +4338,6 @@ a span.select2-chosen
|
|||||||
.select2-results {
|
.select2-results {
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
}
|
}
|
||||||
.css-searchselectcombo ul.select2-results {
|
|
||||||
max-height: none;
|
|
||||||
}
|
|
||||||
.select2-container.select2-container-disabled .select2-choice, .select2-container-multi.select2-container-disabled .select2-choices {
|
.select2-container.select2-container-disabled .select2-choice, .select2-container-multi.select2-container-disabled .select2-choices {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
|
|||||||
@@ -1325,7 +1325,7 @@ if (count($object->records) > 0)
|
|||||||
array('type' => 'other','name' => 'newwebsite','label' => $langs->trans("Website"), 'value' => $formwebsite->selectWebsite($object->id, 'newwebsite', 0))
|
array('type' => 'other','name' => 'newwebsite','label' => $langs->trans("Website"), 'value' => $formwebsite->selectWebsite($object->id, 'newwebsite', 0))
|
||||||
);
|
);
|
||||||
|
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?pageid=' . $pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, 250);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?pageid=' . $pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, 300, 550);
|
||||||
|
|
||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user