knguyen 2004/09/29 14:44:31 CEST
Modified files: (Branch: JAHIA-4-0-BRANCH)
src/views/jsp/jahia/engines/shared
readonly_smalltext_field.jsp
Log:
- multivalues, jahia expression and tidy issue
Revision Changes Path
1.4.4.2 +14 -10
jahia/src/views/jsp/jahia/engines/shared/readonly_smalltext_field.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/views/jsp/jahia/engines/shared/readonly_smalltext_field.jsp.diff?r1=1.4.4.1&r2=1.4.4.2&f=h
Index: readonly_smalltext_field.jsp
===================================================================
RCS file:
/home/cvs/repository/jahia/src/views/jsp/jahia/engines/shared/Attic/readonly_smalltext_field.jsp,v
retrieving revision 1.4.4.1
retrieving revision 1.4.4.2
diff -u -r1.4.4.1 -r1.4.4.2
--- readonly_smalltext_field.jsp 6 Aug 2004 18:01:14 -0000 1.4.4.1
+++ readonly_smalltext_field.jsp 29 Sep 2004 12:44:30 -0000 1.4.4.2
@@ -30,17 +30,21 @@
<%
String theSelectedField = theField.getValue();
String theNewField = "";
- String strToRemove[] = {"<JAHIA", "_MULTIVALUE"};
+ String strToRemove[] = {"<JAHIA", "_MULTIVALUE", "<_MULTIVALUE", "_SINGLE",
"_MULTIPLE"};
- for (int i = 0; i < strToRemove.length; i++) {
- String upperCaseField = theSelectedField.toUpperCase();
- int index = upperCaseField.indexOf(strToRemove[i]);
- if (index != -1) {
- theNewField = theSelectedField.substring(0, index) +
- theSelectedField.substring(index +
strToRemove[i].length(), theSelectedField.length());
- theSelectedField = theNewField;
- }
- }
+ if ( theSelectedField != null
+ && !theSelectedField.toUpperCase().startsWith("<JAHIA-RESOURCE")
+ && !theSelectedField.toUpperCase().startsWith("<JAHIA-EXPRESSION")
){
+ for (int i = 0; i < strToRemove.length; i++) {
+ String upperCaseField = theSelectedField.toUpperCase();
+ int index = upperCaseField.indexOf(strToRemove[i]);
+ if (index != -1) {
+ theNewField = theSelectedField.substring(0, index) +
+ theSelectedField.substring(index +
strToRemove[i].length(), theSelectedField.length());
+ theSelectedField = theNewField;
+ }
+ }
+ }
if (theSelectedField.indexOf("[") != -1) {
int startStr = theSelectedField.indexOf("[");