Skip to content

Commit

Permalink
Refactor clear button title to a 'clearText' option for i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
nedk committed Jan 25, 2014
1 parent 37bdf4e commit 0a96436
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spectrum.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
maxSelectionSize: 7,
cancelText: "cancel",
chooseText: "choose",
clearText: "Clear Color Selection",
preferredFormat: false,
className: "",
showAlpha: false,
Expand Down Expand Up @@ -86,7 +87,7 @@
"</div>",
"</div>",
"</div>",
"<div class='sp-clear sp-clear-display' title='Clear Color Selection'>",
"<div class='sp-clear sp-clear-display'>",
"</div>",
"<div class='sp-hue'>",
"<div class='sp-slider'></div>",
Expand Down Expand Up @@ -315,6 +316,7 @@
hide("cancel");
});

clearButton.attr("title", opts.clearText);
clearButton.bind("click.spectrum", function (e) {
e.stopPropagation();
e.preventDefault();
Expand Down

0 comments on commit 0a96436

Please sign in to comment.