';
for (x = 0; x < width; x) {
if (typeof cell !== 'undefined' && x == cell.pos[0] && y == cell.pos[1]) {
// Create a "real" cell
html += callback(cell, x, y);
for (h = 0; h < cell.pos[3]; h +=1) {
for (w = 0; w < cell.pos[2]; w +=1) {
bitmap[x + w][y + h] = true;
}
}
x += cell.pos[2];
cell = layout[++index];
} else {
// Fill in the gaps
colspan = 0;
walked = false;
while (x < width && bitmap[x][y] === undefined && (cell === undefined || y < cell.pos[1] || (y == cell.pos[1] && x < cell.pos[0]))) {
if (columns[x] === true) {
colspan += 1;
}
walked = true;
x += 1;
}
if (colspan > 0) {
html += '
';
} else if (!walked) {
x += 1;
}
}
}
html += '
';
}
return '
' + html + '
';
},
_parts = {
header: function (inst) {
var that = this,
e = null,
_html =function() {
var title = inst.options.title || inst._getRegional('title'),
html = '' + title + '';
if (!inst.inline && inst.options.showCloseButton) {
html += ''
+ 'close';
}
return '
' + html + '
';
};
this.init = function() {
e = $(_html()).prependTo(inst.dialog);
var close = $('.ui-dialog-titlebar-close', e);
inst._hoverable(close);
inst._focusable(close);
close.click(function(event) {
event.preventDefault();
inst.close();
});
if (!inst.inline && inst.options.draggable) {
inst.dialog.draggable({
handle: e
});
}
};
},
map: function (inst) {
var that = this,
e = null,
mousemove_timeout = null,
_mousedown, _mouseup, _mousemove, _html;
_mousedown = function (event) {
if (!inst.opened) {
return;
}
var div = $('.ui-colorpicker-map-layer-pointer', e),
offset = div.offset(),
width = div.width(),
height = div.height(),
x = event.pageX - offset.left,
y = event.pageY - offset.top;
if (x >= 0 && x < width && y >= 0 && y < height) {
event.stopImmediatePropagation();
event.preventDefault();
e.unbind('mousedown', _mousedown);
$(document).bind('mouseup', _mouseup);
$(document).bind('mousemove', _mousemove);
_mousemove(event);
}
};
_mouseup = function (event) {
event.stopImmediatePropagation();
event.preventDefault();
$(document).unbind('mouseup', _mouseup);
$(document).unbind('mousemove', _mousemove);
e.bind('mousedown', _mousedown);
};
_mousemove = function (event) {
event.stopImmediatePropagation();
event.preventDefault();
if (event.pageX === that.x && event.pageY === that.y) {
return;
}
that.x = event.pageX;
that.y = event.pageY;
var div = $('.ui-colorpicker-map-layer-pointer', e),
offset = div.offset(),
width = div.width(),
height = div.height(),
x = event.pageX - offset.left,
y = event.pageY - offset.top;
x = Math.max(0, Math.min(x / width, 1));
y = Math.max(0, Math.min(y / height, 1));
// interpret values
switch (inst.mode) {
case 'h':
inst.color.setHSV(null, x, 1 - y);
break;
case 's':
case 'a':
inst.color.setHSV(x, null, 1 - y);
break;
case 'v':
inst.color.setHSV(x, 1 - y, null);
break;
case 'r':
inst.color.setRGB(null, 1 - y, x);
break;
case 'g':
inst.color.setRGB(1 - y, null, x);
break;
case 'b':
inst.color.setRGB(x, 1 - y, null);
break;
}
inst._change();
};
_html = function () {
var html = '
'
+ ''
+ ''
+ (inst.options.alpha ? '' : '')
+ '
';
return html;
};
this.update = function () {
switch (inst.mode) {
case 'h':
$('.ui-colorpicker-map-layer-1', e).css({'background-position': '0 0', 'opacity': ''}).show();
$('.ui-colorpicker-map-layer-2', e).hide();
break;
case 's':
case 'a':
$('.ui-colorpicker-map-layer-1', e).css({'background-position': '0 -260px', 'opacity': ''}).show();
$('.ui-colorpicker-map-layer-2', e).css({'background-position': '0 -520px', 'opacity': ''}).show();
break;
case 'v':
$(e).css('background-color', 'black');
$('.ui-colorpicker-map-layer-1', e).css({'background-position': '0 -780px', 'opacity': ''}).show();
$('.ui-colorpicker-map-layer-2', e).hide();
break;
case 'r':
$('.ui-colorpicker-map-layer-1', e).css({'background-position': '0 -1040px', 'opacity': ''}).show();
$('.ui-colorpicker-map-layer-2', e).css({'background-position': '0 -1300px', 'opacity': ''}).show();
break;
case 'g':
$('.ui-colorpicker-map-layer-1', e).css({'background-position': '0 -1560px', 'opacity': ''}).show();
$('.ui-colorpicker-map-layer-2', e).css({'background-position': '0 -1820px', 'opacity': ''}).show();
break;
case 'b':
$('.ui-colorpicker-map-layer-1', e).css({'background-position': '0 -2080px', 'opacity': ''}).show();
$('.ui-colorpicker-map-layer-2', e).css({'background-position': '0 -2340px', 'opacity': ''}).show();
break;
}
that.repaint();
};
this.repaint = function () {
var div = $('.ui-colorpicker-map-layer-pointer', e),
x = 0,
y = 0;
switch (inst.mode) {
case 'h':
x = inst.color.getHSV().s * div.width();
y = (1 - inst.color.getHSV().v) * div.width();
$(e).css('background-color', inst.color.copy().normalize().toCSS());
break;
case 's':
case 'a':
x = inst.color.getHSV().h * div.width();
y = (1 - inst.color.getHSV().v) * div.width();
$('.ui-colorpicker-map-layer-2', e).css('opacity', 1 - inst.color.getHSV().s);
break;
case 'v':
x = inst.color.getHSV().h * div.width();
y = (1 - inst.color.getHSV().s) * div.width();
$('.ui-colorpicker-map-layer-1', e).css('opacity', inst.color.getHSV().v);
break;
case 'r':
x = inst.color.getRGB().b * div.width();
y = (1 - inst.color.getRGB().g) * div.width();
$('.ui-colorpicker-map-layer-2', e).css('opacity', inst.color.getRGB().r);
break;
case 'g':
x = inst.color.getRGB().b * div.width();
y = (1 - inst.color.getRGB().r) * div.width();
$('.ui-colorpicker-map-layer-2', e).css('opacity', inst.color.getRGB().g);
break;
case 'b':
x = inst.color.getRGB().r * div.width();
y = (1 - inst.color.getRGB().g) * div.width();
$('.ui-colorpicker-map-layer-2', e).css('opacity', inst.color.getRGB().b);
break;
}
if (inst.options.alpha) {
$('.ui-colorpicker-map-layer-alpha', e).css('opacity', 1 - inst.color.getAlpha());
}
$('.ui-colorpicker-map-pointer', e).css({
'left': x - 7,
'top': y - 7
});
};
this.init = function () {
e = $(_html()).appendTo($('.ui-colorpicker-map-container', inst.dialog));
e.bind('mousedown', _mousedown);
};
},
bar: function (inst) {
var that = this,
e = null,
_mousedown, _mouseup, _mousemove, _html;
_mousedown = function (event) {
if (!inst.opened) {
return;
}
var div = $('.ui-colorpicker-bar-layer-pointer', e),
offset = div.offset(),
width = div.width(),
height = div.height(),
x = event.pageX - offset.left,
y = event.pageY - offset.top;
if (x >= 0 && x < width && y >= 0 && y < height) {
event.stopImmediatePropagation();
event.preventDefault();
e.unbind('mousedown', _mousedown);
$(document).bind('mouseup', _mouseup);
$(document).bind('mousemove', _mousemove);
_mousemove(event);
}
};
_mouseup = function (event) {
event.stopImmediatePropagation();
event.preventDefault();
$(document).unbind('mouseup', _mouseup);
$(document).unbind('mousemove', _mousemove);
e.bind('mousedown', _mousedown);
};
_mousemove = function (event) {
event.stopImmediatePropagation();
event.preventDefault();
if (event.pageY === that.y) {
return;
}
that.y = event.pageY;
var div = $('.ui-colorpicker-bar-layer-pointer', e),
offset = div.offset(),
height = div.height(),
y = event.pageY - offset.top;
y = Math.max(0, Math.min(y / height, 1));
// interpret values
switch (inst.mode) {
case 'h':
inst.color.setHSV(1 - y, null, null);
break;
case 's':
inst.color.setHSV(null, 1 - y, null);
break;
case 'v':
inst.color.setHSV(null, null, 1 - y);
break;
case 'r':
inst.color.setRGB(1 - y, null, null);
break;
case 'g':
inst.color.setRGB(null, 1 - y, null);
break;
case 'b':
inst.color.setRGB(null, null, 1 - y);
break;
case 'a':
inst.color.setAlpha(1 - y);
break;
}
inst._change();
};
_html = function () {
var html = '
'
+ ''
+ ''
+ ''
+ '';
if (inst.options.alpha) {
html += ''
+ '';
}
html += '
';
return html;
};
this.update = function () {
switch (inst.mode) {
case 'h':
case 's':
case 'v':
case 'r':
case 'g':
case 'b':
$('.ui-colorpicker-bar-layer-alpha', e).show();
$('.ui-colorpicker-bar-layer-alphabar', e).hide();
break;
case 'a':
$('.ui-colorpicker-bar-layer-alpha', e).hide();
$('.ui-colorpicker-bar-layer-alphabar', e).show();
break;
}
switch (inst.mode) {
case 'h':
$('.ui-colorpicker-bar-layer-1', e).css({'background-position': '0 0', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-2', e).hide();
$('.ui-colorpicker-bar-layer-3', e).hide();
$('.ui-colorpicker-bar-layer-4', e).hide();
break;
case 's':
$('.ui-colorpicker-bar-layer-1', e).css({'background-position': '0 -260px', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-2', e).css({'background-position': '0 -520px', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-3', e).hide();
$('.ui-colorpicker-bar-layer-4', e).hide();
break;
case 'v':
$('.ui-colorpicker-bar-layer-1', e).css({'background-position': '0 -520px', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-2', e).hide();
$('.ui-colorpicker-bar-layer-3', e).hide();
$('.ui-colorpicker-bar-layer-4', e).hide();
break;
case 'r':
$('.ui-colorpicker-bar-layer-1', e).css({'background-position': '0 -1560px', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-2', e).css({'background-position': '0 -1300px', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-3', e).css({'background-position': '0 -780px', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-4', e).css({'background-position': '0 -1040px', 'opacity': ''}).show();
break;
case 'g':
$('.ui-colorpicker-bar-layer-1', e).css({'background-position': '0 -2600px', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-2', e).css({'background-position': '0 -2340px', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-3', e).css({'background-position': '0 -1820px', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-4', e).css({'background-position': '0 -2080px', 'opacity': ''}).show();
break;
case 'b':
$('.ui-colorpicker-bar-layer-1', e).css({'background-position': '0 -3640px', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-2', e).css({'background-position': '0 -3380px', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-3', e).css({'background-position': '0 -2860px', 'opacity': ''}).show();
$('.ui-colorpicker-bar-layer-4', e).css({'background-position': '0 -3120px', 'opacity': ''}).show();
break;
case 'a':
$('.ui-colorpicker-bar-layer-1', e).hide();
$('.ui-colorpicker-bar-layer-2', e).hide();
$('.ui-colorpicker-bar-layer-3', e).hide();
$('.ui-colorpicker-bar-layer-4', e).hide();
break;
}
that.repaint();
};
this.repaint = function () {
var div = $('.ui-colorpicker-bar-layer-pointer', e),
y = 0;
switch (inst.mode) {
case 'h':
y = (1 - inst.color.getHSV().h) * div.height();
break;
case 's':
y = (1 - inst.color.getHSV().s) * div.height();
$('.ui-colorpicker-bar-layer-2', e).css('opacity', 1 - inst.color.getHSV().v);
$(e).css('background-color', inst.color.copy().normalize().toCSS());
break;
case 'v':
y = (1 - inst.color.getHSV().v) * div.height();
$(e).css('background-color', inst.color.copy().normalize().toCSS());
break;
case 'r':
y = (1 - inst.color.getRGB().r) * div.height();
$('.ui-colorpicker-bar-layer-2', e).css('opacity', Math.max(0, (inst.color.getRGB().b - inst.color.getRGB().g)));
$('.ui-colorpicker-bar-layer-3', e).css('opacity', Math.max(0, (inst.color.getRGB().g - inst.color.getRGB().b)));
$('.ui-colorpicker-bar-layer-4', e).css('opacity', Math.min(inst.color.getRGB().b, inst.color.getRGB().g));
break;
case 'g':
y = (1 - inst.color.getRGB().g) * div.height();
$('.ui-colorpicker-bar-layer-2', e).css('opacity', Math.max(0, (inst.color.getRGB().b - inst.color.getRGB().r)));
$('.ui-colorpicker-bar-layer-3', e).css('opacity', Math.max(0, (inst.color.getRGB().r - inst.color.getRGB().b)));
$('.ui-colorpicker-bar-layer-4', e).css('opacity', Math.min(inst.color.getRGB().r, inst.color.getRGB().b));
break;
case 'b':
y = (1 - inst.color.getRGB().b) * div.height();
$('.ui-colorpicker-bar-layer-2', e).css('opacity', Math.max(0, (inst.color.getRGB().r - inst.color.getRGB().g)));
$('.ui-colorpicker-bar-layer-3', e).css('opacity', Math.max(0, (inst.color.getRGB().g - inst.color.getRGB().r)));
$('.ui-colorpicker-bar-layer-4', e).css('opacity', Math.min(inst.color.getRGB().r, inst.color.getRGB().g));
break;
case 'a':
y = (1 - inst.color.getAlpha()) * div.height();
$(e).css('background-color', inst.color.copy().normalize().toCSS());
break;
}
if (inst.mode !== 'a') {
$('.ui-colorpicker-bar-layer-alpha', e).css('opacity', 1 - inst.color.getAlpha());
}
$('.ui-colorpicker-bar-pointer', e).css('top', y - 3);
};
this.init = function () {
e = $(_html()).appendTo($('.ui-colorpicker-bar-container', inst.dialog));
e.bind('mousedown', _mousedown);
};
},
preview: function (inst) {
var that = this,
e = null,
_html;
_html = function () {
return '
'
+ '
'
+ '
'
+ '
';
};
this.init = function () {
e = $(_html()).appendTo($('.ui-colorpicker-preview-container', inst.dialog));
$('.ui-colorpicker-preview-initial', e).click(function () {
inst.color = inst.currentColor.copy();
inst._change();
});
};
this.update = function () {
if (inst.options.alpha) {
$('.ui-colorpicker-preview-initial-alpha, .ui-colorpicker-preview-current-alpha', e).show();
} else {
$('.ui-colorpicker-preview-initial-alpha, .ui-colorpicker-preview-current-alpha', e).hide();
}
this.repaint();
};
this.repaint = function () {
$('.ui-colorpicker-preview-initial', e).css('background-color', inst.currentColor.toCSS()).attr('title', inst.currentColor.toHex());
$('.ui-colorpicker-preview-initial-alpha', e).css('opacity', 1 - inst.currentColor.getAlpha());
$('.ui-colorpicker-preview-current', e).css('background-color', inst.color.toCSS()).attr('title', inst.color.toHex());
$('.ui-colorpicker-preview-current-alpha', e).css('opacity', 1 - inst.color.getAlpha());
};
},
hsv: function (inst) {
var that = this,
e = null,
_html;
_html = function () {
var html = '';
if (inst.options.hsv) {
html += '
°
'
+ '
%
'
+ '
%
';
}
return '
' + html + '
';
};
this.init = function () {
e = $(_html()).appendTo($('.ui-colorpicker-hsv-container', inst.dialog));
$('.ui-colorpicker-mode', e).click(function () {
inst.mode = $(this).val();
inst._updateAllParts();
});
$('.ui-colorpicker-number', e).bind('change keyup', function () {
inst.color.setHSV(
$('.ui-colorpicker-hsv-h .ui-colorpicker-number', e).val() / 360,
$('.ui-colorpicker-hsv-s .ui-colorpicker-number', e).val() / 100,
$('.ui-colorpicker-hsv-v .ui-colorpicker-number', e).val() / 100
);
inst._change();
});
};
this.repaint = function () {
var hsv = inst.color.getHSV();
hsv.h *= 360;
hsv.s *= 100;
hsv.v *= 100;
$.each(hsv, function (index, value) {
var input = $('.ui-colorpicker-hsv-' + index + ' .ui-colorpicker-number', e);
value = Math.round(value);
if (input.val() !== value) {
input.val(value);
}
});
};
this.update = function () {
$('.ui-colorpicker-mode', e).each(function () {
$(this).attr('checked', $(this).val() === inst.mode);
});
this.repaint();
};
},
rgb: function (inst) {
var that = this,
e = null,
_html;
_html = function () {
var html = '';
if (inst.options.rgb) {
html += ''
+ ''
+ '';
}
return '
' + html + '
';
};
this.init = function () {
e = $(_html()).appendTo($('.ui-colorpicker-rgb-container', inst.dialog));
$('.ui-colorpicker-mode', e).click(function () {
inst.mode = $(this).val();
inst._updateAllParts();
});
$('.ui-colorpicker-number', e).bind('change keyup', function () {
inst.color.setRGB(
$('.ui-colorpicker-rgb-r .ui-colorpicker-number', e).val() / 255,
$('.ui-colorpicker-rgb-g .ui-colorpicker-number', e).val() / 255,
$('.ui-colorpicker-rgb-b .ui-colorpicker-number', e).val() / 255
);
inst._change();
});
};
this.repaint = function () {
$.each(inst.color.getRGB(), function (index, value) {
var input = $('.ui-colorpicker-rgb-' + index + ' .ui-colorpicker-number', e);
value = Math.round(value * 255);
if (input.val() !== value) {
input.val(value);
}
});
};
this.update = function () {
$('.ui-colorpicker-mode', e).each(function () {
$(this).attr('checked', $(this).val() === inst.mode);
});
this.repaint();
};
},
lab: function (inst) {
var that = this,
part = null,
html = function () {
var html = '';
if (inst.options.hsv) {
html += ''
+ ''
+ '';
}
return '
' + html + '
';
};
this.init = function () {
var data = 0;
part = $(html()).appendTo($('.ui-colorpicker-lab-container', inst.dialog));
$('.ui-colorpicker-number', part).on('change keyup', function (event) {
inst.color.setLAB(
parseInt($('.ui-colorpicker-lab-l .ui-colorpicker-number', part).val(), 10) / 100,
(parseInt($('.ui-colorpicker-lab-a .ui-colorpicker-number', part).val(), 10) + 128) / 255,
(parseInt($('.ui-colorpicker-lab-b .ui-colorpicker-number', part).val(), 10) + 128) / 255
);
inst._change();
});
};
this.repaint = function () {
var lab = inst.color.getLAB();
lab.l *= 100;
lab.a = (lab.a * 255) - 128;
lab.b = (lab.b * 255) - 128;
$.each(lab, function (index, value) {
var input = $('.ui-colorpicker-lab-' + index + ' .ui-colorpicker-number', part);
value = Math.round(value);
if (input.val() !== value) {
input.val(value);
}
});
};
this.update = function () {
this.repaint();
};
},
cmyk: function (inst) {
var that = this,
part = null,
html = function () {
var html = '';
if (inst.options.hsv) {
html += '
%
'
+ '
%
'
+ '
%
'
+ '
%
';
}
return '
' + html + '
';
};
this.init = function () {
part = $(html()).appendTo($('.ui-colorpicker-cmyk-container', inst.dialog));
$('.ui-colorpicker-number', part).on('change keyup', function (event) {
inst.color.setCMYK(
parseInt($('.ui-colorpicker-cmyk-c .ui-colorpicker-number', part).val(), 10) / 100,
parseInt($('.ui-colorpicker-cmyk-m .ui-colorpicker-number', part).val(), 10) / 100,
parseInt($('.ui-colorpicker-cmyk-y .ui-colorpicker-number', part).val(), 10) / 100,
parseInt($('.ui-colorpicker-cmyk-k .ui-colorpicker-number', part).val(), 10) / 100
);
inst._change();
});
};
this.repaint = function () {
$.each(inst.color.getCMYK(), function (index, value) {
var input = $('.ui-colorpicker-cmyk-' + index + ' .ui-colorpicker-number', part);
value = Math.round(value * 100);
if (input.val() !== value) {
input.val(value);
}
});
};
this.update = function () {
this.repaint();
};
},
alpha: function (inst) {
var that = this,
e = null,
_html;
_html = function () {
var html = '';
if (inst.options.alpha) {
html += '
%
';
}
return '
' + html + '
';
};
this.init = function () {
e = $(_html()).appendTo($('.ui-colorpicker-alpha-container', inst.dialog));
$('.ui-colorpicker-mode', e).click(function () {
inst.mode = $(this).val();
inst._updateAllParts();
});
$('.ui-colorpicker-number', e).bind('change keyup', function () {
inst.color.setAlpha($('.ui-colorpicker-a .ui-colorpicker-number', e).val() / 100);
inst._change();
});
};
this.update = function () {
$('.ui-colorpicker-mode', e).each(function () {
$(this).attr('checked', $(this).val() === inst.mode);
});
this.repaint();
};
this.repaint = function () {
var input = $('.ui-colorpicker-a .ui-colorpicker-number', e),
value = Math.round(inst.color.getAlpha() * 100);
if (!input.is(':focus') && input.val() !== value) {
input.val(value);
}
};
},
hex: function (inst) {
var that = this,
e = null,
_html;
_html = function () {
var html = '';
if (inst.options.alpha) {
html += '';
}
html += '';
return '
' + html + '
';
};
this.init = function () {
e = $(_html()).appendTo($('.ui-colorpicker-hex-container', inst.dialog));
// repeat here makes the invalid input disappear faster
$('.ui-colorpicker-hex-input', e).bind('change keydown keyup', function (a, b, c) {
if (/[^a-fA-F0-9]/.test($(this).val())) {
$(this).val($(this).val().replace(/[^a-fA-F0-9]/, ''));
}
});
$('.ui-colorpicker-hex-input', e).bind('change keyup', function () {
// repeat here makes sure that the invalid input doesn't get parsed
inst.color = _parseHex($(this).val()).setAlpha(inst.color.getAlpha());
inst._change();
});
$('.ui-colorpicker-hex-alpha', e).bind('change keydown keyup', function () {
if (/[^a-fA-F0-9]/.test($(this).val())) {
$(this).val($(this).val().replace(/[^a-fA-F0-9]/, ''));
}
});
$('.ui-colorpicker-hex-alpha', e).bind('change keyup', function () {
inst.color.setAlpha(parseInt($('.ui-colorpicker-hex-alpha', e).val(), 16) / 255);
inst._change();
});
};
this.update = function () {
this.repaint();
};
this.repaint = function () {
if (!$('.ui-colorpicker-hex-input', e).is(':focus')) {
$('.ui-colorpicker-hex-input', e).val(inst.color.toHex(true));
}
if (!$('.ui-colorpicker-hex-alpha', e).is(':focus')) {
$('.ui-colorpicker-hex-alpha', e).val(_intToHex(inst.color.getAlpha() * 255));
}
};
},
swatches: function (inst) {
var that = this,
part = null,
html = function () {
var html = '';
$.each(inst.options.swatches, function (name, color) {
var c = new Color(color.r, color.g, color.b),
css = c.toCSS();
html += '';
});
return '
' + html + '
';
};
this.init = function () {
part = $(html()).appendTo($('.ui-colorpicker-swatches-container', inst.dialog));
$('.ui-colorpicker-swatch', part).click(function () {
inst.color = _parseColor($(this).css('background-color'));
inst._change();
});
};
},
footer: function (inst) {
var that = this,
part = null,
id_transparent = 'ui-colorpicker-special-transparent-'+_colorpicker_index,
id_none = 'ui-colorpicker-special-none-'+_colorpicker_index,
html = function () {
var html = '';
if (inst.options.alpha || (!inst.inline && inst.options.showNoneButton)) {
html += '
';
if (inst.options.alpha) {
html += '';
}
if (!inst.inline && inst.options.showNoneButton) {
html += '';
}
html += '
';
}
if (!inst.inline) {
html += '
';
if (inst.options.showCancelButton) {
html += '';
}
html += '';
html += '