Skip to content

Commit

Permalink
Bugfix: Trigger onChangeObjEvt on Obj move (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
admbzts committed Jul 14, 2023
1 parent 19b5163 commit 1cde313
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Products/zms/zmsobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')%("<i>%s</i>"%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))
Expand All @@ -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')%("<i>%s</i>"%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))
Expand All @@ -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',[])
Expand Down

0 comments on commit 1cde313

Please sign in to comment.