本文整理汇总了PHP中SugarTinyMCE类的典型用法代码示例。如果您正苦于以下问题:PHP SugarTinyMCE类的具体用法?PHP SugarTinyMCE怎么用?PHP SugarTinyMCE使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SugarTinyMCE类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: display
public function display()
{
// Disable VCR Control
$this->ev->showVCRControl = false;
// Default Team as Global
if (empty($this->bean->id) && !$this->ev->isDuplicate) {
$this->bean->team_id = 1;
$this->bean->team_set_id = 1;
}
// Load TinyMCE
require_once 'include/SugarTinyMCE.php';
$tiny = new SugarTinyMCE();
$tiny->defaultConfig['apply_source_formatting'] = true;
$tiny->defaultConfig['cleanup_on_startup'] = true;
$tiny->defaultConfig['relative_urls'] = false;
$tiny->defaultConfig['convert_urls'] = false;
$ed = $tiny->getInstance('body_html');
$this->ss->assign('tiny_script', $ed);
// Load Fields for main module
if (empty($this->bean->base_module)) {
$modulesList = PdfManagerHelper::getAvailableModules();
$this->bean->base_module = key($modulesList);
}
$fieldsForSelectedModule = PdfManagerHelper::getFields($this->bean->base_module, true);
$this->ss->assign('fieldsForSelectedModule', $fieldsForSelectedModule);
parent::display();
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:27,代码来源:view.edit.php
示例2: get_body
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address [email protected].
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* 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".
*/
function get_body(&$ss, $vardef)
{
$edit_mod_strings = return_module_language($GLOBALS['current_language'], 'EditCustomFields');
$ss->assign('MOD', $edit_mod_strings);
if (!empty($cf)) {
$ss->assign('cf', $cf);
}
///////////////////////////////////
require_once 'include/SugarTinyMCE.php';
$tiny = new SugarTinyMCE();
$tiny->defaultConfig['width'] = 300;
$tiny->defaultConfig['height'] = 300;
$tiny->buttonConfig = "code,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,\n justifyfull,separator,forecolor,backcolor,\n ";
$tiny->buttonConfig2 = "pastetext,pasteword,fontselect,fontsizeselect,";
$tiny->buttonConfig3 = "";
$ed = $tiny->getInstance('htmlarea');
$ss->assign("tiny", $ed);
$edValue = '';
if (!empty($vardef['default_value'])) {
$edValue = $vardef['default_value'];
$edValue = str_replace(array("\r\n", "\n"), " ", $edValue);
}
$ss->assign('HTML_EDITOR', $edValue);
$ss->assign('preSave', 'document.popup_form.presave();');
///////////////////////////////////
return $ss->fetch('modules/DynamicFields/templates/Fields/Forms/html.tpl');
}
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:61,代码来源:html.php
示例3: setUpBeforeClass
public static function setUpBeforeClass()
{
if (file_exists(self::$customConfigFile)) {
rename(self::$customConfigFile, self::$customConfigFile . ".bak");
}
if (file_exists(self::$customDefaultConfigFile)) {
rename(self::$customDefaultConfigFile, self::$customDefaultConfigFile . ".bak");
}
file_put_contents(self::$customConfigFile, "<?php\n\t\t\t\$buttonConfigs = array('default' => array('buttonConfig' =>'testcase',\n\t\t\t\t\t\t\t\t\t'buttonConfig2' => 'cut,copy,paste,pastetext,pasteword,selectall,separator,search,replace,separator,bullist,numlist,separator,outdent,\n\t \t\t\t\t\tindent,separator,ltr,rtl,separator,undo,redo,separator, link,unlink,anchor,image,separator,sub,sup,separator,charmap,\n\t \t\t\t\t\tvisualaid', \n\t \t\t\t'buttonConfig3' => 'tablecontrols,separator,advhr,hr,removeformat,separator,insertdate,inserttime,separator,preview'),\n\t\t\t\t\t\t\t\t\t'badkey1' => 'bad data1');\n\t\t\t?>");
file_put_contents(self::$customDefaultConfigFile, "<?php\n\t\t\t\$defaultConfig = array('extended_valid_elements' => 'upload[testlength|ratio|initialtest|mintestsize|threads|maxchunksize|maxchunkcount],download[testlength|initialtest|mintestsize|threads|maximagesize]',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'badkey2' => 'bad data2');\n\t\t\t?>");
$tinySugar = new SugarTinyMCE();
self::$MCE = $tinySugar->getInstance();
}
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:13,代码来源:SugarTinyMCETest.php
示例4: displayTMCE
function displayTMCE()
{
require_once "include/SugarTinyMCE.php";
global $locale;
$tiny = new SugarTinyMCE();
$tinyMCE = $tiny->getConfig();
$js = <<<JS
\t\t<script language="javascript" type="text/javascript">
\t\t{$tinyMCE}
\t\tvar df = '{$locale->getPrecedentPreference('default_date_format')}';
\t\ttinyMCE.init({
\t\ttheme : "advanced",
\t\ttheme_advanced_toolbar_align : "left",
\t\tmode: "exact",
\t\t\telements : "description",
\t\t\ttheme_advanced_toolbar_location : "top",
\t\t\ttheme_advanced_buttons1: "code,help,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,forecolor,backcolor,separator,styleprops,styleselect,formatselect,fontselect,fontsizeselect",
\t\t\ttheme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,selectall,separator,search,replace,separator,bullist,numlist,separator,outdent,indent,separator,ltr,rtl,separator,undo,redo,separator, link,unlink,anchor,separator,sub,sup,separator,charmap,visualaid",
\t\t\ttheme_advanced_buttons3: "tablecontrols,separator,advhr,hr,removeformat,separator,insertdate,pagebreak",
\t\t\ttheme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Helvetica Neu=helveticaneue,sans-serif;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
\t\t\tplugins : "advhr,insertdatetime,table,paste,searchreplace,directionality,style,pagebreak",
\t\t\theight:"auto",
\t\t\twidth: "auto",
\t\t\tinline_styles : true,
\t\t\tdirectionality : "ltr",
\t\t\tremove_redundant_brs : true,
\t\t\tentity_encoding: 'raw',
\t\t\tcleanup_on_startup : true,
\t\t\tstrict_loading_mode : true,
\t\t\tconvert_urls : false,
\t\t\tplugin_insertdate_dateFormat : '{DATE '+df+'}',
\t\t\tpagebreak_separator : "<pagebreak />",
\t\t\textended_valid_elements : "textblock",
\t\t\tcustom_elements: "textblock",
\t\t});
\t\t</script>
JS;
echo $js;
}
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:41,代码来源:view.edit.php
示例5: display
function display(){
parent::display();
global $sugar_config;
$new = empty($this->bean->id);
if($new){
?>
<script>
$(document).ready(function(){
$('#update_text').closest('td').html('');
$('#update_text_label').closest('td').html('');
$('#internal').closest('td').html('');
$('#internal_label').closest('td').html('');
$('#addFileButton').closest('td').html('');
$('#case_update_form_label').closest('td').html('');
});
</script>
<?php
}
$tiny = new SugarTinyMCE();
echo $tiny->getInstance('update_text,description', 'email_compose_light');
}
开发者ID:auf,项目名称:crm_auf_org,代码行数:21,代码来源:view.edit.php
示例6: display
function display()
{
global $app_strings, $current_user, $mod_strings, $theme;
if (is_dir("themes/{$theme}/ext/resources/css")) {
$cssDir = opendir("themes/{$theme}/ext/resources/css");
}
$smarty = new Sugar_Smarty();
$type = !empty($_REQUEST['type']) ? $_REQUEST['type'] : 'main';
$mbt = false;
$admin = false;
$mb = strtolower($type);
$smarty->assign('TYPE', $type);
$smarty->assign('app_strings', $app_strings);
$smarty->assign('mod', $mod_strings);
//Replaced by javascript function "setMode"
switch ($type) {
case 'studio':
//$smarty->assign('ONLOAD','ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
require_once 'modules/ModuleBuilder/Module/StudioTree.php';
$mbt = new StudioTree();
break;
case 'mb':
//$smarty->assign('ONLOAD','ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=")');
require_once 'modules/ModuleBuilder/MB/MBPackageTree.php';
$mbt = new MBPackageTree();
break;
case 'dropdowns':
// $admin = is_admin($current_user);
require_once 'modules/ModuleBuilder/Module/DropDownTree.php';
$mbt = new DropDownTree();
break;
default:
//$smarty->assign('ONLOAD','ModuleBuilder.getContent("module=ModuleBuilder&action=home")');
require_once 'modules/ModuleBuilder/Module/MainTree.php';
$mbt = new MainTree();
}
$smarty->assign('TEST_STUDIO', displayStudioForCurrentUser());
$smarty->assign('ADMIN', is_admin($current_user));
$smarty->display('modules/ModuleBuilder/tpls/includes.tpl');
if ($mbt) {
$smarty->assign('TREE', $mbt->fetch());
$smarty->assign('TREElabel', $mbt->getName());
}
$userPref = $current_user->getPreference('mb_assist', 'Assistant');
if (!$userPref) {
$userPref = "na";
}
$smarty->assign('userPref', $userPref);
///////////////////////////////////
require_once 'include/SugarTinyMCE.php';
$tiny = new SugarTinyMCE();
$tiny->defaultConfig['width'] = 300;
$tiny->defaultConfig['height'] = 300;
$tiny->buttonConfig = "code,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,\n\t justifyfull,separator,forecolor,backcolor,\n\t ";
$tiny->buttonConfig2 = "pastetext,pasteword,fontselect,fontsizeselect,";
$tiny->buttonConfig3 = "";
$ed = $tiny->getInstance();
$smarty->assign("tiny", $ed);
$smarty->display('modules/ModuleBuilder/tpls/index.tpl');
}
开发者ID:klr2003,项目名称:sourceread,代码行数:60,代码来源:view.main.php
示例7: SugarTinyMCE
if (!empty($focus->body)) {
$xtpl->assign("ALT_CHECKED", 'checked');
}
if (isset($focus->body)) {
$xtpl->assign("BODY", $focus->body);
} else {
$xtpl->assign("BODY", "");
}
if (isset($focus->body_html)) {
$xtpl->assign("BODY_HTML", $focus->body_html);
} else {
$xtpl->assign("BODY_HTML", "");
}
//////////////////////////////////
require_once 'include/SugarTinyMCE.php';
$tiny = new SugarTinyMCE();
$tiny->defaultConfig['apply_source_formatting'] = true;
$tiny->defaultConfig['cleanup_on_startup'] = true;
$tiny->defaultConfig['relative_urls'] = false;
$tiny->defaultConfig['convert_urls'] = false;
$ed = $tiny->getInstance('body_text');
$xtpl->assign("tiny", $ed);
$edValue = $focus->body_html;
$xtpl->assign("HTMLAREA", $edValue);
$xtpl->parse("main.htmlarea");
//////////////////////////////////
//Add Custom Fields
require_once 'modules/DynamicFields/templates/Files/EditView.php';
/*
Only allowed the related module dynamic fields
if the config setting "show_related" in this file is set to true
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:WorkFlowEditView.php
示例8: displayEmailFrame
/**
* Renders the frame for emails
*/
function displayEmailFrame()
{
require_once "include/OutboundEmail/OutboundEmail.php";
global $app_strings, $app_list_strings;
global $mod_strings;
global $sugar_config;
global $current_user;
global $locale;
global $timedate;
global $theme;
global $sugar_version;
global $sugar_flavor;
global $current_language;
global $server_unique_key;
$this->preflightUserCache();
$json = getJSONobj();
$ie = new InboundEmail();
$out = '<script type="text/javascript" language="Javascript" src="modules/Emails/javascript/vars.js"></script>';
// focus listView
$list = array('mbox' => 'Home', 'ieId' => '', 'name' => 'Home', 'unreadChecked' => 0, 'out' => array());
// lang pack
$lang = "var app_strings = new Object();\n";
foreach ($app_strings as $k => $v) {
if (strpos($k, 'LBL_EMAIL_') !== false) {
$lang .= "app_strings.{$k} = '{$v}';\n";
}
}
$modStrings = "var mod_strings = new Object();\n";
foreach ($mod_strings as $k => $v) {
$v = str_replace("'", "\\'", $v);
$modStrings .= "mod_strings.{$k} = '{$v}';\n";
}
$lang .= "\n\n{$modStrings}\n";
// link drop-down
$parent_types = $app_list_strings['record_type_display'];
$disabled_parent_types = ACLController::disabledModuleList($parent_types, false, 'list');
foreach ($disabled_parent_types as $disabled_parent_type) {
unset($parent_types[$disabled_parent_type]);
}
$linkBeans = $json->encode(get_select_options_with_id($parent_types, ''));
//TinyMCE Config
require_once "include/SugarTinyMCE.php";
$tiny = new SugarTinyMCE();
$tinyConf = $tiny->getConfig();
//Check quick create module access
$QCAvailibleModules = array();
$QCModules = array('Bugs', 'Cases', 'Contacts', 'Leads', 'Tasks');
foreach ($QCModules as $module) {
$class = substr($module, 0, strlen($module) - 1);
require_once "modules/{$module}/{$class}.php";
if ($class == "Case") {
$class = "aCase";
}
$seed = new $class();
if ($seed->ACLAccess('edit')) {
$QCAvailibleModules[] = $module;
}
}
///////////////////////////////////////////////////////////////////////
//// BASIC ASSIGNS
$charsets = $json->encode($locale->getCharsetSelect());
$this->smarty->assign('yuiPath', 'modules/Emails/javascript/yui-ext/');
$this->smarty->assign('app_strings', $app_strings);
$this->smarty->assign('mod_strings', $mod_strings);
$this->smarty->assign('theme', $theme);
$this->smarty->assign('lang', $lang);
$this->smarty->assign('linkBeans', $linkBeans);
$this->smarty->assign('sugar_config', $sugar_config);
$this->smarty->assign('emailCharsets', $charsets);
$this->smarty->assign('is_admin', $current_user->is_admin);
$this->smarty->assign('sugar_version', $sugar_version);
$this->smarty->assign('sugar_flavor', $sugar_flavor);
$this->smarty->assign('current_language', $current_language);
$this->smarty->assign('server_unique_key', $server_unique_key);
$this->smarty->assign('tinyMCE', $tinyConf);
$this->smarty->assign('qcModules', $json->encode($QCAvailibleModules));
$extAllDebugValue = "ext-all.js";
$this->smarty->assign('extFileName', $extAllDebugValue);
//#20776 jchi
$peopleTables = array("users", "contacts", "leads", "prospects");
$filterPeopleTables = array();
global $app_list_strings, $app_strings;
$filterPeopleTables['LBL_DROPDOWN_LIST_ALL'] = $app_strings['LBL_DROPDOWN_LIST_ALL'];
foreach ($peopleTables as $table) {
$module = ucfirst($table);
$class = substr($module, 0, strlen($module) - 1);
require_once "modules/{$module}/{$class}.php";
$person = new $class();
if (!$person->ACLAccess('list')) {
continue;
}
$filterPeopleTables[$person->table_name] = $app_list_strings['moduleList'][$person->module_dir];
}
$this->smarty->assign('listOfPersons', get_select_options_with_id($filterPeopleTables, ''));
// settings: general
$e2UserPreferences = $this->getUserPrefsJS();
$emailSettings = $e2UserPreferences['emailSettings'];
//.........这里部分代码省略.........
开发者ID:klr2003,项目名称:sourceread,代码行数:101,代码来源:EmailUI.php
示例9: submit_form
}
$Web_To_Lead_Form_html .= "</table >";
$Web_To_Lead_Form_html .= "</form>";
$Web_To_Lead_Form_html .= "<script type='text/javascript'>\n function submit_form(){\n \tif(typeof(validateCaptchaAndSubmit)!='undefined'){\n \t\tvalidateCaptchaAndSubmit();\n \t}else{\n \t\tcheck_webtolead_fields();\n \t}\n }\n function check_webtolead_fields(){\n if(document.getElementById('bool_id') != null){\n var reqs=document.getElementById('bool_id').value;\n bools = reqs.substring(0,reqs.lastIndexOf(';'));\n var bool_fields = new Array();\n var bool_fields = bools.split(';');\n nbr_fields = bool_fields.length;\n for(var i=0;i<nbr_fields;i++){\n if(document.getElementById(bool_fields[i]).value == 'on'){\n document.getElementById(bool_fields[i]).value = 1;\n }\n else{\n document.getElementById(bool_fields[i]).value = 0;\n }\n }\n }\n if(document.getElementById('req_id') != null){\n var reqs=document.getElementById('req_id').value;\n reqs = reqs.substring(0,reqs.lastIndexOf(';'));\n var req_fields = new Array();\n var req_fields = reqs.split(';');\n nbr_fields = req_fields.length;\n var req = true;\n for(var i=0;i<nbr_fields;i++){\n if(document.getElementById(req_fields[i]).value.length <=0 || document.getElementById(req_fields[i]).value==0){\n req = false;\n break;\n }\n }\n if(req){\n document.WebToLeadForm.submit();\n return true;\n }\n else{\n alert('{$web_form_required_fileds_msg}');\n return false;\n }\n return false\n }\n else{\n document.WebToLeadForm.submit();\n }\n}\nfunction validateEmailAdd(){\n\tif(document.getElementById('email1') && document.getElementById('email1').value.length >0) {\n\t\tif(document.getElementById('email1').value.match({$regex}) == null){\n\t\t alert('{$web_not_valid_email_address}');\n\t\t}\n\t}\n\tif(document.getElementById('email2') && document.getElementById('email2').value.length >0) {\n\t\tif(document.getElementById('email2').value.match({$regex}) == null){\n\t\t alert('{$web_not_valid_email_address}');\n\t\t}\n\t}\n}\n</script>";
if (isset($Web_To_Lead_Form_html)) {
$xtpl->assign("BODY", $Web_To_Lead_Form_html);
} else {
$xtpl->assign("BODY", "");
}
if (isset($Web_To_Lead_Form_html)) {
$xtpl->assign("BODY_HTML", $Web_To_Lead_Form_html);
} else {
$xtpl->assign("BODY_HTML", "");
}
require_once 'include/SugarTinyMCE.php';
$tiny = new SugarTinyMCE();
$tiny->defaultConfig['height'] = 400;
$tiny->defaultConfig['apply_source_formatting'] = true;
$tiny->defaultConfig['cleanup'] = false;
$ed = $tiny->getInstance('body_html');
$xtpl->assign("tiny", $ed);
$xtpl->parse("main.textarea");
$xtpl->assign("INSERT_VARIABLE_ONCLICK", "insert_variable_html(document.EditView.variable_text.value)");
$xtpl->parse("main.variable_button");
$xtpl->parse("main");
$xtpl->out("main");
function ifRadioButton($customFieldName)
{
$custRow = null;
$query = "select id,type from fields_meta_data where deleted = 0 and name = '{$customFieldName}'";
$result = $GLOBALS['db']->query($query);
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:31,代码来源:GenerateWebToLeadForm.php
示例10: displayTMCE
function displayTMCE()
{
require_once "include/SugarTinyMCE.php";
global $locale, $current_user;
$tiny = new SugarTinyMCE();
$tinyMCE = $tiny->getConfig();
$js = <<<JS
<script language="javascript" type="text/javascript">
{$tinyMCE}
var df = '{$locale->getPrecedentPreference('default_date_format')}';
tinyMCE.init({
theme : tinyConfig.theme,
theme_advanced_toolbar_align : tinyConfig.theme_advanced_toolbar_align,
mode: tinyConfig.mode,
elements : "description",
theme_advanced_toolbar_location : tinyConfig.theme_advanced_toolbar_location,
theme_advanced_buttons1: tinyConfig.theme_advanced_buttons1,
theme_advanced_buttons2: tinyConfig.theme_advanced_buttons2,
theme_advanced_buttons3: tinyConfig.theme_advanced_buttons3,
theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Helvetica Neu=helveticaneue,sans-serif;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
plugins : "advhr,insertdatetime,table,paste,searchreplace,directionality,style,pagebreak,openmanager,inlinepopups",
height: tinyConfig.height,
width: tinyConfig.width ,
inline_styles : true,
directionality : "ltr",
remove_redundant_brs : true,
entity_encoding: 'raw',
cleanup_on_startup : true,
strict_loading_mode : true,
convert_urls : false,
plugin_insertdate_dateFormat : '{DATE '+df+'}',
pagebreak_separator : "<pagebreak />",
extended_valid_elements : "textblock",
custom_elements: "textblock",
file_browser_callback : tinyConfig.file_browser_callback,
open_manager_upload_path : tinyConfig.open_manager_upload_path ,
});
tinyMCE.init({
theme : tinyConfig.theme,
theme_advanced_toolbar_align : tinyConfig.theme_advanced_toolbar_align,
mode: tinyConfig.mode,
elements : "pdfheader,pdffooter",
theme_advanced_toolbar_location : tinyConfig.theme_advanced_toolbar_location,
theme_advanced_buttons1: tinyConfig.theme_advanced_buttons1,
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Helvetica Neu=helveticaneue,sans-serif;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
plugins : "advhr,insertdatetime,table,paste,searchreplace,directionality,style",
width: tinyConfig.width,
inline_styles : true,
directionality : "ltr",
entity_encoding: 'raw',
cleanup_on_startup : true,
strict_loading_mode : true,
convert_urls : false,
remove_redundant_brs : true,
plugin_insertdate_dateFormat : '{DATE '+df+'}',
extended_valid_elements : "textblock",
custom_elements: "textblock",
});
</script>
JS;
echo $js;
}
开发者ID:btactic,项目名称:omupload,代码行数:69,代码来源:view.edit.php
示例11: substr
//get the closing tag after marker ">";
//extract the input tag string
$working_str = substr($bodyHTML, $marker - 3, $end_border - ($marker - 3));
//replace input markup with text areas markups
$new_str = str_replace('input', 'textarea', $working_str);
$new_str = str_replace("type='text'", ' ', $new_str);
$new_str = $new_str . '> </textarea';
//replace the marker with generic term
$new_str = str_replace('ta_replace', 'sugarslot', $new_str);
//merge the processed string back into bodyhtml string
$bodyHTML = str_replace($working_str, $new_str, $bodyHTML);
}
//<<<----------end replacing marked text inputs with text area tags
$guid = create_guid();
$form_file = "upload://{$guid}";
$SugarTiny = new SugarTinyMCE();
$html = $SugarTiny->cleanEncodedMCEHtml($bodyHTML);
//Check to ensure we have <html> tags in the form. Without them, IE8 will attempt to display the page as XML.
if (stripos($html, "<html") === false) {
$langHeader = get_language_header();
$html = "<html {$langHeader}><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body>" . $html . "</body></html>";
}
file_put_contents($form_file, $html);
$xtpl = new XTemplate('modules/Campaigns/WebToLeadDownloadForm.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$webformlink = "<b>{$mod_strings['LBL_DOWNLOAD_TEXT_WEB_TO_LEAD_FORM']}</b><br/>";
$webformlink .= "<a href=\"index.php?entryPoint=download&id={$guid}&isTempFile=1&tempName=WebToLeadForm.html&type=temp\">{$mod_strings['LBL_DOWNLOAD_WEB_TO_LEAD_FORM']}</a>";
$xtpl->assign("LINK_TO_WEB_FORM", $webformlink);
$xtpl->assign("RAW_SOURCE", htmlspecialchars($html));
$xtpl->parse("main.copy_source");
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:WebToLeadFormSave.php
示例12: from_html
// signatures
if ($sig = $current_user->getDefaultSignature()) {
if (!$focus->hasSignatureInBody($sig) && $focus->type != 'draft') {
if ($current_user->getPreference('signature_prepend')) {
$description_html = '<br />' . from_html($sig['signature_html']) . '<br /><br />' . $description_html;
$description = "\n" . $sig['signature'] . "\n\n" . $description;
} else {
$description_html .= '<br /><br />' . from_html($sig['signature_html']);
$description = $description . "\n\n" . $sig['signature'];
}
}
}
$xtpl->assign('DESCRIPTION', $description);
// sigs
/////////////////////////////////////////////////
$tiny = new SugarTinyMCE();
$ed = $tiny->getInstance("description_html");
$xtpl->assign("TINY", $ed);
$xtpl->assign("DESCRIPTION_HTML", $description_html);
$xtpl->parse('main.htmlarea');
//// END TEXT EDITOR
///////////////////////////////////////
///////////////////////////////////////
//// SPECIAL INBOUND LANDING SCREEN ASSIGNS
if (!empty($_REQUEST['inbound_email_id'])) {
if (!empty($_REQUEST['start'])) {
$parts = $focus->getStartPage(base64_decode($_REQUEST['start']));
$xtpl->assign('RETURN_ACTION', $parts['action']);
$xtpl->assign('RETURN_MODULE', $parts['module']);
$xtpl->assign('GROUP', $parts['group']);
}
开发者ID:rgauss,项目名称:sugarcrm_dev,代码行数:31,代码来源:EditView.php
示例13: sugar_mkdir
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once 'include/formbase.php';
require_once 'include/SugarTinyMCE.php';
global $mod_strings;
global $app_strings;
$rawsource = false;
if (!empty($_REQUEST['body_html'])) {
$dir_path = "{$GLOBALS['sugar_config']['cache_dir']}generated_forms/";
if (!file_exists($dir_path)) {
sugar_mkdir($dir_path, 0777);
}
//Check to ensure we have <html> tags in the form. Without them, IE8 will attempt to display the page as XML.
$rawsource = $_REQUEST['body_html'];
$SugarTiny = new SugarTinyMCE();
$rawsource = $SugarTiny->cleanEncodedMCEHtml($rawsource);
$html = from_html($rawsource);
if (stripos($html, "<html") === false) {
$html = "<html><body>" . $html . "</body></html>";
}
$file = $dir_path . 'WebToLeadForm_' . time() . '.html';
$fp = sugar_fopen($file, 'wb');
fwrite($fp, $html);
fclose($fp);
}
$xtpl = new XTemplate('modules/Campaigns/WebToLeadDownloadForm.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$webformlink = "<b>{$mod_strings['LBL_DOWNLOAD_TEXT_WEB_TO_LEAD_FORM']}</b><br/>";
$webformlink .= "<a href={$GLOBALS['sugar_config']['cache_dir']}generated_forms/WebToLeadForm_" . time() . ".html>{$mod_strings['LBL_DOWNLOAD_WEB_TO_LEAD_FORM']}</a>";
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:WebToLeadFormSave.php
示例14: _generateComposeConfigData
/**
* Generate the config data needed for the Full Compose UI and the Quick Compose UI. The set of config data
* returned is the minimum set needed by the quick compose UI.
*
* @param String $type Drives which tinyMCE options will be included.
*/
function _generateComposeConfigData($type = "email_compose_light")
{
global $app_list_strings, $current_user, $app_strings, $mod_strings, $current_language, $locale;
//Link drop-downs
$parent_types = $app_list_strings['record_type_display'];
$disabled_parent_types = ACLController::disabledModuleList($parent_types, false, 'list');
foreach ($disabled_parent_types as $disabled_parent_type) {
unset($parent_types[$disabled_parent_type]);
}
asort($parent_types);
$linkBeans = json_encode(get_select_options_with_id($parent_types, ''));
//TinyMCE Config
require_once "include/SugarTinyMCE.php";
$tiny = new SugarTinyMCE();
$tinyConf = $tiny->getConfig($type);
//Generate Language Packs
$lang = "var app_strings = new Object();\n";
foreach ($app_strings as $k => $v) {
if (strpos($k, 'LBL_EMAIL_') !== false) {
$lang .= "app_strings.{$k} = '{$v}';\n";
}
}
//Get the email mod strings but don't use the global variable as this may be overridden by
//other modules when the quick create is rendered.
$email_mod_strings = return_module_language($current_language, 'Emails');
$modStrings = "var mod_strings = new Object();\n";
foreach ($email_mod_strings as $k => $v) {
$v = str_replace("'", "\\'", $v);
$modStrings .= "mod_strings.{$k} = '{$v}';\n";
}
$lang .= "\n\n{$modStrings}\n";
//Grab the Inboundemail language pack
$ieModStrings = "var ie_mod_strings = new Object();\n";
$ie_mod_strings = return_module_language($current_language, 'InboundEmail');
foreach ($ie_mod_strings as $k => $v) {
$v = str_replace("'", "\\'", $v);
$ieModStrings .= "ie_mod_strings.{$k} = '{$v}';\n";
}
$lang .= "\n\n{$ieModStrings}\n";
$this->smarty->assign('linkBeans', $linkBeans);
$this->smarty->assign('linkBeansOptions', $parent_types);
$this->smarty->assign('tinyMCE', $tinyConf);
$this->smarty->assign('lang', $lang);
$this->smarty->assign('app_strings', $app_strings);
$this->smarty->assign('mod_strings', $email_mod_strings);
$ie1 = new InboundEmail();
//Signatures
$defsigID = $current_user->getPreference('signature_default');
$defaultSignature = $current_user->getDefaultSignature();
$sigJson = !empty($defaultSignature) ? json_encode(array($defaultSignature['id'] => from_html($defaultSignature['signature_html']))) : "new Object()";
$this->smarty->assign('defaultSignature', $sigJson);
$this->smarty->assign('signatureDefaultId', isset($defaultSignature['id']) ? $defaultSignature['id'] : "");
//User Preferences
$this->smarty->assign('userPrefs', json_encode($this->getUserPrefsJS()));
//Get the users default outbound id
$defaultOutID = $ie1->getUsersDefaultOutboundServerId($current_user);
$this->smarty->assign('defaultOutID', $defaultOutID);
//Character Set
$charsets = json_encode($locale->getCharsetSelect());
$this->smarty->assign('emailCharsets', $charsets);
//Relateable List of People for address book search
//#20776 jchi
$peopleTables = array("users", "contacts", "leads", "prospects", "accounts");
$filterPeopleTables = array();
global $app_list_strings, $app_strings;
$filterPeopleTables['LBL_DROPDOWN_LIST_ALL'] = $app_strings['LBL_DROPDOWN_LIST_ALL'];
foreach ($peopleTables as $table) {
$module = ucfirst($table);
$class = substr($module, 0, strlen($module) - 1);
require_once "modules/{$module}/{$class}.php";
$person = new $class();
if (!$person->ACLAccess('list')) {
continue;
}
$filterPeopleTables[$person->table_name] = $app_list_strings['moduleList'][$person->module_dir];
}
$this->smarty->assign('listOfPersons', get_select_options_with_id($filterPeopleTables, ''));
}
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:84,代码来源:EmailUI.php
示例15: setup
function setup($parentFieldArray, $vardef, $displayParams, $tabindex, $twopass = true)
{
parent::setup($parentFieldArray, $vardef, $displayParams, $tabindex, $twopass);
$editor = "";
if ($vardef['editor'] == "html") {
if (!isset($displayParams['htmlescape'])) {
$displayParams['htmlescape'] = false;
}
if ($_REQUEST['action'] == "EditView") {
require_once "include/SugarTinyMCE.php";
$tiny = new SugarTinyMCE();
$editor = $tiny->getInstance($vardef['name'], 'email_compose_light');
}
$this->ss->assign("tinymce", $editor);
} else {
$this->ss->assign("tinymce", $editor);
}
}
开发者ID:samus-aran,项目名称:SuiteCRM,代码行数:18,代码来源:SugarFieldText.php
示例16: get_set_focus_js
$xtpl->assign('MOD', $mod_strings);
$xtpl->assign('APP', $app_strings);
$xtpl->assign('CANCEL_SCRIPT', 'window.close()');
if (isset($_REQUEST['return_module'])) {
$xtpl->assign('RETURN_MODULE', $_REQUEST['return_module']);
}
if (isset($_REQUEST['return_action'])) {
$xtpl->assign('RETURN_ACTION', $_REQUEST['return_action']);
}
if (isset($_REQUEST['return_id'])) {
$xtpl->assign('RETURN_ID', $_REQUEST['return_id']);
}
// handle Create $module then Cancel
if (empty($_REQUEST['return_id'])) {
$xtpl->assign('RETURN_ACTION', 'index');
}
$xtpl->assign('INPOPUPWINDOW', 'true');
$xtpl->assign('PRINT_URL', 'index.php?' . $GLOBALS['request_string']);
$xtpl->assign('JAVASCRIPT', get_set_focus_js());
$xtpl->assign('ID', $focus->id);
$xtpl->assign('NAME', $focus->name);
$xtpl->assign('SIGNATURE_TEXT', !empty($focus->signature_html) ? $focus->signature_html : $focus->signature);
if (isset($_REQUEST['the_user_id'])) {
$xtpl->assign('THE_USER_ID', $_REQUEST['the_user_id']);
}
$tiny = new SugarTinyMCE();
$xtpl->assign("tinyjs", $tiny->getInstance('sigText'));
$xtpl->parse('main.textarea');
//Add Custom Fields
$xtpl->parse('main');
$xtpl->out('main');
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:31,代码来源:PopupSignature.php
示例17: displayJS
function displayJS()
{
require_once "include/JSON.php";
require_once "include/SugarTinyMCE.php";
global $locale;
$tiny = new SugarTinyMCE();
$tinyMCE = $tiny->getConfig();
$locationHref = 'http://' . $_SERVER['HTTP_HOST'] . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/'));
$js = <<<JS
\t\t<script language="javascript" type="text/javascript">
\t\t{$tinyMCE}
\t\tvar location_href = '{$locationHref}';
\t\tvar df = '{$locale->getPrecedentPreference('default_date_format')}';
\t\t
\t\ttinyMCE.baseURL = location_href+'/include/javascript/tiny_mce';
\t\ttinyMCE.srcMode = '';
\t\ttinyMCE.init({
\t\t\ttheme : "advanced",
\t\t\ttheme_advanced_toolbar_align : "left",
\t\t\tmode: "exact",
\t\t\telements : "description",
\t\t\ttheme_advanced_toolbar_location : "top",
\t\t\ttheme_advanced_buttons1: "code,help,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,forecolor,backcolor,separator,styleprops,styleselect,formatselect,fontselect,fontsizeselect",
\t\t\ttheme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,selectall,separator,search,replace,separator,bullist,numlist,separator,outdent,indent,separator,ltr,rtl,separator,undo,redo,separator, link,unlink,anchor,image,separator,sub,sup,separator,charmap,visualaid",
\t\t\ttheme_advanced_buttons3: "tablecontrols,separator,advhr,hr,removeformat,separator,insertdate,pagebreak",
\t\t\tplugins : "advhr,insertdatetime,table,paste,searchreplace,directionality,style,pagebreak",
\t\t\theight:"500",
\t\t\twidth: "100%",
\t\t\tinline_styles : true,
\t\t\tdirectionality : "ltr",
\t\t\tremove_redundant_brs : true,
\t\t\tentity_encoding: 'raw',
\t\t\tcleanup_on_startup : true,
\t\t\tstrict_loading_mode : true,
\t\t\tconvert_urls : false,
\t\t\tplugin_insertdate_dateFormat : '{DATE '+df+'}',
\t\t\tpagebreak_separator : "<pagebreak />",
\t\t});
\t\t
\t\ttinyMCE.init({
\t\t\ttheme : "advanced",
\t\t\ttheme_advanced_toolbar_align : "left",
\t\t\tmode: "exact",
\t\t\telements : "pdfheader,pdffooter",
\t\t\ttheme_advanced_toolbar_location : "top",
\t\t\ttheme_advanced_buttons1: "code,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,undo,redo,separator,forecolor,backcolor,separator,styleprops,styleselect,formatselect,fontselect,fontsizeselect,separator,insertdate",
\t\t\ttheme_advanced_buttons2 : "",
\t\t\ttheme_advanced_buttons3 : "",
\t\t\tplugins : "advhr,insertdatetime,table,paste,searchreplace,directionality,style",
\t\t\twidth: "100%",
\t\t\tinline_styles : true,
\t\t\tdirectionality : "ltr",
\t\t\tentity_encoding: 'raw',
\t\t\tcleanup_on_startup : true,
\t
|
请发表评论