Improve admin page (add new projects)

This commit is contained in:
2020-02-08 21:13:52 +01:00
parent 68bdbb4014
commit d81b4a2428
12 changed files with 312 additions and 79 deletions

View File

@@ -255,9 +255,14 @@ function getTimeZoneDesc(sTimeZoneName) {
return oSpot.lang('city_time', sCity);
}
$.prototype.addInput = function(sType, sName, sValue)
$.prototype.addInput = function(sType, sName, sValue, aoEvents)
{
return $(this).append($('<input>', {type: sType, name: sName, value: sValue}).data('old_value', sValue));
aoEvents = aoEvents || [];
var $Input = $('<input>', {type: sType, name: sName, value: sValue}).data('old_value', sValue);
$.each(aoEvents, function(iIndex, aoEvent) {
$Input.on(aoEvent.on, aoEvent.callback);
});
return $(this).append($Input);
};
$.prototype.addIcon = function(sIcon, bMargin, sStyle)