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}.
|
||||
*
|
||||
* This listener provides the base implementation which is shared between all
|
||||
* listeners of this kind.
|
||||
* This listener provides the base implementation which is shared between all listeners of this
|
||||
* kind.
|
||||
*
|
||||
* 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
|
||||
* button was pressed.
|
||||
* Call {@link #cancelled(com.arsdigita.bebop.PageState)} if the cancel button was pressed.
|
||||
*
|
||||
* @param event the {@link FormSectionEvent}
|
||||
*
|
||||
* @throws FormProcessException
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -73,6 +73,7 @@ public abstract class ImageComponentAbstractListener implements FormInitListener
|
|||
* if the save button was pressed.
|
||||
*
|
||||
* @param event the {@link FormSectionEvent}
|
||||
*
|
||||
* @throws FormProcessException
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -108,7 +109,8 @@ public abstract class ImageComponentAbstractListener implements FormInitListener
|
|||
* @param component an {@link ImageComponent}
|
||||
* @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) {
|
||||
if (!m_imageComponent.isSelected(ps)) {
|
||||
|
|
@ -151,4 +153,5 @@ public abstract class ImageComponentAbstractListener implements FormInitListener
|
|||
ps.setVisible(component, isVisible);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ import org.apache.log4j.Logger;
|
|||
/**
|
||||
* A {@link CMSPage} to select and upload images.
|
||||
*
|
||||
* This page is used by
|
||||
* /web/templates/ccm-cms/content-section/admin/image_select.jsp which is used
|
||||
* This page is used by /web/templates/ccm-cms/content-section/admin/image_select.jsp which is used
|
||||
* by the OpenCCM plugin for Xinha editor.
|
||||
*
|
||||
* @author Sören Bernstein <quasi@quasiweb.de>
|
||||
|
|
@ -59,10 +58,9 @@ public class ImageSelectPage extends CMSPage {
|
|||
|
||||
m_imageComponentKey = new StringParameter("imageComponent");
|
||||
|
||||
ParameterSingleSelectionModel componentModel =
|
||||
new ParameterSingleSelectionModel(m_imageComponentKey);
|
||||
m_imageComponent =
|
||||
new MapComponentSelectionModel(componentModel, new HashMap());
|
||||
ParameterSingleSelectionModel componentModel = new ParameterSingleSelectionModel(
|
||||
m_imageComponentKey);
|
||||
m_imageComponent = new MapComponentSelectionModel(componentModel, new HashMap());
|
||||
|
||||
m_selectListener = new ImageComponentSelectListener(m_imageComponent,
|
||||
getResultComponent());
|
||||
|
|
@ -85,6 +83,7 @@ public class ImageSelectPage extends CMSPage {
|
|||
m_imageComponent.setSelectedKey(ps, ImageComponent.UPLOAD);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
add(m_result);
|
||||
|
|
@ -107,7 +106,8 @@ public class ImageSelectPage extends CMSPage {
|
|||
libComp.getForm().addProcessListener(m_selectListener);
|
||||
m_imageLibrary.setBody(libComp);
|
||||
m_imageComponent.getComponentsMap().put(ImageComponent.LIBRARY,
|
||||
m_imageLibrary);
|
||||
// m_imageLibrary);
|
||||
libComp);
|
||||
}
|
||||
return m_imageLibrary;
|
||||
}
|
||||
|
|
@ -156,8 +156,8 @@ public class ImageSelectPage extends CMSPage {
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds the specified component, with the specified tab name, to the
|
||||
* tabbed pane only if it is not null.
|
||||
* Adds the specified component, with the specified tab name, to the tabbed pane only if it is
|
||||
* not null.
|
||||
*
|
||||
* @param pane The pane to which to add the tab
|
||||
* @param tabName The name of the tab if it's added
|
||||
|
|
@ -171,4 +171,5 @@ public class ImageSelectPage extends CMSPage {
|
|||
.localize().toString(), comp);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import com.arsdigita.web.URL;
|
|||
import com.arsdigita.xml.Element;
|
||||
|
||||
/**
|
||||
* A component which will insert a javascript to the xml output with the image
|
||||
* information for the OpenCCM plugin for Xinha editor.
|
||||
* A component which will insert a javascript to the xml output with the image information for the
|
||||
* OpenCCM plugin for Xinha editor.
|
||||
*
|
||||
* @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
|
||||
* send the image information back to the Xinha plugin.
|
||||
* Insert a script tag to the xml output with a JavaScript function to send the image
|
||||
* information back to the Xinha plugin.
|
||||
*
|
||||
* @param state The current {@link PageState}
|
||||
* @param parent The parent {@link Element}
|
||||
|
|
@ -111,4 +111,5 @@ public class ImageSelectResultComponent extends SimpleContainer
|
|||
public void reset(PageState state) {
|
||||
setResult(null, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,18 @@
|
|||
</xsl:call-template>
|
||||
</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: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"/>
|
||||
|
|
@ -30,6 +42,7 @@
|
|||
<xsl:value-of select="$subsiteBannerText"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class WorkingPaperConverter extends AbstractRisConverter {
|
|||
|
||||
workingPaper = (WorkingPaper) publication;
|
||||
|
||||
getRisBuilder().setType(RisType.UNPD);
|
||||
getRisBuilder().setType(RisType.UNPB);
|
||||
|
||||
convertAuthors(publication);
|
||||
convertTitle(publication);
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ namespace com.arsdigita.cms {
|
|||
ContentItem <|-- Folder
|
||||
ImageAsset <|-- ReusableImageAsset
|
||||
MimeType <|-- ImageMimeType
|
||||
MimeType <|-- TextMimeType
|
||||
TextAsset <|-- Template
|
||||
|
||||
Asset -- MimeType
|
||||
|
|
|
|||
Loading…
Reference in New Issue