for (var $i = 0, $length = $colors.length; $i < $length; $i++) {
var $color = $colors[$i];
- var $swatch = $('<a />').data('color', $color).css('background-color', $color);
+ var $swatch = $('<a href="#" />').data('color', $color).css('background-color', $color);
$dropdown.append($swatch);
$swatch.click($.proxy(this._onColorPick, this));
}
- var $elNone = $('<a />').html(this.opts.curLang.none).data('color', 'none');
+ var $elNone = $('<a href="#" />').html(this.opts.curLang.none).data('color', 'none');
$elNone.click($.proxy(this._onColorPick, this));
$dropdown.append($elNone);
_onColorPick: function(event) {
event.preventDefault();
- //this.bufferSet();
-
- //this.$editor.focus();
-
var $color = $(event.currentTarget).data('color');
if ($color === 'none') {
this.inlineRemoveStyle('color');
else {
this.inlineSetStyle('color', $color);
}
-
- /*if (this.opts.air) this.$air.fadeOut(100);
- this.sync();*/
}
};
\ No newline at end of file
$dropdown['fontSize' + $i] = {
title: $fontSize,
className: 'wfontsize-' + $fontSize,
- callback: function() {
- self.inlineSetStyle('font-size', $fontSize + 'pt');
+ fontSize: $fontSize,
+ callback: function(name, button, object, event) {
+ self.inlineSetStyle('font-size', object.fontSize + 'pt');
}
};
}