本文整理汇总了PHP中javascript::stripEndColon方法的典型用法代码示例。如果您正苦于以下问题:PHP javascript::stripEndColon方法的具体用法?PHP javascript::stripEndColon怎么用?PHP javascript::stripEndColon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javascript
的用法示例。
在下文中一共展示了javascript::stripEndColon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processJsForSelectorField
function processJsForSelectorField(&$javascript, $field, $type, $tempModule, $fieldNumber, $ifAdvanced = 'field')
{
$jsString = '';
$javascript = new javascript();
// Validate everything.
$workFlowActionsExceptionFields = array();
if (in_array($type, $workFlowActionsExceptionFields) != 1) {
$jsString .= "removeFromValidate('EditView', 'field_{$fieldNumber}__{$ifAdvanced}_value');";
}
if (in_array($type, array('date', 'time', 'datetimecombo'))) {
$jsString .= "addToValidate('EditView', 'field_{$fieldNumber}__{$ifAdvanced}_value', 'assigned_user_name', 1,'{$javascript->stripEndColon(translate($tempModule->field_name_map[$field]['vname']))}' )";
} else {
if (!(in_array($type, $workFlowActionsExceptionFields) == 1)) {
$javascript->setFormName('EditView');
$javascript->setSugarBean($tempModule);
$javascript->addField($field, '', '', "field_{$_REQUEST['field_num']}__{$ifAdvanced}_value");
$jsString .= $javascript->getScript(false);
}
}
return $jsString;
}
示例2: javascript
$xtpl->assign('FORM_NAME', $form_name);
$xtpl->parse("main");
$xtpl->out("main");
//rsmith
$temp_module = BeanFactory::getBean($exp_object->lhs_module);
$field = $exp_object->lhs_field;
//now build toggle js
global $mod_strings, $current_language;
$mod_strings = return_module_language($current_language, $temp_module->module_dir);
$javascript = new javascript();
$javascript->setFormName('FieldViewNonSelector');
$javascript->setSugarBean($temp_module);
$type = $temp_module->field_name_map[$field]['type'];
$js = "";
if (isset($temp_module->field_name_map[$field]['required'])) {
if ($type == 'date' || $type == 'time') {
$js = "<script type=\"text/javascript\">";
$js .= "addToValidate('EditView', '" . $exp_object->parent_type . "__field_value', 'assigned_user_name', 1,'" . $javascript->stripEndColon(translate($temp_module->field_name_map[$field]['vname'])) . "' )";
$js .= "</script>";
} else {
if (in_array($type, ProcessView::get_js_exception_fields()) == 1) {
$js = '';
} else {
$javascript->addField($field, true, '', $exp_object->parent_type . "__field_value");
$js = $javascript->getScript();
}
}
}
echo $js;
//rsmith
}