Hello!
First, this is almost commercial of SuperTimesheet but still it is "howto"
Paid version of SuperTimesheet module now contain AJAX-driven menu.
It means that when after a module has been loaded and then you click on any item from Shortcuts, the ajax call is being initiated and returned HTML-result will be shown in main region without reloading current page.
You need to create Menu.php under module dir (modules/{module}/) with such contents:
Free SuperTimesheet module v.2.0 has this feature (download http://www.sugarforge.org/frs/downlo...sheet.v2.0.zip)PHP Code:<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
global $mod_strings, $app_strings, $current_user;
if(ACLController::checkAccess('Timesheet', 'list', true))
$module_menu[] = array("index.php?module=Timesheet&action=ListView&return_module=Timesheet&return_action=DetailView\" onclick=\"var ajax=new SUGAR.ajaxStatusClass; ajax.showStatus('".$app_strings['LBL_LOADING_PAGE']."');var obj=YAHOO.util.Connect.asyncRequest('GET', 'index.php?module=Timesheet&action=ListView&return_module=Timesheet&return_action=DetailView&sugar_body_only=true&to_pdf=true', {success:function(o){if(o.status > 0){document.getElementById('main').innerHTML=o.responseText; ajax.hideStatus();}}, failure: function(o){}}, null); return false\"", $mod_strings['LNK_TIMESHEET_LIST'],"TimesheetList");
...


LinkBack URL
About LinkBacks




Reply With Quote
Bookmarks