diff --git a/include/js/jquery-barcode-1.3.3.min.js b/include/js/jquery-barcode-1.3.3.min.js new file mode 100644 index 000000000..0af2301e9 --- /dev/null +++ b/include/js/jquery-barcode-1.3.3.min.js @@ -0,0 +1,15 @@ +/* + * BarCode Coder Library (BCC Library) + * BCCL Version 1.0 + * + * Porting : Jquery barcode plugin + * Version : 1.3.3 + * + * Date : October 17 2009 + * Author : DEMONTE Jean-Baptiste (firejocker) + * Contact : jbdemonte @ gmail.com + * Web site: http://barcode-coder.com/ + * dual licence : http://www.cecill.info/licences/Licence_CeCILL_V2-fr.html + * http://www.gnu.org/licenses/gpl.html + */ +$.barcode={settings:{barWidth:1,barHeight:50,showHRI:true,marginHRI:5,bgColor:"#FFFFFF",color:"#000000",fontSize:"10px",output:"css"},intval:function(b){var a=typeof(b);if(a=="string"){b=b.replace(/[^0-9-.]/g,"");b=parseInt(b*1,10);if(isNaN(b)||!isFinite(b)){return 0}else{return b}}else{if(a=="number"&&isFinite(b)){return Math.floor(b)}else{return 0}}},i25:{encoding:["NNWWN","WNNNW","NWNNW","WWNNN","NNWNW","WNWNN","NWWNN","NNNWW","WNNWN","NWNWN"],compute:function(e,g,d){if(!g){if(e.length%2!=0){e="0"+e}}else{if((d=="int25")&&(e.length%2==0)){e="0"+e}var f=true,a,c=0;for(var b=e.length-1;b>-1;b--){a=$.barcode.intval(e.charAt(b));if(isNaN(a)){return("")}c+=f?3*a:a;f=!f}e+=((10-c%10)%10).toString()}return(e)},getDigit:function(g,h,f){g=this.compute(g,h,f);if(g==""){return("")}result="";var d,a;if(f=="int25"){result+="1010";var e,b;for(d=0;d"9")){return("")}}g=this.compute(g,f);var a="101";if(f=="ean8"){for(var e=0;e<4;e++){a+=this.encoding[$.barcode.intval(g.charAt(e))][0]}a+="01010";for(var e=4;e<8;e++){a+=this.encoding[$.barcode.intval(g.charAt(e))][2]}}else{var d=this.first[$.barcode.intval(g.charAt(0))];for(var e=1;e<7;e++){a+=this.encoding[$.barcode.intval(g.charAt(e))][$.barcode.intval(d.charAt(e-1))]}a+="01010";for(var e=7;e<13;e++){a+=this.encoding[$.barcode.intval(g.charAt(e))][2]}}a+="101";return(a)},compute:function(d,c){var a=c=="ean13"?12:7;d=d.substring(0,a);var b=0,e=true;for(i=d.length-1;i>-1;i--){b+=(e?3:1)*$.barcode.intval(d.charAt(i));e=!e}return(d+((10-b%10)%10).toString())}},msi:{encoding:["100100100100","100100100110","100100110100","100100110110","100110100100","100110100110","100110110100","100110110110","110100100100","110100100110"],compute:function(a,b){if(typeof(b)=="object"){if(b.crc1=="mod10"){a=this.computeMod10(a)}else{if(b.crc1=="mod11"){a=this.computeMod11(a)}}if(b.crc2=="mod10"){a=this.computeMod10(a)}else{if(b.crc2=="mod11"){a=this.computeMod11(a)}}}else{if(typeof(b)=="boolean"){if(b){a=this.computeMod10(a)}}}return(a)},computeMod10:function(f){var c,a=f.length%2;var e=0,d=0;for(c=0;c=0;a--){b+=d*$.barcode.intval(c.charAt(a));d=d==7?2:d+1}return(c+((11-b%11)%11).toString())},getDigit:function(d,e){var c="0123456789";var b=0;var a="";d=this.compute(d,false);a="110";for(i=0;i=0;g--){m=m==10?1:m+1;h=h==10?1:h+1;j=n.indexOf(b.charAt(g));f+=m*j;a+=h*j}var l=f%11;a+=l;var e=a%11;o+=this.encoding[l]+d;if(b.length>=10){o+=this.encoding[e]+d}o+="1011001";return(o)}},code39:{encoding:["101001101101","110100101011","101100101011","110110010101","101001101011","110100110101","101100110101","101001011011","110100101101","101100101101","110101001011","101101001011","110110100101","101011001011","110101100101","101101100101","101010011011","110101001101","101101001101","101011001101","110101010011","101101010011","110110101001","101011010011","110101101001","101101101001","101010110011","110101011001","101101011001","101011011001","110010101011","100110101011","110011010101","100101101011","110010110101","100110110101","100101011011","110010101101","100110101101","100100100101","100100101001","100101001001","101001001001","100101101101"],getDigit:function(f){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*";var d,c,b="",a="0";if(f.indexOf("*")>=0){return("")}f=("*"+f+"*").toUpperCase();for(d=0;d0){b+=a}b+=this.encoding[c]}return(b)}},code93:{encoding:["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],getDigit:function(b,g){var l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%____*",h,m="";if(b.indexOf("*")>=0){return("")}b=b.toUpperCase();m+=this.encoding[47];for(i=0;i=0;i--){j=j==20?1:j+1;f=f==15?1:f+1;index=l.indexOf(b.charAt(i));e+=j*index;a+=f*index}var h=e%47;a+=h;var d=a%47;m+=this.encoding[h];m+=this.encoding[d]}m+=this.encoding[47];m+="1";return(m)}},code128:{encoding:["11011001100","11001101100","11001100110","10010011000","10010001100","10001001100","10011001000","10011000100","10001100100","11001001000","11001000100","11000100100","10110011100","10011011100","10011001110","10111001100","10011101100","10011100110","11001110010","11001011100","11001001110","11011100100","11001110100","11101101110","11101001100","11100101100","11100100110","11101100100","11100110100","11100110010","11011011000","11011000110","11000110110","10100011000","10001011000","10001000110","10110001000","10001101000","10001100010","11010001000","11000101000","11000100010","10110111000","10110001110","10001101110","10111011000","10111000110","10001110110","11101110110","11010001110","11000101110","11011101000","11011100010","11011101110","11101011000","11101000110","11100010110","11101101000","11101100010","11100011010","11101111010","11001000010","11110001010","10100110000","10100001100","10010110000","10010000110","10000101100","10000100110","10110010000","10110000100","10011010000","10011000010","10000110100","10000110010","11000010010","11001010000","11110111010","11000010100","10001111010","10100111100","10010111100","10010011110","10111100100","10011110100","10011110010","11110100100","11110010100","11110010010","11011011110","11011110110","11110110110","10101111000","10100011110","10001011110","10111101000","10111100010","11110101000","11110100010","10111011110","10111101110","11101011110","11110101110","11010000100","11010010000","11010011100","11000111010"],getDigit:function(b){var a=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~";var m="";var h=0;var d=0;var g=0;var f=0;var l=0;for(g=0;g1;var k="";for(g=0;g<3&&g="0"&&k<="9"}h=e?105:104;m=this.encoding[h];g=0;while(g="0")&&(b.charAt(g+f)<="9")){f++}e=(f>5)||((g+f-1==b.length)&&(f>3));if(e){m+=this.encoding[99];h+=++d*99}}else{if((g==b.length)||(b.charAt(g)<"0")||(b.charAt(g)>"9")||(b.charAt(g+1)<"0")||(b.charAt(g+1)>"9")){e=false;m+=this.encoding[100];h+=++d*100}}if(e){l=$.barcode.intval(b.charAt(g)+b.charAt(g+1));g+=2}else{l=a.indexOf(b.charAt(g));g+=1}m+=this.encoding[l];h+=++d*l}m+=this.encoding[h%103];m+=this.encoding[106];m+="11";return(m)}},codabar:{encoding:["101010011","101011001","101001011","110010101","101101001","110101001","100101011","100101101","100110101","110100101","101001101","101100101","1101011011","1101101011","1101101101","1011011011","1011001001","1010010011","1001001011","1010011001"],getDigit:function(f){var e="0123456789-$:/.+";var d,c,b="",a="0";b+=this.encoding[16]+a;for(d=0;d>8}return b},cRgb:function(d,c,a){return String.fromCharCode(a)+String.fromCharCode(c)+String.fromCharCode(d)},cHexColor:function(f){var c=parseInt("0x"+f.substr(1));var a=c&255;c=c>>8;var e=c&255;var d=c>>8;return(this.cRgb(d,e,a))}},isHexColor:function(b){var a=new RegExp("#[0-91-F]","gi");return b.match(a)},base64Encode:function(m){var a="",f,d,c,l,j,h,g;var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var e=0;while(e>2;j=((f&3)<<4)|(d>>4);h=((d&15)<<2)|(c>>6);g=c&63;if(isNaN(d)){h=g=64}else{if(isNaN(c)){g=64}}a+=b.charAt(l)+b.charAt(j)+b.charAt(h)+b.charAt(g)}return a},digitToBmp:function(q,c,l,e){var r=$.barcode.intval(c.barWidth);var p=$.barcode.intval(c.barHeight);var g=0;var h=this.isHexColor(c.bgColor)?this.lec.cHexColor(c.bgColor):this.lec.cRgb(255,255,255);var f=this.isHexColor(c.color)?this.lec.cHexColor(c.color):this.lec.cRgb(0,0,0);var n="";var k="";for(g=0;g';e=g.charAt(c);d=1}}if(d>0){f+=(e=="0"?j:h)+(d*m)+'px">'}if(a.showHRI){f+='
'+b+"
"}l.css("padding","0px").css("overflow","auto").css("width",(m*g.length)+"px").html(f)},digitToSvg:function(m,b,j,d){var o=$.barcode.intval(b.barWidth);var k=$.barcode.intval(b.barHeight);var a=j.length*o;var l=k;var n=$.barcode.intval(b.fontSize);if(b.showHRI){l+=$.barcode.intval(b.marginHRI)+n}var f='';f+='';var g=0;var h=j.charAt(0);for(var e=0;e'}h=j.charAt(e);g=1}}if((g>0)&&(h=="1")){f+=''}if(b.showHRI){f+='';f+=''+d+"";f+=""}f+="";var c=document.createElement("object");c.setAttribute("type","image/svg+xml");c.setAttribute("data","data:image/svg+xml,"+f);m.html("").append(c)}};$.fn.extend({barcode:function(e,h,c){var j="",d="",b="",f=true;if(typeof(e)=="string"){b=e}else{if(typeof(e)=="object"){b=typeof(e.code)=="string"?e.code:"";f=typeof(e.crc)!="undefined"?e.crc:true}}if(b==""){return(false)}switch(h){case"std25":case"int25":j=$.barcode.i25.getDigit(b,f,h);d=$.barcode.i25.compute(b,f,h);break;case"ean8":case"ean13":j=$.barcode.ean.getDigit(b,h);d=$.barcode.ean.compute(b,h);break;case"code11":j=$.barcode.code11.getDigit(b);d=b;break;case"code39":j=$.barcode.code39.getDigit(b);d=b;break;case"code93":j=$.barcode.code93.getDigit(b,f);d=b;break;case"code128":j=$.barcode.code128.getDigit(b);d=b;break;case"codabar":j=$.barcode.codabar.getDigit(b);d=b;break;case"msi":j=$.barcode.msi.getDigit(b,f);d=$.barcode.msi.compute(b,f);break}if(j.length==0){return($(this))}j="0000000000"+j+"0000000000";if(c==undefined){c=[]}for(var a in $.barcode.settings){if(c[a]==undefined){c[a]=$.barcode.settings[a]}}var g=$(this);switch(c.output){case"bmp":$.barcode.digitToBmp(g,c,j,d);break;case"svg":$.barcode.digitToSvg(g,c,j,d);break;default:$.barcode.digitToCss(g,c,j,d);break}return(g)}}); \ No newline at end of file diff --git a/include/js/jquery.barcode.0.3.js b/include/js/jquery.barcode.0.3.js deleted file mode 100644 index 69a50f798..000000000 --- a/include/js/jquery.barcode.0.3.js +++ /dev/null @@ -1,319 +0,0 @@ -/* - * jQuery Barcode plugin 0.3 - * - * http://www.pasella.it/projects/jQuery/barcode - * based on code from Kris Bailey [http://www.krisbailey.com/creating-code-39-barcodes-in-pure-javascript] - * - * Copyright (c) 2009 Antonello Pasella antonello.pasella@gmail.com - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ - - -;(function($) { - - $.barcode = {}; - $.barcode.defaults = {thinBarWidth : 1, height: '100%', code: 'code39'}; - - $.fn.extend({ - barcode : function(settings){ - settings = $.extend({}, $.barcode.defaults, settings); - settings.barWidthRatio = 3; - settings.thin = settings.thinBarWidth; - settings.thick = settings.thinBarWidth * settings.barWidthRatio; - return $.barcode._barcodeBMP(settings, this); - } - }); - - $.barcode.palette = [ [0, 0 ,0] , [255, 255, 255] ]; - $.barcode.codes = {}; - $.barcode.codes.code39 = {}; - $.barcode.codes.code39.plain = {}; - $.barcode.codes.code39.plain['0'] = 'bwbWBwBwb'; - $.barcode.codes.code39.plain['1'] = 'BwbWbwbwB'; - $.barcode.codes.code39.plain['2'] = 'bwBWbwbwB'; - $.barcode.codes.code39.plain['3'] = 'BwBWbwbwb'; - $.barcode.codes.code39.plain['4'] = 'bwbWBwbwB'; - $.barcode.codes.code39.plain['5'] = 'BwbWBwbwb'; - $.barcode.codes.code39.plain['6'] = 'bwBWBwbwb'; - $.barcode.codes.code39.plain['7'] = 'bwbWbwBwB'; - $.barcode.codes.code39.plain['8'] = 'BwbWbwBwb'; - $.barcode.codes.code39.plain['9'] = 'bwBWbwBwb'; - $.barcode.codes.code39.plain['A'] = 'BwbwbWbwB'; - $.barcode.codes.code39.plain['B'] = 'bwBwbWbwB'; - $.barcode.codes.code39.plain['C'] = 'BwBwbWbwb'; - $.barcode.codes.code39.plain['D'] = 'bwbwBWbwB'; - $.barcode.codes.code39.plain['E'] = 'BwbwBWbwb'; - $.barcode.codes.code39.plain['F'] = 'bwBwBWbwb'; - $.barcode.codes.code39.plain['G'] = 'bwbwbWBwB'; - $.barcode.codes.code39.plain['H'] = 'BwbwbWBwb'; - $.barcode.codes.code39.plain['I'] = 'bwBwbWBwb'; - $.barcode.codes.code39.plain['J'] = 'bwbwBWBwb'; - $.barcode.codes.code39.plain['K'] = 'BwbwbwbWB'; - $.barcode.codes.code39.plain['L'] = 'bwBwbwbWB'; - $.barcode.codes.code39.plain['M'] = 'BwBwbwbWb'; - $.barcode.codes.code39.plain['N'] = 'bwbwBwbWB'; - $.barcode.codes.code39.plain['O'] = 'BwbwBwbWb'; - $.barcode.codes.code39.plain['P'] = 'bwBwBwbWb'; - $.barcode.codes.code39.plain['Q'] = 'bwbwbwBWB'; - $.barcode.codes.code39.plain['R'] = 'BwbwbwBWb'; - $.barcode.codes.code39.plain['S'] = 'bwBwbwBWb'; - $.barcode.codes.code39.plain['T'] = 'bwbwBwBWb'; - $.barcode.codes.code39.plain['U'] = 'BWbwbwbwB'; - $.barcode.codes.code39.plain['V'] = 'bWBwbwbwB'; - $.barcode.codes.code39.plain['W'] = 'BWBwbwbwb'; - $.barcode.codes.code39.plain['X'] = 'bWbwBwbwB'; - $.barcode.codes.code39.plain['Y'] = 'BWbwBwbwb'; - $.barcode.codes.code39.plain['Z'] = 'bWBwBwbwb'; - $.barcode.codes.code39.plain['-'] = 'bWbwbwBwB'; - $.barcode.codes.code39.plain['.'] = 'BWbwbwBwb'; - $.barcode.codes.code39.plain[' '] = 'bWBwbwBwb'; - $.barcode.codes.code39.plain['*'] = 'bWbwBwBwb'; - $.barcode.codes.code39.plain['$'] = 'bWbWbWbwb'; - $.barcode.codes.code39.plain['/'] = 'bWbWbwbWb'; - $.barcode.codes.code39.plain['+'] = 'bWbwbWbWb'; - $.barcode.codes.code39.plain['%'] = 'bwbWbWbWb'; - - $.barcode.codes.I25 = {}; - $.barcode.codes.I25.plain = {}; - $.barcode.codes.I25.plain['START'] = 'wwwwwwwwwwbwbw'; - $.barcode.codes.I25.plain['END'] = 'Bwbwwwwwwwwww'; - $.barcode.codes.I25.plain['0'] = 'bbBBb'; - $.barcode.codes.I25.plain['1'] = 'BbbbB'; - $.barcode.codes.I25.plain['2'] = 'bBbbB'; - $.barcode.codes.I25.plain['3'] = 'BBbbb'; - $.barcode.codes.I25.plain['4'] = 'bbBbB'; - $.barcode.codes.I25.plain['5'] = 'BbBbb'; - $.barcode.codes.I25.plain['6'] = 'bBBbb'; - $.barcode.codes.I25.plain['7'] = 'bbbBB'; - $.barcode.codes.I25.plain['8'] = 'BbbBb'; - $.barcode.codes.I25.plain['9'] = 'bBbBb'; - - /* Cache BMP translation codes*/ - $.barcode.codes.code39.BMP = {}; - for (var x in $.barcode.codes.code39.plain){ - var tcodes = $.barcode.codes.code39.plain[x]; - $.barcode.codes.code39.BMP[x] = ''; - for (var xi=0; xi<9; xi++) - switch (tcodes.charAt(xi)){ - case 'B': - $.barcode.codes.code39.BMP[x] += '\x00\x00\x00\x00\x00\x00\x00\x00\x00'; - break; - case 'b': - $.barcode.codes.code39.BMP[x] += '\x00\x00\x00'; - break; - case 'W': - $.barcode.codes.code39.BMP[x] += '\x01\x01\x01\x01\x01\x01\x01\x01\x01'; - break; - case 'w': - $.barcode.codes.code39.BMP[x] += '\x01\x01\x01'; - break; - } - $.barcode.codes.code39.BMP[x] += '\x01\x01\x01'; - }; - - $.barcode._barcodeBMP = function(settings, jQ) { - return $(jQ).each(function(item, index){ - var encoded = ''; - switch(settings.code){ - case 'code39' : - var code = '*' + $.trim($(this).html()) + '*'; - for(var i = 0; i < code.length; i++) - encoded += $.barcode.codes.code39.BMP[code.charAt(i)]; - break; - case 'I25' : - var code = $.trim($(this).html()); - encoded = $.barcode.codes.I25.plain['START']; - - if(code.length % 2 == 1) - code = '0' + code; - - for(var i = 0; i < code.length; i+=2){ - var code1 = $.barcode.codes.I25.plain[code.charAt(i)]; - var code2 = $.barcode.codes.I25.plain[code.charAt(i+1)].replace(/b/g,"w").replace(/B/g, "W"); - for(var i2 = 0; i2 < 5; i2++){ - encoded += code1.charAt(i2) + code2.charAt(i2); - } - } - encoded += $.barcode.codes.I25.plain['END']; - encoded = encoded.replace(/w/g, '\x01\x01\x01'); - encoded = encoded.replace(/W/g, '\x01\x01\x01\x01\x01\x01\x01\x01\x01'); - encoded = encoded.replace(/b/g, '\x00\x00\x00'); - encoded = encoded.replace(/B/g, '\x00\x00\x00\x00\x00\x00\x00\x00\x00'); - break; - default : - alert("Code" + settings.code + ' not implemented'); - return; - }; - var img = $("").width("100%").height("100%").attr("src", $.barcode._createBmp([encoded], $.barcode.palette)); - $(this).html("").append(img); - }); - }; - - $.barcode._encode64 = function(input) { - var output = ''; - var i = 0; - do { - var chr1 = input.charCodeAt(i++); - var chr2 = input.charCodeAt(i++); - var chr3 = input.charCodeAt(i++); - - var enc1 = chr1 >> 2; - var enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - var enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - var enc4 = chr3 & 63; - - if (isNaN(chr2)) enc3 = enc4 = 64; - else if (isNaN(chr3)) enc4 = 64; - - output = output + $.barcode._encode64.keyStr.charAt(enc1) + - $.barcode._encode64.keyStr.charAt(enc2) + - $.barcode._encode64.keyStr.charAt(enc3) + - $.barcode._encode64.keyStr.charAt(enc4); - } while (i < input.length); - return output; - }; - - $.barcode._encode64.keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - - $.barcode._multiByteEncode = function(number, bytes) { - if (number < 0 || bytes < 0) { - throw('Negative numbers not allowed.'); - } - var oldbase = 1; - var string = ''; - for (var x = 0; x < bytes; x++) { - if (number == 0) { - CharCode = 0; - } else { - var base = oldbase * 256; - var CharCode = number % base; - number = number - CharCode; - CharCode = CharCode / oldbase; - oldbase = base; - } - string += String.fromCharCode(CharCode); - } - if (number != 0) - throw('Overflow, number too big for string length'); - return string; - }; - - if ('btoa' in window && typeof window.btoa == 'function' && window.btoa('hello') == 'aGVsbG8=') { - $.barcode._encode64 = function(input) { - return window.btoa(input); - } - }; - - $.barcode._createBmp = function(grid, palette) { - // xxxx and yyyy are placeholders for offsets (computed later). - var bitmapFileHeader = 'BMxxxx\0\0\0\0yyyy'; - - // Assemble the info header. - var height = grid.length; - var width = height && grid[0].length; - var biHeight = this._multiByteEncode(height, 4); - var biWidth = this._multiByteEncode(width, 4); - var bfOffBits = this._multiByteEncode(40, 4); - var bitCount = 8; - - var biBitCount = this._multiByteEncode(bitCount, 2); - var bitmapInfoHeader = bfOffBits + biWidth + biHeight + '\x01\0' + - biBitCount + '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'; - - if (bitCount != 24) { - var palette_str = String(palette); - var rgbQuad = []; - var r = 0; - var g = 0; - var b = 0; - for (var x = 0; x < 256; x++) { - if (x < palette.length) { - r = palette[x][0]; - g = palette[x][1]; - b = palette[x][2]; - } - rgbQuad[x] = String.fromCharCode(b, g, r, 0); - } - rgbQuad = rgbQuad.join(''); - } - - var padding; - if (width % 4 == 1) padding = '\0\0\0'; - else if (width % 4 == 2) padding = '\0\0'; - else if (width % 4 == 3) padding = '\0'; - else padding = ''; - - var data = []; - for (var y = 0; y < height; y++) - data[y] = grid[height - y - 1] + padding; - - var bitmap = bitmapFileHeader + bitmapInfoHeader + rgbQuad + data.join(''); - bitmap = bitmap.replace(/yyyy/, this._multiByteEncode(bitmapFileHeader.length + bitmapInfoHeader.length + rgbQuad.length, 4)); - bitmap = bitmap.replace(/xxxx/, this._multiByteEncode(bitmap.length, 4)); - return 'data:image/bmp;base64,' + this._encode64(bitmap); - }; -})(jQuery); - - -/** - -A version with DIVs for IE < 8 ... - - - //For Ie<8 fallback to DIV version - if($.browser.msie && parseInt($.browser.version.charAt(0)) < 8) - return $.barcode._barcodeDIV(settings, this); - else - - - - $.barcode._barcodeDIV = function(settings, jQ) { - settings.thinWhiteBar = "
"; - settings.thinBlackBar = "
"; - settings.thickWhiteBar = "
"; - settings.thickBlackBar = "
"; - var codesHTML = {}; - for (var x in $.barcode.codes.code39){ - var htmlRES = ''; - var tcodes = $.barcode.codes.code39[x]; - for (var xi=0; xi<9; xi++){ - switch (tcodes.charAt(xi)){ - case 'w': - htmlRES += settings.thinWhiteBar; - break; - case 'b': - htmlRES += settings.thinBlackBar; - break; - case 'W': - htmlRES += settings.thickWhiteBar; - break; - case 'B': - htmlRES += settings.thickBlackBar; - break; - } - } - htmlRES += settings.thinWhiteBar; - codesHTML[x] = htmlRES; - }; - - return $(jQ).each(function(index, item) { - var code = '*'+$.trim($(item).attr("alt")).toUpperCase() + '*'; - //alert(code); - var htmlout = ""; - for (var i=0; i"); - $(item).parent().css("width", $(item).width()); - $(item).parent().css("height", $(item).height()); - $(item).parent().html(htmlout); - }); - }; - - -*/ \ No newline at end of file