当前位置: 首页>>代码示例>>PHP>>正文


PHP QuickSearchDefaults::getQSScriptsJSONAlreadyDefined方法代码示例

本文整理汇总了PHP中QuickSearchDefaults::getQSScriptsJSONAlreadyDefined方法的典型用法代码示例。如果您正苦于以下问题:PHP QuickSearchDefaults::getQSScriptsJSONAlreadyDefined方法的具体用法?PHP QuickSearchDefaults::getQSScriptsJSONAlreadyDefined怎么用?PHP QuickSearchDefaults::getQSScriptsJSONAlreadyDefined使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QuickSearchDefaults的用法示例。


在下文中一共展示了QuickSearchDefaults::getQSScriptsJSONAlreadyDefined方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: QuickSearchDefaults

    $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
}
if (isset($_REQUEST['return_id'])) {
    $xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
} else {
    // if no $_REQUEST['return_id'] is set, and we press "Cancel" we get an error.
    // if RETURN_ACTION is "index", we just go back to module's default page.
    $xtpl->assign("RETURN_ACTION", "index");
}
$xtpl->assign("THEME", $theme);
$xtpl->assign("IMAGE_PATH", $image_path);
$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
require_once 'include/QuickSearchDefaults.php';
$qsd = new QuickSearchDefaults();
$sqs_objects = array('parent_name' => $qsd->getQSParent(), 'assigned_user_name' => $qsd->getQSUser());
$quicksearch_js = $qsd->getQSScriptsJSONAlreadyDefined();
$quicksearch_js .= '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . ';changeQS();</script>';
// change the parent type of the quicksearch
$xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_js() . $quicksearch_js);
$xtpl->assign("ID", $focus->id);
if (isset($json_id) && !empty($json_id)) {
    $xtpl->assign("JSON_ID", $json_id);
    $xtpl->assign('JSON_CONFIG_JAVASCRIPT', $json_config->get_static_json_server(false, true, 'Calls', $json_id));
} else {
    $xtpl->assign("JSON_ID", $focus->id);
    $xtpl->assign('JSON_CONFIG_JAVASCRIPT', $json_config->get_static_json_server(false, true, 'Calls', $focus->id));
}
$xtpl->assign("MODULE_NAME", "Calls");
$xtpl->assign("PARENT_NAME", $focus->parent_name);
$xtpl->assign("PARENT_RECORD_TYPE", $focus->parent_type);
$xtpl->assign("PARENT_ID", $focus->parent_id);
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:EditView.php

示例2: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     if (!empty($_REQUEST['handle']) && $_REQUEST['handle'] == 'save') {
         return $this->handleSave();
     }
     global $beanList;
     // get the EditView defs to check if opportunity_name exists, for a check below for populating data
     $opportunityNameInLayout = false;
     $editviewFile = 'modules/Leads/metadata/editviewdefs.php';
     $this->medataDataFile = $editviewFile;
     if (file_exists("custom/{$editviewFile}")) {
         $this->medataDataFile = "custom/{$editviewFile}";
     }
     include $this->medataDataFile;
     foreach ($viewdefs['Leads']['EditView']['panels'] as $panel_index => $section) {
         foreach ($section as $row_array) {
             foreach ($row_array as $cell) {
                 if (isset($cell['name']) && $cell['name'] == 'opportunity_name') {
                     $opportunityNameInLayout = true;
                 }
             }
         }
     }
     $this->medataDataFile = $this->fileName;
     if (file_exists("custom/{$this->fileName}")) {
         $this->medataDataFile = "custom/{$this->fileName}";
     }
     $this->loadDefs();
     $this->getRecord();
     $this->checkForDuplicates($this->focus);
     $smarty = new Sugar_Smarty();
     $ev = new EditView();
     $ev->ss = $smarty;
     $ev->view = "ConvertLead";
     echo $this->getModuleTitle();
     require_once "include/QuickSearchDefaults.php";
     $qsd = new QuickSearchDefaults();
     $qsd->setFormName("ConvertLead");
     $this->contact = new Contact();
     $smarty->assign("contact_def", $this->contact->field_defs);
     $smarty->assign("form_name", "ConvertLead");
     $smarty->assign("form_id", "ConvertLead");
     $smarty->assign("module", "Leads");
     $smarty->assign("view", "convertlead");
     $smarty->assign("bean", $this->focus);
     $smarty->assign("record_id", $this->focus->id);
     $smarty->display("modules/Leads/tpls/ConvertLeadHeader.tpl");
     echo "<div class='edit view' style='width:auto;'>";
     foreach ($this->defs as $module => $vdef) {
         if (!isset($beanList[$module])) {
             continue;
         }
         $bean = $beanList[$module];
         $focus = new $bean();
         $focus->fill_in_additional_detail_fields();
         foreach ($focus->field_defs as $field => $def) {
             if (isset($vdef[$ev->view]['copyData']) && $vdef[$ev->view]['copyData']) {
                 if ($module == "Accounts" && $field == 'name') {
                     $focus->name = $this->focus->account_name;
                 } else {
                     if ($module == "Opportunities" && $field == 'amount') {
                         $focus->amount = unformat_number($this->focus->opportunity_amount);
                     } else {
                         if ($module == "Opportunities" && $field == 'name') {
                             if ($opportunityNameInLayout && !empty($this->focus->opportunity_name)) {
                                 $focus->name = $this->focus->opportunity_name;
                             }
                         } else {
                             if ($field == "id") {
                                 //If it is not a contact, don't copy the ID from the lead
                                 if ($module == "Contacts") {
                                     $focus->{$field} = $this->focus->{$field};
                                 }
                             } else {
                                 if (is_a($focus, "Company") && $field == 'phone_office') {
                                     //Special case where company and person have the same field with a different name
                                     $focus->phone_office = $this->focus->phone_work;
                                 } else {
                                     if (isset($this->focus->{$field})) {
                                         $focus->{$field} = $this->focus->{$field};
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
         //Copy over email data
         $ev->setup($module, $focus, $this->medataDataFile, "modules/Leads/tpls/ConvertLead.tpl", false);
         $ev->process();
         echo $ev->display(false);
         echo $this->getValidationJS($module, $focus, $vdef[$ev->view]);
     }
     echo "</div>";
     echo $qsd->getQSScriptsJSONAlreadyDefined();
     $smarty->display("modules/Leads/tpls/ConvertLeadFooter.tpl");
//.........这里部分代码省略.........
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:101,代码来源:view.convertlead.php


注:本文中的QuickSearchDefaults::getQSScriptsJSONAlreadyDefined方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。