function generateROITypeComboBox($roi_type = null) { $roi_type_list = getROItypeList(); $combobox_html = ''; $combobox_html .= '<select name="roi_types" id="roi_types">' . "\n"; for ($i = 0; $i < sizeof($roi_type_list); $i++) { $selected = ''; if ($roi_type_list[$i] == $roi_type) { $selected = ' selected'; } $combobox_html .= '<option onClick="update_roi_type(\'' . $roi_type_list[$i] . '\');" value="' . $roi_type_list[$i] . '"' . $selected . '>' . $roi_type_list[$i] . '</option>' . "\n"; } $combobox_html .= '</select>' . "\n"; return $combobox_html; }
function get_right_click_list($pid) { $ap_roi = new AP_ROI(); $roiMetadata_record = $ap_roi->getroiMetadata_record($pid); $roi_type_temp = $roiMetadata_record['roiType']; $roi_list = getROItypeList(); $roi_type = ''; switch ($roi_type_temp) { case $roi_list[0]: $roi_type = "primary"; break; case $roi_list[1]: $roi_type = "determination"; break; case $roi_list[2]: $roi_type = "barcode"; break; case $roi_list[3]: $roi_type = "type"; break; case $roi_list[4]: $roi_type = "annotation"; break; } //Context Menu List print '<ul id="apiary_context_menu" class="jeegoocontext cm_blue">'; //Who & When print '<li>Who & When<ul>'; $whoObj = db_query("select * from {apiary_project} where parse_level=1 AND (ui_categories='who' OR ui_categories='when')"); while ($res = db_fetch_object($whoObj)) { if (stristr($res->roi_association, $roi_type) !== false) { print '<li><a id="menu_' . $res->term . '" href=javascript:getSelText("' . $res->term . '")>' . $res->display_label . '</a>'; } } print "</ul></li>"; //What print '<li>What<ul>'; $whatObj = db_query("select * from {apiary_project} where parse_level=1 AND ui_categories='what'"); while ($res = db_fetch_object($whatObj)) { if (stristr($res->roi_association, $roi_type) !== false) { print '<li><a id="menu_' . $res->term . '" href=javascript:getSelText("' . $res->term . '")>' . $res->display_label . '</a>'; } } print "</ul></li>"; //Where print '<li>Where</a><ul>'; $whereObj = db_query("select * from {apiary_project} where parse_level=1 AND ui_categories='where'"); while ($res = db_fetch_object($whereObj)) { if (stristr($res->roi_association, $roi_type) !== false) { print '<li><a id="menu_' . $res->term . '" href=javascript:getSelText("' . $res->term . '")>' . $res->display_label . '</a>'; } } print "</ul></li>"; print '</ul>'; }