xlawrence 2005/06/24 17:34:25 CEST
Modified files:
core/src/webapp/jsp/jahia/engines/shared bigtext_field.jsp
Log:
Optimizations
Revision Changes Path
1.9 +19 -17
jahia/core/src/webapp/jsp/jahia/engines/shared/bigtext_field.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/engines/shared/bigtext_field.jsp.diff?r1=1.8&r2=1.9&f=h
Index: bigtext_field.jsp
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/webapp/jsp/jahia/engines/shared/bigtext_field.jsp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- bigtext_field.jsp 22 Jun 2005 08:40:33 -0000 1.8
+++ bigtext_field.jsp 24 Jun 2005 15:34:24 -0000 1.9
@@ -15,32 +15,34 @@
<jahia:i18n />
<%
-HashMap engineMap = (HashMap) request.getAttribute(
"org.jahia.engines.EngineHashMap" );
-String engineUrl = (String) engineMap.get( "engineUrl" );
-String URLSep = (engineUrl.indexOf("?") == -1) ? "?" : "&" ;
-String theScreen = (String)engineMap.get("screen");
-
-String fieldsEditCallingEngineName = (String) engineMap.get(
"fieldsEditCallingEngineName" );
-
-JahiaField theField = (JahiaField) engineMap.get(
fieldsEditCallingEngineName + ".theField" );
-ParamBean jParams = (ParamBean) request.getAttribute(
"org.jahia.params.ParamBean" );
-String theURL = (String)
jParams.settings().getJahiaEnginesHttpPath();
-Boolean isSelectedField = (Boolean) engineMap.get(
fieldsEditCallingEngineName + ".isSelectedField" );
-HtmlEditorsViewHelper heViewHelper = (HtmlEditorsViewHelper)
engineMap.get(BigText_Field.HTMLEDITOR_VIEW_HELPER_ATTRIBUTE);
-HtmlEditor defaultEditor = heViewHelper.getDefaultEditor(true);
+final HashMap engineMap = (HashMap) request.getAttribute(
"org.jahia.engines.EngineHashMap" );
+final String engineUrl = (String) engineMap.get( "engineUrl" );
+final String URLSep = (engineUrl.indexOf("?") == -1) ? "?" : "&" ;
+final String theScreen = (String)engineMap.get("screen");
+
+final String fieldsEditCallingEngineName = (String) engineMap.get(
"fieldsEditCallingEngineName" );
+
+final JahiaField theField = (JahiaField) engineMap.get(
fieldsEditCallingEngineName + ".theField" );
+final ParamBean jParams = (ParamBean) request.getAttribute(
"org.jahia.params.ParamBean" );
+final String theURL = (String)
jParams.settings().getJahiaEnginesHttpPath();
+final Boolean isSelectedField = (Boolean)
engineMap.get( fieldsEditCallingEngineName + ".isSelectedField" );
+final HtmlEditorsViewHelper heViewHelper = (HtmlEditorsViewHelper)
engineMap.get(BigText_Field.HTMLEDITOR_VIEW_HELPER_ATTRIBUTE);
+final HtmlEditor defaultEditor =
heViewHelper.getDefaultEditor(true);
-Hashtable cssList = new Hashtable();
+final Hashtable cssList;
if ( defaultEditor != null && defaultEditor.enableCSS()){
cssList = heViewHelper.getEnabledCSSs();
+} else {
+ cssList = new Hashtable();
}
String theOldField = theField.getValue();
String theNewField = "";
-String strToRemove[] = {"<jahia", "_htmleditor>", "<empty>"};
+final String strToRemove[] = {"<jahia", "_htmleditor>", "<empty>"};
for (int i = 0; i < strToRemove.length; i++) {
- String lowerCaseField = theOldField.toLowerCase();
- int index = lowerCaseField.indexOf(strToRemove[i]);
+ final String lowerCaseField = theOldField.toLowerCase();
+ final int index = lowerCaseField.indexOf(strToRemove[i]);
if (index != -1) {
theNewField = theOldField.substring(0, index) +
theOldField.substring(index + strToRemove[i].length(),
theOldField.length());