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


PHP getVersionedScript函数代码示例

本文整理汇总了PHP中getVersionedScript函数的典型用法代码示例。如果您正苦于以下问题:PHP getVersionedScript函数的具体用法?PHP getVersionedScript怎么用?PHP getVersionedScript使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: smarty_function_sugar_getscript

/**
 * Smarty {sugar_getscript} function plugin
 *
 * Type:     function<br>
 * Name:     sugar_getscript<br>
 * Purpose:  Creates script tag for filename with caching string
 *
 * @param array
 * @param Smarty
 */
function smarty_function_sugar_getscript($params, &$smarty)
{
    if (!isset($params['file'])) {
        $smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'file');
    }
    return getVersionedScript($params['file']);
}
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:17,代码来源:function.sugar_getscript.php

示例2: display

 /**
  * @see SugarView::display()
  *
  * We are overridding the display method to manipulate the sectionPanels.
  * If portal is not enabled then don't show the Portal Information panel.
  */
 public function display()
 {
     $this->ev->process();
     if (!empty($_REQUEST['contact_name']) && !empty($_REQUEST['contact_id']) && $this->ev->fieldDefs['report_to_name']['value'] == '' && $this->ev->fieldDefs['reports_to_id']['value'] == '') {
         $this->ev->fieldDefs['report_to_name']['value'] = $_REQUEST['contact_name'];
         $this->ev->fieldDefs['reports_to_id']['value'] = $_REQUEST['contact_id'];
     }
     $admin = new Administration();
     $admin->retrieveSettings();
     if (empty($admin->settings['portal_on']) || !$admin->settings['portal_on']) {
         unset($this->ev->sectionPanels[strtoupper('lbl_portal_information')]);
     } else {
         if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
             $this->ev->fieldDefs['portal_name']['value'] = '';
             $this->ev->fieldDefs['portal_active']['value'] = '0';
             $this->ev->fieldDefs['portal_password']['value'] = '';
             $this->ev->fieldDefs['portal_password1']['value'] = '';
             $this->ev->fieldDefs['portal_name_verified'] = '0';
             $this->ev->focus->portal_name = '';
             $this->ev->focus->portal_password = '';
             $this->ev->focus->portal_acitve = 0;
         } else {
             $this->ev->fieldDefs['portal_password']['value'] = '';
             $this->ev->fieldDefs['portal_password1']['value'] = '';
         }
         echo getVersionedScript('modules/Contacts/Contact.js');
         echo '<script language="javascript">';
         echo 'addToValidateComparison(\'EditView\', \'portal_password\', \'varchar\', false, SUGAR.language.get(\'app_strings\', \'ERR_SQS_NO_MATCH_FIELD\') + SUGAR.language.get(\'Contacts\', \'LBL_PORTAL_PASSWORD\'), \'portal_password1\');';
         echo 'addToValidateVerified(\'EditView\', \'portal_name_verified\', \'bool\', false, SUGAR.language.get(\'app_strings\', \'ERR_EXISTING_PORTAL_USERNAME\'));';
         echo 'YAHOO.util.Event.onDOMReady(function() {YAHOO.util.Event.on(\'portal_name\', \'blur\', validatePortalName);YAHOO.util.Event.on(\'portal_name\', \'keydown\', handleKeyDown);});';
         echo '</script>';
     }
     echo $this->ev->display($this->showTitle);
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:40,代码来源:view.edit.php

示例3: display

 /**
  * @see SugarView::display()
  *
  * We are overridding the display method to manipulate the sectionPanels.
  * If portal is not enabled then don't show the Portal Information panel.
  */
 public function display()
 {
     $this->ev->process();
     if (!empty($_REQUEST['contact_name']) && !empty($_REQUEST['contact_id']) && $this->ev->fieldDefs['report_to_name']['value'] == '' && $this->ev->fieldDefs['reports_to_id']['value'] == '') {
         $this->ev->fieldDefs['report_to_name']['value'] = $_REQUEST['contact_name'];
         $this->ev->fieldDefs['reports_to_id']['value'] = $_REQUEST['contact_id'];
     }
     $admin = new Administration();
     $admin->retrieveSettings();
     if (empty($admin->settings['portal_on']) || !$admin->settings['portal_on']) {
         unset($this->ev->sectionPanels[strtoupper('lbl_portal_information')]);
     } else {
         if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
             $this->ev->fieldDefs['portal_name']['value'] = '';
             $this->ev->fieldDefs['portal_active']['value'] = '0';
             $this->ev->fieldDefs['portal_password']['value'] = '';
             $this->ev->fieldDefs['portal_password1']['value'] = '';
             $this->ev->fieldDefs['portal_name_verified'] = '0';
             $this->ev->focus->portal_name = '';
             $this->ev->focus->portal_password = '';
             $this->ev->focus->portal_acitve = 0;
         } else {
             $this->ev->fieldDefs['portal_password']['value'] = '';
             $this->ev->fieldDefs['portal_password1']['value'] = '';
         }
         echo getVersionedScript('modules/Contacts/Contact.js');
         echo '<script language="javascript">';
         echo 'addToValidateComparison(\'EditView\', \'portal_password\', \'varchar\', false, SUGAR.language.get(\'app_strings\', \'ERR_SQS_NO_MATCH_FIELD\') + SUGAR.language.get(\'Contacts\', \'LBL_PORTAL_PASSWORD\'), \'portal_password1\');';
         echo 'addToValidateVerified(\'EditView\', \'portal_name_verified\', \'bool\', false, SUGAR.language.get(\'app_strings\', \'ERR_EXISTING_PORTAL_USERNAME\'));';
         echo 'YAHOO.util.Event.onDOMReady(function() {YAHOO.util.Event.on(\'portal_name\', \'blur\', validatePortalName);YAHOO.util.Event.on(\'portal_name\', \'keydown\', handleKeyDown);});';
         echo '</script>';
     }
     // Return contacts email and birthdate in current user date format. {Iluxovi4}
     if ($_REQUEST['em_dup'] == 1) {
         global $timedate, $current_user;
         $format = $timedate->get_date_format($current_user);
         $birthday = date($format, strtotime($_REQUEST['birthdate']));
         echo "<script type='text/javascript'>\n                function em_dup()\n                {\n                    \$('#Contacts0emailAddress0').val('{$_REQUEST['Contacts0emailAddress0']}')\n                    \$('#birthdate').val('{$birthday}')\n                }\n\n                setTimeout(em_dup,10)\n            </script>";
     }
     echo $this->ev->display($this->showTitle);
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:47,代码来源:view.edit.php

