Initial Commit Update Telerik
470
LPWeb20/RichtextEditor/aspnet/SpellCheck.aspx
Normal file
@@ -0,0 +1,470 @@
|
||||
<%@ Page Language="C#" ClassName="PopUpSpell" AutoEventWireup="true" %>
|
||||
|
||||
<%@ Import Namespace="System.IO" %>
|
||||
<%@ Import Namespace="NetSpell.SpellChecker" %>
|
||||
<%@ Import Namespace="NetSpell.SpellChecker.Dictionary" %>
|
||||
|
||||
<script runat="server">
|
||||
|
||||
NetSpell.SpellChecker.Spelling SpellChecker;
|
||||
NetSpell.SpellChecker.Dictionary.WordDictionary WordDictionary;
|
||||
|
||||
string culture = "en-US";
|
||||
|
||||
void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// add client side events
|
||||
this.Suggestions.Attributes.Add("onchange", "changeWord(this);");
|
||||
|
||||
this.SpellingBody.Attributes.Add("onload", "doinit('" + Guid.NewGuid().ToString() + "');");
|
||||
|
||||
Replaced.Value = "";
|
||||
|
||||
// load spell checker settings
|
||||
this.LoadValues();
|
||||
switch (this.SpellMode.Value)
|
||||
{
|
||||
case "start":
|
||||
this.EnableButtons();
|
||||
this.SpellChecker.SpellCheck();
|
||||
break;
|
||||
|
||||
case "suggest":
|
||||
this.EnableButtons();
|
||||
break;
|
||||
|
||||
case "load":
|
||||
case "end":
|
||||
default:
|
||||
this.DisableButtons();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Page_Init(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (Request.Params["Culture"] != null)
|
||||
{
|
||||
culture = Request.Params["Culture"];
|
||||
}
|
||||
|
||||
// get dictionary from cache
|
||||
this.WordDictionary = (WordDictionary)HttpContext.Current.Cache["WordDictionary-" + culture];
|
||||
if (this.WordDictionary == null)
|
||||
{
|
||||
// if not in cache, create new
|
||||
this.WordDictionary = new NetSpell.SpellChecker.Dictionary.WordDictionary();
|
||||
this.WordDictionary.EnableUserFile = false;
|
||||
|
||||
//getting folder for dictionaries
|
||||
string folderName = "";
|
||||
|
||||
if (ConfigurationSettings.AppSettings["DictionaryFolder"] == null)
|
||||
folderName = this.MapPath("~/bin");
|
||||
else
|
||||
{
|
||||
folderName = ConfigurationSettings.AppSettings["DictionaryFolder"];
|
||||
folderName = this.MapPath(Path.Combine(Request.ApplicationPath, folderName));
|
||||
}
|
||||
|
||||
this.WordDictionary.DictionaryFolder = folderName;
|
||||
|
||||
// check if a dictionary exists for the culture, if so load it
|
||||
string cultureDictionary = String.Concat(culture, ".dic");
|
||||
if (File.Exists(folderName + "\\" + cultureDictionary))
|
||||
{
|
||||
this.WordDictionary.DictionaryFile = cultureDictionary;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.WordDictionary.DictionaryFile = "en-US.dic";
|
||||
}
|
||||
|
||||
//load and initialize the dictionary
|
||||
this.WordDictionary.Initialize();
|
||||
|
||||
// Store the Dictionary in cache
|
||||
HttpContext.Current.Cache.Insert("WordDictionary-" + culture, this.WordDictionary, new CacheDependency(Path.Combine(folderName, this.WordDictionary.DictionaryFile)));
|
||||
}
|
||||
|
||||
// create spell checker
|
||||
this.SpellChecker = new NetSpell.SpellChecker.Spelling();
|
||||
this.SpellChecker.ShowDialog = false;
|
||||
this.SpellChecker.Dictionary = this.WordDictionary;
|
||||
|
||||
// adding events
|
||||
this.SpellChecker.MisspelledWord += new NetSpell.SpellChecker.Spelling.MisspelledWordEventHandler(this.SpellChecker_MisspelledWord);
|
||||
this.SpellChecker.EndOfText += new NetSpell.SpellChecker.Spelling.EndOfTextEventHandler(this.SpellChecker_EndOfText);
|
||||
this.SpellChecker.DoubledWord += new NetSpell.SpellChecker.Spelling.DoubledWordEventHandler(this.SpellChecker_DoubledWord);
|
||||
}
|
||||
|
||||
void SpellChecker_DoubledWord(object sender, NetSpell.SpellChecker.SpellingEventArgs e)
|
||||
{
|
||||
this.SaveValues();
|
||||
this.CurrentWord.Text = this.SpellChecker.CurrentWord;
|
||||
this.Suggestions.Items.Clear();
|
||||
this.ReplacementWord.Text = string.Empty;
|
||||
this.SpellMode.Value = "suggest";
|
||||
this.StatusText.Text = string.Format("Word: {0} of {1}", this.SpellChecker.WordIndex + 1, this.SpellChecker.WordCount);
|
||||
}
|
||||
|
||||
void SpellChecker_EndOfText(object sender, System.EventArgs e)
|
||||
{
|
||||
this.SaveValues();
|
||||
this.SpellMode.Value = "end";
|
||||
this.DisableButtons();
|
||||
this.StatusText.Text = string.Format("Word: {0} of {1}", this.SpellChecker.WordIndex + 1, this.SpellChecker.WordCount);
|
||||
}
|
||||
|
||||
bool IsUnderscores(string word)
|
||||
{
|
||||
foreach (char c in word)
|
||||
{
|
||||
if (c != '_')
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool IsValidWord(string word)
|
||||
{
|
||||
if (IsUnderscores(word))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void SpellChecker_MisspelledWord(object sender, NetSpell.SpellChecker.SpellingEventArgs e)
|
||||
{
|
||||
if (IsValidWord(this.SpellChecker.CurrentWord))
|
||||
{
|
||||
this.SpellChecker.IgnoreWord();
|
||||
this.SpellChecker.SpellCheck();
|
||||
return;
|
||||
}
|
||||
|
||||
this.SaveValues();
|
||||
this.CurrentWord.Text = this.SpellChecker.CurrentWord;
|
||||
this.SpellChecker.Suggest();
|
||||
this.Suggestions.DataSource = this.SpellChecker.Suggestions;
|
||||
this.Suggestions.DataBind();
|
||||
string ua = HttpContext.Current.Request.UserAgent;
|
||||
if (ua == null) ua = "";
|
||||
else ua = ua.ToLower();
|
||||
bool _isSafari3 = false;
|
||||
if (ua.IndexOf("safari") != -1)
|
||||
{
|
||||
string minorversion = ua.Substring(ua.IndexOf("safari/") + 7, 3);
|
||||
if (Convert.ToInt32(minorversion) >= 522)
|
||||
_isSafari3 = true;
|
||||
}
|
||||
if (!_isSafari3)
|
||||
this.ReplacementWord.Text = string.Empty;
|
||||
this.SpellMode.Value = "suggest";
|
||||
this.StatusText.Text = string.Format("Word: {0} of {1}", this.SpellChecker.WordIndex + 1, this.SpellChecker.WordCount);
|
||||
}
|
||||
|
||||
void EnableButtons()
|
||||
{
|
||||
this.IgnoreButton.Enabled = true;
|
||||
this.IgnoreAllButton.Enabled = true;
|
||||
this.AddButton.Enabled = true;
|
||||
this.ReplaceButton.Enabled = true;
|
||||
this.ReplaceAllButton.Enabled = true;
|
||||
this.ReplacementWord.Enabled = true;
|
||||
this.Suggestions.Enabled = true;
|
||||
}
|
||||
|
||||
void DisableButtons()
|
||||
{
|
||||
this.IgnoreButton.Enabled = false;
|
||||
this.IgnoreAllButton.Enabled = false;
|
||||
this.AddButton.Enabled = false;
|
||||
this.ReplaceButton.Enabled = false;
|
||||
this.ReplaceAllButton.Enabled = false;
|
||||
this.ReplacementWord.Enabled = false;
|
||||
this.Suggestions.Enabled = false;
|
||||
}
|
||||
|
||||
void SaveValues()
|
||||
{
|
||||
this.CurrentText.Value = Server.HtmlEncode(this.SpellChecker.Text);
|
||||
this.WordIndex.Value = this.SpellChecker.WordIndex.ToString();
|
||||
|
||||
// save ignore words
|
||||
string[] ignore = (string[])this.SpellChecker.IgnoreList.ToArray(typeof(string));
|
||||
|
||||
this.IgnoreList.Value = String.Join("|", ignore);
|
||||
|
||||
// save replace words
|
||||
ArrayList tempArray = new ArrayList(this.SpellChecker.ReplaceList.Keys);
|
||||
string[] replaceKey = (string[])tempArray.ToArray(typeof(string));
|
||||
|
||||
this.ReplaceKeyList.Value = String.Join("|", replaceKey);
|
||||
tempArray = new ArrayList(this.SpellChecker.ReplaceList.Values);
|
||||
|
||||
string[] replaceValue = (string[])tempArray.ToArray(typeof(string));
|
||||
|
||||
this.ReplaceValueList.Value = String.Join("|", replaceValue);
|
||||
|
||||
// saving user words
|
||||
tempArray = new ArrayList(this.SpellChecker.Dictionary.UserWords.Keys);
|
||||
|
||||
string[] userWords = (string[])tempArray.ToArray(typeof(string));
|
||||
|
||||
Response.Cookies["UserWords"].Value = String.Join("|", userWords); ;
|
||||
Response.Cookies["UserWords"].Path = "/";
|
||||
Response.Cookies["UserWords"].Expires = DateTime.Now.AddMonths(1);
|
||||
}
|
||||
|
||||
void LoadValues()
|
||||
{
|
||||
if (this.CurrentText.Value.Length > 0)
|
||||
{
|
||||
this.SpellChecker.Text = Server.HtmlDecode(this.CurrentText.Value);
|
||||
}
|
||||
|
||||
if (this.WordIndex.Value.Length > 0)
|
||||
this.SpellChecker.WordIndex = int.Parse(this.WordIndex.Value);
|
||||
|
||||
// restore ignore list
|
||||
if (this.IgnoreList.Value.Length > 0)
|
||||
{
|
||||
this.SpellChecker.IgnoreList.Clear();
|
||||
this.SpellChecker.IgnoreList.AddRange(this.IgnoreList.Value.Split('|'));
|
||||
}
|
||||
|
||||
// restore replace list
|
||||
if (this.ReplaceKeyList.Value.Length > 0 && this.ReplaceValueList.Value.Length > 0)
|
||||
{
|
||||
string[] replaceKeys = this.ReplaceKeyList.Value.Split('|');
|
||||
string[] replaceValues = this.ReplaceValueList.Value.Split('|');
|
||||
|
||||
this.SpellChecker.ReplaceList.Clear();
|
||||
if (replaceKeys.Length == replaceValues.Length)
|
||||
{
|
||||
for (int i = 0; i < replaceKeys.Length; i++)
|
||||
{
|
||||
if (replaceKeys[i].Length > 0)
|
||||
this.SpellChecker.ReplaceList.Add(replaceKeys[i], replaceValues[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// restore user words
|
||||
this.SpellChecker.Dictionary.UserWords.Clear();
|
||||
if (Request.Cookies["UserWords"] != null)
|
||||
{
|
||||
string[] userWords = Request.Cookies["UserWords"].Value.Split('|');
|
||||
|
||||
for (int i = 0; i < userWords.Length; i++)
|
||||
{
|
||||
if (userWords[i].Length > 0)
|
||||
this.SpellChecker.Dictionary.UserWords.Add(userWords[i], userWords[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IgnoreButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.SpellChecker.IgnoreWord();
|
||||
this.SpellChecker.SpellCheck();
|
||||
}
|
||||
|
||||
void IgnoreAllButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.SpellChecker.IgnoreAllWord();
|
||||
this.SpellChecker.SpellCheck();
|
||||
}
|
||||
|
||||
void AddButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.SpellChecker.Dictionary.Add(this.SpellChecker.CurrentWord);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
this.SpellChecker.SpellCheck();
|
||||
}
|
||||
|
||||
void ReplaceButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rpl = this.ReplacementWord.Text;
|
||||
this.SpellChecker.ReplaceWord(rpl);
|
||||
this.CurrentText.Value = Server.HtmlDecode(this.SpellChecker.Text);
|
||||
this.SpellChecker.SpellCheck();
|
||||
if (this.CurrentWord.Text == rpl)
|
||||
{
|
||||
SpellChecker.IgnoreWord();
|
||||
this.SpellChecker.SpellCheck();
|
||||
}
|
||||
Replaced.Value = "ONCE";
|
||||
}
|
||||
|
||||
void ReplaceAllButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.SpellChecker.ReplaceAllWord(this.ReplacementWord.Text);
|
||||
this.CurrentText.Value = Server.HtmlDecode(this.SpellChecker.Text);
|
||||
this.SpellChecker.SpellCheck();
|
||||
Replaced.Value = "ALL";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<html>
|
||||
<head runat="server" id="Head1">
|
||||
<title>Spell Check</title>
|
||||
<link href="resx/spell.css" type="text/css" rel="stylesheet" />
|
||||
|
||||
<script src="resx/spell.js" type="text/javascript"></script>
|
||||
|
||||
</head>
|
||||
<body id="SpellingBody" style="margin: 0px;overflow:hidden;padding-top:12px;padding-left:20px;" runat="server">
|
||||
<form id="SpellingForm" name="SpellingForm" method="post" runat="server">
|
||||
<input id="WordIndex" type="hidden" value="0" name="WordIndex" runat="server" />
|
||||
<input id="CurrentText" type="hidden" name="CurrentText" runat="server" />
|
||||
<input id="IgnoreList" type="hidden" name="IgnoreList" runat="server" />
|
||||
<input id="ReplaceKeyList" type="hidden" name="ReplaceKeyList" runat="server" />
|
||||
<input id="ReplaceValueList" type="hidden" name="ReplaceValueList" runat="server" />
|
||||
<input id="ElementIndex" type="hidden" value="-1" name="ElementIndex" runat="server" />
|
||||
<input id="SpellMode" type="hidden" value="load" name="SpellMode" runat="server" />
|
||||
<input id="Replaced" type="hidden" value="" name="Replaced" runat="server" />
|
||||
<table cellspacing="0" cellpadding="2" border="0">
|
||||
<tr>
|
||||
<td style="width: 250px">
|
||||
<em>Word Not in Dictionary:</em>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Button ID="IgnoreButton" OnClick="IgnoreButton_Click" runat="server" EnableViewState="False"
|
||||
Enabled="False" CssClass="button" Text="Ignore"></asp:Button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="CurrentWord" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label></td>
|
||||
<td>
|
||||
<asp:Button ID="IgnoreAllButton" OnClick="IgnoreAllButton_Click" runat="server" EnableViewState="False"
|
||||
Enabled="False" CssClass="button" Text="Ignore All"></asp:Button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<em>Change To:</em>
|
||||
</td>
|
||||
<td>
|
||||
<p style="font-size: 1px;padding:0px;">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="ReplacementWord" runat="server" EnableViewState="False" Enabled="False"
|
||||
CssClass="suggestion" Columns="30" Width="230px"></asp:TextBox>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Button ID="AddButton" OnClick="AddButton_Click" runat="server" EnableViewState="False"
|
||||
Enabled="False" CssClass="button" Text="Add"></asp:Button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<em>Suggestions:</em>
|
||||
</td>
|
||||
<td>
|
||||
<p style="font-size: 1px;padding:0px;">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="5">
|
||||
<asp:ListBox ID="Suggestions" runat="server" EnableViewState="False" Enabled="False"
|
||||
CssClass="suggestion" Width="230px" Rows="8"></asp:ListBox>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Button ID="ReplaceButton" OnClick="ReplaceButton_Click" runat="server" EnableViewState="False"
|
||||
Enabled="False" CssClass="button" Text="Replace"></asp:Button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Button ID="ReplaceAllButton" OnClick="ReplaceAllButton_Click" runat="server"
|
||||
EnableViewState="False" Enabled="False" CssClass="button" Text="Replace All"></asp:Button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p style="font-size: 1px;padding:0px;">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p style="font-size: 1px;padding:0px;">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input class="button" id="btnCancel" onclick="closeWindow()" type="button" value="Cancel"
|
||||
name="btnCancel" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<asp:Label ID="StatusText" runat="Server" ForeColor="DimGray" Font-Size="8pt">Loading
|
||||
...</asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var editor=parent.rtespellcheckeditor;
|
||||
|
||||
document.getElementById("ReplaceButton").onclick=function()
|
||||
{
|
||||
var rpl=document.getElementById("ReplacementWord").value;
|
||||
if(rpl)
|
||||
{
|
||||
var sel=editor.HtmlDecode(editor.GetRangePreviewHTML());
|
||||
var div=document.getElementById("CurrentWord");
|
||||
var txt=div.innerText||div.textContent||"";
|
||||
if(sel==txt)
|
||||
{
|
||||
editor.DeleteSelection();
|
||||
editor.InsertText(rpl,true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!parent.rtespellcheckdialog.movedtobegin)
|
||||
{
|
||||
editor.MoveToDocumentBegin();
|
||||
parent.rtespellcheckdialog.movedtobegin=true;
|
||||
}
|
||||
|
||||
function HighlightWord()
|
||||
{
|
||||
var div=document.getElementById("CurrentWord");
|
||||
var txt=div.innerText||div.textContent||"";
|
||||
if(!txt)return;
|
||||
setTimeout(function()
|
||||
{
|
||||
editor.Focus();
|
||||
editor.FindNextText(txt,false,false);
|
||||
},222);
|
||||
}
|
||||
|
||||
|
||||
HighlightWord();
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
161
LPWeb20/RichtextEditor/aspnet/colorpicker.aspx
Normal file
@@ -0,0 +1,161 @@
|
||||
<%@ Page Language="C#" %>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server" id="Head1">
|
||||
<title>WebPalette</title>
|
||||
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.1)" />
|
||||
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.1)" />
|
||||
|
||||
<script type="text/javascript" src="resx/Dialog_ColorPicker.js"></script>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href='resx/dialog.css' />
|
||||
<style type="text/css">
|
||||
.colorcell
|
||||
{
|
||||
width:22px;
|
||||
height:11px;
|
||||
cursor:hand;
|
||||
}
|
||||
.colordiv
|
||||
{
|
||||
border:solid 1px #808080;
|
||||
width:22px;
|
||||
height:11px;
|
||||
font-size:1px;
|
||||
}
|
||||
#ajaxdiv{padding:10px;margin:0;text-align:center; background:#eeeeee;}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function DoubleHex(v)
|
||||
{
|
||||
if(v<16)return "0"+v.toString(16);
|
||||
return v.toString(16);
|
||||
}
|
||||
function ToHexString(r,g,b)
|
||||
{
|
||||
return ("#"+DoubleHex(r*51)+DoubleHex(g*51)+DoubleHex(b*51)).toUpperCase();
|
||||
}
|
||||
function MakeHex(z,x,y)
|
||||
{
|
||||
//hor->ver
|
||||
var l=z%2
|
||||
var t=(z-l)/2
|
||||
z=l*3+t
|
||||
|
||||
//left column , l/r mirrow
|
||||
if(z<3)x=5-x;
|
||||
|
||||
//middle row , t/b mirrow
|
||||
if(z==1||z==4)y=5-y;
|
||||
|
||||
return ToHexString(5-y,5-x,5-z);
|
||||
}
|
||||
var colors=new Array(216);
|
||||
for(var z=0;z<6;z++)
|
||||
{
|
||||
for(var x=0;x<6;x++)
|
||||
{
|
||||
for(var y=0;y<6;y++)
|
||||
{
|
||||
var hex=MakeHex(z,x,y)
|
||||
var xx=(z%2)*6+x;
|
||||
var yy=Math.floor(z/2)*6+y;
|
||||
colors[yy*12+xx]=hex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var arr=[];
|
||||
for(var i=0;i<colors.length;i++)
|
||||
{
|
||||
if(i%12==0)arr.push("<tr>");
|
||||
arr.push("<td class='colorcell'><div class='colordiv' style='background-color:")
|
||||
arr.push(colors[i]);
|
||||
arr.push("' cvalue='");
|
||||
arr.push(colors[i]);
|
||||
arr.push("' title='")
|
||||
arr.push(colors[i]);
|
||||
arr.push("'> </div></td>");
|
||||
if(i%12==11)arr.push("</tr>");
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="ajaxdiv">
|
||||
<div class="tab-pane-control tab-pane" id="tabPane1">
|
||||
<div class="tab-row">
|
||||
<h2 class="tab selected">
|
||||
<a tabindex="-1" href='colorpicker.aspx'><span style="white-space: nowrap;" langtext='1'>WebPalette
|
||||
</span></a>
|
||||
</h2>
|
||||
<h2 class="tab">
|
||||
<a tabindex="-1" href='colorpicker_basic.aspx'><span style="white-space: nowrap;" langtext='1'>NamedColors
|
||||
</span></a>
|
||||
</h2>
|
||||
<h2 class="tab">
|
||||
<a tabindex="-1" href='colorpicker_more.aspx'><span style="white-space: nowrap;" langtext='1'>CustomColor
|
||||
</span></a>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="tab-page">
|
||||
<table cellspacing='2' cellpadding="1" align="center">
|
||||
|
||||
<script>
|
||||
document.write(arr.join(""));
|
||||
</script>
|
||||
|
||||
<tr>
|
||||
<td colspan="12" height="12">
|
||||
<p style="text-align:left">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="12" valign="middle" height="24">
|
||||
<span style="height: 24px; width: 50px;" langtext='1'>Color</span>:
|
||||
<input type="text" id="divpreview" size="7" maxlength="7" style="width: 180px; height: 24px;
|
||||
border: #a0a0a0 1px solid; padding: 4;" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container-bottom">
|
||||
<input type="button" id="buttonok" value="OK" class="formbutton" style="width: 70px"
|
||||
onclick="do_insert();" langtext='1'/>
|
||||
|
||||
<input type="button" id="buttoncancel" value="Cancel" class="formbutton" style="width: 70px"
|
||||
onclick="do_Close();" langtext='1'/>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
|
||||
new function()
|
||||
{
|
||||
var editor=parent.rtecolorpickereditor;
|
||||
var ns=document.getElementsByTagName("*");
|
||||
for(var i=0;i<ns.length;i++)
|
||||
{
|
||||
var n=ns[i];
|
||||
if(n.getAttribute('langtext')!="1")continue;
|
||||
var t=n.innerText||n.textContent||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.innerText=t;
|
||||
n.textContent=t;
|
||||
}
|
||||
var t=n.value||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.value=t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</html>
|
||||
46
LPWeb20/RichtextEditor/aspnet/colorpicker.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<execute>
|
||||
dialog.set_title(editor.GetLangText("colorpicker"));
|
||||
</execute>
|
||||
|
||||
<panel jsml-class="colorpicker_dialog" dock="fill" overflow="visible">
|
||||
<htmlcontrol dock="fill" jsml-local="hc">
|
||||
</htmlcontrol>
|
||||
<attach name="attach_dom">
|
||||
<![CDATA[
|
||||
setTimeout(function()
|
||||
{
|
||||
if(self.iframe)return;
|
||||
|
||||
window.rtecolorpickereditor=editor;
|
||||
window.rtecolorpickerdialog=dialog;
|
||||
|
||||
dialog.attach_event("closing",function()
|
||||
{
|
||||
window.rtecolorpickereditor=null;
|
||||
window.rtecolorpickerdialog=null;
|
||||
});
|
||||
|
||||
var iframe=document.createElement("IFRAME");
|
||||
iframe.setAttribute("src","{folder}aspnet/colorpicker.aspx?"+new Date().getTime());
|
||||
iframe.setAttribute("frameBorder","0");
|
||||
hc._content.appendChild(iframe);
|
||||
self.iframe=iframe;
|
||||
self.invoke_event("resize");
|
||||
},10);
|
||||
]]>
|
||||
</attach>
|
||||
<attach name="resize">
|
||||
if(!self.iframe)return;
|
||||
self.iframe.style.width=hc.get_client_width()+"px";
|
||||
self.iframe.style.height=hc.get_client_height()+"px";
|
||||
</attach>
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="colorpicker_dialog" />
|
||||
|
||||
|
||||
</jsml>
|
||||
185
LPWeb20/RichtextEditor/aspnet/colorpicker_basic.aspx
Normal file
@@ -0,0 +1,185 @@
|
||||
<%@ Page Language="C#" %>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.1)" />
|
||||
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.1)" />
|
||||
|
||||
<script type="text/javascript" src="resx/Dialog_ColorPicker.js"></script>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href='resx/dialog.css' />
|
||||
<style type="text/css">
|
||||
.colorcell
|
||||
{
|
||||
width:16px;
|
||||
height:17px;
|
||||
cursor:hand;
|
||||
}
|
||||
.colordiv,.customdiv
|
||||
{
|
||||
border:solid 1px #808080;
|
||||
width:16px;
|
||||
height:17px;
|
||||
font-size:1px;
|
||||
}
|
||||
#ajaxdiv{padding:10px;margin:0;text-align:center; background:#eeeeee;}
|
||||
</style>
|
||||
<title>NamedColors</title>
|
||||
|
||||
<script>
|
||||
|
||||
var colorlist=[{n:'green',h:'#008000'},{n:'lime',h:'#00ff00'},{n:'teal',h:'#008080'}, {n:'aqua',h:'#00ffff'}, {n:'navy',h:'#000080'}, {n:'blue',h:'#0000ff'}, {n:'purple',h:'#800080'}, {n:'fuchsia',h:'#ff00ff'},{n:'maroon',h:'#800000'},{n:'red',h:'#ff0000'},{n:'olive',h:'#808000'},{n:'yellow',h:'#ffff00'},{n:'white',h:'#ffffff'},{n:'silver',h:'#c0c0c0'},{n:'gray',h:'#808080'},{n:'black',h:'#000000'}]
|
||||
var colormore=[{n:'darkolivegreen',h:'#556b2f'},{n:'darkgreen',h:'#006400'},{n:'darkslategray',h:'#2f4f4f'},{n:'slategray',h:'#708090'},{n:'darkblue',h:'#00008b'},{n:'midnightblue',h:'#191970'},{n:'indigo',h:'#4b0082'},{n:'darkmagenta',h:'#8b008b'},{n:'brown',h:'#a52a2a'},{n:'darkred',h:'#8b0000'},{n:'sienna',h:'#a0522d'},{n:'saddlebrown',h:'#8b4513'},{n:'darkgoldenrod',h:'#b8860b'},{n:'beige',h:'#f5f5dc'},{n:'honeydew',h:'#f0fff0'},{n:'dimgray',h:'#696969'},{n:'olivedrab',h:'#6b8e23'},{n:'forestgreen',h:'#228b22'},{n:'darkcyan',h:'#008b8b'},{n:'lightslategray',h:'#778899'},{n:'mediumblue',h:'#0000cd'},{n:'darkslateblue',h:'#483d8b'},{n:'darkviolet',h:'#9400d3'},{n:'mediumvioletred',h:'#c71585'},{n:'indianred',h:'#cd5c5c'},{n:'firebrick',h:'#b22222'},{n:'chocolate',h:'#d2691e'},{n:'peru',h:'#cd853f'},{n:'goldenrod',h:'#daa520'},{n:'lightgoldenrodyellow',h:'#fafad2'},{n:'mintcream',h:'#f5fffa'},{n:'darkgray',h:'#a9a9a9'},{n:'yellowgreen',h:'#9acd32'},{n:'seagreen',h:'#2e8b57'},{n:'cadetblue',h:'#5f9ea0'},{n:'steelblue',h:'#4682b4'},{n:'royalblue',h:'#4169e1'},{n:'blueviolet',h:'#8a2be2'},{n:'darkorchid',h:'#9932cc'},{n:'deeppink',h:'#ff1493'},{n:'rosybrown',h:'#bc8f8f'},{n:'crimson',h:'#dc143c'},{n:'darkorange',h:'#ff8c00'},{n:'burlywood',h:'#deb887'},{n:'darkkhaki',h:'#bdb76b'},{n:'lightyellow',h:'#ffffe0'},{n:'azure',h:'#f0ffff'},{n:'lightgray',h:'#d3d3d3'},{n:'lawngreen',h:'#7cfc00'},{n:'mediumseagreen',h:'#3cb371'},{n:'lightseagreen',h:'#20b2aa'},{n:'deepskyblue',h:'#00bfff'},{n:'dodgerblue',h:'#1e90ff'},{n:'slateblue',h:'#6a5acd'},{n:'mediumorchid',h:'#ba55d3'},{n:'palevioletred',h:'#db7093'},{n:'salmon',h:'#fa8072'},{n:'orangered',h:'#ff4500'},{n:'sandybrown',h:'#f4a460'},{n:'tan',h:'#d2b48c'},{n:'gold',h:'#ffd700'},{n:'ivory',h:'#fffff0'},{n:'ghostwhite',h:'#f8f8ff'},{n:'gainsboro',h:'#dcdcdc'},{n:'chartreuse',h:'#7fff00'},{n:'limegreen',h:'#32cd32'},{n:'mediumaquamarine',h:'#66cdaa'},{n:'darkturquoise',h:'#00ced1'}
|
||||
,{n:'cornflowerblue',h:'#6495ed'}//cornflowerblue?
|
||||
,{n:'mediumslateblue',h:'#7b68ee'},{n:'orchid',h:'#da70d6'},{n:'hotpink',h:'#ff69b4'},{n:'lightcoral',h:'#f08080'},{n:'tomato',h:'#ff6347'},{n:'orange',h:'#ffa500'},{n:'bisque',h:'#ffe4c4'},{n:'khaki',h:'#f0e68c'},{n:'cornsilk',h:'#fff8dc'},{n:'linen',h:'#faf0e6'},{n:'whitesmoke',h:'#f5f5f5'},{n:'greenyellow',h:'#adff2f'},{n:'darkseagreen',h:'#8fbc8b'},{n:'turquoise',h:'#40e0d0'},{n:'mediumturquoise',h:'#48d1cc'},{n:'skyblue',h:'#87ceeb'},{n:'mediumpurple',h:'#9370db'},{n:'violet',h:'#ee82ee'},{n:'lightpink',h:'#ffb6c1'},{n:'darksalmon',h:'#e9967a'},{n:'coral',h:'#ff7f50'},{n:'navajowhite',h:'#ffdead'},{n:'blanchedalmond',h:'#ffebcd'},{n:'palegoldenrod',h:'#eee8aa'},{n:'oldlace',h:'#fdf5e6'},{n:'seashell',h:'#fff5ee'},{n:'ghostwhite',h:'#f8f8ff'},{n:'palegreen',h:'#98fb98'},{n:'springgreen',h:'#00ff7f'},{n:'aquamarine',h:'#7fffd4'},{n:'powderblue',h:'#b0e0e6'},{n:'lightskyblue',h:'#87cefa'},{n:'lightsteelblue',h:'#b0c4de'},{n:'plum',h:'#dda0dd'},{n:'pink',h:'#ffc0cb'},{n:'lightsalmon',h:'#ffa07a'},{n:'wheat',h:'#f5deb3'},{n:'moccasin',h:'#ffe4b5'},{n:'antiquewhite',h:'#faebd7'},{n:'lemonchiffon',h:'#fffacd'},{n:'floralwhite',h:'#fffaf0'},{n:'snow',h:'#fffafa'},{n:'aliceblue',h:'#f0f8ff'},{n:'lightgreen',h:'#90ee90'},{n:'mediumspringgreen',h:'#00fa9a'},{n:'paleturquoise',h:'#afeeee'},{n:'lightcyan',h:'#e0ffff'},{n:'lightblue',h:'#add8e6'},{n:'lavender',h:'#e6e6fa'},{n:'thistle',h:'#d8bfd8'},{n:'mistyrose',h:'#ffe4e1'},{n:'peachpuff',h:'#ffdab9'},{n:'papayawhip',h:'#ffefd5'}]
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="ajaxdiv">
|
||||
<div class="tab-pane-control tab-pane" id="tabPane1">
|
||||
<div class="tab-row">
|
||||
<h2 class="tab">
|
||||
<a tabindex="-1" href='colorpicker.aspx'><span style="white-space: nowrap;" langtext='1'>WebPalette
|
||||
</span></a>
|
||||
</h2>
|
||||
<h2 class="tab selected">
|
||||
<a tabindex="-1" href='colorpicker_basic.aspx'><span style="white-space: nowrap;" langtext='1'>NamedColors
|
||||
</span></a>
|
||||
</h2>
|
||||
<h2 class="tab">
|
||||
<a tabindex="-1" href='colorpicker_more.aspx'><span style="white-space: nowrap;" langtext='1'>CustomColor
|
||||
</span></a>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="tab-page">
|
||||
<table class="colortable" align="center">
|
||||
<tr>
|
||||
<td colspan="16" height="16">
|
||||
<p style="text-align:left">
|
||||
<span langtext='1'>Basic</span>:
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<script>
|
||||
var arr=[];
|
||||
for(var i=0;i<colorlist.length;i++)
|
||||
{
|
||||
|
||||
arr.push("<td class='colorcell'><div class='colordiv' style='background-color:")
|
||||
arr.push(colorlist[i].n);
|
||||
arr.push("' title='")
|
||||
arr.push(colorlist[i].n);
|
||||
arr.push(' ');
|
||||
arr.push(colorlist[i].h);
|
||||
arr.push("' cname='");
|
||||
arr.push(colorlist[i].n);
|
||||
arr.push("' cvalue='")
|
||||
arr.push(colorlist[i].h);
|
||||
arr.push("'></div></td>");
|
||||
}
|
||||
document.write(arr.join(""));
|
||||
</script>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="16" height="12">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="16">
|
||||
<p style="text-align:left">
|
||||
<span langtext='1'>Additional</span>:
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<script>
|
||||
var arr=[];
|
||||
for(var i=0;i<colormore.length;i++)
|
||||
{
|
||||
if(i%16==0)arr.push("<tr>");
|
||||
arr.push("<td class='colorcell'><div class='colordiv' style='background-color:")
|
||||
arr.push(colormore[i].n);
|
||||
arr.push("' title='")
|
||||
arr.push(colormore[i].n);
|
||||
arr.push(' ');
|
||||
arr.push(colormore[i].h);
|
||||
arr.push("' cname='");
|
||||
arr.push(colormore[i].n);
|
||||
arr.push("' cvalue='")
|
||||
arr.push(colormore[i].h);
|
||||
arr.push("'></div></td>");
|
||||
if(i%16==15)arr.push("</tr>");
|
||||
}
|
||||
if(colormore%16>0)arr.push("</tr>");
|
||||
document.write(arr.join(""));
|
||||
</script>
|
||||
|
||||
<tr>
|
||||
<td colspan="16" height="8">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="16" height="12">
|
||||
<input checked id="CheckboxColorNames" style="width: 16px; height: 12px; margin-bottom:-3px" type="checkbox">
|
||||
<span style="width: 118px;" langtext='1'>usecolornames</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="16" height="12">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="16" valign="middle" height="24">
|
||||
<span style="height: 24px; width: 50px;" langtext='1'>Color</span>:
|
||||
|
||||
<input type="text" id="divpreview" size="7" maxlength="7" style="width: 180px; height: 24px;
|
||||
border: #a0a0a0 1px solid; padding: 4;" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container-bottom">
|
||||
<input type="button" id="buttonok" value="OK" langtext='1' class="formbutton" style="width: 70px"
|
||||
onclick="do_insert();" />
|
||||
|
||||
<input type="button" id="buttoncancel" value="Cancel" langtext='1' class="formbutton" style="width: 70px"
|
||||
onclick="do_Close();" />
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
|
||||
new function()
|
||||
{
|
||||
var editor=parent.rtecolorpickereditor;
|
||||
var ns=document.getElementsByTagName("*");
|
||||
for(var i=0;i<ns.length;i++)
|
||||
{
|
||||
var n=ns[i];
|
||||
if(n.getAttribute('langtext')!="1")continue;
|
||||
var t=n.innerText||n.textContent||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.innerText=t;
|
||||
n.textContent=t;
|
||||
}
|
||||
var t=n.value||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.value=t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
24
LPWeb20/RichtextEditor/aspnet/colorpicker_more.aspx
Normal file
@@ -0,0 +1,24 @@
|
||||
<%@ Page Language="C#" %>
|
||||
|
||||
<script runat="server">
|
||||
string FrameSrc;
|
||||
override protected void OnInit(EventArgs args)
|
||||
{
|
||||
base.OnInit(args);
|
||||
if (Request.Browser.Browser == "IE")
|
||||
{
|
||||
Server.Transfer("colorpicker_more_ie.aspx");
|
||||
}
|
||||
else
|
||||
{
|
||||
Server.Transfer("colorpicker_more_ns.aspx");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
352
LPWeb20/RichtextEditor/aspnet/colorpicker_more_ie.aspx
Normal file
@@ -0,0 +1,352 @@
|
||||
<%@ Page Language="C#" %>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.1)" />
|
||||
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.1)" />
|
||||
|
||||
<script type="text/javascript" src="resx/Dialog_ColorPicker.js"></script>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href='resx/dialog.css' />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="resx/ColorPicker_IE.css" />
|
||||
|
||||
<script type="text/javascript" src="resx/Dialog_ColorPicker_IE.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.colorcell
|
||||
{
|
||||
width:16px;
|
||||
height:17px;
|
||||
cursor:hand;
|
||||
}
|
||||
.colordiv,.customdiv
|
||||
{
|
||||
border:solid 1px #808080;
|
||||
width:16px;
|
||||
height:17px;
|
||||
font-size:1px;
|
||||
}
|
||||
#ajaxdiv{padding:10px;margin:0;text-align:center; background:#eeeeee;}
|
||||
</style>
|
||||
<title>CustomColor</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="ajaxdiv">
|
||||
<div class="tab-pane-control tab-pane" id="tabPane1">
|
||||
<div class="tab-row">
|
||||
<h2 class="tab">
|
||||
<a tabindex="-1" href='colorpicker.aspx'><span style="white-space: nowrap;" langtext='1'>WebPalette
|
||||
</span></a>
|
||||
</h2>
|
||||
<h2 class="tab">
|
||||
<a tabindex="-1" href='colorpicker_basic.aspx'><span style="white-space: nowrap;" langtext='1'>NamedColors
|
||||
</span></a>
|
||||
</h2>
|
||||
<h2 class="tab selected">
|
||||
<a tabindex="-1" href='colorpicker_more.aspx'><span style="white-space: nowrap;" langtext='1'>CustomColor
|
||||
</span></a>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="tab-page">
|
||||
<div id="colorpickerpanel" style="position: relative; text-align: left; height: 300px">
|
||||
<!--
|
||||
-----------------------------------------------------
|
||||
Author: Lewis E. Moten III
|
||||
Date: May, 16, 2004
|
||||
Homepage: http://www.lewismoten.com
|
||||
Email: lewis@moten.com
|
||||
-----------------------------------------------------
|
||||
-->
|
||||
<div id="pnlGradient_Top">
|
||||
</div>
|
||||
<div id="pnlGradient_Background1">
|
||||
</div>
|
||||
<div id="pnlGradient_Background2">
|
||||
</div>
|
||||
<div id="pnlVertical_Background2">
|
||||
</div>
|
||||
<div id="pnlVertical_Background1">
|
||||
</div>
|
||||
<div id="pnlVertical_Top">
|
||||
</div>
|
||||
<!-- HSB: Hue -->
|
||||
<div id="pnlGradientHsbHue_Hue">
|
||||
</div>
|
||||
<div id="pnlGradientHsbHue_Black">
|
||||
</div>
|
||||
<div id="pnlGradientHsbHue_White">
|
||||
</div>
|
||||
<div id="pnlVerticalHsbHue_Background">
|
||||
</div>
|
||||
<!-- HSB: Saturation -->
|
||||
<div id="pnlVerticalHsbSaturation_Hue">
|
||||
</div>
|
||||
<div id="pnlVerticalHsbSaturation_White">
|
||||
</div>
|
||||
<!-- HSB: Brightness -->
|
||||
<div id="pnlVerticalHsbBrightness_Hue">
|
||||
</div>
|
||||
<div id="pnlVerticalHsbBrightness_Black">
|
||||
</div>
|
||||
<!-- RGB: -->
|
||||
<div id="pnlVerticalRgb_Start">
|
||||
</div>
|
||||
<div id="pnlVerticalRgb_End">
|
||||
</div>
|
||||
<div id="pnlGradientRgb_Base">
|
||||
</div>
|
||||
<div id="pnlGradientRgb_Invert">
|
||||
</div>
|
||||
<div id="pnlGradientRgb_Overlay1">
|
||||
</div>
|
||||
<div id="pnlGradientRgb_Overlay2">
|
||||
</div>
|
||||
<div id="pnlOldColor">
|
||||
</div>
|
||||
<div id="pnlOldColorBorder">
|
||||
</div>
|
||||
<div id="pnlNewColor">
|
||||
</div>
|
||||
<div id="pnlNewColorBorder">
|
||||
</div>
|
||||
<div id="pnlWebSafeColor" title="Click to select web safe color">
|
||||
</div>
|
||||
<div id="pnlWebSafeColorBorder">
|
||||
</div>
|
||||
<div id="pnlVerticalPosition">
|
||||
</div>
|
||||
<div id="pnlGradientPosition">
|
||||
</div>
|
||||
<div id="lblSelectColorMessage">
|
||||
SelectColor:</div>
|
||||
<div id="lblRecent">
|
||||
Recent:</div>
|
||||
<div id="pnlRecentBorder">
|
||||
<div id="pnlRecentBorder1">
|
||||
</div>
|
||||
<div id="pnlRecentBorder2">
|
||||
</div>
|
||||
<div id="pnlRecentBorder3">
|
||||
</div>
|
||||
<div id="pnlRecentBorder4">
|
||||
</div>
|
||||
<div id="pnlRecentBorder5">
|
||||
</div>
|
||||
<div id="pnlRecentBorder6">
|
||||
</div>
|
||||
<div id="pnlRecentBorder7">
|
||||
</div>
|
||||
<div id="pnlRecentBorder8">
|
||||
</div>
|
||||
<div id="pnlRecentBorder9">
|
||||
</div>
|
||||
<div id="pnlRecentBorder10">
|
||||
</div>
|
||||
<div id="pnlRecentBorder11">
|
||||
</div>
|
||||
<div id="pnlRecentBorder12">
|
||||
</div>
|
||||
<div id="pnlRecentBorder13">
|
||||
</div>
|
||||
<div id="pnlRecentBorder14">
|
||||
</div>
|
||||
<div id="pnlRecentBorder15">
|
||||
</div>
|
||||
<div id="pnlRecentBorder16">
|
||||
</div>
|
||||
<div id="pnlRecentBorder17">
|
||||
</div>
|
||||
<div id="pnlRecentBorder18">
|
||||
</div>
|
||||
<div id="pnlRecentBorder19">
|
||||
</div>
|
||||
<div id="pnlRecentBorder20">
|
||||
</div>
|
||||
<div id="pnlRecentBorder21">
|
||||
</div>
|
||||
<div id="pnlRecentBorder22">
|
||||
</div>
|
||||
<div id="pnlRecentBorder23">
|
||||
</div>
|
||||
<div id="pnlRecentBorder24">
|
||||
</div>
|
||||
<div id="pnlRecentBorder25">
|
||||
</div>
|
||||
<div id="pnlRecentBorder26">
|
||||
</div>
|
||||
<div id="pnlRecentBorder27">
|
||||
</div>
|
||||
<div id="pnlRecentBorder28">
|
||||
</div>
|
||||
<div id="pnlRecentBorder29">
|
||||
</div>
|
||||
<div id="pnlRecentBorder30">
|
||||
</div>
|
||||
<div id="pnlRecentBorder31">
|
||||
</div>
|
||||
<div id="pnlRecentBorder32">
|
||||
</div>
|
||||
</div>
|
||||
<div id="pnlRecent">
|
||||
<div id="pnlRecent1">
|
||||
</div>
|
||||
<div id="pnlRecent2">
|
||||
</div>
|
||||
<div id="pnlRecent3">
|
||||
</div>
|
||||
<div id="pnlRecent4">
|
||||
</div>
|
||||
<div id="pnlRecent5">
|
||||
</div>
|
||||
<div id="pnlRecent6">
|
||||
</div>
|
||||
<div id="pnlRecent7">
|
||||
</div>
|
||||
<div id="pnlRecent8">
|
||||
</div>
|
||||
<div id="pnlRecent9">
|
||||
</div>
|
||||
<div id="pnlRecent10">
|
||||
</div>
|
||||
<div id="pnlRecent11">
|
||||
</div>
|
||||
<div id="pnlRecent12">
|
||||
</div>
|
||||
<div id="pnlRecent13">
|
||||
</div>
|
||||
<div id="pnlRecent14">
|
||||
</div>
|
||||
<div id="pnlRecent15">
|
||||
</div>
|
||||
<div id="pnlRecent16">
|
||||
</div>
|
||||
<div id="pnlRecent17">
|
||||
</div>
|
||||
<div id="pnlRecent18">
|
||||
</div>
|
||||
<div id="pnlRecent19">
|
||||
</div>
|
||||
<div id="pnlRecent20">
|
||||
</div>
|
||||
<div id="pnlRecent21">
|
||||
</div>
|
||||
<div id="pnlRecent22">
|
||||
</div>
|
||||
<div id="pnlRecent23">
|
||||
</div>
|
||||
<div id="pnlRecent24">
|
||||
</div>
|
||||
<div id="pnlRecent25">
|
||||
</div>
|
||||
<div id="pnlRecent26">
|
||||
</div>
|
||||
<div id="pnlRecent27">
|
||||
</div>
|
||||
<div id="pnlRecent28">
|
||||
</div>
|
||||
<div id="pnlRecent29">
|
||||
</div>
|
||||
<div id="pnlRecent30">
|
||||
</div>
|
||||
<div id="pnlRecent31">
|
||||
</div>
|
||||
<div id="pnlRecent32">
|
||||
</div>
|
||||
</div>
|
||||
<div id="lblHex">
|
||||
#</div>
|
||||
<form id="frmColorPicker">
|
||||
<div id="pnlHSB">
|
||||
<div id="pnlHSB_Hue" title="Hue">
|
||||
<input type="radio" id="rdoHSB_Hue" name="ColorType" checked>
|
||||
<div id="lblHSB_Hue">
|
||||
H:</div>
|
||||
<input type="text" id="txtHSB_Hue">
|
||||
<div id="lblUnitHSB_Hue">
|
||||
</div>
|
||||
</div>
|
||||
<div id="pnlHSB_Saturation" title="Saturation">
|
||||
<input type="radio" id="rdoHSB_Saturation" name="ColorType">
|
||||
<div id="lblHSB_Saturation">
|
||||
S:</div>
|
||||
<input type="text" id="txtHSB_Saturation">
|
||||
<div id="lblUnitHSB_Saturation">
|
||||
%</div>
|
||||
</div>
|
||||
<div id="pnlHSB_Brightness" title="Brightness">
|
||||
<input type="radio" id="rdoHSB_Brightness" name="ColorType">
|
||||
<div id="lblHSB_Brightness">
|
||||
B:</div>
|
||||
<input type="text" id="txtHSB_Brightness">
|
||||
<div id="lblUnitHSB_Brightness">
|
||||
%</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="pnlRGB">
|
||||
<div id="pnlRGB_Red" title="Red">
|
||||
<input type="radio" id="rdoRGB_Red" name="ColorType">
|
||||
<div id="lblRGB_Red">
|
||||
R:</div>
|
||||
<input type="text" id="txtRGB_Red">
|
||||
</div>
|
||||
<div id="pnlRGB_Green" title="Green">
|
||||
<input type="radio" id="rdoRGB_Green" name="ColorType">
|
||||
<div id="lblRGB_Green">
|
||||
G:</div>
|
||||
<input type="text" id="txtRGB_Green">
|
||||
</div>
|
||||
<div id="pnlRGB_Blue" title="Blue">
|
||||
<input type="radio" id="rdoRGB_Blue" name="ColorType">
|
||||
<div id="lblRGB_Blue">
|
||||
B:</div>
|
||||
<input type="text" id="txtRGB_Blue">
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" id="txtHex" maxlength="6">
|
||||
<button id="btnWebSafeColor" type="button" title="Warning: not a web safe color">
|
||||
</button>
|
||||
<button id="btnOK" type="button">
|
||||
OK</button>
|
||||
<button id="btnCancel" type="button">
|
||||
Cancel</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container-bottom">
|
||||
<input type="button" id="buttonok" value="OK" langtext='1' class="formbutton" onclick="do_insert();" />
|
||||
|
||||
<input type="button" id="buttoncancel" value="Cancel" langtext='1' class="formbutton" onclick="do_Close();" />
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
|
||||
new function()
|
||||
{
|
||||
var editor=parent.rtecolorpickereditor;
|
||||
var ns=document.getElementsByTagName("*");
|
||||
for(var i=0;i<ns.length;i++)
|
||||
{
|
||||
var n=ns[i];
|
||||
if(n.getAttribute('langtext')!="1")continue;
|
||||
var t=n.innerText||n.textContent||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.innerText=t;
|
||||
n.textContent=t;
|
||||
}
|
||||
var t=n.value||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.value=t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
326
LPWeb20/RichtextEditor/aspnet/colorpicker_more_ns.aspx
Normal file
@@ -0,0 +1,326 @@
|
||||
<%@ Page Language="C#" %>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server" id="Head1">
|
||||
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.1)" />
|
||||
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.1)" />
|
||||
|
||||
<script type="text/javascript" src="resx/Dialog_ColorPicker.js"></script>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href='resx/dialog.css' />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="resx/ColorPicker_NS.css" />
|
||||
|
||||
<script type="text/javascript" src="resx/Dialog_ColorPicker_NS.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.colorcell
|
||||
{
|
||||
width:16px;
|
||||
height:17px;
|
||||
cursor:hand;
|
||||
}
|
||||
.colordiv,.customdiv
|
||||
{
|
||||
border:solid 1px #808080;
|
||||
width:16px;
|
||||
height:17px;
|
||||
font-size:1px;
|
||||
}
|
||||
#ajaxdiv{padding:10px;margin:0;text-align:center; background:#eeeeee;}
|
||||
</style>
|
||||
<title>CustomColor</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="ajaxdiv">
|
||||
<div class="tab-pane-control tab-pane" id="tabPane1">
|
||||
<div class="tab-row">
|
||||
<h2 class="tab">
|
||||
<a tabindex="-1" href='colorpicker.aspx'><span style="white-space: nowrap;" langtext='1'>WebPalette
|
||||
</span></a>
|
||||
</h2>
|
||||
<h2 class="tab">
|
||||
<a tabindex="-1" href='colorpicker_basic.aspx'><span style="white-space: nowrap;" langtext='1'>NamedColors
|
||||
</span></a>
|
||||
</h2>
|
||||
<h2 class="tab selected">
|
||||
<a tabindex="-1" href='colorpicker_more.aspx'><span style="white-space: nowrap;" langtext='1'>CustomColor
|
||||
</span></a>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="tab-page">
|
||||
<div id="colorpickerpanel" style="position: relative; text-align: left; height: 350px">
|
||||
<!--
|
||||
-----------------------------------------------------
|
||||
Author: Lewis E. Moten III
|
||||
Date: May, 16, 2004
|
||||
Homepage: http://www.lewismoten.com
|
||||
Email: lewis@moten.com
|
||||
-----------------------------------------------------
|
||||
-->
|
||||
<div id="pnlGradient_Top">
|
||||
</div>
|
||||
<div id="pnlGradient_Background1">
|
||||
</div>
|
||||
<div id="pnlGradient_Background2">
|
||||
</div>
|
||||
<img id="imgGradient">
|
||||
<div id="pnlGradientRgb_Overlay1">
|
||||
</div>
|
||||
<div id="pnlGradientRgb_Overlay2">
|
||||
</div>
|
||||
<img id="pnlVerticalHsbSaturation_Hue">
|
||||
<div id="pnlVertical_Background2">
|
||||
</div>
|
||||
<div id="pnlVertical_Background1">
|
||||
</div>
|
||||
<div id="pnlVertical_Top">
|
||||
</div>
|
||||
<!-- HSB: Hue -->
|
||||
<div id="pnlGradientHsbHue_Hue">
|
||||
</div>
|
||||
<div id="pnlVerticalHsbHue_Background">
|
||||
</div>
|
||||
<div id="pnlOldColor">
|
||||
</div>
|
||||
<div id="pnlOldColorBorder">
|
||||
</div>
|
||||
<div id="pnlNewColor">
|
||||
</div>
|
||||
<div id="pnlNewColorBorder">
|
||||
</div>
|
||||
<div id="pnlWebSafeColor" title="Click to select web safe color">
|
||||
</div>
|
||||
<div id="pnlWebSafeColorBorder">
|
||||
</div>
|
||||
<div id="pnlVerticalPosition">
|
||||
</div>
|
||||
<div id="pnlGradientPosition">
|
||||
</div>
|
||||
<div id="lblSelectColorMessage">
|
||||
SelectColor:</div>
|
||||
<div id="lblRecent">
|
||||
Recent:</div>
|
||||
<div id="pnlRecentBorder">
|
||||
<div id="pnlRecentBorder1">
|
||||
</div>
|
||||
<div id="pnlRecentBorder2">
|
||||
</div>
|
||||
<div id="pnlRecentBorder3">
|
||||
</div>
|
||||
<div id="pnlRecentBorder4">
|
||||
</div>
|
||||
<div id="pnlRecentBorder5">
|
||||
</div>
|
||||
<div id="pnlRecentBorder6">
|
||||
</div>
|
||||
<div id="pnlRecentBorder7">
|
||||
</div>
|
||||
<div id="pnlRecentBorder8">
|
||||
</div>
|
||||
<div id="pnlRecentBorder9">
|
||||
</div>
|
||||
<div id="pnlRecentBorder10">
|
||||
</div>
|
||||
<div id="pnlRecentBorder11">
|
||||
</div>
|
||||
<div id="pnlRecentBorder12">
|
||||
</div>
|
||||
<div id="pnlRecentBorder13">
|
||||
</div>
|
||||
<div id="pnlRecentBorder14">
|
||||
</div>
|
||||
<div id="pnlRecentBorder15">
|
||||
</div>
|
||||
<div id="pnlRecentBorder16">
|
||||
</div>
|
||||
<div id="pnlRecentBorder17">
|
||||
</div>
|
||||
<div id="pnlRecentBorder18">
|
||||
</div>
|
||||
<div id="pnlRecentBorder19">
|
||||
</div>
|
||||
<div id="pnlRecentBorder20">
|
||||
</div>
|
||||
<div id="pnlRecentBorder21">
|
||||
</div>
|
||||
<div id="pnlRecentBorder22">
|
||||
</div>
|
||||
<div id="pnlRecentBorder23">
|
||||
</div>
|
||||
<div id="pnlRecentBorder24">
|
||||
</div>
|
||||
<div id="pnlRecentBorder25">
|
||||
</div>
|
||||
<div id="pnlRecentBorder26">
|
||||
</div>
|
||||
<div id="pnlRecentBorder27">
|
||||
</div>
|
||||
<div id="pnlRecentBorder28">
|
||||
</div>
|
||||
<div id="pnlRecentBorder29">
|
||||
</div>
|
||||
<div id="pnlRecentBorder30">
|
||||
</div>
|
||||
<div id="pnlRecentBorder31">
|
||||
</div>
|
||||
<div id="pnlRecentBorder32">
|
||||
</div>
|
||||
</div>
|
||||
<div id="pnlRecent">
|
||||
<div id="pnlRecent1">
|
||||
</div>
|
||||
<div id="pnlRecent2">
|
||||
</div>
|
||||
<div id="pnlRecent3">
|
||||
</div>
|
||||
<div id="pnlRecent4">
|
||||
</div>
|
||||
<div id="pnlRecent5">
|
||||
</div>
|
||||
<div id="pnlRecent6">
|
||||
</div>
|
||||
<div id="pnlRecent7">
|
||||
</div>
|
||||
<div id="pnlRecent8">
|
||||
</div>
|
||||
<div id="pnlRecent9">
|
||||
</div>
|
||||
<div id="pnlRecent10">
|
||||
</div>
|
||||
<div id="pnlRecent11">
|
||||
</div>
|
||||
<div id="pnlRecent12">
|
||||
</div>
|
||||
<div id="pnlRecent13">
|
||||
</div>
|
||||
<div id="pnlRecent14">
|
||||
</div>
|
||||
<div id="pnlRecent15">
|
||||
</div>
|
||||
<div id="pnlRecent16">
|
||||
</div>
|
||||
<div id="pnlRecent17">
|
||||
</div>
|
||||
<div id="pnlRecent18">
|
||||
</div>
|
||||
<div id="pnlRecent19">
|
||||
</div>
|
||||
<div id="pnlRecent20">
|
||||
</div>
|
||||
<div id="pnlRecent21">
|
||||
</div>
|
||||
<div id="pnlRecent22">
|
||||
</div>
|
||||
<div id="pnlRecent23">
|
||||
</div>
|
||||
<div id="pnlRecent24">
|
||||
</div>
|
||||
<div id="pnlRecent25">
|
||||
</div>
|
||||
<div id="pnlRecent26">
|
||||
</div>
|
||||
<div id="pnlRecent27">
|
||||
</div>
|
||||
<div id="pnlRecent28">
|
||||
</div>
|
||||
<div id="pnlRecent29">
|
||||
</div>
|
||||
<div id="pnlRecent30">
|
||||
</div>
|
||||
<div id="pnlRecent31">
|
||||
</div>
|
||||
<div id="pnlRecent32">
|
||||
</div>
|
||||
</div>
|
||||
<div id="lblHex">
|
||||
#</div>
|
||||
<form id="frmColorPicker">
|
||||
<div id="pnlHSB">
|
||||
<div id="pnlHSB_Hue" title="Hue">
|
||||
<input type="radio" id="rdoHSB_Hue" name="ColorType" checked>
|
||||
<div id="lblHSB_Hue">
|
||||
H:</div>
|
||||
<input type="text" id="txtHSB_Hue">
|
||||
<div id="lblUnitHSB_Hue">
|
||||
</div>
|
||||
</div>
|
||||
<div id="pnlHSB_Saturation" title="Saturation">
|
||||
<input type="radio" id="rdoHSB_Saturation" name="ColorType">
|
||||
<div id="lblHSB_Saturation">
|
||||
S:</div>
|
||||
<input type="text" id="txtHSB_Saturation">
|
||||
<div id="lblUnitHSB_Saturation">
|
||||
%</div>
|
||||
</div>
|
||||
<div id="pnlHSB_Brightness" title="Brightness">
|
||||
<input type="radio" id="rdoHSB_Brightness" name="ColorType">
|
||||
<div id="lblHSB_Brightness">
|
||||
B:</div>
|
||||
<input type="text" id="txtHSB_Brightness">
|
||||
<div id="lblUnitHSB_Brightness">
|
||||
%</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="pnlRGB">
|
||||
<div id="pnlRGB_Red" title="Red">
|
||||
<div id="lblRGB_Red">
|
||||
R:</div>
|
||||
<input type="text" id="txtRGB_Red">
|
||||
</div>
|
||||
<div id="pnlRGB_Green" title="Green">
|
||||
<div id="lblRGB_Green">
|
||||
G:</div>
|
||||
<input type="text" id="txtRGB_Green">
|
||||
</div>
|
||||
<div id="pnlRGB_Blue" title="Blue">
|
||||
<div id="lblRGB_Blue">
|
||||
B:</div>
|
||||
<input type="text" id="txtRGB_Blue">
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" id="txtHex" maxlength="6">
|
||||
<input id="btnWebSafeColor" type="button" title="Warning: not a web safe color" class="Button">
|
||||
<input id="btnOK" type="button" value="OK" class="Button">
|
||||
<input id="btnCancel" type="button" value="Cancel" class="Button">
|
||||
<input id="btnAbout" type="button" value="About" class="Button" style="display: none">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container-bottom">
|
||||
<input type="button" id="buttonok" value="OK" langtext='1' class="formbutton" onclick="do_insert();" />
|
||||
|
||||
<input type="button" id="buttoncancel" value="Cancel" langtext='1' class="formbutton" onclick="do_Close();" />
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
|
||||
new function()
|
||||
{
|
||||
var editor=parent.rtecolorpickereditor;
|
||||
var ns=document.getElementsByTagName("*");
|
||||
for(var i=0;i<ns.length;i++)
|
||||
{
|
||||
var n=ns[i];
|
||||
if(n.getAttribute('langtext')!="1")continue;
|
||||
var t=n.innerText||n.textContent||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.innerText=t;
|
||||
n.textContent=t;
|
||||
}
|
||||
var t=n.value||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.value=t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
BIN
LPWeb20/RichtextEditor/aspnet/images/1x1.gif
Normal file
|
After Width: | Height: | Size: 43 B |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpie_Color.cur
Normal file
|
After Width: | Height: | Size: 518 B |
|
After Width: | Height: | Size: 63 B |
|
After Width: | Height: | Size: 63 B |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpie_VerticalPosition.gif
Normal file
|
After Width: | Height: | Size: 80 B |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpie_WebSafe.gif
Normal file
|
After Width: | Height: | Size: 108 B |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpie_gradients.png
Normal file
|
After Width: | Height: | Size: 9.9 KiB |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpns_Color.cur
Normal file
|
After Width: | Height: | Size: 518 B |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpns_ColorSpace1.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpns_ColorSpace2.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 63 B |
|
After Width: | Height: | Size: 63 B |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpns_Vertical1.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpns_Vertical2.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpns_VerticalPosition.gif
Normal file
|
After Width: | Height: | Size: 80 B |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpns_WebSafe.gif
Normal file
|
After Width: | Height: | Size: 108 B |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpns_gradients.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
LPWeb20/RichtextEditor/aspnet/images/cpns_hue2.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
LPWeb20/RichtextEditor/aspnet/images/formbn.gif
Normal file
|
After Width: | Height: | Size: 67 B |
BIN
LPWeb20/RichtextEditor/aspnet/images/multiclavier.gif
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
112
LPWeb20/RichtextEditor/aspnet/insertchars.htm
Normal file
@@ -0,0 +1,112 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>[[InsertChars]] </title>
|
||||
<meta name="content-type" content="text/html ;charset=Unicode" />
|
||||
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.1)" />
|
||||
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.1)" />
|
||||
<link href='resx/dialog.css' type="text/css" rel="stylesheet" />
|
||||
<style type="text/css">
|
||||
table.Grid
|
||||
{
|
||||
border-width: 4px;
|
||||
border-style: none;
|
||||
background-color: White;
|
||||
border-color: gray;
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
table.Grid TD, table.Grid TH
|
||||
{
|
||||
padding: 3px 3px 3px 3px;
|
||||
border: solid 1px #E1E1E1;
|
||||
vertical-align: top;
|
||||
cursor:default;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
var tds=22;
|
||||
|
||||
function spcOver(el)
|
||||
{
|
||||
el.style.background="#0A246A";el.style.color="white";
|
||||
}
|
||||
function spcOut(el)
|
||||
{
|
||||
el.style.background="white";el.style.color="black";
|
||||
}
|
||||
function writeChars()
|
||||
{
|
||||
var str="";
|
||||
for(var i=33;i<256;)
|
||||
{
|
||||
document.write("<tr>");
|
||||
for(var j=0;j<=tds;j++)
|
||||
{
|
||||
document.write("<td onClick='getchar(this)' onmouseover='spcOver(this)' onmouseout='spcOut(this)'>");
|
||||
document.write("\x26#"+i+";");
|
||||
document.write("</td>");
|
||||
i++;
|
||||
}
|
||||
document.write("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
function writeChars2()
|
||||
{
|
||||
var arr=["ƒ","Α","Β","Γ","Δ","Ε","Ζ","Η","Θ","Ι","Κ","Λ","Μ","Ν","Ξ","Ο","Π","Ρ","Σ","Τ","Υ","Φ","Χ","Ψ","Ω","α","β","γ","δ","ε","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ρ","ς","σ","τ","υ","φ","χ","ψ","ω","ϑ","ϒ","ϖ","•","…","′","″","‾","⁄","℘","ℑ","ℜ","™","ℵ","←","↑","→","↓","↔","↵","⇐","⇑","⇒","⇓","⇔","∀","∂","∃","∅","∇","∈","∉","∋","∏","−","−","∗","√","∝","∞","∠","⊥","⊦","∩","∪","∫","∴","∼","≅","≅","≠","≡","≤","≥","⊂","⊃","⊄","⊆","⊇","⊕","⊗","⊥","⋅","⌈","⌉","⌊","⌋","〈","〉","◊","♠","♣","♥","♦"];
|
||||
for(var i=0;i<arr.length;i+=tds)
|
||||
{
|
||||
document.write("<tr>");
|
||||
for(var j=i;j<i+tds&&j<arr.length;j++)
|
||||
{
|
||||
var n=arr[j];
|
||||
|
||||
document.write("<td onClick='getchar(this)' onmouseover='spcOver(this)' onmouseout='spcOut(this)' title='" + n+" - "+n.replace("&","&") + "' >");
|
||||
document.write(n);
|
||||
document.write("</td>");
|
||||
}
|
||||
document.write("</tr>");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="ajaxdiv">
|
||||
<table border="0" cellspacing="2" cellpadding="2" width="98%">
|
||||
<tr>
|
||||
<td class="normal">
|
||||
<span langtext='1'>Font</span>:
|
||||
<input type="radio" onclick="sel_font_change()" id="selfont1" name="selfont" value="" checked="checked" /><label for="selfont1" langtext='1'>Default</label>
|
||||
<input type="radio" onclick="sel_font_change()" id="selfont2" name="selfont" value="webdings" /><label for="selfont2">Webdings</label>
|
||||
<input type="radio" onclick="sel_font_change()" id="selfont3" name="selfont" value="wingdings" /><label for="selfont3">Wingdings</label>
|
||||
<input type="radio" onclick="sel_font_change()" id="selfont4" name="selfont" value="symbol" /><label for="selfont4">Symbol</label>
|
||||
<input type="radio" onclick="sel_font_change()" id="selfont5" name="selfont" value="Unicode" /><label for="selfont5">Unicode</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<br />
|
||||
<table style="border-collapse: collapse;" class="Grid" width="100%" border="0" ID="charstable1">
|
||||
<script type="text/javascript">
|
||||
writeChars();
|
||||
</script>
|
||||
</table>
|
||||
<table style="border-collapse: collapse;" class="Grid" width="100%" border="0" ID="charstable2">
|
||||
<script type="text/javascript">
|
||||
writeChars2();
|
||||
</script>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div align="center" style="margin-top:15px">
|
||||
<input type="button" langtext='1' value="Cancel" class="formbutton" onclick="do_cancel()" />
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript" src="resx/insertchars.js"></script>
|
||||
<script type="text/javascript">
|
||||
sel_font_change()
|
||||
</script>
|
||||
</html>
|
||||
46
LPWeb20/RichtextEditor/aspnet/insertchars.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<execute>
|
||||
dialog.set_title(editor.GetLangText("insertchars"));
|
||||
</execute>
|
||||
|
||||
<panel jsml-class="insertchars_dialog" dock="fill" overflow="visible">
|
||||
<htmlcontrol dock="fill" jsml-local="hc">
|
||||
</htmlcontrol>
|
||||
<attach name="attach_dom">
|
||||
<![CDATA[
|
||||
setTimeout(function()
|
||||
{
|
||||
if(self.iframe)return;
|
||||
|
||||
window.rteinsertcharseditor=editor;
|
||||
window.rteinsertcharsdialog=dialog;
|
||||
|
||||
dialog.attach_event("closing",function()
|
||||
{
|
||||
window.rteinsertcharseditor=null;
|
||||
window.rteinsertcharsdialog=null;
|
||||
});
|
||||
|
||||
var iframe=document.createElement("IFRAME");
|
||||
iframe.setAttribute("src","{folder}aspnet/insertchars.htm?{timems}");
|
||||
iframe.setAttribute("frameBorder","0");
|
||||
hc._content.appendChild(iframe);
|
||||
self.iframe=iframe;
|
||||
self.invoke_event("resize");
|
||||
},10);
|
||||
]]>
|
||||
</attach>
|
||||
<attach name="resize">
|
||||
if(!self.iframe)return;
|
||||
self.iframe.style.width=hc.get_client_width()+"px";
|
||||
self.iframe.style.height=hc.get_client_height()+"px";
|
||||
</attach>
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="insertchars_dialog" />
|
||||
|
||||
|
||||
</jsml>
|
||||
785
LPWeb20/RichtextEditor/aspnet/resx/ColorPicker_IE.css
Normal file
@@ -0,0 +1,785 @@
|
||||
|
||||
/*
|
||||
-----------------------------------------------------
|
||||
Author: Lewis E. Moten III
|
||||
Date: May, 16, 2004
|
||||
Homepage: http://www.lewismoten.com
|
||||
Email: lewis@moten.com
|
||||
-----------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
|
||||
*/
|
||||
|
||||
#pnlRecent DIV
|
||||
{
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border: solid 1px black;
|
||||
background-color: ButtonFace;
|
||||
}
|
||||
#pnlRecentBorder DIV
|
||||
{
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border: 1px inset;
|
||||
background-color: ButtonFace;
|
||||
}
|
||||
#pnlRecentBorder
|
||||
{
|
||||
top: 222px;
|
||||
left: 316px;
|
||||
width: 160px;
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
#pnlRecent
|
||||
{
|
||||
top: 223px;
|
||||
left: 317px;
|
||||
width: 160px;
|
||||
height: 70px;
|
||||
}
|
||||
#lblRecent
|
||||
{
|
||||
top: 204px;
|
||||
left: 317px;
|
||||
width: 80px;
|
||||
height: 16px;
|
||||
}
|
||||
#pnlRecent1{top: 0px;left: 0px;}
|
||||
#pnlRecent2{top: 0px;left: 20px;}
|
||||
#pnlRecent3{top: 0px;left: 40px;}
|
||||
#pnlRecent4{top: 0px;left: 60px;}
|
||||
#pnlRecent5{top: 0px;left: 80px;}
|
||||
#pnlRecent6{top: 0px;left: 100px;}
|
||||
#pnlRecent7{top: 0px;left: 120px;}
|
||||
#pnlRecent8{top: 0px;left: 140px;}
|
||||
|
||||
#pnlRecent9{top: 18px;left: 0px;}
|
||||
#pnlRecent10{top: 18px;left: 20px;}
|
||||
#pnlRecent11{top: 18px;left: 40px;}
|
||||
#pnlRecent12{top: 18px;left: 60px;}
|
||||
#pnlRecent13{top: 18px;left: 80px;}
|
||||
#pnlRecent14{top: 18px;left: 100px;}
|
||||
#pnlRecent15{top: 18px;left: 120px;}
|
||||
#pnlRecent16{top: 18px;left: 140px;}
|
||||
|
||||
#pnlRecent17{top: 36px;left: 0px;}
|
||||
#pnlRecent18{top: 36px;left: 20px;}
|
||||
#pnlRecent19{top: 36px;left: 40px;}
|
||||
#pnlRecent20{top: 36px;left: 60px;}
|
||||
#pnlRecent21{top: 36px;left: 80px;}
|
||||
#pnlRecent22{top: 36px;left: 100px;}
|
||||
#pnlRecent23{top: 36px;left: 120px;}
|
||||
#pnlRecent24{top: 36px;left: 140px;}
|
||||
|
||||
#pnlRecent25{top: 54px;left: 0px;}
|
||||
#pnlRecent26{top: 54px;left: 20px;}
|
||||
#pnlRecent27{top: 54px;left: 40px;}
|
||||
#pnlRecent28{top: 54px;left: 60px;}
|
||||
#pnlRecent29{top: 54px;left: 80px;}
|
||||
#pnlRecent30{top: 54px;left: 100px;}
|
||||
#pnlRecent31{top: 54px;left: 120px;}
|
||||
#pnlRecent32{top: 54px;left: 140px;}
|
||||
|
||||
#pnlRecentBorder1{top: 0px;left: 0px;}
|
||||
#pnlRecentBorder2{top: 0px;left: 20px;}
|
||||
#pnlRecentBorder3{top: 0px;left: 40px;}
|
||||
#pnlRecentBorder4{top: 0px;left: 60px;}
|
||||
#pnlRecentBorder5{top: 0px;left: 80px;}
|
||||
#pnlRecentBorder6{top: 0px;left: 100px;}
|
||||
#pnlRecentBorder7{top: 0px;left: 120px;}
|
||||
#pnlRecentBorder8{top: 0px;left: 140px;}
|
||||
|
||||
#pnlRecentBorder9{top: 18px;left: 0px;}
|
||||
#pnlRecentBorder10{top: 18px;left: 20px;}
|
||||
#pnlRecentBorder11{top: 18px;left: 40px;}
|
||||
#pnlRecentBorder12{top: 18px;left: 60px;}
|
||||
#pnlRecentBorder13{top: 18px;left: 80px;}
|
||||
#pnlRecentBorder14{top: 18px;left: 100px;}
|
||||
#pnlRecentBorder15{top: 18px;left: 120px;}
|
||||
#pnlRecentBorder16{top: 18px;left: 140px;}
|
||||
|
||||
#pnlRecentBorder17{top: 36px;left: 0px;}
|
||||
#pnlRecentBorder18{top: 36px;left: 20px;}
|
||||
#pnlRecentBorder19{top: 36px;left: 40px;}
|
||||
#pnlRecentBorder20{top: 36px;left: 60px;}
|
||||
#pnlRecentBorder21{top: 36px;left: 80px;}
|
||||
#pnlRecentBorder22{top: 36px;left: 100px;}
|
||||
#pnlRecentBorder23{top: 36px;left: 120px;}
|
||||
#pnlRecentBorder24{top: 36px;left: 140px;}
|
||||
|
||||
#pnlRecentBorder25{top: 54px;left: 0px;}
|
||||
#pnlRecentBorder26{top: 54px;left: 20px;}
|
||||
#pnlRecentBorder27{top: 54px;left: 40px;}
|
||||
#pnlRecentBorder28{top: 54px;left: 60px;}
|
||||
#pnlRecentBorder29{top: 54px;left: 80px;}
|
||||
#pnlRecentBorder30{top: 54px;left: 100px;}
|
||||
#pnlRecentBorder31{top: 54px;left: 120px;}
|
||||
#pnlRecentBorder32{top: 54px;left: 140px;}
|
||||
|
||||
#pnlVerticalRgb_Start
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
background-color: white;
|
||||
z-index: 3;
|
||||
}
|
||||
#pnlVerticalRgb_End
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
background-color: cyan;
|
||||
z-index: 4;
|
||||
FILTER: Alpha(Opacity=0, FinishOpacity=100, Style=1, startX=0, finishX=0, startY=0, finishY=100);
|
||||
}
|
||||
#pnlGradientRgb_Base
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
z-index: 3;
|
||||
background-image: url(../images/cpie_gradients.png);
|
||||
}
|
||||
#pnlGradientRgb_Overlay1
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
z-index: 5;
|
||||
background-color: White;
|
||||
FILTER: Alpha(Opacity=0, FinishOpacity=100, Style=0, startX=0, finishX=0, startY=0, finishY=100);
|
||||
}
|
||||
#pnlGradientRgb_Overlay2
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
z-index: 6;
|
||||
background-color: Black;
|
||||
FILTER: Alpha(Opacity=0, FinishOpacity=100, Style=1, startX=0, finishX=0, startY=0, finishY=100);
|
||||
}
|
||||
#pnlGradientRgb_Invert
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
z-index: 4;
|
||||
background-image: url(../images/cpie_gradients.png);
|
||||
filter: flipH() flipV() invert() Alpha(Opacity=50);
|
||||
}
|
||||
#pnlVerticalHsbBrightness_Black
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
background-color: Black;
|
||||
FILTER: Alpha(Opacity=100, FinishOpacity=0, Style=1, startY=100, finishY=0, startX=0, finishX=0);
|
||||
z-index: 4;
|
||||
}
|
||||
#pnlVerticalHsbBrightness_Hue
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
background-color: 0006FF;
|
||||
z-index: 3;
|
||||
}
|
||||
/*
|
||||
=====================================================
|
||||
*/
|
||||
#pnlVerticalHsbSaturation_White
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
background-color: White;
|
||||
FILTER: Alpha(Opacity=100, FinishOpacity=0, Style=1, startY=100, finishY=0, startX=0, finishX=0);
|
||||
z-index: 4;
|
||||
}
|
||||
#pnlVerticalHsbSaturation_Hue
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
background-color: 0006FF;
|
||||
z-index: 3;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------
|
||||
Buttons
|
||||
--------------------------------------------
|
||||
*/
|
||||
#btnOK
|
||||
{
|
||||
top: 10px;
|
||||
left: 390px;
|
||||
border: 2px bevel;
|
||||
width: 81px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
#btnCancel
|
||||
{
|
||||
top: 38px;
|
||||
left: 390px;
|
||||
color: ButtonText;
|
||||
border: 2px bevel;
|
||||
width: 81px;
|
||||
height: 20px;
|
||||
}
|
||||
#btnWebSafeColor
|
||||
{
|
||||
border-style: none;
|
||||
border-width: 0px;
|
||||
background-image: url(../images/cpie_WebSafe.gif);
|
||||
width: 11px;
|
||||
height: 12px;
|
||||
left: 347px;
|
||||
top: 11px;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------
|
||||
Basic Controls
|
||||
--------------------------------------------
|
||||
*/
|
||||
#lblSelectColorMessage
|
||||
{
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
}
|
||||
#pnlOldColor
|
||||
{
|
||||
top: 65px;
|
||||
left: 317px;
|
||||
border-left: 1px solid black;
|
||||
border-bottom: 1px solid black;
|
||||
border-right: 1px solid black;
|
||||
background-color: 00013A;
|
||||
width: 60px;
|
||||
height: 34px;
|
||||
z-index: 2;
|
||||
}
|
||||
#pnlOldColorBorder
|
||||
{
|
||||
top: 65px;
|
||||
left: 316px;
|
||||
border-left: 1px solid ThreeDShadow;
|
||||
border-bottom: 1px solid ThreeDHighlight;
|
||||
border-right: 1px solid ThreeDHighlight;
|
||||
width: 62px;
|
||||
height: 35px;
|
||||
z-index: 1;
|
||||
}
|
||||
#pnlNewColor
|
||||
{
|
||||
background-color: #2729AD;
|
||||
top: 31px;
|
||||
left: 317px;
|
||||
border-left: 1px solid black;
|
||||
border-top: 1px solid black;
|
||||
border-right: 1px solid black;
|
||||
width: 60px;
|
||||
height: 34px;
|
||||
z-index: 2;
|
||||
}
|
||||
#pnlNewColorBorder
|
||||
{
|
||||
top: 30px;
|
||||
left: 316px;
|
||||
border-left: 1px solid ThreeDShadow;
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
border-right: 1px solid ThreeDHighlight;
|
||||
width: 62px;
|
||||
height: 35px;
|
||||
z-index: 1;
|
||||
}
|
||||
#pnlWebSafeColor
|
||||
{
|
||||
top: 11px;
|
||||
left: 363px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border: solid 1px black;
|
||||
background-color: #333399;
|
||||
z-index: 2;
|
||||
}
|
||||
#pnlWebSafeColorBorder
|
||||
{
|
||||
top: 10px;
|
||||
left: 362px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border-left: 1px solid ThreeDShadow;
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
border-right: 1px solid ThreeDHighlight;
|
||||
border-bottom: 1px solid ThreeDHighlight;
|
||||
z-index: 1;
|
||||
}
|
||||
#pnlVerticalPosition
|
||||
{
|
||||
width: 35px;
|
||||
height: 11px;
|
||||
background-image: url(../images/cpie_VerticalPosition.gif);
|
||||
left: 274px;
|
||||
top: 113px;
|
||||
}
|
||||
#pnlGradientPosition
|
||||
{
|
||||
width: 256px;
|
||||
height: 256px;
|
||||
background-image: url(../images/cpie_GradientPositionLight.gif);
|
||||
background-repeat: no-repeat;
|
||||
left: 12px;
|
||||
top: 32px;
|
||||
z-index: 98;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------
|
||||
Gradient
|
||||
--------------------------------------------
|
||||
*/
|
||||
#pnlGradient_Top
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
cursor: url(../images/cpie_Color.cur);
|
||||
z-index: 99;
|
||||
}
|
||||
.GradientNormal
|
||||
{
|
||||
}
|
||||
.GradientFullScreen
|
||||
{
|
||||
top: 0px ! important;
|
||||
left: 0px ! important;
|
||||
height: 100% ! important;
|
||||
width: 100% ! important;
|
||||
z-index: 100;
|
||||
cursor: url(../images/cpie_Color.cur) ! important;
|
||||
|
||||
}
|
||||
#pnlGradient_Background2
|
||||
{
|
||||
top: 31px;
|
||||
left: 11px;
|
||||
height: 258px;
|
||||
width: 258px;
|
||||
z-index: 2;
|
||||
border: solid 1px black;
|
||||
}
|
||||
#pnlGradient_Background1
|
||||
{
|
||||
top: 30px;
|
||||
left: 10px;
|
||||
height: 260px;
|
||||
width: 260px;
|
||||
z-index: 1;
|
||||
border: solid 1px;
|
||||
border-top-color: ThreeDShadow;
|
||||
border-left-color: ThreeDShadow;
|
||||
border-bottom-color: ThreeDHighlight;
|
||||
border-right-color: ThreeDHighlight;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------
|
||||
Vertical Bar
|
||||
--------------------------------------------
|
||||
*/
|
||||
#pnlVertical_Top
|
||||
{
|
||||
left: 272px;
|
||||
width: 39px;
|
||||
z-index: 98;
|
||||
top: 0px;
|
||||
height: 310px;
|
||||
}
|
||||
/*
|
||||
top:32px;
|
||||
height: 256px;
|
||||
*/
|
||||
|
||||
#pnlVertical_Background2
|
||||
{
|
||||
top: 31px;
|
||||
left: 281px;
|
||||
height: 258px;
|
||||
width: 21px;
|
||||
z-index: 2;
|
||||
border: solid 1px black;
|
||||
}
|
||||
#pnlVertical_Background1
|
||||
{
|
||||
top: 30px;
|
||||
left: 280px;
|
||||
height: 260px;
|
||||
width: 23px;
|
||||
z-index: 1;
|
||||
border: solid 1px;
|
||||
border-top-color: ThreeDShadow;
|
||||
border-left-color: ThreeDShadow;
|
||||
border-bottom-color: ThreeDHighlight;
|
||||
border-right-color: ThreeDHighlight;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------------------
|
||||
Color Mode: Hue / Saturation / Brightness (HSB)
|
||||
--------------------------------------------------------
|
||||
*/
|
||||
#pnlVerticalHsbHue_Background
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 19px;
|
||||
width: 256px;
|
||||
z-index: 3;
|
||||
background-image: url(../images/cpie_gradients.png);
|
||||
filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
||||
}
|
||||
#pnlGradientHsbHue_Black
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
background-color: Black;
|
||||
FILTER: Alpha(Opacity=100, FinishOpacity=0, Style=1, startY=100, finishY=0, startX=0, finishX=0);
|
||||
z-index: 5;
|
||||
}
|
||||
#pnlGradientHsbHue_White
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
background-color: White;
|
||||
FILTER: Alpha(Opacity=100, FinishOpacity=0, Style=1, startX=0, finishX=100, startY=0, finishY=0);
|
||||
z-index: 4;
|
||||
}
|
||||
#pnlGradientHsbHue_Hue
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
background-color: 0006FF;
|
||||
z-index: 3;
|
||||
}
|
||||
#pnlHSB
|
||||
{
|
||||
top: 115px;
|
||||
left: 317px;
|
||||
width: 80px;
|
||||
height: 75px;
|
||||
}
|
||||
#pnlHSB_Hue
|
||||
{
|
||||
top: 0px;
|
||||
width: 80px;
|
||||
height: 22px;
|
||||
}
|
||||
#pnlHSB_Saturation
|
||||
{
|
||||
top: 25px;
|
||||
width: 80px;
|
||||
height: 22px;
|
||||
}
|
||||
#pnlHSB_Brightness
|
||||
{
|
||||
top: 50px;
|
||||
width: 80px;
|
||||
height: 22px;
|
||||
}
|
||||
#rdoHSB_Hue
|
||||
{
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
top: 5px;
|
||||
left: 0px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
#lblHSB_Hue
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-top: 4px;
|
||||
padding-left: 16px;
|
||||
height: 22px;
|
||||
width: 37px;
|
||||
}
|
||||
#txtHSB_Hue
|
||||
{
|
||||
top: 0px;
|
||||
left: 37px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 31px;
|
||||
height: 22px;
|
||||
}
|
||||
#lblUnitHSB_Hue
|
||||
{
|
||||
top: 4px;
|
||||
left: 70px;
|
||||
font-size: 10pt;
|
||||
}
|
||||
#rdoHSB_Saturation
|
||||
{
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
top: 5px;
|
||||
left: 0px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
#lblHSB_Saturation
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-top: 4px;
|
||||
padding-left: 16px;
|
||||
height: 22px;
|
||||
width: 37px;
|
||||
}
|
||||
#txtHSB_Saturation
|
||||
{
|
||||
top: 0px;
|
||||
left: 37px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 31px;
|
||||
height: 22px;
|
||||
}
|
||||
#lblUnitHSB_Saturation
|
||||
{
|
||||
top: 4px;
|
||||
left: 70px;
|
||||
}
|
||||
#rdoHSB_Brightness
|
||||
{
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
top: 5px;
|
||||
left: 0px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
#lblHSB_Brightness
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-top: 4px;
|
||||
padding-left: 16px;
|
||||
height: 22px;
|
||||
width: 37px;
|
||||
}
|
||||
#txtHSB_Brightness
|
||||
{
|
||||
top: 0px;
|
||||
left: 37px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 31px;
|
||||
height: 22px;
|
||||
}
|
||||
#lblUnitHSB_Brightness
|
||||
{
|
||||
top: 4px;
|
||||
left: 70px;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------------------
|
||||
Color Mode: Red / Green / Blue (RGB a.k.a. additive)
|
||||
--------------------------------------------------------
|
||||
*/
|
||||
#pnlRGB
|
||||
{
|
||||
top: 115px;
|
||||
left: 400px;
|
||||
width: 75px;
|
||||
height: 75px;
|
||||
}
|
||||
#pnlRGB_Red
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 75px;
|
||||
height: 22px;
|
||||
}
|
||||
#pnlRGB_Green
|
||||
{
|
||||
top: 25px;
|
||||
left: 0px;
|
||||
width: 75px;
|
||||
height: 22px;
|
||||
}
|
||||
#pnlRGB_Blue
|
||||
{
|
||||
top: 50px;
|
||||
left: 0px;
|
||||
width: 75px;
|
||||
height: 22px;
|
||||
}
|
||||
#rdoRGB_Red
|
||||
{
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
top: 5px;
|
||||
left: 0px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
#lblRGB_Red
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-top: 4px;
|
||||
padding-left: 16px;
|
||||
height: 22px;
|
||||
width: 37px;
|
||||
}
|
||||
#txtRGB_Red
|
||||
{
|
||||
top: 0px;
|
||||
left: 37px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 31px;
|
||||
height: 22px;
|
||||
}
|
||||
#rdoRGB_Green
|
||||
{
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
top: 5px;
|
||||
left: 0px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
#lblRGB_Green
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-top: 4px;
|
||||
padding-left: 16px;
|
||||
height: 22px;
|
||||
width: 37px;
|
||||
}
|
||||
#txtRGB_Green
|
||||
{
|
||||
top: 0px;
|
||||
left: 37px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 31px;
|
||||
height: 22px;
|
||||
}
|
||||
#rdoRGB_Blue
|
||||
{
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
top: 5px;
|
||||
left: 0px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
#lblRGB_Blue
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-top: 4px;
|
||||
padding-left: 16px;
|
||||
height: 22px;
|
||||
width: 37px;
|
||||
}
|
||||
#txtRGB_Blue
|
||||
{
|
||||
top: 0px;
|
||||
left: 37px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 31px;
|
||||
height: 22px;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------------------
|
||||
Color Mode: Hex (Hex values of RGB a.k.a. HTML Color value)
|
||||
--------------------------------------------------------
|
||||
*/
|
||||
#lblHex
|
||||
{
|
||||
top: 195px;
|
||||
left: 400px;
|
||||
}
|
||||
#txtHex
|
||||
{
|
||||
top: 195px;
|
||||
left: 412px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 56px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#colorpickerpanel DIV
|
||||
{
|
||||
position: absolute;
|
||||
font-family: "Photoshop Large", Arial;
|
||||
font-size: 8pt;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
overflow: hidden;
|
||||
}
|
||||
#colorpickerpanel INPUT
|
||||
{
|
||||
position: absolute;
|
||||
font-family: "Photoshop Large", Arial;
|
||||
font-size: 8pt;
|
||||
color: WindowText;
|
||||
background-color: Window;
|
||||
cursor: text;
|
||||
text-align: right;
|
||||
}
|
||||
#colorpickerpanel BUTTON
|
||||
{
|
||||
position: absolute;
|
||||
font-family: "Photoshop Large", Arial;
|
||||
font-size: 8pt;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
background-color:ButtonFace;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#btnOK
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
#btnCancel
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
790
LPWeb20/RichtextEditor/aspnet/resx/ColorPicker_NS.css
Normal file
@@ -0,0 +1,790 @@
|
||||
|
||||
/*
|
||||
-----------------------------------------------------
|
||||
Author: Lewis E. Moten III
|
||||
Date: May, 16, 2004
|
||||
Homepage: http://www.lewismoten.com
|
||||
Email: lewis@moten.com
|
||||
-----------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
|
||||
*/
|
||||
|
||||
#pnlRecent DIV
|
||||
{
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border: solid 1px black;
|
||||
background-color: ButtonFace;
|
||||
}
|
||||
#pnlRecentBorder DIV
|
||||
{
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-left: 1px solid ThreeDShadow;
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
border-right: 1px solid ThreeDHighlight;
|
||||
border-bottom: 1px solid ThreeDHighlight;
|
||||
background-color: ButtonFace;
|
||||
}
|
||||
#pnlRecentBorder
|
||||
{
|
||||
top: 222px;
|
||||
left: 316px;
|
||||
width: 160px;
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
#pnlRecent
|
||||
{
|
||||
top: 223px;
|
||||
left: 317px;
|
||||
width: 160px;
|
||||
height: 70px;
|
||||
}
|
||||
#lblRecent
|
||||
{
|
||||
top: 204px;
|
||||
left: 317px;
|
||||
width: 80px;
|
||||
height: 16px;
|
||||
}
|
||||
#pnlRecent1{top: 0px;left: 0px;}
|
||||
#pnlRecent2{top: 0px;left: 20px;}
|
||||
#pnlRecent3{top: 0px;left: 40px;}
|
||||
#pnlRecent4{top: 0px;left: 60px;}
|
||||
#pnlRecent5{top: 0px;left: 80px;}
|
||||
#pnlRecent6{top: 0px;left: 100px;}
|
||||
#pnlRecent7{top: 0px;left: 120px;}
|
||||
#pnlRecent8{top: 0px;left: 140px;}
|
||||
|
||||
#pnlRecent9{top: 18px;left: 0px;}
|
||||
#pnlRecent10{top: 18px;left: 20px;}
|
||||
#pnlRecent11{top: 18px;left: 40px;}
|
||||
#pnlRecent12{top: 18px;left: 60px;}
|
||||
#pnlRecent13{top: 18px;left: 80px;}
|
||||
#pnlRecent14{top: 18px;left: 100px;}
|
||||
#pnlRecent15{top: 18px;left: 120px;}
|
||||
#pnlRecent16{top: 18px;left: 140px;}
|
||||
|
||||
#pnlRecent17{top: 36px;left: 0px;}
|
||||
#pnlRecent18{top: 36px;left: 20px;}
|
||||
#pnlRecent19{top: 36px;left: 40px;}
|
||||
#pnlRecent20{top: 36px;left: 60px;}
|
||||
#pnlRecent21{top: 36px;left: 80px;}
|
||||
#pnlRecent22{top: 36px;left: 100px;}
|
||||
#pnlRecent23{top: 36px;left: 120px;}
|
||||
#pnlRecent24{top: 36px;left: 140px;}
|
||||
|
||||
#pnlRecent25{top: 54px;left: 0px;}
|
||||
#pnlRecent26{top: 54px;left: 20px;}
|
||||
#pnlRecent27{top: 54px;left: 40px;}
|
||||
#pnlRecent28{top: 54px;left: 60px;}
|
||||
#pnlRecent29{top: 54px;left: 80px;}
|
||||
#pnlRecent30{top: 54px;left: 100px;}
|
||||
#pnlRecent31{top: 54px;left: 120px;}
|
||||
#pnlRecent32{top: 54px;left: 140px;}
|
||||
|
||||
#pnlRecentBorder1{top: 0px;left: 0px;}
|
||||
#pnlRecentBorder2{top: 0px;left: 20px;}
|
||||
#pnlRecentBorder3{top: 0px;left: 40px;}
|
||||
#pnlRecentBorder4{top: 0px;left: 60px;}
|
||||
#pnlRecentBorder5{top: 0px;left: 80px;}
|
||||
#pnlRecentBorder6{top: 0px;left: 100px;}
|
||||
#pnlRecentBorder7{top: 0px;left: 120px;}
|
||||
#pnlRecentBorder8{top: 0px;left: 140px;}
|
||||
|
||||
#pnlRecentBorder9{top: 18px;left: 0px;}
|
||||
#pnlRecentBorder10{top: 18px;left: 20px;}
|
||||
#pnlRecentBorder11{top: 18px;left: 40px;}
|
||||
#pnlRecentBorder12{top: 18px;left: 60px;}
|
||||
#pnlRecentBorder13{top: 18px;left: 80px;}
|
||||
#pnlRecentBorder14{top: 18px;left: 100px;}
|
||||
#pnlRecentBorder15{top: 18px;left: 120px;}
|
||||
#pnlRecentBorder16{top: 18px;left: 140px;}
|
||||
|
||||
#pnlRecentBorder17{top: 36px;left: 0px;}
|
||||
#pnlRecentBorder18{top: 36px;left: 20px;}
|
||||
#pnlRecentBorder19{top: 36px;left: 40px;}
|
||||
#pnlRecentBorder20{top: 36px;left: 60px;}
|
||||
#pnlRecentBorder21{top: 36px;left: 80px;}
|
||||
#pnlRecentBorder22{top: 36px;left: 100px;}
|
||||
#pnlRecentBorder23{top: 36px;left: 120px;}
|
||||
#pnlRecentBorder24{top: 36px;left: 140px;}
|
||||
|
||||
#pnlRecentBorder25{top: 54px;left: 0px;}
|
||||
#pnlRecentBorder26{top: 54px;left: 20px;}
|
||||
#pnlRecentBorder27{top: 54px;left: 40px;}
|
||||
#pnlRecentBorder28{top: 54px;left: 60px;}
|
||||
#pnlRecentBorder29{top: 54px;left: 80px;}
|
||||
#pnlRecentBorder30{top: 54px;left: 100px;}
|
||||
#pnlRecentBorder31{top: 54px;left: 120px;}
|
||||
#pnlRecentBorder32{top: 54px;left: 140px;}
|
||||
|
||||
#pnlVerticalRgb_Start
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
background-color: white;
|
||||
z-index: 3;
|
||||
}
|
||||
#pnlVerticalRgb_End
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
background-color: cyan;
|
||||
z-index: 4;
|
||||
FILTER: Alpha(Opacity=0, FinishOpacity=100, Style=1, startX=0, finishX=0, startY=0, finishY=100);
|
||||
}
|
||||
#pnlGradientRgb_Base
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
z-index: 3;
|
||||
background-image: url(../images/cpns_gradients.png);
|
||||
}
|
||||
#pnlGradientRgb_Overlay1
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
z-index: 5;
|
||||
background-color: White;
|
||||
FILTER: Alpha(Opacity=0, FinishOpacity=100, Style=0, startX=0, finishX=0, startY=0, finishY=100);
|
||||
}
|
||||
#pnlGradientRgb_Overlay2
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
z-index: 6;
|
||||
background-color: Black;
|
||||
FILTER: Alpha(Opacity=0, FinishOpacity=100, Style=1, startX=0, finishX=0, startY=0, finishY=100);
|
||||
}
|
||||
#pnlGradientRgb_Invert
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
z-index: 4;
|
||||
background-image: url(../images/cpns_gradients.png);
|
||||
filter: flipH() flipV() invert() Alpha(Opacity=50);
|
||||
}
|
||||
#pnlVerticalHsbBrightness_Black
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
background-color: Black;
|
||||
FILTER: Alpha(Opacity=100, FinishOpacity=0, Style=1, startY=100, finishY=0, startX=0, finishX=0);
|
||||
z-index: 4;
|
||||
}
|
||||
#pnlVerticalHsbBrightness_Hue
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
background-color: 0006FF;
|
||||
z-index: 3;
|
||||
}
|
||||
/*
|
||||
=====================================================
|
||||
*/
|
||||
#pnlVerticalHsbSaturation_White
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
background-color: White;
|
||||
FILTER: Alpha(Opacity=100, FinishOpacity=0, Style=1, startY=100, finishY=0, startX=0, finishX=0);
|
||||
z-index: 4;
|
||||
}
|
||||
#pnlVerticalHsbSaturation_Hue
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
background-color: 0006FF;
|
||||
z-index: 3;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------
|
||||
Buttons
|
||||
--------------------------------------------
|
||||
*/
|
||||
#btnOK
|
||||
{
|
||||
top: 10px;
|
||||
left: 390px;
|
||||
border: 2px bevel;
|
||||
width: 81px;
|
||||
height: 20px;
|
||||
}
|
||||
#btnAbout
|
||||
{
|
||||
top: 79px;
|
||||
left: 390px;
|
||||
color: ButtonText;
|
||||
border: 2px bevel;
|
||||
width: 81px;
|
||||
height: 20px;
|
||||
}
|
||||
#btnCancel
|
||||
{
|
||||
top: 38px;
|
||||
left: 390px;
|
||||
color: ButtonText;
|
||||
border: 2px bevel;
|
||||
width: 81px;
|
||||
height: 20px;
|
||||
}
|
||||
#btnWebSafeColor
|
||||
{
|
||||
border-style: none;
|
||||
border-width: 0px;
|
||||
background-image: url(../images/cpns_WebSafe.gif);
|
||||
background-repeat: no-repeat;
|
||||
width: 11px;
|
||||
height: 12px;
|
||||
left: 347px;
|
||||
top: 11px;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------
|
||||
Basic Controls
|
||||
--------------------------------------------
|
||||
*/
|
||||
#lblSelectColorMessage
|
||||
{
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
}
|
||||
#pnlOldColor
|
||||
{
|
||||
top: 65px;
|
||||
left: 317px;
|
||||
border-left: 1px solid black;
|
||||
border-bottom: 1px solid black;
|
||||
border-right: 1px solid black;
|
||||
background-color: 00013A;
|
||||
width: 60px;
|
||||
height: 34px;
|
||||
z-index: 2;
|
||||
}
|
||||
#pnlOldColorBorder
|
||||
{
|
||||
top: 65px;
|
||||
left: 316px;
|
||||
border-left: 1px solid ThreeDShadow;
|
||||
border-bottom: 1px solid ThreeDHighlight;
|
||||
border-right: 1px solid ThreeDHighlight;
|
||||
width: 62px;
|
||||
height: 35px;
|
||||
z-index: 1;
|
||||
}
|
||||
#pnlNewColor
|
||||
{
|
||||
background-color: #2729AD;
|
||||
top: 31px;
|
||||
left: 317px;
|
||||
border-left: 1px solid black;
|
||||
border-top: 1px solid black;
|
||||
border-right: 1px solid black;
|
||||
width: 60px;
|
||||
height: 34px;
|
||||
z-index: 2;
|
||||
}
|
||||
#pnlNewColorBorder
|
||||
{
|
||||
top: 30px;
|
||||
left: 316px;
|
||||
border-left: 1px solid ThreeDShadow;
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
border-right: 1px solid ThreeDHighlight;
|
||||
width: 62px;
|
||||
height: 35px;
|
||||
z-index: 1;
|
||||
}
|
||||
#pnlWebSafeColor
|
||||
{
|
||||
top: 11px;
|
||||
left: 363px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border: solid 1px black;
|
||||
background-color: #333399;
|
||||
z-index: 2;
|
||||
}
|
||||
#pnlWebSafeColorBorder
|
||||
{
|
||||
top: 10px;
|
||||
left: 362px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border-left: 1px solid ThreeDShadow;
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
border-right: 1px solid ThreeDHighlight;
|
||||
border-bottom: 1px solid ThreeDHighlight;
|
||||
z-index: 1;
|
||||
}
|
||||
#pnlVerticalPosition
|
||||
{
|
||||
width: 35px;
|
||||
height: 11px;
|
||||
background-image: url(../images/cpns_VerticalPosition.gif);
|
||||
left: 274px;
|
||||
top: 113px;
|
||||
}
|
||||
#pnlGradientPosition
|
||||
{
|
||||
width: 256px;
|
||||
height: 256px;
|
||||
background-image: url(../images/cpns_GradientPositionLight.gif);
|
||||
background-repeat: no-repeat;
|
||||
left: 12px;
|
||||
top: 32px;
|
||||
z-index: 98;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------
|
||||
Gradient
|
||||
--------------------------------------------
|
||||
*/
|
||||
#pnlGradient_Top
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
cursor: url(../images/cpns_Color.cur);
|
||||
z-index: 99;
|
||||
}
|
||||
.GradientNormal
|
||||
{
|
||||
}
|
||||
.GradientFullScreen
|
||||
{
|
||||
top: 0px ! important;
|
||||
left: 0px ! important;
|
||||
height: 100% ! important;
|
||||
width: 100% ! important;
|
||||
z-index: 100;
|
||||
cursor: url(../images/cpns_Color.cur) ! important;
|
||||
|
||||
}
|
||||
#imgGradient
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
z-index: 4;
|
||||
position: absolute;
|
||||
}
|
||||
#pnlGradient_Background2
|
||||
{
|
||||
top: 31px;
|
||||
left: 11px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
z-index: 2;
|
||||
border: solid 1px black;
|
||||
}
|
||||
#pnlGradient_Background1
|
||||
{
|
||||
top: 30px;
|
||||
left: 10px;
|
||||
height: 258px;
|
||||
width: 258px;
|
||||
z-index: 1;
|
||||
border: solid 1px;
|
||||
border-top-color: ThreeDShadow;
|
||||
border-left-color: ThreeDShadow;
|
||||
border-bottom-color: ThreeDHighlight;
|
||||
border-right-color: ThreeDHighlight;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------
|
||||
Vertical Bar
|
||||
--------------------------------------------
|
||||
*/
|
||||
#pnlVertical_Top
|
||||
{
|
||||
left: 272px;
|
||||
width: 39px;
|
||||
z-index: 98;
|
||||
top: 0px;
|
||||
height: 310px;
|
||||
}
|
||||
/*
|
||||
top:32px;
|
||||
height: 256px;
|
||||
*/
|
||||
|
||||
#pnlVertical_Background2
|
||||
{
|
||||
top: 31px;
|
||||
left: 281px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
z-index: 2;
|
||||
border: solid 1px black;
|
||||
}
|
||||
#pnlVertical_Background1
|
||||
{
|
||||
top: 30px;
|
||||
left: 280px;
|
||||
height: 256px;
|
||||
width: 21px;
|
||||
z-index: 1;
|
||||
border: solid 1px;
|
||||
border-top-color: ThreeDShadow;
|
||||
border-left-color: ThreeDShadow;
|
||||
border-bottom-color: ThreeDHighlight;
|
||||
border-right-color: ThreeDHighlight;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------------------
|
||||
Color Mode: Hue / Saturation / Brightness (HSB)
|
||||
--------------------------------------------------------
|
||||
*/
|
||||
#pnlVerticalHsbHue_Background
|
||||
{
|
||||
top: 32px;
|
||||
left: 282px;
|
||||
height: 256px;
|
||||
width: 19px;
|
||||
z-index: 3;
|
||||
background-image: url(../images/cpns_hue2.png);
|
||||
}
|
||||
#pnlGradientHsbHue_Black
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
background-color: Black;
|
||||
FILTER: Alpha(Opacity=100, FinishOpacity=0, Style=1, startY=100, finishY=0, startX=0, finishX=0);
|
||||
z-index: 5;
|
||||
}
|
||||
#pnlGradientHsbHue_White
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
background-color: White;
|
||||
FILTER: Alpha(Opacity=100, FinishOpacity=0, Style=1, startX=0, finishX=100, startY=0, finishY=0);
|
||||
z-index: 4;
|
||||
}
|
||||
#pnlGradientHsbHue_Hue
|
||||
{
|
||||
top: 32px;
|
||||
left: 12px;
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
background-color: 0006FF;
|
||||
z-index: 3;
|
||||
}
|
||||
#pnlHSB
|
||||
{
|
||||
top: 115px;
|
||||
left: 317px;
|
||||
width: 80px;
|
||||
height: 75px;
|
||||
}
|
||||
#pnlHSB_Hue
|
||||
{
|
||||
top: 0px;
|
||||
width: 80px;
|
||||
height: 22px;
|
||||
}
|
||||
#pnlHSB_Saturation
|
||||
{
|
||||
top: 25px;
|
||||
width: 80px;
|
||||
height: 22px;
|
||||
}
|
||||
#pnlHSB_Brightness
|
||||
{
|
||||
top: 50px;
|
||||
width: 80px;
|
||||
height: 22px;
|
||||
}
|
||||
#rdoHSB_Hue
|
||||
{
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
top: 2px;
|
||||
left: -3px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
#lblHSB_Hue
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-top: 4px;
|
||||
padding-left: 16px;
|
||||
height: 22px;
|
||||
width: 37px;
|
||||
}
|
||||
#txtHSB_Hue
|
||||
{
|
||||
top: 0px;
|
||||
left: 37px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 31px;
|
||||
height: 22px;
|
||||
}
|
||||
#lblUnitHSB_Hue
|
||||
{
|
||||
top: 4px;
|
||||
left: 70px;
|
||||
font-size: 10pt;
|
||||
}
|
||||
#rdoHSB_Saturation
|
||||
{
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
top: 2px;
|
||||
left: -3px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
#lblHSB_Saturation
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-top: 4px;
|
||||
padding-left: 16px;
|
||||
height: 22px;
|
||||
width: 37px;
|
||||
}
|
||||
#txtHSB_Saturation
|
||||
{
|
||||
top: 0px;
|
||||
left: 37px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 31px;
|
||||
height: 22px;
|
||||
}
|
||||
#lblUnitHSB_Saturation
|
||||
{
|
||||
top: 4px;
|
||||
left: 70px;
|
||||
}
|
||||
#rdoHSB_Brightness
|
||||
{
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
top: 2px;
|
||||
left: -3px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
#lblHSB_Brightness
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-top: 4px;
|
||||
padding-left: 16px;
|
||||
height: 22px;
|
||||
width: 37px;
|
||||
}
|
||||
#txtHSB_Brightness
|
||||
{
|
||||
top: 0px;
|
||||
left: 37px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 31px;
|
||||
height: 22px;
|
||||
}
|
||||
#lblUnitHSB_Brightness
|
||||
{
|
||||
top: 4px;
|
||||
left: 70px;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------------------
|
||||
Color Mode: Red / Green / Blue (RGB a.k.a. additive)
|
||||
--------------------------------------------------------
|
||||
*/
|
||||
#pnlRGB
|
||||
{
|
||||
top: 115px;
|
||||
left: 400px;
|
||||
width: 75px;
|
||||
height: 75px;
|
||||
}
|
||||
#pnlRGB_Red
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 75px;
|
||||
height: 22px;
|
||||
}
|
||||
#pnlRGB_Green
|
||||
{
|
||||
top: 25px;
|
||||
left: 0px;
|
||||
width: 75px;
|
||||
height: 22px;
|
||||
}
|
||||
#pnlRGB_Blue
|
||||
{
|
||||
top: 50px;
|
||||
left: 0px;
|
||||
width: 75px;
|
||||
height: 22px;
|
||||
}
|
||||
#lblRGB_Red
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-top: 4px;
|
||||
padding-left: 16px;
|
||||
height: 22px;
|
||||
width: 37px;
|
||||
}
|
||||
#txtRGB_Red
|
||||
{
|
||||
top: 0px;
|
||||
left: 37px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 31px;
|
||||
height: 22px;
|
||||
}
|
||||
#lblRGB_Green
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-top: 4px;
|
||||
padding-left: 16px;
|
||||
height: 22px;
|
||||
width: 37px;
|
||||
}
|
||||
#txtRGB_Green
|
||||
{
|
||||
top: 0px;
|
||||
left: 37px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 31px;
|
||||
height: 22px;
|
||||
}
|
||||
#lblRGB_Blue
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-top: 4px;
|
||||
padding-left: 16px;
|
||||
height: 22px;
|
||||
width: 37px;
|
||||
}
|
||||
#txtRGB_Blue
|
||||
{
|
||||
top: 0px;
|
||||
left: 37px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 31px;
|
||||
height: 22px;
|
||||
}
|
||||
/*
|
||||
--------------------------------------------------------
|
||||
Color Mode: Hex (Hex values of RGB a.k.a. HTML Color value)
|
||||
--------------------------------------------------------
|
||||
*/
|
||||
#lblHex
|
||||
{
|
||||
top: 195px;
|
||||
left: 400px;
|
||||
}
|
||||
#txtHex
|
||||
{
|
||||
top: 195px;
|
||||
left: 412px;
|
||||
border-style: inset;
|
||||
border-width: 2px;
|
||||
width: 56px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
--------------------------------------------
|
||||
Elements
|
||||
--------------------------------------------
|
||||
*/
|
||||
|
||||
#colorpickerpanel INPUT
|
||||
{
|
||||
position: absolute;
|
||||
font-family: "Photoshop Large", Arial;
|
||||
font-size: 8pt;
|
||||
color: WindowText;
|
||||
background-color: Window;
|
||||
cursor: text;
|
||||
text-align: right;
|
||||
}
|
||||
#colorpickerpanel .Button
|
||||
{
|
||||
position: absolute;
|
||||
font-family: "Photoshop Large", Arial;
|
||||
font-size: 8pt;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
background-color:ButtonFace;
|
||||
text-align: center;
|
||||
}
|
||||
#colorpickerpanel DIV
|
||||
{
|
||||
position: absolute;
|
||||
font-family: "Photoshop Large", Arial;
|
||||
font-size: 8pt;
|
||||
color: ButtonText;
|
||||
cursor: default;
|
||||
overflow: hidden;
|
||||
}
|
||||
#colorpickerpanel IMG
|
||||
{
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#btnOK
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
#btnCancel
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
197
LPWeb20/RichtextEditor/aspnet/resx/Dialog_ColorPicker.js
Normal file
@@ -0,0 +1,197 @@
|
||||
|
||||
//alert("script load correctly v0.1");
|
||||
|
||||
|
||||
/****************************************************************\
|
||||
Cookie Functions
|
||||
\****************************************************************/
|
||||
|
||||
|
||||
function SetCookie(name,value,seconds)
|
||||
{
|
||||
var cookie=name+"="+escape(value)+"; path=/;";
|
||||
if(seconds)
|
||||
{
|
||||
var d=new Date();
|
||||
d.setSeconds(d.getSeconds()+seconds);
|
||||
cookie+=" expires="+d.toUTCString()+";";
|
||||
}
|
||||
document.cookie=cookie;
|
||||
}
|
||||
function GetCookie(name)
|
||||
{
|
||||
var cookies=document.cookie.split(';');
|
||||
for(var i=0;i<cookies.length;i++)
|
||||
{
|
||||
var parts=cookies[i].split('=');
|
||||
if(name==parts[0].replace(/\s/g,''))
|
||||
return unescape(parts[1])
|
||||
}
|
||||
//return undefined..
|
||||
}
|
||||
function GetCookieDictionary()
|
||||
{
|
||||
var dict={};
|
||||
var cookies=document.cookie.split(';');
|
||||
for(var i=0;i<cookies.length;i++)
|
||||
{
|
||||
var parts=cookies[i].split('=');
|
||||
dict[parts[0].replace(/\s/g,'')]=unescape(parts[1]);
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
function GetCookieArray()
|
||||
{
|
||||
var arr=[];
|
||||
var cookies=document.cookie.split(';');
|
||||
for(var i=0;i<cookies.length;i++)
|
||||
{
|
||||
var parts=cookies[i].split('=');
|
||||
var cookie={name:parts[0].replace(/\s/g,''),value:unescape(parts[1])};
|
||||
arr[arr.length]=cookie;
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
var __defaultcustomlist=["#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff"];
|
||||
|
||||
function GetCustomColors()
|
||||
{
|
||||
var customlist=__defaultcustomlist.concat();
|
||||
for(var i=0;i<18;i++)
|
||||
{
|
||||
var color=GetCustomColor(i);
|
||||
if(color)customlist[i]=color;
|
||||
}
|
||||
return customlist;
|
||||
}
|
||||
function GetCustomColor(slot)
|
||||
{
|
||||
return GetCookie("CECC"+slot);
|
||||
}
|
||||
function SetCustomColor(slot,color)
|
||||
{
|
||||
SetCookie("CECC"+slot,color,60*60*24*365);
|
||||
}
|
||||
|
||||
var _origincolor="";
|
||||
|
||||
document.onmouseover=function(event)
|
||||
{
|
||||
event=window.event||event;
|
||||
var t=event.srcElement||event.target;
|
||||
if(t.className=="colordiv")
|
||||
{
|
||||
firecolorchange(t.style.backgroundColor);
|
||||
}
|
||||
}
|
||||
document.onmouseout=function(event)
|
||||
{
|
||||
event=window.event||event;
|
||||
var t=event.srcElement||event.target;
|
||||
if(t.className=="colordiv")
|
||||
{
|
||||
firecolorchange(_origincolor);
|
||||
}
|
||||
}
|
||||
document.onclick=function(event)
|
||||
{
|
||||
event=window.event||event;
|
||||
var t=event.srcElement||event.target;
|
||||
if(t.className=="colordiv")
|
||||
{
|
||||
var showname=document.getElementById("CheckboxColorNames")&&document.getElementById("CheckboxColorNames").checked;
|
||||
if(showname)
|
||||
{
|
||||
do_select(t.getAttribute("cname")||t.style.backgroundColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
do_select(t.getAttribute("cvalue")||t.style.backgroundColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var _editor;
|
||||
|
||||
function firecolorchange(change)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
if(top.dialogArguments)
|
||||
{
|
||||
if(typeof(top.dialogArguments)=='object')
|
||||
{
|
||||
if(top.dialogArguments.onchange)
|
||||
{
|
||||
firecolorchange=top.dialogArguments.onchange;
|
||||
_origincolor=top.dialogArguments.color;
|
||||
_editor=top.dialogArguments.editor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var _selectedcolor=null;
|
||||
function do_select(color)
|
||||
{
|
||||
_selectedcolor=color;
|
||||
firecolorchange(color);
|
||||
var span=document.getElementById("divpreview");
|
||||
if(span)span.value=color;
|
||||
}
|
||||
function do_saverecent(color)
|
||||
{
|
||||
if(!color)return;
|
||||
if(color.length!=7)return;
|
||||
if(color.substring(0,1)!="#")return;
|
||||
var hex=color.substring(1,7);
|
||||
var recent = GetCookie("RecentColors");
|
||||
if(!recent)recent="";
|
||||
if((recent.length%6)!=0)recent="";
|
||||
for(var i = 0; i < recent.length; i += 6)
|
||||
{
|
||||
if(recent.substr(i, 6) == hex)
|
||||
{
|
||||
recent = recent.substr(0, i) + recent.substr(i + 6);
|
||||
i -= 6;
|
||||
}
|
||||
}
|
||||
if(recent.length > 31 * 6)
|
||||
recent = recent.substr(0, 31 * 6);
|
||||
recent = hex + recent;
|
||||
//alert(recent);
|
||||
SetCookie("RecentColors", recent,60*60*24*365);
|
||||
}
|
||||
function do_insert()
|
||||
{
|
||||
var color;
|
||||
var divpreview=document.getElementById("divpreview");
|
||||
if(divpreview)
|
||||
color=divpreview.value;
|
||||
else
|
||||
color=_selectedcolor;
|
||||
if(!color)return;
|
||||
if(/^[0-9A-F]{6}$/ig.test(color))
|
||||
{
|
||||
color="#"+color;
|
||||
}
|
||||
try{
|
||||
document.createElement("SPAN").style.color = color;
|
||||
do_saverecent(color);
|
||||
parent.rtecolorpickerdialog.result=color;
|
||||
parent.rtecolorpickerdialog.close();
|
||||
}
|
||||
catch(x)
|
||||
{
|
||||
alert(x.message);
|
||||
divpreview.value="";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function do_Close()
|
||||
{
|
||||
parent.rtecolorpickerdialog.close();
|
||||
}
|
||||
1033
LPWeb20/RichtextEditor/aspnet/resx/Dialog_ColorPicker_IE.js
Normal file
962
LPWeb20/RichtextEditor/aspnet/resx/Dialog_ColorPicker_NS.js
Normal file
@@ -0,0 +1,962 @@
|
||||
var POSITIONADJUSTX=22;
|
||||
var POSITIONADJUSTY=52;
|
||||
var POSITIONADJUSTZ=48;
|
||||
|
||||
/*
|
||||
* -----------------------------------------------------
|
||||
* Author: Lewis E. Moten III
|
||||
* Date: May, 16, 2004
|
||||
* Homepage: http://www.lewismoten.com
|
||||
* Email: lewis@moten.com
|
||||
* -----------------------------------------------------
|
||||
*
|
||||
* This code is Copyright (c) 2004 Lewis Moten, all rights reserved.
|
||||
* In order to receive the right to license this code for use on your
|
||||
* site the original code must be downloaded from lewismoten.com.
|
||||
* License is granted to user to reuse this code on their own Web
|
||||
* site if and only if this entire copyright notice is included.
|
||||
* Code written by Lewis Moten.
|
||||
*/
|
||||
|
||||
|
||||
var ColorMode = 1;
|
||||
var GradientPositionDark = new Boolean(false);
|
||||
var frm = new Object();
|
||||
var msg = new Object();
|
||||
var _xmlDocs = new Array();
|
||||
var _xmlIndex = -1;
|
||||
var _xml = null;
|
||||
LoadLanguage();
|
||||
|
||||
window.onload = window_load;
|
||||
|
||||
function initialize()
|
||||
{
|
||||
frm.btnCancel.onclick = btnCancel_Click;
|
||||
frm.btnOK.onclick = btnOK_Click;
|
||||
frm.txtHSB_Hue.onkeyup = Hsb_Changed;
|
||||
frm.txtHSB_Hue.onkeypress = validateNumber;
|
||||
frm.txtHSB_Saturation.onkeyup = Hsb_Changed;
|
||||
frm.txtHSB_Saturation.onkeypress = validateNumber;
|
||||
frm.txtHSB_Brightness.onkeyup = Hsb_Changed;
|
||||
frm.txtHSB_Brightness.onkeypress = validateNumber;
|
||||
frm.txtRGB_Red.onkeyup = Rgb_Changed;
|
||||
frm.txtRGB_Red.onkeypress = validateNumber;
|
||||
frm.txtRGB_Green.onkeyup = Rgb_Changed;
|
||||
frm.txtRGB_Green.onkeypress = validateNumber;
|
||||
frm.txtRGB_Blue.onkeyup = Rgb_Changed;
|
||||
frm.txtRGB_Blue.onkeypress = validateNumber;
|
||||
frm.txtHex.onkeyup = Hex_Changed;
|
||||
frm.txtHex.onkeypress = validateHex;
|
||||
frm.btnWebSafeColor.onclick = btnWebSafeColor_Click;
|
||||
frm.rdoHSB_Hue.onclick = rdoHsb_Hue_Click;
|
||||
frm.rdoHSB_Saturation.onclick = rdoHsb_Saturation_Click;
|
||||
frm.rdoHSB_Brightness.onclick = rdoHsb_Brightness_Click;
|
||||
|
||||
document.getElementById("pnlGradient_Top").onclick = pnlGradient_Top_Click;
|
||||
document.getElementById("pnlGradient_Top").onmousemove = pnlGradient_Top_MouseMove;
|
||||
document.getElementById("pnlGradient_Top").onmousedown = pnlGradient_Top_MouseDown;
|
||||
document.getElementById("pnlGradient_Top").onmouseup = pnlGradient_Top_MouseUp;
|
||||
|
||||
document.getElementById("pnlVertical_Top").onclick = pnlVertical_Top_Click;
|
||||
document.getElementById("pnlVertical_Top").onmousemove = pnlVertical_Top_MouseMove;
|
||||
document.getElementById("pnlVertical_Top").onmousedown = pnlVertical_Top_MouseDown;
|
||||
document.getElementById("pnlVertical_Top").onmouseup = pnlVertical_Top_MouseUp;
|
||||
document.getElementById("pnlWebSafeColor").onclick = btnWebSafeColor_Click;
|
||||
document.getElementById("pnlWebSafeColorBorder").onclick = btnWebSafeColor_Click;
|
||||
document.getElementById("pnlOldColor").onclick = pnlOldClick_Click;
|
||||
|
||||
document.getElementById("lblHSB_Hue").onclick = rdoHsb_Hue_Click;
|
||||
document.getElementById("lblHSB_Saturation").onclick = rdoHsb_Saturation_Click;
|
||||
document.getElementById("lblHSB_Brightness").onclick = rdoHsb_Brightness_Click;
|
||||
|
||||
frm.txtHSB_Hue.focus();
|
||||
window.focus();
|
||||
}
|
||||
function formatString(format)
|
||||
{
|
||||
format = new String(format);
|
||||
for(var i = 1; i < arguments.length; i++)
|
||||
format = format.replace(new RegExp("\\{" + (i-1) + "\\}"), arguments[i]);
|
||||
return format;
|
||||
}
|
||||
function AddValue(o, value)
|
||||
{
|
||||
value = new String(value).toLowerCase();
|
||||
for(var i = 0; i < o.length; i++)
|
||||
if(o[i] == value) return;
|
||||
o[o.length] = value;
|
||||
}
|
||||
function SniffLanguage(l)
|
||||
{
|
||||
|
||||
}
|
||||
function LoadNextLanguage()
|
||||
{
|
||||
|
||||
}
|
||||
function LoadLanguage()
|
||||
{
|
||||
// set default language (en-us)
|
||||
msg.BadNumber = "A number between {0} and {1} is required. Closest value inserted.";
|
||||
msg.Title = "Color Picker";
|
||||
msg.SelectAColor = "Select a color:";
|
||||
msg.OKButton = "OK";
|
||||
msg.CancelButton = "Cancel";
|
||||
msg.Recent = "Recent";
|
||||
msg.WebSafeWarning = "Warning: not a web safe color";
|
||||
msg.WebSafeClick = "Click to select web safe color";
|
||||
msg.HsbHue = "H:";
|
||||
msg.HsbHueTooltip = "Hue";
|
||||
msg.HsbHueUnit = "%";
|
||||
msg.HsbSaturation = "S:";
|
||||
msg.HsbSaturationTooltip = "Saturation";
|
||||
msg.HsbSaturationUnit = "%";
|
||||
msg.HsbBrightness = "B:";
|
||||
msg.HsbBrightnessTooltip = "Brightness";
|
||||
msg.HsbBrightnessUnit = "%";
|
||||
msg.RgbRed = "R:";
|
||||
msg.RgbRedTooltip = "Red";
|
||||
msg.RgbGreen = "G:";
|
||||
msg.RgbGreenTooltip = "Green";
|
||||
msg.RgbBlue = "B:";
|
||||
msg.RgbBlueTooltip = "Blue";
|
||||
msg.Hex = "#";
|
||||
msg.RecentTooltip = "Recent:";
|
||||
|
||||
}
|
||||
function AssignLanguage()
|
||||
{
|
||||
|
||||
}
|
||||
function localize()
|
||||
{
|
||||
SetHTML(
|
||||
document.getElementById("lblSelectColorMessage"), msg.SelectAColor,
|
||||
document.getElementById("lblRecent"), msg.Recent,
|
||||
document.getElementById("lblHSB_Hue"), msg.HsbHue,
|
||||
document.getElementById("lblHSB_Saturation"), msg.HsbSaturation,
|
||||
document.getElementById("lblHSB_Brightness"), msg.HsbBrightness,
|
||||
document.getElementById("lblRGB_Red"), msg.RgbRed,
|
||||
document.getElementById("lblRGB_Green"), msg.RgbGreen,
|
||||
document.getElementById("lblRGB_Blue"), msg.RgbBlue,
|
||||
document.getElementById("lblHex"), msg.Hex,
|
||||
document.getElementById("lblUnitHSB_Hue"), msg.HsbHueUnit,
|
||||
document.getElementById("lblUnitHSB_Saturation"), msg.HsbSaturationUnit,
|
||||
document.getElementById("lblUnitHSB_Brightness"), msg.HsbBrightnessUnit
|
||||
);
|
||||
SetValue(
|
||||
frm.btnCancel, msg.CancelButton,
|
||||
frm.btnOK, msg.OKButton
|
||||
);
|
||||
SetTitle(
|
||||
frm.btnWebSafeColor, msg.WebSafeWarning,
|
||||
document.getElementById("pnlWebSafeColor"), msg.WebSafeClick,
|
||||
document.getElementById("pnlHSB_Hue"), msg.HsbHueTooltip,
|
||||
document.getElementById("pnlHSB_Saturation"), msg.HsbSaturationTooltip,
|
||||
document.getElementById("pnlHSB_Brightness"), msg.HsbBrightnessTooltip,
|
||||
document.getElementById("pnlRGB_Red"), msg.RgbRedTooltip,
|
||||
document.getElementById("pnlRGB_Green"), msg.RgbGreenTooltip,
|
||||
document.getElementById("pnlRGB_Blue"), msg.RgbBlueTooltip
|
||||
);
|
||||
|
||||
}
|
||||
function window_load(e)
|
||||
{
|
||||
frm = document.getElementById("frmColorPicker");
|
||||
localize();
|
||||
initialize();
|
||||
|
||||
var hex = GetQuery("Color").toUpperCase();
|
||||
if(hex == "") hex = "FFFFFF";
|
||||
if(hex.length == 7) hex = hex.substr(1,6);
|
||||
frm.txtHex.value = hex;
|
||||
Hex_Changed(e);
|
||||
hex = Form_Get_Hex();
|
||||
SetBg(document.getElementById("pnlOldColor"), hex);
|
||||
|
||||
frm.ColorType[new Number(GetCookie("ColorMode")||0)].checked = true;
|
||||
ColorMode_Changed(e);
|
||||
|
||||
var recent = GetCookie("RecentColors")||"";
|
||||
|
||||
var RecentTooltip = msg.RecentTooltip;
|
||||
for(var i = 1; i < 33; i++)
|
||||
if(recent.length / 6 >= i)
|
||||
{
|
||||
hex = recent.substr((i-1) * 6, 6);
|
||||
var rgb = HexToRgb(hex);
|
||||
var title = formatString(msg.RecentTooltip, hex, rgb[0], rgb[1], rgb[2]);
|
||||
SetBg(document.getElementById("pnlRecent" + i), hex);
|
||||
SetTitle(document.getElementById("pnlRecent" + i), title);
|
||||
document.getElementById("pnlRecent" + i).onclick = pnlRecent_Click;
|
||||
}
|
||||
else
|
||||
document.getElementById("pnlRecent" + i).style.border = "0px";
|
||||
//Hide(document.all["pnlRecent" + i]);
|
||||
}
|
||||
|
||||
function pnlRecent_Click(e)
|
||||
{
|
||||
var color = e.target.style.backgroundColor;
|
||||
if(color.indexOf("rgb") != -1)
|
||||
{
|
||||
var rgb = new Array();
|
||||
color = color.substr(color.indexOf("(") + 1);
|
||||
color = color.substr(0, color.indexOf(")"));
|
||||
rgb[0] = new Number(color.substr(0, color.indexOf(",")));
|
||||
color = color.substr(color.indexOf(",") + 1);
|
||||
rgb[1] = new Number(color.substr(0, color.indexOf(",")));
|
||||
rgb[2] = new Number(color.substr(color.indexOf(",") + 1));
|
||||
color = RgbToHex(rgb);
|
||||
}
|
||||
else
|
||||
{
|
||||
color = color.substr(1, 6).toUpperCase();
|
||||
}
|
||||
frm.txtHex.value = color;
|
||||
Hex_Changed(e);
|
||||
}
|
||||
function pnlOldClick_Click(e)
|
||||
{
|
||||
frm.txtHex.value = document.getElementById("pnlOldColor").style.backgroundColor.substr(1, 6).toUpperCase();
|
||||
Hex_Changed(e);
|
||||
}
|
||||
function rdoHsb_Hue_Click(e)
|
||||
{
|
||||
frm.rdoHSB_Hue.checked = true;
|
||||
ColorMode_Changed(e);
|
||||
}
|
||||
function rdoHsb_Saturation_Click(e)
|
||||
{
|
||||
frm.rdoHSB_Saturation.checked = true;
|
||||
ColorMode_Changed(e);
|
||||
}
|
||||
function rdoHsb_Brightness_Click(e)
|
||||
{
|
||||
frm.rdoHSB_Brightness.checked = true;
|
||||
ColorMode_Changed(e);
|
||||
}
|
||||
function Hide()
|
||||
{
|
||||
for(var i = 0; i < arguments.length; i++)
|
||||
if(arguments[i])
|
||||
arguments[i].style.display = "none";
|
||||
}
|
||||
function Show()
|
||||
{
|
||||
for(var i = 0; i < arguments.length; i++)
|
||||
if(arguments[i])
|
||||
arguments[i].style.display = "";
|
||||
}
|
||||
function SetValue()
|
||||
{
|
||||
for(var i = 0; i < arguments.length; i+=2)
|
||||
arguments[i].value = arguments[i+1];
|
||||
}
|
||||
function SetTitle()
|
||||
{
|
||||
for(var i = 0; i < arguments.length; i+=2)
|
||||
arguments[i].title = arguments[i+1];
|
||||
}
|
||||
function SetHTML()
|
||||
{
|
||||
for(var i = 0; i < arguments.length; i+=2)
|
||||
arguments[i].innerHTML = arguments[i+1];
|
||||
}
|
||||
function SetBg()
|
||||
{
|
||||
for(var i = 0; i < arguments.length; i+=2)
|
||||
{
|
||||
if(arguments[i])
|
||||
arguments[i].style.backgroundColor = "#" + arguments[i+1];
|
||||
}
|
||||
}
|
||||
function SetBgPosition()
|
||||
{
|
||||
for(var i = 0; i < arguments.length; i+=3)
|
||||
arguments[i].style.backgroundPosition = arguments[i+1] + "px " + arguments[i+2] + "px";
|
||||
}
|
||||
function ColorMode_Changed(e)
|
||||
{
|
||||
for(var i = 0; i < 3; i++)
|
||||
if(frm.ColorType[i].checked) ColorMode = i;
|
||||
SetCookie("ColorMode", ColorMode,60*60*24*365);
|
||||
|
||||
Hide(
|
||||
document.getElementById("pnlGradientHsbHue_Hue"),
|
||||
document.getElementById("pnlGradientHsbHue_Black"),
|
||||
document.getElementById("pnlGradientHsbHue_White"),
|
||||
document.getElementById("pnlVerticalHsbHue_Background"),
|
||||
document.getElementById("pnlVerticalHsbSaturation_Hue"),
|
||||
document.getElementById("pnlVerticalHsbSaturation_White"),
|
||||
document.getElementById("pnlVerticalHsbBrightness_Hue"),
|
||||
document.getElementById("pnlVerticalHsbBrightness_Black"),
|
||||
document.getElementById("pnlVerticalRgb_Start"),
|
||||
document.getElementById("pnlVerticalRgb_End"),
|
||||
document.getElementById("pnlGradientRgb_Base"),
|
||||
document.getElementById("pnlGradientRgb_Invert"),
|
||||
document.getElementById("pnlGradientRgb_Overlay1"),
|
||||
document.getElementById("pnlGradientRgb_Overlay2")
|
||||
);
|
||||
|
||||
switch(ColorMode)
|
||||
{
|
||||
case 0:
|
||||
document.getElementById("imgGradient").src = "images/cpns_ColorSpace1.png";
|
||||
Show(
|
||||
document.getElementById("pnlGradientHsbHue_Hue"),
|
||||
document.getElementById("pnlGradientHsbHue_Black"),
|
||||
document.getElementById("pnlGradientHsbHue_White"),
|
||||
document.getElementById("pnlVerticalHsbHue_Background")
|
||||
);
|
||||
Hsb_Changed(e);
|
||||
break;
|
||||
case 1:
|
||||
document.getElementById("imgGradient").src = "images/cpns_ColorSpace2.png";
|
||||
document.getElementById("pnlVerticalHsbSaturation_Hue").src = "images/cpns_Vertical1.png";
|
||||
Show(
|
||||
document.getElementById("pnlGradientHsbHue_Hue"),
|
||||
document.getElementById("pnlVerticalHsbSaturation_Hue")
|
||||
);
|
||||
document.getElementById("pnlGradientHsbHue_Hue").style.backgroundColor = "#000000";
|
||||
Hsb_Changed(e);
|
||||
break;
|
||||
case 2:
|
||||
document.getElementById("imgGradient").src = "images/cpns_ColorSpace2.png";
|
||||
document.getElementById("pnlVerticalHsbSaturation_Hue").src = "images/cpns_Vertical2.png";
|
||||
Show(
|
||||
document.getElementById("pnlGradientHsbHue_Hue"),
|
||||
document.getElementById("pnlVerticalHsbSaturation_Hue")
|
||||
);
|
||||
document.getElementById("pnlGradientHsbHue_Hue").style.backgroundColor = "#ffffff";
|
||||
Hsb_Changed(e);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
function btnWebSafeColor_Click(e)
|
||||
{
|
||||
var rgb = HexToRgb(frm.txtHex.value);
|
||||
rgb = RgbToWebSafeRgb(rgb);
|
||||
frm.txtHex.value = RgbToHex(rgb);
|
||||
Hex_Changed(e);
|
||||
}
|
||||
function checkWebSafe()
|
||||
{
|
||||
var rgb = Form_Get_Rgb();
|
||||
if(RgbIsWebSafe(rgb))
|
||||
{
|
||||
Hide(
|
||||
frm.btnWebSafeColor,
|
||||
document.getElementById("pnlWebSafeColor"),
|
||||
document.getElementById("pnlWebSafeColorBorder")
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
rgb = RgbToWebSafeRgb(rgb);
|
||||
SetBg(document.getElementById("pnlWebSafeColor"), RgbToHex(rgb));
|
||||
Show(
|
||||
frm.btnWebSafeColor,
|
||||
document.getElementById("pnlWebSafeColor"),
|
||||
document.getElementById("pnlWebSafeColorBorder")
|
||||
);
|
||||
}
|
||||
}
|
||||
function validateNumber(e)
|
||||
{
|
||||
var key = String.fromCharCode(e.which);
|
||||
if(IgnoreKey(e)) return;
|
||||
if("01234567879".indexOf(key) != -1) return;
|
||||
e.which = 0;
|
||||
}
|
||||
function validateHex(e)
|
||||
{
|
||||
if(IgnoreKey(e)) return;
|
||||
var key = String.fromCharCode(e.which);
|
||||
if("abcdef".indexOf(key) != -1)
|
||||
{
|
||||
//e.which = key.toUpperCase().charCodeAt(0);
|
||||
return;
|
||||
}
|
||||
if("01234567879ABCDEF".indexOf(key) != -1) return;
|
||||
//e.which = 0;
|
||||
}
|
||||
function IgnoreKey(e)
|
||||
{
|
||||
var key = String.fromCharCode(e.which);
|
||||
var keys = new Array(0, 8, 9, 13, 27);
|
||||
if(key == null) return true;
|
||||
for(var i = 0; i < 5; i++)
|
||||
if(e.which == keys[i]) return true;
|
||||
return false;
|
||||
}
|
||||
function btnCancel_Click()
|
||||
{
|
||||
if(window.opener)
|
||||
{
|
||||
window.opener.focus();
|
||||
}
|
||||
(top.closeeditordialog||top.close)();
|
||||
}
|
||||
function btnOK_Click()
|
||||
{
|
||||
var hex = new String(frm.txtHex.value);
|
||||
if(window.opener)
|
||||
{
|
||||
try
|
||||
{
|
||||
window.opener.ColorPicker_Picked(hex);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
}
|
||||
window.opener.focus();
|
||||
}
|
||||
recent = GetCookie("RecentColors")||"";
|
||||
for(var i = 0; i < recent.length; i += 6)
|
||||
if(recent.substr(i, 6) == hex)
|
||||
{
|
||||
recent = recent.substr(0, i) + recent.substr(i + 6);
|
||||
i -= 6;
|
||||
}
|
||||
if(recent.length > 31 * 6)
|
||||
recent = recent.substr(0, 31 * 6);
|
||||
recent = frm.txtHex.value + recent;
|
||||
SetCookie("RecentColors", recent,60*60*24*365);
|
||||
(top.closeeditordialog||top.close)();
|
||||
}
|
||||
function SetGradientPosition(e, x, y)
|
||||
{
|
||||
x=x-POSITIONADJUSTX+5;
|
||||
y=y-POSITIONADJUSTY+5;
|
||||
|
||||
x -= 7;
|
||||
y -= 27;
|
||||
x=x<0?0:x>255?255:x;
|
||||
y=y<0?0:y>255?255:y;
|
||||
|
||||
SetBgPosition(document.getElementById("pnlGradientPosition"), x - 5, y - 5);
|
||||
switch(ColorMode)
|
||||
{
|
||||
case 0:
|
||||
var hsb = new Array(0, 0, 0);
|
||||
hsb[1] = x / 255;
|
||||
hsb[2] = 1 - (y / 255);
|
||||
frm.txtHSB_Saturation.value = Math.round(hsb[1] * 100);
|
||||
frm.txtHSB_Brightness.value = Math.round(hsb[2] * 100);
|
||||
Hsb_Changed(e);
|
||||
break;
|
||||
case 1:
|
||||
var hsb = new Array(0, 0, 0);
|
||||
hsb[0] = x / 255;
|
||||
hsb[2] = 1 - (y / 255);
|
||||
frm.txtHSB_Hue.value = hsb[0] == 1 ? 0 : Math.round(hsb[0] * 360);
|
||||
frm.txtHSB_Brightness.value = Math.round(hsb[2] * 100);
|
||||
Hsb_Changed(e);
|
||||
break;
|
||||
case 2:
|
||||
var hsb = new Array(0, 0, 0);
|
||||
hsb[0] = x / 255;
|
||||
hsb[1] = 1 - (y / 255);
|
||||
frm.txtHSB_Hue.value = hsb[0] == 1 ? 0 : Math.round(hsb[0] * 360);
|
||||
frm.txtHSB_Saturation.value = Math.round(hsb[1] * 100);
|
||||
Hsb_Changed(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
function Hex_Changed(e)
|
||||
{
|
||||
var hex = Form_Get_Hex();
|
||||
var rgb = HexToRgb(hex);
|
||||
var hsb = RgbToHsb(rgb);
|
||||
Form_Set_Rgb(rgb);
|
||||
Form_Set_Hsb(hsb);
|
||||
SetBg(document.getElementById("pnlNewColor"), hex);
|
||||
SetupCursors(e);
|
||||
SetupGradients();
|
||||
checkWebSafe();
|
||||
}
|
||||
function Rgb_Changed(e)
|
||||
{
|
||||
var rgb = Form_Get_Rgb();
|
||||
var hsb = RgbToHsb(rgb);
|
||||
var hex = RgbToHex(rgb);
|
||||
Form_Set_Hsb(hsb);
|
||||
Form_Set_Hex(hex);
|
||||
SetBg(document.getElementById("pnlNewColor"), hex);
|
||||
SetupCursors(e);
|
||||
SetupGradients();
|
||||
checkWebSafe();
|
||||
}
|
||||
function Hsb_Changed(e)
|
||||
{
|
||||
var hsb = Form_Get_Hsb();
|
||||
var rgb = HsbToRgb(hsb);
|
||||
var hex = RgbToHex(rgb);
|
||||
Form_Set_Rgb(rgb);
|
||||
Form_Set_Hex(hex);
|
||||
SetBg(document.getElementById("pnlNewColor"), hex);
|
||||
SetupCursors(e);
|
||||
SetupGradients();
|
||||
checkWebSafe();
|
||||
}
|
||||
function Form_Set_Hex(hex)
|
||||
{
|
||||
frm.txtHex.value = hex;
|
||||
}
|
||||
|
||||
function Form_Get_Hex()
|
||||
{
|
||||
var hex = new String(frm.txtHex.value);
|
||||
for(var i = 0; i < hex.length; i++)
|
||||
if("0123456789ABCDEFabcdef".indexOf(hex.substr(i, 1)) == -1)
|
||||
{
|
||||
hex = "000000";
|
||||
frm.txtHex.value = hex;
|
||||
alert(formatString(msg.BadNumber, "000000", "FFFFFF"));
|
||||
break;
|
||||
}
|
||||
while(hex.length < 6)
|
||||
hex = "0" + hex;
|
||||
return hex;
|
||||
}
|
||||
function Form_Get_Hsb()
|
||||
{
|
||||
var hsb = new Array(0, 0, 0);
|
||||
|
||||
hsb[0] = new Number(frm.txtHSB_Hue.value) / 360;
|
||||
hsb[1] = new Number(frm.txtHSB_Saturation.value) / 100;
|
||||
hsb[2] = new Number(frm.txtHSB_Brightness.value) / 100;
|
||||
if(hsb[0] > 1 || isNaN(hsb[0]))
|
||||
{
|
||||
hsb[0] = 1;
|
||||
frm.txtHSB_Hue.value = 360;
|
||||
alert(formatString(msg.BadNumber, 0, 360));
|
||||
}
|
||||
if(hsb[1] > 1 || isNaN(hsb[1]))
|
||||
{
|
||||
hsb[1] = 1;
|
||||
frm.txtHSB_Saturation.value = 100;
|
||||
alert(formatString(msg.BadNumber, 0, 100));
|
||||
}
|
||||
if(hsb[2] > 1 || isNaN(hsb[2]))
|
||||
{
|
||||
hsb[2] = 1;
|
||||
frm.txtHSB_Brightness.value = 100;
|
||||
alert(formatString(msg.BadNumber, 0, 100));
|
||||
}
|
||||
return hsb;
|
||||
}
|
||||
function Form_Set_Hsb(hsb)
|
||||
{
|
||||
SetValue(
|
||||
frm.txtHSB_Hue, Math.round(hsb[0] * 360),
|
||||
frm.txtHSB_Saturation, Math.round(hsb[1] * 100),
|
||||
frm.txtHSB_Brightness, Math.round(hsb[2] * 100)
|
||||
)
|
||||
}
|
||||
function Form_Get_Rgb()
|
||||
{
|
||||
var rgb = new Array(0, 0, 0);
|
||||
rgb[0] = new Number(frm.txtRGB_Red.value);
|
||||
rgb[1] = new Number(frm.txtRGB_Green.value);
|
||||
rgb[2] = new Number(frm.txtRGB_Blue.value);
|
||||
|
||||
if(rgb[0] > 255 || isNaN(rgb[0]) || rgb[0] != Math.round(rgb[0]))
|
||||
{
|
||||
rgb[0] = 255;
|
||||
frm.txtRGB_Red.value = 255;
|
||||
alert(formatString(msg.BadNumber, 0, 255));
|
||||
}
|
||||
if(rgb[1] > 255 || isNaN(rgb[1]) || rgb[1] != Math.round(rgb[1]))
|
||||
{
|
||||
rgb[1] = 255;
|
||||
frm.txtRGB_Green.value = 255;
|
||||
alert(formatString(msg.BadNumber, 0, 255));
|
||||
}
|
||||
if(rgb[2] > 255 || isNaN(rgb[2]) || rgb[2] != Math.round(rgb[2]))
|
||||
{
|
||||
rgb[2] = 255;
|
||||
frm.txtRGB_Blue.value = 255;
|
||||
alert(formatString(msg.BadNumber, 0, 255));
|
||||
}
|
||||
return rgb;
|
||||
}
|
||||
function Form_Set_Rgb(rgb)
|
||||
{
|
||||
frm.txtRGB_Red.value = rgb[0];
|
||||
frm.txtRGB_Green.value = rgb[1];
|
||||
frm.txtRGB_Blue.value = rgb[2];
|
||||
}
|
||||
function SetupCursors(e)
|
||||
{
|
||||
var hsb = Form_Get_Hsb();
|
||||
var rgb = Form_Get_Rgb();
|
||||
if(RgbToYuv(rgb)[0] >= .5) SetGradientPositionDark();
|
||||
else SetGradientPositionLight();
|
||||
if(e.target != null)
|
||||
{
|
||||
if(e.target.id == "pnlGradient_Top") return;
|
||||
if(e.target.id == "pnlVertical_Top") return;
|
||||
}
|
||||
var x;
|
||||
var y;
|
||||
var z;
|
||||
|
||||
if(ColorMode >= 0 && ColorMode <= 2)
|
||||
for(var i = 0; i < 3; i++)
|
||||
hsb[i] *= 255;
|
||||
|
||||
switch(ColorMode)
|
||||
{
|
||||
case 0:
|
||||
x = hsb[1];
|
||||
y = hsb[2];
|
||||
z = hsb[0] == 0 ? 1 : hsb[0];
|
||||
break;
|
||||
case 1:
|
||||
x = hsb[0] == 0 ? 1 : hsb[0];
|
||||
y = hsb[2];
|
||||
z = hsb[1];
|
||||
break;
|
||||
case 2:
|
||||
x = hsb[0] == 0 ? 1 : hsb[0];
|
||||
y = hsb[1];
|
||||
z = hsb[2];
|
||||
break;
|
||||
}
|
||||
|
||||
y = 255 - y;
|
||||
z = 255 - z;
|
||||
|
||||
SetBgPosition(document.getElementById("pnlGradientPosition"), x - 5, y - 5);
|
||||
document.getElementById("pnlVerticalPosition").style.top = (z+27) + "px";
|
||||
}
|
||||
function SetupGradients()
|
||||
{
|
||||
var hsb = Form_Get_Hsb();
|
||||
var rgb = Form_Get_Rgb();
|
||||
switch(ColorMode)
|
||||
{
|
||||
case 0:
|
||||
SetBg(document.getElementById("pnlGradientHsbHue_Hue"), RgbToHex(HueToRgb(hsb[0])));
|
||||
break;
|
||||
case 1:
|
||||
SetBg(document.getElementById("pnlVerticalHsbSaturation_Hue"), RgbToHex(HsbToRgb(new Array(hsb[0], 1, hsb[2]))));
|
||||
break;
|
||||
case 2:
|
||||
SetBg(document.getElementById("pnlVerticalHsbSaturation_Hue"), RgbToHex(HsbToRgb(new Array(hsb[0], hsb[1], 1))));
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
function SetGradientPositionDark()
|
||||
{
|
||||
if(GradientPositionDark) return;
|
||||
GradientPositionDark = true;
|
||||
document.getElementById("pnlGradientPosition").style.backgroundImage = "url(images/cpns_GradientPositionDark.gif)";
|
||||
}
|
||||
function SetGradientPositionLight()
|
||||
{
|
||||
if(!GradientPositionDark) return;
|
||||
GradientPositionDark = false;
|
||||
document.getElementById("pnlGradientPosition").style.backgroundImage = "url(images/cpns_GradientPositionLight.gif)";
|
||||
}
|
||||
function pnlGradient_Top_Click(e)
|
||||
{
|
||||
e.cancelBubble = true;
|
||||
SetGradientPosition(e, e.pageX - 5, e.pageY - 5);
|
||||
document.getElementById("pnlGradient_Top").className = "GradientNormal";
|
||||
_down = false;
|
||||
}
|
||||
var _down = false;
|
||||
function pnlGradient_Top_MouseMove(e)
|
||||
{
|
||||
e.cancelBubble = true;
|
||||
if(!_down) return;
|
||||
SetGradientPosition(e, e.pageX - 5, e.pageY - 5);
|
||||
}
|
||||
function pnlGradient_Top_MouseDown(e)
|
||||
{
|
||||
e.cancelBubble = true;
|
||||
_down = true;
|
||||
SetGradientPosition(e, e.pageX - 5, e.pageY - 5);
|
||||
document.getElementById("pnlGradient_Top").className = "GradientFullScreen";
|
||||
}
|
||||
function pnlGradient_Top_MouseUp(e)
|
||||
{
|
||||
_down = false;
|
||||
e.cancelBubble = true;
|
||||
SetGradientPosition(e, e.pageX - 5, e.pageY - 5);
|
||||
document.getElementById("pnlGradient_Top").className = "GradientNormal";
|
||||
}
|
||||
function Document_MouseUp()
|
||||
{
|
||||
e.cancelBubble = true;
|
||||
document.getElementById("pnlGradient_Top").className = "GradientNormal";
|
||||
}
|
||||
function SetVerticalPosition(e, z)
|
||||
{
|
||||
var z=z-POSITIONADJUSTZ;
|
||||
|
||||
if(z < 27) z = 27;
|
||||
if(z > 282) z = 282;
|
||||
document.getElementById("pnlVerticalPosition").style.top = z + "px";
|
||||
z = 1 - ((z - 27) / 255);
|
||||
|
||||
switch(ColorMode)
|
||||
{
|
||||
case 0:
|
||||
if(z == 1) z = 0;
|
||||
frm.txtHSB_Hue.value = Math.round(z * 360);
|
||||
Hsb_Changed(e);
|
||||
break;
|
||||
case 1:
|
||||
frm.txtHSB_Saturation.value = Math.round(z * 100);
|
||||
Hsb_Changed(e);
|
||||
break;
|
||||
case 2:
|
||||
frm.txtHSB_Brightness.value = Math.round(z * 100);
|
||||
Hsb_Changed(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
function pnlVertical_Top_Click(e)
|
||||
{
|
||||
SetVerticalPosition(e, e.pageY - 5);
|
||||
e.cancelBubble = true;
|
||||
}
|
||||
function pnlVertical_Top_MouseMove(e)
|
||||
{
|
||||
if(!window._isverdown)return;
|
||||
if(e.which != 1) return;
|
||||
SetVerticalPosition(e, e.pageY - 5);
|
||||
e.cancelBubble = true;
|
||||
}
|
||||
function pnlVertical_Top_MouseDown(e)
|
||||
{
|
||||
window._isverdown=true;
|
||||
SetVerticalPosition(e, e.pageY - 5);
|
||||
e.cancelBubble = true;
|
||||
}
|
||||
function pnlVertical_Top_MouseUp(e)
|
||||
{
|
||||
window._isverdown=false;
|
||||
SetVerticalPosition(e, e.pageY - 5);
|
||||
e.cancelBubble = true;
|
||||
}
|
||||
|
||||
|
||||
function SetCookie(name,value,seconds)
|
||||
{
|
||||
var cookie=name+"="+escape(value)+"; path=/;";
|
||||
if(seconds)
|
||||
{
|
||||
var d=new Date();
|
||||
d.setSeconds(d.getSeconds()+seconds);
|
||||
cookie+=" expires="+d.toUTCString()+";";
|
||||
}
|
||||
document.cookie=cookie;
|
||||
}
|
||||
function GetCookie(name)
|
||||
{
|
||||
var cookies=document.cookie.split(';');
|
||||
for(var i=0;i<cookies.length;i++)
|
||||
{
|
||||
var parts=cookies[i].split('=');
|
||||
if(name==parts[0].replace(/\s/g,''))
|
||||
return unescape(parts[1])
|
||||
}
|
||||
//return undefined..
|
||||
}
|
||||
function GetCookieDictionary()
|
||||
{
|
||||
var dict={};
|
||||
var cookies=document.cookie.split(';');
|
||||
for(var i=0;i<cookies.length;i++)
|
||||
{
|
||||
var parts=cookies[i].split('=');
|
||||
dict[parts[0].replace(/\s/g,'')]=unescape(parts[1]);
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
function GetQuery(name)
|
||||
{
|
||||
var i = 0;
|
||||
while(window.location.search.indexOf(name + "=", i) != -1)
|
||||
{
|
||||
var value = window.location.search.substr(window.location.search.indexOf(name + "=", i));
|
||||
value = value.substr(name.length + 1);
|
||||
if(value.indexOf("&") != -1)
|
||||
if(value.indexOf("&") == 0)
|
||||
value = "";
|
||||
else
|
||||
value = value.substr(0, value.indexOf("&"));
|
||||
return unescape(value);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
function RgbIsWebSafe(rgb)
|
||||
{
|
||||
var hex = RgbToHex(rgb);
|
||||
for(var i = 0; i < 3; i++)
|
||||
if("00336699CCFF".indexOf(hex.substr(i*2, 2)) == -1) return false;
|
||||
return true;
|
||||
}
|
||||
function RgbToWebSafeRgb(rgb)
|
||||
{
|
||||
var safeRgb = new Array(rgb[0], rgb[1], rgb[2]);
|
||||
if(RgbIsWebSafe(rgb)) return safeRgb;
|
||||
var safeValue = new Array(0x00, 0x33, 0x66, 0x99, 0xCC, 0xFF);
|
||||
for(var i = 0; i < 3; i++)
|
||||
for(var j = 1; j < 6; j++)
|
||||
if(safeRgb[i] > safeValue[j-1] && safeRgb[i] < safeValue[j])
|
||||
{
|
||||
if(safeRgb[i] - safeValue[j-1] > safeValue[j] - safeRgb[i])
|
||||
safeRgb[i] = safeValue[j];
|
||||
else
|
||||
safeRgb[i] = safeValue[j-1];
|
||||
break;
|
||||
}
|
||||
return safeRgb;
|
||||
}
|
||||
function RgbToYuv(rgb)
|
||||
{
|
||||
var yuv = new Array();
|
||||
|
||||
yuv[0] = (rgb[0] * 0.299 + rgb[1] * 0.587 + rgb[2] * 0.114) / 255;
|
||||
yuv[1] = (rgb[0] * -0.169 + rgb[1] * -0.332 + rgb[2] * 0.500 + 128) / 255;
|
||||
yuv[2] = (rgb[0]* 0.500 + rgb[1] * -0.419 + rgb[2] * -0.0813 + 128) / 255;
|
||||
|
||||
return yuv;
|
||||
}
|
||||
function RgbToHsb(rgb)
|
||||
{
|
||||
var sRgb = new Array(rgb[0], rgb[1], rgb[2]);
|
||||
var min = new Number(1);
|
||||
var max = new Number(0);
|
||||
var delta = new Number(1);
|
||||
var hsb = new Array(0, 0, 0);
|
||||
var deltaRgb = new Array();
|
||||
|
||||
for(var i = 0; i < 3; i++)
|
||||
{
|
||||
sRgb[i] = rgb[i] / 255;
|
||||
if(sRgb[i] < min) min = sRgb[i];
|
||||
if(sRgb[i] > max) max = sRgb[i];
|
||||
}
|
||||
|
||||
delta = max - min;
|
||||
hsb[2] = max;
|
||||
|
||||
if(delta == 0) return hsb;
|
||||
|
||||
hsb[1] = delta / max;
|
||||
|
||||
for(var i = 0; i < 3; i++)
|
||||
deltaRgb[i] = (((max - sRgb[i]) / 6) + (delta / 2)) / delta;
|
||||
|
||||
if (sRgb[0] == max)
|
||||
hsb[0] = deltaRgb[2] - deltaRgb[1];
|
||||
else if (sRgb[1] == max)
|
||||
hsb[0] = (1 / 3) + deltaRgb[0] - deltaRgb[2];
|
||||
else if (sRgb[2] == max)
|
||||
hsb[0] = (2 / 3) + deltaRgb[1] - deltaRgb[0];
|
||||
|
||||
if(hsb[0] < 0)
|
||||
hsb[0] += 1;
|
||||
else if(hsb[0] > 1)
|
||||
hsb[0] -= 1;
|
||||
return hsb;
|
||||
}
|
||||
function HsbToRgb(hsb)
|
||||
{
|
||||
var rgb = HueToRgb(hsb[0]);
|
||||
var s = hsb[2] * 255;
|
||||
|
||||
for(var i = 0; i < 3; i++)
|
||||
{
|
||||
rgb[i] = rgb[i] * hsb[2];
|
||||
rgb[i] = ((rgb[i] - s) * hsb[1]) + s;
|
||||
rgb[i] = Math.round(rgb[i]);
|
||||
}
|
||||
return rgb;
|
||||
}
|
||||
function RgbToHex(rgb)
|
||||
{
|
||||
var hex = new String();
|
||||
|
||||
for(var i = 0; i < 3; i++)
|
||||
{
|
||||
rgb[2 - i] = Math.round(rgb[2 - i]);
|
||||
hex = rgb[2 - i].toString(16) + hex;
|
||||
if(hex.length % 2 == 1) hex = "0" + hex;
|
||||
}
|
||||
|
||||
return hex.toUpperCase();
|
||||
}
|
||||
function HexToRgb(hex)
|
||||
{
|
||||
var rgb = new Array();
|
||||
for(var i = 0; i < 3; i++)
|
||||
rgb[i] = new Number("0x" + hex.substr(i * 2, 2));
|
||||
return rgb;
|
||||
}
|
||||
function HueToRgb(hue)
|
||||
{
|
||||
var degrees = hue * 360;
|
||||
var rgb = new Array(0, 0, 0);
|
||||
var percent = (degrees % 60) / 60;
|
||||
|
||||
if(degrees < 60)
|
||||
{
|
||||
rgb[0] = 255;
|
||||
rgb[1] = percent * 255;
|
||||
}
|
||||
else if(degrees < 120)
|
||||
{
|
||||
rgb[1] = 255;
|
||||
rgb[0] = (1 - percent) * 255;
|
||||
}
|
||||
else if(degrees < 180)
|
||||
{
|
||||
rgb[1] = 255;
|
||||
rgb[2] = percent * 255;
|
||||
}
|
||||
else if(degrees < 240)
|
||||
{
|
||||
rgb[2] = 255;
|
||||
rgb[1] = (1 - percent) * 255;
|
||||
}
|
||||
else if(degrees < 300)
|
||||
{
|
||||
rgb[2] = 255;
|
||||
rgb[0] = percent * 255;
|
||||
}
|
||||
else if(degrees < 360)
|
||||
{
|
||||
rgb[0] = 255;
|
||||
rgb[2] = (1 - percent) * 255;
|
||||
}
|
||||
|
||||
return rgb;
|
||||
}
|
||||
function CheckHexSelect()
|
||||
{
|
||||
if(window.do_select&&window.frm&&frm.txtHex)
|
||||
{
|
||||
var color="#"+frm.txtHex.value;
|
||||
if(color.length==7)
|
||||
{
|
||||
if(window.__cphex!=color)
|
||||
{
|
||||
window.__cphex=color;
|
||||
window.do_select(color)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
setInterval(CheckHexSelect,10);
|
||||
262
LPWeb20/RichtextEditor/aspnet/resx/dialog.css
Normal file
@@ -0,0 +1,262 @@
|
||||
body,input,textarea,button,select,fieldset,table
|
||||
{
|
||||
color: windowtext;
|
||||
font-family:"Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
table, textarea
|
||||
{
|
||||
text-align:left;
|
||||
}
|
||||
button
|
||||
{
|
||||
padding-top: 1px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.formbutton{
|
||||
cursor:pointer;
|
||||
border:outset 1px #666;
|
||||
background:#999;
|
||||
color:#222;
|
||||
padding: 1px 10px;
|
||||
height: 21px;
|
||||
background:url(../images/formbn.gif) repeat-x left top;
|
||||
}
|
||||
#uploader input {
|
||||
cursor:pointer;
|
||||
border:outset 1px #666;
|
||||
background:#999;
|
||||
color:#222;
|
||||
padding: 1px 10px;
|
||||
height: 21px;
|
||||
background:url(../images/formbn.gif) repeat-x left top;
|
||||
vertical-align:top;
|
||||
}
|
||||
#uploader
|
||||
{
|
||||
padding:10px 0 10px 30px;
|
||||
width:100px;
|
||||
}
|
||||
|
||||
fieldset
|
||||
{
|
||||
border:1px solid #dddddd;
|
||||
padding: 2px;
|
||||
}
|
||||
.boxBg
|
||||
{
|
||||
background-color:#dddddd;
|
||||
}
|
||||
.boxBorder
|
||||
{
|
||||
border:1px solid #dddddd;
|
||||
}
|
||||
|
||||
.normal
|
||||
{
|
||||
color: windowtext; font:normal 11px Tahoma;
|
||||
}
|
||||
.sortable
|
||||
{
|
||||
color: windowtext; font:normal 11px Tahoma;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
background-color:#eeeeee;
|
||||
overflow:hidden;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.buttons a
|
||||
{
|
||||
width:100px;
|
||||
margin: 0 7px 3px 0;
|
||||
text-decoration: none;
|
||||
background-color:#f5f5f5;
|
||||
background: url(images/formbg.gif) repeat-x left top;
|
||||
border-top:solid 1px #cccccc;
|
||||
border-left:solid 1px #cccccc;
|
||||
border-right:solid 1px #aaaaaa;
|
||||
border-bottom:solid 1px #aaaaaa;
|
||||
padding: 4px 12px 5px 5px;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
font:normal 11px Tahoma;
|
||||
line-height: 120%;
|
||||
color: #333;
|
||||
}
|
||||
.buttons a img
|
||||
{
|
||||
margin: 0 3px -3px 0 !important;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
padding: 0 !important;
|
||||
border: none !important;
|
||||
display: inline !important;
|
||||
}
|
||||
.buttons a:hover
|
||||
{
|
||||
background-color: #C0DDFC;
|
||||
background: url(images/formbg2.gif) repeat-x left top;
|
||||
border: 1px solid #3388ff;
|
||||
color: #333;
|
||||
}
|
||||
.buttons a.current
|
||||
{
|
||||
background-color: #C0DDFC;
|
||||
background: url(images/formbg2.gif) repeat-x left top;
|
||||
border: 1px solid #3388ff;
|
||||
color: #333;
|
||||
}
|
||||
.buttons a.current:hover
|
||||
{
|
||||
background: url(images/formbg.gif) repeat-x left top;
|
||||
border-top:solid 1px #cccccc;
|
||||
border-left:solid 1px #cccccc;
|
||||
border-right:solid 1px #aaaaaa;
|
||||
border-bottom:solid 1px #aaaaaa;
|
||||
}
|
||||
|
||||
#div_demo
|
||||
{
|
||||
position:static!important;
|
||||
width:100%!important;
|
||||
height:100%!important;
|
||||
}
|
||||
|
||||
#outer
|
||||
{
|
||||
width:300px;
|
||||
overflow:auto;
|
||||
height:150px;
|
||||
margin-top:7px;
|
||||
background-color: #ffffff;
|
||||
font:normal 11px Tahoma;
|
||||
border: #dddddd 1px solid;
|
||||
}
|
||||
|
||||
.inputbuttoncancel , .inputbuttoninsert
|
||||
{
|
||||
width:80px;
|
||||
padding-top:2px;
|
||||
}
|
||||
.dialogButton
|
||||
{
|
||||
border:1px solid #f5f5f4;
|
||||
padding:1px;
|
||||
}
|
||||
|
||||
.editimgDisabled
|
||||
{
|
||||
/*filter:gray alpha(opacity=25);opacity: .25; -moz-opacity: .25;*/
|
||||
}
|
||||
.filelistHeadCol A
|
||||
{
|
||||
font:normal 11px Tahoma;
|
||||
/* cursor: default; */
|
||||
color: windowtext;
|
||||
}
|
||||
|
||||
a.filelistHeadCol:visited, a.filelistHeadCol:link /* Font used for links in the navigation menu */
|
||||
{
|
||||
font:normal 11px Tahoma;
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.filelistHeadCol:Hover /* Font used for hovering over a link in the navigation menu */
|
||||
{
|
||||
color: #FF3300;
|
||||
font:normal 11px Tahoma;
|
||||
}
|
||||
|
||||
#container {padding:10px;margin:0;text-align:center; background:#eeeeee;}
|
||||
#container-bottom { clear:both; text-align:right; padding-right:30px; margin-right:30px;background:#eeeeee;margin-top:5px;}
|
||||
|
||||
.tab-pane-control.tab-pane {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
.tab-pane-control.tab-pane {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tab-pane-control .tab-row .tab {
|
||||
font: normal 11px Tahoma;
|
||||
display: inline;
|
||||
margin: 1px -2px 1px 2px;
|
||||
float: left;
|
||||
padding: 2px 5px 3px 5px;
|
||||
background: #ECECEC url(../images/formbn.gif) repeat-x;
|
||||
border: 1px solid;
|
||||
border-color: #898C95;
|
||||
border-bottom: 0;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
top: 0;
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
}
|
||||
|
||||
.tab-pane-control .tab-row .tab.selected {
|
||||
border-bottom: 0;
|
||||
z-index: 3;
|
||||
padding: 2px 6px 5px 7px;
|
||||
margin: 1px -3px -2px 0px;
|
||||
top: -2px;
|
||||
background: #f5f5f5;
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
}
|
||||
|
||||
.tab-pane-control .tab-row .tab a {
|
||||
font: normal 11px Tahoma;
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tab-pane-control .tab-row .hover a {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.tab-pane-control .tab-page {
|
||||
clear: both;
|
||||
border: 1px solid;
|
||||
border-color: #898C95;
|
||||
background: #f5f5f5;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
top: -2px;
|
||||
color: black;
|
||||
font: Message-Box;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.tab-pane-control .tab-row {
|
||||
z-index: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tab-pane-control .tab-row {
|
||||
z-index: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#FoldersAndFiles {table-layout:fixed;}
|
||||
#FoldersAndFiles td{text-align:left;vertical-align: middle;}
|
||||
.cursor{cursor:pointer;cursor:hand;}
|
||||
div.progress-container {
|
||||
background-color:green;height:5px;width:50px;font-size:5px;
|
||||
margin:2px 5px 2px 6px;
|
||||
}
|
||||
|
||||
div.progress-container div {
|
||||
background-color:red;height:5px;font-size:5px
|
||||
}
|
||||
|
||||
#uploadinfo {margin:0;padding:0 0 0 20px;}
|
||||
#ajaxdiv{padding:10px;text-align:center;background:#eeeeee;}
|
||||
80
LPWeb20/RichtextEditor/aspnet/resx/insertchars.js
Normal file
@@ -0,0 +1,80 @@
|
||||
|
||||
|
||||
//----------------------------------------------------------------
|
||||
//----------------------------------------------------------------
|
||||
|
||||
//this file put in front of body
|
||||
|
||||
var editor=parent.rteinsertcharseditor
|
||||
|
||||
function getchar(obj)
|
||||
{
|
||||
var h=obj.innerHTML;
|
||||
if(!h)
|
||||
return;
|
||||
|
||||
var fontval=getFontValue()||"Verdana";
|
||||
|
||||
if(fontval=="Unicode")
|
||||
{
|
||||
h=obj.innerText;
|
||||
}
|
||||
else if(fontval!="Verdana")
|
||||
{
|
||||
h="<span style=\x27font-family:"+fontval+"\x27>"+obj.innerHTML+"</span>";
|
||||
}
|
||||
|
||||
editor.InsertHTML(h);
|
||||
|
||||
parent.rteinsertcharsdialog.close();
|
||||
|
||||
editor.Focus();
|
||||
}
|
||||
function do_cancel()
|
||||
{
|
||||
parent.rteinsertcharsdialog.close();
|
||||
editor.Focus();
|
||||
}
|
||||
|
||||
function getFontValue()
|
||||
{
|
||||
var coll=document.getElementsByName("selfont");
|
||||
for(var i=0;i<coll.length;i++)
|
||||
if(coll.item(i).checked)
|
||||
return coll.item(i).value;
|
||||
}
|
||||
function sel_font_change()
|
||||
{
|
||||
var font=getFontValue()||"Verdana";
|
||||
|
||||
var charstable1=document.getElementById("charstable1")
|
||||
var charstable2=document.getElementById("charstable2")
|
||||
|
||||
charstable1.style.fontFamily=font;
|
||||
charstable1.style.display=(font!="Unicode"?"block":"none")
|
||||
charstable2.style.display=(font=="Unicode"?"block":"none")
|
||||
|
||||
}
|
||||
|
||||
new function()
|
||||
{
|
||||
var ns=document.getElementsByTagName("*");
|
||||
for(var i=0;i<ns.length;i++)
|
||||
{
|
||||
var n=ns[i];
|
||||
if(n.getAttribute('langtext')!="1")continue;
|
||||
var t=n.innerText||n.textContent||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.innerText=t;
|
||||
n.textContent=t;
|
||||
}
|
||||
var t=n.value||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.value=t;
|
||||
}
|
||||
}
|
||||
}
|
||||
47
LPWeb20/RichtextEditor/aspnet/resx/keyboard-data.js
Normal file
@@ -0,0 +1,47 @@
|
||||
/*michel.staelens@wanadoo.fr*/
|
||||
/*definition des 104 caracteres en hexa unicode*/
|
||||
var Maj=new Array()
|
||||
var Min=new Array()
|
||||
Maj["français"] ="0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|00B0|002B|0023|0041|005A|0045|0052|0054|0059|0055|0049|004F|0050|00A8|0025|0051|0053|0044|0046|0047|0048|004A|004B|004C|004D|00B5|0057|0058|0043|0056|0042|004E|003F|002E|002F|00A7|003C|005B|007B|00A3|007E|0000"
|
||||
Min["français"] ="0026|00E9|0022|0027|0028|002D|00E8|005F|00E7|00E0|0029|003D|0040|0061|007A|0065|0072|0074|0079|0075|0069|006F|0070|005E|00F9|0071|0073|0064|0066|0067|0068|006A|006B|006C|006D|002A|0077|0078|0063|0076|0062|006E|002C|003B|003A|0021|003E|005D|007D|0024|007E|0000"
|
||||
Maj["arabe"] ="0651|0021|0040|0023|0024|0025|005E|0026|002A|0029|0028|005F|002B|064E|064B|064F|064C|0625|0625|2018|00F7|00D7|061B|003C|003E|0650|064D|005D|005B|0623|0623|0640|060C|002F|003A|0022|007E|0652|007D|007B|0622|0622|2019|002C|002E|061F|007C|0000|0000|0000|0000|0000"
|
||||
Min["arabe"] ="0630|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0636|0635|062B|0642|0641|063A|0639|0647|062E|062D|062C|062F|0634|0633|064A|0628|0644|0627|062A|0646|0645|0643|0637|0626|0621|0624|0631|06440627|0649|0629|0648|0632|0638|005C|0000|0000|0000|0000|0000"
|
||||
Maj["arabe"] ="0651|0021|0040|0023|0024|0025|005E|0026|002A|0029|0028|005F|002B|064E|064B|064F|064C|0625|0625|2018|00F7|00D7|061B|003C|003E|0650|064D|005D|005B|0623|0623|0640|060C|002F|003A|0022|007E|0652|007D|007B|0622|0622|2019|002C|002E|061F|007C|0000|0000|0000|0000|0000"
|
||||
Min["arabe"] ="0630|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0636|0635|062B|0642|0641|063A|0639|0647|062E|062D|062C|062F|0634|0633|064A|0628|0644|0627|062A|0646|0645|0643|0637|0626|0621|0624|0631|06440627|0649|0629|0648|0632|0638|005C|0000|0000|0000|0000|0000"
|
||||
Maj["bulgare"] ="007E|0021|003F|002B|0022|0025|003D|003A|002F|005F|2116|0406|0056|044B|0423|0415|0418|0428|0429|041A|0421|0414|0417|0426|00A7|042C|042F|0410|041E|0416|0413|0422|041D|0412|041C|0427|042E|0419|042A|042D|0424|0425|041F|0420|041B|0411|0029|0000|0000|0000|0000|0000"
|
||||
Min["bulgare"] ="0060|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|002E|002C|0443|0435|0438|0448|0449|043A|0441|0434|0437|0446|003B|044C|044F|0430|043E|0436|0433|0442|043D|0432|043C|0447|044E|0439|044A|044D|0444|0445|043F|0440|043B|0431|0028|0000|0000|0000|0000|0000"
|
||||
Maj["croate"] ="00B8|0021|0022|0023|0024|0025|0026|002F|0028|0029|003D|003F|00A8|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|0160|0110|0041|0053|0044|0046|0047|0048|004A|004B|004C|010C|0106|0059|0058|0043|0056|0042|004E|004D|017D|003B|003A|003C|003E|005F|002D|002A|002B"
|
||||
Min["croate"] ="00B8|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|0027|00A8|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|0161|0111|0061|0073|0064|0066|0067|0068|006A|006B|006C|010D|0107|0079|0078|0063|0076|0062|006E|006D|017E|002C|002E|003C|003E|005F|002D|002A|002B"
|
||||
Maj["tchèque"] ="00B0|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|0025|02C7|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|002F|0028|0041|0053|0044|0046|0047|0048|004A|004B|004C|0022|0027|0059|0058|0043|0056|0042|004E|004D|003F|003A|005F|005B|007B|0021|0000|0148|010F"
|
||||
Min["tchèque"] ="003B|002B|011B|0161|010D|0159|017E|00FD|00E1|00ED|00E9|003D|00B4|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|00FA|0029|0061|0073|0064|0066|0067|0068|006A|006B|006C|016F|00A7|0079|0078|0063|0076|0062|006E|006D|002C|002E|002D|005D|007D|00A8|0040|00F3|0165"
|
||||
Maj["danois"] ="00A7|0021|0022|0023|00A4|0025|0026|002F|0028|0029|003D|003F|0060|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|00C5|005E|0041|0053|0044|0046|0047|0048|004A|004B|004C|00C6|00D8|003E|005A|0058|0043|0056|0042|004E|004D|003B|003A|002A|005F|007B|007D|005C|007E"
|
||||
Min["danois"] ="00BD|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002B|00B4|0071|0077|0065|0072|0074|0079|0075|0069|006F|0070|00E5|00A8|0061|0073|0064|0066|0067|0068|006A|006B|006C|00E6|00F8|003C|007A|0078|0063|0076|0062|006E|006D|002C|002E|0027|002D|005B|005D|007C|0040"
|
||||
Maj["finnois"] ="00A7|0021|0022|0023|00A4|0025|0026|002F|0028|0029|003D|003F|0060|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|00C5|005E|0041|0053|0044|0046|0047|0048|004A|004B|004C|00D6|00C4|003E|005A|0058|0043|0056|0042|004E|004D|003B|003A|002A|005F|007B|007D|005C|007E"
|
||||
Min["finnois"] ="00BD|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002B|00B4|0071|0077|0065|0072|0074|0079|0075|0069|006F|0070|00E5|00A8|0061|0073|0064|0066|0067|0068|006A|006B|006C|00F6|00E4|003C|007A|0078|0063|0076|0062|006E|006D|002C|002E|0027|002D|005B|005D|007C|0040"
|
||||
Maj["grec"] ="007E|0021|0040|0023|0024|0025|0390|0026|03B0|0028|0029|005F|002B|003A|03A3|0395|03A1|03A4|03A5|0398|0399|039F|03A0|0386|038F|0391|03A3|0394|03A6|0393|0397|039E|039A|039B|038C|0022|0396|03A7|03A8|03A9|0392|039D|039C|003C|003E|003F|0388|0389|038A|03AA|03AB|038E"
|
||||
Min["grec"] ="0060|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|003B|03C2|03B5|03C1|03C4|03C5|03B8|03B9|03BF|03C0|03AC|03CE|03B1|03C3|03B4|03C6|03B3|03B7|03BE|03BA|03BB|03CC|0027|03B6|03C7|03C8|03C9|03B2|03BD|03BC|002C|002E|002F|03AD|03AE|03AF|03CA|03CB|03CD"
|
||||
Maj["hébreu"] ="007E|0021|0040|0023|0024|0025|005E|0026|002A|0028|0029|005F|002B|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|007B|007D|0041|0053|0044|0046|0047|0048|004A|004B|004C|003A|0022|005A|0058|0043|0056|0042|004E|004D|003C|003E|003F|0000|0000|0000|0000|0000|0000"
|
||||
Min["hébreu"] ="0060|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|002F|0027|05E7|05E8|05D0|05D8|05D5|05DF|05DD|05E4|005B|005D|05E9|05D3|05D2|05DB|05E2|05D9|05D7|05DC|05DA|05E3|002C|05D6|05E1|05D1|05D4|05E0|05DE|05E6|05EA|05E5|002E|0000|0000|0000|0000|0000|0000"
|
||||
Maj["hongrois"] ="00A7|0027|0022|002B|0021|0025|002F|003D|0028|0029|00ED|00DC|00D3|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|0150|00DA|0041|0053|0044|0046|0047|0048|004A|004B|004C|00C9|00C1|0170|00CD|0059|0058|0043|0056|0042|004E|004D|003F|002E|003A|002D|005F|007B|007D"
|
||||
Min["hongrois"] ="0030|0031|0032|0033|0034|0035|0036|0037|0038|0039|00F6|00FC|00F3|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|0151|00FA|0061|0073|0064|0066|0067|0068|006A|006B|006C|00E9|00E1|0171|00ED|0079|0078|0063|0076|0062|006E|006D|002C|002E|003A|002D|005F|007B|007D"
|
||||
Maj["latin (tous)"] ="0060|00B4|005E|00A8|007E|00B0|00B7|00B8|00AF|02D9|02DB|02C7|02D8|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|00C6|02DD|0041|0053|0044|0046|0047|0048|004A|004B|004C|0141|0152|0059|0058|0043|0056|0042|004E|004D|01A0|01AF|00D8|0126|0110|0132|00DE|00D0|00DF"
|
||||
Min["latin (tous)"] ="0060|00B4|005E|00A8|007E|00B0|00B7|00B8|00AF|02D9|02DB|02C7|02D8|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|00E6|02DD|0061|0073|0064|0066|0067|0068|006A|006B|006C|0142|0153|0079|0078|0063|0076|0062|006E|006D|01A1|01B0|00F8|0127|0111|0133|00FE|00F0|00DF"
|
||||
Maj["norvégien"] ="00A7|0021|0022|0023|00A4|0025|0026|002F|0028|0029|003D|003F|0060|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|00C5|005E|0041|0053|0044|0046|0047|0048|004A|004B|00D8|00C6|00C4|003E|005A|0058|0043|0056|0042|004E|004D|003B|003A|002A|005F|007B|007D|005C|007E"
|
||||
Min["norvégien"] ="00BD|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002B|00B4|0071|0077|0065|0072|0074|0079|0075|0069|006F|0070|00E5|00A8|0061|0073|0064|0066|0067|0068|006A|006B|00F8|00E6|00E4|003C|007A|0078|0063|0076|0062|006E|006D|002C|002E|0027|002D|005B|005D|007C|0040"
|
||||
Maj["polonais"] ="002A|0021|0022|0023|00A4|0025|0026|002F|0028|0029|003D|003F|017A|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|0144|0107|0041|0053|0044|0046|0047|0048|004A|004B|004C|0141|0119|0059|0058|0043|0056|0042|004E|004D|003B|003A|005F|003C|005B|007B|02D9|00B4|02DB"
|
||||
Min["polonais"] ="0027|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002B|00F3|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|017C|015B|0061|0073|0064|0066|0067|0068|006A|006B|006C|0142|0105|0079|0078|0063|0076|0062|006E|006D|002C|002E|002D|003E|005D|007D|02D9|00B4|02DB"
|
||||
Maj["russe"] ="0401|0021|0040|0023|2116|0025|005E|0026|002A|0028|0029|005F|002B|0419|0426|0423|041A|0415|041D|0413|0428|0429|0417|0425|042A|0424|042B|0412|0410|041F|0420|041E|041B|0414|0416|042D|042F|0427|0421|041C|0418|0422|042C|0411|042E|003E|002E|003A|0022|005B|005D|003F"
|
||||
Min["russe"] ="0451|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0439|0446|0443|043A|0435|043D|0433|0448|0449|0437|0445|044A|0444|044B|0432|0430|043F|0440|043E|043B|0434|0436|044D|044F|0447|0441|043C|0438|0442|044C|0431|044E|003C|002C|003B|0027|007B|007D|002F"
|
||||
Maj["slovaque"] ="00B0|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|0025|02C7|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|002F|0028|0041|0053|0044|0046|0047|0048|004A|004B|004C|0022|0021|0059|0058|0043|0056|0042|004E|004D|003F|003A|005F|003C|005B|010F|0029|002A|0000"
|
||||
Min["slovaque"] ="003B|002B|013E|0161|010D|0165|017E|00FD|00E1|00ED|00E9|003D|00B4|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|00FA|00E4|0061|0073|0064|0066|0067|0068|006A|006B|006C|00F4|00A7|0079|0078|0063|0076|0062|006E|006D|002C|002E|002D|003E|005D|00F3|0148|0026|0000"
|
||||
Maj["espagnol"] ="00AA|0021|0022|00B7|0024|0025|0026|002F|0028|0029|003D|003F|00BF|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|005E|00A8|0041|0053|0044|0046|0047|0048|004A|004B|004C|00D1|00C7|005A|0058|0043|0056|0042|004E|004D|003B|003A|005F|003E|007C|0040|0023|007E|002A"
|
||||
Min["espagnol"] ="00BA|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|0027|00A1|0071|0077|0065|0072|0074|0079|0075|0069|006F|0070|0060|00B4|0061|0073|0064|0066|0067|0068|006A|006B|006C|00F1|00E7|007A|0078|0063|0076|0062|006E|006D|002C|002E|002D|003C|005C|0040|0023|007E|002B"
|
||||
Maj["ukrainien"] ="0401|0021|0040|0023|2116|0025|005E|0026|002A|0028|0029|005F|002B|0419|0426|0423|041A|0415|041D|0413|0428|0429|0417|0425|0407|0424|0406|0412|0410|041F|0420|041E|041B|0414|0416|0404|0490|042F|0427|0421|041C|0418|0422|042C|0411|042E|002E|003A|0022|003C|003E|003F"
|
||||
Min["ukrainien"] ="0451|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0439|0446|0443|043A|0435|043D|0433|0448|0449|0437|0445|0457|0444|0456|0432|0430|043F|0440|043E|043B|0434|0436|0454|0491|044F|0447|0441|043C|0438|0442|044C|0431|044E|002C|003B|0027|007B|007D|002F"
|
||||
Maj["vietnamien"] ="007E|0021|0040|0023|0024|0025|005E|0026|002A|0028|0029|005F|002B|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|01AF|01A0|0041|0053|0044|0046|0047|0048|004A|004B|004C|0102|00C2|005A|0058|0043|0056|0042|004E|004D|00CA|00D4|0110|003C|003E|003F|007D|003A|0022"
|
||||
Min["vietnamien"] ="20AB|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0071|0077|0065|0072|0074|0079|0075|0069|006F|0070|01B0|01A1|0061|0073|0064|0066|0067|0068|006A|006B|006C|0103|00E2|007A|0078|0063|0076|0062|006E|006D|00EA|00F4|0111|002C|002E|002F|007B|003B|0027"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
46
LPWeb20/RichtextEditor/aspnet/resx/keyboard-diacritic.js
Normal file
@@ -0,0 +1,46 @@
|
||||
/*michel.staelens@wanadoo.fr*/
|
||||
var dia = new Array()
|
||||
|
||||
dia["0060"]=new Array();dia["00B4"]=new Array();dia["005E"]=new Array();dia["00A8"]=new Array();dia["007E"]=new Array();dia["00B0"]=new Array();dia["00B7"]=new Array();dia["00B8"]=new Array();dia["00AF"]=new Array();dia["02D9"]=new Array();dia["02DB"]=new Array();dia["02C7"]=new Array();dia["02D8"]=new Array();dia["02DD"]=new Array();dia["031B"]=new Array();
|
||||
dia["0060"]["0061"]="00E0";dia["00B4"]["0061"]="00E1";dia["005E"]["0061"]="00E2";dia["00A8"]["0061"]="00E4";dia["007E"]["0061"]="00E3";dia["00B0"]["0061"]="00E5";dia["00AF"]["0061"]="0101";dia["02DB"]["0061"]="0105";dia["02D8"]["0061"]="0103";
|
||||
dia["00B4"]["0063"]="0107";dia["005E"]["0063"]="0109";dia["00B8"]["0063"]="00E7";dia["02D9"]["0063"]="010B";dia["02C7"]["0063"]="010D";
|
||||
dia["02C7"]["0064"]="010F";
|
||||
dia["0060"]["0065"]="00E8";dia["00B4"]["0065"]="00E9";dia["005E"]["0065"]="00EA";dia["00A8"]["0065"]="00EB";dia["00AF"]["0065"]="0113";dia["02D9"]["0065"]="0117";dia["02DB"]["0065"]="0119";dia["02C7"]["0065"]="011B";dia["02D8"]["0065"]="0115";
|
||||
dia["005E"]["0067"]="011D";dia["00B8"]["0067"]="0123";dia["02D9"]["0067"]="0121";dia["02D8"]["0067"]="011F";
|
||||
dia["005E"]["0068"]="0125";
|
||||
dia["0060"]["0069"]="00EC";dia["00B4"]["0069"]="00ED";dia["005E"]["0069"]="00EE";dia["00A8"]["0069"]="00EF";dia["007E"]["0069"]="0129";dia["00AF"]["0069"]="012B";dia["02DB"]["0069"]="012F";dia["02D8"]["0069"]="012D";
|
||||
dia["005E"]["006A"]="0135";
|
||||
dia["00B8"]["006B"]="0137";
|
||||
dia["00B4"]["006C"]="013A";dia["00B7"]["006C"]="0140";dia["00B8"]["006C"]="013C";dia["02C7"]["006C"]="013E";
|
||||
dia["00B4"]["006E"]="0144";dia["007E"]["006E"]="00F1";dia["00B8"]["006E"]="0146";dia["02D8"]["006E"]="0148";
|
||||
dia["0060"]["006F"]="00F2";dia["00B4"]["006F"]="00F3";dia["005E"]["006F"]="00F4";dia["00A8"]["006F"]="00F6";dia["007E"]["006F"]="00F5";dia["00AF"]["006F"]="014D";dia["02D8"]["006F"]="014F";dia["02DD"]["006F"]="0151";dia["031B"]["006F"]="01A1";
|
||||
dia["00B4"]["0072"]="0155";dia["00B8"]["0072"]="0157";dia["02C7"]["0072"]="0159";
|
||||
dia["00B4"]["0073"]="015B";dia["005E"]["0073"]="015D";dia["00B8"]["0073"]="015F";dia["02C7"]["0073"]="0161";
|
||||
dia["00B8"]["0074"]="0163";dia["02C7"]["0074"]="0165";
|
||||
dia["0060"]["0075"]="00F9";dia["00B4"]["0075"]="00FA";dia["005E"]["0075"]="00FB";dia["00A8"]["0075"]="00FC";dia["007E"]["0075"]="0169";dia["00B0"]["0075"]="016F";dia["00AF"]["0075"]="016B";dia["02DB"]["0075"]="0173";dia["02D8"]["0075"]="016D";dia["02DD"]["0075"]="0171";dia["031B"]["0075"]="01B0";
|
||||
dia["005E"]["0077"]="0175";
|
||||
dia["00B4"]["0079"]="00FD";dia["005E"]["0079"]="0177";dia["00A8"]["0079"]="00FF";
|
||||
dia["00B4"]["007A"]="017A";dia["02D9"]["007A"]="017C";dia["02C7"]["007A"]="017E";
|
||||
dia["00B4"]["00E6"]="01FD";
|
||||
dia["00B4"]["00F8"]="01FF";
|
||||
dia["0060"]["0041"]="00C0";dia["00B4"]["0041"]="00C1";dia["005E"]["0041"]="00C2";dia["00A8"]["0041"]="00C4";dia["007E"]["0041"]="00C3";dia["00B0"]["0041"]="00C5";dia["00AF"]["0041"]="0100";dia["02DB"]["0041"]="0104";dia["02D8"]["0041"]="0102";
|
||||
dia["00B4"]["0043"]="0106";dia["005E"]["0043"]="0108";dia["00B8"]["0043"]="00C7";dia["02D9"]["0043"]="010A";dia["02C7"]["0043"]="010C";
|
||||
dia["02C7"]["0044"]="010E";
|
||||
dia["0060"]["0045"]="00C8";dia["00B4"]["0045"]="00C9";dia["005E"]["0045"]="00CA";dia["00A8"]["0045"]="00CB";dia["00AF"]["0045"]="0112";dia["02D9"]["0045"]="0116";dia["02DB"]["0045"]="0118";dia["02C7"]["0045"]="011A";dia["02D8"]["0045"]="0114";
|
||||
dia["005E"]["0047"]="011C";dia["00B8"]["0047"]="0122";dia["02D9"]["0047"]="0120";dia["02D8"]["0047"]="011E";
|
||||
dia["005E"]["0048"]="0124";
|
||||
dia["0060"]["0049"]="00CC";dia["00B4"]["0049"]="00CD";dia["005E"]["0049"]="00CE";dia["00A8"]["0049"]="00CF";dia["007E"]["0049"]="0128";dia["00AF"]["0049"]="012A";dia["02D9"]["0049"]="0130";dia["02DB"]["0049"]="012E";dia["02D8"]["0049"]="012C";
|
||||
dia["005E"]["004A"]="0134";
|
||||
dia["00B8"]["004B"]="0136";
|
||||
dia["00B4"]["004C"]="0139";dia["00B7"]["004C"]="013F";dia["00B8"]["004C"]="013B";dia["02C7"]["004C"]="013D";
|
||||
dia["00B4"]["004E"]="0143";dia["007E"]["004E"]="00D1";dia["00B8"]["004E"]="0145";dia["02D8"]["004E"]="0147";
|
||||
dia["0060"]["004F"]="00D2";dia["00B4"]["004F"]="00D3";dia["005E"]["004F"]="00D4";dia["00A8"]["004F"]="00D6";dia["007E"]["004F"]="00D5";dia["00AF"]["004F"]="014C";dia["02D8"]["004F"]="014E";dia["02DD"]["004F"]="0150";dia["031B"]["004F"]="01A0";
|
||||
dia["00B4"]["0052"]="0154";dia["00B8"]["0052"]="0156";dia["02C7"]["0052"]="0158";
|
||||
dia["00B4"]["0053"]="015A";dia["005E"]["0053"]="015C";dia["00B8"]["0053"]="015E";dia["02C7"]["0053"]="0160";
|
||||
dia["00B8"]["0054"]="0162";dia["02C7"]["0054"]="0164";
|
||||
dia["0060"]["0055"]="00D9";dia["00B4"]["0055"]="00DA";dia["005E"]["0055"]="00DB";dia["00A8"]["0055"]="00DC";dia["007E"]["0055"]="0168";dia["00B0"]["0055"]="016E";dia["00AF"]["0055"]="016A";dia["02DB"]["0055"]="0172";dia["02D8"]["0055"]="016C";dia["02DD"]["0055"]="0170";dia["031B"]["0055"]="01AF";
|
||||
dia["005E"]["0057"]="0174";
|
||||
dia["00B4"]["0059"]="00DD";dia["005E"]["0059"]="0176";dia["00A8"]["0059"]="0178";
|
||||
dia["00B4"]["005A"]="0179";dia["02D9"]["005A"]="017B";dia["02C7"]["005A"]="017D";
|
||||
dia["00B4"]["00C6"]="01FC";
|
||||
dia["00B4"]["00D8"]="01FE";
|
||||
11
LPWeb20/RichtextEditor/aspnet/resx/keyboard-dialogue.js
Normal file
@@ -0,0 +1,11 @@
|
||||
function afficher(txt)
|
||||
{
|
||||
// editor.InsertHTML(txt);
|
||||
document.getElementById('keyboard_area').value = txt ;
|
||||
}
|
||||
|
||||
function rechercher()
|
||||
{
|
||||
// editor.getHTML();
|
||||
return document.getElementById('keyboard_area').value ;
|
||||
}
|
||||
161
LPWeb20/RichtextEditor/aspnet/resx/keyboard-multihexa.js
Normal file
@@ -0,0 +1,161 @@
|
||||
var caps=0, lock=0, hexchars="0123456789ABCDEF", accent="0000", clavdeb=0
|
||||
var clav=new Array();j=0;for (i in Maj){clav[j]=i;j++}
|
||||
var ns6=((!document.all)&&(document.getElementById))
|
||||
var ie=document.all
|
||||
|
||||
var langue=getCk();if (langue==""){langue=clav[clavdeb]}
|
||||
CarMaj=Maj[langue].split("|");CarMin=Min[langue].split("|")
|
||||
|
||||
/*clavier*/
|
||||
var posClavierLeft=0, posClavierTop=0
|
||||
if (ns6){posClavierLeft=0;posClavierTop=80}
|
||||
else if (ie){posClavierLeft=0;posClavierTop=80}
|
||||
tracer("fond",posClavierLeft,posClavierTop,'<img src="images/multiclavier.gif" width=404 height=152 border="0"><br />',"sign")
|
||||
|
||||
/*touches*/
|
||||
var posX=new Array(0,28,56,84,112,140,168,196,224,252,280,308,336,42,70,98,126,154,182,210,238,266,294,322,350,50,78,106,134,162,190,218,246,274,302,330,64,92,120,148,176,204,232,260,288,316,28,56,84,294,322,350)
|
||||
var posY=new Array(14,14,14,14,14,14,14,14,14,14,14,14,14,42,42,42,42,42,42,42,42,42,42,42,42,70,70,70,70,70,70,70,70,70,70,70,98,98,98,98,98,98,98,98,98,98,126,126,126,126,126,126)
|
||||
var nbTouches=52
|
||||
for (i=0;i<nbTouches;i++){
|
||||
CarMaj[i]=((CarMaj[i]!="0000")?(fromhexby4tocar(CarMaj[i])):"")
|
||||
CarMin[i]=((CarMin[i]!="0000")?(fromhexby4tocar(CarMin[i])):"")
|
||||
if (CarMaj[i]==CarMin[i].toUpperCase()){
|
||||
cecar=((lock==0)&&(caps==0)?CarMin[i]:CarMaj[i])
|
||||
tracer("car"+i,posClavierLeft+6+posX[i],posClavierTop+3+posY[i],cecar,((dia[hexa(cecar)]!=null)?"simpledia":"simple"))
|
||||
tracer("majus"+i,posClavierLeft+15+posX[i],posClavierTop+1+posY[i]," ","double")
|
||||
tracer("minus"+i,posClavierLeft+3+posX[i],posClavierTop+9+posY[i]," ","double")
|
||||
}
|
||||
else{
|
||||
tracer("car"+i,posClavierLeft+6+posX[i],posClavierTop+3+posY[i]," ","simple")
|
||||
cecar=CarMin[i]
|
||||
tracer("minus"+i,posClavierLeft+3+posX[i],posClavierTop+9+posY[i],cecar,((dia[hexa(cecar)]!=null)?"doubledia":"double"))
|
||||
cecar=CarMaj[i]
|
||||
tracer("majus"+i,posClavierLeft+15+posX[i],posClavierTop+1+posY[i],cecar,((dia[hexa(cecar)]!=null)?"doubledia":"double"))
|
||||
}
|
||||
}
|
||||
/*touches de fonctions*/
|
||||
var actC1=new Array(0,371,364,0,378,0,358,0,344,0,112,378)
|
||||
var actC2=new Array(0,0,14,42,42,70,70,98,98,126,126,126)
|
||||
var actC3=new Array(32,403,403,39,403,47,403,61,403,25,291,403)
|
||||
var actC4=new Array(11,11,39,67,67,95,95,123,123,151,151,151)
|
||||
var act =new Array("kb-","kb+","Delete","Clear","Back","CapsLock","Enter","Shift","Shift","<|<","Space",">|>")
|
||||
var effet=new Array("clavscroll(-3)","clavscroll(3)","faire(\"del\")","RAZ()","faire(\"bck\")","bloq()","faire(\"\\n\")","haut()","haut()","faire(\"ar\")","faire(\" \")","faire(\"av\")")
|
||||
var nbActions=12
|
||||
for (i=0;i<nbActions;i++){tracer("act"+i,posClavierLeft+1+actC1[i],posClavierTop-1+actC2[i],act[i],"action")}
|
||||
/*navigation*/
|
||||
var clavC1=new Array(35,119,203,287)
|
||||
var clavC2=new Array(0,0,0,0)
|
||||
var clavC3=new Array(116,200,284,368)
|
||||
var clavC4=new Array(11,11,11,11)
|
||||
for (i=0;i<4;i++){tracer("clav"+i,posClavierLeft+5+clavC1[i],posClavierTop-1+clavC2[i],clav[i],"clavier")}
|
||||
/*zones reactives*/
|
||||
tracer("masque",posClavierLeft,posClavierTop,'<img src="images/1x1.gif" width=404 height=152 border="0" usemap="#clavier">')
|
||||
document.write('<map name="clavier">')
|
||||
for (i=0;i<nbTouches;i++){document.write('<area coords="'+posX[i]+','+posY[i]+','+(posX[i]+25)+','+(posY[i]+25)+'" href="javascript:void(0)" onClick=\'javascript:ecrire('+i+')\'>')}
|
||||
for (i=0;i<nbActions;i++){document.write('<area coords="'+actC1[i]+','+actC2[i]+','+actC3[i]+','+actC4[i]+'" href="javascript:void(0)" onClick=\'javascript:'+effet[i]+'\'>')}
|
||||
for (i=0;i<4;i++){document.write('<area coords="'+clavC1[i]+','+clavC2[i]+','+clavC3[i]+','+clavC4[i]+'" href=\'javascript:charger('+i+')\'>')}
|
||||
document.write('</map>')
|
||||
|
||||
/*fonctions*/
|
||||
function ecrire(i){
|
||||
txt=rechercher()+"|";subtxt=txt.split("|")
|
||||
ceci=(lock==1)?CarMaj[i]:((caps==1)?CarMaj[i]:CarMin[i])
|
||||
if (test(ceci)){subtxt[0]+=cardia(ceci);distinguer(false)}
|
||||
else if(dia[accent]!=null&&dia[hexa(ceci)]!=null){distinguer(false);accent=hexa(ceci);distinguer(true)}
|
||||
else if(dia[accent]!=null){subtxt[0]+=fromhexby4tocar(accent)+ceci;distinguer(false)}
|
||||
else if(dia[hexa(ceci)]!=null){accent=hexa(ceci);distinguer(true)}
|
||||
else {subtxt[0]+=ceci}
|
||||
txt=subtxt[0]+"|"+subtxt[1]
|
||||
afficher(txt)
|
||||
if (caps==1){caps=0;MinusMajus()}
|
||||
}
|
||||
function faire(ceci){
|
||||
txt=rechercher()+"|";subtxt=txt.split("|")
|
||||
l0=subtxt[0].length
|
||||
l1=subtxt[1].length
|
||||
c1=subtxt[0].substring(0,(l0-2))
|
||||
c2=subtxt[0].substring(0,(l0-1))
|
||||
c3=subtxt[1].substring(0,1)
|
||||
c4=subtxt[1].substring(0,2)
|
||||
c5=subtxt[0].substring((l0-2),l0)
|
||||
c6=subtxt[0].substring((l0-1),l0)
|
||||
c7=subtxt[1].substring(1,l1)
|
||||
c8=subtxt[1].substring(2,l1)
|
||||
if(dia[accent]!=null){if(ceci==" "){ceci=fromhexby4tocar(accent)}distinguer(false)}
|
||||
switch (ceci){
|
||||
case("av") :if(escape(c4)!="%0D%0A"){txt=subtxt[0]+c3+"|"+c7}else{txt=subtxt[0]+c4+"|"+c8}break
|
||||
case("ar") :if(escape(c5)!="%0D%0A"){txt=c2+"|"+c6+subtxt[1]}else{txt=c1+"|"+c5+subtxt[1]}break
|
||||
case("bck"):if(escape(c5)!="%0D%0A"){txt=c2+"|"+subtxt[1]}else{txt=c1+"|"+subtxt[1]}break
|
||||
case("del"):if(escape(c4)!="%0D%0A"){txt=subtxt[0]+"|"+c7}else{txt=subtxt[0]+"|"+c8}break
|
||||
default:txt=subtxt[0]+ceci+"|"+subtxt[1];break
|
||||
}
|
||||
afficher(txt)
|
||||
}
|
||||
function RAZ(){txt="";if(dia[accent]!=null){distinguer(false)}afficher(txt)}
|
||||
function haut(){caps=1;MinusMajus()}
|
||||
function bloq(){lock=(lock==1)?0:1;MinusMajus()}
|
||||
|
||||
/*fonctions de traitement du clavier*/
|
||||
function tracer(nom,gauche,haut,ceci,classe){ceci="<span class="+classe+">"+ceci+"</span>";document.write('<div id="'+nom+'" >'+ceci+'</div>');if (ns6){document.getElementById(nom).style.left=gauche+"px";document.getElementById(nom).style.top=haut+"px";}else if (ie){document.all(nom).style.left=gauche;document.all(nom).style.top=haut}}
|
||||
function retracer(nom,ceci,classe){ceci="<span class="+classe+">"+ceci+"</span>";if (ns6){document.getElementById(nom).innerHTML=ceci}else if (ie){doc=document.all(nom);doc.innerHTML=ceci}}
|
||||
function clavscroll(n){
|
||||
clavdeb+=n
|
||||
if (clavdeb<0){clavdeb=0}
|
||||
if (clavdeb>clav.length-4){clavdeb=clav.length-4}
|
||||
for (i=clavdeb;i<clavdeb+4;i++){retracer("clav"+(i-clavdeb),clav[i],"clavier")}
|
||||
if (clavdeb==0){retracer("act0"," ","action")}else {retracer("act0",act[0],"action")}
|
||||
if (clavdeb==clav.length-4){retracer("act1"," ","action")}else {retracer("act1",act[1],"action")}
|
||||
}
|
||||
function charger(i){
|
||||
langue=clav[i+clavdeb];setCk(langue);accent="0000"
|
||||
CarMaj=Maj[langue].split("|");CarMin=Min[langue].split("|")
|
||||
for (i=0;i<nbTouches;i++){
|
||||
CarMaj[i]=((CarMaj[i]!="0000")?(fromhexby4tocar(CarMaj[i])):"")
|
||||
CarMin[i]=((CarMin[i]!="0000")?(fromhexby4tocar(CarMin[i])):"")
|
||||
if (CarMaj[i]==CarMin[i].toUpperCase()){
|
||||
cecar=((lock==0)&&(caps==0)?CarMin[i]:CarMaj[i])
|
||||
retracer("car"+i,cecar,((dia[hexa(cecar)]!=null)?"simpledia":"simple"))
|
||||
retracer("minus"+i," ")
|
||||
retracer("majus"+i," ")
|
||||
}
|
||||
else{
|
||||
retracer("car"+i," ")
|
||||
cecar=CarMin[i]
|
||||
retracer("minus"+i,cecar,((dia[hexa(cecar)]!=null)?"doubledia":"double"))
|
||||
cecar=CarMaj[i]
|
||||
retracer("majus"+i,cecar,((dia[hexa(cecar)]!=null)?"doubledia":"double"))
|
||||
}
|
||||
}
|
||||
}
|
||||
function distinguer(oui){
|
||||
for (i=0;i<nbTouches;i++){
|
||||
if (CarMaj[i]==CarMin[i].toUpperCase()){
|
||||
cecar=((lock==0)&&(caps==0)?CarMin[i]:CarMaj[i])
|
||||
if(test(cecar)){retracer("car"+i,oui?(cardia(cecar)):cecar,oui?"simpledia":"simple")}
|
||||
}
|
||||
else{
|
||||
cecar=CarMin[i]
|
||||
if(test(cecar)){retracer("minus"+i,oui?(cardia(cecar)):cecar,oui?"doubledia":"double")}
|
||||
cecar=CarMaj[i]
|
||||
if(test(cecar)){retracer("majus"+i,oui?(cardia(cecar)):cecar,oui?"doubledia":"double")}
|
||||
}
|
||||
}
|
||||
if (!oui){accent="0000"}
|
||||
}
|
||||
function MinusMajus(){
|
||||
for (i=0;i<nbTouches;i++){
|
||||
if (CarMaj[i]==CarMin[i].toUpperCase()){
|
||||
cecar=((lock==0)&&(caps==0)?CarMin[i]:CarMaj[i])
|
||||
retracer("car"+i,(test(cecar)?cardia(cecar):cecar),((dia[hexa(cecar)]!=null||test(cecar))?"simpledia":"simple"))
|
||||
}
|
||||
}
|
||||
}
|
||||
function test(cecar){return(dia[accent]!=null&&dia[accent][hexa(cecar)]!=null)}
|
||||
function cardia(cecar){return(fromhexby4tocar(dia[accent][hexa(cecar)]))}
|
||||
function fromhex(inval){out=0;for (a=inval.length-1;a>=0;a--){out+=Math.pow(16,inval.length-a-1)*hexchars.indexOf(inval.charAt(a))}return out}
|
||||
function fromhexby4tocar(ceci){out4=new String();for (l=0;l<ceci.length;l+=4){out4+=String.fromCharCode(fromhex(ceci.substring(l,l+4)))}return out4}
|
||||
function tohex(inval){return hexchars.charAt(inval/16)+hexchars.charAt(inval%16)}
|
||||
function tohex2(inval){return tohex(inval/256)+tohex(inval%256)}
|
||||
function hexa(ceci){out="";for (k=0;k<ceci.length;k++){out+=(tohex2(ceci.charCodeAt(k)))}return out}
|
||||
function getCk(){fromN=document.cookie.indexOf("langue=")+0;if((fromN)!=-1){fromN+=7;toN=document.cookie.indexOf(";",fromN)+0;if(toN==-1){toN=document.cookie.length}return unescape(document.cookie.substring(fromN,toN))}return ""}
|
||||
function setCk(inval){if(inval!=null){exp=new Date();time=365*60*60*24*1000;exp.setTime(exp.getTime()+time);document.cookie=escape("langue")+"="+escape(inval)+"; "+"expires="+exp.toGMTString()}}
|
||||
10
LPWeb20/RichtextEditor/aspnet/resx/shBrushCSharp.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
dp.sh.Brushes.CSharp=function()
|
||||
{var keywords='abstract as base bool break byte case catch char checked class const '+'continue decimal default delegate do double else enum event explicit '+'extern false finally fixed float for foreach get goto if implicit in int '+'interface internal is lock long namespace new null object operator out '+'override params private protected public readonly ref return sbyte sealed set '+'short sizeof stackalloc static string struct switch this throw true try '+'typeof uint ulong unchecked unsafe ushort using virtual void while';this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:'comment'},{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('^\\s*#.*','gm'),css:'preprocessor'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-c';this.Style='.dp-c .vars { color: #d00; }';}
|
||||
dp.sh.Brushes.CSharp.prototype=new dp.sh.Highlighter();dp.sh.Brushes.CSharp.Aliases=['c#','c-sharp','csharp'];
|
||||
10
LPWeb20/RichtextEditor/aspnet/resx/shBrushCpp.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
dp.sh.Brushes.Cpp=function()
|
||||
{var datatypes='ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR '+'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH '+'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP '+'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY '+'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT '+'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE '+'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF '+'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR '+'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR '+'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT '+'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 '+'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR '+'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 '+'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT '+'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG '+'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM '+'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t '+'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS '+'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t '+'__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t '+'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler '+'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function '+'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf '+'va_list wchar_t wctrans_t wctype_t wint_t signed';var keywords='break case catch class const __finally __exception __try '+'const_cast continue private public protected __declspec '+'default delete deprecated dllexport dllimport do dynamic_cast '+'else enum explicit extern if for friend goto inline '+'mutable naked namespace new noinline noreturn nothrow '+'register reinterpret_cast return selectany '+'sizeof static static_cast struct switch template this '+'thread throw true false try typedef typeid typename union '+'using uuid virtual void volatile whcar_t while';this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:'comment'},{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('^ *#.*','gm'),css:'preprocessor'},{regex:new RegExp(this.GetKeywords(datatypes),'gm'),css:'datatypes'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-cpp';this.Style='.dp-cpp .datatypes { color: #2E8B57; font-weight: bold; }';}
|
||||
dp.sh.Brushes.Cpp.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Cpp.Aliases=['cpp','c','c++'];
|
||||
14
LPWeb20/RichtextEditor/aspnet/resx/shBrushCss.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
dp.sh.Brushes.CSS=function()
|
||||
{var keywords='ascent azimuth background-attachment background-color background-image background-position '+'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top '+'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color '+'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width '+'border-bottom-width border-left-width border-width border cap-height caption-side centerline clear clip color '+'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display '+'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font '+'height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top '+'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans '+'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page '+'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position '+'quotes richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress '+'table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em '+'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';var values='above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';var fonts='[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif';this.regexList=[{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('\\#[a-zA-Z0-9]{3,6}','g'),css:'value'},{regex:new RegExp('(-?\\d+)(\.\\d+)?(px|em|pt|\:|\%|)','g'),css:'value'},{regex:new RegExp('!important','g'),css:'important'},{regex:new RegExp(this.GetKeywordsCSS(keywords),'gm'),css:'keyword'},{regex:new RegExp(this.GetValuesCSS(values),'g'),css:'value'},{regex:new RegExp(this.GetValuesCSS(fonts),'g'),css:'value'}];this.CssClass='dp-css';this.Style='.dp-css .value { color: black; }'+'.dp-css .important { color: red; }';}
|
||||
dp.sh.Highlighter.prototype.GetKeywordsCSS=function(str)
|
||||
{return'\\b([a-z_]|)'+str.replace(/ /g,'(?=:)\\b|\\b([a-z_\\*]|\\*|)')+'(?=:)\\b';}
|
||||
dp.sh.Highlighter.prototype.GetValuesCSS=function(str)
|
||||
{return'\\b'+str.replace(/ /g,'(?!-)(?!:)\\b|\\b()')+'\:\\b';}
|
||||
dp.sh.Brushes.CSS.prototype=new dp.sh.Highlighter();dp.sh.Brushes.CSS.Aliases=['css'];
|
||||
10
LPWeb20/RichtextEditor/aspnet/resx/shBrushDelphi.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
dp.sh.Brushes.Delphi=function()
|
||||
{var keywords='abs addr and ansichar ansistring array as asm begin boolean byte cardinal '+'case char class comp const constructor currency destructor div do double '+'downto else end except exports extended false file finalization finally '+'for function goto if implementation in inherited int64 initialization '+'integer interface is label library longint longword mod nil not object '+'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended '+'pint64 pointer private procedure program property pshortstring pstring '+'pvariant pwidechar pwidestring protected public published raise real real48 '+'record repeat set shl shortint shortstring shr single smallint string then '+'threadvar to true try type unit until uses val var varirnt while widechar '+'widestring with word write writeln xor';this.regexList=[{regex:new RegExp('\\(\\*[\\s\\S]*?\\*\\)','gm'),css:'comment'},{regex:new RegExp('{(?!\\$)[\\s\\S]*?}','gm'),css:'comment'},{regex:dp.sh.RegexLib.SingleLineCComments,css:'comment'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('\\{\\$[a-zA-Z]+ .+\\}','g'),css:'directive'},{regex:new RegExp('\\b[\\d\\.]+\\b','g'),css:'number'},{regex:new RegExp('\\$[a-zA-Z0-9]+\\b','g'),css:'number'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-delphi';this.Style='.dp-delphi .number { color: blue; }'+'.dp-delphi .directive { color: #008284; }'+'.dp-delphi .vars { color: #000; }';}
|
||||
dp.sh.Brushes.Delphi.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Delphi.Aliases=['delphi','pascal'];
|
||||
10
LPWeb20/RichtextEditor/aspnet/resx/shBrushJScript.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
dp.sh.Brushes.JScript=function()
|
||||
{var keywords='abstract boolean break byte case catch char class const continue debugger '+'default delete do double else enum export extends false final finally float '+'for function goto if implements import in instanceof int interface long native '+'new null package private protected public return short static super switch '+'synchronized this throw throws transient true try typeof var void volatile while with';this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:'comment'},{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('^\\s*#.*','gm'),css:'preprocessor'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-c';}
|
||||
dp.sh.Brushes.JScript.prototype=new dp.sh.Highlighter();dp.sh.Brushes.JScript.Aliases=['js','jscript','javascript'];
|
||||
10
LPWeb20/RichtextEditor/aspnet/resx/shBrushJava.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
dp.sh.Brushes.Java=function()
|
||||
{var keywords='abstract assert boolean break byte case catch char class const '+'continue default do double else enum extends '+'false final finally float for goto if implements import '+'instanceof int interface long native new null '+'package private protected public return '+'short static strictfp super switch synchronized this throw throws true '+'transient try void volatile while';this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:'comment'},{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b','gi'),css:'number'},{regex:new RegExp('(?!\\@interface\\b)\\@[\\$\\w]+\\b','g'),css:'annotation'},{regex:new RegExp('\\@interface\\b','g'),css:'keyword'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-j';this.Style='.dp-j .annotation { color: #646464; }'+'.dp-j .number { color: #C00000; }';}
|
||||
dp.sh.Brushes.Java.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Java.Aliases=['java'];
|
||||
10
LPWeb20/RichtextEditor/aspnet/resx/shBrushPhp.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
dp.sh.Brushes.Php=function()
|
||||
{var funcs='abs acos acosh addcslashes addslashes '+'array_change_key_case array_chunk array_combine array_count_values array_diff '+'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+'array_push array_rand array_reduce array_reverse array_search array_shift '+'array_slice array_splice array_sum array_udiff array_udiff_assoc '+'array_udiff_uassoc array_uintersect array_uintersect_assoc '+'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+'parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir '+'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+'strtoupper strtr strval substr substr_compare';var keywords='and or xor __FILE__ __LINE__ array as break case '+'cfunction class const continue declare default die do else '+'elseif empty enddeclare endfor endforeach endif endswitch endwhile '+'extends for foreach function include include_once global if '+'new old_function return static switch use require require_once '+'var while __FUNCTION__ __CLASS__ '+'__METHOD__ abstract interface public implements extends private protected throw';this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:'comment'},{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('\\$\\w+','g'),css:'vars'},{regex:new RegExp(this.GetKeywords(funcs),'gmi'),css:'func'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-c';}
|
||||
dp.sh.Brushes.Php.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Php.Aliases=['php'];
|
||||
11
LPWeb20/RichtextEditor/aspnet/resx/shBrushPython.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
dp.sh.Brushes.Python=function()
|
||||
{var keywords='and assert break class continue def del elif else '+'except exec finally for from global if import in is '+'lambda not or pass print raise return try yield while';var special='None True False self cls class_'
|
||||
this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:'comment'},{regex:new RegExp("^\\s*@\\w+",'gm'),css:'decorator'},{regex:new RegExp("(['\"]{3})([^\\1])*?\\1",'gm'),css:'comment'},{regex:new RegExp('"(?!")(?:\\.|\\\\\\"|[^\\""\\n\\r])*"','gm'),css:'string'},{regex:new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'",'gm'),css:'string'},{regex:new RegExp("\\b\\d+\\.?\\w*",'g'),css:'number'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'},{regex:new RegExp(this.GetKeywords(special),'gm'),css:'special'}];this.CssClass='dp-py';this.Style='.dp-py .builtins { color: #ff1493; }'+'.dp-py .magicmethods { color: #808080; }'+'.dp-py .exceptions { color: brown; }'+'.dp-py .types { color: brown; font-style: italic; }'+'.dp-py .commonlibs { color: #8A2BE2; font-style: italic; }';}
|
||||
dp.sh.Brushes.Python.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Python.Aliases=['py','python'];
|
||||
11
LPWeb20/RichtextEditor/aspnet/resx/shBrushRuby.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
dp.sh.Brushes.Ruby=function()
|
||||
{var keywords='alias and BEGIN begin break case class def define_method defined do each else elsif '+'END end ensure false for if in module new next nil not or raise redo rescue retry return '+'self super then throw true undef unless until when while yield';var builtins='Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload '+'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol '+'ThreadGroup Thread Time TrueClass'
|
||||
this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp(':[a-z][A-Za-z0-9_]*','g'),css:'symbol'},{regex:new RegExp('(\\$|@@|@)\\w+','g'),css:'variable'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'},{regex:new RegExp(this.GetKeywords(builtins),'gm'),css:'builtin'}];this.CssClass='dp-rb';this.Style='.dp-rb .symbol { color: #a70; }'+'.dp-rb .variable { color: #a70; font-weight: bold; }';}
|
||||
dp.sh.Brushes.Ruby.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Ruby.Aliases=['ruby','rails','ror'];
|
||||
10
LPWeb20/RichtextEditor/aspnet/resx/shBrushSql.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
dp.sh.Brushes.Sql=function()
|
||||
{var funcs='abs avg case cast coalesce convert count current_timestamp '+'current_user day isnull left lower month nullif replace right '+'session_user space substring sum system_user upper user year';var keywords='absolute action add after alter as asc at authorization begin bigint '+'binary bit by cascade char character check checkpoint close collate '+'column commit committed connect connection constraint contains continue '+'create cube current current_date current_time cursor database date '+'deallocate dec decimal declare default delete desc distinct double drop '+'dynamic else end end-exec escape except exec execute false fetch first '+'float for force foreign forward free from full function global goto grant '+'group grouping having hour ignore index inner insensitive insert instead '+'int integer intersect into is isolation key last level load local max min '+'minute modify move name national nchar next no numeric of off on only '+'open option order out output partial password precision prepare primary '+'prior privileges procedure public read real references relative repeatable '+'restrict return returns revoke rollback rollup rows rule schema scroll '+'second section select sequence serializable set size smallint static '+'statistics table temp temporary then time timestamp to top transaction '+'translation trigger true truncate uncommitted union unique update values '+'varchar varying view when where with work';var operators='all and any between cross in join like not null or outer some';this.regexList=[{regex:new RegExp('--(.*)$','gm'),css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp(this.GetKeywords(funcs),'gmi'),css:'func'},{regex:new RegExp(this.GetKeywords(operators),'gmi'),css:'op'},{regex:new RegExp(this.GetKeywords(keywords),'gmi'),css:'keyword'}];this.CssClass='dp-sql';this.Style='.dp-sql .func { color: #ff1493; }'+'.dp-sql .op { color: #808080; }';}
|
||||
dp.sh.Brushes.Sql.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Sql.Aliases=['sql'];
|
||||
10
LPWeb20/RichtextEditor/aspnet/resx/shBrushVb.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
dp.sh.Brushes.Vb=function()
|
||||
{var keywords='AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto '+'Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate '+'CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType '+'Date Decimal Declare Default Delegate Dim DirectCast Do Double Each '+'Else ElseIf End Enum Erase Error Event Exit False Finally For Friend '+'Function Get GetType GoSub GoTo Handles If Implements Imports In '+'Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module '+'MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing '+'NotInheritable NotOverridable Object On Option Optional Or OrElse '+'Overloads Overridable Overrides ParamArray Preserve Private Property '+'Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume '+'Return Select Set Shadows Shared Short Single Static Step Stop String '+'Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until '+'Variant When While With WithEvents WriteOnly Xor';this.regexList=[{regex:new RegExp('\'.*$','gm'),css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:new RegExp('^\\s*#.*','gm'),css:'preprocessor'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-vb';}
|
||||
dp.sh.Brushes.Vb.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Vb.Aliases=['vb','vb.net'];
|
||||
19
LPWeb20/RichtextEditor/aspnet/resx/shBrushXml.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
dp.sh.Brushes.Xml=function()
|
||||
{this.CssClass='dp-xml';this.Style='.dp-xml .cdata { color: #ff1493; }'+'.dp-xml .tag, .dp-xml .tag-name { color: #069; font-weight: bold; }'+'.dp-xml .attribute { color: red; }'+'.dp-xml .attribute-value { color: blue; }';}
|
||||
dp.sh.Brushes.Xml.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Xml.Aliases=['xml','xhtml','xslt','html','xhtml'];dp.sh.Brushes.Xml.prototype.ProcessRegexList=function()
|
||||
{function push(array,value)
|
||||
{array[array.length]=value;}
|
||||
var index=0;var match=null;var regex=null;this.GetMatches(new RegExp('(\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\>|>)','gm'),'cdata');this.GetMatches(new RegExp('(\<|<)!--\\s*.*?\\s*--(\>|>)','gm'),'comments');regex=new RegExp('([:\\w-\.]+)\\s*=\\s*(".*?"|\'.*?\'|\\w+)*|(\\w+)','gm');while((match=regex.exec(this.code))!=null)
|
||||
{if(match[1]==null)
|
||||
{continue;}
|
||||
push(this.matches,new dp.sh.Match(match[1],match.index,'attribute'));if(match[2]!=undefined)
|
||||
{push(this.matches,new dp.sh.Match(match[2],match.index+match[0].indexOf(match[2]),'attribute-value'));}}
|
||||
this.GetMatches(new RegExp('(\<|<)/*\\?*(?!\\!)|/*\\?*(\>|>)','gm'),'tag');regex=new RegExp('(?:\<|<)/*\\?*\\s*([:\\w-\.]+)','gm');while((match=regex.exec(this.code))!=null)
|
||||
{push(this.matches,new dp.sh.Match(match[1],match.index+match[0].indexOf(match[1]),'tag-name'));}}
|
||||
4
LPWeb20/RichtextEditor/aspnet/resx/shCore.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
//to make the shCore to be the first file of the response, renamed to _shCore.js
|
||||
|
||||
//this file keep blank..
|
||||
161
LPWeb20/RichtextEditor/aspnet/resx/sh_Core.js
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* JsMin
|
||||
* Javascript Compressor
|
||||
* http://www.crockford.com/
|
||||
* http://www.smallsharptools.com/
|
||||
*/
|
||||
|
||||
var dp={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Strings:{AboutDialog:'<html><head><title>About...</title></head><body class="dp-about"><table cellspacing="0"><tr><td class="copy"><p class="title">dp.SyntaxHighlighter</div><div class="para">Version: {V}</p><p><a href="http://www.dreamprojections.com/syntaxhighlighter/?ref=about" target="_blank">http://www.dreamprojections.com/syntaxhighlighter</a></p>©2004-2007 Alex Gorbatchev.</td></tr><tr><td class="footer"><input type="button" class="close" value="OK" onClick="window.close()"/></td></tr></table></body></html>'},ClipboardSwf:null,Version:'1.5.1'}};dp.SyntaxHighlighter=dp.sh;dp.sh.Toolbar.Commands={ExpandSource:{label:'+ expand source',check:function(highlighter){return highlighter.collapse;},func:function(sender,highlighter)
|
||||
{sender.parentNode.removeChild(sender);highlighter.div.className=highlighter.div.className.replace('collapsed','');}},ViewSource:{label:'view plain',func:function(sender,highlighter)
|
||||
{var code=dp.sh.Utils.FixForBlogger(highlighter.originalCode).replace(/</g,'<');var wnd=window.open('','_blank','width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=0');wnd.document.write('<textarea style="width:99%;height:99%">'+code+'</textarea>');wnd.document.close();}},CopyToClipboard:{label:'copy to clipboard',check:function(){return window.clipboardData!=null||dp.sh.ClipboardSwf!=null;},func:function(sender,highlighter)
|
||||
{var code=dp.sh.Utils.FixForBlogger(highlighter.originalCode).replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&');if(window.clipboardData)
|
||||
{window.clipboardData.setData('text',code);}
|
||||
else if(dp.sh.ClipboardSwf!=null)
|
||||
{var flashcopier=highlighter.flashCopier;if(flashcopier==null)
|
||||
{flashcopier=document.createElement('div');highlighter.flashCopier=flashcopier;highlighter.div.appendChild(flashcopier);}
|
||||
flashcopier.innerHTML='<embed src="'+dp.sh.ClipboardSwf+'" FlashVars="clipboard='+encodeURIComponent(code)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';}
|
||||
alert('The code is in your clipboard now');}},PrintSource:{label:'print',func:function(sender,highlighter)
|
||||
{var iframe=document.createElement('IFRAME');var doc=null;iframe.style.cssText='position:absolute;width:0px;height:0px;left:-500px;top:-500px;';document.body.appendChild(iframe);doc=iframe.contentWindow.document;dp.sh.Utils.CopyStyles(doc,window.document);doc.write('<div class="'+highlighter.div.className.replace('collapsed','')+' printing">'+highlighter.div.innerHTML+'</div>');doc.close();iframe.contentWindow.focus();iframe.contentWindow.print();alert('Printing...');document.body.removeChild(iframe);}},About:{label:'?',func:function(highlighter)
|
||||
{var wnd=window.open('','_blank','dialog,width=300,height=150,scrollbars=0');var doc=wnd.document;dp.sh.Utils.CopyStyles(doc,window.document);doc.write(dp.sh.Strings.AboutDialog.replace('{V}',dp.sh.Version));doc.close();wnd.focus();}}};dp.sh.Toolbar.Create=function(highlighter)
|
||||
{var div=document.createElement('DIV');div.className='tools';for(var name in dp.sh.Toolbar.Commands)
|
||||
{var cmd=dp.sh.Toolbar.Commands[name];if(cmd.check!=null&&!cmd.check(highlighter))
|
||||
continue;div.innerHTML+='<a href="#" onclick="dp.sh.Toolbar.Command(\''+name+'\',this);return false;">'+cmd.label+'</a>';}
|
||||
return div;}
|
||||
dp.sh.Toolbar.Command=function(name,sender)
|
||||
{var n=sender;while(n!=null&&n.className.indexOf('dp-highlighter')==-1)
|
||||
n=n.parentNode;if(n!=null)
|
||||
dp.sh.Toolbar.Commands[name].func(sender,n.highlighter);}
|
||||
dp.sh.Utils.CopyStyles=function(destDoc,sourceDoc)
|
||||
{var links=sourceDoc.getElementsByTagName('link');for(var i=0;i<links.length;i++)
|
||||
if(links[i].rel.toLowerCase()=='stylesheet')
|
||||
destDoc.write('<link type="text/css" rel="stylesheet" href="'+links[i].href+'"></link>');}
|
||||
dp.sh.Utils.FixForBlogger=function(str)
|
||||
{return(dp.sh.isBloggerMode==true)?str.replace(/<br\s*\/?>|<br\s*\/?>/gi,'\n'):str;}
|
||||
dp.sh.RegexLib={MultiLineCComments:new RegExp('/\\*[\\s\\S]*?\\*/','gm'),SingleLineCComments:new RegExp('//.*$','gm'),SingleLinePerlComments:new RegExp('#.*$','gm'),DoubleQuotedString:new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"','g'),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'",'g')};dp.sh.Match=function(value,index,css)
|
||||
{this.value=value;this.index=index;this.length=value.length;this.css=css;}
|
||||
dp.sh.Highlighter=function()
|
||||
{this.noGutter=false;this.addControls=true;this.collapse=false;this.tabsToSpaces=true;this.wrapColumn=80;this.showColumns=true;}
|
||||
dp.sh.Highlighter.SortCallback=function(m1,m2)
|
||||
{if(m1.index<m2.index)
|
||||
return-1;else if(m1.index>m2.index)
|
||||
return 1;else
|
||||
{if(m1.length<m2.length)
|
||||
return-1;else if(m1.length>m2.length)
|
||||
return 1;}
|
||||
return 0;}
|
||||
dp.sh.Highlighter.prototype.CreateElement=function(name)
|
||||
{var result=document.createElement(name);result.highlighter=this;return result;}
|
||||
dp.sh.Highlighter.prototype.GetMatches=function(regex,css)
|
||||
{var index=0;var match=null;while((match=regex.exec(this.code))!=null)
|
||||
this.matches[this.matches.length]=new dp.sh.Match(match[0],match.index,css);}
|
||||
dp.sh.Highlighter.prototype.AddBit=function(str,css)
|
||||
{if(str==null||str.length==0)
|
||||
return;var span=this.CreateElement('SPAN');str=str.replace(/ /g,' ');str=str.replace(/</g,'<');str=str.replace(/\n/gm,' <br>');if(css!=null)
|
||||
{if((/br/gi).test(str))
|
||||
{var lines=str.split(' <br>');for(var i=0;i<lines.length;i++)
|
||||
{span=this.CreateElement('SPAN');span.className=css;span.innerHTML=lines[i];this.div.appendChild(span);if(i+1<lines.length)
|
||||
this.div.appendChild(this.CreateElement('BR'));}}
|
||||
else
|
||||
{span.className=css;span.innerHTML=str;this.div.appendChild(span);}}
|
||||
else
|
||||
{span.innerHTML=str;this.div.appendChild(span);}}
|
||||
dp.sh.Highlighter.prototype.IsInside=function(match)
|
||||
{if(match==null||match.length==0)
|
||||
return false;for(var i=0;i<this.matches.length;i++)
|
||||
{var c=this.matches[i];if(c==null)
|
||||
continue;if((match.index>c.index)&&(match.index<c.index+c.length))
|
||||
return true;}
|
||||
return false;}
|
||||
dp.sh.Highlighter.prototype.ProcessRegexList=function()
|
||||
{for(var i=0;i<this.regexList.length;i++)
|
||||
this.GetMatches(this.regexList[i].regex,this.regexList[i].css);}
|
||||
dp.sh.Highlighter.prototype.ProcessSmartTabs=function(code)
|
||||
{var lines=code.split('\n');var result='';var tabSize=4;var tab='\t';function InsertSpaces(line,pos,count)
|
||||
{var left=line.substr(0,pos);var right=line.substr(pos+1,line.length);var spaces='';for(var i=0;i<count;i++)
|
||||
spaces+=' ';return left+spaces+right;}
|
||||
function ProcessLine(line,tabSize)
|
||||
{if(line.indexOf(tab)==-1)
|
||||
return line;var pos=0;while((pos=line.indexOf(tab))!=-1)
|
||||
{var spaces=tabSize-pos%tabSize;line=InsertSpaces(line,pos,spaces);}
|
||||
return line;}
|
||||
for(var i=0;i<lines.length;i++)
|
||||
result+=ProcessLine(lines[i],tabSize)+'\n';return result;}
|
||||
dp.sh.Highlighter.prototype.SwitchToList=function()
|
||||
{var html=this.div.innerHTML.replace(/<(br)\/?>/gi,'\n');var lines=html.split('\n');if(this.addControls==true)
|
||||
this.bar.appendChild(dp.sh.Toolbar.Create(this));if(this.showColumns)
|
||||
{var div=this.CreateElement('div');var columns=this.CreateElement('div');var showEvery=10;var i=1;while(i<=150)
|
||||
{if(i%showEvery==0)
|
||||
{div.innerHTML+=i;i+=(i+'').length;}
|
||||
else
|
||||
{div.innerHTML+='·';i++;}}
|
||||
columns.className='columns';columns.appendChild(div);this.bar.appendChild(columns);}
|
||||
for(var i=0,lineIndex=this.firstLine;i<lines.length-1;i++,lineIndex++)
|
||||
{var li=this.CreateElement('LI');var span=this.CreateElement('SPAN');li.className=(i%2==0)?'alt':'';span.innerHTML=lines[i]+' ';li.appendChild(span);this.ol.appendChild(li);}
|
||||
this.div.innerHTML='';}
|
||||
dp.sh.Highlighter.prototype.Highlight=function(code)
|
||||
{function Trim(str)
|
||||
{return str.replace(/^\s*(.*?)[\s\n]*$/g,'$1');}
|
||||
function Chop(str)
|
||||
{return str.replace(/\n*$/,'').replace(/^\n*/,'');}
|
||||
function Unindent(str)
|
||||
{var lines=dp.sh.Utils.FixForBlogger(str).split('\n');var indents=new Array();var regex=new RegExp('^\\s*','g');var min=1000;for(var i=0;i<lines.length&&min>0;i++)
|
||||
{if(Trim(lines[i]).length==0)
|
||||
continue;var matches=regex.exec(lines[i]);if(matches!=null&&matches.length>0)
|
||||
min=Math.min(matches[0].length,min);}
|
||||
if(min>0)
|
||||
for(var i=0;i<lines.length;i++)
|
||||
lines[i]=lines[i].substr(min);return lines.join('\n');}
|
||||
function Copy(string,pos1,pos2)
|
||||
{return string.substr(pos1,pos2-pos1);}
|
||||
var pos=0;if(code==null)
|
||||
code='';this.originalCode=code;this.code=Chop(Unindent(code));this.div=this.CreateElement('DIV');this.bar=this.CreateElement('DIV');this.ol=this.CreateElement('OL');this.matches=new Array();this.div.className='dp-highlighter';this.div.highlighter=this;this.bar.className='bar';this.ol.start=this.firstLine;if(this.CssClass!=null)
|
||||
this.ol.className=this.CssClass;if(this.collapse)
|
||||
this.div.className+=' collapsed';if(this.noGutter)
|
||||
this.div.className+=' nogutter';if(this.tabsToSpaces==true)
|
||||
this.code=this.ProcessSmartTabs(this.code);this.ProcessRegexList();if(this.matches.length==0)
|
||||
{this.AddBit(this.code,null);this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol);return;}
|
||||
this.matches=this.matches.sort(dp.sh.Highlighter.SortCallback);for(var i=0;i<this.matches.length;i++)
|
||||
if(this.IsInside(this.matches[i]))
|
||||
this.matches[i]=null;for(var i=0;i<this.matches.length;i++)
|
||||
{var match=this.matches[i];if(match==null||match.length==0)
|
||||
continue;this.AddBit(Copy(this.code,pos,match.index),null);this.AddBit(match.value,match.css);pos=match.index+match.length;}
|
||||
this.AddBit(this.code.substr(pos),null);this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol);}
|
||||
dp.sh.Highlighter.prototype.GetKeywords=function(str)
|
||||
{return'\\b'+str.replace(/ /g,'\\b|\\b')+'\\b';}
|
||||
dp.sh.BloggerMode=function()
|
||||
{dp.sh.isBloggerMode=true;}
|
||||
dp.sh.HighlightAll=function(name,showGutter,showControls,collapseAll,firstLine,showColumns)
|
||||
{function FindValue()
|
||||
{var a=arguments;for(var i=0;i<a.length;i++)
|
||||
{if(a[i]==null)
|
||||
continue;if(typeof(a[i])=='string'&&a[i]!='')
|
||||
return a[i]+'';if(typeof(a[i])=='object'&&a[i].value!='')
|
||||
return a[i].value+'';}
|
||||
return null;}
|
||||
function IsOptionSet(value,list)
|
||||
{for(var i=0;i<list.length;i++)
|
||||
if(list[i]==value)
|
||||
return true;return false;}
|
||||
function GetOptionValue(name,list,defaultValue)
|
||||
{var regex=new RegExp('^'+name+'\\[(\\w+)\\]$','gi');var matches=null;for(var i=0;i<list.length;i++)
|
||||
if((matches=regex.exec(list[i]))!=null)
|
||||
return matches[1];return defaultValue;}
|
||||
function FindTagsByName(list,name,tagName)
|
||||
{var tags=document.getElementsByTagName(tagName);for(var i=0;i<tags.length;i++)
|
||||
if(tags[i].getAttribute('name')==name)
|
||||
list.push(tags[i]);}
|
||||
var elements=[];var highlighter=null;var registered={};var propertyName='innerHTML';FindTagsByName(elements,name,'pre');FindTagsByName(elements,name,'textarea');if(elements.length==0)
|
||||
return;for(var brush in dp.sh.Brushes)
|
||||
{var aliases=dp.sh.Brushes[brush].Aliases;if(aliases==null)
|
||||
continue;for(var i=0;i<aliases.length;i++)
|
||||
registered[aliases[i]]=brush;}
|
||||
for(var i=0;i<elements.length;i++)
|
||||
{var element=elements[i];var options=FindValue(element.attributes['class'],element.className,element.attributes['language'],element.language);var language='';if(options==null)
|
||||
continue;options=options.split(':');language=options[0].toLowerCase();if(registered[language]==null)
|
||||
continue;highlighter=new dp.sh.Brushes[registered[language]]();element.style.display='none';highlighter.noGutter=(showGutter==null)?IsOptionSet('nogutter',options):!showGutter;highlighter.addControls=(showControls==null)?!IsOptionSet('nocontrols',options):showControls;highlighter.collapse=(collapseAll==null)?IsOptionSet('collapse',options):collapseAll;highlighter.showColumns=(showColumns==null)?IsOptionSet('showcolumns',options):showColumns;var headNode=document.getElementsByTagName('head')[0];if(highlighter.Style&&headNode)
|
||||
{var styleNode=document.createElement('style');styleNode.setAttribute('type','text/css');if(styleNode.styleSheet)
|
||||
{styleNode.styleSheet.cssText=highlighter.Style;}
|
||||
else
|
||||
{var textNode=document.createTextNode(highlighter.Style);styleNode.appendChild(textNode);}
|
||||
headNode.appendChild(styleNode);}
|
||||
highlighter.firstLine=(firstLine==null)?parseInt(GetOptionValue('firstline',options,1)):firstLine;highlighter.Highlight(element[propertyName]);highlighter.source=element;element.parentNode.insertBefore(highlighter.div,element);}}
|
||||
23
LPWeb20/RichtextEditor/aspnet/resx/spell.css
Normal file
@@ -0,0 +1,23 @@
|
||||
body, a, input, option, select, table, tr, table
|
||||
{
|
||||
font:normal 11px Tahoma;
|
||||
}
|
||||
body {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
input.suggestion, select.suggestion, select.suggestion option
|
||||
{
|
||||
width: 230px;
|
||||
}
|
||||
|
||||
input.button
|
||||
{
|
||||
width: 100px;
|
||||
cursor: pointer;
|
||||
}
|
||||
td.highlight
|
||||
{
|
||||
background-color: #DADADA;
|
||||
}
|
||||
|
||||
118
LPWeb20/RichtextEditor/aspnet/resx/spell.js
Normal file
@@ -0,0 +1,118 @@
|
||||
/****************************************************
|
||||
* Spell Checker Client JavaScript Code
|
||||
****************************************************/
|
||||
// spell checker constants
|
||||
var showCompleteAlert = true;
|
||||
|
||||
var editor=parent.rtespellcheckeditor;
|
||||
|
||||
function get_text(index)
|
||||
{
|
||||
return editor.GetText();
|
||||
}
|
||||
function set_text(index,text)
|
||||
{
|
||||
editor.SetText(text);
|
||||
}
|
||||
function get_elements_length()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/****************************************************
|
||||
* Spell Checker Suggestion Window JavaScript Code
|
||||
****************************************************/
|
||||
var iElementIndex = -1;
|
||||
|
||||
function doinit(guid)
|
||||
{
|
||||
iElementIndex = parseInt(document.getElementById("ElementIndex").value);
|
||||
|
||||
var spellMode = document.getElementById("SpellMode").value;
|
||||
|
||||
switch (spellMode)
|
||||
{
|
||||
case "start" :
|
||||
//do nothing client side
|
||||
break;
|
||||
case "suggest" :
|
||||
//update text from parent document
|
||||
updateText();
|
||||
//wait for input
|
||||
break;
|
||||
case "end" :
|
||||
//update text from parent document
|
||||
updateText();
|
||||
//fall through to default
|
||||
default :
|
||||
//get text block from parent document
|
||||
if(loadText())
|
||||
document.getElementById("SpellingForm").submit();
|
||||
else
|
||||
endCheck()
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function loadText()
|
||||
{
|
||||
// check if there is any text to spell check
|
||||
for (++iElementIndex; iElementIndex < get_elements_length(); iElementIndex++)
|
||||
{
|
||||
var newText = get_text(iElementIndex);
|
||||
if (newText.length > 0)
|
||||
{
|
||||
updateSettings(newText, 0, iElementIndex, "start");
|
||||
document.getElementById("StatusText").innerText = "Spell Checking Text ...";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateSettings(currentText, wordIndex, elementIndex, mode)
|
||||
{
|
||||
currentText=currentText.replace(/<([^>]+)/g,function(a,b,c)
|
||||
{
|
||||
return "<"+b.toLowerCase();
|
||||
});
|
||||
var div=document.createElement("DIV");
|
||||
div.appendChild(document.createTextNode(currentText));
|
||||
document.getElementById("CurrentText").value = div.innerHTML;
|
||||
document.getElementById("WordIndex").value = wordIndex;
|
||||
document.getElementById("ElementIndex").value = elementIndex;
|
||||
document.getElementById("SpellMode").value = mode;
|
||||
}
|
||||
|
||||
function updateText()
|
||||
{
|
||||
var newText = document.getElementById("CurrentText").value;
|
||||
var div=document.createElement("DIV");
|
||||
div.setAttribute("contentEditable","true");
|
||||
div.innerHTML=newText;
|
||||
var txt=div.innerText||div.textContent||"";
|
||||
div.innerHTML="";
|
||||
if(document.getElementById("Replaced").value=="ALL")
|
||||
{
|
||||
set_text(iElementIndex, txt);
|
||||
}
|
||||
}
|
||||
|
||||
function endCheck()
|
||||
{
|
||||
if (showCompleteAlert)
|
||||
alert("Spell Check Complete");
|
||||
closeWindow();
|
||||
}
|
||||
|
||||
function closeWindow()
|
||||
{
|
||||
parent.rtespellcheckdialog.close();
|
||||
}
|
||||
|
||||
function changeWord(oElement)
|
||||
{
|
||||
var k = oElement.selectedIndex;
|
||||
oElement.form.ReplacementWord.value = oElement.options[k].value;
|
||||
}
|
||||
44
LPWeb20/RichtextEditor/aspnet/resx/virtualkeyboard.js
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
|
||||
//----------------------------------------------------------------
|
||||
//----------------------------------------------------------------
|
||||
|
||||
var editor=parent.rtevirtualkeyboardeditor;
|
||||
function do_insert()
|
||||
{
|
||||
var keyboard_area = document.getElementById("keyboard_area");
|
||||
|
||||
if ( keyboard_area.value.length > 0 )
|
||||
{
|
||||
editor.InsertHTML(keyboard_area.value);
|
||||
parent.rtevirtualkeyboarddialog.close();
|
||||
editor.Focus();
|
||||
}
|
||||
}
|
||||
function do_Close()
|
||||
{
|
||||
parent.rtevirtualkeyboarddialog.close();
|
||||
editor.Focus();
|
||||
}
|
||||
new function()
|
||||
{
|
||||
var ns=document.getElementsByTagName("*");
|
||||
for(var i=0;i<ns.length;i++)
|
||||
{
|
||||
var n=ns[i];
|
||||
if(n.getAttribute('langtext')!="1")continue;
|
||||
var t=n.innerText||n.textContent||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.innerText=t;
|
||||
n.textContent=t;
|
||||
}
|
||||
var t=n.value||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.value=t;
|
||||
}
|
||||
}
|
||||
}
|
||||
46
LPWeb20/RichtextEditor/aspnet/spellcheck.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<execute>
|
||||
dialog.set_title(editor.GetLangText("spellcheck"));
|
||||
</execute>
|
||||
|
||||
<panel jsml-class="spellcheck_dialog" dock="fill" overflow="visible">
|
||||
<htmlcontrol dock="fill" jsml-local="hc">
|
||||
</htmlcontrol>
|
||||
<attach name="attach_dom">
|
||||
<![CDATA[
|
||||
setTimeout(function()
|
||||
{
|
||||
if(self.iframe)return;
|
||||
|
||||
window.rtespellcheckeditor=editor;
|
||||
window.rtespellcheckdialog=dialog;
|
||||
|
||||
dialog.attach_event("closing",function()
|
||||
{
|
||||
window.rtespellcheckeditor=null;
|
||||
window.rtespellcheckdialog=null;
|
||||
});
|
||||
|
||||
var iframe=document.createElement("IFRAME");
|
||||
iframe.setAttribute("src","{folder}aspnet/SpellCheck.aspx?culture="+editor._config.lang+"&t="+new Date().getTime());
|
||||
iframe.setAttribute("frameBorder","0");
|
||||
hc._content.appendChild(iframe);
|
||||
self.iframe=iframe;
|
||||
self.invoke_event("resize");
|
||||
},10);
|
||||
]]>
|
||||
</attach>
|
||||
<attach name="resize">
|
||||
if(!self.iframe)return;
|
||||
self.iframe.style.width=hc.get_client_width()+"px";
|
||||
self.iframe.style.height=hc.get_client_height()+"px";
|
||||
</attach>
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="spellcheck_dialog" />
|
||||
|
||||
|
||||
</jsml>
|
||||
137
LPWeb20/RichtextEditor/aspnet/syntaxhighlighter.htm
Normal file
@@ -0,0 +1,137 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>[[syntaxhighlighter]]</title>
|
||||
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.1)" />
|
||||
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.1)" />
|
||||
<link href='resx/dialog.css' type="text/css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="ajaxdiv">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="80"><span langtext='1'>codelanguage</span>:</td>
|
||||
<td><select id="sel_lang"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><textarea id="ta_code" name="ta_code_name" style="width:400px;height:300px"></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="container-bottom">
|
||||
<input type="button" langtext='1' value="OK" class="formbutton" onclick="DoHighlight()" />
|
||||
<input type="button" langtext='1' value="Cancel" class="formbutton" onclick="Close()" />
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript" src="resx/sh_Core.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushCpp.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushCSharp.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushCss.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushDelphi.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushJava.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushJScript.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushPhp.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushPhp.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushPython.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushRuby.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushSql.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushVb.js"></script>
|
||||
<script type="text/javascript" src="resx/shBrushXml.js"></script>
|
||||
<script type="text/javascript" src="resx/shCore.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
//----------------------------------------------------------------
|
||||
//----------------------------------------------------------------
|
||||
|
||||
function SetCookie(name,value,seconds)
|
||||
{
|
||||
var cookie=name+"="+escape(value)+"; path=/;";
|
||||
if(seconds)
|
||||
{
|
||||
var d=new Date();
|
||||
d.setSeconds(d.getSeconds()+seconds);
|
||||
cookie+=" expires="+d.toUTCString()+";";
|
||||
}
|
||||
document.cookie=cookie;
|
||||
}
|
||||
function GetCookie(name)
|
||||
{
|
||||
var cookies=document.cookie.split(';');
|
||||
for(var i=0;i<cookies.length;i++)
|
||||
{
|
||||
var parts=cookies[i].split('=');
|
||||
if(name==parts[0].replace(/\s/g,''))
|
||||
return unescape(parts[1])
|
||||
}
|
||||
//return undefined..
|
||||
}
|
||||
|
||||
|
||||
var editor=parent.rtesyntaxhighlightereditor;
|
||||
var sel_lang=document.getElementById("sel_lang")
|
||||
var ta_code=document.getElementById("ta_code")
|
||||
|
||||
|
||||
|
||||
for(var brush in dp.sh.Brushes)
|
||||
{
|
||||
var aliases = dp.sh.Brushes[brush].Aliases;
|
||||
|
||||
if(aliases == null)
|
||||
continue;
|
||||
sel_lang.options.add(new Option(aliases,brush));
|
||||
|
||||
var b=GetCookie("CESHBRUSH")
|
||||
if(b)sel_lang.value=b;
|
||||
}
|
||||
|
||||
//replace with Regular Expression
|
||||
function DoHighlight() {
|
||||
SetCookie("CESHBRUSH",sel_lang.value,3600*24*30);
|
||||
var b=dp.sh.Brushes[sel_lang.value];
|
||||
ta_code.language=b.Aliases[0]+":nocontrols";
|
||||
if(window.opera||!document.all)
|
||||
{
|
||||
ta_code.innerHTML=ta_code.value;//for firefox..
|
||||
}
|
||||
dp.sh.HighlightAll(ta_code.name);
|
||||
ta_code.style.display="";
|
||||
var tag=ta_code.previousSibling
|
||||
//alert(tag.innerHTML)
|
||||
editor.InsertHTML('<div class="dp-highlighter">'+tag.innerHTML+"</div>");
|
||||
tag.parentNode.removeChild(tag);
|
||||
parent.rtesyntaxhighlighterdialog.close();
|
||||
}
|
||||
function Close()
|
||||
{
|
||||
parent.rtesyntaxhighlighterdialog.close();
|
||||
}
|
||||
|
||||
new function()
|
||||
{
|
||||
var ns=document.getElementsByTagName("*");
|
||||
for(var i=0;i<ns.length;i++)
|
||||
{
|
||||
var n=ns[i];
|
||||
if(n.getAttribute('langtext')!="1")continue;
|
||||
var t=n.innerText||n.textContent||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.innerText=t;
|
||||
n.textContent=t;
|
||||
}
|
||||
var t=n.value||"";
|
||||
if(t)
|
||||
{
|
||||
t=editor.GetLangText(t);
|
||||
n.value=t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</html>
|
||||
46
LPWeb20/RichtextEditor/aspnet/syntaxhighlighter.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<execute>
|
||||
dialog.set_title(editor.GetLangText("syntaxhighlighter"));
|
||||
</execute>
|
||||
|
||||
<panel jsml-class="syntaxhighlighter_dialog" dock="fill" overflow="visible">
|
||||
<htmlcontrol dock="fill" jsml-local="hc">
|
||||
</htmlcontrol>
|
||||
<attach name="attach_dom">
|
||||
<![CDATA[
|
||||
setTimeout(function()
|
||||
{
|
||||
if(self.iframe)return;
|
||||
|
||||
window.rtesyntaxhighlightereditor=editor;
|
||||
window.rtesyntaxhighlighterdialog=dialog;
|
||||
|
||||
dialog.attach_event("closing",function()
|
||||
{
|
||||
window.rtesyntaxhighlightereditor=null;
|
||||
window.rtesyntaxhighlighterdialog=null;
|
||||
});
|
||||
|
||||
var iframe=document.createElement("IFRAME");
|
||||
iframe.setAttribute("src","{folder}aspnet/syntaxhighlighter.htm?{timems}");
|
||||
iframe.setAttribute("frameBorder","0");
|
||||
hc._content.appendChild(iframe);
|
||||
self.iframe=iframe;
|
||||
self.invoke_event("resize");
|
||||
},10);
|
||||
]]>
|
||||
</attach>
|
||||
<attach name="resize">
|
||||
if(!self.iframe)return;
|
||||
self.iframe.style.width=hc.get_client_width()+"px";
|
||||
self.iframe.style.height=hc.get_client_height()+"px";
|
||||
</attach>
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="syntaxhighlighter_dialog" />
|
||||
|
||||
|
||||
</jsml>
|
||||
38
LPWeb20/RichtextEditor/aspnet/virtualkeyboard.htm
Normal file
@@ -0,0 +1,38 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>[[UniversalKeyboard]]</title>
|
||||
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.1)" />
|
||||
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.1)" />
|
||||
<link href='resx/dialog.css' type="text/css" rel="stylesheet" />
|
||||
<style type="text/css">
|
||||
body,textarea,input,td,select{font:normal 9pt MS Sans Serif;}
|
||||
html, body,#ajaxdiv {height: 100%;background-color: #eeeeee;}
|
||||
div {position:absolute;}
|
||||
.simple {font-size:11pt;}
|
||||
.double {font-size:9pt;}
|
||||
.simpledia {font-size:11pt;color:red}
|
||||
.doubledia {font-size:9pt;color:red}
|
||||
.action {font-size:7pt;color:white;}
|
||||
.clavier {font-size:7pt;color:blue;}
|
||||
.sign {font-size:7pt;color:gray;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<textarea id="keyboard_area" cols="40" rows="4" style="width: 99%; height: 60px;"
|
||||
name="keyboard_area"></textarea>
|
||||
|
||||
|
||||
<script type="text/javascript" src="resx/keyboard-data.js"></script>
|
||||
<script type="text/javascript" src="resx/keyboard-diacritic.js"></script>
|
||||
<script type="text/javascript" src="resx/keyboard-dialogue.js"></script>
|
||||
<script type="text/javascript" src="resx/keyboard-multihexa.js"></script>
|
||||
|
||||
<div style="width: 300px; position: absolute; height: 30px; left: 60px; top: 235px">
|
||||
<input type="button" langtext='1' value="Insert" class="formbutton" onclick="do_insert()"
|
||||
id="Button1" name="Button1">
|
||||
<input type="button" langtext='1' value="Cancel" class="formbutton" onclick="do_Close()" id="Button2"
|
||||
name="Button2">
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript" src="resx/virtualkeyboard.js"></script>
|
||||
</html>
|
||||
46
LPWeb20/RichtextEditor/aspnet/virtualkeyboard.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<execute>
|
||||
dialog.set_title(editor.GetLangText("virtualkeyboard"));
|
||||
</execute>
|
||||
|
||||
<panel jsml-class="virtualkeyboard_dialog" dock="fill" overflow="visible">
|
||||
<htmlcontrol dock="fill" jsml-local="hc">
|
||||
</htmlcontrol>
|
||||
<attach name="attach_dom">
|
||||
<![CDATA[
|
||||
setTimeout(function()
|
||||
{
|
||||
if(self.iframe)return;
|
||||
|
||||
window.rtevirtualkeyboardeditor=editor;
|
||||
window.rtevirtualkeyboarddialog=dialog;
|
||||
|
||||
dialog.attach_event("closing",function()
|
||||
{
|
||||
window.rtevirtualkeyboardeditor=null;
|
||||
window.rtevirtualkeyboarddialog=null;
|
||||
});
|
||||
|
||||
var iframe=document.createElement("IFRAME");
|
||||
iframe.setAttribute("src","{folder}aspnet/virtualkeyboard.htm?{timems}");
|
||||
iframe.setAttribute("frameBorder","0");
|
||||
hc._content.appendChild(iframe);
|
||||
self.iframe=iframe;
|
||||
self.invoke_event("resize");
|
||||
},10);
|
||||
]]>
|
||||
</attach>
|
||||
<attach name="resize">
|
||||
if(!self.iframe)return;
|
||||
self.iframe.style.width=hc.get_client_width()+"px";
|
||||
self.iframe.style.height=hc.get_client_height()+"px";
|
||||
</attach>
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="virtualkeyboard_dialog" />
|
||||
|
||||
|
||||
</jsml>
|
||||
8
LPWeb20/RichtextEditor/blank.htm
Normal file
@@ -0,0 +1,8 @@
|
||||
<!-- if defined config designtimeblankhtml , this template will be overrided -->
|
||||
<html>
|
||||
<head>
|
||||
<title>blank</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
107
LPWeb20/RichtextEditor/config/admin.config
Normal file
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<rteconfig>
|
||||
|
||||
<watermarks>
|
||||
<watermark filepath="~/richtexteditor/images/watermark.png" xalign="right" yalign="bottom" xoffset="-10" yoffset="-10" minwidth="200" minheight="200" />
|
||||
<![CDATA[
|
||||
<watermark filepath="~/richtexteditor/images/watermark.png" xalign="left" yalign="top" xoffset="10" yoffset="10" minwidth="400" minheight="200" />
|
||||
<watermark filepath="base64:iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA60lEQVQ4T2NkoDJgpLJ5DLQ3MKDiwv8NHQZkW4SiMaDhwX+GDw8YNkxwQBb/T0SwwNWjGHjx2tP/+V2nGSoS1Bk8HDTJciWKJoeMA0AXXmD48IOB4cKGAsoNJMJrBJVghuGPDwxWGt8ZyhIsqePCDQfv/p8w/zDDgQUJMAPJj5Sdxx/9b194jqEkVI7Bx9mIchcGFBz4/+HFA2CkPABGSgPlBhIMcSIUoEYKMJeA9HwAJu4DMwKo40JQ1guz+cMQ5WNCeaSAXNc28+T/VduPUydhwyIlN1qNIdjXijpeJiLc8SohyxX4TKS6gQAlX1UV7RnUVQAAAABJRU5ErkJggg==" xalign="right" yalign="top" xoffset="-10" yoffset="10" minwidth="400" minheight="200" />
|
||||
]]>
|
||||
</watermarks>
|
||||
|
||||
<security name="TagBlackList">script,style,link,applet,bgsound,meta,base,basefont,frameset,frame,form</security>
|
||||
<security name="AttrBlackList">runat,action</security>
|
||||
<security name="StyleBlackList">position,visibility,display</security>
|
||||
|
||||
<security name="DrawWatermarks">true</security>
|
||||
|
||||
<!--allow,resize,deny-->
|
||||
<security name="LargeImageMode">resize</security>
|
||||
<security name="MaxImageWidth">0</security>
|
||||
<security name="MaxImageHeight">768</security>
|
||||
|
||||
<security name="MaxFileSize">1024</security>
|
||||
<security name="MaxFolderSize">102400</security>
|
||||
|
||||
<security name="AllowUpload">true</security>
|
||||
<security name="AllowCopyFile">true</security>
|
||||
<security name="AllowMoveFile">true</security>
|
||||
<security name="AllowRenameFile">true</security>
|
||||
<security name="AllowDeleteFile">true</security>
|
||||
|
||||
<security name="AllowOverride">true</security>
|
||||
<!--upload/copy/move-->
|
||||
|
||||
<security name="AllowCreateFolder">true</security>
|
||||
<security name="AllowCopyFolder">true</security>
|
||||
<security name="AllowMoveFolder">true</security>
|
||||
<security name="AllowRenameFolder">true</security>
|
||||
<security name="AllowDeleteFolder">true</security>
|
||||
|
||||
<security name="FilePattern">^[a-zA-Z0-9\._\-\s\(\)\[\]\u007F-\uFFFF]+$</security>
|
||||
<security name="FolderPattern">^[a-zA-Z0-9\._\-\s\(\)\[\]\u007F-\uFFFF]+$</security>
|
||||
|
||||
<category for="Gallery,Image">
|
||||
<security name="Extensions">*.jpg,*.jpeg,*.gif,*.png</security>
|
||||
<security name="MimeTypes">image/*</security>
|
||||
<storage id="default">
|
||||
<security name="StoragePath">~/uploads</security>
|
||||
<security name="StorageName">Image Files</security>
|
||||
</storage>
|
||||
</category>
|
||||
<category for="Video">
|
||||
<security name="Extensions">*.swf,*.flv,*.avi,*.mpg,*.mpeg,*.mp3,*.wmv,*.wav,*.mp4,*.mov</security>
|
||||
<storage id="default">
|
||||
<security name="StoragePath">~/uploads</security>
|
||||
<security name="StorageName">Video Files</security>
|
||||
</storage>
|
||||
</category>
|
||||
<category for="Document">
|
||||
<security name="Extensions">*.txt,*.doc,*.pdf,*.zip,*.rar,*.avi,*.mpg,*.mpeg,*.mp3,*.wav,*.swf,*.jpg,*.jpeg,*.gif,*.png,*.htm,*.xls,*.html,*.rtf,*.wmv</security>
|
||||
<storage id="default">
|
||||
<security name="StoragePath">~/uploads</security>
|
||||
<security name="StorageName">Document Files</security>
|
||||
</storage>
|
||||
</category>
|
||||
<category for="Template">
|
||||
<security name="Extensions">*.txt,*.htm,*.html</security>
|
||||
<storage id="default">
|
||||
<security name="StoragePath">~/templates</security>
|
||||
<security name="StorageName">Templates</security>
|
||||
</storage>
|
||||
</category>
|
||||
|
||||
|
||||
<category for="Gallery,Image,Video,Document">
|
||||
<!--
|
||||
<storage id="another">
|
||||
<security name="StorageName">Others</security>
|
||||
<security name="StoragePath">~/others</security>
|
||||
<security name="AllowCreateFolder">false</security>
|
||||
</storage>
|
||||
<storage id="public">
|
||||
<security name="StorageName">Public Items</security>
|
||||
<security name="StoragePath">~/publicitems</security>
|
||||
|
||||
<security name="AllowUpload">false</security>
|
||||
<security name="AllowCopyFile">false</security>
|
||||
<security name="AllowMoveFile">false</security>
|
||||
<security name="AllowRenameFile">false</security>
|
||||
<security name="AllowDeleteFile">false</security>
|
||||
|
||||
<security name="AllowOverride">false</security>
|
||||
|
||||
<security name="AllowCreateFolder">false</security>
|
||||
<security name="AllowCopyFolder">false</security>
|
||||
<security name="AllowMoveFolder">false</security>
|
||||
<security name="AllowRenameFolder">false</security>
|
||||
<security name="AllowDeleteFolder">false</security>
|
||||
|
||||
</storage>
|
||||
|
||||
-->
|
||||
</category>
|
||||
|
||||
|
||||
|
||||
</rteconfig>
|
||||
107
LPWeb20/RichtextEditor/config/default.config
Normal file
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<rteconfig>
|
||||
|
||||
<watermarks>
|
||||
<watermark filepath="~/richtexteditor/images/watermark.png" xalign="right" yalign="bottom" xoffset="-10" yoffset="-10" minwidth="200" minheight="200" />
|
||||
<![CDATA[
|
||||
<watermark filepath="~/richtexteditor/images/watermark.png" xalign="left" yalign="top" xoffset="10" yoffset="10" minwidth="400" minheight="200" />
|
||||
<watermark filepath="base64:iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA60lEQVQ4T2NkoDJgpLJ5DLQ3MKDiwv8NHQZkW4SiMaDhwX+GDw8YNkxwQBb/T0SwwNWjGHjx2tP/+V2nGSoS1Bk8HDTJciWKJoeMA0AXXmD48IOB4cKGAsoNJMJrBJVghuGPDwxWGt8ZyhIsqePCDQfv/p8w/zDDgQUJMAPJj5Sdxx/9b194jqEkVI7Bx9mIchcGFBz4/+HFA2CkPABGSgPlBhIMcSIUoEYKMJeA9HwAJu4DMwKo40JQ1guz+cMQ5WNCeaSAXNc28+T/VduPUydhwyIlN1qNIdjXijpeJiLc8SohyxX4TKS6gQAlX1UV7RnUVQAAAABJRU5ErkJggg==" xalign="right" yalign="top" xoffset="-10" yoffset="10" minwidth="400" minheight="200" />
|
||||
]]>
|
||||
</watermarks>
|
||||
|
||||
<security name="TagBlackList">script,style,link,applet,bgsound,meta,base,basefont,frameset,frame,form</security>
|
||||
<security name="AttrBlackList">runat,action</security>
|
||||
<security name="StyleBlackList">position,visibility,display</security>
|
||||
|
||||
<security name="DrawWatermarks">true</security>
|
||||
|
||||
<!--allow,resize,deny-->
|
||||
<security name="LargeImageMode">resize</security>
|
||||
<security name="MaxImageWidth">0</security>
|
||||
<security name="MaxImageHeight">768</security>
|
||||
|
||||
<security name="MaxFileSize">1024</security>
|
||||
<security name="MaxFolderSize">102400</security>
|
||||
|
||||
<security name="AllowUpload">true</security>
|
||||
<security name="AllowCopyFile">true</security>
|
||||
<security name="AllowMoveFile">true</security>
|
||||
<security name="AllowRenameFile">true</security>
|
||||
<security name="AllowDeleteFile">true</security>
|
||||
|
||||
<security name="AllowOverride">true</security>
|
||||
<!--upload/copy/move-->
|
||||
|
||||
<security name="AllowCreateFolder">true</security>
|
||||
<security name="AllowCopyFolder">true</security>
|
||||
<security name="AllowMoveFolder">true</security>
|
||||
<security name="AllowRenameFolder">true</security>
|
||||
<security name="AllowDeleteFolder">true</security>
|
||||
|
||||
<security name="FilePattern">^[a-zA-Z0-9\._\-\s\(\)\[\]\u007F-\uFFFF]+$</security>
|
||||
<security name="FolderPattern">^[a-zA-Z0-9\._\-\s\(\)\[\]\u007F-\uFFFF]+$</security>
|
||||
|
||||
<category for="Gallery,Image">
|
||||
<security name="Extensions">*.jpg,*.jpeg,*.gif,*.png</security>
|
||||
<security name="MimeTypes">image/*</security>
|
||||
<storage id="default">
|
||||
<security name="StoragePath">~/uploads</security>
|
||||
<security name="StorageName">Image Files</security>
|
||||
</storage>
|
||||
</category>
|
||||
<category for="Video">
|
||||
<security name="Extensions">*.swf,*.flv,*.avi,*.mpg,*.mpeg,*.mp3,*.wmv,*.wav,*.mp4,*.mov</security>
|
||||
<storage id="default">
|
||||
<security name="StoragePath">~/uploads</security>
|
||||
<security name="StorageName">Video Files</security>
|
||||
</storage>
|
||||
</category>
|
||||
<category for="Document">
|
||||
<security name="Extensions">*.txt,*.doc,*.pdf,*.zip,*.rar,*.avi,*.mpg,*.mpeg,*.mp3,*.wav,*.swf,*.jpg,*.jpeg,*.gif,*.png,*.htm,*.xls,*.html,*.rtf,*.wmv</security>
|
||||
<storage id="default">
|
||||
<security name="StoragePath">~/uploads</security>
|
||||
<security name="StorageName">Document Files</security>
|
||||
</storage>
|
||||
</category>
|
||||
<category for="Template">
|
||||
<security name="Extensions">*.txt,*.htm,*.html</security>
|
||||
<storage id="default">
|
||||
<security name="StoragePath">~/templates</security>
|
||||
<security name="StorageName">Templates</security>
|
||||
</storage>
|
||||
</category>
|
||||
|
||||
|
||||
<category for="Gallery,Image,Video,Document">
|
||||
<!--
|
||||
<storage id="another">
|
||||
<security name="StorageName">Others</security>
|
||||
<security name="StoragePath">~/others</security>
|
||||
<security name="AllowCreateFolder">false</security>
|
||||
</storage>
|
||||
<storage id="public">
|
||||
<security name="StorageName">Public Items</security>
|
||||
<security name="StoragePath">~/publicitems</security>
|
||||
|
||||
<security name="AllowUpload">false</security>
|
||||
<security name="AllowCopyFile">false</security>
|
||||
<security name="AllowMoveFile">false</security>
|
||||
<security name="AllowRenameFile">false</security>
|
||||
<security name="AllowDeleteFile">false</security>
|
||||
|
||||
<security name="AllowOverride">false</security>
|
||||
|
||||
<security name="AllowCreateFolder">false</security>
|
||||
<security name="AllowCopyFolder">false</security>
|
||||
<security name="AllowMoveFolder">false</security>
|
||||
<security name="AllowRenameFolder">false</security>
|
||||
<security name="AllowDeleteFolder">false</security>
|
||||
|
||||
</storage>
|
||||
|
||||
-->
|
||||
</category>
|
||||
|
||||
|
||||
|
||||
</rteconfig>
|
||||
107
LPWeb20/RichtextEditor/config/guest.config
Normal file
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<rteconfig>
|
||||
|
||||
<watermarks>
|
||||
<watermark filepath="~/richtexteditor/images/watermark.png" xalign="right" yalign="bottom" xoffset="-10" yoffset="-10" minwidth="200" minheight="200" />
|
||||
<![CDATA[
|
||||
<watermark filepath="~/richtexteditor/images/watermark.png" xalign="left" yalign="top" xoffset="10" yoffset="10" minwidth="400" minheight="200" />
|
||||
<watermark filepath="base64:iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA60lEQVQ4T2NkoDJgpLJ5DLQ3MKDiwv8NHQZkW4SiMaDhwX+GDw8YNkxwQBb/T0SwwNWjGHjx2tP/+V2nGSoS1Bk8HDTJciWKJoeMA0AXXmD48IOB4cKGAsoNJMJrBJVghuGPDwxWGt8ZyhIsqePCDQfv/p8w/zDDgQUJMAPJj5Sdxx/9b194jqEkVI7Bx9mIchcGFBz4/+HFA2CkPABGSgPlBhIMcSIUoEYKMJeA9HwAJu4DMwKo40JQ1guz+cMQ5WNCeaSAXNc28+T/VduPUydhwyIlN1qNIdjXijpeJiLc8SohyxX4TKS6gQAlX1UV7RnUVQAAAABJRU5ErkJggg==" xalign="right" yalign="top" xoffset="-10" yoffset="10" minwidth="400" minheight="200" />
|
||||
]]>
|
||||
</watermarks>
|
||||
|
||||
<security name="TagBlackList">script,style,link,applet,bgsound,meta,base,basefont,frameset,frame,form</security>
|
||||
<security name="AttrBlackList">runat,action</security>
|
||||
<security name="StyleBlackList">position,visibility,display</security>
|
||||
|
||||
<security name="DrawWatermarks">true</security>
|
||||
|
||||
<!--allow,resize,deny-->
|
||||
<security name="LargeImageMode">resize</security>
|
||||
<security name="MaxImageWidth">0</security>
|
||||
<security name="MaxImageHeight">768</security>
|
||||
|
||||
<security name="MaxFileSize">1024</security>
|
||||
<security name="MaxFolderSize">102400</security>
|
||||
|
||||
<security name="AllowUpload">false</security>
|
||||
<security name="AllowCopyFile">false</security>
|
||||
<security name="AllowMoveFile">false</security>
|
||||
<security name="AllowRenameFile">false</security>
|
||||
<security name="AllowDeleteFile">false</security>
|
||||
|
||||
<security name="AllowOverride">false</security>
|
||||
<!--upload/copy/move-->
|
||||
|
||||
<security name="AllowCreateFolder">false</security>
|
||||
<security name="AllowCopyFolder">false</security>
|
||||
<security name="AllowMoveFolder">false</security>
|
||||
<security name="AllowRenameFolder">false</security>
|
||||
<security name="AllowDeleteFolder">false</security>
|
||||
|
||||
<security name="FilePattern">^[a-zA-Z0-9\._\-\s\(\)\[\]\u007F-\uFFFF]+$</security>
|
||||
<security name="FolderPattern">^[a-zA-Z0-9\._\-\s\(\)\[\]\u007F-\uFFFF]+$</security>
|
||||
|
||||
<category for="Gallery,Image">
|
||||
<security name="Extensions">*.jpg,*.jpeg,*.gif,*.png</security>
|
||||
<security name="MimeTypes">image/*</security>
|
||||
<storage id="default">
|
||||
<security name="StoragePath">~/uploads</security>
|
||||
<security name="StorageName">Image Files</security>
|
||||
</storage>
|
||||
</category>
|
||||
<category for="Video">
|
||||
<security name="Extensions">*.swf,*.flv,*.avi,*.mpg,*.mpeg,*.mp3,*.wmv,*.wav,*.mp4,*.mov</security>
|
||||
<storage id="default">
|
||||
<security name="StoragePath">~/uploads</security>
|
||||
<security name="StorageName">Video Files</security>
|
||||
</storage>
|
||||
</category>
|
||||
<category for="Document">
|
||||
<security name="Extensions">*.txt,*.doc,*.pdf,*.zip,*.rar,*.avi,*.mpg,*.mpeg,*.mp3,*.wav,*.swf,*.jpg,*.jpeg,*.gif,*.png,*.htm,*.xls,*.html,*.rtf,*.wmv</security>
|
||||
<storage id="default">
|
||||
<security name="StoragePath">~/uploads</security>
|
||||
<security name="StorageName">Document Files</security>
|
||||
</storage>
|
||||
</category>
|
||||
<category for="Template">
|
||||
<security name="Extensions">*.txt,*.htm,*.html</security>
|
||||
<storage id="default">
|
||||
<security name="StoragePath">~/templates</security>
|
||||
<security name="StorageName">Templates</security>
|
||||
</storage>
|
||||
</category>
|
||||
|
||||
|
||||
<category for="Gallery,Image,Video,Document">
|
||||
<!--
|
||||
<storage id="another">
|
||||
<security name="StorageName">Others</security>
|
||||
<security name="StoragePath">~/others</security>
|
||||
<security name="AllowCreateFolder">false</security>
|
||||
</storage>
|
||||
<storage id="public">
|
||||
<security name="StorageName">Public Items</security>
|
||||
<security name="StoragePath">~/publicitems</security>
|
||||
|
||||
<security name="AllowUpload">false</security>
|
||||
<security name="AllowCopyFile">false</security>
|
||||
<security name="AllowMoveFile">false</security>
|
||||
<security name="AllowRenameFile">false</security>
|
||||
<security name="AllowDeleteFile">false</security>
|
||||
|
||||
<security name="AllowOverride">false</security>
|
||||
|
||||
<security name="AllowCreateFolder">false</security>
|
||||
<security name="AllowCopyFolder">false</security>
|
||||
<security name="AllowMoveFolder">false</security>
|
||||
<security name="AllowRenameFolder">false</security>
|
||||
<security name="AllowDeleteFolder">false</security>
|
||||
|
||||
</storage>
|
||||
|
||||
-->
|
||||
</category>
|
||||
|
||||
|
||||
|
||||
</rteconfig>
|
||||
13
LPWeb20/RichtextEditor/config/staticlinks.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<links>
|
||||
<group text="Websites">
|
||||
<group text="CuteSoft">
|
||||
<link text="Cute Chat" href="http://cutesoft.net/ASP.NET+Chat/" />
|
||||
<link text="Cute Live Support" href="http://cutesoft.net/live-support/" />
|
||||
<link text="Web Messenger" href="http://cutesoft.net/web-messenger/" />
|
||||
<link text="Ajax Uploader" href="http://ajaxuploader.com" />
|
||||
</group>
|
||||
<link text="RichTextEditor" href="http://www.richtexteditor.com" />
|
||||
<link text="Free Live Chat" href="http://www.mylivechat.com" />
|
||||
<link text="Free Javascript Obfuscator" href="http://www.javascriptobfuscator.com" />
|
||||
</group>
|
||||
</links>
|
||||
14
LPWeb20/RichtextEditor/config/staticstyles.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<styles>
|
||||
<!--
|
||||
These attributes will execute the config.format_%attrname%
|
||||
|
||||
value='any value' :
|
||||
subscript,superscript,bold,italic,underline,linethrough,overline,
|
||||
|
||||
value='specified value' :
|
||||
forecolor,backcolor,fontsize,fontname,cssclass,cssstyle,
|
||||
-->
|
||||
<style name="@clearstyle" />
|
||||
<style name="Comment" italic="1" cssstyle="color:darkgreen;" />
|
||||
<style name="Highlight" cssstyle="background-color:yellow;" />
|
||||
</styles>
|
||||
49
LPWeb20/RichtextEditor/config/statictemplates.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<templates>
|
||||
<group text="Websites">
|
||||
<group text="CuteSoft">
|
||||
<template text="CuteSoft">
|
||||
<![CDATA[
|
||||
<h1>CuteSoft</h1>
|
||||
<h2 class="CommonTitle" style="color: #224488; font-size: 16px; padding: 15px 0px 15px 8px; margin: 0px; font-family: 'segoe ui', arial, verdana, helvetica, sans-serif; line-height: 16px; text-align: left; background-color: #ffffff; ">About CuteSoft Components</h2>
|
||||
<table style="font-family: 'segoe ui', arial, verdana, helvetica, sans-serif; line-height: 16px; text-align: left; background-color: #ffffff; ">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top; ">
|
||||
<h3 style="font-size: 13px; ">Leading provider of online HTML Editing, Upload component, ASP.NET Live Support, ASP.NET Chat and Web Messenger applications.</h3>
|
||||
<p style="margin: 0px 0px 3px; ">
|
||||
CuteSoft Components Inc. is a privately held company incorporated in Ontario, Canada, specializing in building high quality, reusable .net/ASP/PHP components and enterprise class software solutions. We are the Leading provider of online HTML Editing, upload component, ASP.NET Live Support, ASP.NET Chat and Web Messenger applications. These tools are distributed and used worldwide.<br/>
|
||||
<br/>
|
||||
CuteSoft was founded on the principle of offering products and services of the highest quality to our clients. Our target markets are the .NET/ASP/PHP developer community for components and various other key markets for our web based software solutions.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
]]>
|
||||
</template>
|
||||
<template text="Free Live Chat">
|
||||
<![CDATA[
|
||||
<h1>My Live Chat</h1>
|
||||
<p>A Free Live Chat Software for your website.</p>
|
||||
]]>
|
||||
</template>
|
||||
<template text="Free Javascript Obfuscator">
|
||||
<![CDATA[
|
||||
<p>Free Javascript Obfuscator is a professional tool for obfuscation of javascript. It Converts JavaScript source code into scrambled and completely unreadable form, preventing it from analysing and theft.</p>
|
||||
]]>
|
||||
</template>
|
||||
<template text="Ajax Uploader">
|
||||
<![CDATA[
|
||||
<h1>Ajax Uploader</h1>
|
||||
<p>Ajax Uploader is an easy to use, hi-performance ASP.NET File Upload Control which allows you to upload files to web server without refreshing the page. </p>
|
||||
]]>
|
||||
</template>
|
||||
</group>
|
||||
<template text="My Snippet">
|
||||
<![CDATA[
|
||||
<h1>Hello World!</h1>
|
||||
<p>This is a code snippet example.</p>
|
||||
]]>
|
||||
</template>
|
||||
</group>
|
||||
</templates>
|
||||
2
LPWeb20/RichtextEditor/core/core.js
Normal file
2
LPWeb20/RichtextEditor/core/jsml.js
Normal file
421
LPWeb20/RichtextEditor/core/jsml.xsd
Normal file
@@ -0,0 +1,421 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema id="jsml" targetNamespace="http://cutesoft.net/jsml" elementFormDefault="qualified" xmlns="http://cutesoft.net/jsml" xmlns:mstns="http://cutesoft.net/jsml" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:simpleType name="jsml-var">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="[^=]?[0-9a-zA-Z_${}]*" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="jsml-var-list">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="[^=]?[0-9a-zA-Z_${},]*" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="visibility">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="visible" />
|
||||
<xs:enumeration value="hidden" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="jsml-dock">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="top" />
|
||||
<xs:enumeration value="left" />
|
||||
<xs:enumeration value="right" />
|
||||
<xs:enumeration value="bottom" />
|
||||
<xs:enumeration value="fill" />
|
||||
<xs:enumeration value="over" />
|
||||
<xs:enumeration value="flow" />
|
||||
<xs:enumeration value="none" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="content-flow">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="left" />
|
||||
<xs:enumeration value="right" />
|
||||
<xs:enumeration value="bottomleft" />
|
||||
<xs:enumeration value="bottomright" />
|
||||
<xs:enumeration value="uptoleft" />
|
||||
<xs:enumeration value="downtoleft" />
|
||||
<xs:enumeration value="uptoright" />
|
||||
<xs:enumeration value="downtoright" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="flow-clear">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="none" />
|
||||
<xs:enumeration value="both" />
|
||||
<xs:enumeration value="prev" />
|
||||
<xs:enumeration value="next" />
|
||||
<xs:enumeration value="follow" />
|
||||
<xs:enumeration value="newline" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="jsml-overflow">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="none" />
|
||||
<xs:enumeration value="visible" />
|
||||
<xs:enumeration value="scroll" />
|
||||
<xs:enumeration value="default" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="zoom-mode">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="none" />
|
||||
<xs:enumeration value="both" />
|
||||
<xs:enumeration value="in" />
|
||||
<xs:enumeration value="out" />
|
||||
<xs:pattern value="(none)|(both)|(in)|(out)|([0-9%\.]+)" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="vertical-align">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="top" />
|
||||
<xs:enumeration value="middle" />
|
||||
<xs:enumeration value="bottom" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="horizontal-align">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="left" />
|
||||
<xs:enumeration value="center" />
|
||||
<xs:enumeration value="right" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="text-mode">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="singleline" />
|
||||
<xs:enumeration value="multipleline" />
|
||||
<xs:enumeration value="password" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:complexType name="jsml-xmldata" mixed="true">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:any />
|
||||
</xs:choice>
|
||||
<xs:attribute name="rawhtml" type="xs:boolean" />
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-constructor">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="jsml-enable" type="xs:boolean" />
|
||||
<xs:attribute name="arguments" type="jsml-var-list" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-initialize">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="jsml-enable" type="xs:boolean" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-method">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="jsml-enable" type="xs:boolean" />
|
||||
<xs:attribute name="name" type="jsml-var" use="required" />
|
||||
<xs:attribute name="arguments" type="jsml-var-list" />
|
||||
<xs:attribute name="overrideas" type="jsml-var" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-attach">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="jsml-enable" type="xs:boolean" />
|
||||
<xs:attribute name="name" type="jsml-var-list" use="required" />
|
||||
<xs:attribute name="arguments" type="jsml-var-list" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-propgetset">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="jsml-enable" type="xs:boolean" />
|
||||
<xs:attribute name="arguments" type="jsml-var-list" />
|
||||
<xs:attribute name="overrideas" type="jsml-var" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="list-item">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="jsml-enable" type="xs:boolean" />
|
||||
<xs:attribute name="value" type="xs:string" />
|
||||
<xs:attribute name="text" type="xs:string" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-jsml">
|
||||
<xs:attribute name="jsml-enable" type="xs:boolean" />
|
||||
<xs:attribute name="jsml-append" type="xs:boolean" />
|
||||
<xs:attribute name="jsml-class" type="jsml-var" />
|
||||
<xs:attribute name="jsml-base" type="jsml-var" />
|
||||
<xs:attribute name="jsml-local" type="jsml-var" />
|
||||
<xs:attribute name="jsml-member" type="jsml-var" />
|
||||
<xs:attribute name="id" type="xs:string" />
|
||||
<xs:attribute name="var" type="jsml-var" />
|
||||
<xs:attribute name="vars" type="jsml-var-list" />
|
||||
<xs:anyAttribute />
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-control">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-jsml">
|
||||
<xs:attribute name="parent" type="xs:string" />
|
||||
<xs:attribute name="top" type="xs:string" />
|
||||
<xs:attribute name="left" type="xs:string" />
|
||||
<xs:attribute name="right" type="xs:string" />
|
||||
<xs:attribute name="bottom" type="xs:string" />
|
||||
<xs:attribute name="width" type="xs:string" />
|
||||
<xs:attribute name="height" type="xs:string" />
|
||||
<xs:attribute name="min_width" type="xs:string" />
|
||||
<xs:attribute name="min_height" type="xs:string" />
|
||||
<xs:attribute name="max_width" type="xs:string" />
|
||||
<xs:attribute name="max_height" type="xs:string" />
|
||||
<xs:attribute name="unselectable" type="xs:boolean" />
|
||||
<xs:attribute name="visible" type="xs:boolean" />
|
||||
<xs:attribute name="visibility" type="visibility" />
|
||||
<xs:attribute name="disabled" type="xs:boolean" />
|
||||
<xs:attribute name="dock" type="jsml-dock" />
|
||||
<xs:attribute name="flow_clear" type="flow-clear"/>
|
||||
<xs:attribute name="margin" type="xs:string" />
|
||||
<xs:attribute name="border_width" type="xs:string" />
|
||||
<xs:attribute name="border_style" type="xs:string" />
|
||||
<xs:attribute name="border_color" type="xs:string" />
|
||||
<xs:attribute name="back_color" type="xs:string" />
|
||||
<xs:attribute name="text_color" type="xs:string" />
|
||||
<xs:attribute name="background" type="xs:string" />
|
||||
<xs:attribute name="text" type="xs:string" />
|
||||
<xs:attribute name="tooltip" type="xs:string" />
|
||||
<xs:attribute name="font" type="xs:string" />
|
||||
<xs:attribute name="font_size" type="xs:string" />
|
||||
<xs:attribute name="cursor" type="xs:string" />
|
||||
<xs:attribute name="opacity" type="xs:string" />
|
||||
<xs:attribute name="css_class" type="xs:string" />
|
||||
<xs:attribute name="css_text" type="xs:string" />
|
||||
<xs:attribute name="overflow" type="jsml-overflow"/>
|
||||
<xs:attribute name="overflow_x" type="jsml-overflow"/>
|
||||
<xs:attribute name="overflow_y" type="jsml-overflow"/>
|
||||
<xs:attribute name="horizontal_align" type="horizontal-align" />
|
||||
<xs:attribute name="vertical_align" type="vertical-align" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-simplecontrol">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-control">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:group ref="class-member-group" />
|
||||
</xs:choice>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-complexcontrol">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-control">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:group ref="class-member-group" />
|
||||
<xs:group ref="sub-element-group" />
|
||||
</xs:choice>
|
||||
<xs:attribute name="padding" type="xs:string" />
|
||||
<!--<xs:attribute name="zoom" type="zoom-mode" />-->
|
||||
<xs:attribute name="content_flow" type="content-flow" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="jsml-panel">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-complexcontrol">
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-groupbox">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-panel">
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<!--<xs:complexType name="jsml-grid">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-complexcontrol">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="row" type="jsml-row" />
|
||||
</xs:choice>
|
||||
<xs:attribute name="cell_border_width" type="xs:string" />
|
||||
<xs:attribute name="cell_border_style" type="xs:string" />
|
||||
<xs:attribute name="cell_border_color" type="xs:string" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-row">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-complexcontrol">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="cell" type="jsml-cell" />
|
||||
</xs:choice>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-cell">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-complexcontrol">
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>-->
|
||||
|
||||
<xs:complexType name="jsml-jsmlelement">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-simplecontrol">
|
||||
<xs:attribute name="zoom" type="zoom-mode" />
|
||||
<xs:attribute name="padding" type="xs:string"/>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-htmlcontrol">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-jsmlelement">
|
||||
<xs:attribute name="html" type="xs:string" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-image">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-jsmlelement">
|
||||
<xs:attribute name="src" type="xs:string" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-label">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-jsmlelement">
|
||||
<xs:attribute name="text_align" type="horizontal-align" />
|
||||
<xs:attribute name="word_wrap" type="xs:boolean" />
|
||||
<xs:attribute name="font_size" type="xs:string" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-textbox">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-simplecontrol">
|
||||
<xs:attribute name="text_mode" type="text-mode" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-checkbox">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-jsmlelement">
|
||||
<xs:attribute name="checked" type="xs:boolean" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="jsml-dropdown">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-simplecontrol">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="listitem" type="list-item"/>
|
||||
</xs:choice>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:group name="class-member-group">
|
||||
<xs:choice>
|
||||
<xs:element name="jsml-ref">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="jsml-enable" type="xs:boolean" />
|
||||
<xs:attribute name="name" type="xs:string" use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="constructor" type="jsml-constructor" />
|
||||
<xs:element name="initialize" type="jsml-initialize" />
|
||||
<xs:element name="method" type="jsml-method" />
|
||||
<xs:element name="attach" type="jsml-attach" />
|
||||
<xs:element name="xmldata" type="jsml-xmldata" />
|
||||
<xs:element name="property">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="get" type="jsml-propgetset" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="set" type="jsml-propgetset" minOccurs="0" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="name" type="jsml-var" use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:group>
|
||||
<xs:group name="sub-element-group">
|
||||
<xs:choice>
|
||||
<xs:element name="htmlcontrol" type="jsml-htmlcontrol" />
|
||||
<xs:element name="button" type="jsml-simplecontrol" />
|
||||
<xs:element name="image" type="jsml-image" />
|
||||
<xs:element name="label" type="jsml-label" />
|
||||
<xs:element name="textbox" type="jsml-textbox" />
|
||||
<xs:element name="dropdown" type="jsml-dropdown" />
|
||||
<xs:element name="checkbox" type="jsml-checkbox" />
|
||||
<xs:element name="panel" type="jsml-panel" />
|
||||
<xs:element name="groupbox" type="jsml-groupbox" />
|
||||
<!--<xs:element name="grid" type="jsml-grid" />-->
|
||||
<xs:element name="object">
|
||||
<xs:complexType>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="jsml-complexcontrol">
|
||||
<xs:attribute name="jsml-base" type="jsml-var" use="required" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="jsml-comment">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:any processContents="skip" />
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="jsml-block">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:group ref="sub-element-group" />
|
||||
</xs:choice>
|
||||
<xs:attribute name="jsml-enable" type="xs:boolean" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:group>
|
||||
<xs:element name="jsml">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:group ref="sub-element-group" />
|
||||
<xs:element name="execute">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="jsml-enable" type="xs:boolean" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="include">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="jsml-enable" type="xs:boolean" />
|
||||
<xs:attribute name="src"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="jsml-def">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:group ref="class-member-group" />
|
||||
<xs:group ref="sub-element-group" />
|
||||
</xs:choice>
|
||||
<xs:attribute name="jsml-enable" type="xs:boolean" />
|
||||
<xs:attribute name="name" type="xs:string" use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
3
LPWeb20/RichtextEditor/core/jsml.xsx
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--This file is auto-generated by the XML Schema Designer. It holds layout information for components on the designer surface.-->
|
||||
<XSDDesignerLayout Style="LeftRight" />
|
||||
BIN
LPWeb20/RichtextEditor/core/scrollbar/default/barb_x.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
LPWeb20/RichtextEditor/core/scrollbar/default/barb_y.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
LPWeb20/RichtextEditor/core/scrollbar/default/bt_x.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
LPWeb20/RichtextEditor/core/scrollbar/default/bt_y.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
LPWeb20/RichtextEditor/core/scrollbar/default/fb_x.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
LPWeb20/RichtextEditor/core/scrollbar/default/fb_y.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
2
LPWeb20/RichtextEditor/core/uploader.js
Normal file
22
LPWeb20/RichtextEditor/dialogs/__sample.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
|
||||
<panel jsml-class="_sample_dialog" dock="fill" margin="12" padding="12" back_color="green" overflow="visible">
|
||||
<label dock="fill" margin="30" back_color="white" text="Hello World" font="Normal 29pt Arial" vertical_align="middle" horizontal_align="center" cursor="pointer">
|
||||
<attach name="click">
|
||||
<![CDATA[
|
||||
editor.AppendHTML("<p>Hello World ! <p>");
|
||||
]]>
|
||||
</attach>
|
||||
</label>
|
||||
<attach name="keydown" arguments="je,e">
|
||||
if(e.keyCode==27)dialog.close();
|
||||
</attach>
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="_sample_dialog" />
|
||||
|
||||
|
||||
</jsml>
|
||||
323
LPWeb20/RichtextEditor/dialogs/_developer.xml
Normal file
@@ -0,0 +1,323 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<execute>
|
||||
dialog.set_title("RichTextEditor Developer Center Beta");
|
||||
</execute>
|
||||
|
||||
<panel jsml-class="developerdialog" dock="fill" margin="0" padding="0" back_color="black" text_color="white">
|
||||
<xmldata>
|
||||
<h1>Help</h1>
|
||||
<ul>
|
||||
<li>help - print this line</li>
|
||||
<li>buildihtml5</li>
|
||||
<li>joinallimages</li>
|
||||
</ul>
|
||||
</xmldata>
|
||||
<panel jsml-local="sp" dock="fill" overflow_y="scroll">
|
||||
<panel dock="bottom">
|
||||
<label dock="left" text=">" width="5" vertical_align="middle" text_align="right" margin="0,1,0,0"/>
|
||||
<textbox dock="fill" back_color="black" text_color="white" border_width="0">
|
||||
<initialize>
|
||||
setTimeout(function(){self.focus();},100);
|
||||
</initialize>
|
||||
<attach name="enterkey">
|
||||
var text=self.get_text()
|
||||
self.set_text();
|
||||
self.focus();
|
||||
text=text.replace(/(^\s+)|(\s+$)/g,'');
|
||||
if(text)instance.executeline(text);
|
||||
else instance.printtext("");
|
||||
</attach>
|
||||
<attach name="keydown">
|
||||
|
||||
</attach>
|
||||
</textbox>
|
||||
</panel>
|
||||
<htmlcontrol dock="fill" jsml-local="hc" overflow="visible">
|
||||
</htmlcontrol>
|
||||
</panel>
|
||||
<method name="jsml_append_xmldata" arguments="xmldata">
|
||||
self._xmldata=jsml.get_node_innerxml(xmldata);
|
||||
</method>
|
||||
<method name="insertdiv" arguments="div">
|
||||
<![CDATA[
|
||||
hc._content.appendChild(div);
|
||||
hc.invoke_notify_content();
|
||||
jsml.queue_resumehandler(function()
|
||||
{
|
||||
sp.set_scrolly(hc.get_demand_height());
|
||||
});
|
||||
]]>
|
||||
</method>
|
||||
<method name="printhelp">
|
||||
var div=document.createElement("DIV");
|
||||
div.innerHTML=this._xmldata;
|
||||
self.insertdiv(div);
|
||||
</method>
|
||||
<initialize>
|
||||
var div=document.createElement("DIV");
|
||||
div.innerHTML="RichTextEditor : "+editor._config.version+" ? "+editor._config._urlsuffix
|
||||
self.insertdiv(div);
|
||||
self.printhelp();
|
||||
</initialize>
|
||||
<method name="printtext" arguments="text,color,bold">
|
||||
<![CDATA[
|
||||
var div=document.createElement("DIV");
|
||||
div.innerHTML=jsml.html_encode(text)||" ";
|
||||
if(color)div.style.color=color;
|
||||
if(bold)div.style.fontWeight='bold';
|
||||
self.insertdiv(div);
|
||||
]]>
|
||||
</method>
|
||||
<method name="executeline" arguments="text">
|
||||
<;
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch(x)
|
||||
{
|
||||
self.printtext('error : '+x.message,'red',true);
|
||||
return;
|
||||
}
|
||||
self.printtext('Unknown command : '+text,'red',true);
|
||||
]]>
|
||||
</method>
|
||||
|
||||
<method name="joinallimages" arguments="cmdargs">
|
||||
<![CDATA[
|
||||
if(!jsml.html5)
|
||||
{
|
||||
self.printtext('Require HTML5','red',true);
|
||||
return;
|
||||
}
|
||||
|
||||
var folder=editor._config.folder;
|
||||
var skin=editor._config.skin;
|
||||
|
||||
if(!editor._config.allimageindexdata)
|
||||
{
|
||||
self.printtext('no config.allimageindexdata','red',true);
|
||||
return;
|
||||
}
|
||||
|
||||
var imagenames=editor._config.allimageindexdata.split(',');
|
||||
|
||||
var allcanvas=document.createElement("canvas");
|
||||
allcanvas.width=20;
|
||||
allcanvas.height=20*imagenames.length;
|
||||
var allctx=allcanvas.getContext("2d");
|
||||
|
||||
var index=-1;
|
||||
|
||||
function DoReport()
|
||||
{
|
||||
var str=allcanvas.toDataURL("image/png");
|
||||
str=str.substring("data:image/png;base64,".length);
|
||||
|
||||
var form=document.createElement("form");
|
||||
var textarea=document.createElement("TEXTAREA");
|
||||
textarea.value=str;
|
||||
textarea.style.width="480px";
|
||||
textarea.style.height="320px";
|
||||
var div=document.createElement("DIV");
|
||||
div.appendChild(form);
|
||||
form.appendChild(textarea);
|
||||
self.insertdiv(div);
|
||||
|
||||
self.printtext('completed. count:'+imagenames.length+', size:'+textarea.value.length);
|
||||
|
||||
if(!cmdargs)return;
|
||||
|
||||
textarea.name="base64";
|
||||
form.method="post";
|
||||
form.target="_blank";
|
||||
form.action=cmdargs+"?name=all.png&type=image/png";
|
||||
form.submit();
|
||||
}
|
||||
|
||||
function DoNext()
|
||||
{
|
||||
index++;
|
||||
var imagename=imagenames[index];
|
||||
if(!imagename) return DoReport();
|
||||
|
||||
var url=folder+"images/"+imagename+".png";
|
||||
|
||||
var img=document.createElement("IMG");
|
||||
img.onload=function()
|
||||
{
|
||||
allctx.drawImage(img,0,20*index);
|
||||
setTimeout(DoNext,1);
|
||||
}
|
||||
img.onerror=function()
|
||||
{
|
||||
self.printtext("error:"+url,"red");
|
||||
return;
|
||||
}
|
||||
img.setAttribute("src",url);
|
||||
}
|
||||
DoNext();
|
||||
|
||||
]]>
|
||||
</method>
|
||||
|
||||
<method name="buildihtml5">
|
||||
<![CDATA[
|
||||
|
||||
if(!jsml.html5)
|
||||
{
|
||||
self.printtext('Require HTML5','red',true);
|
||||
return;
|
||||
}
|
||||
|
||||
var folder=editor._config.folder;
|
||||
var skin=editor._config.skin;
|
||||
|
||||
var images=[];
|
||||
function fillimages(ctrl)
|
||||
{
|
||||
if(ctrl.is_jsml_type("image"))
|
||||
{
|
||||
images.push(ctrl.get_src());
|
||||
}
|
||||
var arr=ctrl.get_children();
|
||||
for(var i=0;i<arr.length;i++)
|
||||
fillimages(arr[i]);
|
||||
}
|
||||
fillimages(editor._config.skin_control)
|
||||
|
||||
var oldcount=0;
|
||||
var newcount=0;
|
||||
var datamap={};
|
||||
var index=-1;
|
||||
|
||||
var rteic=editor._config._rte_image_cache;
|
||||
if(rteic)
|
||||
{
|
||||
for(var p in rteic)
|
||||
{
|
||||
var v=rteic[p];
|
||||
if(typeof(v)=="string"&&v.substring(0,5)=="data:")
|
||||
{
|
||||
datamap[p]=v;
|
||||
oldcount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(editor._config.allimageindexdata)
|
||||
{
|
||||
var imagenames=editor._config.allimageindexdata.split(',');
|
||||
for(var i=0;i<imagenames.length;i++)
|
||||
images.push(folder+"images/"+imagenames[i]+".png");
|
||||
var newimages=[];
|
||||
var mapimages={};
|
||||
for(var i=0;i<images.length;i++)
|
||||
{
|
||||
if(mapimages[images[i]])
|
||||
continue;
|
||||
mapimages[images[i]]=true;
|
||||
newimages.push(images[i]);
|
||||
}
|
||||
}
|
||||
|
||||
self.printtext('loading images...');
|
||||
|
||||
function DoReport()
|
||||
{
|
||||
var code=[];
|
||||
code.push("window._rte_image_cache=new function(){");
|
||||
code.push("\r\n\r\n");
|
||||
for(var p in datamap)
|
||||
{
|
||||
code.push("this['");
|
||||
code.push(p);
|
||||
code.push("']='");
|
||||
code.push(datamap[p]);
|
||||
code.push("';\r\n");
|
||||
}
|
||||
code.push("\r\n\r\n}\r\n");
|
||||
|
||||
var textarea=document.createElement("TEXTAREA");
|
||||
textarea.value=code.join("");
|
||||
textarea.style.width="480px";
|
||||
textarea.style.height="320px";
|
||||
var div=document.createElement("DIV");
|
||||
div.appendChild(textarea);
|
||||
self.insertdiv(div);
|
||||
|
||||
self.printtext('completed. exists:'+oldcount+', new:'+newcount+', size:'+textarea.value.length);
|
||||
}
|
||||
function DoNext()
|
||||
{
|
||||
index++;
|
||||
var image=images[index];
|
||||
if(!image) return DoReport();
|
||||
|
||||
var url=image;
|
||||
|
||||
if(url.substring(0,5)=="data:")
|
||||
{
|
||||
setTimeout(DoNext,1);
|
||||
return;
|
||||
}
|
||||
if(url.substring(0,folder.length)!=folder)
|
||||
{
|
||||
self.printtext("skip:"+url,"red");
|
||||
setTimeout(DoNext,1);
|
||||
return;
|
||||
}
|
||||
|
||||
var img=document.createElement("IMG");
|
||||
img.onload=function()
|
||||
{
|
||||
var canvas=document.createElement("canvas");
|
||||
canvas.width=img.width;
|
||||
canvas.height=img.height;
|
||||
var ctx=canvas.getContext("2d");
|
||||
ctx.drawImage(img,0,0);
|
||||
|
||||
var p=url.substring(folder.length);
|
||||
if(!datamap[p])
|
||||
newcount++;
|
||||
datamap[p]=canvas.toDataURL("image/png");
|
||||
setTimeout(DoNext,1);
|
||||
}
|
||||
img.onerror=function()
|
||||
{
|
||||
self.printtext("error:"+url,"red");
|
||||
setTimeout(DoNext,1);
|
||||
}
|
||||
img.setAttribute("src",url);
|
||||
}
|
||||
DoNext();
|
||||
|
||||
]]>
|
||||
</method>
|
||||
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="developerdialog" />
|
||||
|
||||
</jsml>
|
||||
173
LPWeb20/RichtextEditor/dialogs/_dialog.xml
Normal file
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<include src="{folder}dialogs/_skins.xml?{timems}" />
|
||||
|
||||
<panel jsml-class="dialogcontainer">
|
||||
<panel dock="over" jsml-member="mask" back_color="black" opacity="5"></panel>
|
||||
<!--a button for form default..-->
|
||||
<button text="default" width="1px" height="1px" left="-10" top="-10" />
|
||||
<panel jsml-local="dialogframe" width="620" height="420">
|
||||
<panel jsml-local="skin" jsml-base="frameskin_seven" dock="over">
|
||||
<attach name="clickclose">
|
||||
if(instance._panel)instance._panel.invoke_event("clickclose");
|
||||
</attach>
|
||||
</panel>
|
||||
</panel>
|
||||
<initialize>
|
||||
<![CDATA[
|
||||
skin.set_css_class("jsml_dialogskin");
|
||||
dialogframe.set_padding(skin.get_framepadding());
|
||||
skin._skinmovetarget=dialogframe;
|
||||
skin._skinsizetarget=dialogframe;
|
||||
|
||||
//self._element.onmousedown=jsml.cancel_bubble_function;
|
||||
|
||||
self.set_parent(document.body);
|
||||
var style=self._estyle;
|
||||
style.zIndex=editor._config.dialog_zindex;
|
||||
style.position="absolute";
|
||||
|
||||
function repos()
|
||||
{
|
||||
if(self._jsml_disposed)return;
|
||||
|
||||
var rect=jsml.get_body_rect();
|
||||
if(jsml.mobile)
|
||||
{
|
||||
rect.top=0;
|
||||
rect.left=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
setTimeout(repos,100);
|
||||
}
|
||||
style.top=rect.top+"px";
|
||||
style.left=rect.left+"px";
|
||||
self.set_width(rect.width);
|
||||
self.set_height(rect.height);
|
||||
}
|
||||
repos();
|
||||
]]>
|
||||
</initialize>
|
||||
<property name="title">
|
||||
<get>
|
||||
return skin.get_text();
|
||||
</get>
|
||||
<set>
|
||||
skin.set_text(value);
|
||||
</set>
|
||||
</property>
|
||||
|
||||
<method name="SetPanel">
|
||||
self._panel=value;
|
||||
dialogframe.append_child(value);
|
||||
self.MoveCenter();
|
||||
//self._timeline=jsml.new_timeline()
|
||||
//instance.set_opacity(30);
|
||||
//self._timeline.add_onprogress(jsml.tween.make_number_property(instance,"opacity",70))
|
||||
//self._timeline.set_timespan(500);
|
||||
//self._timeline.start();
|
||||
</method>
|
||||
<attach name="disposing">
|
||||
if(!self._timeline)return
|
||||
self._timeline.pause();
|
||||
self._timeline.dispose();
|
||||
</attach>
|
||||
<method name="MoveCenter">
|
||||
var value=self._panel;
|
||||
var padding=dialogframe.get_padding();
|
||||
var w=value.get_width()+padding[1]+padding[3];
|
||||
var h=value.get_height()+padding[0]+padding[2];
|
||||
var rect=jsml.get_body_rect();
|
||||
if(jsml.mobile)
|
||||
{
|
||||
dialogframe.set_top(rect.top)
|
||||
dialogframe.set_left(rect.left)
|
||||
}
|
||||
else
|
||||
{
|
||||
dialogframe.set_top(Math.floor( Math.max(0,rect.height-h)/2 ))
|
||||
dialogframe.set_left(Math.floor( Math.max(0,rect.width-w)/2 ))
|
||||
}
|
||||
dialogframe.set_width(Math.min(w,rect.width));
|
||||
dialogframe.set_height(Math.min(h,rect.height));
|
||||
</method>
|
||||
<method name="resize" arguments="width,height">
|
||||
<![CDATA[
|
||||
var padding=dialogframe.get_padding();
|
||||
if(width)
|
||||
dialogframe.set_width(width+padding[1]+padding[3]);
|
||||
if(height)
|
||||
dialogframe.set_height(height+padding[0]+padding[2]);
|
||||
self.MoveCenter();
|
||||
]]>
|
||||
</method>
|
||||
</panel>
|
||||
|
||||
<panel dock="fill" back_color="white">
|
||||
<initialize>
|
||||
self._dialogcontainer=jsml.new_dialogcontainer();
|
||||
self._dialogcontainer.SetPanel(self);
|
||||
</initialize>
|
||||
<attach name="keydown" arguments="je,e">
|
||||
if(e.keyCode==27)self.invoke_event("clickclose");
|
||||
</attach>
|
||||
<attach name="clickclose">
|
||||
<![CDATA[
|
||||
if(self.onqueryclose)
|
||||
if(false===self.onqueryclose())
|
||||
return;
|
||||
self.close();
|
||||
]]>
|
||||
</attach>
|
||||
<method name="close">
|
||||
self._dialogcontainer.set_visible(false);
|
||||
setTimeout(function(){self._dialogcontainer.dispose();},1);
|
||||
self.invoke_event("closing");
|
||||
</method>
|
||||
<property name="title">
|
||||
<get>
|
||||
return self._dialogcontainer.get_title();
|
||||
</get>
|
||||
<set>
|
||||
self._dialogcontainer.set_title(value);
|
||||
</set>
|
||||
</property>
|
||||
<method name="hidemask">
|
||||
self._dialogcontainer.mask.set_visible(false);
|
||||
</method>
|
||||
<method name="resize" arguments="width,height">
|
||||
jsml.suppend_layout();
|
||||
self.set_width(width);
|
||||
self.set_height(height);
|
||||
self._dialogcontainer.resize(width,height);
|
||||
jsml.resume_layout();
|
||||
</method>
|
||||
<method name="adjustsize">
|
||||
<![CDATA[
|
||||
jsml.suppend_layout();
|
||||
var sw=self.get_width();
|
||||
var sh=self.get_height();
|
||||
var w=self.get_demand_content_width();
|
||||
var h=self.get_demand_content_height();
|
||||
if(w>sw||h>sh)
|
||||
{
|
||||
self.resize(Math.max(w,sw),Math.max(h,sh));
|
||||
//recalc the height for flow controls
|
||||
self.resize(Math.max(w,sw),self.get_demand_content_height());
|
||||
}
|
||||
jsml.resume_layout();
|
||||
]]>
|
||||
</method>
|
||||
<method name="expandsize" arguments="width,height">
|
||||
var rect=jsml.get_body_rect();
|
||||
var maxw=Math.floor(rect.width*0.8);
|
||||
var maxh=Math.floor(rect.height*0.8);
|
||||
self.resize( Math.min(width+self.get_width(),maxw) , Math.min(height+self.get_height(),maxh) )
|
||||
</method>
|
||||
|
||||
</panel>
|
||||
|
||||
</jsml>
|
||||
283
LPWeb20/RichtextEditor/dialogs/_skins.xml
Normal file
@@ -0,0 +1,283 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<panel jsml-class="frameskin_base">
|
||||
|
||||
</panel>
|
||||
<panel jsml-class="frameskin_resizepanel">
|
||||
<method name="get_sizetarget">
|
||||
<![CDATA[
|
||||
for(var p=self;p;p=p.get_jsml_parent())
|
||||
{
|
||||
if(p.instance_of("frameskin_base"))
|
||||
return p._skinsizetarget;
|
||||
}
|
||||
]]>
|
||||
</method>
|
||||
<property name="resize_cursor">
|
||||
<get>
|
||||
return this._resize_cursor||"";
|
||||
</get>
|
||||
<set>
|
||||
this._resize_cursor=value;
|
||||
</set>
|
||||
</property>
|
||||
<property name="resize_edge">
|
||||
<get>
|
||||
return this._resize_edge||[0,0,0,0];
|
||||
</get>
|
||||
<set>
|
||||
var arr=value.split(',');
|
||||
this._resize_edge=arr;
|
||||
self._stt=parseInt(arr[0]);
|
||||
self._str=parseInt(arr[1]);
|
||||
self._stb=parseInt(arr[2]);
|
||||
self._stl=parseInt(arr[3]);
|
||||
</set>
|
||||
</property>
|
||||
<attach name="mousehover">
|
||||
this.set_unselectable(true);
|
||||
var target=self.get_sizetarget();
|
||||
if(target)self.set_cursor(self.get_resize_cursor());
|
||||
</attach>
|
||||
<attach name="mousedown" arguments="jevent,devent">
|
||||
var target=self.get_sizetarget();
|
||||
if(target)target.start_resize(devent,self._stt,self._str,self._stb,self._stl);
|
||||
</attach>
|
||||
</panel>
|
||||
|
||||
<panel jsml-class="frameskin_default" jsml-base="frameskin_base">
|
||||
<panel dock="top" height="28" border_color="#D1D9DB" border_style="solid" border_width="0,1,0,1">
|
||||
<panel dock="fill" padding="3,0,0,12" background="transparent url({folder}dialogs/skins/Default/top_middle.png)">
|
||||
<label jsml-local="lbt" vertical_align="middle" dock="fill" cursor="move">
|
||||
<initialize>
|
||||
self._estyle.fontWeight="bold";
|
||||
</initialize>
|
||||
<attach name="mousedown,touchstart" arguments="jevent,devent">
|
||||
if(instance._skinmovetarget)instance._skinmovetarget.start_move_offset(devent);
|
||||
</attach>
|
||||
</label>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel dock="fill" border_color="#D1D9DB" border_style="solid" border_width="1"></panel>
|
||||
<method name="get_framepadding">
|
||||
return [29,1,1,1];
|
||||
</method>
|
||||
<property name="text">
|
||||
<get>
|
||||
return lbt.get_text();
|
||||
</get>
|
||||
<set arguments="value">
|
||||
lbt.set_text(value);
|
||||
</set>
|
||||
</property>
|
||||
</panel>
|
||||
|
||||
<panel jsml-class="frameskin_blue" jsml-base="frameskin_base" border_width="1" border_color="#788EC0">
|
||||
<panel dock="top" height="30" background="transparent url({folder}dialogs/skins/Blue/blue-bg.png) repeat-x">
|
||||
<panel dock="top" height="4">
|
||||
<panel dock="left" width="4" jsml-base="frameskin_resizepanel" resize_cursor="nw-resize" resize_edge="1,0,0,1"/>
|
||||
<panel dock="right" width="4" jsml-base="frameskin_resizepanel" resize_cursor="ne-resize" resize_edge="1,1,0,0"/>
|
||||
<panel dock="fill" width="4" jsml-base="frameskin_resizepanel" resize_cursor="n-resize" resize_edge="1,0,0,0"/>
|
||||
</panel>
|
||||
<label jsml-local="lbt" vertical_align="middle" dock="fill" margin="0,0,0,20" cursor="move">
|
||||
<initialize>
|
||||
self._estyle.fontWeight="bold";
|
||||
</initialize>
|
||||
<attach name="mousedown,touchstart" arguments="jevent,devent">
|
||||
if(instance._skinmovetarget)instance._skinmovetarget.start_move_offset(devent);
|
||||
</attach>
|
||||
</label>
|
||||
<panel top="9" right="9" width="16" height="16" cursor="pointer" tooltip="@CLOSE" background="transparent url({folder}dialogs/skins/Blue/blue-close.gif) no-repeat">
|
||||
<attach name="click">
|
||||
frameskin_blue.invoke_event("clickclose");
|
||||
</attach>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel dock="fill" >
|
||||
<panel dock="bottom" height="4" back_color="#C1D1F9">
|
||||
<panel dock="left" width="4" jsml-base="frameskin_resizepanel" resize_cursor="sw-resize" resize_edge="0,0,1,1"/>
|
||||
<panel dock="right" width="4" jsml-base="frameskin_resizepanel" resize_cursor="se-resize" resize_edge="0,1,1,0"/>
|
||||
<panel dock="fill" width="4" jsml-base="frameskin_resizepanel" resize_cursor="s-resize" resize_edge="0,0,1,0"/>
|
||||
</panel>
|
||||
<panel dock="left" back_color="#C1D1F9" width="4" jsml-base="frameskin_resizepanel" resize_cursor="w-resize" resize_edge="0,0,0,1"/>
|
||||
<panel dock="right" back_color="#C1D1F9" width="4" jsml-base="frameskin_resizepanel" resize_cursor="e-resize" resize_edge="0,1,0,0"/>
|
||||
<panel dock="fill" border_color="#9CACD0" border_width="1" back_color="white">
|
||||
</panel>
|
||||
</panel>
|
||||
<property name="text">
|
||||
<get>
|
||||
return lbt.get_text();
|
||||
</get>
|
||||
<set arguments="value">
|
||||
lbt.set_text(value);
|
||||
</set>
|
||||
</property>
|
||||
<method name="get_framepadding">
|
||||
return [32,4,4,4];
|
||||
</method>
|
||||
</panel>
|
||||
|
||||
<panel jsml-class="frameskin_template" jsml-base="frameskin_base">
|
||||
<panel jsml-member="tt" dock="top">
|
||||
<panel jsml-member="tl" dock="left" jsml-base="frameskin_resizepanel" resize_cursor="nw-resize" resize_edge="1,0,0,1"/>
|
||||
<panel jsml-member="tr" dock="right" jsml-base="frameskin_resizepanel" resize_cursor="ne-resize" resize_edge="1,1,0,0" />
|
||||
<panel jsml-member="tc" dock="fill">
|
||||
<panel dock="top" height="5" jsml-base="frameskin_resizepanel" resize_cursor="n-resize" resize_edge="1,0,0,0"/>
|
||||
<label jsml-member="lt" dock="fill" vertical_align="middle" text="" cursor="move">
|
||||
<attach name="mousedown,touchstart" arguments="jevent,devent">
|
||||
if(instance._skinmovetarget)instance._skinmovetarget.start_move_offset(devent);
|
||||
</attach>
|
||||
</label>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel jsml-member="bb" dock="bottom">
|
||||
<panel jsml-member="bl" dock="left" jsml-base="frameskin_resizepanel" resize_cursor="sw-resize" resize_edge="0,0,1,1"/>
|
||||
<panel jsml-member="br" dock="right" jsml-base="frameskin_resizepanel" resize_cursor="se-resize" resize_edge="0,1,1,0"/>
|
||||
<panel jsml-member="bc" dock="fill" jsml-base="frameskin_resizepanel" resize_cursor="s-resize" resize_edge="0,0,1,0" />
|
||||
</panel>
|
||||
<panel jsml-member="ml" dock="left" width="15" jsml-base="frameskin_resizepanel" resize_cursor="w-resize" resize_edge="0,0,0,1"/>
|
||||
<panel jsml-member="mr" dock="right" width="15" jsml-base="frameskin_resizepanel" resize_cursor="e-resize" resize_edge="0,1,0,0"/>
|
||||
<method name="get_framepadding">
|
||||
return [this.tth||0,this.mrw||0,this.bbh||0,this.mlw||0];
|
||||
</method>
|
||||
<method name="init_skinname" arguments="skinname,tth,tlw,trw,bbh,blw,brw,mlw,mrw">
|
||||
<![CDATA[
|
||||
var imgext="gif";
|
||||
if(skinname=="seven")
|
||||
{
|
||||
var ua=navigator.userAgent;
|
||||
if( ua.indexOf("MSIE 6.")==-1 && ua.indexOf("MSIE 5.")==-1 )
|
||||
imgext="png";
|
||||
}
|
||||
this.tth=tth;
|
||||
this.bbh=bbh;
|
||||
this.mlw=mlw;
|
||||
this.mrw=mrw;
|
||||
this.tt.set_height(tth);
|
||||
this.tl.set_width(tlw);
|
||||
this.tr.set_width(trw);
|
||||
this.bb.set_height(bbh);
|
||||
this.bl.set_width(blw);
|
||||
this.br.set_width(brw);
|
||||
this.ml.set_width(mlw);
|
||||
this.mr.set_width(mrw);
|
||||
this.tl.set_background("transparent url({folder}dialogs/skins/"+skinname+"/top_left."+imgext+") no-repeat");
|
||||
this.tr.set_background("transparent url({folder}dialogs/skins/"+skinname+"/top_right."+imgext+") no-repeat");
|
||||
this.tc.set_background("transparent url({folder}dialogs/skins/"+skinname+"/top_center."+imgext+") repeat-x");
|
||||
this.bl.set_background("transparent url({folder}dialogs/skins/"+skinname+"/btm_left."+imgext+") no-repeat");
|
||||
this.br.set_background("transparent url({folder}dialogs/skins/"+skinname+"/btm_right."+imgext+") no-repeat");
|
||||
this.bc.set_background("transparent url({folder}dialogs/skins/"+skinname+"/btm_center."+imgext+") repeat-x");
|
||||
this.ml.set_background("transparent url({folder}dialogs/skins/"+skinname+"/mdl_left."+imgext+") repeat-y");
|
||||
this.mr.set_background("transparent url({folder}dialogs/skins/"+skinname+"/mdl_right."+imgext+") repeat-y");
|
||||
]]>
|
||||
</method>
|
||||
<property name="text">
|
||||
<get>
|
||||
return self.lt.get_text();
|
||||
</get>
|
||||
<set>
|
||||
self.lt.set_text(value);
|
||||
</set>
|
||||
</property>
|
||||
<property name="text_color">
|
||||
<get>
|
||||
return self.lt.get_text_color();
|
||||
</get>
|
||||
<set>
|
||||
self.lt.set_text_color(value);
|
||||
</set>
|
||||
</property>
|
||||
</panel>
|
||||
|
||||
<panel jsml-class="frameskin_royale" jsml-base="frameskin_template">
|
||||
<initialize>
|
||||
this.init_skinname("royale",17,3,3,3,3,3,3,3);
|
||||
this.lt.set_margin([0,0,0,3]);
|
||||
this.lt.set_text_color("white");
|
||||
</initialize>
|
||||
</panel>
|
||||
<panel jsml-class="frameskin_classic" jsml-base="frameskin_template">
|
||||
<initialize>
|
||||
this.init_skinname("classic",5,5,5,5,5,5,5,5);
|
||||
</initialize>
|
||||
</panel>
|
||||
<panel jsml-class="frameskin_indigo" jsml-base="frameskin_template">
|
||||
<initialize>
|
||||
this.init_skinname("indigo",5,5,5,5,5,5,5,5);
|
||||
</initialize>
|
||||
</panel>
|
||||
<panel jsml-class="frameskin_macblue" jsml-base="frameskin_template">
|
||||
<initialize>
|
||||
this.init_skinname("macblue",22,81,47,14,12,16,1,1);
|
||||
</initialize>
|
||||
</panel>
|
||||
<panel jsml-class="frameskin_macwhite" jsml-base="frameskin_template">
|
||||
<initialize>
|
||||
this.init_skinname("macwhite",22,76,33,22,8,8,1,1);
|
||||
</initialize>
|
||||
</panel>
|
||||
<panel jsml-class="frameskin_normal" jsml-base="frameskin_template">
|
||||
<initialize>
|
||||
this.init_skinname("normal",3,3,3,3,3,3,3,3);
|
||||
</initialize>
|
||||
</panel>
|
||||
|
||||
<panel jsml-class="frameskin_seven" jsml-base="frameskin_template">
|
||||
<panel jsml-member="cb" right="15" top="7" width="44" height="18" cursor="pointer" tooltip="@CLOSE" background="transparent url({folder}dialogs/skins/seven/close.gif) no-repeat">
|
||||
<attach name="click">
|
||||
frameskin_seven.invoke_event("clickclose");
|
||||
</attach>
|
||||
</panel>
|
||||
<initialize>
|
||||
<![CDATA[
|
||||
this.init_skinname("seven",35,15,15,15,15,15,15,15);
|
||||
this.lt.set_margin([2,0,0,6]);
|
||||
]]>
|
||||
</initialize>
|
||||
</panel>
|
||||
|
||||
<panel jsml-class="frameskin_newgreen" jsml-base="frameskin_template" jsml-local="newgreen">
|
||||
<panel jsml-member="icon" left="15" top="14" width="13" height="18" background="transparent url({folder}dialogs/skins/newgreen/icon_dialog.gif) no-repeat"></panel>
|
||||
<panel jsml-member="cb" right="0" top="9" width="44" height="18" cursor="pointer" background="transparent url({folder}dialogs/skins/newgreen/closebtn.gif) no-repeat">
|
||||
<attach name="mousehover">
|
||||
//self.set_background('transparent url({folder}dialogs/skins/newgreen/closebtn_over.gif) no-repeat');
|
||||
newgreen.cbover.set_visible("true");
|
||||
</attach>
|
||||
</panel>
|
||||
<panel jsml-member="cbover" visible="false" right="0" top="9" width="44" height="18" cursor="pointer" background="transparent url({folder}dialogs/skins/newgreen/closebtn_over.gif) no-repeat">
|
||||
<attach name="click">
|
||||
frameskin_newgreen.invoke_event("clickclose");
|
||||
</attach>
|
||||
<attach name="mouseleave">
|
||||
self.set_visible("false");
|
||||
</attach>
|
||||
</panel>
|
||||
<initialize>
|
||||
<![CDATA[
|
||||
this.init_skinname("newgreen",33,13,13,13,13,13,13,13);
|
||||
this.lt.set_margin([8,0,8,20]);
|
||||
]]>
|
||||
</initialize>
|
||||
</panel>
|
||||
|
||||
<execute>
|
||||
<![CDATA[
|
||||
if(!jsml.class_exists("frameskin"))
|
||||
{
|
||||
var skin='seven';
|
||||
var arr=(window.location.href.split('#')[0].split('?')[1]||'').split('&');
|
||||
for(var i=0;i<arr.length;i++)
|
||||
{
|
||||
var kv=arr[i].split('=');
|
||||
if(kv[0]=="dialogskin")
|
||||
skin=kv[1];
|
||||
}
|
||||
jsml.class_define("frameskin","frameskin_"+skin);
|
||||
}
|
||||
]]>
|
||||
</execute>
|
||||
|
||||
|
||||
</jsml>
|
||||
56
LPWeb20/RichtextEditor/dialogs/basic_alert.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<panel jsml-class="alertdialogpanel" dock="fill" overflow="visible" margin="0" padding="15">
|
||||
|
||||
<panel jsml-local="bottompanel" dock="bottom" horizontal_align="center">
|
||||
<button width="82" text="@OK" jsml-local="okbtn">
|
||||
<attach name="click">
|
||||
dialog.close();
|
||||
</attach>
|
||||
</button>
|
||||
</panel>
|
||||
|
||||
<panel dock="top" overflow="visible">
|
||||
<image dock="left" src="{folder}images/msgbox_alert.gif" width="11" height="11" />
|
||||
<label jsml-local="label" dock="fill" margin="0,5,15,5" word_wrap="true" vertical_align="middle" max_width="640" />
|
||||
</panel>
|
||||
|
||||
<attach name="keydown" arguments="je,e">
|
||||
if(e.keyCode==27)dialog.close();
|
||||
</attach>
|
||||
<initialize>
|
||||
<![CDATA[
|
||||
if(option.hideButtons)
|
||||
bottompanel.set_visible(false);
|
||||
label.set_text(option.message);
|
||||
setTimeout(function()
|
||||
{
|
||||
okbtn.focus();
|
||||
var dw=label.get_demand_content_width()
|
||||
var dh=label.get_demand_content_height()
|
||||
var cw=label.get_current_width();
|
||||
var ch=label.get_current_height();
|
||||
var w=dw-cw;
|
||||
var h=dh-ch;
|
||||
if(w>0||h>0)
|
||||
{
|
||||
if(w<0)w=0;
|
||||
if(h<0)h=0;
|
||||
//dialog.expandsize(w,h);
|
||||
}
|
||||
},1);
|
||||
setTimeout(function(){okbtn.focus();},100);
|
||||
]]>
|
||||
</initialize>
|
||||
<attach name="click">
|
||||
okbtn.focus()
|
||||
</attach>
|
||||
</panel>
|
||||
|
||||
<object jsml-base="alertdialogpanel">
|
||||
|
||||
</object>
|
||||
|
||||
</jsml>
|
||||
54
LPWeb20/RichtextEditor/dialogs/basic_confirm.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<panel jsml-class="promptdialogpanel" dock="fill" margin="0" padding="18" overflow="visible">
|
||||
<panel dock="top" overflow="visible">
|
||||
<checkbox jsml-local="checkbox" dock="left" width="20" margin="3,1,0,4"/>
|
||||
<label jsml-local="label" dock="fill" margin="4,4,0,4" max_width="640" />
|
||||
</panel>
|
||||
<panel dock="bottom">
|
||||
<panel dock="right" overflow="visible">
|
||||
<button dock="left" width="82" margin="0,12,0,0" text="@OK" jsml-local="btnok">
|
||||
<attach name="click">
|
||||
instance.commitinput();
|
||||
</attach>
|
||||
</button>
|
||||
<button dock="left" width="82" margin="0,12,0,0" text="@CANCEL">
|
||||
<attach name="click">
|
||||
dialog.close();
|
||||
</attach>
|
||||
</button>
|
||||
</panel>
|
||||
</panel>
|
||||
<attach name="keydown" arguments="je,e">
|
||||
if(e.keyCode==27)dialog.close();
|
||||
</attach>
|
||||
<method name="commitinput">
|
||||
<![CDATA[
|
||||
if(!checkbox.get_checked())
|
||||
return;
|
||||
dialog.result=true;
|
||||
dialog.close();
|
||||
]]>
|
||||
</method>
|
||||
<initialize>
|
||||
<![CDATA[
|
||||
label.set_text(option.message);
|
||||
function checkvalue()
|
||||
{
|
||||
if(self._jsml_disposed)return;
|
||||
setTimeout(checkvalue,10);
|
||||
btnok.set_disabled(!checkbox.get_checked());
|
||||
btnok.set_tooltip(checkbox.get_checked()?"":"Please click the checkbox at first");
|
||||
}
|
||||
setTimeout(checkvalue,10);
|
||||
]]>
|
||||
</initialize>
|
||||
</panel>
|
||||
|
||||
<object jsml-base="promptdialogpanel">
|
||||
|
||||
</object>
|
||||
|
||||
</jsml>
|
||||
86
LPWeb20/RichtextEditor/dialogs/basic_prompt.xml
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<panel jsml-class="promptdialogpanel" dock="fill" margin="0" padding="18" overflow="visible">
|
||||
<panel dock="top" overflow="visible">
|
||||
<label jsml-local="label" dock="fill" margin="4,4,0,4" max_width="640"/>
|
||||
</panel>
|
||||
<panel dock="top" overflow="visible">
|
||||
<textbox jsml-local="textbox" dock="fill" margin="12" border_color="gray" border_style="solid" border_width="1">
|
||||
<attach name="enterkey">
|
||||
instance.commitinput();
|
||||
</attach>
|
||||
</textbox>
|
||||
</panel>
|
||||
<panel dock="bottom">
|
||||
<panel dock="right" overflow="visible">
|
||||
<button dock="left" width="82" margin="0,12,0,0" text="@OK" jsml-local="btnok">
|
||||
<attach name="click">
|
||||
instance.commitinput();
|
||||
</attach>
|
||||
</button>
|
||||
<button dock="left" width="82" margin="0,12,0,0" text="@CANCEL">
|
||||
<attach name="click">
|
||||
dialog.close();
|
||||
</attach>
|
||||
</button>
|
||||
</panel>
|
||||
</panel>
|
||||
<attach name="keydown" arguments="je,e">
|
||||
if(e.keyCode==27)dialog.close();
|
||||
</attach>
|
||||
<method name="getvalidvalue" arguments="allowUI">
|
||||
<![CDATA[
|
||||
var val=textbox.get_text();
|
||||
if(!option.stoptrim)val=val.replace(/(^\s+|\s+$)/g,"")
|
||||
|
||||
if(val=="")return option.allowempty?"":null;
|
||||
if(option.minlen&&val.length<option.minlen)return null;
|
||||
if(option.maxlen&&val.length>option.maxlen)return null;
|
||||
if(option.regexp&&!option.regexp.test(val))return null;
|
||||
|
||||
if(option.precheckvalue)
|
||||
val=option.precheckvalue(val,allowUI);
|
||||
|
||||
return val;
|
||||
]]>
|
||||
</method>
|
||||
<method name="commitinput">
|
||||
<![CDATA[
|
||||
var val=self.getvalidvalue(true);
|
||||
if(val==null)
|
||||
return;
|
||||
dialog.result=val;
|
||||
dialog.close();
|
||||
]]>
|
||||
</method>
|
||||
<initialize>
|
||||
<![CDATA[
|
||||
label.set_text(option.message);
|
||||
textbox.set_text(option.defaultvalue||"");
|
||||
setTimeout(function()
|
||||
{
|
||||
textbox.focus();
|
||||
if(textbox.get_text())
|
||||
{
|
||||
try{textbox._input.select();}catch(x){}
|
||||
}
|
||||
},1);
|
||||
function checkvalue()
|
||||
{
|
||||
if(self._jsml_disposed)return;
|
||||
setTimeout(checkvalue,10);
|
||||
var val=self.getvalidvalue();
|
||||
btnok.set_disabled(val==null);
|
||||
}
|
||||
setTimeout(checkvalue,10);
|
||||
]]>
|
||||
</initialize>
|
||||
</panel>
|
||||
|
||||
<object jsml-base="promptdialogpanel">
|
||||
|
||||
</object>
|
||||
|
||||
</jsml>
|
||||
1605
LPWeb20/RichtextEditor/dialogs/browsedialogbase.xml
Normal file
247
LPWeb20/RichtextEditor/dialogs/cleancode.xml
Normal file
@@ -0,0 +1,247 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<panel jsml-class="cleancode_item" dock="top">
|
||||
<checkbox dock="left" jsml-local="checkbox" width="20" height="16" margin="1,0,3,0">
|
||||
<attach name="change,click">
|
||||
instance.filter.IsChecked=self.get_checked();
|
||||
</attach>
|
||||
</checkbox>
|
||||
<label dock="left" jsml-local="label" vertical_align="middle"/>
|
||||
<method name="bind_item" arguments="arg0">
|
||||
self.filter=arg0;
|
||||
label.set_text(self.filter.Filter.LangText);
|
||||
self.set_opacity(self.filter.IsMatch?100:80)
|
||||
checkbox.set_disabled(!self.filter.IsMatch);
|
||||
</method>
|
||||
</panel>
|
||||
|
||||
<panel jsml-class="cleancode_dialog" dock="fill" margin="0" padding="6" overflow="visible" back_color="#f9f9f9">
|
||||
<label dock="bottom" jsml-local="scaninfo" />
|
||||
<panel dock="fill" margin="12">
|
||||
<panel dock="right">
|
||||
<button text="@APPLY" >
|
||||
<attach name="click">
|
||||
instance.DoExecute();
|
||||
</attach>
|
||||
</button>
|
||||
|
||||
<button text="@UNDO" jsml-local="btnundo" top="30">
|
||||
<attach name="click">
|
||||
instance.DoUndo();
|
||||
</attach>
|
||||
</button>
|
||||
<button text="@REDO" jsml-local="btnredo" top="60">
|
||||
<attach name="click">
|
||||
instance.DoRedo();
|
||||
</attach>
|
||||
</button>
|
||||
|
||||
<button text="@CLOSE" top="90">
|
||||
<attach name="click">
|
||||
dialog.close();
|
||||
</attach>
|
||||
</button>
|
||||
|
||||
</panel>
|
||||
<panel dock="fill" overflow_y="scroll" margin="0,10,0,0" border_style="solid" border_width="0,1,0,0" border_color="#cccccc">
|
||||
<panel dock="top" overflow="visible">
|
||||
<label dock="left" text="@CLEAN_MATCHITEMS|:" padding="0,0,0,5" width="90"/>
|
||||
<panel dock="left" width="400" overflow="visible">
|
||||
<panel dock="top" jsml-local="enablelist" overflow="visible">
|
||||
</panel>
|
||||
<panel dock="top">
|
||||
<label dock="left" text="@TAGSTOREMOVE|:" vertical_align="middle" margin="0,5,0,5"></label>
|
||||
<textbox dock="left" jsml-local="specifytags" border_width="1" width="160" border_color="#a0a0a0"></textbox>
|
||||
</panel>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel dock="top"/>
|
||||
<panel dock="top" overflow="visible">
|
||||
<label dock="left" text="@CLEAN_UNMATCHITEMS|:" padding="0,0,0,5" width="90" />
|
||||
<panel dock="left" jsml-local="disablelist" overflow="visible">
|
||||
</panel>
|
||||
</panel>
|
||||
</panel>
|
||||
</panel>
|
||||
|
||||
<attach name="keydown" arguments="je,e">
|
||||
if(e.keyCode==27)dialog.close();
|
||||
</attach>
|
||||
|
||||
|
||||
<initialize>
|
||||
self.LoadUI();
|
||||
</initialize>
|
||||
<method name="ReloadUI">
|
||||
enablelist.dispose_children();
|
||||
disablelist.dispose_children()
|
||||
self.LoadUI();
|
||||
</method>
|
||||
<method name="LoadUI">
|
||||
<![CDATA[
|
||||
self.loadingfilter=true;
|
||||
var filters=self.filters=editor.GetHtmlFilterList();
|
||||
|
||||
var html=editor.GetHtmlCode();
|
||||
var nodes=editor.ParseHtmlCode(html);
|
||||
|
||||
var ver=editor.GetFrameVersion();
|
||||
|
||||
var index=-1;
|
||||
function NextFilter()
|
||||
{
|
||||
if(self._jsml_disposed)
|
||||
return;
|
||||
if(ver!=editor.GetFrameVersion())
|
||||
return;
|
||||
|
||||
index++;
|
||||
var filter=filters[index];
|
||||
if(!filter)
|
||||
{
|
||||
jsml.suppend_layout();
|
||||
scaninfo.set_text("")
|
||||
self.FillFilters();
|
||||
jsml.resume_layout();
|
||||
self.loadingfilter=false;
|
||||
return;
|
||||
}
|
||||
setTimeout(NextFilter,10);
|
||||
|
||||
scaninfo.set_text(filter.LangText+".."+Math.floor(100*(index+1)/filters.length)+"%")
|
||||
|
||||
filter={Filter:filter}
|
||||
filters[index]=filter;
|
||||
|
||||
if(filter.Filter.ParamType=="NodeArray")
|
||||
filter.IsMatch=filter.Filter.Match(nodes)
|
||||
else
|
||||
filter.IsMatch=filter.Filter.Match(html)
|
||||
}
|
||||
|
||||
scaninfo.set_text("Loading...")
|
||||
setTimeout(NextFilter,10);
|
||||
|
||||
setTimeout(function()
|
||||
{
|
||||
btnundo.set_disabled(!editor.CanExecCommand("undo"));
|
||||
btnredo.set_disabled(!editor.CanExecCommand("redo"));
|
||||
},200);
|
||||
|
||||
]]>
|
||||
</method>
|
||||
<method name="FillFilters">
|
||||
<![CDATA[
|
||||
|
||||
var matchcount=0;
|
||||
|
||||
for(var i=0;i<self.filters.length;i++)
|
||||
{
|
||||
var filter=self.filters[i];
|
||||
|
||||
var list=filter.IsMatch?enablelist:disablelist;
|
||||
var item=jsml.class_create_instance("cleancode_item");
|
||||
item.bind_item(filter);
|
||||
list.append_child(item);
|
||||
if(filter.IsMatch)matchcount++;
|
||||
}
|
||||
|
||||
if(matchcount==0)
|
||||
{
|
||||
var label=jsml.class_create_instance("label");
|
||||
label.set_text(editor.GetLangText("msg_cleancode_nomatches"));
|
||||
label.set_vertical_align("middle");
|
||||
label.set_padding([0,0,0,5]);
|
||||
label._estyle.fontWeight="bold";
|
||||
//label.set_margin([0,0,12,0]);
|
||||
label.set_dock("fill");
|
||||
enablelist.append_child(label);
|
||||
}
|
||||
|
||||
|
||||
]]>
|
||||
</method>
|
||||
<method name="DoUndo">
|
||||
editor.ExecCommand("undo");
|
||||
self.ReloadUI();
|
||||
</method>
|
||||
<method name="DoRedo">
|
||||
editor.ExecCommand("redo");
|
||||
self.ReloadUI();
|
||||
</method>
|
||||
|
||||
<method name="DoExecute">
|
||||
<![CDATA[
|
||||
|
||||
if(self.loadingfilter)
|
||||
return;
|
||||
|
||||
var arr1=[];
|
||||
var arr2=[];
|
||||
|
||||
|
||||
var tags=specifytags.get_text().split(' ').join(',').split(',');
|
||||
for(var i=0;i<tags.length;i++)
|
||||
{
|
||||
var tag=tags[i].replace(/(^\s+)|(\s+$)/g,'');
|
||||
if(!tag)
|
||||
{
|
||||
tags.splice(i,1);
|
||||
i--;
|
||||
}
|
||||
else
|
||||
{
|
||||
tags[i]=tag;
|
||||
}
|
||||
}
|
||||
if(tags.length)
|
||||
{
|
||||
var rtf=editor.CreateRemoveTagsFilter(tags);
|
||||
arr1.push({Filter:rtf,IsChecked:1});
|
||||
}
|
||||
|
||||
for(var i=0;i<self.filters.length;i++)
|
||||
{
|
||||
var filter=self.filters[i];
|
||||
if(!filter.IsChecked)continue;
|
||||
if(filter.Filter.ParamType=="NodeArray")
|
||||
arr1.push(filter);
|
||||
else
|
||||
arr2.push(filter);
|
||||
}
|
||||
|
||||
|
||||
var html=editor.GetHtmlCode();
|
||||
if(arr2.length)
|
||||
{
|
||||
for(var i=0;i<arr2.length;i++)
|
||||
html=arr2[i].Filter.Filter(html);
|
||||
}
|
||||
if(arr1.length)
|
||||
{
|
||||
var nodes=editor.ParseHtmlCode(html);
|
||||
for(var i=0;i<arr1.length;i++)
|
||||
nodes=arr1[i].Filter.Filter(nodes);
|
||||
var sb=[]
|
||||
for(var i=0;i<nodes.length;i++)
|
||||
sb.push(nodes[i].GetHtmlCode());
|
||||
html=sb.join("");
|
||||
}
|
||||
editor.SetHtmlCode(html);
|
||||
|
||||
self.ReloadUI();
|
||||
|
||||
]]>
|
||||
</method>
|
||||
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="cleancode_dialog" />
|
||||
|
||||
<execute>
|
||||
dialog.set_title(editor.GetLangText("cleancode"));
|
||||
</execute>
|
||||
|
||||
</jsml>
|
||||
152
LPWeb20/RichtextEditor/dialogs/colorpicker.xml
Normal file
@@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<panel jsml-class="colorpickericon" dock="flow" width="16" height="16" margin="2" border_color="transparent" border_width="1" cursor="pointer">
|
||||
<panel jsml-member="inner" dock="fill" border_color="gray" border_width="1" back_color="black" />
|
||||
</panel>
|
||||
|
||||
<panel jsml-class="colorpickeritem" dock="flow" width="16" height="16" margin="2" border_color="transparent" border_width="1" cursor="pointer">
|
||||
<panel jsml-member="inner" dock="fill" border_color="gray" border_width="1" />
|
||||
<property name="value">
|
||||
<get>
|
||||
return self.inner.get_back_color();
|
||||
</get>
|
||||
<set>
|
||||
self.inner.set_back_color(value);
|
||||
</set>
|
||||
</property>
|
||||
<method name="setup_preview" arguments="html,cmd">
|
||||
self._previewhtml=html;
|
||||
self._previewcmd=cmd;
|
||||
self._previewstyle=(cmd=="forecolor"?"color":"background-color");
|
||||
</method>
|
||||
<attach name="mousehover" arguments="je,e">
|
||||
<![CDATA[
|
||||
self.set_border_color('orange');
|
||||
|
||||
self._hovered=true;
|
||||
if(!self._previewhtml)return;
|
||||
if(self.currentdialog&&self.currentdialog.get_visible())
|
||||
return;
|
||||
|
||||
var newoption={control:self,floatMode:'b-r',stopToggle:true,stopOverlay:true};
|
||||
newoption.buttonClick=function()
|
||||
{
|
||||
self.invoke_event("click");
|
||||
}
|
||||
var dialog=jsml.class_create_instance("floatbox");
|
||||
var htmlc=jsml.class_create_instance("htmlcontrol");
|
||||
htmlc.set_html("<pre style='margin:0px;padding:0px;font-weight:bold;'>Preview for color : "+self.get_value()+"</pre><pre style='padding:5px;"+self._previewstyle+":"+self.get_value()+"'>"+self._previewhtml+"</pre>");
|
||||
htmlc.set_dock("fill");
|
||||
var gbr=jsml.get_body_rect();
|
||||
htmlc.set_max_width(Math.floor(gbr.width*0.6));
|
||||
htmlc.set_max_height(Math.floor(gbr.height*0.3));
|
||||
htmlc.set_vertical_align("middle");
|
||||
dialog.append_child(htmlc);
|
||||
dialog.set_width(240);
|
||||
dialog.set_padding(12);
|
||||
dialog._estyle.zIndex=editor._config.dialog_zindex;
|
||||
dialog.show(newoption);
|
||||
self.currentdialog=dialog;
|
||||
]]>
|
||||
</attach>
|
||||
<attach name="mouseleave">
|
||||
<![CDATA[
|
||||
self.set_border_color('transparent');
|
||||
|
||||
self._hovered=false;
|
||||
setTimeout(function()
|
||||
{
|
||||
if(self._hovered)return;
|
||||
if(self.currentdialog&&self.currentdialog.get_visible())
|
||||
{
|
||||
self.currentdialog.close();
|
||||
}
|
||||
},11);
|
||||
]]>
|
||||
</attach>
|
||||
<attach name="click">
|
||||
dialog.close();
|
||||
option.setcolor(self.get_value());
|
||||
</attach>
|
||||
</panel>
|
||||
|
||||
|
||||
|
||||
<panel jsml-class="colorpickerpanel" dock="fill" padding="6" width="186" overflow="visible">
|
||||
|
||||
<panel jsml-base="panelbutton" dock="top" margin="2,2,2,2" padding="0,3,0,3">
|
||||
<panel jsml-base="colorpickericon" dock="left"/>
|
||||
<label dock="fill" text="@automatic" cursor="pointer" vertical_align="middle" horizontal_align="center"/>
|
||||
<attach name="click">
|
||||
dialog.close();
|
||||
option.setcolor("");
|
||||
</attach>
|
||||
</panel>
|
||||
<panel jsml-base="panelbutton" dock="bottom" margin="2,2,2,2" padding="0,3,0,3">
|
||||
<panel jsml-base="colorpickericon" dock="left"/>
|
||||
<label dock="fill" text="@MoreColors" cursor="pointer" vertical_align="middle" horizontal_align="center" />
|
||||
<attach name="click">
|
||||
<![CDATA[
|
||||
dialog.close();
|
||||
var newoption={}
|
||||
newoption.width=510;
|
||||
newoption.height=460;
|
||||
newoption.callback=function(val)
|
||||
{
|
||||
if(!val)return;
|
||||
option.setcolor(val);
|
||||
}
|
||||
editor.ShowXmlDialog("{folder}server/colorpicker.xml",newoption);
|
||||
]]>
|
||||
</attach>
|
||||
</panel>
|
||||
<panel jsml-local="arraypanel" padding="6" dock="fill" overflow="visible">
|
||||
</panel>
|
||||
|
||||
<initialize>
|
||||
<![CDATA[
|
||||
var type=String(option.command).toLowerCase();
|
||||
var arr=editor._config.colorpicker_othercolor;
|
||||
switch(type)
|
||||
{
|
||||
case "forecolor":
|
||||
arr=editor._config.colorpicker_forecolor;
|
||||
if(option.preview&&!editor._config.preview_disabletooltip&&!editor._config.preview_disableforecolor)
|
||||
{
|
||||
self._previewcmd="forecolor";
|
||||
self._previewhtml=editor.GetRangePreviewHTML("forecolor");
|
||||
}
|
||||
break;
|
||||
case "backcolor":
|
||||
arr=editor._config.colorpicker_backcolor;
|
||||
if(option.preview&&!editor._config.preview_disabletooltip&&!editor._config.preview_disablebackcolor)
|
||||
{
|
||||
self._previewcmd="backcolor";
|
||||
self._previewhtml=editor.GetRangePreviewHTML("backcolor");
|
||||
}
|
||||
break;
|
||||
}
|
||||
for(var i=0;i<arr.length;i++)
|
||||
{
|
||||
var item=jsml.class_create_instance("colorpickeritem");
|
||||
if(self._previewhtml)
|
||||
item.setup_preview(self._previewhtml,self._previewcmd);
|
||||
else
|
||||
item.set_tooltip(arr[i])
|
||||
item.set_value(arr[i]);
|
||||
arraypanel.append_child(item);
|
||||
}
|
||||
]]>
|
||||
</initialize>
|
||||
|
||||
<attach name="keydown" arguments="je,e">
|
||||
if(e.keyCode==27)dialog.close();
|
||||
</attach>
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="colorpickerpanel" />
|
||||
|
||||
|
||||
</jsml>
|
||||
173
LPWeb20/RichtextEditor/dialogs/editor_paste.xml
Normal file
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<execute>
|
||||
dialog.set_title("Paste")
|
||||
</execute>
|
||||
|
||||
<panel dock="fill" margin="6" padding="6" jsml-class="pastedialog" >
|
||||
|
||||
<label dock="top" jsml-local="labeltitle" text="@PASTETITLE" />
|
||||
|
||||
<panel jsml-local="keeplinepanel" right="0" overflow="visible" padding="0,6,0,0">
|
||||
<checkbox dock="left" jsml-local="cbkeepline" checked="1" />
|
||||
<label dock="fill" text="@keeplinebreaks" vertical_align="middle"/>
|
||||
</panel>
|
||||
|
||||
<panel dock="bottom" margin="3" padding="6" overflow="visible">
|
||||
|
||||
<panel dock="top" height="20" margin="0,0,6,0">
|
||||
<label dock="right" text="@closeafterpaste" text_color="gray" vertical_align="middle" />
|
||||
<checkbox dock="right" width="20" jsml-local="checkbox" checked="true">
|
||||
<attach name="click">
|
||||
instance._focustodiv();
|
||||
</attach>
|
||||
</checkbox>
|
||||
</panel>
|
||||
|
||||
<panel dock="right" margin="3" overflow="visible">
|
||||
<button dock="left" width="82" height="24" text="OK" margin="0,12,0,0">
|
||||
<attach name="click">
|
||||
instance._tryreturn();
|
||||
</attach>
|
||||
</button>
|
||||
<button dock="left" width="82" height="24" text="Cancel">
|
||||
<attach name="click">
|
||||
dialog.close();
|
||||
</attach>
|
||||
</button>
|
||||
</panel>
|
||||
|
||||
</panel>
|
||||
|
||||
<panel dock="fill" margin="6" padding="6" border_width="1" border_color="#cccccc" border_style="solid" cursor="text">
|
||||
<htmlcontrol jsml-local="thectrl" dock="fill" css_text="normal 11px Arial">
|
||||
|
||||
</htmlcontrol>
|
||||
</panel>
|
||||
|
||||
<initialize>
|
||||
<![CDATA[
|
||||
|
||||
if(option.command=="pasteword")
|
||||
labeltitle.set_text(editor.GetLangText("pastewordtitle"));
|
||||
else if(option.command=="pastetext")
|
||||
labeltitle.set_text(editor.GetLangText("pastetexttitle"));
|
||||
else
|
||||
labeltitle.set_text(editor.GetLangText("pastetitle"));
|
||||
|
||||
self._thediv=document.createElement(option.puretextmode?"TEXTAREA":"DIV");
|
||||
self._thediv.style.resize="none";
|
||||
thectrl._content.appendChild(self._thediv);
|
||||
if(!option.puretextmode)
|
||||
{
|
||||
self._thediv.setAttribute("contenteditable","true")
|
||||
self._thediv.contentEditable=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
self._thediv.onkeyup=self.delegate(self._thedivkeyup);
|
||||
}
|
||||
|
||||
if(window._rtecliphtml)
|
||||
self._thediv.innerHTML=window._rtecliphtml;
|
||||
|
||||
if(option.command!="pastetext")
|
||||
keeplinepanel.set_visible(false);
|
||||
self._thediv.style.outline="none";
|
||||
self._thediv.style.borderWidth="0px";
|
||||
self._setdivsize();
|
||||
setTimeout(function()
|
||||
{
|
||||
self._setdivsize();
|
||||
self._focustodiv();
|
||||
},123);
|
||||
]]>
|
||||
</initialize>
|
||||
<attach name="disposing">
|
||||
self._thediv.onkeyup=null;
|
||||
</attach>
|
||||
<method name="_focustodiv">
|
||||
<![CDATA[
|
||||
window.focus();
|
||||
self._thediv.focus();
|
||||
if(!option.puretextmode)
|
||||
{
|
||||
editor._browserSetPointInside(window,self._thediv,0);
|
||||
}
|
||||
]]>
|
||||
</method>
|
||||
<method name="_setdivsize">
|
||||
<![CDATA[
|
||||
var w=thectrl.get_client_width()-6;
|
||||
var h=thectrl.get_client_height()-6;
|
||||
if(w<10)w=10;
|
||||
if(h<10)h=10;
|
||||
self._thediv.style.width=w+"px";
|
||||
self._thediv.style.height=h+"px";
|
||||
]]>
|
||||
</method>
|
||||
<attach name="resize">
|
||||
self._setdivsize();
|
||||
</attach>
|
||||
|
||||
<method name="_tryreturn">
|
||||
<![CDATA[
|
||||
var html=self._thediv.innerHTML;
|
||||
if(option.command=="pastehtml")
|
||||
{
|
||||
html=self._thediv.value;
|
||||
}
|
||||
if(option.command=="pastetext")
|
||||
{
|
||||
var tabhtc=editor._config.pastetext_tabspaces;
|
||||
var usepre=editor._config.pastetext_whitespace;
|
||||
if(usepre=='auto')usepre=jsml.html5;
|
||||
|
||||
var lines=self._thediv.value.split('\r').join('').split('\n');
|
||||
for(var i=0;i<lines.length;i++)
|
||||
{
|
||||
var code=lines[i];
|
||||
code=code.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\x22/g,""").replace(/\x27/g,"'");
|
||||
if(usepre&&code.indexOf('\t')!=-1)
|
||||
code="<span style='white-space:pre'>"+code+"</span>";
|
||||
else
|
||||
code=code.split('\t').join(tabhtc).replace(/\s/g," ");
|
||||
lines[i]=code;
|
||||
}
|
||||
if(cbkeepline.get_checked())
|
||||
html=lines.join("<br/>");
|
||||
else
|
||||
html=lines.join(" ");
|
||||
}
|
||||
if(html.length==0)return;
|
||||
dialog.result=html;
|
||||
dialog.close();
|
||||
]]>
|
||||
</method>
|
||||
<attach name="keydown,divkeyup" arguments="je,e">
|
||||
<![CDATA[
|
||||
if(e.keyCode==27)
|
||||
{
|
||||
dialog.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if(e.ctrlKey&&e.keyCode==86)
|
||||
{
|
||||
if(checkbox.get_checked())
|
||||
{
|
||||
setTimeout(self.delegate(self._tryreturn),100);
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</attach>
|
||||
<method name="_thedivkeyup" arguments="e">
|
||||
self.invoke_event("divkeyup",e||window.event);
|
||||
</method>
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="pastedialog" width="360" height="240" />
|
||||
|
||||
</jsml>
|
||||
173
LPWeb20/RichtextEditor/dialogs/findandreplace.xml
Normal file
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
|
||||
<panel jsml-class="findandreplace_dialog" dock="fill" margin="0" padding="15" overflow="visible" back_color="#F9F9F9">
|
||||
|
||||
<panel dock="left" overflow="visible">
|
||||
<panel dock="top" margin="3,0,5,0">
|
||||
<label dock="left" text="@FINDWHAT" vertical_align="middle" />
|
||||
<textbox jsml-local="tbfind" dock="fill" width="150" border_color="#ABADB3">
|
||||
<initialize>
|
||||
self._input.style.textIndent="2px";
|
||||
</initialize>
|
||||
<attach name="enterkey">
|
||||
instance.DoFind();
|
||||
</attach>
|
||||
</textbox>
|
||||
</panel>
|
||||
<panel dock="top" margin="3,0,5,0">
|
||||
<label dock="left" text="@REPLACEWITH" vertical_align="middle" />
|
||||
<textbox jsml-local="tbreplace" dock="fill" width="150" border_color="#ABADB3">
|
||||
<initialize>
|
||||
self._input.style.textIndent="2px";
|
||||
</initialize>
|
||||
</textbox>
|
||||
</panel>
|
||||
<panel dock="top" margin="5,0,0,80">
|
||||
<checkbox jsml-local="cbcase" top="1" />
|
||||
<label left="24" vertical_align="middle" text="@MATCHCASE" />
|
||||
</panel>
|
||||
<panel dock="top" margin="5,0,0,80">
|
||||
<checkbox jsml-local="cbword" top="1" />
|
||||
<label left="24" vertical_align="middle" text="@MATCHWORD" />
|
||||
</panel>
|
||||
</panel>
|
||||
<panel dock="right" overflow="visible">
|
||||
<panel overflow="visible">
|
||||
<button dock="top" height="24" width="90" margin="3" text="@FIND">
|
||||
<attach name="click">
|
||||
instance.DoFind();
|
||||
</attach>
|
||||
</button>
|
||||
<button dock="top" height="24" width="90" margin="3" text="@REPLACE">
|
||||
<attach name="click">
|
||||
instance.DoReplace();
|
||||
</attach>
|
||||
</button>
|
||||
<button dock="top" height="24" width="90" margin="3" text="@REPLACEALL">
|
||||
<attach name="click">
|
||||
instance.DoReplaceAll();
|
||||
</attach>
|
||||
</button>
|
||||
<button dock="top" height="24" width="90" margin="3" text="@CLOSE">
|
||||
<attach name="click">
|
||||
dialog.close();
|
||||
</attach>
|
||||
</button>
|
||||
</panel>
|
||||
</panel>
|
||||
<initialize>
|
||||
<![CDATA[
|
||||
setTimeout(function()
|
||||
{
|
||||
tbfind.focus();
|
||||
},100);
|
||||
]]>
|
||||
</initialize>
|
||||
<attach name="keydown" arguments="je,e">
|
||||
if(e.keyCode==27)dialog.close();
|
||||
</attach>
|
||||
<method name="GetSelectedText">
|
||||
return jsml.html_decode(editor.GetRangePreviewHTML());
|
||||
</method>
|
||||
<initialize>
|
||||
<![CDATA[
|
||||
var seltext=self.GetSelectedText();
|
||||
if(seltext)
|
||||
{
|
||||
tbfind.set_text(seltext);
|
||||
}
|
||||
]]>
|
||||
</initialize>
|
||||
<method name="DoFind">
|
||||
<![CDATA[
|
||||
var text=tbfind.get_text();
|
||||
if(!text)
|
||||
return false;
|
||||
if(!self.FindNext())
|
||||
{
|
||||
alert(editor.GetLangText("msg_nofindmatch"));
|
||||
}
|
||||
editor.Focus();
|
||||
]]>
|
||||
</method>
|
||||
<method name="FindNext" arguments="dontmovetostart">
|
||||
<![CDATA[
|
||||
var text=tbfind.get_text();
|
||||
if(!text)
|
||||
return false;
|
||||
if(editor.GetSelectionType()=="Point"||editor.GetSelectionType()=="Range")
|
||||
{
|
||||
if(editor.FindNextText(text,cbcase.get_checked(),cbword.get_checked()))
|
||||
return true;
|
||||
}
|
||||
if(dontmovetostart)
|
||||
return false;
|
||||
editor.MoveToDocumentBegin();
|
||||
return editor.FindNextText(text,cbcase.get_checked(),cbword.get_checked());
|
||||
]]>
|
||||
</method>
|
||||
<method name="DoReplace">
|
||||
<![CDATA[
|
||||
var text=tbfind.get_text();
|
||||
if(!text)
|
||||
return;
|
||||
var txtreplace=tbreplace.get_text();
|
||||
if(!txtreplace)
|
||||
return;
|
||||
|
||||
var seltext=self.GetSelectedText();
|
||||
|
||||
if(!seltext||text.toLowerCase()!=seltext.toLowerCase())
|
||||
{
|
||||
if(!self.FindNext())
|
||||
{
|
||||
alert(editor.GetLangText("msg_nofindmatch"));
|
||||
}
|
||||
editor.Focus();
|
||||
return;
|
||||
}
|
||||
|
||||
self.replacedcount=1+(self.replacedcount||0)
|
||||
editor.DeleteSelection();
|
||||
editor.InsertHTML(jsml.html_encode(txtreplace));
|
||||
if(!self.FindNext())
|
||||
{
|
||||
alert(editor.GetLangText("msg_finishreplace"));
|
||||
}
|
||||
]]>
|
||||
</method>
|
||||
<method name="DoReplaceAll">
|
||||
<![CDATA[
|
||||
var text=tbfind.get_text();
|
||||
if(!text)
|
||||
return;
|
||||
var txtreplace=tbreplace.get_text();
|
||||
if(!txtreplace)
|
||||
return;
|
||||
|
||||
editor.MoveToDocumentBegin();
|
||||
var count=0;
|
||||
while(self.FindNext(true))
|
||||
{
|
||||
editor.DeleteSelection();
|
||||
editor.InsertHTML(jsml.html_encode(txtreplace))
|
||||
editor.RangeSyncToDom(true);
|
||||
count++;
|
||||
}
|
||||
alert(editor.GetLangText("msg_replaceall",count));
|
||||
editor.Focus();
|
||||
]]>
|
||||
</method>
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="findandreplace_dialog" />
|
||||
|
||||
<execute>
|
||||
dialog.set_title(editor.GetLangText("FINDANDREPLACE"));
|
||||
</execute>
|
||||
|
||||
|
||||
</jsml>
|
||||
155
LPWeb20/RichtextEditor/dialogs/foldertree.xml
Normal file
@@ -0,0 +1,155 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<panel jsml-class="foldertreenode" dock="top" height="10" overflow="visible">
|
||||
<panel dock="top" height="10" overflow="visible" cursor="pointer">
|
||||
<image dock="left" jsml-local="image" width="18" height="18" overflow="none" vertical_align="middle" padding="-1,-2,1,2"/>
|
||||
<label dock="fill" jsml-local="label" text="Loading.." cursor="pointer" vertical_align="middle" margin="0,0,0,2" />
|
||||
<attach name="mousehover">
|
||||
<![CDATA[
|
||||
if(instance.invalidnode)return;
|
||||
if(self.isselected)
|
||||
self.set_back_color('#cccccc');
|
||||
else
|
||||
self.set_back_color('#eeeeee');
|
||||
]]>
|
||||
</attach>
|
||||
<attach name="mouseleave">
|
||||
<![CDATA[
|
||||
if(instance.invalidnode)return;
|
||||
if(self.isselected)
|
||||
self.set_back_color('#eeeeee');
|
||||
else
|
||||
self.set_back_color('');
|
||||
]]>
|
||||
</attach>
|
||||
<attach name="mousedown">
|
||||
<![CDATA[
|
||||
if(instance.invalidnode)return;
|
||||
if(option.quickselect)
|
||||
{
|
||||
option.quickselect(instance._item.UrlPath);
|
||||
dialog.close();
|
||||
return;
|
||||
}
|
||||
if(dialog.selectedtreenode)dialog.selectedtreenode.set_selected(false);
|
||||
dialog.selectedtreenode=self;
|
||||
dialog.selectedpath=instance._item.UrlPath;
|
||||
self.set_selected(true);
|
||||
self.set_back_color('#cccccc');
|
||||
dialog.okbutton.set_disabled(false);
|
||||
|
||||
]]>
|
||||
</attach>
|
||||
<property name="selected">
|
||||
<get>
|
||||
return self.isselected;
|
||||
</get>
|
||||
<set>
|
||||
<![CDATA[
|
||||
self.isselected=value;
|
||||
if(self.isselected)
|
||||
self.set_back_color('#eeeeee');
|
||||
else
|
||||
self.set_back_color('');
|
||||
]]>
|
||||
</set>
|
||||
</property>
|
||||
</panel>
|
||||
<panel dock="fill" jsml-local="panel" height="10" overflow="visible" visible="false" margin="0,0,0,21">
|
||||
</panel>
|
||||
<method name="bind_item" arguments="item">
|
||||
<![CDATA[
|
||||
self._item=item;
|
||||
label.set_text(item.Name);
|
||||
|
||||
if(!option.quickselect && item.UrlPath==option.folder)
|
||||
{
|
||||
self.invalidnode="same";
|
||||
}
|
||||
if(item.Parent&&item.Parent.UrlPath==option.folder)
|
||||
{
|
||||
var arr=option.items;
|
||||
for(var i=0;i<arr.length;i++)
|
||||
if(arr[i]==item.Name)
|
||||
self.invalidnode="invalid";
|
||||
}
|
||||
|
||||
if(self.invalidnode)
|
||||
{
|
||||
label.set_text_color("#999999");
|
||||
}
|
||||
|
||||
if(self.invalidnode=="invalid"||!item.SubNodes||!item.SubNodes.length)
|
||||
{
|
||||
image.set_src("{folder}images/closedfolder.gif");
|
||||
return;
|
||||
}
|
||||
image.set_src("{folder}images/openfolder.png");
|
||||
|
||||
for(var i=0;i<item.SubNodes.length;i++)
|
||||
{
|
||||
var subctrl=jsml.new_foldertreenode();
|
||||
var subitem=item.SubNodes[i];
|
||||
subitem.Parent=item;
|
||||
subitem.UrlPath=item.UrlPath+subitem.Name+"/";
|
||||
subctrl.bind_item(subitem);
|
||||
panel.append_child(subctrl);
|
||||
}
|
||||
panel.set_visible(true);
|
||||
]]>
|
||||
</method>
|
||||
</panel>
|
||||
|
||||
<panel jsml-class="foldertreedialog" dock="fill" back_color="white" overflow="visible" max_width="480" max_height="420">
|
||||
<panel dock="bottom" jsml-local="bottompanel" margin="3" padding="6" overflow="visible">
|
||||
<panel dock="right" margin="3" overflow="visible">
|
||||
<button dock="left" width="82" height="24" text="OK" margin="0,12,0,0" disabled="true">
|
||||
<initialize>
|
||||
dialog.okbutton=self;
|
||||
</initialize>
|
||||
<attach name="click">
|
||||
dialog.result=dialog.selectedpath;
|
||||
dialog.close();
|
||||
</attach>
|
||||
</button>
|
||||
<button dock="left" width="82" height="24" text="Cancel">
|
||||
<attach name="click">
|
||||
dialog.close();
|
||||
</attach>
|
||||
</button>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel jsml-local="rootpanel" jsml-base="foldertreenode" dock="fill" overflow_y="scroll" margin="9" padding="0,12,0,0" />
|
||||
<initialize>
|
||||
<![CDATA[
|
||||
editor.CallAjax("AjaxGetFolderNodes",self.delegate(self.handlegetfolders),option.storage);
|
||||
if(option.quickselect)
|
||||
{
|
||||
bottompanel.set_visible(false);
|
||||
self.set_width(210);
|
||||
self.set_height(150);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.set_width(360);
|
||||
self.set_height(240);
|
||||
}
|
||||
]]>
|
||||
</initialize>
|
||||
<method name="handlegetfolders" arguments="res">
|
||||
jsml.suppend_layout();
|
||||
rootpanel.bind_item({Name:"/",UrlPath:"/",SubNodes:res.ReturnValue});
|
||||
jsml.resume_layout();
|
||||
</method>
|
||||
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="foldertreedialog">
|
||||
<initialize>
|
||||
dialog.set_title("select folder..");
|
||||
</initialize>
|
||||
</panel>
|
||||
|
||||
</jsml>
|
||||
24
LPWeb20/RichtextEditor/dialogs/htmlpreview.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<execute>
|
||||
if(!dialog.get_title())dialog.set_title(editor.GetLangText("preview"));
|
||||
</execute>
|
||||
|
||||
<panel jsml-class="htmlpreview_dialog" dock="fill" overflow="visible" vertical_align="middle" horizontal_align="center">
|
||||
<htmlcontrol overflow="visible">
|
||||
<initialize>
|
||||
self._content.innerHTML=option.htmlcode;
|
||||
self.invoke_notify_content();
|
||||
</initialize>
|
||||
</htmlcontrol>
|
||||
<attach name="keydown" arguments="je,e">
|
||||
if(e.keyCode==27)dialog.close();
|
||||
</attach>
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="htmlpreview_dialog" />
|
||||
|
||||
|
||||
</jsml>
|
||||
64
LPWeb20/RichtextEditor/dialogs/imageeditor.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jsml xmlns="http://cutesoft.net/jsml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
|
||||
|
||||
<execute>
|
||||
dialog.set_title(editor.GetLangText("imageeditor"));
|
||||
</execute>
|
||||
|
||||
<panel jsml-class="imageeditor_dialog" dock="fill" overflow="visible">
|
||||
<htmlcontrol dock="fill" jsml-local="hc">
|
||||
</htmlcontrol>
|
||||
<attach name="attach_dom">
|
||||
<![CDATA[
|
||||
setTimeout(function()
|
||||
{
|
||||
if(self.iframe)return;
|
||||
|
||||
window.rteimageeditoreditor=editor;
|
||||
window.rteimageeditordialog=dialog;
|
||||
window.rteimageeditoroption=option;
|
||||
|
||||
dialog.attach_event("closing",function()
|
||||
{
|
||||
window.rteimageeditoreditor=null;
|
||||
window.rteimageeditordialog=null;
|
||||
window.rteimageeditoroption=null;
|
||||
});
|
||||
|
||||
var iframe=document.createElement("IFRAME");
|
||||
var canvas=document.createElement("CANVAS");
|
||||
if(canvas.getContext)
|
||||
iframe.setAttribute("src","{folder}rtepaint5/dialog.htm?{timems}");
|
||||
else if(editor._config.servertype=="AspNet")
|
||||
iframe.setAttribute("src","{folder}rtepaint4/dialog.htm?{timems}");
|
||||
else
|
||||
return alert("Require HTML5 browser")+":"+dialog.close();
|
||||
iframe.setAttribute("frameBorder","0");
|
||||
hc._content.appendChild(iframe);
|
||||
self.iframe=iframe;
|
||||
self.invoke_event("resize");
|
||||
},10);
|
||||
]]>
|
||||
</attach>
|
||||
<attach name="disposing">
|
||||
if(!self.iframe)return;
|
||||
var win=self.iframe.contentWindow;
|
||||
if(!win)return;
|
||||
var doc=win.document;
|
||||
if(!doc)return;
|
||||
doc.open("text/html");
|
||||
doc.write("empty");
|
||||
doc.close();
|
||||
</attach>
|
||||
<attach name="resize">
|
||||
if(!self.iframe)return;
|
||||
self.iframe.style.width=hc.get_client_width()+"px";
|
||||
self.iframe.style.height=hc.get_client_height()+"px";
|
||||
</attach>
|
||||
</panel>
|
||||
|
||||
<panel jsml-base="imageeditor_dialog" />
|
||||
|
||||
|
||||
</jsml>
|
||||
BIN
LPWeb20/RichtextEditor/dialogs/images/document.gif
Normal file
|
After Width: | Height: | Size: 95 B |
BIN
LPWeb20/RichtextEditor/dialogs/images/dot_ring.png
Normal file
|
After Width: | Height: | Size: 217 B |
BIN
LPWeb20/RichtextEditor/dialogs/images/insert_table_bg1.png
Normal file
|
After Width: | Height: | Size: 333 B |
BIN
LPWeb20/RichtextEditor/dialogs/images/insert_table_bg2.png
Normal file
|
After Width: | Height: | Size: 334 B |
BIN
LPWeb20/RichtextEditor/dialogs/images/tree_closed.gif
Normal file
|
After Width: | Height: | Size: 82 B |