Serveral small bug fixes and cleanups.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2594 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
77f8047586
commit
069be900f6
|
|
@ -20,8 +20,8 @@ import org.apache.log4j.Logger;
|
||||||
/**
|
/**
|
||||||
* An abstract listener for {@link ImageComponent}.
|
* An abstract listener for {@link ImageComponent}.
|
||||||
*
|
*
|
||||||
* This listener provides the base implementation which is shared between all
|
* This listener provides the base implementation which is shared between all listeners of this
|
||||||
* listeners of this kind.
|
* kind.
|
||||||
*
|
*
|
||||||
* This listerner is used by {@link ImageSelectPage}.
|
* This listerner is used by {@link ImageSelectPage}.
|
||||||
*
|
*
|
||||||
|
|
@ -50,10 +50,10 @@ public abstract class ImageComponentAbstractListener implements FormInitListener
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call {@link #cancelled(com.arsdigita.bebop.PageState)} if the cancel
|
* Call {@link #cancelled(com.arsdigita.bebop.PageState)} if the cancel button was pressed.
|
||||||
* button was pressed.
|
|
||||||
*
|
*
|
||||||
* @param event the {@link FormSectionEvent}
|
* @param event the {@link FormSectionEvent}
|
||||||
|
*
|
||||||
* @throws FormProcessException
|
* @throws FormProcessException
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -73,6 +73,7 @@ public abstract class ImageComponentAbstractListener implements FormInitListener
|
||||||
* if the save button was pressed.
|
* if the save button was pressed.
|
||||||
*
|
*
|
||||||
* @param event the {@link FormSectionEvent}
|
* @param event the {@link FormSectionEvent}
|
||||||
|
*
|
||||||
* @throws FormProcessException
|
* @throws FormProcessException
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -108,7 +109,8 @@ public abstract class ImageComponentAbstractListener implements FormInitListener
|
||||||
* @param component an {@link ImageComponent}
|
* @param component an {@link ImageComponent}
|
||||||
* @param image the {@link ReusableImageAsset}
|
* @param image the {@link ReusableImageAsset}
|
||||||
*/
|
*/
|
||||||
protected abstract void processImage(FormSectionEvent event, PageState ps, ImageComponent component, ReusableImageAsset image);
|
protected abstract void processImage(FormSectionEvent event, PageState ps,
|
||||||
|
ImageComponent component, ReusableImageAsset image);
|
||||||
|
|
||||||
protected ImageComponent getImageComponent(PageState ps) {
|
protected ImageComponent getImageComponent(PageState ps) {
|
||||||
if (!m_imageComponent.isSelected(ps)) {
|
if (!m_imageComponent.isSelected(ps)) {
|
||||||
|
|
@ -151,4 +153,5 @@ public abstract class ImageComponentAbstractListener implements FormInitListener
|
||||||
ps.setVisible(component, isVisible);
|
ps.setVisible(component, isVisible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,7 @@ import org.apache.log4j.Logger;
|
||||||
/**
|
/**
|
||||||
* A {@link CMSPage} to select and upload images.
|
* A {@link CMSPage} to select and upload images.
|
||||||
*
|
*
|
||||||
* This page is used by
|
* This page is used by /web/templates/ccm-cms/content-section/admin/image_select.jsp which is used
|
||||||
* /web/templates/ccm-cms/content-section/admin/image_select.jsp which is used
|
|
||||||
* by the OpenCCM plugin for Xinha editor.
|
* by the OpenCCM plugin for Xinha editor.
|
||||||
*
|
*
|
||||||
* @author Sören Bernstein <quasi@quasiweb.de>
|
* @author Sören Bernstein <quasi@quasiweb.de>
|
||||||
|
|
@ -59,10 +58,9 @@ public class ImageSelectPage extends CMSPage {
|
||||||
|
|
||||||
m_imageComponentKey = new StringParameter("imageComponent");
|
m_imageComponentKey = new StringParameter("imageComponent");
|
||||||
|
|
||||||
ParameterSingleSelectionModel componentModel =
|
ParameterSingleSelectionModel componentModel = new ParameterSingleSelectionModel(
|
||||||
new ParameterSingleSelectionModel(m_imageComponentKey);
|
m_imageComponentKey);
|
||||||
m_imageComponent =
|
m_imageComponent = new MapComponentSelectionModel(componentModel, new HashMap());
|
||||||
new MapComponentSelectionModel(componentModel, new HashMap());
|
|
||||||
|
|
||||||
m_selectListener = new ImageComponentSelectListener(m_imageComponent,
|
m_selectListener = new ImageComponentSelectListener(m_imageComponent,
|
||||||
getResultComponent());
|
getResultComponent());
|
||||||
|
|
@ -85,6 +83,7 @@ public class ImageSelectPage extends CMSPage {
|
||||||
m_imageComponent.setSelectedKey(ps, ImageComponent.UPLOAD);
|
m_imageComponent.setSelectedKey(ps, ImageComponent.UPLOAD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
add(m_result);
|
add(m_result);
|
||||||
|
|
@ -107,7 +106,8 @@ public class ImageSelectPage extends CMSPage {
|
||||||
libComp.getForm().addProcessListener(m_selectListener);
|
libComp.getForm().addProcessListener(m_selectListener);
|
||||||
m_imageLibrary.setBody(libComp);
|
m_imageLibrary.setBody(libComp);
|
||||||
m_imageComponent.getComponentsMap().put(ImageComponent.LIBRARY,
|
m_imageComponent.getComponentsMap().put(ImageComponent.LIBRARY,
|
||||||
m_imageLibrary);
|
// m_imageLibrary);
|
||||||
|
libComp);
|
||||||
}
|
}
|
||||||
return m_imageLibrary;
|
return m_imageLibrary;
|
||||||
}
|
}
|
||||||
|
|
@ -156,8 +156,8 @@ public class ImageSelectPage extends CMSPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the specified component, with the specified tab name, to the
|
* Adds the specified component, with the specified tab name, to the tabbed pane only if it is
|
||||||
* tabbed pane only if it is not null.
|
* not null.
|
||||||
*
|
*
|
||||||
* @param pane The pane to which to add the tab
|
* @param pane The pane to which to add the tab
|
||||||
* @param tabName The name of the tab if it's added
|
* @param tabName The name of the tab if it's added
|
||||||
|
|
@ -171,4 +171,5 @@ public class ImageSelectPage extends CMSPage {
|
||||||
.localize().toString(), comp);
|
.localize().toString(), comp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ import com.arsdigita.web.URL;
|
||||||
import com.arsdigita.xml.Element;
|
import com.arsdigita.xml.Element;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A component which will insert a javascript to the xml output with the image
|
* A component which will insert a javascript to the xml output with the image information for the
|
||||||
* information for the OpenCCM plugin for Xinha editor.
|
* OpenCCM plugin for Xinha editor.
|
||||||
*
|
*
|
||||||
* @author Sören Bernstein <quasi@quasiweb.de>
|
* @author Sören Bernstein <quasi@quasiweb.de>
|
||||||
*/
|
*/
|
||||||
|
|
@ -41,8 +41,8 @@ public class ImageSelectResultComponent extends SimpleContainer
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert a script tag to the xml output with a JavaScript function to
|
* Insert a script tag to the xml output with a JavaScript function to send the image
|
||||||
* send the image information back to the Xinha plugin.
|
* information back to the Xinha plugin.
|
||||||
*
|
*
|
||||||
* @param state The current {@link PageState}
|
* @param state The current {@link PageState}
|
||||||
* @param parent The parent {@link Element}
|
* @param parent The parent {@link Element}
|
||||||
|
|
@ -111,4 +111,5 @@ public class ImageSelectResultComponent extends SimpleContainer
|
||||||
public void reset(PageState state) {
|
public void reset(PageState state) {
|
||||||
setResult(null, null);
|
setResult(null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,18 @@
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:variable name="exclude">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module"
|
||||||
|
select="'subSiteBanner'"/>
|
||||||
|
<xsl:with-param name="setting"
|
||||||
|
select="concat($resultTree//ui:siteBanner[@bebop:classname='com.arsdigita.subsite.ui.SubSiteBanner']/@sitename, '/exclude')"/>
|
||||||
|
<xsl:with-param name="default"
|
||||||
|
select="'false'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:if test="$exclude != 'true'">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="(string-length($subsiteBannerText) < 1) or (contains(subsiteBannerText, 'Missing translation'))">
|
<xsl:when test="(string-length($subsiteBannerText) < 1) or (contains(subsiteBannerText, 'Missing translation'))">
|
||||||
<xsl:value-of select="$resultTree//ui:siteBanner[@bebop:classname='com.arsdigita.subsite.ui.SubSiteBanner']/@sitename"/>
|
<xsl:value-of select="$resultTree//ui:siteBanner[@bebop:classname='com.arsdigita.subsite.ui.SubSiteBanner']/@sitename"/>
|
||||||
|
|
@ -30,6 +42,7 @@
|
||||||
<xsl:value-of select="$subsiteBannerText"/>
|
<xsl:value-of select="$subsiteBannerText"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
</xsl:if>
|
||||||
</div>
|
</div>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public class WorkingPaperConverter extends AbstractRisConverter {
|
||||||
|
|
||||||
workingPaper = (WorkingPaper) publication;
|
workingPaper = (WorkingPaper) publication;
|
||||||
|
|
||||||
getRisBuilder().setType(RisType.UNPD);
|
getRisBuilder().setType(RisType.UNPB);
|
||||||
|
|
||||||
convertAuthors(publication);
|
convertAuthors(publication);
|
||||||
convertTitle(publication);
|
convertTitle(publication);
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,7 @@ namespace com.arsdigita.cms {
|
||||||
ContentItem <|-- Folder
|
ContentItem <|-- Folder
|
||||||
ImageAsset <|-- ReusableImageAsset
|
ImageAsset <|-- ReusableImageAsset
|
||||||
MimeType <|-- ImageMimeType
|
MimeType <|-- ImageMimeType
|
||||||
|
MimeType <|-- TextMimeType
|
||||||
TextAsset <|-- Template
|
TextAsset <|-- Template
|
||||||
|
|
||||||
Asset -- MimeType
|
Asset -- MimeType
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue