=== removed directory 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/editor'
=== removed file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/editor/EditorManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/editor/EditorManager.java 2010-10-12 07:36:49 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/editor/EditorManager.java 1970-01-01 00:00:00 +0000
@@ -1,41 +0,0 @@
-package org.hisp.dhis.editor;
-
-/*
- * Copyright (c) 2004-2010, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/**
- * @author Tran Thanh Tri
- * @version $Id: EditorManager
- */
-public interface EditorManager
-{
-
- public void setValue( String value );
-
- public String create( String name, String width, String height );
-}
=== removed file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/editor/FCKEditorManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/editor/FCKEditorManager.java 2010-10-12 07:36:49 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/editor/FCKEditorManager.java 1970-01-01 00:00:00 +0000
@@ -1,73 +0,0 @@
-package org.hisp.dhis.editor;
-
-/*
- * Copyright (c) 2004-2010, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-import net.fckeditor.FCKeditor;
-
-import org.apache.struts2.ServletActionContext;
-
-/**
- * @author Tran Thanh Tri
- * @version $Id: FCKEditorManager
- */
-public class FCKEditorManager
- implements EditorManager
-{
- private String value;
-
- public void setValue( String value )
- {
- this.value = value;
- }
-
- private String basePath;
-
- public void setBasePath( String basePath )
- {
- this.basePath = basePath;
- }
-
- private String skin;
-
- public void setSkin( String skin )
- {
- this.skin = skin;
- }
-
- public String create( String name, String width, String height )
- {
- FCKeditor editor = new FCKeditor( ServletActionContext.getRequest(), name );
- editor.setConfig( "SkinPath", "skins/" + skin + "/" );
- editor.setBasePath( basePath );
- editor.setWidth( width );
- editor.setHeight( height );
- editor.setValue( value );
- return editor.createHtml();
-
- }
-
-}
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2011-04-07 13:48:56 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2011-04-29 10:05:04 +0000
@@ -504,9 +504,4 @@
-
-
-
-
-
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ViewDataEntryFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ViewDataEntryFormAction.java 2011-03-31 01:39:19 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ViewDataEntryFormAction.java 2011-04-29 10:05:04 +0000
@@ -35,7 +35,6 @@
import org.hisp.dhis.dataelement.comparator.DataElementNameComparator;
import org.hisp.dhis.dataentryform.DataEntryForm;
import org.hisp.dhis.dataentryform.DataEntryFormService;
-import org.hisp.dhis.editor.EditorManager;
import org.hisp.dhis.program.ProgramStage;
import org.hisp.dhis.program.ProgramStageDataElementService;
import org.hisp.dhis.program.ProgramStageService;
@@ -70,18 +69,6 @@
this.programStageService = programStageService;
}
- private EditorManager editorManager;
-
- public EditorManager getEditorManager()
- {
- return editorManager;
- }
-
- public void setEditorManager( EditorManager editorManager )
- {
- this.editorManager = editorManager;
- }
-
private ProgramStageDataElementService programStageDataElementService;
public void setProgramStageDataElementService( ProgramStageDataElementService programStageDataElementService )
@@ -135,6 +122,13 @@
return programStages;
}
+ private String dataEntryValue;
+
+ public String getDataEntryValue()
+ {
+ return dataEntryValue;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -149,9 +143,15 @@
// ---------------------------------------------------------------------
dataEntryForm = programStage.getDataEntryForm();
-
- editorManager.setValue( dataEntryForm == null ? "" : dataEntryFormService.prepareDataEntryFormCode( dataEntryForm
- .getHtmlCode() ) );
+
+ if ( dataEntryForm != null )
+ {
+ dataEntryValue = dataEntryFormService.prepareDataEntryFormCode( dataEntryForm.getHtmlCode() );
+ }
+ else
+ {
+ dataEntryValue = "";
+ }
// ---------------------------------------------------------------------
// Get existing Data Entry Forms
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2011-04-29 07:41:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2011-04-29 10:05:04 +0000
@@ -817,7 +817,6 @@
-
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2011-04-29 07:41:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2011-04-29 10:05:04 +0000
@@ -832,7 +832,9 @@
class="org.hisp.dhis.patient.action.dataentryform.ViewDataEntryFormAction">
/main.vm
/dhis-web-maintenance-patient/viewDataEntryForm.vm
- javascript/viewDataEntryForm.js
+
+ ../dhis-web-commons/ckeditor/ckeditor.js, ../dhis-web-commons/ckeditor/adapters/jquery.js, javascript/viewDataEntryForm.js
+
" + i18n_specify_dataelememt + "" );
- return;
- }else{
- jQuery( source + " #message_").html( "" );
- }
- var categoryOptionCombos = getSelectedValues( source + ' #optionComboIds' );
-
- var dataElementId = dataElement.id;
- var dataElementName = dataElement.name;
- var dataElementType = dataElement.type;
- var viewByValue = jQuery( source + ' #viewBySelector' ).val();
-
- var strPSDataEntryId = "value["+ associationId +"].value:value["+ dataElementId +"].value";
- var comboPSDataEntryId = "value["+ associationId +"].combo:value["+ dataElementId +"].combo";
- var boolPSDataEntryId = "value["+ associationId +"].boolean:value["+ dataElementId +"].boolean";
- var datePSDataEntryId = "value["+ associationId +"].date:value["+ dataElementId +"].date";
-
- if(viewByValue == "deid") dispName = "[ " + dataElementId;
- else if (viewByValue == "deshortname") dispName = "[ " + dataElement.shortName;
- else dispName = "[ " + dataElementName;
-
- viewByValue = "@@" + viewByValue + "@@";
-
- var id = "";
-
- var selectString = "";
-
- if( dataElementType == "string" )
- {
- if( categoryOptionCombos[0].default == 'true' )
- {
- strPSDataEntryId = strPSDataEntryId + ":value["+ categoryOptionCombos[0].id +"].value";
- selectString += "";
- id = strPSDataEntryId;
- }else{
- selectString = "";
-
- id = comboPSDataEntryId;
- }
-
- }else if (dataElementType == "bool")
- {
- selectString = "