Version 2.3.6
This commit is contained in:
1 parent
a3bb603c96
commit
19b38c7c74
764 files changed
+143731
-118164
No files matched your search
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
<html>␍<head><title>Invision Power Board - Bulletin Board System</title></head>␍<body>␍<h1>403: Invision Power Board -> Forbidden</h1>␍<hr>␍You have reached this Page in error, please use␍your back button to return to Invision Board.␍<hr>␍<a href="http://anonym.to/http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>
|
||||
+246
@@ -0,0 +1,246 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Custom BBCode</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
|
||||
var editor_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['editorid'], 0, 30 ) ) ).'";'; ?>
|
||||
var bbcode_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['id'], 0, 30 ) ) ).'";'; ?>
|
||||
var this_module = 'bbcodeloader';
|
||||
var this_height = 400;
|
||||
var allow_advanced = null;
|
||||
var current_selection = null;
|
||||
var bbcode = parent.ips_bbcode_items[ bbcode_id ];
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function Init()
|
||||
{
|
||||
var allow_advanced = parent.IPS_editor[ editor_id ].allow_advanced;
|
||||
var current_selection = parent.ipsclass.un_htmlspecialchars( parent.IPS_editor[ editor_id ].get_selection() );
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up main close button
|
||||
//-----------------------------------------
|
||||
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).onclick = do_cancel;
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).style.cursor = 'pointer';
|
||||
|
||||
//-----------------------------------------
|
||||
// Resize window
|
||||
//-----------------------------------------
|
||||
|
||||
parent.document.getElementById( editor_id + '_htmlblock_' + this_module + '_menu' ).style.height = this_height + 'px';
|
||||
parent.document.getElementById( editor_id + '_iframeblock_' + this_module + '_menu' ).style.height = ( this_height - 10 ) + 'px';
|
||||
|
||||
//-----------------------------------------
|
||||
// Module specific stuff
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById("f_content_text").focus();
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up initial text value
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById("f_content_text").value = current_selection;
|
||||
|
||||
//-----------------------------------------
|
||||
// Add in data
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById("_title").innerHTML += ' ' + bbcode['title'];
|
||||
document.getElementById("_example").innerHTML += ' ' + bbcode['example'];
|
||||
document.getElementById("_option").innerHTML += ' ' + bbcode['text_option'];
|
||||
document.getElementById("_content").innerHTML += ' ' + bbcode['text_content'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Using option?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( parseInt( bbcode['use_option'] ) == 1 )
|
||||
{
|
||||
document.getElementById( 'use-option' ).style.display = '';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up initial text value
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById("f_content_text").value = parent.IPS_editor[ editor_id ].strip_empty_html( current_selection );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do cancel
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_cancel()
|
||||
{
|
||||
parent.IPS_editor[ editor_id ].module_remove_control_bar();
|
||||
return false;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do submit (low tech)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_submit()
|
||||
{
|
||||
var fields = [ "f_option_text", "f_content_text" ];
|
||||
|
||||
var param = new Object();
|
||||
|
||||
//-----------------------------------------
|
||||
// Compile data
|
||||
//-----------------------------------------
|
||||
|
||||
for ( var i in fields )
|
||||
{
|
||||
param[ fields[i] ] = document.getElementById( fields[i] ).value;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up required fields
|
||||
//-----------------------------------------
|
||||
|
||||
var required = {
|
||||
"f_option_text" : "You must enter option text",
|
||||
"f_content_text": "You must enter content text"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
{
|
||||
var el = document.getElementById(i);
|
||||
|
||||
if ( i == 'f_option_text' )
|
||||
{
|
||||
if ( parseInt( bbcode['use_option'] ) != 1 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! el.value )
|
||||
{
|
||||
alert( required[i] );
|
||||
el.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Now prep the table
|
||||
//-----------------------------------------
|
||||
|
||||
var _html = '';
|
||||
var _content = document.getElementById( 'f_content_text' ).value;
|
||||
var _option = document.getElementById( 'f_option_text' ).value;
|
||||
|
||||
if ( parseInt( bbcode['use_option'] ) == 1 )
|
||||
{
|
||||
if ( parseInt( bbcode['switch_option'] ) == 1 )
|
||||
{
|
||||
_html = '[' + bbcode['tag'] + '="' + _content + '"]' + _option + '[/' + bbcode['tag'] + ']';
|
||||
}
|
||||
else
|
||||
{
|
||||
_html = '[' + bbcode['tag'] + '="' + _option + '"]' + _content + '[/' + bbcode['tag'] + ']';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_html = '[' + bbcode['tag'] + ']' + _content + '[/' + bbcode['tag'] + ']';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Is this RTE?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
_html = _html.replace( /(\n|\r|<br>|<br \/>)/g, "<br />" );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Return..
|
||||
//-----------------------------------------
|
||||
|
||||
parent.IPS_editor[ editor_id].editor_check_focus();
|
||||
|
||||
parent.IPS_editor[ editor_id ].insert_text( _html );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill Window
|
||||
//-----------------------------------------
|
||||
|
||||
do_cancel();
|
||||
|
||||
return false;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<style type='text/css' media="all">
|
||||
@import url(rte_popup.css);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title" id="_title">Insert</div>
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend><strong>Example</strong></legend>
|
||||
<div id="_example" style='font-family:"Courier New", Monaco, Courier;font-size:12px'></div>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<form action="" method="get">
|
||||
|
||||
<div id='use-option' style='display:none'>
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend><strong>Option Text</strong></legend>
|
||||
<div id='_option' style='padding:2px;color:#555;'></div>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="text" id="f_option_text" style='width:100%;height:70px' cols='23' rows='4'></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend><strong>Content Text</strong></legend>
|
||||
<div id='_content' style='padding:2px;color:#555;'></div>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="href" id="f_content_text" style='width:100%;height:60px' cols='23' onfocus='this.select()' rows='4'></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<div style="text-align: center;">
|
||||
<hr />
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">OK</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Cancel</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,264 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Div/Span</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
|
||||
var editor_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['editorid'], 0, 30 ) ) ).'";'; ?>
|
||||
var this_module = 'div';
|
||||
var this_height = 400;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function Init()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Set up main close button
|
||||
//-----------------------------------------
|
||||
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).onclick = do_cancel;
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).style.cursor = 'pointer';
|
||||
|
||||
//-----------------------------------------
|
||||
// Resize window
|
||||
//-----------------------------------------
|
||||
|
||||
parent.document.getElementById( editor_id + '_htmlblock_' + this_module + '_menu' ).style.height = this_height + 'px';
|
||||
parent.document.getElementById( editor_id + '_iframeblock_' + this_module + '_menu' ).style.height = ( this_height - 10 ) + 'px';
|
||||
|
||||
//-----------------------------------------
|
||||
// Module specific stuff
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById("f_type").focus();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do cancel
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_cancel()
|
||||
{
|
||||
parent.IPS_editor[ editor_id ].module_remove_control_bar();
|
||||
return false;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do submit (low tech)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_submit()
|
||||
{
|
||||
var fields = [ "f_type" , "f_fontfamily" , "f_fontsize", "f_color" , "f_backgroundimage", "f_backgroundrepeat",
|
||||
"f_backgroundcolor", "f_border" , "f_padding", "f_margin" , "f_other" ];
|
||||
|
||||
var param = new Object();
|
||||
|
||||
//-----------------------------------------
|
||||
// Compile data
|
||||
//-----------------------------------------
|
||||
|
||||
for ( var i in fields )
|
||||
{
|
||||
param[ fields[i] ] = document.getElementById( fields[i] ).value;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Now prep the table
|
||||
//-----------------------------------------
|
||||
|
||||
var doc = parent.IPS_editor[ editor_id ].editor_document;
|
||||
|
||||
//-------------------------------
|
||||
// Build remap array
|
||||
//-------------------------------
|
||||
|
||||
var remap_elements = {
|
||||
"f_fontfamily" : "font-family" ,
|
||||
"f_fontsize" : "font-size" ,
|
||||
"f_color" : "color" ,
|
||||
"f_backgroundimage" : "background-image" ,
|
||||
"f_backgroundrepeat" : "background-repeat",
|
||||
"f_backgroundcolor" : "background-color" ,
|
||||
"f_border" : "border" ,
|
||||
"f_padding" : "padding" ,
|
||||
"f_margin" : "margin"
|
||||
};
|
||||
|
||||
//-------------------------------
|
||||
// Get tag type
|
||||
//-------------------------------
|
||||
|
||||
var tagtype = param["f_type"];
|
||||
var style = "";
|
||||
|
||||
//-------------------------------
|
||||
// Start building style
|
||||
//-------------------------------
|
||||
|
||||
style += "style='";
|
||||
|
||||
for (var field in param)
|
||||
{
|
||||
var value = param[field];
|
||||
|
||||
if ( ! value || value == 'undefined' || field == 'undefined' || ! remap_elements[ field ] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( remap_elements[ field ] && value )
|
||||
{
|
||||
style += remap_elements[ field ] + ":" + value + ";";
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Finish style
|
||||
//-------------------------------
|
||||
|
||||
style += param["f_other"]+"'";
|
||||
|
||||
//-----------------------------------------
|
||||
// Return..
|
||||
//-----------------------------------------
|
||||
|
||||
parent.IPS_editor[ editor_id].editor_check_focus();
|
||||
|
||||
if ( style )
|
||||
{
|
||||
parent.IPS_editor[ editor_id ].wrap_tags_lite( '<' + tagtype + ' ' + style + '>', '</' + tagtype + '>' );
|
||||
}
|
||||
else
|
||||
{
|
||||
parent.IPS_editor[ editor_id ].wrap_tags_lite( '<' + tagtype + '>', '</' + tagtype + '>' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill Window
|
||||
//-----------------------------------------
|
||||
|
||||
do_cancel();
|
||||
|
||||
return false;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<style type='text/css' media="all">
|
||||
@import url(rte_popup.css);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert DIV/SPAN</div>
|
||||
|
||||
<form action="" method="get">
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="1%" nowrap="nowrap">Type:</td>
|
||||
<td width="99%"><select size="1" name="type" id="f_type" title="Div or Span?">
|
||||
<option value="div" selected="1" >DIV</option>
|
||||
<option value="span" >SPAN</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Font</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Family:</td>
|
||||
<td><input type="text" name="fontfamily" id="f_fontfamily" size="20" value="Verdana" title="Enter name of font-family" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Size:</td>
|
||||
<td><input type="text" name="fontsize" id="f_fontsize" size="7" value="10px" title="Enter size and unit" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Color:</td>
|
||||
<td><input type="text" name="color" id="f_color" size="7" value="#000" title="Enter color" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Background</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Image:</td>
|
||||
<td><input type="text" name="backgroundimage" id="f_backgroundimage" size="15" value="" title="Leave blank for no image" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Repeat:</td>
|
||||
<td><input type="text" name="backgroundrepeat" id="f_backgroundrepeat" size="15" value="" title="Leave blank for no repeat" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Color:</td>
|
||||
<td><input type="text" name="backgroundcolor" id="f_backgroundcolor" size="7" value="" title="Leave blank for no color" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Box Model</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Border:</td>
|
||||
<td><input type="text" name="border" id="f_border" size="20" value="" title="Enter border values" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Padding:</td>
|
||||
<td><input type="text" name="padding" id="f_padding" size="20" value="4px" title="Enter size and unit" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Margin:</td>
|
||||
<td><input type="text" name="margin" id="f_margin" size="20" value="" title="Enter size and unit" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Custom Elements</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="other" id="f_other" style='width:100%;height:70px' cols='23' rows='4'></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<div style="text-align: center;">
|
||||
<hr />
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">OK</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Cancel</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,208 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Div/Span</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
|
||||
var editor_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['editorid'], 0, 30 ) ) ).'";'; ?>
|
||||
var this_module = 'email';
|
||||
var this_height = 300;
|
||||
var allow_advanced = null;
|
||||
var current_selection = null;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function Init()
|
||||
{
|
||||
var allow_advanced = parent.IPS_editor[ editor_id ].allow_advanced;
|
||||
var current_selection = parent.IPS_editor[ editor_id ].get_selection();
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up main close button
|
||||
//-----------------------------------------
|
||||
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).onclick = do_cancel;
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).style.cursor = 'pointer';
|
||||
|
||||
//-----------------------------------------
|
||||
// Resize window
|
||||
//-----------------------------------------
|
||||
|
||||
parent.document.getElementById( editor_id + '_htmlblock_' + this_module + '_menu' ).style.height = this_height + 'px';
|
||||
parent.document.getElementById( editor_id + '_iframeblock_' + this_module + '_menu' ).style.height = ( this_height - 10 ) + 'px';
|
||||
|
||||
//-----------------------------------------
|
||||
// Module specific stuff
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById("f_email").focus();
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up initial text value
|
||||
//-----------------------------------------
|
||||
|
||||
var link_regex = '';
|
||||
var link_text = '';
|
||||
var link_href = '';
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].use_bbcode && ! parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
link_regex = new RegExp( "\[email=([^\]]+?)\]([^\[]+?)\[/email\]", "i" );
|
||||
}
|
||||
else
|
||||
{
|
||||
link_regex = new RegExp( "<a href=['\"]mailto\:([^\"']+?)['\"]([^>]+?)?>(.+?)</a>", "i" );
|
||||
}
|
||||
|
||||
if ( current_selection.match( link_regex ) )
|
||||
{
|
||||
link_href = current_selection.replace( link_regex, "$1" );
|
||||
link_text = current_selection.replace( link_regex, "$3" );
|
||||
}
|
||||
|
||||
if ( link_text )
|
||||
{
|
||||
current_selection = link_text;
|
||||
}
|
||||
|
||||
if ( link_href )
|
||||
{
|
||||
document.getElementById("f_email").value = link_href;
|
||||
}
|
||||
|
||||
document.getElementById("f_text").value = parent.IPS_editor[ editor_id ].strip_empty_html( current_selection );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do cancel
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_cancel()
|
||||
{
|
||||
parent.IPS_editor[ editor_id ].module_remove_control_bar();
|
||||
return false;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do submit (low tech)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_submit()
|
||||
{
|
||||
var fields = [ "f_email", "f_text" ];
|
||||
|
||||
var param = new Object();
|
||||
|
||||
//-----------------------------------------
|
||||
// Compile data
|
||||
//-----------------------------------------
|
||||
|
||||
for ( var i in fields )
|
||||
{
|
||||
param[ fields[i] ] = document.getElementById( fields[i] ).value;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up required fields
|
||||
//-----------------------------------------
|
||||
|
||||
var required = {
|
||||
"f_email": "You must enter an email address",
|
||||
"f_text": "You must enter some text for the email body"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
{
|
||||
var el = document.getElementById(i);
|
||||
|
||||
if ( ! el.value )
|
||||
{
|
||||
alert(required[i]);
|
||||
el.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var link_html = '';
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].use_bbcode && ! parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
link_html = '[email=' + param['f_email'] + ']' + param['f_text'] + '[/email]';
|
||||
}
|
||||
else
|
||||
{
|
||||
link_html = '<a href="mailto:' + param['f_email'] + '">' + param['f_text'] + '</a>';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Return..
|
||||
//-----------------------------------------
|
||||
|
||||
parent.IPS_editor[ editor_id].editor_check_focus();
|
||||
|
||||
parent.IPS_editor[ editor_id ].insert_text( link_html );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill Window
|
||||
//-----------------------------------------
|
||||
|
||||
do_cancel();
|
||||
|
||||
return false;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<style type='text/css' media="all">
|
||||
@import url(rte_popup.css);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert Email</div>
|
||||
|
||||
<form action="" method="get">
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Email Address</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="email" id="f_email" style='width:100%;height:60px' cols='23' onfocus='this.select()' rows='4'>user@domain.com</textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Email Text</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="text" id="f_text" style='width:100%;height:70px' cols='23' rows='4'></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<div style="text-align: center;">
|
||||
<hr />
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">OK</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Cancel</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,231 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Div/Span</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
|
||||
var editor_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['editorid'], 0, 30 ) ) ).'";'; ?>
|
||||
var this_module = 'image';
|
||||
var this_height = 400;
|
||||
var allow_advanced = null;
|
||||
var current_selection = null;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function Init()
|
||||
{
|
||||
var allow_advanced = parent.IPS_editor[ editor_id ].allow_advanced;
|
||||
var current_selection = parent.IPS_editor[ editor_id ].get_selection();
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up main close button
|
||||
//-----------------------------------------
|
||||
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).onclick = do_cancel;
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).style.cursor = 'pointer';
|
||||
|
||||
//-----------------------------------------
|
||||
// Resize window
|
||||
//-----------------------------------------
|
||||
|
||||
parent.document.getElementById( editor_id + '_htmlblock_' + this_module + '_menu' ).style.height = this_height + 'px';
|
||||
parent.document.getElementById( editor_id + '_iframeblock_' + this_module + '_menu' ).style.height = ( this_height - 10 ) + 'px';
|
||||
|
||||
//-----------------------------------------
|
||||
// Module specific stuff
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById("f_src").focus();
|
||||
|
||||
//-----------------------------------------
|
||||
// Show advanced options?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( allow_advanced )
|
||||
{
|
||||
document.getElementById("advanced-options").style.display = '';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up initial text value
|
||||
//-----------------------------------------
|
||||
|
||||
var link_regex = '';
|
||||
var link_src = '';
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].use_bbcode && ! parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
link_regex = new RegExp( "\[img\]([^\[]+?)\[/img\]", "i" );
|
||||
}
|
||||
else
|
||||
{
|
||||
link_regex = new RegExp( "<img src=['\"]([^\"']+?)['\"]([^>]+?)?/>", "i" );
|
||||
}
|
||||
|
||||
if ( current_selection.match( link_regex ) )
|
||||
{
|
||||
link_src = current_selection.replace( link_regex, "$1" );
|
||||
}
|
||||
|
||||
if ( link_src )
|
||||
{
|
||||
current_selection = link_src;
|
||||
}
|
||||
|
||||
document.getElementById("f_src").value = parent.IPS_editor[ editor_id ].strip_empty_html( current_selection );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do cancel
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_cancel()
|
||||
{
|
||||
parent.IPS_editor[ editor_id ].module_remove_control_bar();
|
||||
return false;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do submit (low tech)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_submit()
|
||||
{
|
||||
var fields = [ "f_src", "f_ad_title", "f_ad_alt" ];
|
||||
|
||||
var param = new Object();
|
||||
|
||||
//-----------------------------------------
|
||||
// Compile data
|
||||
//-----------------------------------------
|
||||
|
||||
for ( var i in fields )
|
||||
{
|
||||
param[ fields[i] ] = document.getElementById( fields[i] ).value;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up required fields
|
||||
//-----------------------------------------
|
||||
|
||||
var required = {
|
||||
"f_src": "You must enter an image location"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
{
|
||||
var el = document.getElementById(i);
|
||||
|
||||
if ( ! el.value )
|
||||
{
|
||||
alert(required[i]);
|
||||
el.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Now prep the table
|
||||
//-----------------------------------------
|
||||
|
||||
var link_title = allow_advanced && param['f_ad_title'] != '' ? ' title="' + param['f_ad_title'] + '"' : '';
|
||||
var link_alt = allow_advanced && param['f_ad_alt'] != '' ? ' alt="' + param['f_ad_alt'] + '"' : '';
|
||||
var link_border = allow_advanced && param['f_ad_border'] != '' ? ' border="' + param['f_ad_border'] + '"' : '';
|
||||
var link_html = '';
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].use_bbcode && ! parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
link_html = '[img]' + param['f_src'] + '[/img]';
|
||||
}
|
||||
else
|
||||
{
|
||||
link_html = '<img src="' + param['f_src'] + '"' + link_title + link_alt + link_border + ' />';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Return..
|
||||
//-----------------------------------------
|
||||
|
||||
parent.IPS_editor[ editor_id].editor_check_focus();
|
||||
|
||||
parent.IPS_editor[ editor_id ].insert_text( link_html );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill Window
|
||||
//-----------------------------------------
|
||||
|
||||
do_cancel();
|
||||
|
||||
return false;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<style type='text/css' media="all">
|
||||
@import url(rte_popup.css);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert Image</div>
|
||||
|
||||
<form action="" method="get">
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Image Location</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="src" id="f_src" style='width:100%;height:60px' cols='23' onfocus='this.select()' rows='4'>http://</textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<div id='advanced-options' style='display:none'>
|
||||
<br />
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Advanced Options</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Border:</td>
|
||||
<td><input type="text" name="border" id="f_ad_border" size="4" value="0" title="Image Border" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title:</td>
|
||||
<td><input type="text" name="title" id="f_ad_title" size="20" value="" title="Image Title" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Alt Text:</td>
|
||||
<td><input type="text" name="fontsize" id="f_ad_alt" size="20" value="" title="Image ALT" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="text-align: center;">
|
||||
<hr />
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">OK</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Cancel</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,260 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Div/Span</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
|
||||
var editor_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['editorid'], 0, 30 ) ) ).'";'; ?>
|
||||
var this_module = 'link';
|
||||
var this_height = 400;
|
||||
var allow_advanced = null;
|
||||
var current_selection = null;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function Init()
|
||||
{
|
||||
var allow_advanced = parent.IPS_editor[ editor_id ].allow_advanced;
|
||||
var current_selection = parent.ipsclass.un_htmlspecialchars( parent.IPS_editor[ editor_id ].get_selection() );
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up main close button
|
||||
//-----------------------------------------
|
||||
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).onclick = do_cancel;
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).style.cursor = 'pointer';
|
||||
|
||||
//-----------------------------------------
|
||||
// Resize window
|
||||
//-----------------------------------------
|
||||
|
||||
parent.document.getElementById( editor_id + '_htmlblock_' + this_module + '_menu' ).style.height = this_height + 'px';
|
||||
parent.document.getElementById( editor_id + '_iframeblock_' + this_module + '_menu' ).style.height = ( this_height - 10 ) + 'px';
|
||||
|
||||
//-----------------------------------------
|
||||
// Module specific stuff
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById("f_href").focus();
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up initial text value
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById("f_text").value = current_selection;
|
||||
|
||||
//-----------------------------------------
|
||||
// Show advanced options?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( allow_advanced )
|
||||
{
|
||||
document.getElementById("advanced-options").style.display = '';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up initial text value
|
||||
//-----------------------------------------
|
||||
|
||||
var link_regex = '';
|
||||
var link_text = '';
|
||||
var link_href = '';
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].use_bbcode && ! parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
link_regex = /\[url=([^\]]+?)\]([^\[]+?)\[\/url\]/ig;
|
||||
|
||||
if ( current_selection.match( link_regex ) )
|
||||
{
|
||||
link_href = current_selection.replace( link_regex, "$1" );
|
||||
link_text = current_selection.replace( link_regex, "$2" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
link_regex = /<a href=['"]([^"']+?)['"]([^>]+?)?>(.+?)<\/a>/ig;
|
||||
|
||||
if ( current_selection.match( link_regex ) )
|
||||
{
|
||||
link_href = current_selection.replace( link_regex, "$1" );
|
||||
link_text = current_selection.replace( link_regex, "$3" );
|
||||
}
|
||||
}
|
||||
|
||||
if ( link_text )
|
||||
{
|
||||
current_selection = link_text;
|
||||
}
|
||||
|
||||
if ( link_href )
|
||||
{
|
||||
document.getElementById("f_href").value = link_href;
|
||||
}
|
||||
|
||||
current_selection = current_selection.replace( /<br \/>|<br>|\n|\r/g, "");
|
||||
|
||||
document.getElementById("f_text").value = parent.IPS_editor[ editor_id ].strip_empty_html( current_selection );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do cancel
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_cancel()
|
||||
{
|
||||
parent.IPS_editor[ editor_id ].module_remove_control_bar();
|
||||
return false;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do submit (low tech)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_submit()
|
||||
{
|
||||
var fields = [ "f_href", "f_text", "f_ad_title", "f_ad_target" ];
|
||||
|
||||
var param = new Object();
|
||||
|
||||
//-----------------------------------------
|
||||
// Compile data
|
||||
//-----------------------------------------
|
||||
|
||||
for ( var i in fields )
|
||||
{
|
||||
param[ fields[i] ] = document.getElementById( fields[i] ).value;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up required fields
|
||||
//-----------------------------------------
|
||||
|
||||
var required = {
|
||||
"f_href": "You must enter a link location",
|
||||
"f_text": "You must enter some text for the link body"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
{
|
||||
var el = document.getElementById(i);
|
||||
|
||||
if ( ! el.value )
|
||||
{
|
||||
alert(required[i]);
|
||||
el.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Now prep the table
|
||||
//-----------------------------------------
|
||||
|
||||
var link_title = allow_advanced && param['f_ad_title'] ? ' title="' + param['f_ad_title'] + '" ' : '';
|
||||
var link_target = allow_advanced && param['f_ad_target'] ? ' target="' + param['f_ad_target'] + '"' : '';
|
||||
var link_html = '';
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].use_bbcode && ! parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
link_html = '[url=' + param['f_href'] + ']' + param['f_text'] + '[/url]';
|
||||
}
|
||||
else
|
||||
{
|
||||
link_html = '<a href="' + param['f_href'] + '"' + link_title + link_target + '>' + param['f_text'] + '</a>';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Return..
|
||||
//-----------------------------------------
|
||||
|
||||
parent.IPS_editor[ editor_id].editor_check_focus();
|
||||
|
||||
parent.IPS_editor[ editor_id ].insert_text( link_html );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill Window
|
||||
//-----------------------------------------
|
||||
|
||||
do_cancel();
|
||||
|
||||
return false;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<style type='text/css' media="all">
|
||||
@import url(rte_popup.css);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert Link</div>
|
||||
|
||||
<form action="" method="get">
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Link Location</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="href" id="f_href" style='width:100%;height:60px' cols='23' onfocus='this.select()' rows='4'>http://</textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Link Text</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="text" id="f_text" style='width:100%;height:70px' cols='23' rows='4'></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<div id='advanced-options' style='display:none'>
|
||||
<br />
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Advanced Options</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Title:</td>
|
||||
<td><input type="text" name="title" id="f_ad_title" size="20" value="" title="Link Title" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Target:</td>
|
||||
<td><input type="text" name="fontsize" id="f_ad_target" size="20" value="" title="Link Target" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="text-align: center;">
|
||||
<hr />
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">OK</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Cancel</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,299 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Expires" CONTENT="Mon, 06 May 1996 04:57:00 GMT">
|
||||
<title>Insert Table</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
|
||||
var editor_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['editorid'], 0, 30 ) ) ).'";'; ?>
|
||||
var this_module = 'table';
|
||||
var this_height = 350;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function Init()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Set up main close button
|
||||
//-----------------------------------------
|
||||
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).onclick = do_cancel;
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).style.cursor = 'pointer';
|
||||
|
||||
//-----------------------------------------
|
||||
// Resize window
|
||||
//-----------------------------------------
|
||||
|
||||
parent.document.getElementById( editor_id + '_htmlblock_' + this_module + '_menu' ).style.height = this_height + 'px';
|
||||
parent.document.getElementById( editor_id + '_iframeblock_' + this_module + '_menu' ).style.height = ( this_height - 10 ) + 'px';
|
||||
|
||||
//-----------------------------------------
|
||||
// Module specific stuff
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById("f_rows").focus();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do cancel
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_cancel()
|
||||
{
|
||||
parent.IPS_editor[ editor_id ].module_remove_control_bar();
|
||||
return false;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do submit (low tech)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_submit()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Fail safe
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! editor_id )
|
||||
{
|
||||
alert("Could not locate the editor ID");
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up required fields
|
||||
//-----------------------------------------
|
||||
|
||||
var required = {
|
||||
"f_rows": "You must enter a number of rows",
|
||||
"f_cols": "You must enter a number of columns"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
{
|
||||
var el = document.getElementById(i);
|
||||
|
||||
if ( ! el.value )
|
||||
{
|
||||
alert(required[i]);
|
||||
el.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var fields = ["f_rows" , "f_cols" , "f_width" , "f_unit",
|
||||
"f_align", "f_border", "f_spacing", "f_padding"];
|
||||
|
||||
var param = new Object();
|
||||
|
||||
//-----------------------------------------
|
||||
// Compile data
|
||||
//-----------------------------------------
|
||||
|
||||
for ( var i in fields )
|
||||
{
|
||||
param[ fields[i] ] = document.getElementById( fields[i] ).value;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Now prep the table
|
||||
//-----------------------------------------
|
||||
|
||||
var doc = parent.IPS_editor[ editor_id ].editor_document;
|
||||
|
||||
//-----------------------------------------
|
||||
// create the table element inside a wrapper
|
||||
// div that we can use innerHTML on
|
||||
//-----------------------------------------
|
||||
|
||||
var wrap_div = document.createElement("DIV");
|
||||
var table = document.createElement("table");
|
||||
|
||||
wrap_div.appendChild( table );
|
||||
|
||||
//-----------------------------------------
|
||||
// assign the given arguments
|
||||
//-----------------------------------------
|
||||
|
||||
for (var field in param)
|
||||
{
|
||||
var value = param[field];
|
||||
|
||||
if ( ! value )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (field)
|
||||
{
|
||||
case "f_width" : table.style.width = value + param["f_unit"]; break;
|
||||
case "f_align" : table.align = value; break;
|
||||
case "f_border" : table.border = parseInt(value); break;
|
||||
case "f_spacing" : table.cellspacing = parseInt(value); break;
|
||||
case "f_padding" : table.cellpadding = parseInt(value); break;
|
||||
}
|
||||
}
|
||||
|
||||
var tbody = document.createElement("tbody");
|
||||
|
||||
table.appendChild(tbody);
|
||||
|
||||
for (var i = 0; i < param["f_rows"]; ++i)
|
||||
{
|
||||
var tr = document.createElement("tr");
|
||||
|
||||
tbody.appendChild(tr);
|
||||
|
||||
for (var j = 0; j < param["f_cols"]; ++j)
|
||||
{
|
||||
var td = document.createElement("td");
|
||||
|
||||
tr.appendChild(td);
|
||||
|
||||
//-------------------------------
|
||||
// Mozilla likes to see something
|
||||
// inside the cell.
|
||||
//-------------------------------
|
||||
|
||||
( ! parent.IPS_editor[ editor_id ].is_ie )
|
||||
{
|
||||
td.appendChild( document.createElement("br") );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Clean up
|
||||
//-----------------------------------------
|
||||
|
||||
wrap_div.innerHTML = parent.IPS_editor[ editor_id ].clean_html( wrap_div.innerHTML );
|
||||
|
||||
//-----------------------------------------
|
||||
// Return..
|
||||
//-----------------------------------------
|
||||
|
||||
parent.IPS_editor[ editor_id].editor_check_focus();
|
||||
|
||||
parent.IPS_editor[ editor_id ].insert_text( wrap_div.innerHTML );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill node
|
||||
//-----------------------------------------
|
||||
|
||||
//doc.removeChild( wrap_div );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill Window
|
||||
//-----------------------------------------
|
||||
|
||||
do_cancel();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<style type='text/css' media="all">
|
||||
@import url(rte_popup.css);
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert Table</div>
|
||||
|
||||
<form action="" method="get">
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Basics</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Rows:</td>
|
||||
<td><input type="text" name="rows" id="f_rows" size="5" title="Number of rows" value="2" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cols:</td>
|
||||
<td><input type="text" name="cols" id="f_cols" size="5" title="Number of columns" value="4" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Width:</td>
|
||||
<td><input type="text" name="width" id="f_width" size="5" title="Width of the table" value="100" />
|
||||
<select size="1" name="unit" id="f_unit" title="Width unit">
|
||||
<option value="%" selected="1" >Percent</option>
|
||||
<option value="px" >Pixels</option>
|
||||
<option value="em" >Em</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Layout</legend>
|
||||
<table border="0" width='100%' >
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Alignment:</td>
|
||||
<td>
|
||||
<select size="1" name="align" id="f_align"
|
||||
title="Positioning of this image">
|
||||
<option value="" selected="1" >Not set</option>
|
||||
<option value="left" >Left</option>
|
||||
<option value="right" >Right</option>
|
||||
<option value="texttop" >Texttop</option>
|
||||
<option value="absmiddle" >Absmiddle</option>
|
||||
<option value="baseline" >Baseline</option>
|
||||
<option value="absbottom" >Absbottom</option>
|
||||
<option value="bottom" >Bottom</option>
|
||||
<option value="middle" >Middle</option>
|
||||
<option value="top" >Top</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Spacing</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Cell Spacing:</td>
|
||||
<td><input type="text" name="cols" id="f_spacing" size="5" title="Cell Spacing" value="0" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cell Padding:</td>
|
||||
<td><input type="text" name="cols" id="f_padding" size="5" title="Cell Padding" value="0" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Border thickness:</td>
|
||||
<td><input type="text" name="border" id="f_border" size="5" value="1" title="Leave empty for no border" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<hr />
|
||||
<div align='center'>
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">OK</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Cancel</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,143 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS Cross-Browser Global Text Editor HTML
|
||||
//------------------------------------------------------------------------------
|
||||
// Supports all "v5" browsers (inc. Opera, Safari, etc)
|
||||
// Used for non RTE applications.
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* Rich Text Editor HTML Functions
|
||||
*/
|
||||
function rte_html_functions()
|
||||
{
|
||||
/**
|
||||
* Main control bar object
|
||||
* @var object Main control bar object
|
||||
*/
|
||||
this.control_obj = false;
|
||||
/**
|
||||
* Editor ID
|
||||
*/
|
||||
this.editor_id = false;
|
||||
/**
|
||||
* Current open bar object
|
||||
*/
|
||||
this.current_bar_object = null;
|
||||
|
||||
/**
|
||||
* Main init function
|
||||
* Nothing much to do
|
||||
*/
|
||||
this.init = function()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show new control bar
|
||||
*
|
||||
* @param type Type of control bar (must be same as function key)
|
||||
*/
|
||||
this.show_control_bar = function( type )
|
||||
{
|
||||
if ( ! this.control_obj )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Already open? Kill it
|
||||
//-----------------------------------------
|
||||
|
||||
if ( this.current_bar_object )
|
||||
{
|
||||
this.remove_control_bar();
|
||||
}
|
||||
|
||||
var mainbar = document.getElementById( 'rte-main-bar');
|
||||
var addtobar = document.getElementById( 'rte-hidden-items' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Spawn new DIV object
|
||||
//-----------------------------------------
|
||||
|
||||
var newdiv = document.createElement('div');
|
||||
|
||||
newdiv.id = this.editor_id + '_htmlblock_' + type + '_menu';
|
||||
newdiv.style.display = '';
|
||||
newdiv.className = 'rte-buttonbar';
|
||||
newdiv.style.zIndex = parseInt( this.control_obj.style.zIndex ) + 1;
|
||||
newdiv.style.position = 'absolute';
|
||||
newdiv.style.width = '220px';
|
||||
newdiv.style.height = '400px';
|
||||
newdiv.style.top = ipsclass.get_obj_toppos( mainbar ) + 'px';
|
||||
newdiv.style.left = ipsclass.get_obj_leftpos( mainbar ) - ( parseInt(newdiv.style.width) + 10 ) + 'px';
|
||||
|
||||
var tmpheight = parseInt(newdiv.style.height) - 15;
|
||||
newdiv.innerHTML = this.wrap_html_panel( "<iframe id='"+ this.editor_id + '_iframeblock_' + type + '_menu' + "' src='"+global_rte_includes_url + "insert_" + type + ".php?editorid="+this.editor_id+"' style='background-color:transparent;border:0px;overflow:auto;width:99%;height:" + tmpheight + "px'></iframe>" );
|
||||
|
||||
//-----------------------------------------
|
||||
// Add and show
|
||||
//-----------------------------------------
|
||||
|
||||
addtobar.appendChild(newdiv);
|
||||
|
||||
ipsclass.set_unselectable( newdiv );
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT Drag
|
||||
//-----------------------------------------
|
||||
|
||||
var phdl = document.getElementById('rte-pallete-handle');
|
||||
|
||||
Drag.init( phdl, newdiv );
|
||||
|
||||
this.current_bar_object = newdiv;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove control bar
|
||||
* Removes the control bar.
|
||||
*/
|
||||
this.remove_control_bar = function()
|
||||
{
|
||||
if ( ! this.current_bar_object )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var addtobar = document.getElementById( 'rte-hidden-items' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill old bar
|
||||
//-----------------------------------------
|
||||
|
||||
addtobar.removeChild( this.current_bar_object );
|
||||
|
||||
//-----------------------------------------
|
||||
// Reset bar object
|
||||
//-----------------------------------------
|
||||
|
||||
this.current_bar_object = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap HTML block with basic control panel stuff
|
||||
*/
|
||||
this.wrap_html_panel = function( html )
|
||||
{
|
||||
var newhtml = "";
|
||||
newhtml += " <div id='rte-pallete-wrap'>";
|
||||
newhtml += " <div id='rte-pallete-main'>";
|
||||
newhtml += " <div class='rte-cb-bg' id='rte-pallete-handle'>";
|
||||
newhtml += " <div align='left'><img id='rte-cb-close-window' src='"+global_rte_images_url+"rte-cb-close.gif' alt='' class='ipd' border='0' /></div>";
|
||||
newhtml += " </div>";
|
||||
newhtml += " <div>" + html + "</div>";
|
||||
newhtml += " </div>";
|
||||
newhtml += " </div>";
|
||||
|
||||
return newhtml;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
html, body
|
||||
{
|
||||
color: #000;
|
||||
font: 10px Verdana,sans-serif;
|
||||
background-color: transparent;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
body
|
||||
{
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
table
|
||||
{
|
||||
font: 10px Verdana,sans-serif;
|
||||
}
|
||||
|
||||
.tblbutton
|
||||
{
|
||||
border:1px solid #999;
|
||||
background-color: #CCC;
|
||||
font-family:Verdana, Arial;
|
||||
font-size:10px;
|
||||
font-weight:bold;
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
form p
|
||||
{
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.fl
|
||||
{
|
||||
width: 9em; float: left; padding: 2px 5px; text-align: right;
|
||||
}
|
||||
|
||||
.fr
|
||||
{
|
||||
width: 7em; float: left; padding: 2px 5px; text-align: right;
|
||||
}
|
||||
|
||||
.frlarge
|
||||
{
|
||||
width: 10em; float: left; padding: 2px 5px; text-align: right;
|
||||
}
|
||||
|
||||
fieldset
|
||||
{
|
||||
padding: 0px 10px 5px 5px;
|
||||
}
|
||||
|
||||
select, input, button
|
||||
{
|
||||
font: 10px Verdana,sans-serif;
|
||||
}
|
||||
|
||||
button
|
||||
{
|
||||
width: 70px;
|
||||
}
|
||||
.space
|
||||
{
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.title
|
||||
{
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
font-size: 120%;
|
||||
padding: 3px 10px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px solid black;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
form
|
||||
{
|
||||
padding: 0px; margin: 0px;
|
||||
}
|
||||
Reference in new issue
Block a user