Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed sorting answers, added delete answer
- Loading branch information
Showing
7 changed files
with
74 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# coding: utf-8 | ||
# This code was developed for http://bluebream.ru by its community and | ||
# placed under Public Domain. | ||
|
||
""" Удалить ответ. | ||
""" | ||
|
||
from z3c.form import form, button | ||
|
||
class Ajax(form.Form): | ||
|
||
@button.buttonAndHandler(u"Удалить", name="delete") | ||
def handleDelete(self, action): | ||
name = self.context.__name__ | ||
parent = self.context.__parent__ | ||
del parent[name] | ||
|
||
@button.buttonAndHandler(u"Отмена", name="cancel") | ||
def handleCancel(*args): pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters