Hi Marco,
My bad! I missed another javascript dependency that is not present in
Release 6.05.02.
The error you got is caused by a missing function in
/editor/src/site/workbench/resources/js/hippo/framework/event_util.js
This function is present in Branch-6.05.xx and the trunk, for
Release-6.05.02 you'll have to apply another patch, which I've attached
to this mail.
Hope this works, else you might consider working with Branch-6.05.xx
untill 6.05.03 is released, so you don't have to worry about patch
files.
Regards,
Arthur Bogaart
[EMAIL PROTECTED] - www.onehippo.com
-------------------------------------------------------------
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-3329 +1 (707) 773-4646
-------------------------------------------------------------
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marco
Casavecchia Morganti
Sent: donderdag 3 april 2008 13:44
To: Hippo CMS development public mailinglist
Subject: Re: [HippoCMS-dev] Start the CMS on a different dashboard view
Hello all,
I just applied the patch to my 6.05.02 CMS but it doesn't works so good.
I changed the dafaultView from "welcome" to "todo" and now the 2 views
comes out mixed! (in other words i see both views merged in the same
messy page) Bugzilla tells me that:
---
dom.getById is not a function
onLoad()hippoApplication.... (line 899)
show()hippoApplication.... (line 824)
showPerspective("dashboard", undefined)hippoApplication.... (line 710)
showMenu()hippoApplication.... (line 212)
splashScreen(false)hippoFramework.js (line 572)
splashScreenWhenInitialized(7)hippoFramework.js (line 524) [Break on
this error] if (dom.getById(lastActive)) {
---
This is not enough, now i can't switch from a view to another because I
got another javascript error:
---
myP has no properties
showView("welcome")dashboard.js (line 99) onclick(click clientX=0,
clientY=0)perspective.html (line 1) [Break on this error] var lastActive
= myP.vm.getViewById('submenu').getLastActive();
---
Hope to be useful.
By MCM.
Arthur Bogaart wrote:
> Hi,
>
>> In theory, edit your custom component.xml and change the submenu
> defaultView attribute in view:
>> <view
>> id="submenu"
>> label="SubMenu"
>> className="SubMenuView"
>> appUrl="/dashboard/submenu"
>> bootParam=""
>> defaultView="welcome"
>> style="submenuview"/>
>>
>> In practice, this didn't work for me. Hippos?
>
> Just tested this and your right, this is broken in the trunk, don't
> know since which release.
>
> I've just written a fix and will commit it right away in HippoCMS
> trunk and Branch-6.05.xx.
> And just to make sure, I've added it as a patch to this mail.
>
> Regards,
> Arthur Bogaart
>
> [EMAIL PROTECTED] - www.onehippo.com
> -------------------------------------------------------------
> Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
> San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
> 94952-3329 +1 (707) 773-4646
> -------------------------------------------------------------
>
>
>> Andrew.
>> --
>> Sourcesense: Making sense of Open Source
>> Tel: +44 (0)870 741 6658 Fax: +44 (0)700 598 1135
>> Web: http://www.sourcesense.com/
>> ********************************************
>> Hippocms-dev: Hippo CMS development public mailinglist
>>
>> ---------------------------------------------------------------------
>> ---
>>
>> Index:
>> C:/projects/hippo-cms-trunk/editor/src/site/workbench/resources/js/hi
>> ppo/perspectives.js
>> ===================================================================
>> ---
C:/projects/hippo-cms-trunk/editor/src/site/workbench/resources/js/hippo
/perspectives.js (revision 10823)
>> +++
C:/projects/hippo-cms-trunk/editor/src/site/workbench/resources/js/hippo
/perspectives.js (working copy)
>> @@ -243,14 +243,47 @@
>> Cfx.Class.New(DashboardPerspective, Perspective);
>> if( Cfx.Class.IsInitializing( DashboardPerspective)) {
>> // Initialize class methods
>> + DashboardPerspective.Method(onLoad);
>> return;
>> }
>> }
>>
>> // Setup instance data.
>> this.InitInstance();
>> + this.firstHitHandled = false;
>> // Return instance.
>> return this;
>> +
>> + function onLoad() {
>> +
>> + this.baseClass.onLoad.apply(this); //super call
>> +
>> + if(this.firstHitHandled)
>> + return;
>> +
>> + var defaultStartupView = 'welcome';
>> + var subMenu = this.vm.getViewById('submenu');
>> + var id = subMenu.config.defaultView != null ?
subMenu.config.defaultView : defaultStartupView;
>> + var lastActive = 'welcome';
>> +
>> + if(id == lastActive)
>> + return;
>> +
>> + var myV = this.vm.getViewById(id);
>> + if(myV != null && isInstanceOf(myV, 'LazyView') &&
!myV.isActivatable()) {
>> + myV.setActivatable(); //refactor
>> + }
>> +
>> + var dom = this.container.getDOM();
>> + if (dom.getById(lastActive)) {
>> + dom.getById(lastActive).style.display = 'none';
>> + }
>> + if (dom.getById(id)) {
>> + dom.getById(id).style.display = 'block';
>> + }
>> + subMenu.setLastActive(id);
>> + this.firstHitHandled = true;
>> + }
>> }
>>
>> function DocumentPerspective() {
>>
>> ---------------------------------------------------------------------
>> ---
>>
>> ********************************************
>> Hippocms-dev: Hippo CMS development public mailinglist
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
Index:
C:/projects/Release-CMS-v6_05_02/editor/src/site/workbench/resources/js/hippo/framework/event_util.js
===================================================================
---
C:/projects/Release-CMS-v6_05_02/editor/src/site/workbench/resources/js/hippo/framework/event_util.js
(revision 11007)
+++
C:/projects/Release-CMS-v6_05_02/editor/src/site/workbench/resources/js/hippo/framework/event_util.js
(working copy)
@@ -18,6 +18,16 @@
return getTop().Cfx.Class.InstanceOf(obj, eval('getTop().' + cls));
}
+//get an element by id
+function getById(strId) {
+ return document.getElementById(strId);
+}
+
+//get a form by name
+function getForm(strName) {
+ return document.forms[strName];
+}
+
function getWB(){
return getTop().workbench;
}
********************************************
Hippocms-dev: Hippo CMS development public mailinglist