[workaround] validation-message on tabs when using ajax

2009-01-23 Thread Benjamin Boksa

Hi All,

I use the snippet below to enable the "validation-icon on tab" effect  
when using tab-styled groups in my ajax-enabled form template. As  
there were some discussions about this some months ago I thought some  
of you might be interested. Please be aware that this is only a  
(ugly?) workaround to enable the effect and that I am not a dojo 0.4.3- 
guru, however it works for me (tested on Safari 3.2.1/Mac, FF 3.0.1/ 
Mac, IE 7/Win).


The function must be called after the AJAX-response has been processed  
- I call it in my extended cocoon.forms.AjaxForm right after  
"updater.processResponse(data);".


If you have any questions/improvements let me know about them. Hope  
that helps some of you.


Regards

Benjamin



_addValidationMessageIconToTabs: function() {
var span; // this will be initialized below only when needed
var tabAreas = dojo.html.getElementsByClass('forms-tabArea  
forms tabArea');


dojo.lang.forEach(tabAreas,
function(tabArea) {
var parent = tabArea.parentNode; // no wrapper for  
parentNode in dojo 0.4.3?!
var tabs = dojo.html.getElementsByClass('forms-tab  
forms tab', tabArea);


dojo.lang.forEach(tabs,
function(tab, index) {
var tabContent =  
dojo.html.getElementsByClass('forms-tabContent forms tabContent',  
parent)[index];
var validationMsgs =  
dojo.html.getElementsByClass('forms-validation-message-popup',  
tabContent);

if (validationMsgs.length !== 0) {
if (!span) {
span =  
document.createElement('span'); // no wrapper for createElement in  
dojo 0.4.3?!
dojo.html.addClass(span, 'forms- 
validation-message forms validation-message');
var img =  
document.createElement('img');
img.setAttribute('src',  
'servlet:forms:/resource/external/forms/js/templates/images/validation- 
message.gif', 0);
dojo.dom.insertAtPosition(img, span,  
'last');

}

if (dojo.html.getElementsByClass('forms- 
validation-message forms validation-message', tab).length === 0) {
 
dojo.dom.insertAtPosition(span.cloneNode(true), tab, 'last');  // no  
wrapper for cloneNode in dojo 0.4.3?!

}
}
}
);
}
);
},


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[Travel Assistance] Applications for ApacheCon EU 2009 - Now Open

2009-01-23 Thread Joerg Heinicke

 Original Message 
Subject: [Travel Assistance] Applications for ApacheCon EU 2009 - Now Open
Date: Fri, 23 Jan 2009 13:28:19 +
From: Tony Stevenson 
Reply-To: commun...@apache.org
To: travel-assista...@apache.org



The Travel Assistance Committee is now accepting applications for those
wanting to attend ApacheCon EU 2009 between the 23rd and 27th March 2009
in Amsterdam.

The Travel Assistance Committee is looking for people who would like to
be able to attend ApacheCon EU 2009 who need some financial support in
order to get there. There are very few places available and the criteria
is high, that aside applications are open to all open source developers
who feel that their attendance would benefit themselves, their
project(s), the ASF or open source in general.

Financial assistance is available for travel, accommodation and entrance
fees either in full or in part, depending on circumstances. It is
intended that all our ApacheCon events are covered, so it may be prudent
for those in the United States or Asia to wait until an event closer to
them comes up - you are all welcome to apply for ApacheCon EU of course,
but there must be compelling reasons for you to attend an event further
away that your home location for your application to be considered above
those closer to the event location.

More information can be found on the main Apache website at
http://www.apache.org/travel/index.html - where you will also find a
link to the online application form.

Time is very tight for this event, so applications are open now and will
end on the 4th February 2009 - to give enough time for travel
arrangements to be made.

Good luck to all those that apply.


Regards,
The Travel Assistance Committee

-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org