FIXED: Issue with duplicate help tips appearing on select fields in CMS. See Security / Groups / Edit Group form field for example.

This commit is contained in:
Damian Mooyman 2012-09-25 13:37:17 +12:00
parent 2b172aa891
commit 495ffb033c

View File

@ -6,15 +6,17 @@
*/
$(".cms form .field .middleColumn > [title]").entwine({
onmatch: function() {
var title = this.prop("title");
var field = this.closest(".field");
if(title && title.length) {
if(title && title.length && field.has('.help').length == 0) {
var span = $("<span></span>", {
"class": "help",
"text": title
});
this.closest(".field").append(span);
field.append(span);
this.removeProp("title");
}