job.js
Code: Select all
contextDisabled=false; // Set this parameter to disable or enable right click, context menu at runtime.
contextMenu="jobCM"; // Default name for the contextMenu
contextObject=""; // This is the object the right click occured on, could be an image, link whatever was under the mouse at the point of right click.
job.js.php
Code: Select all
with(milonic=new menuname("jobCM")){
style = contextStyle;
itemwidth=162;
aI("image=/images/titlebars/appointments.gif;type=header;align=center;separatorsize=1;separatorwidth=162;");
aI("text=New Appointment;url=/subpage.php?page=job&action=new;padding=3;target=iFrame;");
aI("text=List Appointments;showmenu=jobCM_LIST;padding=3;separatorsize=0;separatorpadding=1;target=iFrame;");
aI("text=Close Appointments;url=/subpage.php?page=job&src=<?=$_GET['src'];?>&action=close;target=iFrame;");
<?php
if (hexdec($_SESSION['user']['auth_level']) == hexdec('0xFF')) {
?>
aI("text=Finalize Appointments;url=/subpage.php?page=job&src=<?=$_GET['src'];?>&action=finalize;target=iFrame;");
aI("text=Print Invoices;url=/subpage.php?page=job&src=<?=$_GET['src'];?>&action=selectInvoices;target=iFrame;<?=(isset($_GET['id']) ? 'separatorsize=1;separatorpadding=1;' : '');?>");
<?php
}
if (isset($_GET['id']) && $_GET['id'] != null) {
?>
aI("text=Post History;url=/subpage.php?page=job&src=<?=$_GET['src'];?>&action=post&id=<?=$_GET['id'];?>;target=iFrame;");
aI("text=Review Appointment;url=/subpage.php?page=job&action=review&id=<?=$_GET['id'];?>;target=iFrame;");
aI("text=Add Comment;url=/subpage.php?page=addComment&type=job&id=<?=$_GET['id'];?>;target=iFrame;");
<?php
if(($_SESSION['user']['primary_id'] == $job->member->primary_id) || ($_SESSION['user']['auth_level'] > $job->member->auth_level)) {
?>
aI("text=Update Appointment;url=/subpage.php?page=job&action=update&src=<?=$_GET['src'];?>&id=<?=$_GET['id'];?>;target=iFrame;");
<?php
}
}
?>
}
with(milonic=new menuname("jobCM_POST")){
style = contextStyle;
itemwidth=162;
aI("text=History;url=/subpage.php?page=job&action=history&id=<?=$_GET['id'];?>;target=iFrame;");
aI("text=Notes;url=/subpage.php?page=job&action=notes&id=<?=$_GET['id'];?>;target=iFrame;");
}
drawMenus();
Now the menu for the job page is not working unless you right click out of the main content iframe. The menu for the customer page is below and works perfectly in IE and FF.
customer.js
Code: Select all
contextDisabled=false; // Set this parameter to disable or enable right click, context menu at runtime.
contextMenu="customerCM"; // Default name for the contextMenu
contextObject=""; // This is the object the right click occured on, could be an image, link whatever was under the mouse at the point of right click.
customer.js.php
Code: Select all
<?php
@session_start();
//require_once('./bin/site.inc.php');
?>
with(milonic=new menuname("customerCM")){
style = contextStyle;
itemwidth=162;
margin=1;
aI("bgimage=/images/titlebars/customers.gif;type=header;separatorsize=1;separatorwidth=162;imageheight=20;");
aI("text=New Customer;url=/subpage.php?page=customer&action=new;image=/images/icons/contact_new.gif;");
aI("text=List Customers;showmenu=customerCM_LIST;padding=3;separatorsize=1;separatorpadding=1;");
aI("text=Detail Center;url=/subpage.php?page=customer&action=detail;");
<?=($_GET['action'] == 'list' ? 'aI("text=Print;clickfunction=window.print();image=/images/icons/printer.gif;");' : '');?>
}
with(milonic=new menuname("customerCM_LIST")){
style = subStyle;
itemwidth=162;
aI("text=Full name;url=/subpage.php?page=customer&action=list&p=0&sort=first_name;");
aI("text=Company;url=/subpage.php?page=customer&action=list&p=0&sort=company_name;");
aI("text=File as;url=/subpage.php?page=customer&action=list&p=0&sort=file_as;");
}
drawMenus();
I'm not sure how to find out what version of the context menu I'm using.
I know the php stuff isn't the problem because I've gone down to just straight calls with no php in the file with the same results.