Hey guys,
I just got into Radiant, and I’m loving the simplicity of it.
But I can already hear my end clients nagging, coz they cant remember
part names and whatelse…
well I just solved that by making a stupid simple image map popup.
thought i’d share it, as it can trastically improve end-user experience(
and maybe even yours)
only file you need to edit is /app/views/admin/page/new.rhtml
just add these 2 JS functions at the top of the page.
function toggle_help_part_popup() {
var popup = $(‘help-part-popup’);
var partNameField = $(‘part-name-field’);
center(popup);
Element.toggle(popup);
}
function put_part(frmtxt){
var partNameField = $(‘part-name-field’);
partNameField.value = frmtxt;
Element.hide(‘help-part-popup’);
}
then create the imagemap pop-up (its a div layer within the popups id)
last but not least add a link to the “add_part” popup, I placed it next
to the close tag, so it would result in the following:
<%= link_to_function 'Close', "Element.hide('add-part-popup')", :class => 'close-link' %> <%= link_to "help?", 'javascript: toggle_help_part_popup()', :title => 'help?' %>
this is totally simple, but I believe some people mind find some use for
it.
if you wanna test it out i placed the image map at
http://nexflo.net/layout_helper.png
its all pretty self explanatory I guess, but it still saves time
best,
Florian