/** */ public function displayRow($void = null) { $html = ''; // $html .= '<div class="ofuz_list_contact" id="cid'.$this->data->idcontact.'" onclick="fnHighlight(\''.$this->data->idcontact.'\')"><table><tr><td><input type="checkbox" name="ck[]" id="ck'.$this->data->idcontact.'" value="'.$this->data->idcontact.'" class="ofuz_list_checkbox" onclick="fnHighlight(\''.$this->data->idcontact.'\')" /></td>'; $image_name = $this->data->getContactPicture($this->data->idcontact); $exp = explode('/', $image_name); if (in_array('dbimage', $exp)) { $image_name = '/' . $exp[1] . '/thumbnail/' . $exp[2]; } $html .= '<td class="ofuz_list_contact_col1"> <img src="' . $image_name . '" width="34" alt="" /> </td>'; $html .= '<td class="ofuz_list_contact_col2"> <span class="contact_name"><a href="/Contact/' . $this->data->idcontact . '" onclick="allowHighlight=false;">' . $this->data->firstname . ' ' . $this->data->lastname . '</a></span>'; if ($this->data->idcompany != '') { $e_detail_com = new Event('mydb.gotoPage'); $e_detail_com->addParam('goto', 'company.php'); $e_detail_com->addParam('idcompany', $this->data->idcompany); $e_detail_com->addParam('tablename', 'company'); $e_detail_com->requestSave('eDetail_company', $_SERVER['PHP_SELF']); $companyURL = $e_detail_com->getUrl(); //$html .= '<div class="contact_position"><i>'.$this->data->position.'</i> '._('at').' <a href="'.$companyURL.'" onclick="allowHighlight=false;">'.$this->data->company.'</a></div>'; $position = ''; if (strlen($this->data->position) > 0) { $position = '<i>' . $this->data->position . '</i> ' . _('at') . ' '; } $html .= '<div class="contact_position">' . $position . ' <a href="' . $companyURL . '" onclick="allowHighlight=false;">' . $this->data->company . '</a></div>'; } $html .= '</td>'; $html .= '<td class="ofuz_list_contact_col3"> ' . $this->data->phone_number . '<br /> <a href="mailto:' . $this->data->email_address . '">' . $this->data->email_address . '</a><br /> <i>' . str_replace(",", ", ", $this->data->tags) . '</i> </td>'; //$html .= '</tr></table></div>'; //$html .= '<div class="spacerblock_2"></div><div class="solidline"></div><div id="'.$this->data->idcontact.'" class="message_box"></div>'; echo $html; }
} function showDateOpt(){ $("#due_sp_date").show(0); $("#when_due").hide(0); document.getElementById('sp_date_selected').value = "Yes"; } function hideDateOpt(){ $("#due_sp_date").hide(0); $("#when_due").show(0); document.getElementById('sp_date_selected').value = ""; } <?php $e_PrioritySort = new Event("ProjectTask->eventAjaxPrioritySort"); $e_PrioritySort->setEventControler("ajax_evctl.php"); $e_PrioritySort->setSecure(false); $strPrioritySortURL = $e_PrioritySort->getUrl(); ?> function moveTasks(TorB) { var priorities="",checked="",unchecked=""; var priorities=$("#project_tasks").sortable("toArray"); $("input:checkbox").each(function(){ if(this.checked){ checked+=(checked=="")?"":"&"; checked+="pt[]="+$(this).parents("li").attr("id").substr(3); }else{ unchecked+=(unchecked=="")?"":"&"; unchecked+="pt[]="+$(this).parents("li").attr("id").substr(3); } }); if(TorB==1){ priorities=unchecked+(unchecked==""?checked:"&"+checked);
} function showExtraAmt(){ $("#extra_amt").slideToggle("slow"); } function showPastDue(){ $.ajax({ type: "GET", <?php $e_show_past_due = new Event("do_invoice_list->eventShowPastDue"); $e_show_past_due->setEventControler("ajax_evctl.php"); $e_show_past_due->setSecure(false); ?> url: "<?php echo $e_show_past_due->getUrl(); ?> ", data: "a=1", success: function(html_data){ $("#past_due_txt").hide("fast"); $("#inv_msgs").hide("fast"); $("#show_past_due")[0].innerHTML = html_data; } }); } //]]> </script> <div class="banner60_mid text14">
textarea.attr("value", textcontent); $("input[name='fields[subject]']").val(msg_sub) ; $("#unsaved_draft").hide("slow"); } // Discard the saved draft function discardDraft(id){ $.ajax({ type: "GET", <?php $e_MessageDraft = new Event("do_message_draft->eventDeleteDraft"); $e_MessageDraft->setEventControler("ajax_evctl.php"); $e_MessageDraft->setSecure(false); ?> url: "<?php echo $e_MessageDraft->getUrl(); ?> ", data: "id="+id, success: function(result){ $("#unsaved_draft").hide("slow"); } }); } // Run the save draft method in every 30 seconds window.setInterval("fnSaveDraft()", 30000); $(document).ready(function() {; //$("#editor_bodyhtml_iframe").css("height","80px"); }); //]]>
} else { $params = array('next' => SITE_URL . '/fb_logout.php'); } //$facebook_logout->getLogoutUrl($params); //echo '<a href="'.$facebook_logout->getLogoutUrl($params).'" onclick="">Logout</a>'; //echo '<li><a href="'.$facebook->getLogoutUrl($logout_param).'">Log Out</a></li>'; echo '<a href="#" onclick = "yg_fb_logout();" >Log Out</a>'; // echo '<a href="#" onclick=\'FB.Connect.logoutAndRedirect("/fb_logout.php")\'>Logout</a>'; } else { ?> <?php $e_logout = new Event("do_User->eventLogout"); $e_logout->addParam("goto", "user_login.php"); ?> <a href="<?php echo $e_logout->getUrl(); ?> "><?php echo _('Logout'); ?> </a> <?php } ?> </div> <!-- help tab start--> <?php if ($GLOBALS['thistab'] != 'Help') { ?> <div class="layout_navbar_right_help"><a href="/help-support.php">Help & support</a></div> <?php
<div class="spacerblock_20"></div> <div><a id="AncCreateNewTeam" href="javascript:;"><?php echo 'Create New'; ?> </a></div> <div class="spacerblock_20"></div> <div id="DivTeamsList" style="display:block;"> <?php if ($teams_count) { while ($do_teams->next()) { $e_detail = new Event("mydb.gotoPage"); $e_detail->addParam("goto", "team_edit.php"); $e_detail->addParam("idteam", $do_teams->idteam); $e_detail->addParam("tablename", "team"); $e_detail->requestSave("eDetail_team", $_SERVER["PHP_SELF"]); echo $do_teams->team_name . ' <a href="' . $e_detail->getUrl() . '" class="linkdetail">edit</a><br />'; } } else { echo '<p>' . 'You have not yet created a team.' . '</p>'; } ?> </div> <!-- Add Team --> <div id="DivCreateNewTeam" style="display:none;margin-top:20px;"> Team Name: <input type="text" name="team_name" id="team_name" value="" /> <br /> Auto share: <input type="checkbox" name="auto_share" id="auto_share" /> <br /> <input type="button" id="btnCreateTeam" name="btnCreateTeam" value="Add" /> </div> </td>
<div class="loginbg2"> <?php //echo $_SESSION['do_ofuz_fb']->fb_uid;exit; $loginForm = new User(); $loginForm->sessionPersistent("do_User", "", 36000); if ($_SESSION['do_ofuz_fb']->fb_uid != 0 && $_SESSION['do_ofuz_fb']->fb_uid != "" && is_object($_SESSION['do_ofuz_fb'])) { $evctl = new Event("do_User->eventLoginFb"); $evctl->addParam("fbuid", $_SESSION['do_ofuz_fb']->fb_uid); $evctl->addParam("errPage", "fb_ofuz_login_verification.php"); $evctl->addParam("nextPage", "index.php"); $evctl->setSecure(true); ?> <script type="text/javascript"> //<![CDATA[ window.location.href = "<?php echo $evctl->getUrl(); ?> "; //]]> </script> <?php } if ($_GET['message']) { $message = new Message(); $message->setContent($_GET['message']); $message->displayMessage(); } ?> <div class="text" style="position:relative;"> <?php $_SESSION['do_User']->formLogin($next_page, _("Incorrect username or password"), "text", $_SERVER['PHP_SELF']);
} var formData = { "templateId":templateId, "groupId":groupId }; $.ajax({ type: "POST", <?php $e_event = new Event("EmailerSendWithUs->eventSendEmailToGroupWithTemplate"); $e_event->setEventControler("/ajax_evctl.php"); $e_event->setSecure(false); ?> url: "<?php echo $e_event->getUrl(); ?> ", data: formData, beforeSubmit: function() { }, success: function(res) { if (res.trim() == '1') { display_js_success(PLUGIN_SWU_EMAIL_SENT_TO_GROUP_WITH_TEMPLATE,'message'); } else { display_js_error(res,'message'); } } }); });
function formMultiEntry() { if ($this->getNumRows() > 0) { while ($this->next()) { $phone_form .= '<script type="text/javascript"> //<![CDATA[ var new_' . $this->getPrefix() . '_count=1; //]]> </script>'; $phone_form .= '<div id="edit' . $this->getPrefix() . $this->getPrimaryKeyValue() . '">'; $phone_form .= $this->getUpdateFormFields(); $e_delPhone = new Event($this->getPrefix() . "->eventAjaxDelete"); $e_delPhone->addParam("id", $this->getPrimaryKeyValue()); $e_delPhone->setSecure(false); $e_delPhone->setEventControler("ajax_evctl.php"); $phone_form .= '<a href="#" id="delete' . $this->getPrefix() . $this->getPrimaryKeyValue() . '" title="' . _('Delete this fields') . '"><img src="images/delete.gif"></a></div>'; $phone_form .= '<script type="text/javascript"> //<![CDATA[ $("#delete' . $this->getPrefix() . $this->getPrimaryKeyValue() . '").click( function () { $.get("' . $e_delPhone->getUrl() . '"); $("#edit' . $this->getPrefix() . $this->getPrimaryKeyValue() . '").hide(1000).empty(); return false; } ); //]]> </script>'; $phone_form .= '<div class="spacerblock_2"></div>'; } $phone_form .= '<div id="ListNew' . $this->getPrefix() . '"></div>'; $phone_form .= '<a href="#" id="addOneMore' . $this->getPrefix() . '">' . _('Add another') . '</a>'; $e_addform = new Event($this->getPrefix() . "->eventAjaxFormEntry"); $e_addform->setEventControler("ajax_evctl.php"); $e_addform->setSecure(false); $phone_form .= ' <script type="text/javascript"> //<![CDATA[ $("#addOneMore' . $this->getPrefix() . '").click(function () { new_' . $this->getPrefix() . '_count++; $("#ListNew' . $this->getPrefix() . '").append(\'<div id="new' . $this->getPrefix() . '\'+new_' . $this->getPrefix() . '_count+\'" style="margin-bottom:2px;display:none"></div>\'); $("#new' . $this->getPrefix() . '"+new_' . $this->getPrefix() . '_count).load("' . $e_addform->getUrl() . '&count="+new_' . $this->getPrefix() . '_count, function(){$(this).slideDown(200);}); return false; }); //]]> </script>'; return $phone_form; } else { $this->setLog("\n (" . $this->getPrefix() . ") Multiline form with no data"); $phone_form .= '<script type="text/javascript"> //<![CDATA[ var new_' . $this->getPrefix() . '_count=2; //]]> </script>'; $phone_form .= '<div id="ListNew' . $this->getPrefix() . '">'; $new_phone_count = 1; $phone_form .= ' <div id="new' . $this->getPrefix() . 'C' . $new_phone_count . '">'; $phone_form .= $this->getNewFormFields($new_phone_count); $phone_form .= '<a href="#" id="deleteAdd' . $this->getPrefix() . $new_phone_count . '" title="' . _('Delete this field') . '"> <img src="images/delete.gif"> </a> </div> <script type="text/javascript"> //<![CDATA[ $("#deleteAdd' . $this->getPrefix() . $new_phone_count . '").click( function () { $("#new' . $this->getPrefix() . 'C' . $new_phone_count . '").hide(1000).empty(); return false; }); //]]> </script> '; $phone_form .= '<div class="spacerblock_2"></div></div>'; $phone_form .= '<a href="#" id="addOneMore' . $this->getPrefix() . '">' . _('Add another') . '</a>'; $e_addform = new Event($this->getPrefix() . "->eventAjaxFormEntry"); $e_addform->setEventControler("ajax_evctl.php"); $e_addform->setSecure(false); $phone_form .= ' <script type="text/javascript"> //<![CDATA[ $("#addOneMore' . $this->getPrefix() . '").click(function () { new_' . $this->getPrefix() . '_count++; $("#ListNew' . $this->getPrefix() . '").append(\'<div id="new' . $this->getPrefix() . '\'+new_' . $this->getPrefix() . '_count+\'" style="margin-bottom:2px;display:none"></div>\'); $("#new' . $this->getPrefix() . '"+new_' . $this->getPrefix() . '_count).load("' . $e_addform->getUrl() . '&count="+new_' . $this->getPrefix() . '_count, function(){$(this).slideDown(200);}); return false; }); //]]> </script>'; return $phone_form; } }
$_SESSION["page_from"] = $ref; } ?> <link rel="stylesheet" type="text/css" href="/includes/ofuzcom_theme.css" /> <script type="text/javascript"> //<![CDATA[ function fnEnterEmail(ref, act) { $.ajax({ type: "GET", <?php $e_emailForm = new Event("Sync->eventAjaxEnterEmailForm"); $e_emailForm->setEventControler("ajax_evctl.php"); $e_emailForm->setSecure(false); ?> url: "<?php echo $e_emailForm->getUrl(); ?> ", data: "referrer="+ref+"&act="+act, success: function(html){ $("#instruction"+ref+act).slideToggle("slow"); $("#"+ref+act)[0].innerHTML = html; $("#"+ref+act).toggle(0); } }); } //]]> </script> <?php $do_feedback = new Feedback();
* use ajax eventcontroler */ function delete_notes(idnotes) { var notes_content_id = 'content_'+idnotes; var current_note = $("#"+notes_content_id).html(); $("#delete_entity_notes").modal('show'); $("#entiry_notes").on('click','.delete_entity_note_submit', function(e) { $('#'+notes_content_id).html('<img src="/themes/images/ajax-loader1.gif" border="0" />'); $.ajax({ type: "GET", <?php $e_del_notes = new Event("Notes->eventAjaxDeleteNotes"); $e_del_notes->setEventControler("/ajax_evctl.php"); $e_del_notes->setSecure(false); ?> url: "<?php echo $e_del_notes->getUrl(); ?>&idnotes="+idnotes, success: function(html) { var ret_data = html.trim(); if(ret_data == '0') { var succ_element = '<div class="alert alert-danger sqcrm-top-message" id="sqcrm_auto_close_messages"><a href="#" class="close" data-dismiss="alert">×</a>' ; var succ_msg = succ_element+'<strong>'+UNAUTHORIZED_DELETE+'</strong></div>'; $("#message").html(succ_msg); $("#message").show(); $('#'+notes_content_id).html(current_note); } else { $('#note'+idnotes).remove(); $('#note_separator_'+idnotes).remove(); var succ_element = '<div class="alert alert-success sqcrm-top-message" id="sqcrm_auto_close_messages"><a href="#" class="close" data-dismiss="alert">×</a>' ; var succ_msg = succ_element+'<strong>'+NOTES_DELETED_SUCCESSFULLY+'</strong></div>'; $("#message").html(succ_msg); $("#message").show();
</div> <script> function del_report(idreport,report_folder,folder_name) { $("#report_delete_confirm").modal('show'); $("#report_delete_confirm .btn-primary").click(function() { $("#report_delete_confirm").modal('hide'); $.ajax({ type: "POST", <?php $e_del_single = new Event("CRMDeleteEntity->eventAjaxDeleteSingleEntity"); $e_del_single->setEventControler("/ajax_evctl.php"); $e_del_single->addParam('module',$module); $e_del_single->addParam('referrer','list'); $e_del_single->setSecure(false); ?> url: "<?php echo $e_del_single->getUrl(); ?>&sqrecord="+idreport, success: function(html) { ret_data = html.trim(); if (ret_data == '0') { var err_element = '<div class="alert alert-error sqcrm-top-message" id="sqcrm_auto_close_messages"><a href="#" class="close" data-dismiss="alert">×</a>' ; var err_msg = err_element+'<strong>'+UNAUTHORIZED_DELETE+'</strong></div>'; $("#message").html(err_msg); $("#message").show(); } else { $.ajax({ type: "GET", url: "list", data : "ajaxreq="+true+"&folderid="+report_folder+"&foldername="+folder_name, success: function(result) { var folder_block = 'report_folder_'+report_folder ; $('#'+folder_block).html(result);
<?php // Copyright SQCRM. For licensing, reuse, modification and distribution see license.txt /** * breadcrumb view * @author Abhik Chakraborty */ ?> <div id="breadcrumb_loader"></div> <script> $(document).ready(function() { $.ajax({ type: "GET", <?php $e_load_breadcrumb = new Event("CRMEntityRecentlyViewed->eventAjaxLoadRecentlyViewed"); $e_load_breadcrumb->setEventControler("/ajax_evctl.php"); $e_load_breadcrumb->setSecure(false); ?> url: "<?php echo $e_load_breadcrumb->getUrl(); ?>", beforeSubmit: function() { $('#breadcrumb_loader').html('<img src="/themes/images/ajax-loader1.gif" border="0" />'); }, success: function(html) { $('#breadcrumb_loader').html(html); } }); }); </script>
function getNewFormFields($new_invoice_line_count) { $invoice_form = '<tr id="' . $this->getInvoiceLinePrefix() . $new_invoice_line_count . '" onclick="reCalculateAmount();">'; $invoice_form .= '<td colspan="2"><input type="text" style="width: 90%" size="20" name="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][item]" value="" id="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][item]" onkeyup=\'getItemSuggestion("mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][item]","suggestion_area_item' . $new_invoice_line_count . '")\' autocomplete="off" />'; $invoice_form .= '<select id="suggestion_area_item' . $new_invoice_line_count . '" size="5" style="border: solid 1px #b3b3b3; position: absolute; z-index: 2;display:none;" onchange=\'setItemSuggestion("this.options[this.selectedIndex].text","mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][item]","suggestion_area_item' . $new_invoice_line_count . '")\' ></select>'; /* // Description below the item, but on the same row $invoice_form .= '<br />'._('Description').'<br /><textarea cols="20" rows="2" name="mfields['.$this->getTable().'_new]['.$new_invoice_line_count.'][description]" id="mfields['.$this->getTable().'_new]['.$new_invoice_line_count.'][description]" style="width:90%;"></textarea>'; $invoice_form .= '<script type="text/javascript"> $(document).ready(function() { $(document.getElementById("mfields['.$this->getTable().'_new]['.$new_invoice_line_count.'][description]")).expandable(); }); </script> '."\n"; */ $invoice_form .= '<input type="hidden" size="10" name="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][total]" value="" id="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][total]" readonly="readonly" /> <input type="hidden" size="10" name="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][total_with_discount]" value="" id="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][total_with_discount]" readonly="readonly" /> <input type="hidden" size="10" name="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][discounted_amount]" value="" id="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][discounted_amount]" readonly="readonly" /> <input type="hidden" size="10" name="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][taxed_amount]" value="" id="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][taxed_amount]" readonly="readonly" /></td>'; /* // Description in column 2 $invoice_form .= '<td><textarea cols="10" rows="2" name="mfields['.$this->getTable().'_new]['.$new_invoice_line_count.'][description]" id="mfields['.$this->getTable().'_new]['.$new_invoice_line_count.'][description]" style="width:90%;"></textarea>'; $invoice_form .= '<script type="text/javascript"> $(document).ready(function() { $(document.getElementById("mfields['.$this->getTable().'_new]['.$new_invoice_line_count.'][description]")).expandable(); }); </script></td> '."\n"; */ $invoice_form .= '<td class="center_text"><input type="text" size="5" name="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][qty]" value="" id="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][qty]" onchange=\'computeTotal()\' /></td>'; $invoice_form .= '<td><input type="text" size="10" name="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][price]" id="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][price]" value="" onchange=\'computeTotal()\' /></td>'; $invoice_form .= '<td ><input type="text" size="4" class="center_text" name="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][line_tax]" id="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][line_tax]" value="" onchange=\'computeTotal()\' /></td>'; //$invoice_form .= '<td><input type="hidden" size="10" name="mfields['.$this->getTable().'_new]['.$new_invoice_line_count.'][total]" value="" id="mfields['.$this->getTable().'_new]['.$new_invoice_line_count.'][total]" readonly="readonly" /></td>'; $invoice_form .= '<td><input type="text" size="10" name="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][line_sub_total]" value="" id="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][line_sub_total]" readonly="readonly" /></td>'; $e_delForm = new Event($this->getInvoiceLinePrefix() . "->eventAjaxInvoiceLineDelete"); $e_delForm->addParam("id", $this->getPrimaryKeyValue()); $e_delForm->setSecure(false); $e_delForm->setEventControler("ajax_evctl.php"); $invoice_form .= '<td><a href="#" id="delete' . $this->getInvoiceLinePrefix() . $new_invoice_line_count . '" title="' . _('Delete this item') . '"><img src="/images/delete.gif" alt="" /></a>'; $invoice_form .= ' <script type="text/javascript"> $("#delete' . $this->getInvoiceLinePrefix() . $new_invoice_line_count . '").click( function () { $.get("' . $e_delForm->getUrl() . '"); $("#' . $this->getInvoiceLinePrefix() . $new_invoice_line_count . '").hide(1000).empty(); $("#' . $this->getInvoiceLinePrefix() . $new_invoice_line_count . '_dscr").hide(1000).empty(); return false; }); </script>'; $invoice_form .= '</td></tr>'; // Description on a new row $invoice_form .= '<tr id="' . $this->getInvoiceLinePrefix() . $new_invoice_line_count . '_dscr" class="invoice_edit_list_desc"><td colspan="5"> <span class="gray_text">' . _('Item Description') . '</span><br /><textarea cols="20" rows="2" name="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][description]" id="mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][description]" style="width:90%;"></textarea>'; $invoice_form .= '<script type="text/javascript"> $(document).ready(function() { $(document.getElementById("mfields[' . $this->getTable() . '_new][' . $new_invoice_line_count . '][description]")).expandable(); }); </script></td><td colspan="2"> </td></tr>' . "\n"; return $invoice_form; }
<script> function delete_custom_field(idmodule,idfields) { $("#delete_confirm").modal('show'); $("#delete_confirm .btn-primary").click(function() { $("#delete_confirm").modal('hide'); $.ajax({ type: "POST", <?php $e_del = new Event("CustomFields->eventAjaxDeleteCustomField"); $e_del->setEventControler("/ajax_evctl.php"); $e_del->addParam('idmodule', $cf_module); $e_del->setSecure(false); ?> url: "<?php echo $e_del->getUrl(); ?> &idfields="+idfields, success: function(html) { ret_data = html.trim(); if (ret_data == '0') { var err_element = '<div class="alert alert-error sqcrm-top-message" id="sqcrm_auto_close_messages"><a href="#" class="close" data-dismiss="alert">×</a>' ; var err_msg = err_element+'<strong>'+CUSTOM_FIELD_DELETE_NOT_ALLOWED+'</strong></div>'; $("#message").html(err_msg); $("#message").show(); } else { $.ajax({ type: "GET", url: "customfield", data : "ajaxreq="+true+"&cmid="+idmodule, success: function(result) {
var id = this.id ; $('#delete_queue_entity').modal('show'); $('div#queue_section .delete_queue_entity_submit').attr('id',id) ; }); // delete the queue $("#queue_section").on('click','.delete_queue_entity_submit', function(e) { var id = this.id ; $.ajax({ type: "POST", <?php $e_event = new Event("Queue->eventAjaxDeleteQueue"); $e_event->setEventControler("/ajax_evctl.php"); $e_event->setSecure(false); ?> url: "<?php echo $e_event->getUrl(); ?>", data: "id="+id, success: function(result) { if (result.trim() == '1') { display_js_success(QUEUE_DELETED_SUCCESSFULLY,'js_errors') ; $.ajax({ type: "GET", url: "/modules/Queue/list", data : "ajaxreq="+true+"&module=Queue&rand="+generateRandonString(10)+"&related="+true+"&related_module_id=<?php echo $related_module_id;?>&related_record_id=<?php echo $related_record_id;?>", success: function(result) { $('#queue_section').html(result) ; }, beforeSend: function() { $('#queue_section').html('<img class="ajax_loader" src="/themes/images/ajax-loader1.gif" border="0" />'); } });
textarea.attr("value", textarea.attr("value")+mergefield); merge.selectedIndex = 0; } } function getEmailTemplateText(template){ var select_id = template[template.selectedIndex].value; $.ajax({ type: "GET", <?php $e_email_temp = new Event("do_auto_responder->eventAjaxGetEmailTemplateText"); $e_email_temp->setEventControler("ajax_evctl.php"); $e_email_temp->setSecure(false); ?> url: "<?php echo $e_email_temp->getUrl(); ?> ", data: "temlid="+select_id, success: function(template_text){ var textarea = dijit.byId("editor_bodyhtml"); textarea.attr("value", template_text); } }); } function addAutoResponderEmail(){ $("#ptask_ctlbar_1").slideToggle("slow"); } //]]> </script> <?php
if ($_SESSION["do_crm_action_permission"]->action_permitted('edit', $module_id) === true) { echo '<a href="' . NavigationControl::getNavigationLink($module, "edit", $sqcrm_record_id, "&return_page=detail") . '" class="btn btn-primary"><i class="icon-white icon-edit"></i>' . _('Edit') . '</a>'; } } ?> </div> <div class="right_100"> <?php if ($module_id != 7 && $module_id != 13 && $module_id != 14 && $module_id != 15 && $module_id != 16) { $e_export = new Event("ExportDetailData->eventExportDetailDataPDF"); $e_export->addParam("m", $module); $e_export->addParam("mid", $module_id); $e_export->addParam("record_id", $sqcrm_record_id); ?> <a href="/<?php echo $e_export->getUrl(); ?> "><img src="/themes/images/pdf.png"></a> <?php } ?> </div> <?php } ?> <div class="clear_float"></div> <br /> <?php while ($do_block->next()) { ?> <div class="box_content_header"><?php
<script type="text/javascript"> //<![CDATA[ function showOpt(){ $("#more_options").hide(0); $("#notes_options").show("fast"); } function showFullNote(idnote){ $.ajax({ type: "GET", <?php $e_ContactNote = new Event("ContactNoteExpend->eventAjaxGetContactNote"); $e_ContactNote->setEventControler("ajax_evctl.php"); $e_ContactNote->setSecure(false); ?> url: "<?php echo $e_ContactNote->getUrl(); ?> ", data: "idnote="+idnote, success: function(notetext){ $("#notepreview"+idnote)[0].innerHTML = notetext; } }); } $(document).ready(function() { $("div[id^=notetext]").hover(function(){$("div[id^=trashcan]",this).show("fast");},function(){$("div[id^=trashcan]",this).hide("fast");}); }); //]]> </script> <?php $do_feedback = new Feedback();
<?php /** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/ // Copyright 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com /** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/ ?> // JS functions from includes/ofuz_js.inc.php // close message hide is and record it on the server. <?php $e_closeMessage = new Event("Message->eventAjaxCloseMessage"); $e_closeMessage->setEventControler("ajax_evctl.php"); $e_closeMessage->setSecure(false); ?> function close_message(idmessage) { $.ajax({ type: "GET", url: "<?php echo $e_closeMessage->getUrl(); ?> ", data: "idmessage="+idmessage, success: function(){ $("#message_"+idmessage).fadeOut("slow"); } }); }
<script> function del_report(idreport,report_folder,folder_name) { $("#report_delete_confirm").modal('show'); $("#report_delete_confirm .btn-primary").click(function() { $("#report_delete_confirm").modal('hide'); $.ajax({ type: "POST", <?php $e_del_single = new Event("CRMDeleteEntity->eventAjaxDeleteSingleEntity"); $e_del_single->setEventControler("/ajax_evctl.php"); $e_del_single->addParam('module', $module); $e_del_single->addParam('referrer', 'list'); $e_del_single->setSecure(false); ?> url: "<?php echo $e_del_single->getUrl(); ?> &sqrecord="+idreport, success: function(html) { ret_data = html.trim(); if (ret_data == '0') { var err_element = '<div class="alert alert-error sqcrm-top-message" id="sqcrm_auto_close_messages"><a href="#" class="close" data-dismiss="alert">×</a>' ; var err_msg = err_element+'<strong>'+UNAUTHORIZED_DELETE+'</strong></div>'; $("#message").html(err_msg); $("#message").show(); } else { $.ajax({ type: "GET", url: "list", data : "ajaxreq="+true+"&folderid="+report_folder+"&foldername="+folder_name, success: function(result) {
<a href="#" onclick="send_invoice_with_email('<?php echo $sqcrm_record_id;?>','<?php echo $module_obj->idorganization;?>');return false;"> <img src="/themes/images/email.png" style="vertical-align:center;"> <?php echo _('send invoice with email'); ?> </a> </li> </ul> <?php } elseif ($module_id == 16) { ?> <ul class="list-group"> <li class="list-group-item"> <?php $e_po_pdf = new Event("ExportInventoryData->eventPurchaseOrderPDF"); $e_po_pdf->addParam("m", $module); $e_po_pdf->addParam("mid", $module_id); $e_po_pdf->addParam("record_id", $sqcrm_record_id); ?> <a href="/<?php echo $e_po_pdf->getUrl() ; ?>"> <img src="/themes/images/pdf.png" style="vertical-align:center;"> <?php echo _('generate pdf'); ?> </a> </li> <li class="list-group-item"> <a href="#" onclick="send_po_with_email('<?php echo $sqcrm_record_id;?>','<?php echo $module_obj->idcontacts;?>');return false;"> <img src="/themes/images/email.png" style="vertical-align:center;"> <?php echo _('send purchase order with email'); ?> </a> </li> </ul> <?php } elseif ($module_id == 11) { ?> <ul class="list-group"> <li class="list-group-item"> <a href="<?php echo NavigationControl::getNavigationLink("Vendor","create_purchase_order",$sqcrm_record_id,'&return_page=detail'); ?>" onclick = "">
</a> </li> </ul> <?php } elseif ($module_id == 16) { ?> <ul class="nav nav-list"> <li> <?php $e_po_pdf = new Event("ExportInventoryData->eventPurchaseOrderPDF"); $e_po_pdf->addParam("m", $module); $e_po_pdf->addParam("mid", $module_id); $e_po_pdf->addParam("record_id", $sqcrm_record_id); ?> <a href="/<?php echo $e_po_pdf->getUrl(); ?> "> <img src="/themes/images/pdf.png" style="vertical-align:center;"> <?php echo _('generate pdf'); ?> </a> </li> <li> <a href="#" onclick="send_po_with_email('<?php echo $sqcrm_record_id; ?> ','<?php echo $module_obj->idcontacts; ?>
<?php } ?> <?php if ($module_id == 15) { ?> <ul class="nav nav-list"> <li> <?php $e_inv_pdf = new Event("\\cpanel_export\\ExportInventoryData->eventInvoicePDF"); $e_inv_pdf->setEventControler(CPANEL_EVENTCONTROLER_PATH . 'cpanel/' . "eventcontroler.php"); $e_inv_pdf->addParam("m", $module); $e_inv_pdf->addParam("mid", $module_id); $e_inv_pdf->addParam("record_id", $sqcrm_record_id); ?> <a href="/<?php echo $e_inv_pdf->getUrl(); ?> "> <img src="/themes/images/pdf.png" style="vertical-align:center;"> <?php echo _('generate pdf'); ?> </a> </li> </ul> <?php } ?> </div>
} ?> <div class="mainheader"> <?php $e_remove_tag_search = new Event("do_Contacts->eventSearchByTag"); if (count($_SESSION['do_Contacts']->getSearchTags()) > 0 && is_resource($_SESSION['do_Contacts']->getResultSet())) { ?> <div class="pad20"> <h3><?php echo _('Showing contacts with tags:'); ?> </h3> <h2><?php foreach ($_SESSION['do_Contacts']->getSearchTags() as $search_tag) { $e_remove_tag_search->addParam("search_remove_tag_name", $search_tag); echo " " . $search_tag . " <a href=\"" . $e_remove_tag_search->getUrl() . "\"><img src=\"/images/delete.gif\" width=\"14\" height=\"14\" border=\"0\" alt=\"Remove this tag\" /></a>, "; } ?> </h2> </div> <?php } else { ?> <div class="tundra"> <div class="pad20"> <h3><?php echo _('Find someone by typing their name or company'); ?> </h3> <?php $e_search = new Event("do_Contacts->eventSetSearch");
} else { $user_profile .= '<div id="user-profile"><div style="margin-top:7px;">' . _('Welcome,') . ' ' . $_SESSION["do_user"]->firstname . '</div></div>'; } echo '<li class="dropdown">'; echo $user_profile; echo '<ul class="dropdown-menu">'; if ($_SESSION["do_user"]->is_admin == 1) { $setting_li = ''; if ($admin_modules === true) { $setting_li = 'active'; } echo '<li class="' . $setting_li . '"><a href="/modules/Settings/profile_list">' . _('Settings') . '</a></li>'; } echo '<li class=""><a href="#" onclick="changeUserAvatar();return false ;">' . _('change avatar') . '</a></li>'; $e_logout = new Event("do_user->eventLogout"); echo '<li><a href="/' . $e_logout->getUrl() . '">logout</a></li>'; echo '</ul>'; echo '</li>'; } ?> </ul> </div> </div> </div> <br /> <div id="server_side_message" style="height:40px;margin-top:2px;position:relative;"></div> <?php $_SESSION["do_crm_messages"]->get_messages(true); // the session values are cleaned via ajax body onload , check /js/common.js ?> <!-- Javascript error message block -->
$("#invoice_address").val(address); } }); } function getItemSuggestion(text_id,select_id){ var text_val = document.getElementById(text_id).value; $.ajax({ type: "GET", <?php $e_suggestion_item = new Event("InvoiceEditSave->eventAjaxItemSuggestion"); $e_suggestion_item->setEventControler("ajax_evctl.php"); $e_suggestion_item->setSecure(false); ?> url: "<?php echo $e_suggestion_item->getUrl(); ?> ", data: "text="+text_val, success: function(item_suggestion){ if(item_suggestion == 'No'){ $("#"+select_id).slideUp(100); }else{ $("#"+select_id).html(item_suggestion); if ($("#"+select_id).is(":hidden")) { $("#"+select_id).slideDown(200); } } } }); }
$(document).ready(function() { $('#btnSubmit').click(function() { var username = $.trim($('#username').val()); var pwd = $.trim($('#password').val()); //Blank validation if(username != '' && pwd != '') { //An ajax call to add user's LeanKit Kanban login credentials. $.ajax({ type: "GET", <?php $e = new Event("OfuzLeanKitKanban->eventAjaxAddLoginCredentials"); $e->setEventControler("ajax_evctl.php"); $e->setSecure(false); ?> url: "<?php echo $e->getUrl(); ?> ", data: "un="+username+"&pwd="+pwd, success: function(response){ $('#msg').html(response); $('#msg').slideDown('slow'); } }); } else { $('#msg').html('Your Email Address and Password are required.'); $('#msg').slideDown('slow'); } }); }); </script>
}; function fnCancelEdit(task) { $("#e"+task).hide(0); $("#e"+task)[0].innerHTML = ""; $("#t"+task).show(0); }; function fnTaskComplete(task) { $.ajax({ type: "GET", <?php $e_editForm = new Event("Task->eventAjaxTaskComplete"); $e_editForm->setEventControler("ajax_evctl.php"); $e_editForm->setSecure(false); ?> url: "<?php echo $e_editForm->getUrl(); ?> ", data: "id="+task, success: function(){ $("#t"+task).css("text-decoration", "line-through"); $("#t"+task).fadeOut("slow", function() { $("#e"+task).remove(); $("#b"+task).remove(); }); } }); }; </script> <div class="content"> <table class="main">
<script> function delete_custom_field(idmodule,idfields) { $("#delete_confirm").modal('show'); $("#delete_confirm .btn-primary").off('click'); $("#delete_confirm .btn-primary").click(function() { $("#delete_confirm").modal('hide'); $.ajax({ type: "POST", <?php $e_del = new Event("CustomFields->eventAjaxDeleteCustomField"); $e_del->setEventControler("/ajax_evctl.php"); $e_del->addParam('idmodule',$cf_module); $e_del->setSecure(false); ?> url: "<?php echo $e_del->getUrl(); ?>&idfields="+idfields, success: function(html) { ret_data = html.trim(); if (ret_data == '0') { var err_element = '<div class="alert alert-error sqcrm-top-message" id="sqcrm_auto_close_messages"><a href="#" class="close" data-dismiss="alert">×</a>' ; var err_msg = err_element+'<strong>'+CUSTOM_FIELD_DELETE_NOT_ALLOWED+'</strong></div>'; $("#message").html(err_msg); $("#message").show(); } else { $.ajax({ type: "GET", url: "customfield", data : "ajaxreq="+true+"&cmid="+idmodule, success: function(result) { $('#cf_entry').html(result); var succ_element = '<div class="alert alert-success sqcrm-top-message" id="sqcrm_auto_close_messages"><a href="#" class="close" data-dismiss="alert">×</a>' ;