Merge branch 'pm_wysiwyg'

This commit is contained in:
Gustavo Cruz
2012-12-07 15:39:37 -04:00
25 changed files with 648 additions and 437 deletions

View File

@@ -0,0 +1,79 @@
/**
* Name: editor_plugin_src.js (for pmGrids tinyMCE plugin)
**/
(function(){
var strPluginURL;
tinymce.create('tinymce.plugins.pmGridsPlugin', {
init: function(ed, url)
{
strPluginURL = url; // store the URL for future use..
ed.addCommand('mcepmGrids', function() {
pmGrids();
});
ed.addButton('pmGrids', {
title: 'pmGrids',
label : ' @#',
cmd: 'mcepmGrids',
image: url + '/img/grids.png'
});
},
createControl: function(n, cm) {
return null;
},
getPluginURL: function() {
return strPluginURL;
}
});
tinymce.PluginManager.add('pmGrids', tinymce.plugins.pmGridsPlugin);
})();
/**
* @function pmGrids
* @description The function intializes the plugin and also creates the popup
* window
* @param field_name deprecated
* @param win deprecated
*/
function pmGrids(field_name, win) {
//tinyMCE.activeEditor.anyVariable='path/to/ProcessMaker'
var strPluginPath = tinyMCE.activeEditor.plugins.pmGrids.getPluginURL(); // get the path to the uploader plugin
var strScriptURL = strPluginPath + "/pmGrids.html"; // loading the form
tinyMCE.activeEditor.windowManager.open({ // open the plugin popup
file : strScriptURL,
title : 'ProcessMaker Grid Wizard',
width : '600px',
height : '230px',
resizable : "yes",
scrollbars : "no",
overflow : false,
inline : 1, // This parameter only has an effect if you use the inlinepopups plugin!
close_previous : "no"
}, {
window : win,
input : field_name
});
return false;
}
/**
* @function closePluginPopup
* @description closes the plugin popup
*/
function closePluginPopup(){
tinyMCEPopup.close(); // close popup window
}
/**
* @function updateEditorContent
* @description insert the editor content with a html code string
* @params serializedHTML String html code
*/
function updateEditorContent(serializedHTML){
tinyMCE.activeEditor.execCommand('mceInsertRawHTML', false, serializedHTML);
closePluginPopup();
}

View File

@@ -0,0 +1,79 @@
/**
* Name: editor_plugin_src.js (for pmGrids tinyMCE plugin)
**/
(function(){
var strPluginURL;
tinymce.create('tinymce.plugins.pmGridsPlugin', {
init: function(ed, url)
{
strPluginURL = url; // store the URL for future use..
ed.addCommand('mcepmGrids', function() {
pmGrids();
});
ed.addButton('pmGrids', {
title: 'pmGrids',
label : ' @#',
cmd: 'mcepmGrids',
image: url + '/img/grids.png'
});
},
createControl: function(n, cm) {
return null;
},
getPluginURL: function() {
return strPluginURL;
}
});
tinymce.PluginManager.add('pmGrids', tinymce.plugins.pmGridsPlugin);
})();
/**
* @function pmGrids
* @description The function intializes the plugin and also creates the popup
* window
* @param field_name deprecated
* @param win deprecated
*/
function pmGrids(field_name, win) {
//tinyMCE.activeEditor.anyVariable='path/to/ProcessMaker'
var strPluginPath = tinyMCE.activeEditor.plugins.pmGrids.getPluginURL(); // get the path to the uploader plugin
var strScriptURL = strPluginPath + "/pmGrids.html"; // loading the form
tinyMCE.activeEditor.windowManager.open({ // open the plugin popup
file : strScriptURL,
title : 'ProcessMaker Grid Wizard',
width : '600px',
height : '230px',
resizable : "yes",
scrollbars : "no",
overflow : false,
inline : 1, // This parameter only has an effect if you use the inlinepopups plugin!
close_previous : "no"
}, {
window : win,
input : field_name
});
return false;
}
/**
* @function closePluginPopup
* @description closes the plugin popup
*/
function closePluginPopup(){
tinyMCEPopup.close(); // close popup window
}
/**
* @function updateEditorContent
* @description insert the editor content with a html code string
* @params serializedHTML String html code
*/
function updateEditorContent(serializedHTML){
tinyMCE.activeEditor.execCommand('mceInsertRawHTML', false, serializedHTML);
closePluginPopup();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

View File

@@ -0,0 +1,3 @@
tinyMCE.addI18n('en.ccSimpleUploader', {
desc:"Upload File to Server"
});

View File

@@ -0,0 +1,91 @@
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="/js/jquery/jquery-1.7.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script src="editor_plugin_src.js"></script>
<script src="pmGrids.js"></script>
<link href="css/table.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
position: absolute;
top: 0px;
left: 35%;
margin-left: -70px;
}
.container {
display: table;
}
.row {
display: table-row;
}
.left, .right, .middle, .gridCell {
display: table-cell;
}
</style>
</head>
<body>
<div class="panel current">
<fieldset>
<div class="row">
<div class="left">
Chose a grid&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<div class="middle">
<select id="gridList">
</select>
</div>
</div>
<br>
<div class="row">
<div class="left">
Prefix&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<div class="middle">
<select name="prefixList" id="prefixList">
<option value="@#">@#</option>
<option value="@@">@@</option>
</select>
</div>
</div>
<br>
<div class="row">
<div class="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div class="middle">
<input type="checkbox" id="borderCheckbox"> Border
</div>
</div>
<div class="row">
<div class="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div class="middle">
<input type="checkbox" id="headersCheckbox"> Headers
</div>
</div>
</fieldset>
</div>
<br>
<table id="listContainer" border="1" cellspacing="0" cellpadding="3">
</table>
<br>
<div align="center">
<button id="insert">
Add
</button>
<button id="cancel">
Cancel
</button>
</div>
</body>
</html>

