mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
fix layout problems of select2 menu, allow to add icon to each option
This commit is contained in:
parent
add540c476
commit
15d89c09d6
|
@ -11,7 +11,10 @@ chzn_template_func = function (state) {
|
||||||
var warning = '';
|
var warning = '';
|
||||||
if($(state.element).data('warning'))
|
if($(state.element).data('warning'))
|
||||||
warning = $(state.element).data('warning')+''; /* make sure it is a string */
|
warning = $(state.element).data('warning')+''; /* make sure it is a string */
|
||||||
var html = '<span>'+state.text.replace(/</g, '<')+'';
|
var html = '<span>';
|
||||||
|
if($(state.element).data('icon-before'))
|
||||||
|
html += '<i class="icon-'+$(state.element).data('icon-before')+'"></i> ';
|
||||||
|
html += state.text.replace(/</g, '<')+'';
|
||||||
if(subtitle)
|
if(subtitle)
|
||||||
html += '<br /><i>'+subtitle.replace(/</g, '<')+'</i>';
|
html += '<br /><i>'+subtitle.replace(/</g, '<')+'</i>';
|
||||||
if(warning)
|
if(warning)
|
||||||
|
@ -58,8 +61,8 @@ $(document).ready( function() {
|
||||||
|
|
||||||
$(".chzn-select").select2({
|
$(".chzn-select").select2({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
templateResult: chzn_template_func,
|
templateResult: chzn_template_func//,
|
||||||
templateSelection: chzn_template_func
|
//templateSelection: chzn_template_func
|
||||||
});
|
});
|
||||||
|
|
||||||
/* change the color and length of the bar graph showing the password
|
/* change the color and length of the bar graph showing the password
|
||||||
|
@ -377,8 +380,8 @@ $(document).ready( function() {
|
||||||
element.html(data);
|
element.html(data);
|
||||||
$(".chzn-select").select2({
|
$(".chzn-select").select2({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
templateResult: chzn_template_func,
|
templateResult: chzn_template_func//,
|
||||||
templateSelection: chzn_template_func
|
//templateSelection: chzn_template_func
|
||||||
});
|
});
|
||||||
$(".pwd").passStrength({ /* {{{ */
|
$(".pwd").passStrength({ /* {{{ */
|
||||||
url: "../op/op.Ajax.php",
|
url: "../op/op.Ajax.php",
|
||||||
|
@ -426,8 +429,8 @@ $(document).ready( function() {
|
||||||
element.html(data);
|
element.html(data);
|
||||||
$(".chzn-select").select2({
|
$(".chzn-select").select2({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
templateResult: chzn_template_func,
|
templateResult: chzn_template_func//,
|
||||||
templateSelection: chzn_template_func
|
//templateSelection: chzn_template_func
|
||||||
});
|
});
|
||||||
$(".pwd").passStrength({ /* {{{ */
|
$(".pwd").passStrength({ /* {{{ */
|
||||||
url: "../op/op.Ajax.php",
|
url: "../op/op.Ajax.php",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user