diff --git a/gen/descriptors.py b/gen/descriptors.py index 40b05dd..1010f3d 100644 --- a/gen/descriptors.py +++ b/gen/descriptors.py @@ -564,11 +564,6 @@ class ToolClassDescriptor(ClassDescriptor): fieldType = gen.Boolean(default=defaultValue, page='userInterface', group=groupName) self.addField(fieldName, fieldType) - # Adds the boolean field for showing or not the field "enter comments". - fieldName = 'showWorkflowCommentFieldFor%s' % className - fieldType = gen.Boolean(default=defaultValue, page='userInterface', - group=groupName) - self.addField(fieldName, fieldType) # Adds the boolean field for showing all states in current state or not. # If this boolean is True but the current phase counts only one state, # we will not show the state at all: the fact of knowing in what phase diff --git a/gen/installer.py b/gen/installer.py index 119b60d..3e14f06 100644 --- a/gen/installer.py +++ b/gen/installer.py @@ -417,6 +417,8 @@ class ZopeInstaller: self.configureSessions() self.installBaseObjects() self.installCatalog() + # The following line cleans and rebuilds the catalog entirely. + #self.app.config.appy().refreshCatalog() self.installTool() self.installUi() # Perform migrations if required diff --git a/gen/mixins/__init__.py b/gen/mixins/__init__.py index 9442dd8..2371654 100644 --- a/gen/mixins/__init__.py +++ b/gen/mixins/__init__.py @@ -896,7 +896,11 @@ class BaseMixin: self.log('Wrong workflow info for a "%s"; is not in state "%s".' % \ (self.meta_type, stateName)) # Update permission attributes on the object if required - return state.updatePermissions(wf, self) + updated = state.updatePermissions(wf, self) + if updated: + # Reindex the object because security-related info is indexed. + self.reindex() + return updated def hasHistory(self): '''Has this object an history?''' diff --git a/gen/model.py b/gen/model.py index fdcae24..97b1a40 100644 --- a/gen/model.py +++ b/gen/model.py @@ -188,7 +188,7 @@ class Translation(ModelClass): toolFieldPrefixes = ('defaultValue', 'podTemplate', 'formats', 'resultColumns', 'enableAdvancedSearch', 'numberOfSearchColumns', 'searchFields', 'optionalFields', 'showWorkflow', - 'showWorkflowCommentField', 'showAllStatesInPhase') + 'showAllStatesInPhase') defaultToolFields = ('title', 'users', 'groups', 'translations', 'enableNotifications', 'unoEnabledPython','openOfficePort', 'numberOfResultsPerPage', 'listBoxesMaximumWidth', diff --git a/gen/po.py b/gen/po.py index a0493a0..b003c99 100644 --- a/gen/po.py +++ b/gen/po.py @@ -38,9 +38,6 @@ class PoMessage: MSG_searchFields = "Search fields" MSG_optionalFields = 'Optional fields' MSG_showWorkflow = 'Show workflow-related information' - MSG_showWorkflowCommentField = 'Show field allowing to enter a ' \ - 'comment every time a transition is ' \ - 'triggered' MSG_showAllStatesInPhase = 'Show all states in phase' POD_ASKACTION = 'Trigger related action' REF_NO = 'No object.' diff --git a/gen/ui/appy.css b/gen/ui/appy.css index 8deaadf..4a42c60 100644 --- a/gen/ui/appy.css +++ b/gen/ui/appy.css @@ -9,6 +9,7 @@ table { font-size: 100%; border-spacing: 0px; border-collapse:collapse;} form { margin: 0; padding: 0;} p { margin: 0;} acronym {cursor: help;} +input { font: 92% Helvetica,Arial,sans-serif } input[type=image] { border: 0; background: none; } input[type=checkbox] { border: 0; background: none; cursor: pointer;} input[type=radio] { border: 0; background: none; cursor: pointer;} @@ -44,6 +45,8 @@ img {border: 0} border-top: 1px solid #5F7983; border-bottom: 1px solid #5F7983; } .login { margin-top: 2px; margin-bottom: 2px; color: white;} .buttons { margin-left: 4px;} +.fakeButton { border: 1px solid #D7DEE4; background-color: #fde8e0; + padding: 0px 8px 2px; font: italic 92% Helvetica,Arial,sans-serif} .message { color: #fd9c03; position: absolute; top: -55px; left: 100px; width: 700px; border: 1px black dashed; padding: 2px 6px; background-color: #f4f5f6} diff --git a/gen/ui/appy.js b/gen/ui/appy.js index 928df5a..96755be 100644 --- a/gen/ui/appy.js +++ b/gen/ui/appy.js @@ -307,7 +307,7 @@ function triggerTransition(transitionId, msg) { theForm.submit(); } else { // Ask the user to confirm. - askConfirm('form', 'triggerTransitionForm', msg); + askConfirm('form', 'triggerTransitionForm', msg, true); } } @@ -409,13 +409,17 @@ function closePopup(popupId) { } // Function triggered when an action needs to be confirmed by the user -function askConfirm(actionType, action, msg) { +function askConfirm(actionType, action, msg, showComment) { /* Store the actionType (send a form, call an URL or call a script) and the related action, and shows the confirm popup. If the user confirms, we - will perform the action. */ + will perform the action. If p_showComment is true, an input field allowing + to enter a comment will be shown in the popup. */ var confirmForm = document.getElementById('confirmActionForm'); confirmForm.actionType.value = actionType; confirmForm.action.value = action; + var commentArea = document.getElementById('commentArea'); + if (showComment) commentArea.style.display = "block"; + else commentArea.style.display = "none"; openPopup("confirmActionPopup", msg); } @@ -427,8 +431,14 @@ function doConfirm() { var actionType = confirmForm.actionType.value; var action = confirmForm.action.value; if (actionType == 'form') { - // We must submit the form whose id is in "action" - document.getElementById(action).submit(); + /* Submit the form whose id is in "action", and transmmit him the comment + from the popup when relevant */ + var theForm = document.getElementById(action); + if ((confirmForm.comment.style.display != 'none') && + (confirmForm.comment.value)) { + theForm.comment.value = confirmForm.comment.value; + } + theForm.submit(); } else if (actionType == 'url') { // We must go to the URL defined in "action" diff --git a/gen/ui/page.pt b/gen/ui/page.pt index 7f1c054..13ddb39 100644 --- a/gen/ui/page.pt +++ b/gen/ui/page.pt @@ -88,8 +88,9 @@
- - - | - +
+ + + + + /api + cortex sync push --api http:// |