Needs review
Project:
Context Help
Version:
6.x-1.0
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Aug 2010 at 14:19 UTC
Updated:
26 Aug 2010 at 14:19 UTC
node_edit_protection creates a pop-up screen if a user has changed a field in a form and tryies to navigate away from the screen, with context help clicking the help triggers this ( 3 times ).
I'd roll a patch, but I still have no idea how to do it yet ( trying to learn it though).
in contexthelp.module:
function contexthelp_footer($main = 0) {
$data = '';
// Only Show is the user actually has access to view context help
if (user_access('context help view')) {
// Put the help button into the system if we do not have the help button in the theme
if (!variable_get('contexthelp_help_button_in_theme', false)) {
$data .= '<div><a href="#" class="node-edit-protection-processed" id="contextual-help-toggle">'. t('Help') .'</a></div>';
}
$data .= '<div class="context jqmID1 node-edit-protection-processed" id="contextual-help-dialog" style="z-index: 3000; opacity: 1; display: none;">';
$data .= '<a class="jqmClose node-edit-protection-processed" id="contextual-help-close" href="#">X</a>';
$data .= '<ul id="contextual-help-tabs" class="node-edit-protection-processed" >';
$data .= '<li class="active node-edit-protection-processed" id="help-tab-0">';
$data .= '<a href="#" class="node-edit-protection-processed"><span>'. t('Current Page') .'</span></a>';
$data .= '</li>';
if (!variable_get('contexthelp_disable_all_help', false)) {
$data .= '<li id="help-tab-1" class="node-edit-protection-processed" >';
$data .= '<a href="#" class="node-edit-protection-processed" ><span>'. t('All Pages') .'</span></a>';
$data .= '</li>';
}
if (!variable_get('contexthelp_disable_faq', false)) {
$data .= '<li id="help-tab-2" class="node-edit-protection-processed" >';
$data .= '<a href="#" class="node-edit-protection-processed"><span>'. t('FAQ') .'</span></a>';
$data .= '</li>';
}
$data .= '</ul>';
$data .= '<div id="contextual-help-content" class="node-edit-protection-processed">';
$data .= '<div id="help-content-0" class="node-edit-protection-processed" style="display: block;">';
$data .= theme('contexthelp_block');
$data .= '</div>';
if (!variable_get('contexthelp_disable_all_help', false)) {
$data .= '<div id="help-content-1" class="node-edit-protection-processed" style="display: none;">';
$data .= t('Loading....');
$data .= '</div>';
}
if (!variable_get('contexthelp_disable_faq', false)) {
$data .= '<div id="help-content-2" class="node-edit-protection-processed" style="display: none;">';
$data .= t('Loading....');
$data .= '</div>';
}
$data .= '</div>';
$data .= '</div>';
}
return $data;
}
in essence adding
class="node-edit-protection-processed"
escapes the node edit protection popup. It's not a clean solution, but it works.