From fff2b6a32927aa3010b79dfe8a2569ed126e692b Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Tue, 15 Dec 2009 21:30:43 +0100 Subject: [PATCH] Improvements historization. --- gen/plone25/mixins/__init__.py | 5 +- gen/plone25/skin/import.pt | 8 +- gen/plone25/skin/macros.pt | 11 ++- gen/plone25/skin/ref.pt | 7 +- gen/plone25/templates/Styles.css.dtml | 103 +++++++------------------- 5 files changed, 49 insertions(+), 85 deletions(-) diff --git a/gen/plone25/mixins/__init__.py b/gen/plone25/mixins/__init__.py index 535dea5..8afe3ed 100644 --- a/gen/plone25/mixins/__init__.py +++ b/gen/plone25/mixins/__init__.py @@ -163,7 +163,10 @@ class AbstractMixin: modified values.''' # Remove from previousData all values that were not changed for fieldName in previousData.keys(): - if getattr(self, fieldName) == previousData[fieldName][0]: + prev = previousData[fieldName][0] + curr = getattr(self, fieldName) + if (prev == curr) or ((prev == None) and (curr == '')) or \ + ((prev == '') and (curr == None)): del previousData[fieldName] if previousData: # Create the event to add in the history diff --git a/gen/plone25/skin/import.pt b/gen/plone25/skin/import.pt index 85e493d..7bfffdf 100644 --- a/gen/plone25/skin/import.pt +++ b/gen/plone25/skin/import.pt @@ -79,7 +79,7 @@


- +
+ style python:test(alreadyImported, 'display:none', 'display:table-row'); + class python:test(odd, 'even', 'odd')">
diff --git a/gen/plone25/skin/macros.pt b/gen/plone25/skin/macros.pt index 87e6844..c5429ef 100644 --- a/gen/plone25/skin/macros.pt +++ b/gen/plone25/skin/macros.pt @@ -316,8 +316,8 @@ Display the previous values of the fields whose value were modified in this change. - - + + @@ -669,7 +669,7 @@
+ class="listing nosort" width="100%" cellpadding="0" cellspacing="0"> Every item in fieldDescr is a FieldDescr instance, excepted for workflow state (which is not a field): in this case it is simply the string "workflowState". @@ -723,7 +723,9 @@ Results - + + Mandatory column "Title"/"Name" +
Appy (bottom) navigation diff --git a/gen/plone25/skin/ref.pt b/gen/plone25/skin/ref.pt index e6bf1b7..5129be3 100644 --- a/gen/plone25/skin/ref.pt +++ b/gen/plone25/skin/ref.pt @@ -178,7 +178,7 @@
Show forward reference(s) - @@ -195,7 +195,9 @@ - + + Object title, shown here if not specified somewhere else in appyType.shownInfo. +
diff --git a/gen/plone25/templates/Styles.css.dtml b/gen/plone25/templates/Styles.css.dtml index 32ab1e4..d17ea1e 100644 --- a/gen/plone25/templates/Styles.css.dtml +++ b/gen/plone25/templates/Styles.css.dtml @@ -2,58 +2,31 @@ /* (do not remove this :) */ /* (not this either :) */ -#portal-breadcrumbs { - display: none; +#portal-breadcrumbs { display: none; } +#importedElem { color: grey; font-style: italic; } + +.appyList { line-height: 1.1em; margin: 0 0 0.5em 1.2em; padding: 0; } +.appyBullet { margin: 0; } +.appyPod { float:right; } +.appyNav { padding: 0.4em 0 0.4em 0; } +.appyFocus { color: #900101; } +.appyTabs { margin-bottom: 1em; } +.appyTabs li a { border-bottom:1px solid transparent; font-size: 90%; } +.appyTabs li a:visited { color: #578308; } +.appyTitle { padding-top: 0.5em; font-size: 110%; } +.appyLabel { font-weight: bold; padding-right: 0.4em; } +.appyRefEdit { line-height: 1.5em; } + +.appyWorkflow { + text-align: center; + background-color: &dtml-globalBackgroundColor;; } -.appyList { - line-height: 1.1em; - margin: 0 0 0.5em 1.2em; - padding: 0; -} - -.appyBullet { - margin: 0; -} - -.appyPod { - float:right; -} - -.appyNav { - padding: 0.4em 0 0.4em 0; -} - -.appyFocus { - color: #900101; -} - -#importedElem { - color: grey; - font-style: italic; -} - -.appyTabs { - margin-bottom: 1em; -} - -.appyTabs li a { - border-bottom:1px solid transparent; - font-size: 90%; -} - -.appyTabs li a:visited { - color: #578308; -} - -.appyTitle { - padding-top: 0.5em; - font-size: 110%; -} - -.appyLabel { - font-weight: bold; - padding-right: 0.4em; +.appyPlusImg { + vertical-align: top; + position: relative; + left: -1.4em; + top: -0.55em; } .appyPhase { @@ -97,7 +70,7 @@ font-size: 105%; } -/* stepxx classes are used for displaying status of a phase or state. */ +/* Following classes are used for displaying status of a phase or state. */ .stepDone { background-color: #cde2a7; background-image: url(&dtml-portal_url;/skyn/done.png); @@ -122,17 +95,6 @@ background-color: #ffffff; } -.appyPlusImg { - vertical-align: top; - position: relative; - left: -1.4em; - top: -0.55em; -} - -.appyRefEdit { - line-height: 1.5em; -} - .appyCommonInfo { border-color: #ffa500; background-color: &dtml-evenRowBackgroundColor;; @@ -141,24 +103,15 @@ margin-bottom: 0.5em; } -.appyWorkflow { - text-align: center; - background-color: &dtml-globalBackgroundColor;; -} - -dl.expandedInlineCollapsible dt.collapsibleHeader, dl.expandedBlockCollapsible dt.collapsibleHeader { - background:#dee7ec url(treeExpanded.gif) no-repeat scroll 6px 50%; - border-width 1px; - border-color: #8cacbb; - border-style: solid; - border-width: thin; -} - /* With fields layout in columns, standard error frame is too large */ .error { padding: 0.4em; } +.odd { + background-color: white; +} + /* Table styles */ .no-style-table { border: 0 !important;