View File

@@ -0,0 +1,145 @@
$(document).ready(function () {
/**
* @function getGridList
* @description The function executes an ajax call using jquery
* in order to retrieve the grid lists for the current process
* in JSON format
* @param void
* @return responseData
*/
var getGridList = function(){
var responseData
var url = tinyMCE.activeEditor.domainURL+"processes/processes_Ajax"; // action url that processes the ajax call
responseData = $.ajax({ // jquery ajax call
url : url,
type: "POST",
data: {action : 'getGridList', PRO_UID: tinyMCE.activeEditor.processID}, // parameters
async: false,
dataType: "json" // json response type
}).responseText;
responseData = eval("(" +responseData+ ")");
return responseData;
}
/**
* @function getGridFieldList
* @description The function obtains a JSON object that represents the field
* list of some grid dynaform, also renders the list in a table
* inside the plugin form
* @param gridUid
* @return void
*/
var getGridFieldList = function(gridUid){
// jquery ajax call
var responseData = $.ajax({
url : tinyMCE.activeEditor.domainURL+"processes/processes_Ajax",
type: "POST",
data: {action : 'getVariableGrid', PRO_UID: tinyMCE.activeEditor.processID, DYN_UID: gridUid},
dataType: "json",
async:false
}).responseText;
responseData = eval("("+responseData+")");
// processing the ajax response text and rendering the field list
// in a table
$('#listContainer').html('');
var divHeader = '<tr>';
var divCell = '<tr>';
$.each(responseData, function(index, element){
divHeader += "<td><input type='checkbox' class='headerField' name='headerField' value='"+element+"'/><input type='text' style='width:80px;' name='dynafield' class='dynaField' value='"+element+"' id='"+element+"'></td>";
divCell += "<td align='center'><input type='hidden' id='field_"+element+"' value='"+element+"'>"+element+"</td>";
});
divHeader += '</tr>';
divCell += '</tr>';
$('#listContainer').append(divHeader+divCell); //append the result
};
/**
* @function generateListValues
* @description This function obtains the grid list and also renders the
* grid list dropdown box.
*
*/
var generateListValues = function(){
var list = getGridList();
var combo = document.getElementById("gridList");
var option = document.createElement('option');
for(i=(combo.length-1); i>=0; i--)
{
var aDelete = combo.options[i];
aDelete.parentNode.removeChild(aDelete);
}
if(list.length>0){
for(i=0; i<list.length; i++)
{
option = document.createElement("OPTION");
option.value = list[i].sXmlForm;
option.text = list[i].sName;
combo.add(option);
}
} else {
option = document.createElement("OPTION");
option.value = 0;
option.text = 'No Grids';
combo.add(option);
}
}
/**
* @function insertFormatedGrid
* @description Based on the checked fields, the function assembles the code
* to be included inside the tinyMCE editor, using some of the
* plugin functions. Then includes the code in the current
* active TinyMCE editor.
*
*/
var insertFormatedGrid = function(){
var gridName = $("#gridList option:selected").text();
var borderSet = "border='1' cellspacing='0'";
if ($("#borderCheckbox").attr("checked")!="checked"){
borderSet = "border='0' cellspacing='0'";
}
var tableCode = "<table "+borderSet+">"
var gridCode = "<!--@>"+gridName+"-->";
var headerCode = "<tr>";
var fieldCode = "<tr>";
$('#listContainer .headerField').each(function(i){
if (this.checked == true) {
headerCode += "<th>"+$('#'+this.value).val()+"</th>";
fieldCode += "<td>"+$('#prefixList').val()+$('#field_'+this.value).val()+"</td>";
}
});
headerCode += "</tr>";
fieldCode += "</tr>";
if ($("#headersCheckbox").attr("checked")!="checked"){
headerCode = '';
}
gridCode += fieldCode+"<!--@<"+gridName+"-->";
tableCode += headerCode+gridCode+"</table>";
updateEditorContent(tableCode);
}
// Whenever the gridList changes a new set of fields is populated.
$('#gridList').change(function(){
getGridFieldList($(this).val());
});
// if the user clicks the insert button the proccessed code is inserted in
// the editor
$('#insert').click(function(){
insertFormatedGrid();
});
// If the user cancel the action the popup closes
$('#cancel').click(function(){
closePluginPopup();
});
generateListValues(); //generate the list values for the dropdown
getGridFieldList($("#gridList").val()); // generate the field list for
// the first element in the dropdown.
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -28,9 +28,11 @@
tinymce.PluginManager.add('pmSimpleUploader', tinymce.plugins.pmSimpleUploaderPlugin);
})();
// this function can get called from the plugin inint (above) or from the callback on advlink/advimg plugins..
// in the latter case, win and type will be set.. In the rist case, we will just update the main editor window
// with the path of the uploaded file
/**
* this function can get called from the plugin inint (above) or from the callback on advlink/advimg plugins..
* in the latter case, win and type will be set.. In the rist case, we will just update the main editor window
* with the path of the uploaded file
*/
function pmSimpleUploader(field_name, url, type, win) {
var strPluginPath = tinyMCE.activeEditor.plugins.pmSimpleUploader.getPluginURL(); // get the path to the uploader plugin
var strUploaderURL = strPluginPath + "/uploader.php"; // generate the path to the uploader script
@@ -57,13 +59,21 @@ function pmSimpleUploader(field_name, url, type, win) {
return false;
}
// This function will get called when the uploader is done uploading the file and ready to update
// calling dialog and close the upload popup
// strReturnURL should be the string with the path to the uploaded file
/**
* This function will get called when the uploader is done uploading the file and ready to update
* calling dialog and close the upload popup
* strReturnURL should be the string with the path to the uploaded file
*/
function closePluginPopup(){
tinyMCEPopup.close(); // close popup window
tinyMCEPopup.close(); // close popup window
}
/**
* This function update the content editor with the content template file
*/
function updateEditorContent(serializedHTML){
tinyMCE.activeEditor.execCommand('mceSetContent', false, serializedHTML);
}

View File

@@ -3,6 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="editor_plugin_src.js"></script>
</head>

View File

@@ -3,7 +3,10 @@
**/
(function(){
// set the base url setting
tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce";
var strPluginURL;
// the plugin init settings
tinymce.create('tinymce.plugins.pmVariablePickerPlugin', {
init: function(ed, url)
{
@@ -29,12 +32,18 @@
})();
// this function can get called from the plugin inint (above) or from the callback on advlink/advimg plugins..
// in the latter case, win and type will be set.. In the rist case, we will just update the main editor window
// with the path of the uploaded file
function pmVariablePicker(field_name, url, type, win) {
// in the latter case, win and type will be set..
/**
* @function pmVariablePicker
* @description Opens the plugin popup, loading the form inside it.
* @param field_name deprecated
* @param type deprecated
* @param win deprecated
*
*/
function pmVariablePicker(field_name, type, win) {
var uloc=String(location);
//alert(uloc);
var new_text = uloc.split('/');
var loc='/'+new_text[3]+'/'+new_text[4]+'/'+new_text[5]+'/controls/varsAjax?displayOption=tinyMCE&sSymbol=@@&&sProcess='+tinyMCE.activeEditor.processID;
var strPluginPath = tinyMCE.activeEditor.plugins.pmVariablePicker.getPluginURL(); // get the path to the uploader plugin
@@ -49,7 +58,6 @@ function pmVariablePicker(field_name, url, type, win) {
}
//tinyMCE.activeEditor.anyVariable='path/to/ProcessMaker'
tinyMCE.activeEditor.windowManager.open({ // open the plugin popup
//file : '/sysworkflow/en/classic/controls/varsAjax?displayOption=tinyMCE&sSymbol=@@',
file : loc,
title : 'Upload Variable',
width : '600px',
@@ -66,17 +74,32 @@ function pmVariablePicker(field_name, url, type, win) {
return false;
}
// This function will get called when the uploader is done uploading the file and ready to update
// calling dialog and close the upload popup
// strReturnURL should be the string with the path to the uploaded file
/**
* @function closePluginPopup
* @description closes the tinyMCE popup window
*/
function closePluginPopup(){
tinyMCEPopup.close(); // close popup window
}
/**
* @function updateEditorContent
* @description insert the editor content with a html code string
* @params serializedHTML String html code
*/
function updateEditorContent(serializedHTML){
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
}
/**
* @function insertFormVar
* @description alternate version of updateEditorContent this function is
* compatible with the variable picker calls, also closes the popup
* window
* @param fieldName String deprecated
* @param serializedHTML String the html code to be added.
*/
function insertFormVar(fieldName,serializedHTML){
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
closePluginPopup();

View File

@@ -3,7 +3,10 @@
**/
(function(){
// set the base url setting
tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce";
var strPluginURL;
// the plugin init settings
tinymce.create('tinymce.plugins.pmVariablePickerPlugin', {
init: function(ed, url)
{
@@ -29,12 +32,18 @@
})();
// this function can get called from the plugin inint (above) or from the callback on advlink/advimg plugins..
// in the latter case, win and type will be set.. In the rist case, we will just update the main editor window
// with the path of the uploaded file
function pmVariablePicker(field_name, url, type, win) {
// in the latter case, win and type will be set..
/**
* @function pmVariablePicker
* @description Opens the plugin popup, loading the form inside it.
* @param field_name deprecated
* @param type deprecated
* @param win deprecated
*
*/
function pmVariablePicker(field_name, type, win) {
var uloc=String(location);
//alert(uloc);
var new_text = uloc.split('/');
var loc='/'+new_text[3]+'/'+new_text[4]+'/'+new_text[5]+'/controls/varsAjax?displayOption=tinyMCE&sSymbol=@@&&sProcess='+tinyMCE.activeEditor.processID;
var strPluginPath = tinyMCE.activeEditor.plugins.pmVariablePicker.getPluginURL(); // get the path to the uploader plugin
@@ -49,7 +58,6 @@ function pmVariablePicker(field_name, url, type, win) {
}
//tinyMCE.activeEditor.anyVariable='path/to/ProcessMaker'
tinyMCE.activeEditor.windowManager.open({ // open the plugin popup
//file : '/sysworkflow/en/classic/controls/varsAjax?displayOption=tinyMCE&sSymbol=@@',
file : loc,
title : 'Upload Variable',
width : '600px',
@@ -66,17 +74,32 @@ function pmVariablePicker(field_name, url, type, win) {
return false;
}
// This function will get called when the uploader is done uploading the file and ready to update
// calling dialog and close the upload popup
// strReturnURL should be the string with the path to the uploaded file
/**
* @function closePluginPopup
* @description closes the tinyMCE popup window
*/
function closePluginPopup(){
tinyMCEPopup.close(); // close popup window
}
/**
* @function updateEditorContent
* @description insert the editor content with a html code string
* @params serializedHTML String html code
*/
function updateEditorContent(serializedHTML){
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
}
/**
* @function insertFormVar
* @description alternate version of updateEditorContent this function is
* compatible with the variable picker calls, also closes the popup
* window
* @param fieldName String deprecated
* @param serializedHTML String the html code to be added.
*/
function insertFormVar(fieldName,serializedHTML){
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
closePluginPopup();

View File

@@ -1,128 +0,0 @@
<head>
<title>Upload an Output Document</title>
<script type="text/javascript" src="../../tiny_mce_popup.js" ></script>
<script type="text/javascript" src="editor_plugin_src.js" ></script>
<base target="_self" />
</head>
<body>
<?php
$Action = isset($_GET["q"]) ? $_GET["q"] : "none";
if($Action =="none"){
displayUploadForm();
}else if($Action=="upload"){
uploadVariablePicker();
}
?>
</body>
</html>
<?php
// displays the upload form
function displayUploadForm()
{/*
echo '<form action="uploader.php?'.$_SERVER["QUERY_STRING"].'&q=upload" method="post" enctype="multipart/form-data" onsubmit="">'
//.'Variable Name: <br/>'
.'<div id="d_variables">'
.'<table width="80%">'
.'<tr>'
.'<td width="33%">'
.'<label for="type_label">Type Variable</label>'
.'</td>'
.'<td width="33%">'
.'<label for="prefix_label">Prefix</label>'
.'</td>'
.'<td width="33%">'
.'<label for="variables_label">Variables</label>'
.'</td>'
.'</tr>'
.'<tr>'
.'<td>'
.'<select name="type_variables">'
.'<option value="all">All Variables</option>'
.'<option value="system">System Variables</option>'
.'<option value="process">Process Variables</option>'
.'</select> &nbsp;&nbsp;&nbsp;&nbsp;'
.'</td>'
.'<td width="33%">'
.'<select name="prefix">'
.'<option value="quotes">@#</option>'
.'<option value="float">@@</option>'
.'<option value="encoding">@?</option>'
.'</select> &nbsp;&nbsp;&nbsp;&nbsp;'
.'</td>'
.'<td width="33%">'
.'<select name="variables">'
.'<option value="quotes">@@SYS_SYS</option>'
.'<option value="float">@@SYS_LANG</option>'
.'<option value="encoding">@@SYS_SKIN</option>'
.'</select>'
.'</td>'
.'</tr>'
.'</table>'
.'</div>'
.'<br>'
.'<div id="desc_variables">'
.'<table border="1" width="100%">'
.'<tr width="40%">'
.'<td>Result</td>'
.'<td>@#SYS_LANG</td>'
.'</tr>'
.'<tr width="60%">'
.'<td>Description</td>'
.'<td>Description @#SYS_LANG</td>'
.'</tr>'
.'</table>'
.'</div>'
.'<br>'
.'<div id="desc_variables">'
.'<label for="desc_prefix">* @# Replace de value in quotes</label>'
.'</div>'
//.'<br/><input type="text" size="20" name="upload_variable" ID="Text1"/>'
// .'<input type="submit" name="Variable" value="Variable" style="width: 100px;" onclick="document.getElementById(\'progress_div\').style.visibility=\'visible\';"/>'
//.' <div id="progress_div" style="visibility: hidden;"><img src="progress.gif" alt="wait..." style="padding-top: 5px;"></div>'
.'</form>';
*/
}
// uploads the file to the destination path, and returns a link with link path substituted for destination path
function uploadVariablePicker()
{
$StatusMessage = "";
$ActualFileName = "";
$FileObject = $_REQUEST["upload_variable"]; // find data on the file
updateEditorContent(trim($FileObject));
closeWindow();
}
function showPopUp($PopupText)
{
echo "<script type=\"text/javascript\" language=\"javascript\">alert (\"$PopupText\");</script>";
}
function updateEditorContent($serializedHTML)
{
echo "<script type=\"text/javascript\" language=\"javascript\">updateEditorContent(\"".$serializedHTML."\");</script>";
}
function closeWindow()
{
echo '
<script language="javascript" type="text/javascript">
closePluginPopup();
</script>
';
}
?>

View File

@@ -10,6 +10,7 @@
#action {
margin-bottom: 3px;
margin-up: 3px;
}
#class {

View File

@@ -10,6 +10,7 @@
#action {
margin-bottom: 3px;
margin-up: 3px;
}
#rowtype,#align,#valign,#class,#height {

View File

@@ -4206,7 +4206,7 @@ tinymce.html.Styles = function(settings, schema) {
// Remove already removed children
fi = nodes.length;
while (fi--) {
// ProcessMaker: conditional statemets created in order to assure the compatibility with maborak
if(name!='toStr'&&name!='concat'&&name!='get_by_key'&&name!='expand'&&name!='setParent'&&name!='isset_key'){
if (!nodes[fi].parent){
nodes.splice(fi, 1);
@@ -4216,6 +4216,7 @@ tinymce.html.Styles = function(settings, schema) {
for (i = 0, l = list.length; i < l; i++){
// ProcessMaker: conditional statemets created in order to assure the compatibility with maborak
if(name!='toStr'&&name!='concat'&&name!='get_by_key'&&name!='expand'&&name!='setParent'&&name!='isset_key'){
list[i](nodes, name, args);
}
@@ -4233,6 +4234,7 @@ tinymce.html.Styles = function(settings, schema) {
// Remove already removed children
fi = nodes.length;
while (fi--) {
// ProcessMaker: conditional statemets created in order to assure the compatibility with maborak
if(list.name!='toStr'&&list.name!='concat'&&list.name!='get_by_key'&&list.name!='expand'&&list.name!='setParent'&&list.name!='isset_key'){
// if (!nodes[fi].parent){
nodes.splice(fi, 1);
@@ -4241,6 +4243,7 @@ tinymce.html.Styles = function(settings, schema) {
}
for (fi = 0, fl = list.callbacks.length; fi < fl; fi++){
// ProcessMaker: conditional statemets created in order to assure the compatibility with maborak
if(list.name!='toStr'&&list.name!='concat'&&list.name!='get_by_key'&&list.name!='expand'&&list.name!='setParent'&&list.name!='isset_key'){
list.callbacks[fi](nodes, list.name, args);
}

View File

@@ -24,7 +24,7 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//XmlForm_Field_DVEditor
/**
* XmlForm_Field_HTML class definition
* It is useful to see dynaforms how are built
@@ -35,9 +35,9 @@
* @copyright (C) 2012 by Colosa Development Team.
*
*/
class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
{
//public $toolbarSet = '';
public $width = '100%';
public $height = '300';
public $defaultValue = '<br/>';
@@ -47,8 +47,6 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
* render function returns the HTML definition for the Dynaform Field
*
* @author
*
*
* @access public
* @param string $value
* @param string $owner
@@ -67,8 +65,6 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
* the Dynaform Field configuration, attributes, and additional stuff.
*
* @author
*
*
* @access public
* @param string $element
* @return string
@@ -76,12 +72,12 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
*/
public function attachEvents ($element)
{
$editorDefinition = 'tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce"; ';
$editorDefinition = 'tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce"; ';
$editorDefinition .= 'var domainURL = "/sys'.SYS_SYS.'/'.SYS_LANG.'/'.SYS_SKIN.'/"';
switch ($this->editorType){
case 'EMAIL_TEMPLATE':
$editorDefinition .= '
$editorDefinition.= '
// is necessary the process uid variable in order to load the picker correctly
var formProcessID = document.getElementById("form[pro_uid]").value;
tinyMCE.init({
@@ -94,40 +90,45 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
theme_advanced_buttons1 : "pmSimpleUploader,|,pmVariablePicker,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,cut,copy,paste,|,bullist,numlist,|,outdent,indent,blockquote",
theme_advanced_buttons2 : "tablecontrols,|,undo,redo,|,link,unlink,image,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,sub,sup,|,ltr,rtl,|,code",
popup_css : "/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css",
oninit: function (){
tinyMCE.activeEditor.processID =formProcessID;
tinyMCE.activeEditor.processID = formProcessID;
tinyMCE.activeEditor.domainURL = domainURL;
},
onchange_callback: function(inst) {
if(inst.isDirty()) {
inst.save();
}
return true;
},
if(inst.isDirty()) {
inst.save();
}
return true;
},
handle_event_callback : function(e) {
if(this.isDirty()) {
this.save();
}
return true;
}
if(this.isDirty()) {
this.save();
}
return true;
}
});
';
break;
case 'OUTPUT_DOCUMENT':
$editorDefinition .= '
$editorDefinition.= '
// is necessary the process uid variable in order to load the picker correctly
var formProcessID = document.getElementById("form[PRO_UID]").value;
tinyMCE.init({
theme : "advanced",
plugins : "advhr,advimage,advlink,advlist,autolink,autoresize,autosave,contextmenu,directionality,emotions,example,example_dependency,fullpage,fullscreen,iespell,inlinepopups,insertdatetime,layer,legacyoutput,lists,media,nonbreaking,noneditable,pagebreak,paste,preview,print,save,searchreplace,spellchecker,style,tabfocus,table,template,visualblocks,visualchars,wordcount,xhtmlxtras,pmSimpleUploader,pmVariablePicker",
plugins : "advhr,advimage,advlink,advlist,autolink,autoresize,autosave,contextmenu,directionality,emotions,example,example_dependency,fullpage,fullscreen,iespell,inlinepopups,insertdatetime,layer,legacyoutput,lists,media,nonbreaking,noneditable,pagebreak,paste,preview,print,save,searchreplace,spellchecker,style,tabfocus,table,template,visualblocks,visualchars,wordcount,xhtmlxtras,pmSimpleUploader,pmVariablePicker,pmGrids",
mode : "specific_textareas",
editor_selector : "tmceEditor",
width : "770",
height : "305",
theme_advanced_buttons1 : "pmSimpleUploader,|,pmVariablePicker,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,cut,copy,paste,|,bullist,numlist,|,outdent,indent,blockquote",
verify_html : false,
theme_advanced_buttons1 : "pmSimpleUploader,|,pmVariablePicker,|,pmGrids,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,cut,copy,paste,|,bullist,numlist,|,outdent,indent,blockquote",
theme_advanced_buttons2 : "tablecontrols,|,undo,redo,|,link,unlink,image,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,sub,sup,|,ltr,rtl,|,code",
oninit: function (){
tinyMCE.activeEditor.processID=formProcessID;
popup_css : "/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css",
oninit: function () {
tinyMCE.activeEditor.processID = formProcessID;
tinyMCE.activeEditor.domainURL = domainURL;
},
onchange_callback: function(inst) {
if(inst.isDirty()) {
@@ -140,7 +141,7 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
break;
case 'DYNAFORM_TEMPLATE':
$editorDefinition .= '
$editorDefinition.= '
tinyMCE.init({
theme : "advanced",
plugins : "advhr,advimage,advlink,advlist,autolink,autoresize,autosave,contextmenu,directionality,emotions,example,example_dependency,fullpage,fullscreen,iespell,inlinepopups,insertdatetime,layer,legacyoutput,lists,media,nonbreaking,noneditable,pagebreak,paste,preview,print,save,searchreplace,spellchecker,style,tabfocus,table,template,visualblocks,visualchars,wordcount,xhtmlxtras",
@@ -152,7 +153,7 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
height : "300",
theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,cut,copy,paste,|,bullist,numlist",
theme_advanced_buttons2 : "outdent,indent,blockquote,|,undo,redo,|,link,unlink,image,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,sub,sup,|,ltr,rtl,|,code",
popup_css : "/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css",
skin : "o2k7",
skin_variant : "silver",
@@ -176,7 +177,7 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
';
break;
default:
$editorDefinition .= '
$editorDefinition.= '
tinyMCE.init({
theme : "advanced",
plugins : "fullpage",
@@ -185,11 +186,12 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
width : "'. $this->width. '",
height : "'. $this->height. '",
theme_advanced_buttons3_add : "fullpage",
popup_css : "/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css",
handle_event_callback : function(e) {
if(this.isDirty()) {
this.save();
}
return true;
if(this.isDirty()) {
this.save();
}
return true;
}
});
';

View File

@@ -25,7 +25,7 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
* @package workflow.engine.classes
*/
**/
class XmlForm_Field_TextPM extends XmlForm_Field_SimpleText
{
@@ -432,6 +432,7 @@ function getGridsVars ($sProcessUID)
{
$aFields = array ();
$aFieldsNames = array ();
require_once 'classes/model/Dynaform.php';
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( DynaformPeer::DYN_FILENAME );
@@ -445,8 +446,7 @@ function getGridsVars ($sProcessUID)
foreach ($G_FORM->fields as $k => $v) {
if ($v->type == 'grid') {
if (! in_array( $k, $aFieldsNames )) {
$aFields[] = array ('sName' => $k,'sXmlForm' => str_replace( $sProcessUID . '/', '', $v->xmlGrid )
);
$aFields[] = array ('sName' => $k,'sXmlForm' => str_replace( $sProcessUID . '/', '', $v->xmlGrid ));
$aFieldsNames[] = $k;
}
}
@@ -456,6 +456,44 @@ function getGridsVars ($sProcessUID)
}
return $aFields;
}
/**
* Function getVarsGrid returns all variables of Grid
*
* @access public
* @param string proUid process ID
* @param string dynUid dynaform ID
* @return array
*/
function getVarsGrid ($proUid, $dynUid)
{
G::LoadClass( 'dynaformhandler' );
G::LoadClass( 'AppSolr' );
$dynaformFields = array ();
if (is_file( PATH_DATA . '/sites/'. SYS_SYS .'/xmlForms/'. $proUid .'/'.$dynUid. '.xml' ) && filesize( PATH_DATA . '/sites/'. SYS_SYS .'/xmlForms/'. $proUid .'/'. $dynUid .'.xml' ) > 0) {
$dyn = new dynaFormHandler( PATH_DATA . '/sites/'. SYS_SYS .'/xmlForms/' .$proUid. '/' . $dynUid .'.xml' );
$dynaformFields[] = $dyn->getFields();
}
$dynaformFieldTypes = array ();
foreach ($dynaformFields as $aDynFormFields) {
foreach ($aDynFormFields as $field) {
if ($field->getAttribute( 'validate' ) == 'Int') {
$dynaformFieldTypes[$field->nodeName] = 'Int';
} elseif ($field->getAttribute( 'validate' ) == 'Real') {
$dynaformFieldTypes[$field->nodeName] = 'Real';
} else {
$dynaformFieldTypes[$field->nodeName] = $field->getAttribute( 'type' );
}
}
}
return $dynaformFieldTypes;
}
/**
* Class XmlForm_Field_CheckBoxTable

View File

@@ -8,6 +8,16 @@ var setVariablePickerJS = function(){
}
});
/**
* Function getVariableList returns a list with all process variables
*
* @access public
* @param string proUid process ID
* @param string queryText text searched
* @param string varType type of variables (System or Process)
* @return array
*/
var getVariableList = function (queryText, proUid, varType){
varType = varType.toLowerCase();
var responseData
@@ -25,6 +35,13 @@ var setVariablePickerJS = function(){
return responseData;
}
/**
* Function getPrefix returns selected prefix
*
* @access public
* @param string prefix
* @return string
*/
var getPrefix = function (prefix) {
if(document.getElementById('prefix').value=='ID_TO_STRING')
prefix='@@';
@@ -41,6 +58,14 @@ var setVariablePickerJS = function(){
return prefix;
}
/**
* Function getPrefixInfo returns a prefix description
*
* @access public
* @param string prefix
* @return string
*/
var getPrefixInfo = function (prefix){
var oRPC = new leimnud.module.rpc.xmlhttp({
url : "../processes/processes_Ajax",
@@ -82,6 +107,14 @@ var setVariablePickerJS = function(){
}
});
/**
* Function generateListValues fills the dropdown with all variables according to filters
*
* @access public
* @param string prefix
* @return array
*/
function generateListValues (prefix){
var list = getVariableList(document.getElementById('search').value, document.getElementById('process').value, document.getElementById('type_variables').value);
var combo = document.getElementById("_Var_Form_");
@@ -109,9 +142,13 @@ var setVariablePickerJS = function(){
}
}
}
// check wether the document has been already loaded or not,
// whatever the state is this condition ensures that the events are always loaded
if (document.readyState == 'complete'){
// if completed load the functions and events
setVariablePickerJS();
} else {
// if not set the function call in the body onload event
document.body.onload = setVariablePickerJS;
}

View File

@@ -161,8 +161,11 @@ var EventCompose = function(t){
oPanel.make();
oPanel.loader.show();
var oRPC = new leimnud.module.rpc.xmlhttp({
// url : '../events/eventsAjax',
// args: 'request=showDynavars',
// previous calls for the old component
// url : '../events/eventsAjax',
// args: 'request=showDynavars',
// the control for assign dynavars is the same as
// the other sections inside processmaker
url : '../controls/varsAjax',
args: 'sSymbol=@@&displayOption=event'
});

View File

@@ -51,8 +51,6 @@ $html .= '<label for="variables_label">Search</label>';
$html .= '</td>';
$html .= '</tr>';
//$html = '<form action="uploader.php?'.$_SERVER["QUERY_STRING"].'&q=upload" method="post" enctype="multipart/form-data" onsubmit="">';
$html .= '<tr>';
$html .= '<td width="25%">';
$html .= '<select name="type_variables" id="type_variables">';
@@ -63,7 +61,6 @@ $html .= '</select> &nbsp;&nbsp;&nbsp;&nbsp;';
$html .= '</td>';
$html .= '<td width="25%">';
//$html .= '<select name="prefix" id="prefix" onChange="Seleccionar(this);">';
$html .= '<select name="prefix" id="prefix">';
$html .= '<option value="ID_TO_STRING">@@</option>';
@@ -72,14 +69,7 @@ $html .= '<option value="ID_TO_INTEGER">@%</option>';
$html .= '<option value="ID_TO_URL">@?</option>';
$html .= '<option value="ID_SQL_ESCAPE">@$</option>';
$html .= '<option value="ID_REPLACE_WITHOUT_CHANGES">@=</option>';
/*
$html .= '<option value="@@">@@</option>';
$html .= '<option value="@#">@#</option>';
$html .= '<option value="@%">@%</option>';
$html .= '<option value="@?">@?</option>';
$html .= '<option value="@$">@$</option>';
$html .= '<option value="@=">@=</option>';
*/
$html .= '</select> &nbsp;&nbsp;&nbsp;&nbsp;';
$html .= '</td>';
@@ -90,14 +80,12 @@ $html .= '</tr>';
$html .= '<tr>';
$html .= '<tr><td><label for="prefix_label">Variables</label></td></tr>';
$html .= '<tr>';
//onChange="Seleccionar(this);
$html .= '<td colspan="3">';
G::LoadClass( 'xmlfield_InputPM' );
$aFields = getDynaformsVars( $_REQUEST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
//$html .= '<select name="_Var_Form_" id="_Var_Form_" size="' . count( $aFields ) . '" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">';
$displayOption = '';
if (isset($_REQUEST['displayOption'])){
$displayOption = 'displayOption="'.$_REQUEST['displayOption'].'"';
@@ -143,7 +131,7 @@ $html .= '</div>';
$html .= '</form>';
$display = 'raw';
$display = 'raw';
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
@@ -159,66 +147,3 @@ if (isset($_REQUEST['displayOption'])) {
echo $html;
G::RenderPage( 'publish', $display );
/*
$alll = '<script type="text/javascript" language="javascript">';
$alll .= 'function Seleccionar(combo){';
$alll .= 'alert(combo.value);';
$alll .= '}';
$alll .= '</script>';
echo $alll;
*/
//echo var_dump($aFields);
/*
$sHTML = '<select name="_Var_Form_" id="_Var_Form_" size="' . count( $aFields ) . '" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">';
foreach ($aFields as $aField) {
$html .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';
}
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
);
foreach ($aFields as $aField) {
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
);
}
$html .= '</select>';
$html .= '</td>';
$html .= '</tr>';
$html .= '</table>';
$html .= '</div>';
$html .= '<br>';
$html .= '<div id="desc_variables">';
$html .= '<table border="1" width="90%" align="center">';
$html .= '<tr width="40%">';
$html .= '<td>Result</td>';
$html .= '<td>@#SYS_LANG</td>';
$html .= '</tr>';
$html .= '<tr width="60%">';
$html .= '<td>Description</td>';
$html .= '<td>Description @#SYS_LANG</td>';
$html .= '</tr>';
$html .= '</table>';
$html .= '</div>';
$html .= '<br>';
$html .= '<div id="desc_variables">';
$html .= '<table width="90%" align="center">';
$html .= '<tr><td>';
$html .= '<label for="desc_prefix">' . G::LoadTranslation( 'ID_TO_FLOAT' ) . '</label>';
$html .= '</td></tr>';
$html .= '</div>';
$html .= '</form>';
echo $html;
G::RenderPage( 'publish', 'raw' );
/*$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
G::RenderPage( 'publish', 'raw' );
*/

View File

@@ -1,71 +0,0 @@
<?php
/**
* groups.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
$access = $RBAC->userCanAccess( 'PM_USERS' );
if ($access != 1) {
switch ($access) {
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
default:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
}
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'GROUPS';
$G_PUBLISH = new Publisher();
G::LoadClass( 'configuration' );
$c = new Configurations();
$configPage = $c->getConfiguration( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$configEnv = $c->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
//$oHeadPublisher->addExtJsScript( 'groups/groupsList', false ); //adding a javascript file .js
//$oHeadPublisher->clearScripts();
$oHeadPublisher->addScriptFile( '/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js' );
//$oHeadPublisher->addScriptFile( '/js/jquery/jquery-1.8.2.min.js' );
//$oHeadPublisher->addScriptFile( '/js/jquery/jquery-1.7.1.min.js' );
//$oHeadPublisher->addScriptFile( '/js/tinymce/pmScripts/editorEmailTemplate.js' );
$G_PUBLISH->addContent( 'view', 'outputdocs/testOut' ); //adding a html file .html.
G::RenderPage( 'publish', 'blank' );

View File

@@ -522,6 +522,9 @@ try {
case 'events':
$oProcessMap->eventsList( $oData->pro_uid, $oData->type );
break;
/**
* returns an array with all Dynaforms Fields
*/
case 'getVariableList':
G::LoadClass('xmlfield_InputPM');
$proUid= isset( $_REQUEST['process'] )?$_REQUEST['process']:'';
@@ -548,10 +551,48 @@ try {
}
echo Bootstrap::json_encode( $aVariables );
break;
/**
* returns the prefix mean
*
*/
case 'getVariablePrefix':
$_REQUEST['prefix'] = $_REQUEST['prefix']!=null?$_REQUEST['prefix']:'ID_TO_STRING';
echo G::LoadTranslation($_REQUEST['prefix']);
break;
/**
* return an array with all Variables of Grid type
*/
case 'getGridList':
G::LoadClass('xmlfield_InputPM');
$proUid= isset( $_REQUEST['PRO_UID'] )?$_REQUEST['PRO_UID']:'';
$aFields = getGridsVars( $proUid );
$aVariables = array();
foreach ($aFields as $key => $value){
$aVariables[] = $aFields[$key];
}
echo Bootstrap::json_encode( $aVariables );
break;
/**
* return an array with all Grid Variables according to Grid
*/
case 'getVariableGrid':
G::LoadClass('xmlfield_InputPM');
$proUid= isset( $_REQUEST['PRO_UID'] )?$_REQUEST['PRO_UID']:'';
$dynUid= isset( $_REQUEST['DYN_UID'] )?$_REQUEST['DYN_UID']:'';
$aFields = getVarsGrid($proUid, $dynUid);
$aVariables = array();
foreach ($aFields as $key => $value) {
$aVariables[] = $key;
}
echo Bootstrap::json_encode( $aVariables );
break;
/*
case 'saveFile':
global $G_PUBLISH;

View File

@@ -1,94 +0,0 @@
<?php
echo '
<script>
document.body.onload = function(){
// delete Array.prototype.isArray;
// delete Array.prototype.isObject;
// delete Array.prototype.onlyInt;
// delete Object.prototype.propertyIsEnumerable;
// delete Array.prototype.toStr;
// delete Object.prototype.toStr;
// delete Object.prototype.concat;
// delete Object.prototype.get_by_key;
// delete Object.prototype.expand;
// delete Object.prototype.setParent;
// delete Object.prototype.isset_key;
// delete Function.prototype.extend;
tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce";
tinyMCE.init({
theme : "advanced",
plugins : "fullpage",
mode : "specific_textareas",
editor_selector : "tmceEditor",
width : "640",
height : "200",
theme_advanced_buttons3_add : "fullpage"
});
// alert($("#fcontent").val());
/*
tinyMCE.init({
theme : "advanced",
mode : "specific_textareas",
editor_selector : "tmceEditor",
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,visualblocks",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
content_css : "css/content.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
// Style formats
style_formats : [
{title : \'Bold text\', inline : \'b\'},
{title : \'Red text\', inline : \'span\', styles : {color : \'#ff0000\'}},
{title : \'Red header\', block : \'h1\', styles : {color : \'#ff0000\'}},
{title : \'Example 1\', inline : \'span\', classes : \'example1\'},
{title : \'Example 2\', inline : \'span\', classes : \'example2\'},
{title : \'Table styles\'},
{title : \'Table row 1\', selector : \'tr\', classes : \'tablerow1\'}
],
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
*/
//alert(\'loaded\');
}
</script>
';
?>
<textarea name="form[fcontent]" id="form[fcontent]" class="tmceEditor"><p>news<table><tr><td>cell 1</td></tr><tr><td>cell 2</td></tr></table></p></textarea>
<!--<textarea name="new" id="new" class="tmceEditor">another one</textarea>-->
<?php

View File

@@ -85,8 +85,7 @@ function editFile(pro_uid, fileName){
position : {x:50,y:50,center:true},
title : '',
control : {close:true,resize:false},
fx : {modal:true},
fx : {shadow:true,modal:true}
fx : {shadow:true,modal:true}
};
oPanel.make();