/** * @see SugarView::display() */ public function display() { global $json; $json = getJSONobj(); $json_config = new json_config(); if (isset($this->bean->json_id) && !empty($this->bean->json_id)) { $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->json_id); } else { $this->bean->json_id = $this->bean->id; $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->id); } $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript); if ($this->ev->isDuplicate) { $this->bean->status = $this->bean->getDefaultStatus(); } //if $this->ss->assign('APPLIST', $GLOBALS['app_list_strings']); $repeatIntervals = array(); for ($i = 1; $i <= self::MAX_REPEAT_INTERVAL; $i++) { $repeatIntervals[$i] = $i; } $this->ss->assign("repeat_intervals", $repeatIntervals); $fdow = $GLOBALS['current_user']->get_first_day_of_week(); $dow = array(); for ($i = $fdow; $i < $fdow + 7; $i++) { $dayIndex = $i % 7; $dow[] = array("index" => $dayIndex, "label" => $GLOBALS['app_list_strings']['dom_cal_day_short'][$dayIndex + 1]); } $this->ss->assign('dow', $dow); $this->ss->assign('repeatData', json_encode($this->view_object_map['repeatData'])); parent::display(); }
/** * @see SugarView::display() */ public function display() { global $json; $json = getJSONobj(); $json_config = new json_config(); if (isset($this->bean->json_id) && !empty($this->bean->json_id)) { $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->json_id); } else { $this->bean->json_id = $this->bean->id; $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->id); } $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript); if ($this->ev->isDuplicate) { $this->bean->status = $this->bean->getDefaultStatus(); } //if parent::display(); }
/** * @see SugarView::display() */ public function display() { global $json; $json = getJSONobj(); $json_config = new json_config(); if (isset($this->bean->json_id) && !empty($this->bean->json_id)) { $javascript = $json_config->get_static_json_server(false, true, 'Meetings', $this->bean->json_id); } else { $this->bean->json_id = $this->bean->id; $javascript = $json_config->get_static_json_server(false, true, 'Meetings', $this->bean->id); } $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript); if ($this->ev->isDuplicate) { $this->bean->status = $GLOBALS['mod_strings']['LBL_DEFAULT_STATUS']; } //if parent::display(); }
/** * @see SugarView::display() */ public function display() { global $json; $json = getJSONobj(); $json_config = new json_config(); if (isset($this->bean->json_id) && !empty($this->bean->json_id)) { $javascript = $json_config->get_static_json_server(false, true, 'Meetings', $this->bean->json_id); } else { $this->bean->json_id = $this->bean->id; $javascript = $json_config->get_static_json_server(false, true, 'Meetings', $this->bean->id); } $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript); if ($this->ev->isDuplicate) { $this->bean->status = $this->bean->getDefaultStatus(); } //if parent::display(); echo "<script> showStatus( \$('#status'), 'Meetings' );\n \$('#status').change(function(){\n showStatus( \$(this), 'Meetings' );\n });\n </script>"; }
/** * @see SugarView::display() */ public function display() { global $json; $json = getJSONobj(); $json_config = new json_config(); if (isset($this->bean->json_id) && !empty($this->bean->json_id)) { $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->json_id); } else { $this->bean->json_id = $this->bean->id; $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->id); } $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript); $this->ss->assign('remindersData', Reminder::loadRemindersData('Calls', $this->bean->id)); $this->ss->assign('remindersDataJson', Reminder::loadRemindersDataJson('Calls', $this->bean->id)); $this->ss->assign('remindersDefaultValuesDataJson', Reminder::loadRemindersDefaultValuesDataJson()); $this->ss->assign('remindersDisabled', json_encode(false)); if ($this->ev->isDuplicate) { $this->bean->status = $this->bean->getDefaultStatus(); } //if parent::display(); }
function getQSScripts() { require_once 'include/json_config.php'; static $json_config = null; if (!isset($json_config)) { $json_config = new json_config(); } global $sugar_version, $sugar_config, $theme; $qsScripts = '<script type="text/javascript" src="include/JSON.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script><script type="text/javascript">' . $json_config->get_static_json_server() . '</script> <script type="text/javascript" src="include/jsolait/init.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script> <script type="text/javascript" src="include/jsolait/lib/urllib.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script> <script type="text/javascript" src="include/javascript/jsclass_base.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script> <script type="text/javascript" src="include/javascript/jsclass_async.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script> <script type="text/javascript">sqsWaitGif = "themes/' . $theme . '/images/sqsWait.gif";</script> <script type="text/javascript" src="include/javascript/quicksearch.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script> '; return $qsScripts; }
* To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ //require_once('include/utils.php'); require_once 'include/json_config.php'; $json_config = new json_config(); global $app_strings; global $app_list_strings; global $mod_strings; global $current_user; global $theme; global $sugar_version, $sugar_config; $xtpl = new XTemplate('modules/MailMerge/Step2.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); $xtpl->assign('JSON_CONFIG_JAVASCRIPT', $json_config->get_static_json_server(false, true)); if (isset($_POST['mailmerge_module'])) { $_SESSION['MAILMERGE_MODULE'] = $_POST['mailmerge_module']; if ($_SESSION['MAILMERGE_MODULE'] == 'Campaigns') { $_SESSION['MAILMERGE_MODULE'] = 'CampaignProspects'; } if ($_SESSION['MAILMERGE_MODULE'] == 'Contacts' || $_SESSION['MAILMERGE_MODULE'] == 'Leads' || $_SESSION['MAILMERGE_MODULE'] == 'CampaignProspects') { $_SESSION['MAILMERGE_SKIP_REL'] = true; } } $step_txt = "Step 2: "; if (!empty($_SESSION['SELECTED_OBJECTS_DEF'])) { $selObjs = $_SESSION['SELECTED_OBJECTS_DEF']; $sel_obj = array(); parse_str($selObjs, $sel_obj); $idArray = array();
/** * main displaying function of Calendar */ public function display() { global $timedate, $current_user; $cal =& $this->cal; $ss = new Sugar_Smarty(); $ss->assign('APP', $GLOBALS['app_strings']); $ss->assign('APPLIST', $GLOBALS['app_list_strings']); $ss->assign('MOD', $GLOBALS['cal_strings']); $ss->assign('view', $cal->view); $ss->assign('style', $cal->style); $ss->assign('t_step', $cal->time_step); $ss->assign('current_user_id', $GLOBALS['current_user']->id); $ss->assign('current_user_name', $GLOBALS['current_user']->name); $ss->assign('time_format', $GLOBALS['timedate']->get_user_time_format()); $ss->assign('enable_repeat', $this->cal->enable_repeat); $ss->assign('items_draggable', SugarConfig::getInstance()->get('calendar.items_draggable', true)); $ss->assign('items_resizable', SugarConfig::getInstance()->get('calendar.items_resizable', true)); $ss->assign('cells_per_day', $cal->cells_per_day); $ss->assign('activityColors', json_encode($this->checkActivity($this->activity_colors))); $ss->assign('dashlet', $cal->dashlet); $ss->assign('grid_start_ts', intval($cal->grid_start_ts)); $ss->assign('year', $cal->date_time->format('Y')); $ss->assign('month', $cal->date_time->format('m')); $ss->assign('day', $cal->date_time->format('d')); $ss->assign('CALENDAR_FORMAT', $GLOBALS['timedate']->get_cal_date_format()); $ss->assign('CALENDAR_FDOW', $GLOBALS['current_user']->get_first_day_of_week()); switch ($cal->view) { case "agendaDay": case "agendaWeek": case "sharedMonth": case "sharedWeek": $height = 650; break; default: $height = 650; break; } $ss->assign('basic_min_height', $height); $ss->assign('isPrint', $this->cal->isPrint() ? 'true' : 'false'); if (count($cal->shared_ids)) { $ss->assign('shared_ids', $cal->shared_ids); $ss->assign('shared_users_count', count($cal->shared_ids)); } $ss->assign('start_weekday', $GLOBALS['current_user']->get_first_day_of_week()); $ss->assign('scroll_slot', $this->cal->scroll_slot); $ss->assign('editview_width', SugarConfig::getInstance()->get('calendar.editview_width', 800)); $ss->assign('editview_height', SugarConfig::getInstance()->get('calendar.editview_height', 600)); $ss->assign('a_str', json_encode($cal->items)); $start = $current_user->getPreference('day_start_time'); if (is_null($start)) { $start = SugarConfig::getInstance()->get('calendar.default_day_start', "08:00"); } $ss->assign('day_start_time', $start); $end = $current_user->getPreference('day_end_time'); if (is_null($end)) { $end = SugarConfig::getInstance()->get('calendar.default_day_end', "19:00"); } $ss->assign('day_end_time', $end); $ss->assign('sugar_body_only', isset($_REQUEST['to_pdf']) && $_REQUEST['to_pdf'] || isset($_REQUEST['sugar_body_only']) && $_REQUEST['sugar_body_only']); require_once 'include/json_config.php'; global $json; $json = getJSONobj(); $json_config = new json_config(); $ss->assign('GRjavascript', $json_config->get_static_json_server(false, true, 'Meetings')); // form $user_default_date_start = $timedate->asUser($timedate->getNow()); $ss->assign('user_default_date_start', $user_default_date_start); // end form $location_array = ""; foreach ($this->views as $view) { $location_array[] = $view; } $current_language = explode("_", $GLOBALS['current_language']); $ss->assign("langprefix", $current_language[0]); $ss->assign('custom_views', $location_array); if ($_REQUEST['module'] == "Calendar") { $this->load_settings_template($ss); $settings = get_custom_file_if_exists("modules/Calendar/tpls/settings.tpl"); $ss->assign("settings", $settings); } //mark date format for user. $date_format = $this->convertPHPToMomentFormat($GLOBALS['current_user']->getPreference('datef') . " " . $GLOBALS['current_user']->getPreference('timef')); $ss->assign('datetime_user_format', $date_format); $main = get_custom_file_if_exists("modules/Calendar/tpls/main.tpl"); $form_tpl = get_custom_file_if_exists("modules/Calendar/tpls/form.tpl"); $ss->assign("form", $form_tpl); if ($this->cal->enable_repeat) { $repeat_tpl = get_custom_file_if_exists("modules/Calendar/tpls/repeat.tpl"); $ss->assign("repeat", $repeat_tpl); $repeat_intervals = array(); for ($i = 1; $i <= 30; $i++) { $repeat_intervals[$i] = $i; } $ss->assign("repeat_intervals", $repeat_intervals); $fdow = $GLOBALS['current_user']->get_first_day_of_week(); $dow = array(); for ($i = $fdow; $i < $fdow + 7; $i++) { $day_index = $i % 7; $dow[] = array("index" => $day_index, "label" => $GLOBALS['app_list_strings']['dom_cal_day_short'][$day_index + 1]); } $ss->assign("dow", $dow); } echo $ss->fetch($main); }
$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); if (isset($focus->name)) { $xtpl->assign("NAME", $focus->name); } else { $xtpl->assign("NAME", ""); } require_once 'modules/DynamicFields/templates/Files/EditView.php'; $xtpl->parse("main.open_source");
/** * main displaying function of Calendar */ public function display() { global $timedate; $cal =& $this->cal; $ss = new Sugar_Smarty(); $ss->assign('APP', $GLOBALS['app_strings']); $ss->assign('APPLIST', $GLOBALS['app_list_strings']); $ss->assign('MOD', $GLOBALS['cal_strings']); $ss->assign('view', $cal->view); $ss->assign('style', $cal->style); $ss->assign('t_step', $cal->time_step); $ss->assign('current_user_id', $GLOBALS['current_user']->id); $ss->assign('current_user_name', $GLOBALS['current_user']->name); $ss->assign('time_format', $GLOBALS['timedate']->get_user_time_format()); $ss->assign('enable_repeat', $this->cal->enable_repeat); $ss->assign('items_draggable', SugarConfig::getInstance()->get('calendar.items_draggable', true)); $ss->assign('items_resizable', SugarConfig::getInstance()->get('calendar.items_resizable', true)); $ss->assign('cells_per_day', $cal->cells_per_day); $ss->assign('dashlet', $cal->dashlet); $ss->assign('grid_start_ts', intval($cal->grid_start_ts)); $ss->assign('year', $cal->date_time->format('Y')); $ss->assign('month', $cal->date_time->format('m')); $ss->assign('day', $cal->date_time->format('d')); $ss->assign('CALENDAR_FORMAT', $GLOBALS['timedate']->get_cal_date_format()); $ss->assign('CALENDAR_FDOW', $GLOBALS['current_user']->get_first_day_of_week()); if ($cal->style == "basic") { switch ($cal->view) { case "day": $height = 250; break; case "week": $height = 250; break; case "shared": $height = 100; break; default: $height = 80; break; } } else { $height = 20; } $ss->assign('basic_min_height', $height); $ss->assign('isPrint', $this->cal->isPrint() ? 'true' : 'false'); if (count($cal->shared_ids)) { $ss->assign('shared_ids', $cal->shared_ids); $ss->assign('shared_users_count', count($cal->shared_ids)); } $ss->assign('activity_colors', $this->activity_colors); $ss->assign('scroll_slot', $this->cal->scroll_slot); $ss->assign('editview_width', SugarConfig::getInstance()->get('calendar.editview_width', 800)); $ss->assign('editview_height', SugarConfig::getInstance()->get('calendar.editview_height', 600)); $ss->assign('a_str', json_encode($cal->items)); $ss->assign('sugar_body_only', isset($_REQUEST['to_pdf']) && $_REQUEST['to_pdf'] || isset($_REQUEST['sugar_body_only']) && $_REQUEST['sugar_body_only']); require_once 'include/json_config.php'; global $json; $json = getJSONobj(); $json_config = new json_config(); $ss->assign('GRjavascript', $json_config->get_static_json_server(false, true, 'Meetings')); // form $user_default_date_start = $timedate->asUser($timedate->getNow()); $ss->assign('user_default_date_start', $user_default_date_start); // end form if ($_REQUEST['module'] == "Calendar") { $this->load_settings_template($ss); $settings = "custom/modules/Calendar/tpls/settings.tpl"; if (!file_exists($settings)) { $settings = "modules/Calendar/tpls/settings.tpl"; } $ss->assign("settings", $settings); } $main = "custom/modules/Calendar/tpls/main.tpl"; if (!file_exists($main)) { $main = "modules/Calendar/tpls/main.tpl"; } $form_tpl = "custom/modules/Calendar/tpls/form.tpl"; if (!file_exists($form_tpl)) { $form_tpl = "modules/Calendar/tpls/form.tpl"; } $ss->assign("form", $form_tpl); if ($this->cal->enable_repeat) { $repeat_tpl = "custom/modules/Calendar/tpls/repeat.tpl"; if (!file_exists($repeat_tpl)) { $repeat_tpl = "modules/Calendar/tpls/repeat.tpl"; } $ss->assign("repeat", $repeat_tpl); $repeat_intervals = array(); for ($i = 1; $i <= 30; $i++) { $repeat_intervals[$i] = $i; } $ss->assign("repeat_intervals", $repeat_intervals); $fdow = $GLOBALS['current_user']->get_first_day_of_week(); $dow = array(); for ($i = $fdow; $i < $fdow + 7; $i++) { $day_index = $i % 7; $dow[] = array("index" => $day_index, "label" => $GLOBALS['app_list_strings']['dom_cal_day_short'][$day_index + 1]); } $ss->assign("dow", $dow); } echo $ss->fetch($main); // grid $grid = new CalendarGrid($cal); echo $grid->display(); // end grid }
?> </button> </div> </div> <script type="text/javascript" src="include/JSON.js"></script> <script type="text/javascript" src="include/jsolait/init.js"></script> <script type="text/javascript" src="include/jsolait/lib/urllib.js"></script> <script type="text/javascript"> <?php require_once 'include/json_config.php'; global $json; $json = getJSONobj(); $json_config = new json_config(); $GRjavascript = $json_config->get_static_json_server(false, true, 'Meetings'); echo $GRjavascript; ?> </script> <script type="text/javascript" src="include/javascript/jsclass_base.js"></script> <script type="text/javascript" src="include/javascript/jsclass_async.js"></script> <script type="text/javascript" src="modules/Meetings/jsclass_scheduler.js"></script> <script>toggle_portal_flag();function toggle_portal_flag() { } </script> <script type="text/javascript"> function fill_invitees() { if (typeof(GLOBAL_REGISTRY) != 'undefined') { SugarWidgetScheduler.fill_invitees(document.EditView); } }
/** * main displaying function of Calendar */ public function display() { global $timedate; $cal =& $this->cal; $ss = new Sugar_Smarty(); $ss->assign('APP', $GLOBALS['app_strings']); $ss->assign('APPLIST', $GLOBALS['app_list_strings']); $ss->assign('MOD', $GLOBALS['cal_strings']); $ss->assign('view', $cal->view); $ss->assign('t_step', $cal->time_step); $ss->assign('current_user_id', $GLOBALS['current_user']->id); $ss->assign('current_user_name', $GLOBALS['current_user']->name); $ss->assign('time_format', $GLOBALS['timedate']->get_user_time_format()); $ss->assign('items_draggable', SugarConfig::getInstance()->get('calendar.items_draggable', true)); $ss->assign('mouseover_expand', SugarConfig::getInstance()->get('calendar.mouseover_expand', true)); $ss->assign('item_text', 'name'); $ss->assign('cells_per_day', $cal->cells_per_day); $ss->assign('img_edit_inline', SugarThemeRegistry::current()->getImageURL('edit_inline.gif', false)); $ss->assign('img_view_inline', SugarThemeRegistry::current()->getImageURL('view_inline.gif', false)); $ss->assign('img_close', SugarThemeRegistry::current()->getImageURL('close.gif', false)); $ss->assign('dashlet', $cal->dashlet); $ss->assign('grid_start_ts', $cal->grid_start_ts); $ss->assign('celcount', $cal->celcount); if (count($cal->shared_ids)) { $ss->assign('shared_ids', $cal->shared_ids); $ss->assign('shared_users_count', count($cal->shared_ids)); } $ss->assign('activity_colors', $this->activity_colors); $ss->assign('scroll_slot', $this->cal->scroll_slot); $ss->assign('editview_width', SugarConfig::getInstance()->get('calendar.editview_width', 800)); $ss->assign('editview_height', SugarConfig::getInstance()->get('calendar.editview_height', 600)); $ss->assign('a_str', $cal->get_activities_js()); $ss->assign('sugar_body_only', isset($_REQUEST['to_pdf']) && $_REQUEST['to_pdf'] || isset($_REQUEST['sugar_body_only']) && $_REQUEST['sugar_body_only']); require_once 'include/json_config.php'; global $json; $json = getJSONobj(); $json_config = new json_config(); $ss->assign('GRjavascript', $json_config->get_static_json_server(false, true, 'Meetings')); // form $user_default_date_start = $timedate->asUser($timedate->getNow()); $ss->assign('user_default_date_start', $user_default_date_start); // end form if ($_REQUEST['module'] == "Calendar") { $this->load_settings_template($ss); $settings = "custom/modules/Calendar/tpls/settings.tpl"; if (!file_exists($settings)) { $settings = "modules/Calendar/tpls/settings.tpl"; } $ss->assign("settings", $settings); } $main = "custom/modules/Calendar/tpls/main.tpl"; if (!file_exists($main)) { $main = "modules/Calendar/tpls/main.tpl"; } $form_tpl = "custom/modules/Calendar/tpls/form.tpl"; if (!file_exists($form_tpl)) { $form_tpl = "modules/Calendar/tpls/form.tpl"; } $ss->assign("form", $form_tpl); echo $ss->fetch($main); // drid $grid = new CalendarGrid($cal); echo $grid->display(); // end grid }