From 1cde31375b91a866e8217896f6e3ae7113e88a8a Mon Sep 17 00:00:00 2001 From: admbzts Date: Fri, 14 Jul 2023 08:34:40 +0200 Subject: [PATCH] Bugfix: Trigger onChangeObjEvt on Obj move (#157) --- Products/zms/zmsobject.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Products/zms/zmsobject.py b/Products/zms/zmsobject.py index a9efc8ce0..ef149ad30 100644 --- a/Products/zms/zmsobject.py +++ b/Products/zms/zmsobject.py @@ -1417,6 +1417,7 @@ def manage_moveObjUp(self, lang, REQUEST, RESPONSE): sort_id = self.getSortId() self.setSortId(sort_id - 15) parent.normalizeSortIds(standard.id_prefix(self.id)) + standard.triggerEvent(self,'onChangeObjEvt') # Return with message. message = self.getZMILangStr('MSG_MOVEDOBJUP')%("%s"%self.display_type(REQUEST)) RESPONSE.redirect('%s/manage_main?lang=%s&manage_tabs_message=%s#zmi_item_%s'%(parent.absolute_url(), lang, standard.url_quote(message), self.id)) @@ -1433,6 +1434,7 @@ def manage_moveObjDown(self, lang, REQUEST, RESPONSE): sort_id = self.getSortId() self.setSortId(sort_id + 15) parent.normalizeSortIds(standard.id_prefix(self.id)) + standard.triggerEvent(self,'onChangeObjEvt') # Return with message. message = self.getZMILangStr('MSG_MOVEDOBJDOWN')%("%s"%self.display_type(REQUEST)) RESPONSE.redirect('%s/manage_main?lang=%s&manage_tabs_message=%s#zmi_item_%s'%(parent.absolute_url(), lang, standard.url_quote(message), self.id)) @@ -1459,6 +1461,7 @@ def manage_moveObjToPos(self, lang, pos, fmt=None, REQUEST=None, RESPONSE=None): new_sort_id = int(sibling_sort_ids[-1][1:])+1 self.setSortId(new_sort_id) parent.normalizeSortIds(id_prefix) + standard.triggerEvent(self,'onChangeObjEvt') else: id = REQUEST['URL'].split('/')[-2] ids = self.getConfProperty('Portal.Clients',[])