Author: bpapez
Date: Thu Sep 13 17:06:02 2007
New Revision: 18436
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18436&repname=
=3Djahia
Log:
http://www.jahia.net/jira/browse/JAHIA-2217:
SP3: Keeping the op/compare and op/preview paramater from one page to the o=
ther
Modified:
branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/params/ProcessingC=
ontext.java
branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/topbar/operation=
buttons.inc
Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/params/Proce=
ssingContext.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/params/ProcessingContext.java&rev=3D18436&r=
epname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/params/ProcessingC=
ontext.java (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/params/ProcessingC=
ontext.java Thu Sep 13 17:06:02 2007
@@ -3199,7 +3199,7 @@
// }
=
// if the page is not found, throw the associated exception
- if ((getOpMode().equals(NORMAL) || getOpMode().equals(COMPARE))
+ if (NORMAL.equals(getOpMode())
&& !getContentPage().hasActiveEntries()
&& deleteVersionID =3D=3D -1) {
=
@@ -3421,7 +3421,7 @@
: NORMAL);
}
=
- if ((NORMAL.equals(getOpMode()) || COMPARE.equals(getOpMode()))
+ if (NORMAL.equals(getOpMode())
&& !getContentPage().hasActiveEntries() && canEditCurrentP=
age()) {
try {
final int deleteVersionID =3D getContentPage()
Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/topbar/ope=
rationbuttons.inc
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/webapp/jsp/jahia/topbar/operationbuttons.inc&rev=3D18436&r=
epname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/topbar/operation=
buttons.inc (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/topbar/operation=
buttons.inc Thu Sep 13 17:06:02 2007
@@ -28,7 +28,6 @@
ContentPage thecontentPage =3D jData.getProcessingContext().ge=
tContentPage();
String thelocale =3D jParams.getLocale().toString();
boolean hasActiveEntries =3D thecontentPage.hasEntries(Content=
Page.ACTIVE_PAGE_INFOS, thelocale);
- String pageTitle =3D thecontentPage.getTitle(jData.getProcessi=
ngContext());
=
boolean isAvailable =3D true;
//check the isAvailable only if tbp display activated
@@ -56,30 +55,10 @@
Integer languageState =3D (Integer) languagesStates.get(th=
elocale);
if ( !jData.gui().isNormalMode() ){
// Display Preview & compare buttons
- boolean displayPreview =3D false;
- boolean isSharedInStaging_1 =3D false;
- Integer sharedState_1 =3D (Integer) languagesStates.get("s=
hared");
- boolean isMarkedForDelete =3D thecontentPage.isStagedEntry=
MarkedForDeletion(thelocale);
- if (sharedState_1 !=3D null) {
- if (sharedState_1.intValue() > EntryLoadRequest.ACTIVE=
_WORKFLOW_STATE) {
- isSharedInStaging_1 =3D true;
- displayPreview =3D true;
- }
- }
- if (!displayPreview && languageState !=3D null) {
- if (languageState.intValue() > EntryLoadRequest.ACTIVE=
_WORKFLOW_STATE) {
- displayPreview =3D true;
- }
- }
- if (isMarkedForDelete)
- {
- displayPreview =3D false;
- isSharedInStaging_1 =3D false;
- }
-
- displayPreview =3D (displayPreview && isAvailable && (page=
Title !=3D null) );
-
- if ((displayPreview || isSharedInStaging_1 || jData.gui().=
isCompareMode()) && writeAccess) {
+ =
+ if (writeAccess) {
+ boolean displayPreview =3D (!thecontentPage.isStagedEn=
tryMarkedForDeletion(thelocale) && isAvailable);
+ =
if (displayPreview) {
//String previewUrl =3D jData.gui().drawPreviewMod=
eLink();
%>
@@ -92,7 +71,6 @@
</li>
<%
}
- if (hasActiveEntries) {
//String compareUrl =3D jData.gui().drawRevDifferenceM=
odeLink(1, jData.params().getOperationMode());
%>
<li <%=3D jData.gui().isCompareMode() ? "class=3D'selected'" : ""%=
>>
@@ -103,7 +81,6 @@
</a>
</li>
<%
- }
}
}
// Display Edit button
_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list