示例4: process_page

 function process_page()
 {
     global $theme;
     global $mod_strings;
     global $app_strings;
     global $currentModule;
     global $current_language;
     global $current_module_strings;
     if (!is_file(sugar_cached('jsLanguage/WorkFlow/') . $GLOBALS['current_language'] . '.js')) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createModuleStringsCache('WorkFlow', $GLOBALS['current_language']);
     }
     $javascript_language_files = getVersionedScript("cache/jsLanguage/WorkFlow/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']);
     $current_module_strings = return_module_language($current_language, 'WorkFlowAlertShells');
     $ListView = new ListView();
     $header_text = '';
     if (isset($_REQUEST['workflow_id'])) {
         $workflow = BeanFactory::getBean('WorkFlow', $_REQUEST['workflow_id']);
         //TODO GET ALL ALERTS HERE
         //$focus_alerts_list = $workflow->get_linked_beans('wf_alerts','WorkFlowAlertShell');
         $alerts = BeanFactory::getBean('WorkFlowAlertShells');
         $current_module_strings = return_module_language($current_language, $alerts->module_dir);
         insert_popup_header($theme);
         $ListView->initNewXTemplate('modules/WorkFlowAlertShells/Popup_picker.html', $current_module_strings);
         $ListView->xTemplateAssign("WORKFLOW_ID", $workflow->id);
         $ListView->xTemplateAssign("JAVASCRIPT_LANGUAGE_FILES", $javascript_language_files);
         $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$workflow->id}");
         $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
         $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE']));
         $ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME_COMBO'] . $header_text);
         //$ListView->setHeaderText($button);
         //$ListView->setQuery("workflow_alertshells.alert_type = 'Email'","","", "ALERT");
         $list = $alerts->get_list("", "workflow_alertshells.alert_type = 'Email'");
         $display_list = $this->cullFromList($list['list'], $workflow->base_module, $workflow->type);
         $ListView->processListViewTwo($display_list, "main", "ALERT");
         insert_popup_footer();
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:38,代码来源:Popup_picker.php

示例5: require_once

//Assign qsd script
require_once('include/QuickSearchDefaults.php');
$qsd = QuickSearchDefaults::getQuickSearchDefaults();
$sqs_objects = array( 'EditView_assigned_user_name' => $qsd->getQSUser());
$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '; enableQS();</script>';

$xtpl->assign("CANCEL_SCRIPT", $cancel_script);
$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
$xtpl->assign("JAVASCRIPT", get_set_focus_js() . $quicksearch_js);

if(!is_file(sugar_cached('jsLanguage/') . $GLOBALS['current_language'] . '.js')) {
    require_once('include/language/jsLanguage.php');
	$jsLanguage = new jsLanguage();
	$jsLanguage->createAppStringsCache($GLOBALS['current_language']);
}
$jsLang = getVersionedScript("cache/jsLanguage/{$GLOBALS['current_language']}.js",  $GLOBALS['sugar_config']['js_lang_version']);
$xtpl->assign("JSLANG", $jsLang);

$xtpl->assign("ID", $focus->id);
if(isset($focus->name)) $xtpl->assign("NAME", $focus->name); else $xtpl->assign("NAME", "");

//Bug45632
/* BEGIN - SECURITY GROUPS */
/**
if(isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); else $xtpl->assign("ASSIGNED_USER_ID", "");
*/
if(isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id);
else if(empty($focus->id) && empty($focus->assigned_user_id)) {
	global $current_user;
	$xtpl->assign("ASSIGNED_USER_ID", $current_user->id);
    $xtpl->assign("ASSIGNED_USER_NAME", get_assigned_user_name($current_user->id));
开发者ID:BilalArcher,项目名称:SuiteCRM,代码行数:31,代码来源:EditView.php

示例6: _getModLanguageJS

 protected function _getModLanguageJS()
 {
     if (!is_file(sugar_cached('jsLanguage/') . $this->module . '/' . $GLOBALS['current_language'] . '.js')) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createModuleStringsCache($this->module, $GLOBALS['current_language']);
     }
     return getVersionedScript("cache/jsLanguage/{$this->module}/" . $GLOBALS['current_language'] . '.js', $GLOBALS['sugar_config']['js_lang_version']);
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:8,代码来源:SugarView.php

示例7: display

 function display($end = true)
 {
     global $app_strings;
     if (!is_file(sugar_cached("jsLanguage/{$GLOBALS['current_language']}.js"))) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createAppStringsCache($GLOBALS['current_language']);
     }
     $jsLang = getVersionedScript("cache/jsLanguage/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']);
     $this->th->ss->assign('data', $this->data['data']);
     $this->data['pageData']['offsets']['lastOffsetOnPage'] = $this->data['pageData']['offsets']['current'] + count($this->data['data']);
     $this->th->ss->assign('pageData', $this->data['pageData']);
     $navStrings = array('next' => $GLOBALS['app_strings']['LNK_LIST_NEXT'], 'previous' => $GLOBALS['app_strings']['LNK_LIST_PREVIOUS'], 'end' => $GLOBALS['app_strings']['LNK_LIST_END'], 'start' => $GLOBALS['app_strings']['LNK_LIST_START'], 'of' => $GLOBALS['app_strings']['LBL_LIST_OF']);
     $this->th->ss->assign('navStrings', $navStrings);
     $associated_row_data = array();
     //C.L. - Bug 44324 - Override the NAME entry to not display salutation so that the data returned from the popup can be searched on correctly
     $searchNameOverride = !empty($this->seed) && $this->seed instanceof Person && (isset($this->data['data'][0]['FIRST_NAME']) && isset($this->data['data'][0]['LAST_NAME'])) ? true : false;
     global $locale;
     foreach ($this->data['data'] as $val) {
         $associated_row_data[$val['ID']] = $val;
         if ($searchNameOverride) {
             $associated_row_data[$val['ID']]['NAME'] = $locale->getLocaleFormattedName($val['FIRST_NAME'], $val['LAST_NAME']);
         }
     }
     $is_show_fullname = showFullName() ? 1 : 0;
     $json = getJSONobj();
     $this->th->ss->assign('jsLang', $jsLang);
     $this->th->ss->assign('lang', substr($GLOBALS['current_language'], 0, 2));
     $this->th->ss->assign('headerTpl', $this->headerTpl);
     $this->th->ss->assign('footerTpl', $this->footerTpl);
     $this->th->ss->assign('ASSOCIATED_JAVASCRIPT_DATA', 'var associated_javascript_data = ' . $json->encode($associated_row_data) . '; var is_show_fullname = ' . $is_show_fullname . ';');
     $this->th->ss->assign('module', $this->seed->module_dir);
     $request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
     $this->th->ss->assign('request_data', $request_data);
     $this->th->ss->assign('fields', $this->fieldDefs);
     $this->th->ss->assign('formData', $this->formData);
     $this->th->ss->assign('APP', $GLOBALS['app_strings']);
     $this->th->ss->assign('MOD', $GLOBALS['mod_strings']);
     if (isset($this->_popupMeta['create']['createButton'])) {
         $this->_popupMeta['create']['createButton'] = translate($this->_popupMeta['create']['createButton']);
     }
     $this->th->ss->assign('popupMeta', $this->_popupMeta);
     $this->th->ss->assign('current_query', base64_encode(serialize($_REQUEST)));
     $this->th->ss->assign('customFields', $this->customFieldDefs);
     $this->th->ss->assign('numCols', NUM_COLS);
     $this->th->ss->assign('massUpdateData', $this->massUpdateData);
     $this->th->ss->assign('sugarVersion', $GLOBALS['sugar_version']);
     $this->th->ss->assign('should_process', $this->should_process);
     if ($this->_create) {
         $this->th->ss->assign('ADDFORM', $this->getQuickCreate());
         //$this->_getAddForm());
         $this->th->ss->assign('ADDFORMHEADER', $this->_getAddFormHeader());
         $this->th->ss->assign('object_name', $this->seed->object_name);
     }
     $this->th->ss->assign('LIST_HEADER', get_form_header($GLOBALS['mod_strings']['LBL_LIST_FORM_TITLE'], '', false));
     $this->th->ss->assign('SEARCH_FORM_HEADER', get_form_header($GLOBALS['mod_strings']['LBL_SEARCH_FORM_TITLE'], '', false));
     $str = $this->th->displayTemplate($this->seed->module_dir, $this->view, $this->tpl);
     return $str;
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:58,代码来源:PopupSmarty.php

示例8: getQuickCreateForm

 /**
  * Renders the QuickCreate form from Smarty and returns HTML
  * @param array $vars request variable global
  * @param object $email Fetched email object
  * @param bool $addToAddressBook
  * @return array
  */
 function getQuickCreateForm($vars, $email, $addToAddressBookButton = false)
 {
     require_once "include/EditView/EditView2.php";
     global $app_strings;
     global $mod_strings;
     global $current_user;
     global $beanList;
     global $beanFiles;
     global $current_language;
     //Setup the current module languge
     $mod_strings = return_module_language($current_language, $_REQUEST['qc_module']);
     $bean = $beanList[$_REQUEST['qc_module']];
     $class = $beanFiles[$bean];
     require_once $class;
     $focus = new $bean();
     $people = array('Contact', 'Lead');
     $emailAddress = array();
     // people
     if (in_array($bean, $people)) {
         // lead specific
         $focus->lead_source = 'Email';
         $focus->lead_source_description = trim($email->name);
         $from = isset($email->from_name) && !empty($email->from_name) ? $email->from_name : $email->from_addr;
         if (isset($_REQUEST['sugarEmail']) && !empty($_REQUEST['sugarEmail'])) {
             if ($email->status == "sent") {
                 $from = isset($email->to_addrs_names) && !empty($email->to_addrs_names) ? $email->to_addrs_names : $email->to_addrs;
             } else {
                 $from = isset($email->from_name) && !empty($email->from_name) ? $email->from_name : $email->from_addr_name;
             }
         }
         $name = explode(" ", trim($from));
         $address = trim(array_pop($name));
         $address = str_replace(array("<", ">", "&lt;", "&gt;"), "", $address);
         $emailAddress[] = array('email_address' => $address, 'primary_address' => 1, 'invalid_email' => 0, 'opt_out' => 0, 'reply_to_address' => 1);
         $focus->email1 = $address;
         if (!empty($name)) {
             $focus->last_name = trim(array_pop($name));
             foreach ($name as $first) {
                 if (!empty($focus->first_name)) {
                     $focus->first_name .= " ";
                 }
                 $focus->first_name .= trim($first);
             }
         }
     } else {
         // bugs, cases, tasks
         $focus->name = trim($email->name);
     }
     $focus->description = trim(strip_tags($email->description));
     $focus->assigned_user_id = $current_user->id;
     $EditView = new EditView();
     $EditView->ss = new Sugar_Smarty();
     //MFH BUG#20283 - checks for custom quickcreate fields
     $EditView->setup($_REQUEST['qc_module'], $focus, 'custom/modules/' . $focus->module_dir . '/metadata/editviewdefs.php', 'include/EditView/EditView.tpl');
     $EditView->process();
     $EditView->render();
     $EditView->defs['templateMeta']['form']['buttons'] = array('email2save' => array('id' => 'e2AjaxSave', 'customCode' => '<input type="button" class="button" value="   ' . $app_strings['LBL_SAVE_BUTTON_LABEL'] . '   " onclick="SUGAR.email2.detailView.saveQuickCreate(false);" />'), 'email2saveandreply' => array('id' => 'e2SaveAndReply', 'customCode' => '<input type="button" class="button" value="   ' . $app_strings['LBL_EMAIL_SAVE_AND_REPLY'] . '   " onclick="SUGAR.email2.detailView.saveQuickCreate(\'reply\');" />'), 'email2cancel' => array('id' => 'e2cancel', 'customCode' => '<input type="button" class="button" value="   ' . $app_strings['LBL_EMAIL_CANCEL'] . '   " onclick="SUGAR.email2.detailView.quickCreateDialog.hide();" />'));
     if ($addToAddressBookButton) {
         $EditView->defs['templateMeta']['form']['buttons']['email2saveAddToAddressBook'] = array('id' => 'e2addToAddressBook', 'customCode' => '<input type="button" class="button" value="   ' . $app_strings['LBL_EMAIL_ADDRESS_BOOK_SAVE_AND_ADD'] . '   " onclick="SUGAR.email2.detailView.saveQuickCreate(true);" />');
     }
     //Get the module language for javascript
     if (!is_file(sugar_cached('jsLanguage/') . $_REQUEST['qc_module'] . '/' . $GLOBALS['current_language'] . '.js')) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createModuleStringsCache($_REQUEST['qc_module'], $GLOBALS['current_language']);
     }
     $jsLanguage = getVersionedScript("cache/jsLanguage/{$_REQUEST['qc_module']}/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']);
     $EditView->view = 'EmailQCView';
     $EditView->defs['templateMeta']['form']['headerTpl'] = 'include/EditView/header.tpl';
     $EditView->defs['templateMeta']['form']['footerTpl'] = 'include/EditView/footer.tpl';
     $meta = array();
     $meta['html'] = $jsLanguage . $EditView->display(false, true);
     $meta['html'] = str_replace("src='" . getVersionedPath('include/SugarEmailAddress/SugarEmailAddress.js') . "'", '', $meta['html']);
     $meta['emailAddress'] = $emailAddress;
     $mod_strings = return_module_language($current_language, 'Emails');
     return $meta;
 }
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:83,代码来源:EmailUI.php

示例9: getJSONobj

    }
    // if
    $groupFolders[$value['id']] = $value['name'];
    $groupFoldersOrig[] = $value['origName'];
}
// foreach
$groupFolderName = "";
$addToGroupFolder = "";
$createGroupFolderStyle = "display:''";
$editGroupFolderStyle = "display:''";
if (!empty($focus->id)) {
    $groupFolderName = $focus->name;
}
if (!empty($focus->id)) {
    $addToGroupFolder = $focus->parent_folder;
}
if (!empty($focus->id)) {
    $createGroupFolderStyle = "display:none;";
} else {
    $editGroupFolderStyle = "display:none;";
}
// else
$smarty->assign('createGroupFolderStyle', $createGroupFolderStyle);
$smarty->assign('editGroupFolderStyle', $editGroupFolderStyle);
$smarty->assign('groupFolderName', $groupFolderName);
$json = getJSONobj();
$smarty->assign('group_folder_array', $json->encode($groupFoldersOrig));
$smarty->assign('group_folder_options', get_select_options_with_id($groupFolders, $addToGroupFolder));
$smarty->assign('CSS', SugarThemeRegistry::current()->getCSS());
$smarty->assign('languageStrings', getVersionedScript("cache/jsLanguage/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']));
echo $smarty->fetch("modules/Emails/templates/_createGroupFolder.tpl");
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:31,代码来源:EditGroupFolder.php

示例10: addDatetime

    /**
     * Add Datetime selection popup window HTML code
     * @param displayname Name to display in the popup window
     * @param varname name of the variable
     */
    function addDatetime($displayname, $varname)
    {
        global $timedate;
        $userformat = $timedate->get_user_time_format();
        $cal_dateformat = $timedate->get_cal_date_format();
        global $app_strings, $app_list_strings, $theme;
        $jscalendarImage = SugarThemeRegistry::current()->getImageURL('jscalendar.gif');
        $javascriptend = <<<EOQ
\t\t <script type="text/javascript">
\t\tCalendar.setup ({
\t\t\tinputField : "{$varname}_date",
\t\t\tdaFormat : "{$cal_dateformat}",
\t\t\tifFormat : "{$cal_dateformat}",
\t\t\tshowsTime : false,
\t\t\tbutton : "{$varname}_trigger",
\t\t\tsingleClick : true,
\t\t\tstep : 1,
\t\t\tweekNumbers:false
\t\t});
\t\t</script>
EOQ;
        $dtscript = getVersionedScript('include/SugarFields/Fields/Datetimecombo/Datetimecombo.js');
        $html = <<<EOQ
\t\t<td scope="row" width="20%">{$displayname}</td>
\t\t<td class='dataField' width="30%"><input onblur="parseDate(this, '{$cal_dateformat}')" type="text" name='{$varname}' size="12" id='{$varname}_date' maxlength='10' value="">
\t\t<img border="0" src="{$jscalendarImage}" alt='{$app_strings['LBL_MASSUPDATE_DATE']}' id="{$varname}_trigger" title="{$app_strings['LBL_MASSUPDATE_DATE']}"  align="absmiddle">&nbsp;{$javascriptend}

\t\t<span id="{$varname}_time_section"></span>
\t\t</td>
\t\t<input type="hidden" id="{$varname}" name="{$varname}">
\t\t{$dtscript}
\t\t<script type="text/javascript">
\t\tvar combo_{$varname} = new Datetimecombo(" ", "{$varname}", "{$userformat}", '','','',1);
\t\t//Render the remaining widget fields
\t\ttext = combo_{$varname}.html('');
\t\tdocument.getElementById('{$varname}_time_section').innerHTML = text;

\t\t//Call eval on the update function to handle updates to calendar picker object
\t\teval(combo_{$varname}.jsscript(''));

\t\tfunction update_{$varname}_available() {
\t\t      YAHOO.util.Event.onAvailable("{$varname}_date", this.handleOnAvailable, this);
\t\t}

\t\tupdate_{$varname}_available.prototype.handleOnAvailable = function(me) {
\t\t\tCalendar.setup ({
\t\t\tonClose : update_{$varname},
\t\t\tinputField : "{$varname}_date",
\t\t\tdaFormat : "{$cal_dateformat}",
\t\t\tifFormat : "{$cal_dateformat}",
\t\t\tbutton : "{$varname}_trigger",
\t\t\tsingleClick : true,
\t\t\tstep : 1,
\t\t\tweekNumbers:false
\t\t\t});

\t\t\t//Call update for first time to round hours and minute values
\t\t\tcombo_{$varname}.update(false);
\t\t}

\t\tvar obj_{$varname} = new update_{$varname}_available();
\t\t</script>

\t\t<script> addToValidate('MassUpdate','{$varname}_date','date',false,'{$displayname}');
\t\taddToValidateBinaryDependency('MassUpdate', '{$varname}_hours', 'alpha', false, "{$app_strings['ERR_MISSING_REQUIRED_FIELDS']}", '{$varname}_date');
\t\taddToValidateBinaryDependency('MassUpdate', '{$varname}_minutes', 'alpha', false, "{$app_strings['ERR_MISSING_REQUIRED_FIELDS']}", '{$varname}_date');
\t\taddToValidateBinaryDependency('MassUpdate', '{$varname}_meridiem', 'alpha', false, "{$app_strings['ERR_MISSING_REQUIRED_FIELDS']}", '{$varname}_date');
\t\t</script>

EOQ;
        return $html;
    }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:77,代码来源:MassUpdate.php

示例11: getForm

    function getForm($prefix, $mod = 'Quotes')
    {
        if (!ACLController::checkAccess('Quotes', '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 $sugar_version, $sugar_config;
        $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
        $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
        $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
        $the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
        $the_form .= getVersionedScript("modules/Quotes/Forms.js");
        $the_form .= <<<EOQ
\t\t<form name="{$prefix}EditView" onSubmit="return check_form('{$prefix}EditView')" method="POST" action="index.php">
\t\t\t<input type="hidden" name="{$prefix}module" value="Quotes">
\t\t\t<input type="hidden" name="{$prefix}action" value="Save">
EOQ;
        $the_form .= $this->getFormBody($prefix, $mod, "{$prefix}EditView");
        $the_form .= <<<EOQ
\t\t<input title="{$lbl_save_button_title}" accessKey="{$lbl_save_button_key}" class="button" type="submit" name="button" value="  {$lbl_save_button_label}  " >
\t\t</form>

EOQ;
        $the_form .= get_left_form_footer();
        $the_form .= get_validate_record_js();
        return $the_form;
    }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:33,代码来源:QuoteFormBase.php

示例12: getVersionedScript

 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by SugarCRM".
 ********************************************************************************/
//NOTE: Under the License referenced above, you are required to leave in all copyright statements in both
//the code and end-user application.
global $sugar_config, $mod_strings;
?>
<style type="text/css">
ul li {
list-style-type: square;
}
</style>
<?php 
echo getVersionedScript("modules/Home/about.js");
?>
<span>
<div class="about" style="padding: 10px 15px 20px 15px;">
<p>
<h1><IMG src="include/images/sugar_md_open.png" alt="SugarCRM" width="425" height="30" ondblclick='abouter.display();'></h1>
<br>
<b><?php 
echo $mod_strings['LBL_VERSION'] . " " . $sugar_version . " (" . $mod_strings['LBL_BUILD'] . " " . $sugar_build . ")";
if (is_file("custom_version.php")) {
    include "custom_version.php";
    print "&nbsp;&nbsp;&nbsp;" . $custom_version;
}
?>
</b></p>
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:30,代码来源:About.php

示例13: foreach

 function &_get_form($defines, $additionalFormFields = null)
 {
     global $app_strings;
     global $currentModule;
     $this->module = "Calls";
     $this->subpanelDiv = "activities";
     // Create the additional form fields with real values if they were not passed in
     if (empty($additionalFormFields) && $this->additional_form_fields) {
         foreach ($this->additional_form_fields as $key => $value) {
             if (!empty($defines['focus']->{$value})) {
                 $additionalFormFields[$key] = $defines['focus']->{$value};
             } else {
                 $additionalFormFields[$key] = '';
             }
         }
     }
     if (!empty($this->module)) {
         $defines['child_module_name'] = $this->module;
     } else {
         $defines['child_module_name'] = $defines['module'];
     }
     if (!empty($this->subpanelDiv)) {
         $defines['subpanelDiv'] = $this->subpanelDiv;
     }
     $defines['parent_bean_name'] = get_class($defines['focus']);
     $form = 'form' . $defines['child_module_name'];
     $button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_' . strtolower($defines['subpanelDiv']) . '\', \'' . addslashes($app_strings['LBL_LOADING']) . '\');" action="index.php" method="post" name="form" id="form' . $form . "\">\n";
     //module_button is used to override the value of module name
     $button .= "<input type='hidden' name='target_module' value='" . $defines['child_module_name'] . "'>\n";
     $button .= "<input type='hidden' name='" . strtolower($defines['parent_bean_name']) . "_id' value='" . $defines['focus']->id . "'>\n";
     if (isset($defines['focus']->name)) {
         $button .= "<input type='hidden' name='" . strtolower($defines['parent_bean_name']) . "_name' value='" . $defines['focus']->name . "'>";
     }
     $button .= '<input type="hidden" name="to_pdf" value="true" />';
     $button .= '<input type="hidden" name="tpl" value="QuickCreate.tpl" />';
     $button .= '<input type="hidden" name="return_module" value="' . $currentModule . "\" />\n";
     $button .= '<input type="hidden" name="return_action" value="' . $defines['action'] . "\" />\n";
     $button .= '<input type="hidden" name="return_id" value="' . $defines['focus']->id . "\" />\n";
     $button .= '<input type="hidden" name="record" value="" />';
     // TODO: move this out and get $additionalFormFields working properly
     if (empty($additionalFormFields['parent_type'])) {
         if ($defines['focus']->object_name == 'Contact') {
             $additionalFormFields['parent_type'] = 'Accounts';
         } else {
             $additionalFormFields['parent_type'] = $defines['focus']->module_dir;
         }
     }
     if (empty($additionalFormFields['parent_name'])) {
         if ($defines['focus']->object_name == 'Contact') {
             $additionalFormFields['parent_name'] = $defines['focus']->account_name;
             $additionalFormFields['account_name'] = $defines['focus']->account_name;
         } else {
             $additionalFormFields['parent_name'] = $defines['focus']->name;
         }
     }
     if (empty($additionalFormFields['parent_id'])) {
         if ($defines['focus']->object_name == 'Contact') {
             $additionalFormFields['parent_id'] = $defines['focus']->account_id;
             $additionalFormFields['account_id'] = $defines['focus']->account_id;
         } else {
             $additionalFormFields['parent_id'] = $defines['focus']->id;
         }
     }
     $button .= '<input type="hidden" name="action" value="SubpanelCreates" />' . "\n";
     $button .= '<input type="hidden" name="module" value="Home" />' . "\n";
     $button .= '<input type="hidden" name="target_action" value="QuickCreate" />' . "\n";
     // fill in additional form fields for all but action
     foreach ($additionalFormFields as $key => $value) {
         if ($key != 'action') {
             $button .= '<input type="hidden" name="' . $key . '" value="' . $value . '" />' . "\n";
         }
     }
     $button .= getVersionedScript('include/SugarFields/Fields/Datetimecombo/Datetimecombo.js') . "\n";
     return $button;
 }
开发者ID:omusico,项目名称:windcrm,代码行数:75,代码来源:SugarWidgetSubPanelTopScheduleCallButton.php

示例14: getVersionedScript

//Bug 12335: We need to include the javascript language file first. And also the language file in WorkFlow is needed.
if (!is_file(sugar_cached('jsLanguage/') . $GLOBALS['current_language'] . '.js')) {
    require_once 'include/language/jsLanguage.php';
    jsLanguage::createAppStringsCache($GLOBALS['current_language']);
}
$javascript_language_files = getVersionedScript("cache/jsLanguage/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']);
if (!is_file(sugar_cached('jsLanguage/') . $this->module . '/' . $GLOBALS['current_language'] . '.js')) {
    require_once 'include/language/jsLanguage.php';
    jsLanguage::createModuleStringsCache($this->module, $GLOBALS['current_language']);
}
$javascript_language_files .= getVersionedScript("cache/jsLanguage/{$this->module}/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']);
if (!is_file(sugar_cached('jsLanguage/WorkFlow/') . $GLOBALS['current_language'] . '.js')) {
    require_once 'include/language/jsLanguage.php';
    jsLanguage::createModuleStringsCache('WorkFlow', $GLOBALS['current_language']);
}
$javascript_language_files .= getVersionedScript("cache/jsLanguage/WorkFlow/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']);
$the_javascript = "<script type='text/javascript' language='JavaScript'>\n";
$the_javascript .= "function set_return() {\n";
$the_javascript .= "    window.opener.document.EditView.submit();";
$the_javascript .= "}\n";
$the_javascript .= "</script>\n";
$form->assign("MOD", $mod_strings);
$form->assign("APP", $app_strings);
$form->assign('JS_INCLUDE', $js_include);
$form->assign("JAVASCRIPT_LANGUAGE_FILES", $javascript_language_files);
$form->assign("MODULE_NAME", $currentModule);
$form->assign("GRIDLINE", $gridline);
$form->assign("SET_RETURN_JS", $the_javascript);
$form->assign("BASE_MODULE", $workflow_object->base_module);
$form->assign("WORKFLOW_ID", $workflow_object->id);
$form->assign("ID", $focus->id);
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:CreateStepFilter.php

示例15: array

eoq;
}
$hidden_fields = "<input type=\"hidden\" name=\"module\" value=\"UpgradeWizard\">";
$hidden_fields .= "<input type=\"hidden\" name=\"action\" value=\"index\">";
$hidden_fields .= "<input type=\"hidden\" name=\"step\" value=\"{$_REQUEST['step']}\">";
$hidden_fields .= "<input type=\"hidden\" name=\"run\" value=\"upload\">";
$form2 = '';
/*  Removing Install From Sugar tab from Upgradewizard.
if(class_exists("PackageManagerDisplay")) {
	$form2 = PackageManagerDisplay::buildPatchDisplay($form, $hidden_fields, 'index.php', array('patch', 'module'));
}
*/
if ($form2 == null) {
    $form2 = $form;
}
$json = getVersionedScript('include/JSON.js');
$form3 = <<<eoq2
<br>

<table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
<tr><td>

\t<table width="100%" border="0" cellspacing="0" cellpadding="0">
\t\t<tr>
\t\t\t<td>
\t\t\t\t{$mod_strings['LBL_UW_FILES_QUEUED']}<br>
\t\t\t\t{$ready}
\t\t\t</td>
\t\t</tr>
\t</table>
</td></tr>
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:upload.php


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