Initial commit

This commit is contained in:
Ben Ramey
2015-11-12 19:58:50 -06:00
commit 4eb7f46e4c
86 changed files with 4341 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
/***********************************************
* Admin textbox button styles for: friendshiptours.org
* Author: Benjamin Ramey
* E-mail: ben.ramey@gmail.com
* Created: Tue Feb 12 16:40:04 CST 2008
***********************************************/
$(function() {
//
// Bold button
//
$("#bold_btn").click(function() {
var textBox = document.getElementById('text');
// get the selected text
var selectedText = (textBox.value).substring(textBox.selectionStart,textBox.selectionEnd);
if(selectedText.length > 0)
{
var boldText = "[b]"+selectedText+"[/b]";
textBox.value = (textBox.value).replace(selectedText,boldText);
}
});
//
// Italics button
//
$("#italics_btn").click(function() {
var textBox = document.getElementById('text');
// get the selected text
var selectedText = (textBox.value).substring(textBox.selectionStart,textBox.selectionEnd);
if(selectedText.length > 0)
{
var italicsText = "[i]"+selectedText+"[/i]";
textBox.value = (textBox.value).replace(selectedText,italicsText);
}
});
//
// Link button
//
$("#link_btn").click(function() {
var textBox = document.getElementById('text');
// get the selected text
var selectedText = (textBox.value).substring(textBox.selectionStart,textBox.selectionEnd);
if(selectedText.length > 0)
{
var linkHref = new String();
while((linkHref = prompt("Please enter the URL for this link:")).length <= 0)
;
if(linkHref.length > 0)
{
var italicsText = "[link href="+linkHref+"]"+selectedText+"[/link]";
textBox.value = (textBox.value).replace(selectedText,italicsText);
}
}
});
});