add js for addon with refresh symbol (temp. solution)

This commit is contained in:
Uwe Steinmann 2025-12-10 06:46:20 +01:00
parent 55c6a9492a
commit 73cb39beca
4 changed files with 32 additions and 2 deletions

View File

@ -1269,7 +1269,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
break;
default:
if(!empty($value['addon']))
echo '<span class="input-append'.($value["type"]=='password' ? ' show-hide-password' : '').'">';
echo '<span class="input-append'.($value["type"]=='password' ? ' show-hide-password' : '').' '.substr(md5($value['addon']), 0, 6).'">';
echo '<input'.
(!empty($value['type']) ? ' type="'.$value['type'].'"' : '').
(!empty($value['id']) ? ' id="'.$value['id'].'"' : '').

View File

@ -385,6 +385,21 @@ $(document).ready( function() {
}
}); /* }}} */
$('body').on('click', 'div.8cf73c span', function(ev) { /* {{{ */
ev.preventDefault();
closest = $(this).closest('div.8cf73c');
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'randomstring', len: 16 },
function(data) {
if(data.success) {
input = closest.children(":first");
input.val(data.string);
}
},
'json'
);
}); /* }}} */
$('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); });
initMost();

View File

@ -1252,7 +1252,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
break;
default:
if(!empty($value['addon']))
echo '<div class="input-group date'.($value["type"]=='password' ? ' show-hide-password' : '').'">';
echo '<div class="input-group'.($value["type"]=='password' ? ' show-hide-password' : '').' '.substr(md5($value['addon']), 0, 6).'">';
echo '<input'.
(!empty($value['type']) ? ' type="'.$value['type'].'"' : '').
(!empty($value['id']) ? ' id="'.$value['id'].'"' : '').

View File

@ -419,6 +419,21 @@ $(document).ready( function() {
}
}); /* }}} */
$('body').on('click', 'div.8cf73c span', function(ev) { /* {{{ */
ev.preventDefault();
closest = $(this).closest('div.8cf73c');
$.get(seeddms_webroot+'op/op.Ajax.php',
{ command: 'randomstring', len: 16 },
function(data) {
if(data.success) {
input = closest.children(":first");
input.val(data.string);
}
},
'json'
);
}); /* }}} */
// $('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); });
initMost();