Several references to JavaScript files (e.g. manipulate-input.js used in the ContentCenter to urlize the name of ContentItem) did not work when CCM is not running in the ROOT context. This is now fixed.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2712 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
beb861d78c
commit
f09f59b750
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui.mparticle;
|
||||
|
||||
|
||||
import com.arsdigita.bebop.ColumnPanel;
|
||||
import com.arsdigita.bebop.FormData;
|
||||
import com.arsdigita.bebop.FormProcessException;
|
||||
|
|
@ -49,13 +48,13 @@ import com.arsdigita.cms.contenttypes.util.MPArticleGlobalizationUtil;
|
|||
import com.arsdigita.persistence.DataQuery;
|
||||
import com.arsdigita.persistence.SessionManager;
|
||||
import com.arsdigita.util.Assert;
|
||||
import com.arsdigita.web.Web;
|
||||
import com.arsdigita.xml.Element;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* A form for editing MultiPartArticle and subclasses.
|
||||
*
|
||||
|
|
@ -99,33 +98,30 @@ public abstract class MultiPartArticleForm extends FormSection
|
|||
addValidationListener(this);
|
||||
}
|
||||
|
||||
|
||||
public void addSaveCancelSection() {
|
||||
m_saveCancelSection = new SaveCancelSection();
|
||||
add(m_saveCancelSection, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||
}
|
||||
|
||||
|
||||
public SaveCancelSection getSaveCancelSection() {
|
||||
return m_saveCancelSection;
|
||||
}
|
||||
|
||||
|
||||
private Label m_script = new Label("<script language=\"javascript\" src=\"/javascript/manipulate-input.js\"></script>", false);
|
||||
|
||||
|
||||
private Label m_script = new Label(String.format(
|
||||
"<script language=\"javascript\" src=\"%s/javascript/manipulate-input.js\"></script>",
|
||||
Web.getWebappContextPath()),
|
||||
false);
|
||||
|
||||
protected void addWidgets() {
|
||||
add(new Label(GlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.title")));
|
||||
TextField titleWidget = new TextField(new TrimmedStringParameter(TITLE));
|
||||
titleWidget.addValidationListener(new NotNullValidationListener());
|
||||
titleWidget.setOnFocus("if (this.form." + NAME + ".value == '') { " +
|
||||
" defaulting = true; this.form." + NAME +
|
||||
".value = urlize(this.value); }");
|
||||
titleWidget.setOnFocus("if (this.form." + NAME + ".value == '') { "
|
||||
+ " defaulting = true; this.form." + NAME
|
||||
+ ".value = urlize(this.value); }");
|
||||
titleWidget.setOnKeyUp(
|
||||
"if (defaulting) { this.form." + NAME +
|
||||
".value = urlize(this.value) }"
|
||||
"if (defaulting) { this.form." + NAME + ".value = urlize(this.value) }"
|
||||
);
|
||||
add(titleWidget);
|
||||
|
||||
|
|
@ -136,9 +132,8 @@ public abstract class MultiPartArticleForm extends FormSection
|
|||
nameWidget.addValidationListener(new URLTokenValidationListener());
|
||||
nameWidget.setOnFocus("defaulting = false");
|
||||
nameWidget.setOnBlur(
|
||||
"if (this.value == '') " +
|
||||
"{ defaulting = true; this.value = urlize(this.form." + TITLE +
|
||||
".value) }"
|
||||
"if (this.value == '') " + "{ defaulting = true; this.value = urlize(this.form." + TITLE
|
||||
+ ".value) }"
|
||||
);
|
||||
add(nameWidget);
|
||||
|
||||
|
|
@ -149,7 +144,9 @@ public abstract class MultiPartArticleForm extends FormSection
|
|||
com.arsdigita.bebop.form.Date launchDate
|
||||
= new com.arsdigita.bebop.form.Date(launchDateParam);
|
||||
if (ContentSection.getConfig().getRequireLaunchDate()) {
|
||||
launchDate.addValidationListener(new NotNullValidationListener(MPArticleGlobalizationUtil.globalize("cms.contenttypes.ui.mparticle.no_launch_date")));
|
||||
launchDate.addValidationListener(new NotNullValidationListener(
|
||||
MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.no_launch_date")));
|
||||
// if launch date is required, help user by suggesting today's date
|
||||
launchDateParam.setDefaultValue(new Date());
|
||||
}
|
||||
|
|
@ -161,8 +158,7 @@ public abstract class MultiPartArticleForm extends FormSection
|
|||
TextArea summaryWidget = new TextArea(new TrimmedStringParameter(SUMMARY));
|
||||
if (ContentSection.getConfig().mandatoryDescriptions()) {
|
||||
summaryWidget
|
||||
.addValidationListener(new
|
||||
NotEmptyValidationListener(GlobalizationUtil
|
||||
.addValidationListener(new NotEmptyValidationListener(GlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.description_missing")));
|
||||
}
|
||||
summaryWidget.setRows(5);
|
||||
|
|
@ -173,18 +169,20 @@ public abstract class MultiPartArticleForm extends FormSection
|
|||
}
|
||||
|
||||
public abstract void init(FormSectionEvent e) throws FormProcessException;
|
||||
|
||||
public abstract void process(FormSectionEvent e) throws FormProcessException;
|
||||
|
||||
public abstract void validate(FormSectionEvent e) throws FormProcessException;
|
||||
|
||||
|
||||
/** Utility method to initialize the name/title/summary widgets */
|
||||
/**
|
||||
* Utility method to initialize the name/title/summary widgets
|
||||
*/
|
||||
public MultiPartArticle initBasicWidgets(FormSectionEvent e) {
|
||||
Assert.exists(m_itemModel, ItemSelectionModel.class);
|
||||
|
||||
FormData data = e.getFormData();
|
||||
PageState state = e.getPageState();
|
||||
MultiPartArticle article =
|
||||
(MultiPartArticle)m_itemModel.getSelectedObject(state);
|
||||
MultiPartArticle article = (MultiPartArticle) m_itemModel.getSelectedObject(state);
|
||||
|
||||
if (article != null) {
|
||||
data.put(NAME, article.getName());
|
||||
|
|
@ -198,9 +196,9 @@ public abstract class MultiPartArticleForm extends FormSection
|
|||
return article;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Utility method to process the name/title/summary widgets */
|
||||
/**
|
||||
* Utility method to process the name/title/summary widgets
|
||||
*/
|
||||
public MultiPartArticle processBasicWidgets(FormSectionEvent e) {
|
||||
Assert.exists(m_itemModel, ItemSelectionModel.class);
|
||||
|
||||
|
|
@ -224,8 +222,8 @@ public abstract class MultiPartArticleForm extends FormSection
|
|||
* Ensure that the name of an item is unique within a folder.
|
||||
*
|
||||
* @param folder the folder in which to check
|
||||
* @param event the FormSectionEvent which was passed to the
|
||||
* validation listener
|
||||
* @param event the FormSectionEvent which was passed to the validation listener
|
||||
*
|
||||
* @return true if the name is not null and unique, false otherwise
|
||||
*/
|
||||
public boolean validateNameUniqueness(Folder folder, FormSectionEvent event) {
|
||||
|
|
@ -246,19 +244,16 @@ public abstract class MultiPartArticleForm extends FormSection
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Utility method to create a new MultiPartArticle and update the
|
||||
* selected model. This can be called in the process method of a
|
||||
* ProcessListener.
|
||||
* Utility method to create a new MultiPartArticle and update the selected model. This can be
|
||||
* called in the process method of a ProcessListener.
|
||||
*
|
||||
* @param state the current page state
|
||||
*
|
||||
* @return the new content item (or a proper subclass)
|
||||
*/
|
||||
public MultiPartArticle createArticle(PageState state)
|
||||
throws FormProcessException
|
||||
{
|
||||
throws FormProcessException {
|
||||
Assert.exists(m_itemModel, ItemSelectionModel.class);
|
||||
|
||||
MultiPartArticle article = null;
|
||||
|
|
@ -271,7 +266,6 @@ public abstract class MultiPartArticleForm extends FormSection
|
|||
|
||||
}
|
||||
|
||||
|
||||
if (m_itemModel.getSelectedKey(state) == null) {
|
||||
m_itemModel.setSelectedObject(state, article);
|
||||
}
|
||||
|
|
@ -284,6 +278,4 @@ public abstract class MultiPartArticleForm extends FormSection
|
|||
super.generateXML(ps, parent);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import com.arsdigita.portal.JSRPortlet;
|
|||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import javax.portlet.PortletException;
|
||||
import javax.portlet.PortletRequestDispatcher;
|
||||
import javax.portlet.RenderRequest;
|
||||
import javax.portlet.RenderResponse;
|
||||
|
||||
|
|
@ -57,9 +58,11 @@ public class ContentItemJSRPortlet extends JSRPortlet {
|
|||
@Override
|
||||
protected void doEdit(RenderRequest request, RenderResponse response)
|
||||
throws PortletException, IOException {
|
||||
response.setContentType("text/html");
|
||||
PrintWriter writer = new PrintWriter(response.getWriter());
|
||||
writer.println("You're now in Edit mode.");
|
||||
//response.setContentType("text/html");
|
||||
//PrintWriter writer = new PrintWriter(response.getWriter());
|
||||
//writer.println("You're now in Edit mode.");
|
||||
PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/templates/portlets/ContentItemJSRPortletAdmin.jsp");
|
||||
dispatcher.include(request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ import static com.arsdigita.cms.util.GlobalizationUtil.globalize;
|
|||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.persistence.DataQuery;
|
||||
import com.arsdigita.persistence.SessionManager;
|
||||
import com.arsdigita.web.Web;
|
||||
import com.arsdigita.xml.Element;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -145,8 +146,9 @@ public abstract class BasicItemForm extends FormSection
|
|||
/**
|
||||
* Currently, to insert javascript code the Label Widget is "abused".
|
||||
*/
|
||||
private final Label m_script = new Label(
|
||||
"<script language=\"javascript\" src=\"/javascript/manipulate-input.js\"></script>",
|
||||
private final Label m_script = new Label(String.format(
|
||||
"<script language=\"javascript\" src=\"%s/javascript/manipulate-input.js\"></script>",
|
||||
Web.getWebappContextPath()),
|
||||
false);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import com.arsdigita.categorization.Category;
|
|||
import com.arsdigita.categorization.CategoryCollection;
|
||||
import com.arsdigita.cms.ui.BaseForm;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.web.Web;
|
||||
import com.arsdigita.xml.Element;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
|
@ -57,8 +58,9 @@ class BaseCategoryForm extends BaseForm {
|
|||
final RadioGroup m_isAbstract;
|
||||
final RadioGroup m_isVisible;
|
||||
final RadioGroup m_isEnabled;
|
||||
private Label m_script = new Label(
|
||||
"<script language=\"javascript\" src=\"/javascript/manipulate-input.js\"></script>",
|
||||
private Label m_script = new Label(String.format(
|
||||
"<script language=\"javascript\" src=\"%s/javascript/manipulate-input.js\"></script>",
|
||||
Web.getWebappContextPath()),
|
||||
false);
|
||||
private final static String NAME = "name";
|
||||
private final static String DESCRIPTION = "description";
|
||||
|
|
|
|||
|
|
@ -40,13 +40,14 @@ import com.arsdigita.categorization.CategoryCollection;
|
|||
import com.arsdigita.cms.ui.BaseForm;
|
||||
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.web.Web;
|
||||
import com.arsdigita.xml.Element;
|
||||
|
||||
/**
|
||||
* Base class for CategoryLocalizationAddForm and CategoryLocalizationEditForm.
|
||||
*
|
||||
* This class is part of the admin GUI of CCM and extends the standard form
|
||||
* in order to present forms for managing the multi-language categories.
|
||||
* This class is part of the admin GUI of CCM and extends the standard form in order to present
|
||||
* forms for managing the multi-language categories.
|
||||
*
|
||||
* @author Sören Bernstein <quasi@quasiweb.de>
|
||||
* @version $Id: $
|
||||
|
|
@ -59,9 +60,10 @@ public class CategoryLocalizationForm extends BaseForm {
|
|||
final TextArea m_description;
|
||||
final TextField m_url;
|
||||
final RadioGroup m_isEnabled;
|
||||
private Label m_script = new Label(
|
||||
"<script language=\"javascript\" src=\"/javascript/manipulate-input.js\">"+
|
||||
"</script>", false);
|
||||
private Label m_script = new Label(String.format(
|
||||
"<script language=\"javascript\" src=\"%s/javascript/manipulate-input.js\">" + "</script>",
|
||||
Web.getWebappContextPath()),
|
||||
false);
|
||||
|
||||
private final static String LOCALE = "locale";
|
||||
private final static String NAME = "name";
|
||||
|
|
@ -99,6 +101,7 @@ public class CategoryLocalizationForm extends BaseForm {
|
|||
"cms.ui.category.localization_error_locale").localize());
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
addField(gz("cms.ui.category.localization_locale"), m_locale);
|
||||
|
|
@ -109,11 +112,10 @@ public class CategoryLocalizationForm extends BaseForm {
|
|||
m_name.setSize(30);
|
||||
m_name.setMaxLength(200);
|
||||
m_name.addValidationListener(new NotNullValidationListener());
|
||||
m_name.setOnFocus("if (this.form." + URL + ".value == '') { " +
|
||||
" defaulting = true; this.form." + URL +
|
||||
".value = urlize(this.value); }");
|
||||
m_name.setOnKeyUp("if (defaulting) { this.form." + URL +
|
||||
".value = urlize(this.value) }");
|
||||
m_name.setOnFocus("if (this.form." + URL + ".value == '') { "
|
||||
+ " defaulting = true; this.form." + URL
|
||||
+ ".value = urlize(this.value); }");
|
||||
m_name.setOnKeyUp("if (defaulting) { this.form." + URL + ".value = urlize(this.value) }");
|
||||
|
||||
// is enabled?
|
||||
m_isEnabled = new RadioGroup(IS_ENABLED);
|
||||
|
|
@ -121,8 +123,7 @@ public class CategoryLocalizationForm extends BaseForm {
|
|||
m_isEnabled.addOption(new Option("yes", new Label(gz("cms.ui.yes"))));
|
||||
addField(gz("cms.ui.category.is_enabled"), m_isEnabled);
|
||||
|
||||
m_description = new TextArea
|
||||
(new TrimmedStringParameter(DESCRIPTION));
|
||||
m_description = new TextArea(new TrimmedStringParameter(DESCRIPTION));
|
||||
addField(gz("cms.ui.description"), m_description);
|
||||
|
||||
m_description.setWrap(TextArea.SOFT);
|
||||
|
|
@ -146,10 +147,9 @@ public class CategoryLocalizationForm extends BaseForm {
|
|||
m_url.setMaxLength(200);
|
||||
m_url.addValidationListener(new NotNullValidationListener());
|
||||
m_url.setOnFocus("defaulting = false");
|
||||
m_url.setOnBlur("if (this.value == '') " +
|
||||
"{ defaulting = true; this.value = urlize(this.form." + NAME +
|
||||
".value) } " +
|
||||
"else { this.value = urlize(this.value); }");
|
||||
m_url.setOnBlur("if (this.value == '') "
|
||||
+ "{ defaulting = true; this.value = urlize(this.form." + NAME
|
||||
+ ".value) } " + "else { this.value = urlize(this.value); }");
|
||||
addField(gz("cms.ui.category.url"), m_url);
|
||||
|
||||
addAction(new Finish());
|
||||
|
|
@ -165,10 +165,11 @@ public class CategoryLocalizationForm extends BaseForm {
|
|||
/**
|
||||
* Purpose:
|
||||
*
|
||||
* XXXToDo: Should be extended with the function:
|
||||
* Names have to be unambiguous in the selected language
|
||||
* XXXToDo: Should be extended with the function: Names have to be unambiguous in the selected
|
||||
* language
|
||||
*/
|
||||
class NameUniqueListener implements ParameterListener {
|
||||
|
||||
private final CategoryRequestLocal m_category;
|
||||
private final Widget m_widget;
|
||||
private final int m_type;
|
||||
|
|
@ -178,6 +179,7 @@ public class CategoryLocalizationForm extends BaseForm {
|
|||
NameUniqueListener(final CategoryRequestLocal category) {
|
||||
this(category, m_name, NAME_FIELD);
|
||||
}
|
||||
|
||||
NameUniqueListener(final CategoryRequestLocal category,
|
||||
Widget widget, int type) {
|
||||
m_category = category;
|
||||
|
|
@ -185,13 +187,13 @@ public class CategoryLocalizationForm extends BaseForm {
|
|||
m_type = type;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Purpose:
|
||||
*
|
||||
* XXX provisional, has to be adapted
|
||||
*
|
||||
* @param e
|
||||
*
|
||||
* @throws com.arsdigita.bebop.FormProcessException
|
||||
*/
|
||||
public final void validate(final ParameterEvent e)
|
||||
|
|
@ -205,15 +207,15 @@ public class CategoryLocalizationForm extends BaseForm {
|
|||
|
||||
while (children.next()) {
|
||||
final Category child = children.getCategory();
|
||||
String compField =
|
||||
(m_type == URL_FIELD) ? child.getURL() : child.getName();
|
||||
String compField = (m_type == URL_FIELD) ? child.getURL() : child.getName();
|
||||
if (compField.equalsIgnoreCase(title)
|
||||
&& (m_category == null
|
||||
|| !m_category.getCategory(state).equals(child))) {
|
||||
throw new FormProcessException
|
||||
(lz("cms.ui.category.name_not_unique"));
|
||||
throw new FormProcessException(lz("cms.ui.category.name_not_unique"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ import com.arsdigita.cms.ContentPage;
|
|||
import com.arsdigita.cms.ui.CMSForm;
|
||||
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.web.Web;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Class FolderForm implements the basic form for creating or renaming
|
||||
* folders.
|
||||
* Class FolderForm implements the basic form for creating or renaming folders.
|
||||
*
|
||||
* @author Jon Orris <jorris@redhat.com>
|
||||
* @version $Id: FolderBaseForm.java 1951 2009-06-30 04:35:04Z terry $
|
||||
|
|
@ -46,29 +46,26 @@ abstract class FolderBaseForm extends CMSForm {
|
|||
public static final String NAME = ContentItem.NAME;
|
||||
public static final String TITLE = ContentPage.TITLE;
|
||||
|
||||
private static final String TITLE_ON_FOCUS =
|
||||
"if (this.form." + NAME + ".value == '') {" +
|
||||
" defaulting = true;" +
|
||||
" this.form." + NAME + ".value = urlize(this.value);" +
|
||||
"}";
|
||||
private static final String TITLE_ON_FOCUS = "if (this.form." + NAME + ".value == '') {"
|
||||
+ " defaulting = true;" + " this.form."
|
||||
+ NAME + ".value = urlize(this.value);" + "}";
|
||||
|
||||
private static final String TITLE_ON_KEY_UP =
|
||||
"if (defaulting) {" +
|
||||
" this.form." + NAME + ".value = urlize(this.value)" +
|
||||
"}";
|
||||
private static final String TITLE_ON_KEY_UP = "if (defaulting) {" + " this.form." + NAME
|
||||
+ ".value = urlize(this.value)" + "}";
|
||||
|
||||
private static final String FRAGMENT_ON_FOCUS = "defaulting = false";
|
||||
|
||||
private static final String FRAGMENT_ON_BLUR =
|
||||
"if (this.value == '') {" +
|
||||
" defaulting = true;" +
|
||||
" this.value = urlize(this.form." + TITLE + ".value)" +
|
||||
"} else {" +
|
||||
" this.value = urlize(this.value);" +
|
||||
"}";
|
||||
|
||||
private Label m_script = new Label("<script language=\"javascript\" src=\"/javascript/manipulate-input.js\"></script>", false);
|
||||
private static final String FRAGMENT_ON_BLUR = "if (this.value == '') {"
|
||||
+ " defaulting = true;"
|
||||
+ " this.value = urlize(this.form." + TITLE
|
||||
+ ".value)" + "} else {"
|
||||
+ " this.value = urlize(this.value);" + "}";
|
||||
|
||||
private Label m_script = new Label(
|
||||
String.format(
|
||||
"<script language=\"javascript\" src=\"%s/javascript/manipulate-input.js\"></script>",
|
||||
Web.getWebappContextPath()),
|
||||
false);
|
||||
|
||||
final TextField m_title;
|
||||
final TextField m_fragment;
|
||||
|
|
@ -80,7 +77,6 @@ abstract class FolderBaseForm extends CMSForm {
|
|||
add(m_script, GridPanel.FULL_WIDTH);
|
||||
|
||||
// Title
|
||||
|
||||
add(new Label(gz("cms.ui.folder.name")));
|
||||
|
||||
m_title = new TextField(new TrimmedStringParameter(TITLE));
|
||||
|
|
@ -93,7 +89,6 @@ abstract class FolderBaseForm extends CMSForm {
|
|||
m_title.setOnKeyUp(TITLE_ON_KEY_UP);
|
||||
|
||||
// Fragment
|
||||
|
||||
add(new Label(gz("cms.ui.folder.fragment")));
|
||||
|
||||
m_fragment = new TextField(new TrimmedStringParameter(NAME));
|
||||
|
|
@ -119,4 +114,5 @@ abstract class FolderBaseForm extends CMSForm {
|
|||
private static String lz(final String key) {
|
||||
return (String) gz(key).localize();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.formbuilder.ui;
|
||||
|
||||
import com.arsdigita.bebop.BoxPanel;
|
||||
|
|
@ -49,10 +48,9 @@ import java.io.IOException;
|
|||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* This class provides a pluggable widget for editing the persistent process
|
||||
* listeners for a persistent form.
|
||||
* It is designed to be used without requiring any significant
|
||||
* infrastructure on a page.
|
||||
* This class provides a pluggable widget for editing the persistent process listeners for a
|
||||
* persistent form. It is designed to be used without requiring any significant infrastructure on a
|
||||
* page.
|
||||
*/
|
||||
public class ProcessListenerEditor extends SimpleContainer {
|
||||
|
||||
|
|
@ -64,9 +62,8 @@ public class ProcessListenerEditor extends SimpleContainer {
|
|||
protected ProcessListenerProperties m_edit_action;
|
||||
|
||||
/**
|
||||
* Constructor, creates a new control editor widget for editing the form
|
||||
* specified in the single selection model. The key returned by the single
|
||||
* selection model should be an instance of the
|
||||
* Constructor, creates a new control editor widget for editing the form specified in the single
|
||||
* selection model. The key returned by the single selection model should be an instance of the
|
||||
* {@link java.math.BigDecimal} class.
|
||||
*
|
||||
* @param form the form to edit
|
||||
|
|
@ -78,16 +75,16 @@ public class ProcessListenerEditor extends SimpleContainer {
|
|||
// Help system is currently not workable
|
||||
String helpURL = FormBuilderUtil.getConfig().getActionsHelpLink();
|
||||
if (helpURL != null) {
|
||||
add(new Link(new Label(GlobalizationUtil.globalize
|
||||
("formbuilder.ui.help")), helpURL));
|
||||
add(new Link(new Label(GlobalizationUtil.globalize("formbuilder.ui.help")), helpURL));
|
||||
}
|
||||
|
||||
m_newAction = new NewAction(app);
|
||||
|
||||
Table t = new Table(new ProcessListenerTableModelBuilder(m_form),
|
||||
Table table = new Table(new ProcessListenerTableModelBuilder(m_form),
|
||||
new String[]{"Form action", "", ""});
|
||||
m_action = new DecimalSingleSelectionModel(t.getRowSelectionModel());
|
||||
t.setDefaultCellRenderer(new TableCellRenderer() {
|
||||
m_action = new DecimalSingleSelectionModel(table .getRowSelectionModel());
|
||||
table .setDefaultCellRenderer(new TableCellRenderer() {
|
||||
|
||||
public Component getComponent(Table table, PageState state, Object value,
|
||||
boolean isSelected, Object key,
|
||||
int row, int column) {
|
||||
|
|
@ -109,8 +106,9 @@ public class ProcessListenerEditor extends SimpleContainer {
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
});
|
||||
t.addTableActionListener(new FormItemActionListener());
|
||||
table .addTableActionListener(new FormItemActionListener());
|
||||
|
||||
m_list_actions = new BoxPanel(BoxPanel.VERTICAL);
|
||||
m_edit_action = new ProcessListenerProperties(m_form,
|
||||
|
|
@ -124,7 +122,7 @@ public class ProcessListenerEditor extends SimpleContainer {
|
|||
m_edit_action));
|
||||
|
||||
m_list_actions.add(m_newAction);
|
||||
m_list_actions.add(t);
|
||||
m_list_actions.add(table );
|
||||
|
||||
addComponents();
|
||||
|
||||
|
|
@ -132,7 +130,8 @@ public class ProcessListenerEditor extends SimpleContainer {
|
|||
add(m_edit_action);
|
||||
}
|
||||
|
||||
protected void addComponents() { }
|
||||
protected void addComponents() {
|
||||
}
|
||||
|
||||
public void register(Page page) {
|
||||
super.register(page);
|
||||
|
|
@ -145,6 +144,7 @@ public class ProcessListenerEditor extends SimpleContainer {
|
|||
}
|
||||
|
||||
private class FormItemProcessListener implements FormProcessListener {
|
||||
|
||||
Component m_show;
|
||||
Component m_hide;
|
||||
|
||||
|
|
@ -160,9 +160,11 @@ public class ProcessListenerEditor extends SimpleContainer {
|
|||
m_show.setVisible(e.getPageState(), true);
|
||||
m_hide.setVisible(e.getPageState(), false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class FormItemCompletionListener implements FormCompletionListener {
|
||||
|
||||
Component m_show;
|
||||
Component m_hide;
|
||||
|
||||
|
|
@ -178,11 +180,13 @@ public class ProcessListenerEditor extends SimpleContainer {
|
|||
m_show.setVisible(e.getPageState(), true);
|
||||
m_hide.setVisible(e.getPageState(), false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class FormItemActionListener implements TableActionListener {
|
||||
|
||||
public void headSelected(TableActionEvent e) {}
|
||||
public void headSelected(TableActionEvent e) {
|
||||
}
|
||||
|
||||
public void cellSelected(TableActionEvent e) {
|
||||
PageState state = e.getPageState();
|
||||
|
|
@ -196,13 +200,11 @@ public class ProcessListenerEditor extends SimpleContainer {
|
|||
BigDecimal action_id = (BigDecimal) m_action.getSelectedKey(state);
|
||||
|
||||
try {
|
||||
BigDecimal formID = (BigDecimal)
|
||||
m_form.getSelectedKey( state );
|
||||
PersistentFormSection form =
|
||||
new PersistentFormSection( formID );
|
||||
BigDecimal formID = (BigDecimal) m_form.getSelectedKey(state);
|
||||
PersistentFormSection form = new PersistentFormSection(formID);
|
||||
|
||||
PersistentProcessListener l = (PersistentProcessListener)
|
||||
DomainObjectFactory.newInstance(
|
||||
PersistentProcessListener l = (PersistentProcessListener) DomainObjectFactory
|
||||
.newInstance(
|
||||
new OID(PersistentProcessListener.BASE_DATA_OBJECT_TYPE,
|
||||
action_id));
|
||||
//l.delete();
|
||||
|
|
@ -219,6 +221,7 @@ public class ProcessListenerEditor extends SimpleContainer {
|
|||
throw new UncheckedWrapperException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.formbuilder.ui.editors;
|
||||
|
||||
import com.arsdigita.formbuilder.PersistentWidget;
|
||||
|
|
@ -50,6 +49,7 @@ import com.arsdigita.bebop.parameters.StringParameter;
|
|||
import com.arsdigita.bebop.parameters.URLTokenValidationListener;
|
||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||
import com.arsdigita.util.Assert;
|
||||
import com.arsdigita.web.Web;
|
||||
import com.arsdigita.xml.Element;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -57,6 +57,7 @@ import java.math.BigDecimal;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
public abstract class WidgetForm extends PropertiesForm {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(WidgetForm.class);
|
||||
|
||||
private SingleSelectionModel m_form;
|
||||
|
|
@ -71,8 +72,10 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
|
||||
private RequestLocal m_widget = new RequestLocal();
|
||||
|
||||
private Label m_script = new Label("<script language=\"javascript\" src=\"/javascript/manipulate-input.js\"></script>", false);
|
||||
|
||||
private Label m_script = new Label(String.format(
|
||||
"<script language=\"javascript\" src=\"%s/javascript/manipulate-input.js\"></script>",
|
||||
Web.getWebappContextPath()),
|
||||
false);
|
||||
|
||||
public WidgetForm(String name,
|
||||
SingleSelectionModel form,
|
||||
|
|
@ -86,8 +89,6 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
addProcessListener(new WidgetFormProcessListener());
|
||||
}
|
||||
|
||||
|
||||
|
||||
public SingleSelectionModel getSelection() {
|
||||
return m_form;
|
||||
}
|
||||
|
|
@ -109,7 +110,8 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
try {
|
||||
widget = getWidget(action);
|
||||
} catch (DataObjectNotFoundException ex) {
|
||||
throw new com.arsdigita.util.UncheckedWrapperException("cannot find persistent widget " + action, ex);
|
||||
throw new com.arsdigita.util.UncheckedWrapperException(
|
||||
"cannot find persistent widget " + action, ex);
|
||||
}
|
||||
}
|
||||
m_widget.set(state, widget);
|
||||
|
|
@ -120,14 +122,19 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
protected void addWidgets(FormSection section) {
|
||||
super.addWidgets(section);
|
||||
|
||||
if (showName()) addName(section);
|
||||
if (showDescription()) addDescription(section);
|
||||
if (includeRequiredRadioGroup()) addRequiredRadioGroup(section);
|
||||
if (showName()) {
|
||||
addName(section);
|
||||
}
|
||||
if (showDescription()) {
|
||||
addDescription(section);
|
||||
}
|
||||
if (includeRequiredRadioGroup()) {
|
||||
addRequiredRadioGroup(section);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the name field to the form. Override this method to alter the
|
||||
* creation of the name field.
|
||||
* Add the name field to the form. Override this method to alter the creation of the name field.
|
||||
*/
|
||||
protected void addName(FormSection section) {
|
||||
TextField name = new TextField(new StringParameter(NAME));
|
||||
|
|
@ -143,8 +150,7 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add the name field to the form. Override this method to alter the
|
||||
* creation of the name field.
|
||||
* Add the name field to the form. Override this method to alter the creation of the name field.
|
||||
*/
|
||||
protected void addDescription(FormSection section) {
|
||||
TextArea description = new TextArea(new StringParameter(DESCRIPTION));
|
||||
|
|
@ -172,19 +178,14 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
}
|
||||
|
||||
/**
|
||||
* If this is called then the value of the widget that is used for
|
||||
* the passed in model is used to auto-generate the value of the
|
||||
* "name" value. For instance, if you want the label to dictate
|
||||
* the "name" then you would pass in the label ParameterModel
|
||||
* and add the following to the labelWidget:
|
||||
* If this is called then the value of the widget that is used for the passed in model is used
|
||||
* to auto-generate the value of the "name" value. For instance, if you want the label to
|
||||
* dictate the "name" then you would pass in the label ParameterModel and add the following to
|
||||
* the labelWidget:
|
||||
*
|
||||
* labelWidget.setOnFocus("if (this.form." + NAME + ".value == '') { " +
|
||||
* " defaulting = true; this.form." + NAME +
|
||||
* ".value = urlize(this.value); }");
|
||||
* labelWidget.setOnKeyUp(
|
||||
* "if (defaulting) { this.form." + NAME +
|
||||
* ".value = urlize(this.value) }"
|
||||
* );
|
||||
* labelWidget.setOnFocus("if (this.form." + NAME + ".value == '') { " + " defaulting = true;
|
||||
* this.form." + NAME + ".value = urlize(this.value); }"); labelWidget.setOnKeyUp( "if
|
||||
* (defaulting) { this.form." + NAME + ".value = urlize(this.value) }" );
|
||||
*
|
||||
*
|
||||
* This can only be called after calling addWidgets()
|
||||
|
|
@ -193,36 +194,31 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
Assert.exists(m_name);
|
||||
m_name.setOnFocus("defaulting = false");
|
||||
m_name.setOnBlur(
|
||||
"if (this.value == '') " +
|
||||
"{ defaulting = true; this.value = urlize(this.form." +
|
||||
model.getName() + ".value) }"
|
||||
"if (this.value == '') " + "{ defaulting = true; this.value = urlize(this.form." + model
|
||||
.getName() + ".value) }"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* This determines whether or not the "required value" radio group
|
||||
* is part of the form. This returns true and should be overridden
|
||||
* by fields where it does not make sense to ask. For instance,
|
||||
* when the widget is a hidden field then asking if it is required
|
||||
* or not does not make any logical sense so those widgets should
|
||||
* return false.
|
||||
* This determines whether or not the "required value" radio group is part of the form. This
|
||||
* returns true and should be overridden by fields where it does not make sense to ask. For
|
||||
* instance, when the widget is a hidden field then asking if it is required or not does not
|
||||
* make any logical sense so those widgets should return false.
|
||||
*
|
||||
* This will always return the same value for a given widget no matter
|
||||
* what state the widget is in.
|
||||
* This will always return the same value for a given widget no matter what state the widget is
|
||||
* in.
|
||||
*/
|
||||
protected boolean includeRequiredRadioGroup() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void generateXML(PageState ps, Element parent) {
|
||||
m_script.generateXML(ps, parent);
|
||||
super.generateXML(ps, parent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Should the HTML name be on the form? Can be overridden
|
||||
* by sub classes.
|
||||
* Should the HTML name be on the form? Can be overridden by sub classes.
|
||||
*/
|
||||
protected boolean showName() {
|
||||
|
||||
|
|
@ -230,8 +226,7 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
}
|
||||
|
||||
/**
|
||||
* Should the description be on the form? Can be overridden
|
||||
* by sub classes.
|
||||
* Should the description be on the form? Can be overridden by sub classes.
|
||||
*/
|
||||
protected boolean showDescription() {
|
||||
|
||||
|
|
@ -282,12 +277,12 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//m_name.setVisible(state, false);
|
||||
if(includeRequiredRadioGroup())
|
||||
if (includeRequiredRadioGroup()) {
|
||||
m_required.setValue(state, new Boolean(widget.isRequired()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void processWidgets(FormSectionEvent e,
|
||||
PersistentWidget widget)
|
||||
|
|
@ -315,10 +310,10 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
widget.setRequired(required);
|
||||
if (required) {
|
||||
// Answer is required
|
||||
String listenerClassName =
|
||||
"com.arsdigita.bebop.parameters.NotEmptyValidationListener";
|
||||
PersistentParameterListener listener =
|
||||
new PersistentParameterListener(listenerClassName);
|
||||
String listenerClassName
|
||||
= "com.arsdigita.bebop.parameters.NotEmptyValidationListener";
|
||||
PersistentParameterListener listener = new PersistentParameterListener(
|
||||
listenerClassName);
|
||||
widget.addValidationListener(listener);
|
||||
} else {
|
||||
// Answer is not required
|
||||
|
|
@ -348,8 +343,8 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
form.save();
|
||||
}
|
||||
|
||||
|
||||
private class WidgetFormInitListener implements FormInitListener {
|
||||
|
||||
public void init(FormSectionEvent e)
|
||||
throws FormProcessException {
|
||||
|
||||
|
|
@ -370,16 +365,19 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
initWidgets(e, widget);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class WidgetFormProcessListener implements FormProcessListener {
|
||||
|
||||
public void process(FormSectionEvent e)
|
||||
throws FormProcessException {
|
||||
|
||||
PageState state = e.getPageState();
|
||||
|
||||
if (isCancelled(state))
|
||||
if (isCancelled(state)) {
|
||||
return;
|
||||
}
|
||||
|
||||
BigDecimal action = (BigDecimal) m_action.getSelectedKey(state);
|
||||
|
||||
|
|
@ -388,8 +386,11 @@ public abstract class WidgetForm extends PropertiesForm {
|
|||
processWidgets(e, widget);
|
||||
widget.save();
|
||||
|
||||
if (action == null)
|
||||
if (action == null) {
|
||||
addToForm(e, widget);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<portlet-mode>HELP</portlet-mode>
|
||||
</supports>
|
||||
<portlet-info>
|
||||
<title>Hello, Pluto at last!</title>
|
||||
<title>Hello, Pluto from LibreCCM!</title>
|
||||
</portlet-info>
|
||||
</portlet>
|
||||
</portlet-app>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
<xsl:template match="theme:folder|theme:file" name="themeFolder">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<img src="/assets/pix.gif"><xsl:attribute name="width"><xsl:value-of select="@depth"/></xsl:attribute></img>
|
||||
<img src="{$context-prefix}/assets/pix.gif"><xsl:attribute name="width"><xsl:value-of select="@depth"/></xsl:attribute></img>
|
||||
</td>
|
||||
|
||||
<xsl:if test="name()='theme:folder'">
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@
|
|||
<!-- EN Show categories to select -->
|
||||
<xsl:template match="cms:categoryWidget">
|
||||
<!-- <script type="text/javascript" src="/assets/prototype.js"/> -->
|
||||
<script type="text/javascript" src="/assets/jquery.js"/>
|
||||
<script type="text/javascript" src="{$context-prefix}/assets/jquery.js"/>
|
||||
<script type="text/javascript" src="{$theme-prefix}/includes/cms/category-step.js"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@mode='javascript'">
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@
|
|||
<!-- DE Zeige die Kategorien zum Hinzufügen an -->
|
||||
<!-- EN Show categories to select -->
|
||||
<xsl:template match="forum:categoryWidget">
|
||||
<script type="text/javascript" src="/assets/prototype.js"/>
|
||||
<script type="text/javascript" src="{$context-prefix}/assets/prototype.js"/>
|
||||
<script type="text/javascript" src="{$theme-prefix}/includes/cms/category-step.js"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@mode='javascript'">
|
||||
|
|
|
|||
|
|
@ -51,22 +51,34 @@
|
|||
<!--script type="text/javascript" src="/assets/fancybox/jquery.easing.pack.js"/-->
|
||||
|
||||
<!-- Add mousewheel plugin (this is optional) -->
|
||||
<script type="text/javascript" src="/assets/fancybox2/lib/jquery.mousewheel-3.0.6.pack.js"/>
|
||||
<script type="text/javascript"
|
||||
src="{$context-prefix}/assets/fancybox2/lib/jquery.mousewheel-3.0.6.pack.js"/>
|
||||
|
||||
<!-- Add fancyBox main JS and CSS files -->
|
||||
<script type="text/javascript" src="/assets/fancybox2/source/jquery.fancybox.js"></script>
|
||||
<link rel="stylesheet" href="/assets/fancybox2/source/jquery.fancybox.css" type="text/css" media="screen"/>
|
||||
<script type="text/javascript"
|
||||
src="{$context-prefix}/assets/fancybox2/source/jquery.fancybox.js"/>
|
||||
<link rel="stylesheet"
|
||||
href="{$context-prefix}/assets/fancybox2/source/jquery.fancybox.css"
|
||||
type="text/css"
|
||||
media="screen"/>
|
||||
|
||||
<!-- Add Button helper (this is optional) -->
|
||||
<link rel="stylesheet" type="text/css" href="/assets/fancybox2/source/helpers/jquery.fancybox-buttons.css" />
|
||||
<script type="text/javascript" src="/assets/fancybox2/source/helpers/jquery.fancybox-buttons.js"></script>
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{$context-prefix}/assets/fancybox2/source/helpers/jquery.fancybox-buttons.css" />
|
||||
<script type="text/javascript"
|
||||
src="{$context-prefix}/assets/fancybox2/source/helpers/jquery.fancybox-buttons.js"/>
|
||||
|
||||
<!-- Add Thumbnail helper (this is optional) -->
|
||||
<link rel="stylesheet" type="text/css" href="/assets/fancybox2/source/helpers/jquery.fancybox-thumbs.css" />
|
||||
<script type="text/javascript" src="/assets/fancybox2/source/helpers/jquery.fancybox-thumbs.js"></script>
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{$context-prefix}/assets/fancybox2/source/helpers/jquery.fancybox-thumbs.css" />
|
||||
<script type="text/javascript"
|
||||
src="{$context-prefix}/assets/fancybox2/source/helpers/jquery.fancybox-thumbs.js"/>
|
||||
|
||||
<!-- Add Media helper (this is optional) -->
|
||||
<script type="text/javascript" src="/assets/fancybox2/source/helpers/jquery.fancybox-media.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="{$context-prefix}/assets/fancybox2/source/helpers/jquery.fancybox-media.js"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
|
|
|||
|
|
@ -196,23 +196,27 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template match="useJQuery">
|
||||
<script type="text/javascript" src="/assets/jquery.js"/>
|
||||
<script type="text/javascript" src="{$context-prefix}/assets/jquery.js"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="useJQueryUI">
|
||||
<script type="text/javascript" src="/assets/jquery-ui.min.js"/>
|
||||
<script type="text/javascript" src="{$context-prefix}/assets/jquery-ui.min.js"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="useMathJax">
|
||||
<script type="text/javascript" src="/assets/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML"/>
|
||||
<script type="text/javascript"
|
||||
src="{$context-prefix}/assets/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="useHTML5shiv">
|
||||
<xsl:text disable-output-escaping="yes">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="/assets/html5shiv.js"/>
|
||||
<![endif]-->
|
||||
</xsl:text>
|
||||
<xsl:value-of disable-output-escaping="yes" select="concat('
|
||||
<!--
|
||||
<!-[if lt IE 9]>
|
||||
<script src="', $context-prefix, '/assets/html5shiv.js"/>
|
||||
<![endif]
|
||||
-->')"/>
|
||||
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<!-- DE Setze den lokalisierten Seitentitel -->
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ Setting up global templates like getStaticText and getSetting
|
|||
</xsl:attribute>
|
||||
<img>
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="'/assets/gray-triangle-up.gif'"/>
|
||||
<xsl:value-of select="concat($context-prefix, '/assets/gray-triangle-up.gif')"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="'moveUp'"/>
|
||||
|
|
@ -443,7 +443,7 @@ Setting up global templates like getStaticText and getSetting
|
|||
</xsl:attribute>
|
||||
<img>
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="'/assets/gray-triangle-down.gif'"/>
|
||||
<xsl:value-of select="concat($context-prefix, '/assets/gray-triangle-down.gif')"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="'moveDown'"/>
|
||||
|
|
|
|||
|
|
@ -68,12 +68,12 @@
|
|||
<a href="{terms:action[@name='delete']/@url}"><img src="/__ccm__/static/cms/admin/action-group/action-delete.png" width="14" height="14" border="0"/></a>
|
||||
<a href="{terms:action[@name='delete']/@url}">Delete</a>
|
||||
<xsl:text> </xsl:text>
|
||||
<a href="{terms:action[@name='train']/@url}"><img src="/assets/action-generic.png" width="14" height="14" border="0"/></a>
|
||||
<a href="{terms:action[@name='train']/@url}"><img src="{$context-prefix}/assets/action-generic.png" width="14" height="14" border="0"/></a>
|
||||
<xsl:choose>
|
||||
<xsl:when test="terms:indexer">
|
||||
<a href="{terms:action[@name='train']/@url}">Retrain indexer</a>
|
||||
<xsl:text> </xsl:text>
|
||||
<a href="{terms:action[@name='untrain']/@url}"><img src="/assets/action-delete.png" width="14" height="14" border="0"/></a>
|
||||
<a href="{terms:action[@name='untrain']/@url}"><img src="{$context-prefix}/assets/action-delete.png" width="14" height="14" border="0"/></a>
|
||||
<a href="{terms:action[@name='untrain']/@url}">Delete indexer</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@
|
|||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<a href="{terms:action[@name='edit']/@url}"><img src="/assets/images/action-generic.png" width="14" height="14" border="0"/></a>
|
||||
<a href="{terms:action[@name='edit']/@url}"><img src="{$context-prefix}/assets/images/action-generic.png" width="14" height="14" border="0"/></a>
|
||||
<a href="{terms:action[@name='edit']/@url}">Edit</a>
|
||||
<xsl:text> </xsl:text>
|
||||
<a href="{terms:action[@name='delete']/@url}"><img src="/assets/images/action-delete.png" width="14" height="14" border="0"/></a>
|
||||
<a href="{terms:action[@name='delete']/@url}"><img src="{$context-prefix}/assets/images/action-delete.png" width="14" height="14" border="0"/></a>
|
||||
<a href="{terms:action[@name='delete']/@url}">Delete</a>
|
||||
<xsl:text> </xsl:text>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
<useJQuery/>
|
||||
<useFancybox/>
|
||||
<useMathJax/>
|
||||
<useHTML5shiv/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue