noconfirm in grid, thanks Niphlod

This commit is contained in:
mdipierro
2013-03-09 09:36:17 -06:00
parent 8e5be952bf
commit 810aa8f4f3
3 changed files with 18 additions and 15 deletions
+2 -2
View File
@@ -1479,7 +1479,7 @@ class A(DIV):
self['_href'] = self['_href'] or '#null'
elif self['callback']:
returnfalse = "var e = arguments[0] || window.event; e.cancelBubble=true; if (e.stopPropagation) {e.stopPropagation(); e.stopImmediatePropagation(); e.preventDefault();}"
if d:
if d and not self['noconfirm']:
self['_onclick'] = "if(confirm(w2p_ajax_confirm_message||'Are you sure you want to delete this object?')){ajax('%s',[],'%s');%s};%s" % \
(self['callback'], self['target'] or '', d, returnfalse)
else:
@@ -2305,7 +2305,7 @@ class BEAUTIFY(DIV):
for c in self.components:
if hasattr(c, 'value') and not callable(c.value):
if c.value:
components.append(c.value)
components.append(c.value)
if hasattr(c, 'xml') and callable(c.xml):
components.append(c)
continue