Commits

Anonymous committed 44742c1

fixing <select multiple>

Comments (0)

Files changed (1)

src/jquery.htraf.js

 
 $.fn._valOrig = $.fn.val;
 $.fn.val = function(value) {
-    var origSelector = 'input,textarea';
+    var origSelector = 'input,textarea,select';
     if(value !== undefined)
         return this.each(function() {
             if($(this).is(origSelector) || !$(this).data('htraf'))
             var row = data[i];
             select.options[i + keep] = new Option(
                 row[1] === undefined  ? row[0]:row[1], 
-                row[0] === null ? row[0]:'',
+                row[0] === null ? '':row[0],
                 i + keep == 0, i + keep == 0); 
         }
         for(var i = keep - 1; i >= 0; i--) {
 });
 // }}}
  
-// {{{ Widgets: htraf.checklist
+// {{{ Widgets: htraf.checkList
 $.widget("htraf.checkList", $.htraf.Base, {
     _create: function() {
         $.htraf.Base.prototype._create.call(this);
                     }
                 },
                 {
-                    js: HTRAF.prefix + '/lib/jqplot.categoryAxisRenderer.min.js',
+                    js: HTRAF.prefix 
+                        + '/lib/jqplot.categoryAxisRenderer.min.js',
                     check: function() {
                         return $.jqplot && $.jqplot.CategoryAxisRenderer;
                     }
                     }
                 },
                 {
-                    js: HTRAF.prefix + '/lib/jqplot.canvasAxisTickRenderer.min.js',
+                    js: HTRAF.prefix 
+                        + '/lib/jqplot.canvasAxisTickRenderer.min.js',
                     check: function() {
                         return $.jqplot && $.jqplot.CanvasAxisTickRenderer
                                && $.jqplot.CanvasFontRenderer;
             case 'bar':
             case 'stack': { 
                 var ticks = [];
-                var yaxis = (attrs.yInt) ? {min: 0, tickOptions:{formatString:'%d'}} : {min: 0};
+                var yaxis = (attrs.yInt) ? {
+                    min: 0, 
+                    tickOptions: {formatString: '%d'}
+                } : {min: 0};
                 $.each(data.data, function(i, row) {
                     ticks.push(row[0]); 
                 });
                 var type = data.headers[0].domain;
                 var xaxis = (type == 'number') ? {
                     tickOptions: {formatString: '%d'}
-                } 
-                : {
+                } : {
                     renderer: $.jqplot.DateAxisRenderer,
                     tickOptions: {
                         formatString: '%Y-%m-%d'