本文整理汇总了PHP中QuickSearchDefaults::getQSScripts方法的典型用法代码示例。如果您正苦于以下问题:PHP QuickSearchDefaults::getQSScripts方法的具体用法?PHP QuickSearchDefaults::getQSScripts怎么用?PHP QuickSearchDefaults::getQSScripts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QuickSearchDefaults
的用法示例。
在下文中一共展示了QuickSearchDefaults::getQSScripts方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listViewProcess
function listViewProcess()
{
$this->processSearchForm();
$this->lv->searchColumns = $this->searchForm->searchColumns;
if ($this->where != "") {
$this->where .= ' and oqc_product.is_latest !=0';
// $this->where .= ' and oqc_product.is_option !=1';
} else {
$this->where .= 'oqc_product.is_latest !=0';
// $this->where .= ' and oqc_product.is_option !=1';
}
if (!$this->headers) {
return;
}
global $sugar_version;
if (empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false) {
if (floatval(substr($sugar_version, 0, 3)) > 6.4) {
$this->lv->setup($this->seed, 'modules/oqc_Product/views/ListView65.tpl', $this->where, $this->params);
} elseif (floatval(substr($sugar_version, 0, 3)) > 6.3) {
$this->lv->setup($this->seed, 'modules/oqc_Product/views/ListView64.tpl', $this->where, $this->params);
} elseif (floatval(substr($sugar_version, 0, 3)) >= 6.0 && floatval(substr($sugar_version, 0, 3)) <= 6.3) {
$this->lv->setup($this->seed, 'modules/oqc_Product/views/ListView62.tpl', $this->where, $this->params);
} else {
$this->lv->setup($this->seed, 'modules/oqc_Product/views/ListView52.tpl', $this->where, $this->params);
}
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : ' - ' . $_REQUEST['saved_search_select_name'];
// echo get_form_header($GLOBALS['mod_strings']['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
//Quick Search support
$qsd = new QuickSearchDefaults();
$sqsJavascript = $qsd->getQSScripts();
$sqsJavascript .= '<script type="text/javascript" src="include/oqc/QuickSearch/oqcQS.js"></script>';
echo $sqsJavascript;
echo $this->lv->display();
}
}
示例2: getSVNumberQuicksearch
function getSVNumberQuicksearch($name, $idName)
{
global $app_strings;
$sqsObjects = array('svnumber' => array('method' => 'query', 'modules' => array('oqc_Contract'), 'field_list' => array('svnumber', 'id'), 'populate_list' => array($name, $idName), 'group' => 'or', 'conditions' => array(array('name' => 'svnumber', 'op' => 'like_custom', 'end' => '%', 'value' => '')), 'limit' => '30', 'order' => 'svnumber', 'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']));
$json = getJSONobj();
$qsd = new QuickSearchDefaults();
$sqsJavascript = $qsd->getQSScripts();
//$sqsJavascript .= '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqsObjects) . ';';
$sqsJavascript .= '<script type="text/javascript" language="javascript">sqs_objects = {};';
$sqsJavascript .= '</script>';
return $sqsJavascript;
}
示例3: get_new_record_form
function get_new_record_form()
{
if (!ACLController::checkAccess('Press', 'edit', true)) {
return '';
}
global $app_strings;
global $mod_strings;
global $currentModule;
global $current_user;
$the_form = get_left_form_header($mod_strings['LBL_QUICK_NEW_PRESS']);
$form = new XTemplate('modules/Press/Forms.html');
$module_select = empty($_REQUEST['module_select']) ? '' : $_REQUEST['module_select'];
$form->assign('mod', $mod_strings);
$form->assign('app', $app_strings);
$form->assign('module', $currentModule);
$json = getJSONobj();
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'quick_save', 'field_to_name_array' => array('id' => 'assigned_user_id', 'user_name' => 'assigned_user_name'));
$form->assign('encoded_users_popup_request_data', $json->encode($popup_request_data));
$form->parse('main');
$the_form .= $form->text('main');
require_once 'modules/Press/Press.php';
$focus = new Press();
require_once 'include/QuickSearchDefaults.php';
$qsd = new QuickSearchDefaults();
$sqs_objects = array('assigned_user_name' => $qsd->getQSUser());
$quicksearch_js = $qsd->getQSScripts();
$quicksearch_js .= '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
echo $quicksearch_js;
require_once 'include/javascript/javascript.php';
$javascript = new javascript();
$javascript->setFormName('quick_save');
$javascript->setSugarBean($focus);
$javascript->addRequiredFields('');
$javascript->addToValidateBinaryDependency('assigned_user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'], 'false', '', 'assigned_user_id');
$jscript = $javascript->getScript();
$the_form .= $jscript . get_left_form_footer();
return $the_form;
}
示例4: QuickSearchDefaults
$xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
}
// handle Create $module then Cancel
if (empty($_REQUEST['return_id'])) {
$xtpl->assign("RETURN_ACTION", 'index');
}
if (isset($_REQUEST['campaign_id'])) {
$xtpl->assign("CAMPAIGN_ID", $_REQUEST['campaign_id']);
}
$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('assigned_user_name' => $qsd->getQSUser());
$quicksearch_js = $qsd->getQSScripts();
$quicksearch_js .= '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
$xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_js() . $quicksearch_js);
if (empty($focus->assigned_user_id) && empty($focus->id)) {
$focus->assigned_user_id = $current_user->id;
}
if (empty($focus->assigned_name) && empty($focus->id)) {
$focus->assigned_user_name = $current_user->user_name;
}
$xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id));
$xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name);
$xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id);
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
$xtpl->assign("CREATED_BY", $focus->created_by_name);
$xtpl->assign("MODIFIED_BY", $focus->modified_by_name);
示例5: QuickSearchDefaults
require_once 'include/ListView/ListView.php';
require_once 'include/database/PearDatabase.php';
global $app_strings;
global $app_list_strings;
global $current_language;
$current_module_strings = return_module_language($current_language, 'Paper');
global $urlPrefix;
//$log = LoggerManager::getLogger('Product_list');
global $currentModule;
global $theme;
// focus_list is the means of passing data to a ListView.
global $focus_list;
//Goodwill
require_once 'include/QuickSearchDefaults.php';
$qsd = new QuickSearchDefaults();
echo $qsd->getQSScripts();
//End Goodwill
if (!isset($where)) {
$where = "";
}
$seedPaper = new Paper();
require_once 'modules/MySettings/StoreQuery.php';
$storeQuery = new StoreQuery();
/*
if(isset($_REQUEST['query_id']) && !isset($_REQUEST['saveQuery']) && !isset($_REQUEST['deleteQuery']))
{
$storeQuery->loadFromSavedQuery($currentModule, $_REQUEST['query_id']);
}
*/
if (!isset($_REQUEST['query'])) {
$storeQuery->loadQuery($currentModule);
示例6: getFormBody
function getFormBody($prefix, $mod = 'Opportunities', $formname = '')
{
if (!ACLController::checkAccess('Opportunities', 'edit', true)) {
return '';
}
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
} else {
global $mod_strings;
}
global $app_strings;
global $app_list_strings;
global $theme;
global $current_user;
global $sugar_config;
global $timedate;
// Unimplemented until jscalendar language files are fixed
// global $current_language;
// global $default_language;
// global $cal_codes;
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
$lbl_opportunity_name = $mod_strings['LBL_OPPORTUNITY_NAME'];
$lbl_sales_stage = $mod_strings['LBL_SALES_STAGE'];
$lbl_date_closed = $mod_strings['LBL_DATE_CLOSED'];
$lbl_amount = $mod_strings['LBL_AMOUNT'];
$ntc_date_format = $timedate->get_user_date_format();
$cal_dateformat = $timedate->get_cal_date_format();
$user_id = $current_user->id;
// Unimplemented until jscalendar language files are fixed
// $cal_lang = (empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language];
$cal_lang = "en";
$the_form = <<<EOQ
<p>
\t\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t\t<input type="hidden" name="{$prefix}assigned_user_id" value='{$user_id}'>
\t\t{$lbl_opportunity_name} <span class="required">{$lbl_required_symbol}</span><br>
\t\t<input name='{$prefix}name' type="text" value="">
EOQ;
if ($sugar_config['require_accounts']) {
///////////////////////////////////////
///
/// SETUP ACCOUNT POPUP
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => "{$prefix}OppSave", 'field_to_name_array' => array('id' => 'account_id', 'name' => 'account_name'));
$json = getJSONobj();
$encoded_popup_request_data = $json->encode($popup_request_data);
//
///////////////////////////////////////
$the_form .= <<<EOQ
\t\t{$mod_strings['LBL_ACCOUNT_NAME']} <span class="required">{$lbl_required_symbol}</span><br>
\t\t<input class='sqsEnabled' autocomplete='off' id='qc_account_name' name='account_name' type='text' value="" size="16"><input id='qc_account_id' name='account_id' type="hidden" value=''> <input title="{$app_strings['LBL_SELECT_BUTTON_TITLE']}" accessKey="{$app_strings['LBL_SELECT_BUTTON_KEY']}" type="button" class="button" value='{$app_strings['LBL_SELECT_BUTTON_LABEL']}' name=btn1
\t\t\tonclick='open_popup("Accounts", 600, 400, "", true, false, {$encoded_popup_request_data});' /><br>
EOQ;
}
$the_form .= <<<EOQ
\t\t{$lbl_date_closed} <span class="required">{$lbl_required_symbol}</span> <br><span class="dateFormat">{$ntc_date_format}</span><br>
\t\t<input name='{$prefix}date_closed' size='12' maxlength='10' id='{$prefix}jscal_field' type="text" value=""> <img src="themes/{$theme}/images/jscalendar.gif" alt="{$app_strings['LBL_ENTER_DATE']}" id="jscal_trigger" align="absmiddle"><br>
\t\t{$lbl_sales_stage} <span class="required">{$lbl_required_symbol}</span><br>
\t\t<select name='{$prefix}sales_stage'>
EOQ;
$the_form .= get_select_options_with_id($app_list_strings['sales_stage_dom'], "");
$the_form .= <<<EOQ
\t\t</select><br>
\t\t{$lbl_amount} <span class="required">{$lbl_required_symbol}</span><br>
\t\t<input name='{$prefix}amount' type="text"></p>
\t\t<input type='hidden' name='lead_source' value=''>
\t\t<script type="text/javascript">
\t\tCalendar.setup ({
\t\t\tinputField : "{$prefix}jscal_field", ifFormat : "{$cal_dateformat}", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1
\t\t});
\t\t</script>
EOQ;
require_once 'include/QuickSearchDefaults.php';
$qsd = new QuickSearchDefaults();
$sqs_objects = array('qc_account_name' => $qsd->getQSParent());
$sqs_objects['qc_account_name']['populate_list'] = array('qc_account_name', 'qc_account_id');
$quicksearch_js = $qsd->getQSScripts();
$quicksearch_js .= '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
$the_form .= $quicksearch_js;
require_once 'include/javascript/javascript.php';
require_once 'modules/Opportunities/Opportunity.php';
$javascript = new javascript();
$javascript->setFormName($formname);
$javascript->setSugarBean(new Opportunity());
$javascript->addRequiredFields($prefix);
$the_form .= $javascript->getScript();
return $the_form;
}