Update Script fuer ccm-cms-assets-notes.

git-svn-id: https://svn.libreccm.org/ccm/trunk@606 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2010-11-15 09:22:16 +00:00
parent 7260f9f72c
commit a98d54f594
9 changed files with 93 additions and 6 deletions

View File

@ -0,0 +1,35 @@
--
-- Copyright (C) 2010 Peter Boy. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: upd_acs_objects.sql $
update acs_objects
set (object_type,display_name,default_domain_class) =
('com.arsdigita.cms.contentassets.Note' ,
'com.arsdigita.cms.contentassets.Note ' || object_id ,
'com.arsdigita.cms.contentassets.Note' )
where default_domain_class like 'com.arsdigita.london.notes.Note' ;
-- update acs_objects
-- set object_type = 'com.arsdigita.cms.contentassets.Note'
-- where object_type like 'com.arsdigita.london.notes.Note' ;
-- update acs_objects
-- set default_domain_class = 'com.arsdigita.cms.contentassets.Note'
-- where default_domain_class like 'com.arsdigita.london.notes.Note' ;

View File

@ -0,0 +1,29 @@
--
-- Copyright (C) 2010 Peter Boy. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: upd_inits.sql $
delete from init_requirements
where init like 'com.arsdigita.london.notes.NotesInitializer' ;
update inits
set class_name = 'com.arsdigita.cms.contentassets.NotesInitializer'
where class_name like 'com.arsdigita.london.notes.NotesInitializer' ;
insert into init_requirements
values ('com.arsdigita.cms.Initializer',
'com.arsdigita.cms.contentassets.NotesInitializer') ;

View File

@ -0,0 +1,5 @@
PROMPT Notes 6.6.0 -> 6.6.1 Upgrade Script (Oracle)
@@ ../default/upgrade/6.6.0-6.6.1/upd_inits.sql
@@ ../default/upgrade/6.6.0-6.6.1/upd_acs_objects.sql

View File

@ -0,0 +1,8 @@
\echo Notes 6.5.0 -> 6.5.1 Upgrade Script (PostgreSQL)
begin;
\i ../default/upgrade/6.6.0-6.6.1/upd_inits.sql
\i ../default/upgrade/6.6.0-6.6.1/upd_acs_objects.sql
commit;

View File

@ -6,7 +6,7 @@
<!-- First off the adapters for ContentItemPanel --> <!-- First off the adapters for ContentItemPanel -->
<xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator"> <xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator">
<xrd:adapter objectType="com.arsdigita.london.notes.Note"> <xrd:adapter objectType="com.arsdigita.cms.contentassets.Note">
<!-- <!--
<xrd:attributes rule="exclude"> <xrd:attributes rule="exclude">
<xrd:property name="/object/defaultDomainClass"/> <xrd:property name="/object/defaultDomainClass"/>
@ -25,7 +25,7 @@
<!-- Adapter for search --> <!-- Adapter for search -->
<xrd:context name="com.arsdigita.cms.search.ContentPageMetadataProvider"> <xrd:context name="com.arsdigita.cms.search.ContentPageMetadataProvider">
<xrd:adapter objectType="com.arsdigita.london.notes.Note"> <xrd:adapter objectType="com.arsdigita.cms.contentassets.Note">
<!-- <xrd:attributes rule="exclude"> <!-- <xrd:attributes rule="exclude">
<xrd:property name="/object/id"/> <xrd:property name="/object/id"/>
<xrd:property name="/object/defaultDomainClass"/> <xrd:property name="/object/defaultDomainClass"/>

View File

@ -0,0 +1,5 @@
<upgrade>
<version from="6.6.0" to="6.6.1">
<script sql="ccm-cms-assets-notes/upgrade/::database::-6.6.0-6.6.1.sql"/>
</version>
</upgrade>

View File

@ -65,7 +65,8 @@ public class Note extends ACSObject {
public static final String OWNER = "owner"; public static final String OWNER = "owner";
public static final String NOTES = "ca_notes"; public static final String NOTES = "ca_notes";
public static final String AUDIT = "auditing"; public static final String AUDIT = "auditing";
public static final String CREATION_DATE = AUDIT + "." + BasicAuditTrail.CREATION_DATE; public static final String CREATION_DATE = AUDIT + "."
+ BasicAuditTrail.CREATION_DATE;
private BasicAuditTrail auditTrail; private BasicAuditTrail auditTrail;

View File

@ -45,7 +45,7 @@ public class NotesEdit extends SimpleContainer {
m_noteModel = noteModel; m_noteModel = noteModel;
m_form = new Form( "notesEdit", m_form = new Form( "notesEdit",
new SimpleContainer( "cms:notesEdit", CMS.CMS_XML_NS ) ); new SimpleContainer("cms:notesEdit",CMS.CMS_XML_NS) );
m_form.setRedirecting( true ); m_form.setRedirecting( true );
add( m_form ); add( m_form );
@ -54,7 +54,9 @@ public class NotesEdit extends SimpleContainer {
StringParameter contentParam = new StringParameter( "content" ); StringParameter contentParam = new StringParameter( "content" );
contentParam.addParameterListener( new NotNullValidationListener() ); contentParam.addParameterListener( new NotNullValidationListener() );
final DHTMLEditor content = new DHTMLEditor( contentParam,ContentSection.getConfig().getDHTMLEditorConfig() ); final DHTMLEditor content = new DHTMLEditor( contentParam,
ContentSection.getConfig()
.getDHTMLEditorConfig() );
content.setRows( 20 ); content.setRows( 20 );
m_form.add( content ); m_form.add( content );

View File

@ -36,7 +36,9 @@ public class NotesSummary extends Table implements AdditionalDisplayComponent {
setColumnSelectionModel(null); setColumnSelectionModel(null);
model.get(0).setCellRenderer(new TableCellRenderer() { model.get(0).setCellRenderer(new TableCellRenderer() {
public Component getComponent(Table table, PageState state, Object value, boolean isSelected, Object key, int row, int column) { public Component getComponent(Table table, PageState state,
Object value, boolean isSelected,
Object key, int row, int column) {
Label t = new Label((String)value); Label t = new Label((String)value);
t.setOutputEscaping(false); t.setOutputEscaping(false);