Search and Top Navigation
#3260 closed bug (notabug)
Opened August 28, 2008 10:55AM UTC
Closed August 30, 2008 09:15PM UTC
Last modified October 11, 2012 09:15PM UTC
dialog: toJSONString button
Reported by: | d.paviani@cesop.it | Owned by: | scottgonzalez |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ui.dialog | Version: | 1.6b |
Keywords: | dialog, buttons | Cc: | |
Blocked by: | Blocking: |
Description
in my javascript code i have this function:
Object.prototype.toJSONString = function (w) ....
so every object has this function.
if i create a UI jQuery dialog i get a [toJSONString] button even if i don't declare any buttons in the dialog options (and also if i declare some buttons)
i suppose that any function added to Object.prototype will produce a button in the dialog.
isn't it better to avoid this behavior and insert a way to remove unwanted buttons or to show only desired ones?
Yes, it's possible for us to skip this property and not create a button for it. However, you should never modify Object.prototype. This is unsupported by jQuery and jQuery UI.