Skip to main content

Posts

Showing posts from October, 2021

Simple jQuery file upload

  https://danielmg.org/demo/java-script/uploader/basic https://github.com/danielm/uploader Simple js progress bar (have some bootstrap style) /*  * Some helper functions to work with our UI and keep our code cleaner  */ //--------------- UI // Adds an entry to our debug area function ui_add_log(message, color) {     var d = new Date();     var dateString = (('0' + d.getHours())).slice(-2) + ':' +         (('0' + d.getMinutes())).slice(-2) + ':' +         (('0' + d.getSeconds())).slice(-2);     color = (typeof color === 'undefined' ? 'muted' : color);     var template = jQuery33('#debug-template').text();     template = template.replace('%%date%%', dateString);     template = template.replace('%%message%%', message);     template = template.replace('%%color%%', color);     // jQuery33('#debug').find('li.empty').fadeOut(); // remove the 'no messages yet' ...