Version 3.2.3
No files matched your search
@@ -0,0 +1,222 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'a11yHelp', function( editor )
|
||||
{
|
||||
var lang = editor.lang.accessibilityHelp,
|
||||
id = CKEDITOR.tools.getNextId();
|
||||
|
||||
// CharCode <-> KeyChar.
|
||||
var keyMap =
|
||||
{
|
||||
8 : "BACKSPACE",
|
||||
9 : "TAB" ,
|
||||
13 : "ENTER" ,
|
||||
16 : "SHIFT" ,
|
||||
17 : "CTRL" ,
|
||||
18 : "ALT" ,
|
||||
19 : "PAUSE" ,
|
||||
20 : "CAPSLOCK" ,
|
||||
27 : "ESCAPE" ,
|
||||
33 : "PAGE UP" ,
|
||||
34 : "PAGE DOWN" ,
|
||||
35 : "END" ,
|
||||
36 : "HOME" ,
|
||||
37 : "LEFT ARROW" ,
|
||||
38 : "UP ARROW" ,
|
||||
39 : "RIGHT ARROW" ,
|
||||
40 : "DOWN ARROW" ,
|
||||
45 : "INSERT" ,
|
||||
46 : "DELETE" ,
|
||||
91 : "LEFT WINDOW KEY" ,
|
||||
92 : "RIGHT WINDOW KEY" ,
|
||||
93 : "SELECT KEY" ,
|
||||
96 : "NUMPAD 0" ,
|
||||
97 : "NUMPAD 1" ,
|
||||
98 : "NUMPAD 2" ,
|
||||
99 : "NUMPAD 3" ,
|
||||
100 : "NUMPAD 4" ,
|
||||
101 : "NUMPAD 5" ,
|
||||
102 : "NUMPAD 6" ,
|
||||
103 : "NUMPAD 7" ,
|
||||
104 : "NUMPAD 8" ,
|
||||
105 : "NUMPAD 9" ,
|
||||
106 : "MULTIPLY" ,
|
||||
107 : "ADD" ,
|
||||
109 : "SUBTRACT" ,
|
||||
110 : "DECIMAL POINT" ,
|
||||
111 : "DIVIDE" ,
|
||||
112 : "F1" ,
|
||||
113 : "F2" ,
|
||||
114 : "F3" ,
|
||||
115 : "F4" ,
|
||||
116 : "F5" ,
|
||||
117 : "F6" ,
|
||||
118 : "F7" ,
|
||||
119 : "F8" ,
|
||||
120 : "F9" ,
|
||||
121 : "F10" ,
|
||||
122 : "F11" ,
|
||||
123 : "F12" ,
|
||||
144 : "NUM LOCK" ,
|
||||
145 : "SCROLL LOCK" ,
|
||||
186 : "SEMI-COLON" ,
|
||||
187 : "EQUAL SIGN" ,
|
||||
188 : "COMMA" ,
|
||||
189 : "DASH" ,
|
||||
190 : "PERIOD" ,
|
||||
191 : "FORWARD SLASH" ,
|
||||
192 : "GRAVE ACCENT" ,
|
||||
219 : "OPEN BRACKET" ,
|
||||
220 : "BACK SLASH" ,
|
||||
221 : "CLOSE BRAKET" ,
|
||||
222 : "SINGLE QUOTE"
|
||||
};
|
||||
|
||||
// Modifier keys override.
|
||||
keyMap[ CKEDITOR.ALT ] = 'ALT';
|
||||
keyMap[ CKEDITOR.SHIFT ] = 'SHIFT';
|
||||
keyMap[ CKEDITOR.CTRL ] = 'CTRL';
|
||||
|
||||
// Sort in desc.
|
||||
var modifiers = [ CKEDITOR.ALT, CKEDITOR.SHIFT, CKEDITOR.CTRL ];
|
||||
|
||||
function representKeyStroke( keystroke )
|
||||
{
|
||||
var quotient,
|
||||
modifier,
|
||||
presentation = [];
|
||||
|
||||
for ( var i = 0; i < modifiers.length; i++ )
|
||||
{
|
||||
modifier = modifiers[ i ];
|
||||
quotient = keystroke / modifiers[ i ];
|
||||
if ( quotient > 1 && quotient <= 2 )
|
||||
{
|
||||
keystroke -= modifier;
|
||||
presentation.push( keyMap[ modifier ] );
|
||||
}
|
||||
}
|
||||
|
||||
presentation.push( keyMap[ keystroke ]
|
||||
|| String.fromCharCode( keystroke ) );
|
||||
|
||||
return presentation.join( '+' );
|
||||
}
|
||||
|
||||
var variablesPattern = /\$\{(.*?)\}/g;
|
||||
function replaceVariables( match, name )
|
||||
{
|
||||
var keystrokes = editor.config.keystrokes,
|
||||
definition,
|
||||
length = keystrokes.length;
|
||||
|
||||
for ( var i = 0; i < length; i++ )
|
||||
{
|
||||
definition = keystrokes[ i ];
|
||||
if ( definition[ 1 ] == name )
|
||||
break;
|
||||
}
|
||||
return representKeyStroke( definition[ 0 ] );
|
||||
}
|
||||
|
||||
// Create the help list directly from lang file entries.
|
||||
function buildHelpContents()
|
||||
{
|
||||
var pageTpl = '<div class="cke_accessibility_legend" role="document" aria-labelledby="' + id + '_arialbl" tabIndex="-1">%1</div>' +
|
||||
'<span id="' + id + '_arialbl" class="cke_voice_label">' + lang.contents + ' </span>',
|
||||
sectionTpl = '<h1>%1</h1><dl>%2</dl>',
|
||||
itemTpl = '<dt>%1</dt><dd>%2</dd>';
|
||||
|
||||
var pageHtml = [],
|
||||
sections = lang.legend,
|
||||
sectionLength = sections.length;
|
||||
|
||||
for ( var i = 0; i < sectionLength; i++ )
|
||||
{
|
||||
var section = sections[ i ],
|
||||
sectionHtml = [],
|
||||
items = section.items,
|
||||
itemsLength = items.length;
|
||||
|
||||
for ( var j = 0; j < itemsLength; j++ )
|
||||
{
|
||||
var item = items[ j ],
|
||||
itemHtml;
|
||||
itemHtml = itemTpl.replace( '%1', item.name ).
|
||||
replace( '%2', item.legend.replace( variablesPattern, replaceVariables ) );
|
||||
sectionHtml.push( itemHtml );
|
||||
}
|
||||
|
||||
pageHtml.push( sectionTpl.replace( '%1', section.name ).replace( '%2', sectionHtml.join( '' ) ) );
|
||||
}
|
||||
|
||||
return pageTpl.replace( '%1', pageHtml.join( '' ) );
|
||||
}
|
||||
|
||||
return {
|
||||
title : lang.title,
|
||||
minWidth : 600,
|
||||
minHeight : 400,
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.common.generalTab,
|
||||
expand : true,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
id : 'legends',
|
||||
style : 'white-space:normal;',
|
||||
focus : function() {},
|
||||
html : buildHelpContents() +
|
||||
'<style type="text/css">' +
|
||||
'.cke_accessibility_legend' +
|
||||
'{' +
|
||||
'width:600px;' +
|
||||
'height:400px;' +
|
||||
'padding-right:5px;' +
|
||||
'overflow-y:auto;' +
|
||||
'overflow-x:hidden;' +
|
||||
'}' +
|
||||
// Some adjustments are to be done for IE6 and Quirks to work "properly" (#5757)
|
||||
'.cke_browser_quirks .cke_accessibility_legend,' +
|
||||
'.cke_browser_ie6 .cke_accessibility_legend' +
|
||||
'{' +
|
||||
'height:390px' +
|
||||
'}' +
|
||||
// Override non-wrapping white-space rule in reset css.
|
||||
'.cke_accessibility_legend *' +
|
||||
'{' +
|
||||
'white-space:normal;' +
|
||||
'}' +
|
||||
'.cke_accessibility_legend h1' +
|
||||
'{' +
|
||||
'font-size: 20px;' +
|
||||
'border-bottom: 1px solid #AAA;' +
|
||||
'margin: 5px 0px 15px;' +
|
||||
'}' +
|
||||
'.cke_accessibility_legend dl' +
|
||||
'{' +
|
||||
'margin-left: 5px;' +
|
||||
'}' +
|
||||
'.cke_accessibility_legend dt' +
|
||||
'{' +
|
||||
'font-size: 13px;' +
|
||||
'font-weight: bold;' +
|
||||
'}' +
|
||||
'.cke_accessibility_legend dd' +
|
||||
'{' +
|
||||
'margin:10px' +
|
||||
'}' +
|
||||
'</style>'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
buttons : [ CKEDITOR.dialog.cancelButton ]
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'en',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'Accessibility Instructions',
|
||||
contents : 'Help Contents. To close this dialog press ESC.',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'General',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'Editor Toolbar',
|
||||
legend:
|
||||
'Press ${toolbarFocus} to navigate to the toolbar. ' +
|
||||
'Move to the next and previous toolbar group with TAB and SHIFT-TAB. ' +
|
||||
'Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. ' +
|
||||
'Press SPACE or ENTER to activate the toolbar button.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Dialog',
|
||||
legend :
|
||||
'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. ' +
|
||||
'For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. ' +
|
||||
'Then move to next tab with TAB OR RIGTH ARROW. ' +
|
||||
'Move to previous tab with SHIFT + TAB or LEFT ARROW. ' +
|
||||
'Press SPACE or ENTER to select the tab page.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Context Menu',
|
||||
legend :
|
||||
'Press ${contextMenu} or APPLICATION KEY to open context-menu. ' +
|
||||
'Then move to next menu option with TAB or DOWN ARROW. ' +
|
||||
'Move to previous option with SHIFT+TAB or UP ARROW. ' +
|
||||
'Press SPACE or ENTER to select the menu option. ' +
|
||||
'Open sub-menu of current option wtih SPACE or ENTER or RIGHT ARROW. ' +
|
||||
'Go back to parent menu item with ESC or LEFT ARROW. ' +
|
||||
'Close context menu with ESC.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor List Box',
|
||||
legend :
|
||||
'Inside a list-box, move to next list item with TAB OR DOWN ARROW. ' +
|
||||
'Move to previous list item with SHIFT + TAB or UP ARROW. ' +
|
||||
'Press SPACE or ENTER to select the list option. ' +
|
||||
'Press ESC to close the list-box.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'Editor Element Path Bar',
|
||||
legend :
|
||||
'Press ${elementsPathFocus} to navigate to the elements path bar. ' +
|
||||
'Move to next element button with TAB or RIGHT ARROW. ' +
|
||||
'Move to previous button with SHIFT+TAB or LEFT ARROW. ' +
|
||||
'Press SPACE or ENTER to select the element in editor.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'Commands',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' Undo command',
|
||||
legend : 'Press ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' Redo command',
|
||||
legend : 'Press ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' Bold command',
|
||||
legend : 'Press ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' Italic command',
|
||||
legend : 'Press ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' Underline command',
|
||||
legend : 'Press ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' Link command',
|
||||
legend : 'Press ${link}'
|
||||
},
|
||||
{
|
||||
name : ' Toolbar Collapse command',
|
||||
legend : 'Press ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' Accessibility Help',
|
||||
legend : 'Press ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,216 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'he',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'הוראות נגישות',
|
||||
contents : 'הוראות נגישות. לסגירה לחץ אסקייפ (ESC).',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'כללי',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'סרגל הכלים',
|
||||
legend:
|
||||
'לחץ על ${toolbarFocus} כדי לנווט לסרגל הכלים. ' +
|
||||
'עבור לכפתור הבא עם מקש הטאב (TAB) או חץ שמאלי. ' +
|
||||
'עבור לכפתור הקודם עם מקש השיפט (SHIFT) + טאב (TAB) או חץ ימני. ' +
|
||||
'לחץ רווח או אנטר (ENTER) כדי להפעיל את הכפתור הנבחר.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'דיאלוגים (חלונות תשאול)',
|
||||
legend :
|
||||
'בתוך דיאלוג, לחץ טאב (TAB) כדי לנווט לשדה הבא, לחץ שיפט (SHIFT) + טאב (TAB) כדי לנווט לשדה הקודם, לחץ אנטר (ENTER) כדי לשלוח את הדיאלוג, לחץ אסקייפ (ESC) כדי לבטל. ' +
|
||||
'בתוך דיאלוגים בעלי מספר טאבים (לשוניות), לחץ אלט (ALT) + F10 כדי לנווט לשורת הטאבים. ' +
|
||||
'נווט לטאב הבא עם טאב (TAB) או חץ שמאלי. ' +
|
||||
'עבור לטאב הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. ' +
|
||||
'לחץ רווח או אנטר (ENTER) כדי להיכנס לטאב.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'תפריט ההקשר (Context Menu)',
|
||||
legend :
|
||||
'לחץ ${contextMenu} או APPLICATION KEYכדי לפתוח את תפריט ההקשר. ' +
|
||||
'עבור לאפשרות הבאה עם טאב (TAB) או חץ למטה. ' +
|
||||
'עבור לאפשרות הקודמת עם שיפט (SHIFT) + טאב (TAB) או חץ למעלה. ' +
|
||||
'לחץ רווח או אנטר (ENTER) כדי לבחור את האפשרות. ' +
|
||||
'פתח את תת התפריט (Sub-menu) של האפשרות הנוכחית עם רווח או אנטר (ENTER) או חץ שמאלי. ' +
|
||||
'חזור לתפריט האב עם אסקייפ (ESC) או חץ שמאלי. ' +
|
||||
'סגור את תפריט ההקשר עם אסקייפ (ESC).'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'תפריטים צפים (List boxes)',
|
||||
legend :
|
||||
'בתוך תפריט צף, עבור לפריט הבא עם טאב (TAB) או חץ למטה. ' +
|
||||
'עבור לתפריט הקודם עם שיפט (SHIFT) + טאב (TAB) or חץ עליון. ' +
|
||||
'Press SPACE or ENTER to select the list option. ' +
|
||||
'Press ESC to close the list-box.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'עץ אלמנטים (Elements Path)',
|
||||
legend :
|
||||
'לחץ ${elementsPathFocus} כדי לנווט לעץ האלמנטים. ' +
|
||||
'עבור לפריט הבא עם טאב (TAB) או חץ ימני. ' +
|
||||
'עבור לפריט הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. ' +
|
||||
'לחץ רווח או אנטר (ENTER) כדי לבחור את האלמנט בעורך.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'פקודות',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' ביטול צעד אחרון',
|
||||
legend : 'לחץ ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' חזרה על צעד אחרון',
|
||||
legend : 'לחץ ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' הדגשה',
|
||||
legend : 'לחץ ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' הטייה',
|
||||
legend : 'לחץ ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' הוספת קו תחתון',
|
||||
legend : 'לחץ ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' הוספת לינק',
|
||||
legend : 'לחץ ${link}'
|
||||
},
|
||||
{
|
||||
name : ' כיווץ סרגל הכלים',
|
||||
legend : 'לחץ ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' הוראות נגישות',
|
||||
legend : 'לחץ ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'a11yhelp', 'he',
|
||||
{
|
||||
accessibilityHelp :
|
||||
{
|
||||
title : 'הוראות נגישות',
|
||||
contents : 'הוראות נגישות. לסגירה לחץ אסקייפ (ESC).',
|
||||
legend :
|
||||
[
|
||||
{
|
||||
name : 'כללי',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : 'סרגל הכלים',
|
||||
legend:
|
||||
'לחץ על ${toolbarFocus} כדי לנווט לסרגל הכלים. ' +
|
||||
'עבור לכפתור הבא עם מקש הטאב (TAB) או חץ שמאלי. ' +
|
||||
'עבור לכפתור הקודם עם מקש השיפט (SHIFT) + טאב (TAB) או חץ ימני. ' +
|
||||
'לחץ רווח או אנטר (ENTER) כדי להפעיל את הכפתור הנבחר.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'דיאלוגים (חלונות תשאול)',
|
||||
legend :
|
||||
'בתוך דיאלוג, לחץ טאב (TAB) כדי לנווט לשדה הבא, לחץ שיפט (SHIFT) + טאב (TAB) כדי לנווט לשדה הקודם, לחץ אנטר (ENTER) כדי לשלוח את הדיאלוג, לחץ אסקייפ (ESC) כדי לבטל. ' +
|
||||
'בתוך דיאלוגים בעלי מספר טאבים (לשוניות), לחץ אלט (ALT) + F10 כדי לנווט לשורת הטאבים. ' +
|
||||
'נווט לטאב הבא עם טאב (TAB) או חץ שמאלי. ' +
|
||||
'עבור לטאב הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. ' +
|
||||
'לחץ רווח או אנטר (ENTER) כדי להיכנס לטאב.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'תפריט ההקשר (Context Menu)',
|
||||
legend :
|
||||
'לחץ ${contextMenu} או APPLICATION KEYכדי לפתוח את תפריט ההקשר. ' +
|
||||
'עבור לאפשרות הבאה עם טאב (TAB) או חץ למטה. ' +
|
||||
'עבור לאפשרות הקודמת עם שיפט (SHIFT) + טאב (TAB) או חץ למעלה. ' +
|
||||
'לחץ רווח או אנטר (ENTER) כדי לבחור את האפשרות. ' +
|
||||
'פתח את תת התפריט (Sub-menu) של האפשרות הנוכחית עם רווח או אנטר (ENTER) או חץ שמאלי. ' +
|
||||
'חזור לתפריט האב עם אסקייפ (ESC) או חץ שמאלי. ' +
|
||||
'סגור את תפריט ההקשר עם אסקייפ (ESC).'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'תפריטים צפים (List boxes)',
|
||||
legend :
|
||||
'בתוך תפריט צף, עבור לפריט הבא עם טאב (TAB) או חץ למטה. ' +
|
||||
'עבור לתפריט הקודם עם שיפט (SHIFT) + טאב (TAB) or חץ עליון. ' +
|
||||
'Press SPACE or ENTER to select the list option. ' +
|
||||
'Press ESC to close the list-box.'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'עץ אלמנטים (Elements Path)',
|
||||
legend :
|
||||
'לחץ ${elementsPathFocus} כדי לנווט לעץ האלמנטים. ' +
|
||||
'עבור לפריט הבא עם טאב (TAB) או חץ ימני. ' +
|
||||
'עבור לפריט הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. ' +
|
||||
'לחץ רווח או אנטר (ENTER) כדי לבחור את האלמנט בעורך.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name : 'פקודות',
|
||||
items :
|
||||
[
|
||||
{
|
||||
name : ' ביטול צעד אחרון',
|
||||
legend : 'לחץ ${undo}'
|
||||
},
|
||||
{
|
||||
name : ' חזרה על צעד אחרון',
|
||||
legend : 'לחץ ${redo}'
|
||||
},
|
||||
{
|
||||
name : ' הדגשה',
|
||||
legend : 'לחץ ${bold}'
|
||||
},
|
||||
{
|
||||
name : ' הטייה',
|
||||
legend : 'לחץ ${italic}'
|
||||
},
|
||||
{
|
||||
name : ' הוספת קו תחתון',
|
||||
legend : 'לחץ ${underline}'
|
||||
},
|
||||
{
|
||||
name : ' הוספת לינק',
|
||||
legend : 'לחץ ${link}'
|
||||
},
|
||||
{
|
||||
name : ' כיווץ סרגל הכלים',
|
||||
legend : 'לחץ ${toolbarCollapse}'
|
||||
},
|
||||
{
|
||||
name : ' הוראות נגישות',
|
||||
legend : 'לחץ ${a11yHelp}'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'about', function( editor )
|
||||
{
|
||||
var lang = editor.lang.about;
|
||||
|
||||
return {
|
||||
title : CKEDITOR.env.ie ? lang.dlgTitle : lang.title,
|
||||
minWidth : 390,
|
||||
minHeight : 230,
|
||||
contents : [
|
||||
{
|
||||
id : 'tab1',
|
||||
label : '',
|
||||
title : '',
|
||||
expand : true,
|
||||
padding : 0,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
html :
|
||||
'<style type="text/css">' +
|
||||
'.cke_about_container' +
|
||||
'{' +
|
||||
'color:#000 !important;' +
|
||||
'padding:10px 10px 0;' +
|
||||
'margin-top:5px' +
|
||||
'}' +
|
||||
'.cke_about_container p' +
|
||||
'{' +
|
||||
'margin: 0 0 10px;' +
|
||||
'}' +
|
||||
'.cke_about_container .cke_about_logo' +
|
||||
'{' +
|
||||
'height:81px;' +
|
||||
'background-color:#fff;' +
|
||||
'background-image:url(' + CKEDITOR.plugins.get( 'about' ).path + 'dialogs/logo_ckeditor.png);' +
|
||||
'background-position:center; ' +
|
||||
'background-repeat:no-repeat;' +
|
||||
'margin-bottom:10px;' +
|
||||
'}' +
|
||||
'.cke_about_container a' +
|
||||
'{' +
|
||||
'cursor:pointer !important;' +
|
||||
'color:blue !important;' +
|
||||
'text-decoration:underline !important;' +
|
||||
'}' +
|
||||
'</style>' +
|
||||
'<div class="cke_about_container">' +
|
||||
'<div class="cke_about_logo"></div>' +
|
||||
'<p>' +
|
||||
'CKEditor ' + CKEDITOR.version + ' (revision ' + CKEDITOR.revision + ')<br>' +
|
||||
'<a href="http://ckeditor.com/">http://ckeditor.com</a>' +
|
||||
'</p>' +
|
||||
'<p>' +
|
||||
lang.help.replace( '$1', '<a href="http://docs.cksource.com/CKEditor_3.x/Users_Guide/Quick_Reference">' + lang.userGuide + '</a>' ) +
|
||||
'</p>' +
|
||||
'<p>' +
|
||||
lang.moreInfo + '<br>' +
|
||||
'<a href="http://ckeditor.com/license">http://ckeditor.com/license</a>' +
|
||||
'</p>' +
|
||||
'<p>' +
|
||||
lang.copy.replace( '$1', '<a href="http://cksource.com/">CKSource</a> - Frederico Knabben' ) +
|
||||
'</p>' +
|
||||
'</div>'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
buttons : [ CKEDITOR.dialog.cancelButton ]
|
||||
};
|
||||
} );
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var eventNameList = [ 'click', 'keydown', 'mousedown', 'keypress', 'mouseover', 'mouseout' ];
|
||||
|
||||
// Inline event callbacks assigned via innerHTML/outerHTML, such as
|
||||
// onclick/onmouseover, are ignored in AIR.
|
||||
// Use DOM2 event listeners to substitue inline handlers instead.
|
||||
function convertInlineHandlers( container )
|
||||
{
|
||||
// TODO: document.querySelectorAll is not supported in AIR.
|
||||
var children = container.getElementsByTag( '*' ),
|
||||
count = children.count(),
|
||||
child;
|
||||
|
||||
for ( var i = 0; i < count; i++ )
|
||||
{
|
||||
child = children.getItem( i );
|
||||
|
||||
(function( node )
|
||||
{
|
||||
for ( var j = 0; j < eventNameList.length; j++ )
|
||||
{
|
||||
(function( eventName )
|
||||
{
|
||||
var inlineEventHandler = node.getAttribute( 'on' + eventName );
|
||||
if ( node.hasAttribute( 'on' + eventName ) )
|
||||
{
|
||||
node.removeAttribute( 'on' + eventName );
|
||||
node.on( eventName, function( evt )
|
||||
{
|
||||
var callFunc = /(return\s*)?CKEDITOR\.tools\.callFunction\(([^)]+)\)/.exec( inlineEventHandler ),
|
||||
hasReturn = callFunc && callFunc[ 1 ],
|
||||
callFuncArgs = callFunc && callFunc[ 2 ].split( ',' ),
|
||||
preventDefault = /return false;/.test( inlineEventHandler );
|
||||
|
||||
if ( callFuncArgs )
|
||||
{
|
||||
var nums = callFuncArgs.length,
|
||||
argName;
|
||||
|
||||
for ( var i = 0; i < nums; i++ )
|
||||
{
|
||||
// Trim spaces around param.
|
||||
callFuncArgs[ i ] = argName = CKEDITOR.tools.trim( callFuncArgs[ i ] );
|
||||
|
||||
// String form param.
|
||||
var strPattern = argName.match( /^(["'])([^"']*?)\1$/ );
|
||||
if ( strPattern )
|
||||
{
|
||||
callFuncArgs[ i ] = strPattern[ 2 ];
|
||||
continue;
|
||||
}
|
||||
|
||||
// Integer form param.
|
||||
if ( argName.match( /\d+/ ) )
|
||||
{
|
||||
callFuncArgs[ i ] = parseInt( argName, 10 );
|
||||
continue;
|
||||
}
|
||||
|
||||
// Speical variables.
|
||||
switch( argName )
|
||||
{
|
||||
case 'this' :
|
||||
callFuncArgs[ i ] = node.$;
|
||||
break;
|
||||
case 'event' :
|
||||
callFuncArgs[ i ] = evt.data.$;
|
||||
break;
|
||||
case 'null' :
|
||||
callFuncArgs [ i ] = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var retval = CKEDITOR.tools.callFunction.apply( window, callFuncArgs );
|
||||
if ( hasReturn && retval === false )
|
||||
preventDefault = 1;
|
||||
}
|
||||
|
||||
if ( preventDefault )
|
||||
evt.data.preventDefault();
|
||||
});
|
||||
}
|
||||
})( eventNameList[ j ] );
|
||||
}
|
||||
})( child );
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'adobeair',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
if ( !CKEDITOR.env.air )
|
||||
return;
|
||||
|
||||
// Body doesn't get default margin on AIR.
|
||||
editor.addCss( 'body { padding: 8px }' );
|
||||
|
||||
editor.on( 'uiReady', function()
|
||||
{
|
||||
convertInlineHandlers( editor.container );
|
||||
|
||||
if ( editor.sharedSpaces )
|
||||
{
|
||||
for ( var space in editor.sharedSpaces )
|
||||
convertInlineHandlers( editor.sharedSpaces[ space ] );
|
||||
}
|
||||
|
||||
editor.on( 'elementsPathUpdate', function( evt ) { convertInlineHandlers( evt.data.space ); } );
|
||||
});
|
||||
|
||||
editor.on( 'contentDom', function()
|
||||
{
|
||||
// Hyperlinks are enabled in editable documents in Adobe
|
||||
// AIR. Prevent their click behavior.
|
||||
editor.document.on( 'click', function( ev )
|
||||
{
|
||||
ev.data.preventDefault( true );
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
CKEDITOR.ui.on( 'ready', function( evt )
|
||||
{
|
||||
var ui = evt.data;
|
||||
// richcombo, panelbutton and menu
|
||||
if ( ui._.panel )
|
||||
{
|
||||
var panel = ui._.panel._.panel,
|
||||
holder;
|
||||
|
||||
( function()
|
||||
{
|
||||
// Adding dom event listeners off-line are not supported in AIR,
|
||||
// waiting for panel iframe loaded.
|
||||
if ( !panel.isLoaded )
|
||||
{
|
||||
setTimeout( arguments.callee, 30 );
|
||||
return;
|
||||
}
|
||||
holder = panel._.holder;
|
||||
convertInlineHandlers( holder );
|
||||
})();
|
||||
}
|
||||
else if ( ui instanceof CKEDITOR.dialog )
|
||||
convertInlineHandlers( ui._.element );
|
||||
});
|
||||
})();
|
||||
|
||||
CKEDITOR.dom.document.prototype.write = CKEDITOR.tools.override( CKEDITOR.dom.document.prototype.write,
|
||||
function( original_write )
|
||||
{
|
||||
function appendElement( parent, tagName, fullTag, text )
|
||||
{
|
||||
var node = parent.append( tagName ),
|
||||
attrs = CKEDITOR.htmlParser.fragment.fromHtml( fullTag ).children[ 0 ].attributes;
|
||||
attrs && node.setAttributes( attrs );
|
||||
text && node.append( parent.getDocument().createText( text ) );
|
||||
}
|
||||
|
||||
return function( html, mode )
|
||||
{
|
||||
// document.write() or document.writeln() fail silently after
|
||||
// the page load event in Adobe AIR.
|
||||
// DOM manipulation could be used instead.
|
||||
if ( this.getBody() )
|
||||
{
|
||||
// We're taking the below extra work only because innerHTML
|
||||
// on <html> element doesn't work as expected.
|
||||
var doc = this,
|
||||
head = this.getHead();
|
||||
|
||||
// Create style nodes for inline css. ( <style> content doesn't applied when setting via innerHTML )
|
||||
html = html.replace( /(<style[^>]*>)([\s\S]*?)<\/style>/gi,
|
||||
function ( match, startTag, styleText )
|
||||
{
|
||||
appendElement( head, 'style', startTag, styleText );
|
||||
return '';
|
||||
});
|
||||
|
||||
html = html.replace( /<base\b[^>]*\/>/i,
|
||||
function( match )
|
||||
{
|
||||
appendElement( head, 'base', match );
|
||||
return '';
|
||||
});
|
||||
|
||||
html = html.replace( /<title>([\s\S]*)<\/title>/i,
|
||||
function( match, title )
|
||||
{
|
||||
doc.$.title = title;
|
||||
return '';
|
||||
});
|
||||
|
||||
// Move the rest of head stuff.
|
||||
html = html.replace( /<head>([\s\S]*)<\/head>/i,
|
||||
function( headHtml )
|
||||
{
|
||||
// Inject the <head> HTML inside a <div>.
|
||||
// Do that before getDocumentHead because WebKit moves
|
||||
// <link css> elements to the <head> at this point.
|
||||
var div = new CKEDITOR.dom.element( 'div', doc );
|
||||
div.setHtml( headHtml );
|
||||
// Move the <div> nodes to <head>.
|
||||
div.moveChildren( head );
|
||||
return '';
|
||||
});
|
||||
|
||||
html.replace( /(<body[^>]*>)([\s\S]*)(?=$|<\/body>)/i,
|
||||
function( match, startTag, innerHTML )
|
||||
{
|
||||
doc.getBody().setHtml( innerHTML );
|
||||
var attrs = CKEDITOR.htmlParser.fragment.fromHtml( startTag ).children[ 0 ].attributes;
|
||||
attrs && doc.getBody().setAttributes( attrs );
|
||||
});
|
||||
}
|
||||
else
|
||||
original_write.apply( this, arguments );
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,152 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview Defines the {@link CKEDITOR.ajax} object, which holds ajax methods for
|
||||
* data loading.
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
CKEDITOR.plugins.add( 'ajax',
|
||||
{
|
||||
requires : [ 'xml' ]
|
||||
});
|
||||
|
||||
/**
|
||||
* Ajax methods for data loading.
|
||||
* @namespace
|
||||
* @example
|
||||
*/
|
||||
CKEDITOR.ajax = (function()
|
||||
{
|
||||
var createXMLHttpRequest = function()
|
||||
{
|
||||
// In IE, using the native XMLHttpRequest for local files may throw
|
||||
// "Access is Denied" errors.
|
||||
if ( !CKEDITOR.env.ie || location.protocol != 'file:' )
|
||||
try { return new XMLHttpRequest(); } catch(e) {}
|
||||
|
||||
try { return new ActiveXObject( 'Msxml2.XMLHTTP' ); } catch (e) {}
|
||||
try { return new ActiveXObject( 'Microsoft.XMLHTTP' ); } catch (e) {}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
var checkStatus = function( xhr )
|
||||
{
|
||||
// HTTP Status Codes:
|
||||
// 2xx : Success
|
||||
// 304 : Not Modified
|
||||
// 0 : Returned when running locally (file://)
|
||||
// 1223 : IE may change 204 to 1223 (see http://dev.jquery.com/ticket/1450)
|
||||
|
||||
return ( xhr.readyState == 4 &&
|
||||
( ( xhr.status >= 200 && xhr.status < 300 ) ||
|
||||
xhr.status == 304 ||
|
||||
xhr.status === 0 ||
|
||||
xhr.status == 1223 ) );
|
||||
};
|
||||
|
||||
var getResponseText = function( xhr )
|
||||
{
|
||||
if ( checkStatus( xhr ) )
|
||||
return xhr.responseText;
|
||||
return null;
|
||||
};
|
||||
|
||||
var getResponseXml = function( xhr )
|
||||
{
|
||||
if ( checkStatus( xhr ) )
|
||||
{
|
||||
var xml = xhr.responseXML;
|
||||
return new CKEDITOR.xml( xml && xml.firstChild ? xml : xhr.responseText );
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
var load = function( url, callback, getResponseFn )
|
||||
{
|
||||
var async = !!callback;
|
||||
|
||||
var xhr = createXMLHttpRequest();
|
||||
|
||||
if ( !xhr )
|
||||
return null;
|
||||
|
||||
xhr.open( 'GET', url, async );
|
||||
|
||||
if ( async )
|
||||
{
|
||||
// TODO: perform leak checks on this closure.
|
||||
/** @ignore */
|
||||
xhr.onreadystatechange = function()
|
||||
{
|
||||
if ( xhr.readyState == 4 )
|
||||
{
|
||||
callback( getResponseFn( xhr ) );
|
||||
xhr = null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
xhr.send(null);
|
||||
|
||||
return async ? '' : getResponseFn( xhr );
|
||||
};
|
||||
|
||||
return /** @lends CKEDITOR.ajax */ {
|
||||
|
||||
/**
|
||||
* Loads data from an URL as plain text.
|
||||
* @param {String} url The URL from which load data.
|
||||
* @param {Function} [callback] A callback function to be called on
|
||||
* data load. If not provided, the data will be loaded
|
||||
* synchronously.
|
||||
* @returns {String} The loaded data. For asynchronous requests, an
|
||||
* empty string. For invalid requests, null.
|
||||
* @example
|
||||
* // Load data synchronously.
|
||||
* var data = CKEDITOR.ajax.load( 'somedata.txt' );
|
||||
* alert( data );
|
||||
* @example
|
||||
* // Load data asynchronously.
|
||||
* var data = CKEDITOR.ajax.load( 'somedata.txt', function( data )
|
||||
* {
|
||||
* alert( data );
|
||||
* } );
|
||||
*/
|
||||
load : function( url, callback )
|
||||
{
|
||||
return load( url, callback, getResponseText );
|
||||
},
|
||||
|
||||
/**
|
||||
* Loads data from an URL as XML.
|
||||
* @param {String} url The URL from which load data.
|
||||
* @param {Function} [callback] A callback function to be called on
|
||||
* data load. If not provided, the data will be loaded
|
||||
* synchronously.
|
||||
* @returns {CKEDITOR.xml} An XML object holding the loaded data. For asynchronous requests, an
|
||||
* empty string. For invalid requests, null.
|
||||
* @example
|
||||
* // Load XML synchronously.
|
||||
* var xml = CKEDITOR.ajax.loadXml( 'somedata.xml' );
|
||||
* alert( xml.getInnerXml( '//' ) );
|
||||
* @example
|
||||
* // Load XML asynchronously.
|
||||
* var data = CKEDITOR.ajax.loadXml( 'somedata.xml', function( xml )
|
||||
* {
|
||||
* alert( xml.getInnerXml( '//' ) );
|
||||
* } );
|
||||
*/
|
||||
loadXml : function( url, callback )
|
||||
{
|
||||
return load( url, callback, getResponseXml );
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
})();
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file AutoGrow plugin
|
||||
*/
|
||||
(function(){
|
||||
|
||||
// Actual content height, figured out by appending check the last element's document position.
|
||||
function contentHeight( scrollable )
|
||||
{
|
||||
var overflowY = scrollable.getStyle( 'overflow-y' );
|
||||
|
||||
var doc = scrollable.getDocument();
|
||||
// Create a temporary marker element.
|
||||
var marker = CKEDITOR.dom.element.createFromHtml( '<span style="margin:0;padding:0;border:0;clear:both;width:1px;height:1px;display:block;">' + ( CKEDITOR.env.webkit ? ' ' : '' ) + '</span>', doc );
|
||||
doc[ CKEDITOR.env.ie? 'getBody' : 'getDocumentElement']().append( marker );
|
||||
|
||||
var height = marker.getDocumentPosition( doc ).y + marker.$.offsetHeight;
|
||||
marker.remove();
|
||||
scrollable.setStyle( 'overflow-y', overflowY );
|
||||
return height;
|
||||
}
|
||||
|
||||
var resizeEditor = function( editor )
|
||||
{
|
||||
if ( !editor.window )
|
||||
return;
|
||||
|
||||
var doc = editor.document,
|
||||
iframe = new CKEDITOR.dom.element( doc.getWindow().$.frameElement ),
|
||||
body = doc.getBody(),
|
||||
htmlElement = doc.getDocumentElement(),
|
||||
currentHeight = editor.window.getViewPaneSize().height,
|
||||
// Quirks mode overflows body, standards overflows document element
|
||||
scrollable = doc.$.compatMode == 'BackCompat' ? body : htmlElement,
|
||||
newHeight = contentHeight( scrollable );
|
||||
|
||||
// Additional space specified by user.
|
||||
newHeight += ( editor.config.autoGrow_bottomSpace || 0 );
|
||||
|
||||
var min = editor.config.autoGrow_minHeight != undefined ? editor.config.autoGrow_minHeight : 200,
|
||||
max = editor.config.autoGrow_maxHeight || Infinity;
|
||||
|
||||
newHeight = Math.max( newHeight, min );
|
||||
newHeight = Math.min( newHeight, max );
|
||||
|
||||
if ( newHeight != currentHeight )
|
||||
{
|
||||
newHeight = editor.fire( 'autoGrow', { currentHeight : currentHeight, newHeight : newHeight } ).newHeight;
|
||||
editor.resize( editor.container.getStyle( 'width' ), newHeight, true );
|
||||
}
|
||||
|
||||
if ( scrollable.$.scrollHeight > scrollable.$.clientHeight && newHeight < max )
|
||||
scrollable.setStyle( 'overflow-y', 'hidden' );
|
||||
else
|
||||
scrollable.removeStyle( 'overflow-y' );
|
||||
|
||||
|
||||
};
|
||||
|
||||
CKEDITOR.plugins.add( 'autogrow',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
editor.addCommand( 'autogrow', { exec : resizeEditor, modes : { wysiwyg:1 }, readOnly: 1, canUndo: false, editorFocus: false } );
|
||||
|
||||
var eventsList = { contentDom:1, key:1, selectionChange:1, insertElement:1 };
|
||||
editor.config.autoGrow_onStartup && ( eventsList[ 'instanceReady' ] = 1 );
|
||||
for ( var eventName in eventsList )
|
||||
{
|
||||
editor.on( eventName, function( evt )
|
||||
{
|
||||
var maximize = editor.getCommand( 'maximize' );
|
||||
// Some time is required for insertHtml, and it gives other events better performance as well.
|
||||
if ( evt.editor.mode == 'wysiwyg' &&
|
||||
// Disable autogrow when the editor is maximized .(#6339)
|
||||
( !maximize || maximize.state != CKEDITOR.TRISTATE_ON ) )
|
||||
{
|
||||
setTimeout( function()
|
||||
{
|
||||
resizeEditor( evt.editor );
|
||||
// Second pass to make correction upon
|
||||
// the first resize, e.g. scrollbar.
|
||||
resizeEditor( evt.editor );
|
||||
}, 100 );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
/**
|
||||
* The minimum height that the editor can reach using the AutoGrow feature.
|
||||
* @name CKEDITOR.config.autoGrow_minHeight
|
||||
* @type Number
|
||||
* @default <code>200</code>
|
||||
* @since 3.4
|
||||
* @example
|
||||
* config.autoGrow_minHeight = 300;
|
||||
*/
|
||||
|
||||
/**
|
||||
* The maximum height that the editor can reach using the AutoGrow feature. Zero means unlimited.
|
||||
* @name CKEDITOR.config.autoGrow_maxHeight
|
||||
* @type Number
|
||||
* @default <code>0</code>
|
||||
* @since 3.4
|
||||
* @example
|
||||
* config.autoGrow_maxHeight = 400;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Whether to have the auto grow happen on editor creation.
|
||||
* @name CKEDITOR.config.autoGrow_onStartup
|
||||
* @type Boolean
|
||||
* @default false
|
||||
* @since 3.6.2
|
||||
* @example
|
||||
* config.autoGrow_onStartup = true;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired when the AutoGrow plugin is about to change the size of the editor.
|
||||
* @name CKEDITOR.editor#autogrow
|
||||
* @event
|
||||
* @param {Number} data.currentHeight The current height of the editor (before resizing).
|
||||
* @param {Number} data.newHeight The new height of the editor (after resizing). It can be changed
|
||||
* to determine a different height value to be used instead.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Extra height in pixel to leave between the bottom boundary of content with document size when auto resizing.
|
||||
* @name CKEDITOR.config.autoGrow_bottomSpace
|
||||
* @type Number
|
||||
* @default 0
|
||||
* @since 3.6.2
|
||||
*/
|
||||
@@ -0,0 +1,943 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
CKEDITOR.on( 'dialogDefinition', function( ev )
|
||||
{
|
||||
var tab, name = ev.data.name,
|
||||
definition = ev.data.definition;
|
||||
|
||||
if ( name == 'link' )
|
||||
{
|
||||
definition.removeContents( 'target' );
|
||||
definition.removeContents( 'upload' );
|
||||
definition.removeContents( 'advanced' );
|
||||
tab = definition.getContents( 'info' );
|
||||
tab.remove( 'emailSubject' );
|
||||
tab.remove( 'emailBody' );
|
||||
}
|
||||
else if ( name == 'image' )
|
||||
{
|
||||
definition.removeContents( 'advanced' );
|
||||
tab = definition.getContents( 'Link' );
|
||||
tab.remove( 'cmbTarget' );
|
||||
tab = definition.getContents( 'info' );
|
||||
tab.remove( 'txtAlt' );
|
||||
tab.remove( 'basic' );
|
||||
}
|
||||
});
|
||||
|
||||
var bbcodeMap = { 'b' : 'strong', 'u': 'u', 'i' : 'em', 'color' : 'span', 'size' : 'span', 'url' : 'a', 'email' : 'span', 'img' : 'span', '*' : 'li', 'list' : 'ol' },
|
||||
convertMap = { 'strong' : 'b' , 'b' : 'b', 'u': 'u', 'em' : 'i', 'i': 'i', 'li' : '*' },
|
||||
tagnameMap = { 'strong' : 'b', 'em' : 'i', 'u' : 'u', 'li' : '*', 'ul' : 'list', 'ol' : 'list', 'a' : 'link', 'img' : 'img' },
|
||||
stylesMap = { 'color' : 'color', 'size' : 'font-size' },
|
||||
attributesMap = { 'url' : 'href', 'email' : 'mailhref', 'list' : 'listType' };
|
||||
|
||||
// List of block-like tags.
|
||||
var dtd = CKEDITOR.dtd,
|
||||
blockLikeTags = CKEDITOR.tools.extend( { table:1 }, dtd.$block, dtd.$listItem, dtd.$tableContent, dtd.$list );
|
||||
|
||||
var semicolonFixRegex = /\s*(?:;\s*|$)/;
|
||||
function serializeStyleText( stylesObject )
|
||||
{
|
||||
var styleText = '';
|
||||
for ( var style in stylesObject )
|
||||
{
|
||||
var styleVal = stylesObject[ style ],
|
||||
text = ( style + ':' + styleVal ).replace( semicolonFixRegex, ';' );
|
||||
|
||||
styleText += text;
|
||||
}
|
||||
return styleText;
|
||||
}
|
||||
|
||||
function parseStyleText( styleText )
|
||||
{
|
||||
var retval = {};
|
||||
( styleText || '' )
|
||||
.replace( /"/g, '"' )
|
||||
.replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function( match, name, value )
|
||||
{
|
||||
retval[ name.toLowerCase() ] = value;
|
||||
} );
|
||||
return retval;
|
||||
}
|
||||
|
||||
function RGBToHex( cssStyle )
|
||||
{
|
||||
return cssStyle.replace( /(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi, function( match, red, green, blue )
|
||||
{
|
||||
red = parseInt( red, 10 ).toString( 16 );
|
||||
green = parseInt( green, 10 ).toString( 16 );
|
||||
blue = parseInt( blue, 10 ).toString( 16 );
|
||||
var color = [red, green, blue] ;
|
||||
|
||||
// Add padding zeros if the hex value is less than 0x10.
|
||||
for ( var i = 0 ; i < color.length ; i++ )
|
||||
color[i] = String( '0' + color[i] ).slice( -2 ) ;
|
||||
|
||||
return '#' + color.join( '' ) ;
|
||||
});
|
||||
}
|
||||
|
||||
// Maintain the map of smiley-to-description.
|
||||
var smileyMap = {"smiley":":)","sad":":(","wink":";)","laugh":":D","cheeky":":P","blush":":*)","surprise":":-o","indecision":":|","angry":">:(","angel":"o:)","cool":"8-)","devil":">:-)","crying":";(","kiss":":-*" },
|
||||
smileyReverseMap = {},
|
||||
smileyRegExp = [];
|
||||
|
||||
// Build regexp for the list of smiley text.
|
||||
for ( var i in smileyMap )
|
||||
{
|
||||
smileyReverseMap[ smileyMap[ i ] ] = i;
|
||||
smileyRegExp.push( smileyMap[ i ].replace( /\(|\)|\:|\/|\*|\-|\|/g, function( match ) { return '\\' + match; } ) );
|
||||
}
|
||||
|
||||
smileyRegExp = new RegExp( smileyRegExp.join( '|' ), 'g' );
|
||||
|
||||
var decodeHtml = ( function ()
|
||||
{
|
||||
var regex = [],
|
||||
entities =
|
||||
{
|
||||
nbsp : '\u00A0', // IE | FF
|
||||
shy : '\u00AD', // IE
|
||||
//gt : '\u003E', // IE | FF | -- | Opera
|
||||
//lt : '\u003C' // IE | FF | Safari | Opera
|
||||
};
|
||||
|
||||
for ( var entity in entities )
|
||||
regex.push( entity );
|
||||
|
||||
regex = new RegExp( '&(' + regex.join( '|' ) + ');', 'g' );
|
||||
|
||||
return function( html )
|
||||
{
|
||||
return html.replace( regex, function( match, entity )
|
||||
{
|
||||
return entities[ entity ];
|
||||
});
|
||||
};
|
||||
})();
|
||||
|
||||
CKEDITOR.BBCodeParser = function()
|
||||
{
|
||||
this._ =
|
||||
{
|
||||
bbcPartsRegex : /(?:\[([^\/\]=]*?)(?:=([^\]]*?))?\])|(?:\[\/([a-z]{1,16})\])/ig
|
||||
};
|
||||
};
|
||||
|
||||
CKEDITOR.BBCodeParser.prototype =
|
||||
{
|
||||
parse : function( bbcode )
|
||||
{
|
||||
var parts,
|
||||
part,
|
||||
lastIndex = 0;
|
||||
|
||||
while ( ( parts = this._.bbcPartsRegex.exec( bbcode ) ) )
|
||||
{
|
||||
var tagIndex = parts.index;
|
||||
if ( tagIndex > lastIndex )
|
||||
{
|
||||
var text = bbcode.substring( lastIndex, tagIndex );
|
||||
this.onText( text, 1 );
|
||||
}
|
||||
|
||||
lastIndex = this._.bbcPartsRegex.lastIndex;
|
||||
|
||||
/*
|
||||
"parts" is an array with the following items:
|
||||
0 : The entire match for opening/closing tags and line-break;
|
||||
1 : line-break;
|
||||
2 : open of tag excludes option;
|
||||
3 : tag option;
|
||||
4 : close of tag;
|
||||
*/
|
||||
|
||||
part = ( parts[ 1 ] || parts[ 3 ] || '' ).toLowerCase();
|
||||
// Unrecognized tags should be delivered as a simple text (#7860).
|
||||
if ( part && !bbcodeMap[ part ] )
|
||||
{
|
||||
this.onText( parts[ 0 ] );
|
||||
continue;
|
||||
}
|
||||
|
||||
// Opening tag
|
||||
if ( parts[ 1 ] )
|
||||
{
|
||||
var tagName = bbcodeMap[ part ],
|
||||
attribs = {},
|
||||
styles = {},
|
||||
optionPart = parts[ 2 ];
|
||||
|
||||
if ( optionPart )
|
||||
{
|
||||
if ( part == 'list' )
|
||||
{
|
||||
if ( !isNaN( optionPart ) )
|
||||
optionPart = 'decimal';
|
||||
else if ( /^[a-z]+$/.test( optionPart ) )
|
||||
optionPart = 'lower-alpha';
|
||||
else if ( /^[A-Z]+$/.test( optionPart ) )
|
||||
optionPart = 'upper-alpha';
|
||||
}
|
||||
|
||||
if ( stylesMap[ part ] )
|
||||
{
|
||||
// Font size represents percentage.
|
||||
if ( part == 'size' )
|
||||
optionPart += '%';
|
||||
|
||||
styles[ stylesMap[ part ] ] = optionPart;
|
||||
attribs.style = serializeStyleText( styles );
|
||||
}
|
||||
else if ( attributesMap[ part ] )
|
||||
attribs[ attributesMap[ part ] ] = optionPart;
|
||||
}
|
||||
|
||||
// Two special handling - image and email, protect them
|
||||
// as "span" with an attribute marker.
|
||||
if ( part == 'email' || part == 'img' )
|
||||
attribs[ 'bbcode' ] = part;
|
||||
|
||||
this.onTagOpen( tagName, attribs, CKEDITOR.dtd.$empty[ tagName ] );
|
||||
}
|
||||
// Closing tag
|
||||
else if ( parts[ 3 ] )
|
||||
this.onTagClose( bbcodeMap[ part ] );
|
||||
}
|
||||
|
||||
if ( bbcode.length > lastIndex )
|
||||
this.onText( bbcode.substring( lastIndex, bbcode.length ), 1 );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a {@link CKEDITOR.htmlParser.fragment} from an HTML string.
|
||||
* @param {String} source The HTML to be parsed, filling the fragment.
|
||||
* @param {Number} [fixForBody=false] Wrap body with specified element if needed.
|
||||
* @returns CKEDITOR.htmlParser.fragment The fragment created.
|
||||
* @example
|
||||
* var fragment = CKEDITOR.htmlParser.fragment.fromHtml( '<b>Sample</b> Text' );
|
||||
* alert( fragment.children[0].name ); "b"
|
||||
* alert( fragment.children[1].value ); " Text"
|
||||
*/
|
||||
CKEDITOR.htmlParser.fragment.fromBBCode = function( source )
|
||||
{
|
||||
var parser = new CKEDITOR.BBCodeParser(),
|
||||
fragment = new CKEDITOR.htmlParser.fragment(),
|
||||
pendingInline = [],
|
||||
pendingBrs = 0,
|
||||
currentNode = fragment,
|
||||
returnPoint;
|
||||
|
||||
function checkPending( newTagName )
|
||||
{
|
||||
if ( pendingInline.length > 0 )
|
||||
{
|
||||
for ( var i = 0 ; i < pendingInline.length ; i++ )
|
||||
{
|
||||
var pendingElement = pendingInline[ i ],
|
||||
pendingName = pendingElement.name,
|
||||
pendingDtd = CKEDITOR.dtd[ pendingName ],
|
||||
currentDtd = currentNode.name && CKEDITOR.dtd[ currentNode.name ];
|
||||
|
||||
if ( ( !currentDtd || currentDtd[ pendingName ] ) && ( !newTagName || !pendingDtd || pendingDtd[ newTagName ] || !CKEDITOR.dtd[ newTagName ] ) )
|
||||
{
|
||||
// Get a clone for the pending element.
|
||||
pendingElement = pendingElement.clone();
|
||||
|
||||
// Add it to the current node and make it the current,
|
||||
// so the new element will be added inside of it.
|
||||
pendingElement.parent = currentNode;
|
||||
currentNode = pendingElement;
|
||||
|
||||
// Remove the pending element (back the index by one
|
||||
// to properly process the next entry).
|
||||
pendingInline.splice( i, 1 );
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkPendingBrs( tagName, closing )
|
||||
{
|
||||
var len = currentNode.children.length,
|
||||
previous = len > 0 && currentNode.children[ len - 1 ],
|
||||
lineBreakParent = !previous && BBCodeWriter.getRule( tagnameMap[ currentNode.name ], 'breakAfterOpen' ),
|
||||
lineBreakPrevious = previous && previous.type == CKEDITOR.NODE_ELEMENT && BBCodeWriter.getRule( tagnameMap[ previous.name ], 'breakAfterClose' ),
|
||||
lineBreakCurrent = tagName && BBCodeWriter.getRule( tagnameMap[ tagName ], closing ? 'breakBeforeClose' : 'breakBeforeOpen' );
|
||||
|
||||
if ( pendingBrs && ( lineBreakParent || lineBreakPrevious || lineBreakCurrent ) )
|
||||
pendingBrs--;
|
||||
|
||||
// 1. Either we're at the end of block, where it requires us to compensate the br filler
|
||||
// removing logic (from htmldataprocessor).
|
||||
// 2. Or we're at the end of pseudo block, where it requires us to compensate
|
||||
// the bogus br effect.
|
||||
if ( pendingBrs && tagName in blockLikeTags )
|
||||
pendingBrs++;
|
||||
|
||||
while ( pendingBrs && pendingBrs-- )
|
||||
currentNode.children.push( previous = new CKEDITOR.htmlParser.element( 'br' ) );
|
||||
}
|
||||
|
||||
function addElement( node, target )
|
||||
{
|
||||
checkPendingBrs( node.name, 1 );
|
||||
|
||||
target = target || currentNode || fragment;
|
||||
|
||||
var len = target.children.length,
|
||||
previous = len > 0 && target.children[ len - 1 ] || null;
|
||||
|
||||
node.previous = previous;
|
||||
node.parent = target;
|
||||
|
||||
target.children.push( node );
|
||||
|
||||
if ( node.returnPoint )
|
||||
{
|
||||
currentNode = node.returnPoint;
|
||||
delete node.returnPoint;
|
||||
}
|
||||
}
|
||||
|
||||
parser.onTagOpen = function( tagName, attributes, selfClosing )
|
||||
{
|
||||
var element = new CKEDITOR.htmlParser.element( tagName, attributes );
|
||||
|
||||
// This is a tag to be removed if empty, so do not add it immediately.
|
||||
if ( CKEDITOR.dtd.$removeEmpty[ tagName ] )
|
||||
{
|
||||
pendingInline.push( element );
|
||||
return;
|
||||
}
|
||||
|
||||
var currentName = currentNode.name;
|
||||
|
||||
var currentDtd = currentName
|
||||
&& ( CKEDITOR.dtd[ currentName ]
|
||||
|| ( currentNode._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span ) );
|
||||
|
||||
// If the element cannot be child of the current element.
|
||||
if ( currentDtd && !currentDtd[ tagName ] )
|
||||
{
|
||||
var reApply = false,
|
||||
addPoint; // New position to start adding nodes.
|
||||
|
||||
// If the element name is the same as the current element name,
|
||||
// then just close the current one and append the new one to the
|
||||
// parent. This situation usually happens with <p>, <li>, <dt> and
|
||||
// <dd>, specially in IE. Do not enter in this if block in this case.
|
||||
if ( tagName == currentName )
|
||||
addElement( currentNode, currentNode.parent );
|
||||
else if ( tagName in CKEDITOR.dtd.$listItem )
|
||||
{
|
||||
parser.onTagOpen( 'ul', {} );
|
||||
addPoint = currentNode;
|
||||
reApply = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
addElement( currentNode, currentNode.parent );
|
||||
|
||||
// The current element is an inline element, which
|
||||
// cannot hold the new one. Put it in the pending list,
|
||||
// and try adding the new one after it.
|
||||
pendingInline.unshift( currentNode );
|
||||
reApply = true;
|
||||
}
|
||||
|
||||
if ( addPoint )
|
||||
currentNode = addPoint;
|
||||
// Try adding it to the return point, or the parent element.
|
||||
else
|
||||
currentNode = currentNode.returnPoint || currentNode.parent;
|
||||
|
||||
if ( reApply )
|
||||
{
|
||||
parser.onTagOpen.apply( this, arguments );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
checkPending( tagName );
|
||||
checkPendingBrs( tagName );
|
||||
|
||||
element.parent = currentNode;
|
||||
element.returnPoint = returnPoint;
|
||||
returnPoint = 0;
|
||||
|
||||
if ( element.isEmpty )
|
||||
addElement( element );
|
||||
else
|
||||
currentNode = element;
|
||||
};
|
||||
|
||||
parser.onTagClose = function( tagName )
|
||||
{
|
||||
// Check if there is any pending tag to be closed.
|
||||
for ( var i = pendingInline.length - 1 ; i >= 0 ; i-- )
|
||||
{
|
||||
// If found, just remove it from the list.
|
||||
if ( tagName == pendingInline[ i ].name )
|
||||
{
|
||||
pendingInline.splice( i, 1 );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var pendingAdd = [],
|
||||
newPendingInline = [],
|
||||
candidate = currentNode;
|
||||
|
||||
while ( candidate.type && candidate.name != tagName )
|
||||
{
|
||||
// If this is an inline element, add it to the pending list, if we're
|
||||
// really closing one of the parents element later, they will continue
|
||||
// after it.
|
||||
if ( !candidate._.isBlockLike )
|
||||
newPendingInline.unshift( candidate );
|
||||
|
||||
// This node should be added to it's parent at this point. But,
|
||||
// it should happen only if the closing tag is really closing
|
||||
// one of the nodes. So, for now, we just cache it.
|
||||
pendingAdd.push( candidate );
|
||||
|
||||
candidate = candidate.parent;
|
||||
}
|
||||
|
||||
if ( candidate.type )
|
||||
{
|
||||
// Add all elements that have been found in the above loop.
|
||||
for ( i = 0 ; i < pendingAdd.length ; i++ )
|
||||
{
|
||||
var node = pendingAdd[ i ];
|
||||
addElement( node, node.parent );
|
||||
}
|
||||
|
||||
currentNode = candidate;
|
||||
|
||||
|
||||
addElement( candidate, candidate.parent );
|
||||
|
||||
// The parent should start receiving new nodes now, except if
|
||||
// addElement changed the currentNode.
|
||||
if ( candidate == currentNode )
|
||||
currentNode = currentNode.parent;
|
||||
|
||||
pendingInline = pendingInline.concat( newPendingInline );
|
||||
}
|
||||
};
|
||||
|
||||
parser.onText = function( text )
|
||||
{
|
||||
var currentDtd = CKEDITOR.dtd[ currentNode.name ];
|
||||
if ( !currentDtd || currentDtd[ '#' ] )
|
||||
{
|
||||
checkPendingBrs();
|
||||
checkPending();
|
||||
|
||||
text.replace(/([\r\n])|[^\r\n]*/g, function( piece, lineBreak )
|
||||
{
|
||||
if ( lineBreak !== undefined && lineBreak.length )
|
||||
pendingBrs++;
|
||||
else if ( piece.length )
|
||||
{
|
||||
var lastIndex = 0;
|
||||
|
||||
// Create smiley from text emotion.
|
||||
piece.replace( smileyRegExp, function( match, index )
|
||||
{
|
||||
addElement( new CKEDITOR.htmlParser.text( piece.substring( lastIndex, index ) ), currentNode );
|
||||
addElement( new CKEDITOR.htmlParser.element( 'smiley', { 'desc': smileyReverseMap[ match ] } ), currentNode );
|
||||
lastIndex = index + match.length;
|
||||
});
|
||||
|
||||
if ( lastIndex != piece.length )
|
||||
addElement( new CKEDITOR.htmlParser.text( piece.substring( lastIndex, piece.length ) ), currentNode );
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// Parse it.
|
||||
parser.parse( CKEDITOR.tools.htmlEncode( source ) );
|
||||
|
||||
// Close all hanging nodes.
|
||||
while ( currentNode.type )
|
||||
{
|
||||
var parent = currentNode.parent,
|
||||
node = currentNode;
|
||||
|
||||
addElement( node, parent );
|
||||
currentNode = parent;
|
||||
}
|
||||
|
||||
return fragment;
|
||||
};
|
||||
|
||||
CKEDITOR.htmlParser.BBCodeWriter = CKEDITOR.tools.createClass(
|
||||
{
|
||||
$ : function()
|
||||
{
|
||||
this._ =
|
||||
{
|
||||
output : [],
|
||||
rules : []
|
||||
};
|
||||
|
||||
// List and list item.
|
||||
this.setRules( 'list',
|
||||
{
|
||||
breakBeforeOpen : 1,
|
||||
breakAfterOpen : 1,
|
||||
breakBeforeClose : 1,
|
||||
breakAfterClose : 1
|
||||
} );
|
||||
|
||||
this.setRules( '*',
|
||||
{
|
||||
breakBeforeOpen : 1,
|
||||
breakAfterOpen : 0,
|
||||
breakBeforeClose : 1,
|
||||
breakAfterClose : 0
|
||||
} );
|
||||
|
||||
this.setRules( 'quote',
|
||||
{
|
||||
breakBeforeOpen : 1,
|
||||
breakAfterOpen : 0,
|
||||
breakBeforeClose : 0,
|
||||
breakAfterClose : 1
|
||||
} );
|
||||
},
|
||||
|
||||
proto :
|
||||
{
|
||||
/**
|
||||
* Sets formatting rules for a given tag. The possible rules are:
|
||||
* <ul>
|
||||
* <li><b>breakBeforeOpen</b>: break line before the opener tag for this element.</li>
|
||||
* <li><b>breakAfterOpen</b>: break line after the opener tag for this element.</li>
|
||||
* <li><b>breakBeforeClose</b>: break line before the closer tag for this element.</li>
|
||||
* <li><b>breakAfterClose</b>: break line after the closer tag for this element.</li>
|
||||
* </ul>
|
||||
*
|
||||
* All rules default to "false". Each call to the function overrides
|
||||
* already present rules, leaving the undefined untouched.
|
||||
*
|
||||
* @param {String} tagName The tag name to which set the rules.
|
||||
* @param {Object} rules An object containing the element rules.
|
||||
* @example
|
||||
* // Break line before and after "img" tags.
|
||||
* writer.setRules( 'list',
|
||||
* {
|
||||
* breakBeforeOpen : true
|
||||
* breakAfterOpen : true
|
||||
* });
|
||||
*/
|
||||
setRules : function( tagName, rules )
|
||||
{
|
||||
var currentRules = this._.rules[ tagName ];
|
||||
|
||||
if ( currentRules )
|
||||
CKEDITOR.tools.extend( currentRules, rules, true );
|
||||
else
|
||||
this._.rules[ tagName ] = rules;
|
||||
},
|
||||
|
||||
getRule : function( tagName, ruleName )
|
||||
{
|
||||
return this._.rules[ tagName ] && this._.rules[ tagName ][ ruleName ];
|
||||
},
|
||||
|
||||
openTag : function( tag, attributes )
|
||||
{
|
||||
if ( tag in bbcodeMap )
|
||||
{
|
||||
if ( this.getRule( tag, 'breakBeforeOpen' ) )
|
||||
this.lineBreak( 1 );
|
||||
|
||||
this.write( '[', tag );
|
||||
var option = attributes.option;
|
||||
option && this.write( '=', option );
|
||||
this.write( ']' );
|
||||
|
||||
if ( this.getRule( tag, 'breakAfterOpen' ) )
|
||||
this.lineBreak( 1 );
|
||||
}
|
||||
else if ( tag == 'br' )
|
||||
this._.output.push( '\n' );
|
||||
},
|
||||
|
||||
openTagClose : function() { },
|
||||
attribute : function() { },
|
||||
|
||||
closeTag : function( tag )
|
||||
{
|
||||
if ( tag == 'div' )
|
||||
{
|
||||
this._.output.push( '\n' );
|
||||
}
|
||||
|
||||
if ( tag in bbcodeMap )
|
||||
{
|
||||
if ( this.getRule( tag, 'breakBeforeClose' ) )
|
||||
this.lineBreak( 1 );
|
||||
|
||||
tag != '*' && this.write( '[/', tag, ']' );
|
||||
|
||||
if ( this.getRule( tag, 'breakAfterClose' ) )
|
||||
this.lineBreak( 1 );
|
||||
}
|
||||
},
|
||||
|
||||
text : function( text )
|
||||
{
|
||||
this.write( text );
|
||||
},
|
||||
|
||||
/**
|
||||
* Writes a comment.
|
||||
* @param {String} comment The comment text.
|
||||
* @example
|
||||
* // Writes "<!-- My comment -->".
|
||||
* writer.comment( ' My comment ' );
|
||||
*/
|
||||
comment : function() {},
|
||||
|
||||
/*
|
||||
* Output line-break for formatting.
|
||||
*/
|
||||
lineBreak : function()
|
||||
{
|
||||
// Avoid line break when:
|
||||
// 1) Previous tag already put one.
|
||||
// 2) We're at output start.
|
||||
if ( !this._.hasLineBreak && this._.output.length )
|
||||
{
|
||||
this.write( '\n' );
|
||||
this._.hasLineBreak = 1;
|
||||
}
|
||||
},
|
||||
|
||||
write : function()
|
||||
{
|
||||
this._.hasLineBreak = 0;
|
||||
var data = Array.prototype.join.call( arguments, '' );
|
||||
this._.output.push( data );
|
||||
},
|
||||
|
||||
reset : function()
|
||||
{
|
||||
this._.output = [];
|
||||
this._.hasLineBreak = 0;
|
||||
},
|
||||
|
||||
getHtml : function( reset )
|
||||
{
|
||||
var bbcode = this._.output.join( '' );
|
||||
|
||||
if ( reset )
|
||||
this.reset();
|
||||
|
||||
return decodeHtml ( bbcode );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var BBCodeWriter = new CKEDITOR.htmlParser.BBCodeWriter();
|
||||
|
||||
CKEDITOR.plugins.add( 'bbcode',
|
||||
{
|
||||
requires : [ 'htmldataprocessor', 'entities' ],
|
||||
beforeInit : function( editor )
|
||||
{
|
||||
// Adapt some critical editor configuration for better support
|
||||
// of BBCode environment.
|
||||
var config = editor.config;
|
||||
CKEDITOR.tools.extend( config,
|
||||
{
|
||||
enterMode : CKEDITOR.ENTER_BR,
|
||||
basicEntities: false,
|
||||
entities : false,
|
||||
fillEmptyBlocks : false
|
||||
}, true );
|
||||
},
|
||||
init : function( editor )
|
||||
{
|
||||
var config = editor.config;
|
||||
|
||||
function BBCodeToHtml( code )
|
||||
{
|
||||
var fragment = CKEDITOR.htmlParser.fragment.fromBBCode( code ),
|
||||
writer = new CKEDITOR.htmlParser.basicWriter();
|
||||
|
||||
fragment.writeHtml( writer, dataFilter );
|
||||
return writer.getHtml( true );
|
||||
}
|
||||
|
||||
var dataFilter = new CKEDITOR.htmlParser.filter();
|
||||
dataFilter.addRules(
|
||||
{
|
||||
elements :
|
||||
{
|
||||
'blockquote' : function( element )
|
||||
{
|
||||
var quoted = new CKEDITOR.htmlParser.element( 'div' );
|
||||
quoted.children = element.children;
|
||||
element.children = [ quoted ];
|
||||
var citeText = element.attributes.cite;
|
||||
if ( citeText )
|
||||
{
|
||||
var cite = new CKEDITOR.htmlParser.element( 'cite' );
|
||||
cite.add( new CKEDITOR.htmlParser.text( citeText.replace( /^"|"$/g, '' ) ) );
|
||||
delete element.attributes.cite;
|
||||
element.children.unshift( cite );
|
||||
}
|
||||
},
|
||||
'span' : function( element )
|
||||
{
|
||||
var bbcode;
|
||||
if ( ( bbcode = element.attributes.bbcode ) )
|
||||
{
|
||||
if ( bbcode == 'img' )
|
||||
{
|
||||
element.name = 'img';
|
||||
element.attributes.src = element.children[ 0 ].value;
|
||||
element.children = [];
|
||||
}
|
||||
else if ( bbcode == 'email' )
|
||||
{
|
||||
element.name = 'a';
|
||||
element.attributes.href = 'mailto:' + element.children[ 0 ].value;
|
||||
}
|
||||
|
||||
delete element.attributes.bbcode;
|
||||
}
|
||||
},
|
||||
'ol' : function ( element )
|
||||
{
|
||||
if ( element.attributes.listType )
|
||||
{
|
||||
if ( element.attributes.listType != 'decimal' )
|
||||
element.attributes.style = 'list-style-type:' + element.attributes.listType;
|
||||
}
|
||||
else
|
||||
element.name = 'ul';
|
||||
|
||||
delete element.attributes.listType;
|
||||
},
|
||||
a : function( element )
|
||||
{
|
||||
|
||||
if ( !element.attributes.href )
|
||||
element.attributes.href = element.children[ 0 ].value;
|
||||
},
|
||||
'smiley' : function( element )
|
||||
{
|
||||
element.name = 'img';
|
||||
|
||||
var description = element.attributes.desc,
|
||||
image = config.smiley_images[ CKEDITOR.tools.indexOf( config.smiley_descriptions, description ) ],
|
||||
src = CKEDITOR.tools.htmlEncode( config.smiley_path + image );
|
||||
|
||||
element.attributes =
|
||||
{
|
||||
src : src,
|
||||
'data-cke-saved-src' : src,
|
||||
title : description,
|
||||
alt : description
|
||||
};
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
editor.dataProcessor.htmlFilter.addRules(
|
||||
{
|
||||
elements :
|
||||
{
|
||||
$ : function( element )
|
||||
{
|
||||
var attributes = element.attributes,
|
||||
style = parseStyleText( attributes.style ),
|
||||
value;
|
||||
|
||||
var tagName = element.name;
|
||||
if ( tagName in convertMap )
|
||||
tagName = convertMap[ tagName ];
|
||||
else if ( tagName == 'span' )
|
||||
{
|
||||
if ( ( value = style.color ) )
|
||||
{
|
||||
tagName = 'color';
|
||||
value = RGBToHex( value );
|
||||
}
|
||||
else if ( ( value = style[ 'font-size' ] ) )
|
||||
{
|
||||
var percentValue = value.match( /(\d+)%$/ );
|
||||
if ( percentValue )
|
||||
{
|
||||
value = percentValue[ 1 ];
|
||||
tagName = 'size';
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( tagName == 'ol' || tagName == 'ul' )
|
||||
{
|
||||
if ( ( value = style[ 'list-style-type'] ) )
|
||||
{
|
||||
switch ( value )
|
||||
{
|
||||
case 'lower-alpha':
|
||||
value = 'a';
|
||||
break;
|
||||
case 'upper-alpha':
|
||||
value = 'A';
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ( tagName == 'ol' )
|
||||
value = 1;
|
||||
|
||||
tagName = 'list';
|
||||
}
|
||||
else if ( tagName == 'blockquote' )
|
||||
{
|
||||
try
|
||||
{
|
||||
var cite = element.children[ 0 ],
|
||||
quoted = element.children[ 1 ],
|
||||
citeText = cite.name == 'cite' && cite.children[ 0 ].value;
|
||||
|
||||
if ( citeText )
|
||||
{
|
||||
value = '"' + citeText + '"';
|
||||
element.children = quoted.children;
|
||||
}
|
||||
|
||||
}
|
||||
catch( er )
|
||||
{
|
||||
}
|
||||
|
||||
tagName = 'quote';
|
||||
}
|
||||
else if ( tagName == 'a' )
|
||||
{
|
||||
if ( ( value = attributes.href ) )
|
||||
{
|
||||
if ( value.indexOf( 'mailto:' ) !== -1 )
|
||||
{
|
||||
tagName = 'email';
|
||||
// [email] should have a single text child with email address.
|
||||
element.children = [ new CKEDITOR.htmlParser.text( value.replace( 'mailto:', '' ) ) ];
|
||||
value = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
value = value.replace( /"/g, '' );
|
||||
value = value.replace( /"/g, '' );
|
||||
value = value.replace( /'/g, '' );
|
||||
value = value.replace( /'/g, '' );
|
||||
|
||||
var singleton = element.children.length == 1 && element.children[ 0 ];
|
||||
|
||||
if ( singleton
|
||||
&& singleton.type == CKEDITOR.NODE_TEXT
|
||||
&& singleton.value == value )
|
||||
value = '';
|
||||
|
||||
tagName = 'url';
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( tagName == 'img' )
|
||||
{
|
||||
element.isEmpty = 0;
|
||||
|
||||
// Translate smiley (image) to text emotion.
|
||||
var src = attributes[ 'data-cke-saved-src' ];
|
||||
if ( src && src.indexOf( editor.config.smiley_path ) != -1 )
|
||||
return new CKEDITOR.htmlParser.text( smileyMap[ attributes.alt ] );
|
||||
else
|
||||
element.children = [ new CKEDITOR.htmlParser.text( src ) ];
|
||||
}
|
||||
|
||||
element.name = tagName;
|
||||
value && ( element.attributes.option = value );
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
// Remove any bogus br from the end of a pseudo block,
|
||||
// e.g. <div>some text<br /><p>paragraph</p></div>
|
||||
br : function( element )
|
||||
{
|
||||
var next = element.next;
|
||||
if ( next && next.name in blockLikeTags )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}, 1 );
|
||||
|
||||
editor.dataProcessor.writer = BBCodeWriter;
|
||||
|
||||
editor.on( 'beforeSetMode', function( evt )
|
||||
{
|
||||
evt.removeListener();
|
||||
var wysiwyg = editor._.modes[ 'wysiwyg' ];
|
||||
wysiwyg.loadData = CKEDITOR.tools.override( wysiwyg.loadData, function( org )
|
||||
{
|
||||
return function( data )
|
||||
{
|
||||
return ( org.call( this, BBCodeToHtml( data ) ) );
|
||||
};
|
||||
} );
|
||||
} );
|
||||
},
|
||||
|
||||
afterInit : function( editor )
|
||||
{
|
||||
var filters;
|
||||
if ( editor._.elementsPath )
|
||||
{
|
||||
// Eliminate irrelevant elements from displaying, e.g body and p.
|
||||
if ( ( filters = editor._.elementsPath.filters ) )
|
||||
filters.push( function( element )
|
||||
{
|
||||
var htmlName = element.getName(),
|
||||
name = tagnameMap[ htmlName ] || false;
|
||||
|
||||
// Specialized anchor presents as email.
|
||||
if ( name == 'link' && element.getAttribute( 'href' ).indexOf( 'mailto:' ) === 0 )
|
||||
name = 'email';
|
||||
// Styled span could be either size or color.
|
||||
else if ( htmlName == 'span' )
|
||||
{
|
||||
if ( element.getStyle( 'font-size' ) )
|
||||
name = 'size';
|
||||
else if ( element.getStyle( 'color' ) )
|
||||
name = 'color';
|
||||
}
|
||||
else if ( name == 'img' )
|
||||
{
|
||||
var src = element.data( 'cke-saved-src' );
|
||||
if ( src && src.indexOf( editor.config.smiley_path ) === 0 )
|
||||
name = 'smiley';
|
||||
}
|
||||
|
||||
return name;
|
||||
});
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
})();
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,223 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'paste', function( editor )
|
||||
{
|
||||
var lang = editor.lang.clipboard;
|
||||
var isCustomDomain = CKEDITOR.env.isCustomDomain();
|
||||
|
||||
function onPasteFrameLoad( win )
|
||||
{
|
||||
var doc = new CKEDITOR.dom.document( win.document ),
|
||||
docElement = doc.$;
|
||||
|
||||
var script = doc.getById( 'cke_actscrpt' );
|
||||
script && script.remove();
|
||||
|
||||
CKEDITOR.env.ie ?
|
||||
docElement.body.contentEditable = "true" :
|
||||
docElement.designMode = "on";
|
||||
|
||||
// IE before version 8 will leave cursor blinking inside the document after
|
||||
// editor blurred unless we clean up the selection. (#4716)
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )
|
||||
{
|
||||
doc.getWindow().on( 'blur', function()
|
||||
{
|
||||
docElement.selection.empty();
|
||||
} );
|
||||
}
|
||||
|
||||
doc.on( "keydown", function( e )
|
||||
{
|
||||
var domEvent = e.data,
|
||||
key = domEvent.getKeystroke(),
|
||||
processed;
|
||||
|
||||
switch( key )
|
||||
{
|
||||
case 27 :
|
||||
this.hide();
|
||||
processed = 1;
|
||||
break;
|
||||
|
||||
case 9 :
|
||||
case CKEDITOR.SHIFT + 9 :
|
||||
this.changeFocus( true );
|
||||
processed = 1;
|
||||
}
|
||||
|
||||
processed && domEvent.preventDefault();
|
||||
}, this );
|
||||
|
||||
editor.fire( 'ariaWidget', new CKEDITOR.dom.element( win.frameElement ) );
|
||||
}
|
||||
|
||||
return {
|
||||
title : lang.title,
|
||||
|
||||
minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 370 : 350,
|
||||
minHeight : CKEDITOR.env.quirks ? 250 : 245,
|
||||
onShow : function()
|
||||
{
|
||||
// FIREFOX BUG: Force the browser to render the dialog to make the to-be-
|
||||
// inserted iframe editable. (#3366)
|
||||
this.parts.dialog.$.offsetHeight;
|
||||
|
||||
this.setupContent();
|
||||
},
|
||||
|
||||
onHide : function()
|
||||
{
|
||||
if ( CKEDITOR.env.ie )
|
||||
this.getParentEditor().document.getBody().$.contentEditable = 'true';
|
||||
},
|
||||
|
||||
onLoad : function()
|
||||
{
|
||||
if ( ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) && editor.lang.dir == 'rtl' )
|
||||
this.parts.contents.setStyle( 'overflow', 'hidden' );
|
||||
},
|
||||
|
||||
onOk : function()
|
||||
{
|
||||
this.commitContent();
|
||||
},
|
||||
|
||||
contents : [
|
||||
{
|
||||
id : 'general',
|
||||
label : editor.lang.common.generalTab,
|
||||
elements : [
|
||||
{
|
||||
type : 'html',
|
||||
id : 'securityMsg',
|
||||
html : '<div style="white-space:normal;width:340px;">' + lang.securityMsg + '</div>'
|
||||
},
|
||||
{
|
||||
type : 'html',
|
||||
id : 'pasteMsg',
|
||||
html : '<div style="white-space:normal;width:340px;">'+lang.pasteMsg +'</div>'
|
||||
},
|
||||
{
|
||||
type : 'html',
|
||||
id : 'editing_area',
|
||||
style : 'width: 100%; height: 100%;',
|
||||
html : '',
|
||||
focus : function()
|
||||
{
|
||||
var win = this.getInputElement().$.contentWindow;
|
||||
|
||||
// #3291 : JAWS needs the 500ms delay to detect that the editor iframe
|
||||
// iframe is no longer editable. So that it will put the focus into the
|
||||
// Paste from Word dialog's editable area instead.
|
||||
setTimeout( function()
|
||||
{
|
||||
win.focus();
|
||||
}, 500 );
|
||||
},
|
||||
setup : function()
|
||||
{
|
||||
var dialog = this.getDialog();
|
||||
var htmlToLoad =
|
||||
'<html dir="' + editor.config.contentsLangDirection + '"' +
|
||||
' lang="' + ( editor.config.contentsLanguage || editor.langCode ) + '">' +
|
||||
'<head><style>body { margin: 3px; height: 95%; } </style></head><body>' +
|
||||
'<script id="cke_actscrpt" type="text/javascript">' +
|
||||
'window.parent.CKEDITOR.tools.callFunction( ' + CKEDITOR.tools.addFunction( onPasteFrameLoad, dialog ) + ', this );' +
|
||||
'</script></body>' +
|
||||
'</html>';
|
||||
|
||||
var src =
|
||||
CKEDITOR.env.air ?
|
||||
'javascript:void(0)' :
|
||||
isCustomDomain ?
|
||||
'javascript:void((function(){' +
|
||||
'document.open();' +
|
||||
'document.domain=\'' + document.domain + '\';' +
|
||||
'document.close();' +
|
||||
'})())"'
|
||||
:
|
||||
'';
|
||||
|
||||
var iframe = CKEDITOR.dom.element.createFromHtml(
|
||||
'<iframe' +
|
||||
' class="cke_pasteframe"' +
|
||||
' frameborder="0" ' +
|
||||
' allowTransparency="true"' +
|
||||
' src="' + src + '"' +
|
||||
' role="region"' +
|
||||
' aria-label="' + lang.pasteArea + '"' +
|
||||
' aria-describedby="' + dialog.getContentElement( 'general', 'pasteMsg' ).domId + '"' +
|
||||
' aria-multiple="true"' +
|
||||
'></iframe>' );
|
||||
|
||||
iframe.on( 'load', function( e )
|
||||
{
|
||||
e.removeListener();
|
||||
|
||||
var doc = iframe.getFrameDocument();
|
||||
doc.write( htmlToLoad );
|
||||
|
||||
if ( CKEDITOR.env.air )
|
||||
onPasteFrameLoad.call( this, doc.getWindow().$ );
|
||||
}, dialog );
|
||||
|
||||
iframe.setCustomData( 'dialog', dialog );
|
||||
|
||||
var container = this.getElement();
|
||||
container.setHtml( '' );
|
||||
container.append( iframe );
|
||||
|
||||
// IE need a redirect on focus to make
|
||||
// the cursor blinking inside iframe. (#5461)
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var focusGrabber = CKEDITOR.dom.element.createFromHtml( '<span tabindex="-1" style="position:absolute;" role="presentation"></span>' );
|
||||
focusGrabber.on( 'focus', function()
|
||||
{
|
||||
iframe.$.contentWindow.focus();
|
||||
});
|
||||
container.append( focusGrabber );
|
||||
|
||||
// Override focus handler on field.
|
||||
this.focus = function()
|
||||
{
|
||||
focusGrabber.focus();
|
||||
this.fire( 'focus' );
|
||||
};
|
||||
}
|
||||
|
||||
this.getInputElement = function(){ return iframe; };
|
||||
|
||||
// Force container to scale in IE.
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
container.setStyle( 'display', 'block' );
|
||||
container.setStyle( 'height', ( iframe.$.offsetHeight + 2 ) + 'px' );
|
||||
}
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var container = this.getElement(),
|
||||
editor = this.getDialog().getParentEditor(),
|
||||
body = this.getInputElement().getFrameDocument().getBody(),
|
||||
bogus = body.getBogus(),
|
||||
html;
|
||||
bogus && bogus.remove();
|
||||
|
||||
// Saving the contents so changes until paste is complete will not take place (#7500)
|
||||
html = body.getHtml();
|
||||
|
||||
setTimeout( function(){
|
||||
editor.fire( 'paste', { 'html' : html } );
|
||||
}, 0 );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,340 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'colordialog', function( editor )
|
||||
{
|
||||
// Define some shorthands.
|
||||
var $el = CKEDITOR.dom.element,
|
||||
$doc = CKEDITOR.document,
|
||||
$tools = CKEDITOR.tools,
|
||||
lang = editor.lang.colordialog;
|
||||
|
||||
// Reference the dialog.
|
||||
var dialog;
|
||||
|
||||
var spacer =
|
||||
{
|
||||
type : 'html',
|
||||
html : ' '
|
||||
};
|
||||
|
||||
function clearSelected()
|
||||
{
|
||||
$doc.getById( selHiColorId ).removeStyle( 'background-color' );
|
||||
dialog.getContentElement( 'picker', 'selectedColor' ).setValue( '' );
|
||||
}
|
||||
|
||||
function updateSelected( evt )
|
||||
{
|
||||
if ( ! ( evt instanceof CKEDITOR.dom.event ) )
|
||||
evt = new CKEDITOR.dom.event( evt );
|
||||
|
||||
var target = evt.getTarget(),
|
||||
color;
|
||||
|
||||
if ( target.getName() == 'a' && ( color = target.getChild( 0 ).getHtml() ) )
|
||||
dialog.getContentElement( 'picker', 'selectedColor' ).setValue( color );
|
||||
}
|
||||
|
||||
function updateHighlight( event )
|
||||
{
|
||||
if ( ! ( event instanceof CKEDITOR.dom.event ) )
|
||||
event = event.data;
|
||||
|
||||
var target = event.getTarget(),
|
||||
color;
|
||||
|
||||
if ( target.getName() == 'a' && ( color = target.getChild( 0 ).getHtml() ) )
|
||||
{
|
||||
$doc.getById( hicolorId ).setStyle( 'background-color', color );
|
||||
$doc.getById( hicolorTextId ).setHtml( color );
|
||||
}
|
||||
}
|
||||
|
||||
function clearHighlight()
|
||||
{
|
||||
$doc.getById( hicolorId ).removeStyle( 'background-color' );
|
||||
$doc.getById( hicolorTextId ).setHtml( ' ' );
|
||||
}
|
||||
|
||||
var onMouseout = $tools.addFunction( clearHighlight ),
|
||||
onClick = updateSelected,
|
||||
onClickHandler = CKEDITOR.tools.addFunction( onClick ),
|
||||
onFocus = updateHighlight,
|
||||
onBlur = clearHighlight;
|
||||
|
||||
var onKeydownHandler = CKEDITOR.tools.addFunction( function( ev )
|
||||
{
|
||||
ev = new CKEDITOR.dom.event( ev );
|
||||
var element = ev.getTarget();
|
||||
var relative, nodeToMove;
|
||||
var keystroke = ev.getKeystroke(),
|
||||
rtl = editor.lang.dir == 'rtl';
|
||||
|
||||
switch ( keystroke )
|
||||
{
|
||||
// UP-ARROW
|
||||
case 38 :
|
||||
// relative is TR
|
||||
if ( ( relative = element.getParent().getParent().getPrevious() ) )
|
||||
{
|
||||
nodeToMove = relative.getChild( [element.getParent().getIndex(), 0] );
|
||||
nodeToMove.focus();
|
||||
onBlur( ev, element );
|
||||
onFocus( ev, nodeToMove );
|
||||
}
|
||||
ev.preventDefault();
|
||||
break;
|
||||
// DOWN-ARROW
|
||||
case 40 :
|
||||
// relative is TR
|
||||
if ( ( relative = element.getParent().getParent().getNext() ) )
|
||||
{
|
||||
nodeToMove = relative.getChild( [ element.getParent().getIndex(), 0 ] );
|
||||
if ( nodeToMove && nodeToMove.type == 1 )
|
||||
{
|
||||
nodeToMove.focus();
|
||||
onBlur( ev, element );
|
||||
onFocus( ev, nodeToMove );
|
||||
}
|
||||
}
|
||||
ev.preventDefault();
|
||||
break;
|
||||
// SPACE
|
||||
// ENTER is already handled as onClick
|
||||
case 32 :
|
||||
onClick( ev );
|
||||
ev.preventDefault();
|
||||
break;
|
||||
|
||||
// RIGHT-ARROW
|
||||
case rtl ? 37 : 39 :
|
||||
// relative is TD
|
||||
if ( ( relative = element.getParent().getNext() ) )
|
||||
{
|
||||
nodeToMove = relative.getChild( 0 );
|
||||
if ( nodeToMove.type == 1 )
|
||||
{
|
||||
nodeToMove.focus();
|
||||
onBlur( ev, element );
|
||||
onFocus( ev, nodeToMove );
|
||||
ev.preventDefault( true );
|
||||
}
|
||||
else
|
||||
onBlur( null, element );
|
||||
}
|
||||
// relative is TR
|
||||
else if ( ( relative = element.getParent().getParent().getNext() ) )
|
||||
{
|
||||
nodeToMove = relative.getChild( [ 0, 0 ] );
|
||||
if ( nodeToMove && nodeToMove.type == 1 )
|
||||
{
|
||||
nodeToMove.focus();
|
||||
onBlur( ev, element );
|
||||
onFocus( ev, nodeToMove );
|
||||
ev.preventDefault( true );
|
||||
}
|
||||
else
|
||||
onBlur( null, element );
|
||||
}
|
||||
break;
|
||||
|
||||
// LEFT-ARROW
|
||||
case rtl ? 39 : 37 :
|
||||
// relative is TD
|
||||
if ( ( relative = element.getParent().getPrevious() ) )
|
||||
{
|
||||
nodeToMove = relative.getChild( 0 );
|
||||
nodeToMove.focus();
|
||||
onBlur( ev, element );
|
||||
onFocus( ev, nodeToMove );
|
||||
ev.preventDefault( true );
|
||||
}
|
||||
// relative is TR
|
||||
else if ( ( relative = element.getParent().getParent().getPrevious() ) )
|
||||
{
|
||||
nodeToMove = relative.getLast().getChild( 0 );
|
||||
nodeToMove.focus();
|
||||
onBlur( ev, element );
|
||||
onFocus( ev, nodeToMove );
|
||||
ev.preventDefault( true );
|
||||
}
|
||||
else
|
||||
onBlur( null, element );
|
||||
break;
|
||||
default :
|
||||
// Do not stop not handled events.
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
function createColorTable()
|
||||
{
|
||||
// Create the base colors array.
|
||||
var aColors = [ '00', '33', '66', '99', 'cc', 'ff' ];
|
||||
|
||||
// This function combines two ranges of three values from the color array into a row.
|
||||
function appendColorRow( rangeA, rangeB )
|
||||
{
|
||||
for ( var i = rangeA ; i < rangeA + 3 ; i++ )
|
||||
{
|
||||
var row = table.$.insertRow( -1 );
|
||||
|
||||
for ( var j = rangeB ; j < rangeB + 3 ; j++ )
|
||||
{
|
||||
for ( var n = 0 ; n < 6 ; n++ )
|
||||
{
|
||||
appendColorCell( row, '#' + aColors[j] + aColors[n] + aColors[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This function create a single color cell in the color table.
|
||||
function appendColorCell( targetRow, color )
|
||||
{
|
||||
var cell = new $el( targetRow.insertCell( -1 ) );
|
||||
cell.setAttribute( 'class', 'ColorCell' );
|
||||
cell.setStyle( 'background-color', color );
|
||||
|
||||
cell.setStyle( 'width', '15px' );
|
||||
cell.setStyle( 'height', '15px' );
|
||||
|
||||
var index = cell.$.cellIndex + 1 + 18 * targetRow.rowIndex;
|
||||
cell.append( CKEDITOR.dom.element.createFromHtml(
|
||||
'<a href="javascript: void(0);" role="option"' +
|
||||
' aria-posinset="' + index + '"' +
|
||||
' aria-setsize="' + 13 * 18 + '"' +
|
||||
' style="cursor: pointer;display:block;width:100%;height:100% " title="'+ CKEDITOR.tools.htmlEncode( color )+ '"' +
|
||||
' onkeydown="CKEDITOR.tools.callFunction( ' + onKeydownHandler + ', event, this )"' +
|
||||
' onclick="CKEDITOR.tools.callFunction(' + onClickHandler + ', event, this ); return false;"' +
|
||||
' tabindex="-1"><span class="cke_voice_label">' + color + '</span> </a>', CKEDITOR.document ) );
|
||||
}
|
||||
|
||||
appendColorRow( 0, 0 );
|
||||
appendColorRow( 3, 0 );
|
||||
appendColorRow( 0, 3 );
|
||||
appendColorRow( 3, 3 );
|
||||
|
||||
// Create the last row.
|
||||
var oRow = table.$.insertRow(-1) ;
|
||||
|
||||
// Create the gray scale colors cells.
|
||||
for ( var n = 0 ; n < 6 ; n++ )
|
||||
{
|
||||
appendColorCell( oRow, '#' + aColors[n] + aColors[n] + aColors[n] ) ;
|
||||
}
|
||||
|
||||
// Fill the row with black cells.
|
||||
for ( var i = 0 ; i < 12 ; i++ )
|
||||
{
|
||||
appendColorCell( oRow, '#000000' ) ;
|
||||
}
|
||||
}
|
||||
|
||||
var table = new $el( 'table' );
|
||||
createColorTable();
|
||||
var html = table.getHtml();
|
||||
|
||||
var numbering = function( id )
|
||||
{
|
||||
return CKEDITOR.tools.getNextId() + '_' + id;
|
||||
},
|
||||
hicolorId = numbering( 'hicolor' ),
|
||||
hicolorTextId = numbering( 'hicolortext' ),
|
||||
selHiColorId = numbering( 'selhicolor' ),
|
||||
tableLabelId = numbering( 'color_table_label' );
|
||||
|
||||
return {
|
||||
title : lang.title,
|
||||
minWidth : 360,
|
||||
minHeight : 220,
|
||||
onLoad : function()
|
||||
{
|
||||
// Update reference.
|
||||
dialog = this;
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'picker',
|
||||
label : lang.title,
|
||||
accessKey : 'I',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'hbox',
|
||||
padding : 0,
|
||||
widths : [ '70%', '10%', '30%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
html : '<table role="listbox" aria-labelledby="' + tableLabelId + '" onmouseout="CKEDITOR.tools.callFunction( ' + onMouseout + ' );">' +
|
||||
( !CKEDITOR.env.webkit ? html : '' ) +
|
||||
'</table><span id="' + tableLabelId + '" class="cke_voice_label">' + lang.options +'</span>',
|
||||
onLoad : function()
|
||||
{
|
||||
var table = CKEDITOR.document.getById( this.domId );
|
||||
table.on( 'mouseover', updateHighlight );
|
||||
// In WebKit, the table content must be inserted after this event call (#6150)
|
||||
CKEDITOR.env.webkit && table.setHtml( html );
|
||||
},
|
||||
focus: function()
|
||||
{
|
||||
var firstColor = this.getElement().getElementsByTag( 'a' ).getItem( 0 );
|
||||
firstColor.focus();
|
||||
}
|
||||
},
|
||||
spacer,
|
||||
{
|
||||
type : 'vbox',
|
||||
padding : 0,
|
||||
widths : [ '70%', '5%', '25%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
html : '<span>' + lang.highlight +'</span>\
|
||||
<div id="' + hicolorId + '" style="border: 1px solid; height: 74px; width: 74px;"></div>\
|
||||
<div id="' + hicolorTextId + '"> </div><span>' + lang.selected + '</span>\
|
||||
<div id="' + selHiColorId + '" style="border: 1px solid; height: 20px; width: 74px;"></div>'
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
label : lang.selected,
|
||||
labelStyle: 'display:none',
|
||||
id : 'selectedColor',
|
||||
style : 'width: 74px',
|
||||
onChange : function()
|
||||
{
|
||||
// Try to update color preview with new value. If fails, then set it no none.
|
||||
try
|
||||
{
|
||||
$doc.getById( selHiColorId ).setStyle( 'background-color', this.getValue() );
|
||||
}
|
||||
catch ( e )
|
||||
{
|
||||
clearSelected();
|
||||
}
|
||||
}
|
||||
},
|
||||
spacer,
|
||||
{
|
||||
type : 'button',
|
||||
id : 'clear',
|
||||
style : 'margin-top: 5px',
|
||||
label : lang.clear,
|
||||
onClick : clearSelected
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'devtools', 'en',
|
||||
{
|
||||
devTools :
|
||||
{
|
||||
title : 'Element Information',
|
||||
dialogName : 'Dialog window name',
|
||||
tabName : 'Tab name',
|
||||
elementId : 'Element ID',
|
||||
elementType : 'Element type'
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'devtools',
|
||||
{
|
||||
lang : [ 'en' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
editor._.showDialogDefinitionTooltips = 1;
|
||||
},
|
||||
onLoad : function()
|
||||
{
|
||||
CKEDITOR.document.appendStyleText( CKEDITOR.config.devtools_styles ||
|
||||
'#cke_tooltip { padding: 5px; border: 2px solid #333; background: #ffffff }' +
|
||||
'#cke_tooltip h2 { font-size: 1.1em; border-bottom: 1px solid; margin: 0; padding: 1px; }' +
|
||||
'#cke_tooltip ul { padding: 0pt; list-style-type: none; }' );
|
||||
}
|
||||
});
|
||||
|
||||
(function()
|
||||
{
|
||||
function defaultCallback( editor, dialog, element, tabName )
|
||||
{
|
||||
var lang = editor.lang.devTools,
|
||||
link = '<a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.' +
|
||||
( element ? ( element.type == 'text' ? 'textInput' : element.type ) : 'content' ) +
|
||||
'.html" target="_blank">' + ( element ? element.type : 'content' ) + '</a>',
|
||||
str =
|
||||
'<h2>' + lang.title + '</h2>' +
|
||||
'<ul>' +
|
||||
'<li><strong>' + lang.dialogName + '</strong> : ' + dialog.getName() + '</li>' +
|
||||
'<li><strong>' + lang.tabName + '</strong> : ' + tabName + '</li>';
|
||||
|
||||
if ( element )
|
||||
str += '<li><strong>' + lang.elementId + '</strong> : ' + element.id + '</li>';
|
||||
|
||||
str += '<li><strong>' + lang.elementType + '</strong> : ' + link + '</li>';
|
||||
|
||||
return str + '</ul>';
|
||||
}
|
||||
|
||||
function showTooltip( callback, el, editor, dialog, obj, tabName )
|
||||
{
|
||||
var pos = el.getDocumentPosition(),
|
||||
styles = { 'z-index' : CKEDITOR.dialog._.currentZIndex + 10, top : ( pos.y + el.getSize( 'height' ) ) + 'px' };
|
||||
|
||||
tooltip.setHtml( callback( editor, dialog, obj, tabName ) );
|
||||
tooltip.show();
|
||||
|
||||
// Translate coordinate for RTL.
|
||||
if ( editor.lang.dir == 'rtl' )
|
||||
{
|
||||
var viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize();
|
||||
styles.right = ( viewPaneSize.width - pos.x - el.getSize( 'width' ) ) + 'px';
|
||||
}
|
||||
else
|
||||
styles.left = pos.x + 'px';
|
||||
|
||||
tooltip.setStyles( styles );
|
||||
}
|
||||
|
||||
var tooltip;
|
||||
CKEDITOR.on( 'reset', function()
|
||||
{
|
||||
tooltip && tooltip.remove();
|
||||
tooltip = null;
|
||||
});
|
||||
|
||||
CKEDITOR.on( 'dialogDefinition', function( evt )
|
||||
{
|
||||
var editor = evt.editor;
|
||||
if ( editor._.showDialogDefinitionTooltips )
|
||||
{
|
||||
if ( !tooltip )
|
||||
{
|
||||
tooltip = CKEDITOR.dom.element.createFromHtml( '<div id="cke_tooltip" tabindex="-1" style="position: absolute"></div>', CKEDITOR.document );
|
||||
tooltip.hide();
|
||||
tooltip.on( 'mouseover', function(){ this.show(); } );
|
||||
tooltip.on( 'mouseout', function(){ this.hide(); } );
|
||||
tooltip.appendTo( CKEDITOR.document.getBody() );
|
||||
}
|
||||
|
||||
var dialog = evt.data.definition.dialog,
|
||||
callback = editor.config.devtools_textCallback || defaultCallback;
|
||||
|
||||
dialog.on( 'load', function()
|
||||
{
|
||||
var tabs = dialog.parts.tabs.getChildren(), tab;
|
||||
for ( var i = 0, len = tabs.count(); i < len; i++ )
|
||||
{
|
||||
tab = tabs.getItem( i );
|
||||
tab.on( 'mouseover', function()
|
||||
{
|
||||
var id = this.$.id;
|
||||
showTooltip( callback, this, editor, dialog, null, id.substring( 4, id.lastIndexOf( '_' ) ) );
|
||||
});
|
||||
tab.on( 'mouseout', function()
|
||||
{
|
||||
tooltip.hide();
|
||||
});
|
||||
}
|
||||
|
||||
dialog.foreach( function( obj )
|
||||
{
|
||||
if ( obj.type in { hbox : 1, vbox : 1 } )
|
||||
return;
|
||||
|
||||
var el = obj.getElement();
|
||||
if ( el )
|
||||
{
|
||||
el.on( 'mouseover', function()
|
||||
{
|
||||
showTooltip( callback, this, editor, dialog, obj, dialog._.currentTabId );
|
||||
});
|
||||
el.on( 'mouseout', function()
|
||||
{
|
||||
tooltip.hide();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* A function that returns the text to be displayed inside the Developer Tools tooltip when hovering over a dialog UI element.
|
||||
* There are 4 parameters that are being passed into the function: editor, dialog window, element, tab name.
|
||||
* @name editor.config.devtools_textCallback
|
||||
* @since 3.6
|
||||
* @type Function
|
||||
* @default (see example)
|
||||
* @example
|
||||
* // This is actually the default value.
|
||||
* // Show dialog window name, tab ID, and element ID.
|
||||
* config.devtools_textCallback = function( editor, dialog, element, tabName )
|
||||
* {
|
||||
* var lang = editor.lang.devTools,
|
||||
* link = '<a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.' +
|
||||
* ( element ? ( element.type == 'text' ? 'textInput' : element.type ) : 'content' ) +
|
||||
* '.html" target="_blank">' + ( element ? element.type : 'content' ) + '</a>',
|
||||
* str =
|
||||
* '<h2>' + lang.title + '</h2>' +
|
||||
* '<ul>' +
|
||||
* '<li><strong>' + lang.dialogName + '</strong> : ' + dialog.getName() + '</li>' +
|
||||
* '<li><strong>' + lang.tabName + '</strong> : ' + tabName + '</li>';
|
||||
*
|
||||
* if ( element )
|
||||
* str += '<li><strong>' + lang.elementId + '</strong> : ' + element.id + '</li>';
|
||||
*
|
||||
* str += '<li><strong>' + lang.elementType + '</strong> : ' + link + '</li>';
|
||||
*
|
||||
* return str + '</ul>';
|
||||
* }
|
||||
*/
|
||||
|
||||
/**
|
||||
* A setting that stores CSS rules to be injected into the page with styles to be applied to the tooltip element.
|
||||
* @name CKEDITOR.config.devtools_styles
|
||||
* @since 3.6
|
||||
* @type String
|
||||
* @default (see example)
|
||||
* @example
|
||||
* // This is actually the default value.
|
||||
* CKEDITOR.config.devtools_styles = "
|
||||
* #cke_tooltip { padding: 5px; border: 2px solid #333; background: #ffffff }
|
||||
* #cke_tooltip h2 { font-size: 1.1em; border-bottom: 1px solid; margin: 0; padding: 1px; }
|
||||
* #cke_tooltip ul { padding: 0pt; list-style-type: none; }
|
||||
* ";
|
||||
*/
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,535 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
|
||||
/**
|
||||
* Add to collection with DUP examination.
|
||||
* @param {Object} collection
|
||||
* @param {Object} element
|
||||
* @param {Object} database
|
||||
*/
|
||||
function addSafely( collection, element, database )
|
||||
{
|
||||
// 1. IE doesn't support customData on text nodes;
|
||||
// 2. Text nodes never get chance to appear twice;
|
||||
if ( !element.is || !element.getCustomData( 'block_processed' ) )
|
||||
{
|
||||
element.is && CKEDITOR.dom.element.setMarker( database, element, 'block_processed', true );
|
||||
collection.push( element );
|
||||
}
|
||||
}
|
||||
|
||||
function getNonEmptyChildren( element )
|
||||
{
|
||||
var retval = [];
|
||||
var children = element.getChildren();
|
||||
for ( var i = 0 ; i < children.count() ; i++ )
|
||||
{
|
||||
var child = children.getItem( i );
|
||||
if ( ! ( child.type === CKEDITOR.NODE_TEXT
|
||||
&& ( /^[ \t\n\r]+$/ ).test( child.getText() ) ) )
|
||||
retval.push( child );
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Dialog reused by both 'creatediv' and 'editdiv' commands.
|
||||
* @param {Object} editor
|
||||
* @param {String} command The command name which indicate what the current command is.
|
||||
*/
|
||||
function divDialog( editor, command )
|
||||
{
|
||||
// Definition of elements at which div operation should stopped.
|
||||
var divLimitDefinition = ( function(){
|
||||
|
||||
// Customzie from specialize blockLimit elements
|
||||
var definition = CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$blockLimit );
|
||||
|
||||
// Exclude 'div' itself.
|
||||
delete definition.div;
|
||||
|
||||
// Exclude 'td' and 'th' when 'wrapping table'
|
||||
if ( editor.config.div_wrapTable )
|
||||
{
|
||||
delete definition.td;
|
||||
delete definition.th;
|
||||
}
|
||||
return definition;
|
||||
})();
|
||||
|
||||
// DTD of 'div' element
|
||||
var dtd = CKEDITOR.dtd.div;
|
||||
|
||||
/**
|
||||
* Get the first div limit element on the element's path.
|
||||
* @param {Object} element
|
||||
*/
|
||||
function getDivLimitElement( element )
|
||||
{
|
||||
var pathElements = new CKEDITOR.dom.elementPath( element ).elements;
|
||||
var divLimit;
|
||||
for ( var i = 0; i < pathElements.length ; i++ )
|
||||
{
|
||||
if ( pathElements[ i ].getName() in divLimitDefinition )
|
||||
{
|
||||
divLimit = pathElements[ i ];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return divLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Init all fields' setup/commit function.
|
||||
* @memberof divDialog
|
||||
*/
|
||||
function setupFields()
|
||||
{
|
||||
this.foreach( function( field )
|
||||
{
|
||||
// Exclude layout container elements
|
||||
if ( /^(?!vbox|hbox)/.test( field.type ) )
|
||||
{
|
||||
if ( !field.setup )
|
||||
{
|
||||
// Read the dialog fields values from the specified
|
||||
// element attributes.
|
||||
field.setup = function( element )
|
||||
{
|
||||
field.setValue( element.getAttribute( field.id ) || '' );
|
||||
};
|
||||
}
|
||||
if ( !field.commit )
|
||||
{
|
||||
// Set element attributes assigned by the dialog
|
||||
// fields.
|
||||
field.commit = function( element )
|
||||
{
|
||||
var fieldValue = this.getValue();
|
||||
// ignore default element attribute values
|
||||
if ( 'dir' == field.id && element.getComputedStyle( 'direction' ) == fieldValue )
|
||||
return;
|
||||
|
||||
if ( fieldValue )
|
||||
element.setAttribute( field.id, fieldValue );
|
||||
else
|
||||
element.removeAttribute( field.id );
|
||||
};
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapping 'div' element around appropriate blocks among the selected ranges.
|
||||
* @param {Object} editor
|
||||
*/
|
||||
function createDiv( editor )
|
||||
{
|
||||
// new adding containers OR detected pre-existed containers.
|
||||
var containers = [];
|
||||
// node markers store.
|
||||
var database = {};
|
||||
// All block level elements which contained by the ranges.
|
||||
var containedBlocks = [], block;
|
||||
|
||||
// Get all ranges from the selection.
|
||||
var selection = editor.document.getSelection(),
|
||||
ranges = selection.getRanges();
|
||||
var bookmarks = selection.createBookmarks();
|
||||
var i, iterator;
|
||||
|
||||
// Calcualte a default block tag if we need to create blocks.
|
||||
var blockTag = editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p';
|
||||
|
||||
// collect all included elements from dom-iterator
|
||||
for ( i = 0 ; i < ranges.length ; i++ )
|
||||
{
|
||||
iterator = ranges[ i ].createIterator();
|
||||
while ( ( block = iterator.getNextParagraph() ) )
|
||||
{
|
||||
// include contents of blockLimit elements.
|
||||
if ( block.getName() in divLimitDefinition )
|
||||
{
|
||||
var j, childNodes = block.getChildren();
|
||||
for ( j = 0 ; j < childNodes.count() ; j++ )
|
||||
addSafely( containedBlocks, childNodes.getItem( j ) , database );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Bypass dtd disallowed elements.
|
||||
while ( !dtd[ block.getName() ] && block.getName() != 'body' )
|
||||
block = block.getParent();
|
||||
addSafely( containedBlocks, block, database );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.dom.element.clearAllMarkers( database );
|
||||
|
||||
var blockGroups = groupByDivLimit( containedBlocks );
|
||||
var ancestor, blockEl, divElement;
|
||||
|
||||
for ( i = 0 ; i < blockGroups.length ; i++ )
|
||||
{
|
||||
var currentNode = blockGroups[ i ][ 0 ];
|
||||
|
||||
// Calculate the common parent node of all contained elements.
|
||||
ancestor = currentNode.getParent();
|
||||
for ( j = 1 ; j < blockGroups[ i ].length; j++ )
|
||||
ancestor = ancestor.getCommonAncestor( blockGroups[ i ][ j ] );
|
||||
|
||||
divElement = new CKEDITOR.dom.element( 'div', editor.document );
|
||||
|
||||
// Normalize the blocks in each group to a common parent.
|
||||
for ( j = 0; j < blockGroups[ i ].length ; j++ )
|
||||
{
|
||||
currentNode = blockGroups[ i ][ j ];
|
||||
|
||||
while ( !currentNode.getParent().equals( ancestor ) )
|
||||
currentNode = currentNode.getParent();
|
||||
|
||||
// This could introduce some duplicated elements in array.
|
||||
blockGroups[ i ][ j ] = currentNode;
|
||||
}
|
||||
|
||||
// Wrapped blocks counting
|
||||
var fixedBlock = null;
|
||||
for ( j = 0 ; j < blockGroups[ i ].length ; j++ )
|
||||
{
|
||||
currentNode = blockGroups[ i ][ j ];
|
||||
|
||||
// Avoid DUP elements introduced by grouping.
|
||||
if ( !( currentNode.getCustomData && currentNode.getCustomData( 'block_processed' ) ) )
|
||||
{
|
||||
currentNode.is && CKEDITOR.dom.element.setMarker( database, currentNode, 'block_processed', true );
|
||||
|
||||
// Establish new container, wrapping all elements in this group.
|
||||
if ( !j )
|
||||
divElement.insertBefore( currentNode );
|
||||
|
||||
divElement.append( currentNode );
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.dom.element.clearAllMarkers( database );
|
||||
containers.push( divElement );
|
||||
}
|
||||
|
||||
selection.selectBookmarks( bookmarks );
|
||||
return containers;
|
||||
}
|
||||
|
||||
function getDiv( editor )
|
||||
{
|
||||
var path = new CKEDITOR.dom.elementPath( editor.getSelection().getStartElement() ),
|
||||
blockLimit = path.blockLimit,
|
||||
div = blockLimit && blockLimit.getAscendant( 'div', true );
|
||||
return div;
|
||||
}
|
||||
/**
|
||||
* Divide a set of nodes to different groups by their path's blocklimit element.
|
||||
* Note: the specified nodes should be in source order naturally, which mean they are supposed to producea by following class:
|
||||
* * CKEDITOR.dom.range.Iterator
|
||||
* * CKEDITOR.dom.domWalker
|
||||
* @return {Array []} the grouped nodes
|
||||
*/
|
||||
function groupByDivLimit( nodes )
|
||||
{
|
||||
var groups = [],
|
||||
lastDivLimit = null,
|
||||
path, block;
|
||||
for ( var i = 0 ; i < nodes.length ; i++ )
|
||||
{
|
||||
block = nodes[i];
|
||||
var limit = getDivLimitElement( block );
|
||||
if ( !limit.equals( lastDivLimit ) )
|
||||
{
|
||||
lastDivLimit = limit ;
|
||||
groups.push( [] ) ;
|
||||
}
|
||||
groups[ groups.length - 1 ].push( block ) ;
|
||||
}
|
||||
return groups;
|
||||
}
|
||||
|
||||
// Synchronous field values to other impacted fields is required, e.g. div styles
|
||||
// change should also alter inline-style text.
|
||||
function commitInternally( targetFields )
|
||||
{
|
||||
var dialog = this.getDialog(),
|
||||
element = dialog._element && dialog._element.clone()
|
||||
|| new CKEDITOR.dom.element( 'div', editor.document );
|
||||
|
||||
// Commit this field and broadcast to target fields.
|
||||
this.commit( element, true );
|
||||
|
||||
targetFields = [].concat( targetFields );
|
||||
var length = targetFields.length, field;
|
||||
for ( var i = 0; i < length; i++ )
|
||||
{
|
||||
field = dialog.getContentElement.apply( dialog, targetFields[ i ].split( ':' ) );
|
||||
field && field.setup && field.setup( element, true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Registered 'CKEDITOR.style' instances.
|
||||
var styles = {} ;
|
||||
/**
|
||||
* Hold a collection of created block container elements.
|
||||
*/
|
||||
var containers = [];
|
||||
/**
|
||||
* @type divDialog
|
||||
*/
|
||||
return {
|
||||
title : editor.lang.div.title,
|
||||
minWidth : 400,
|
||||
minHeight : 165,
|
||||
contents :
|
||||
[
|
||||
{
|
||||
id :'info',
|
||||
label :editor.lang.common.generalTab,
|
||||
title :editor.lang.common.generalTab,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type :'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id :'elementStyle',
|
||||
type :'select',
|
||||
style :'width: 100%;',
|
||||
label :editor.lang.div.styleSelectLabel,
|
||||
'default' : '',
|
||||
// Options are loaded dynamically.
|
||||
items :
|
||||
[
|
||||
[ editor.lang.common.notSet , '' ]
|
||||
],
|
||||
onChange : function()
|
||||
{
|
||||
commitInternally.call( this, [ 'info:class', 'advanced:dir', 'advanced:style' ] );
|
||||
},
|
||||
setup : function( element )
|
||||
{
|
||||
for ( var name in styles )
|
||||
styles[ name ].checkElementRemovable( element, true ) && this.setValue( name );
|
||||
},
|
||||
commit: function( element )
|
||||
{
|
||||
var styleName;
|
||||
if ( ( styleName = this.getValue() ) )
|
||||
{
|
||||
var style = styles[ styleName ];
|
||||
var customData = element.getCustomData( 'elementStyle' ) || '';
|
||||
|
||||
style.applyToObject( element );
|
||||
element.setCustomData( 'elementStyle', customData + style._.definition.attributes.style );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id :'class',
|
||||
type :'text',
|
||||
label :editor.lang.common.cssClass,
|
||||
'default' : ''
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id :'advanced',
|
||||
label :editor.lang.common.advancedTab,
|
||||
title :editor.lang.common.advancedTab,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type :'vbox',
|
||||
padding :1,
|
||||
children :
|
||||
[
|
||||
{
|
||||
type :'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type :'text',
|
||||
id :'id',
|
||||
label :editor.lang.common.id,
|
||||
'default' : ''
|
||||
},
|
||||
{
|
||||
type :'text',
|
||||
id :'lang',
|
||||
label :editor.lang.link.langCode,
|
||||
'default' : ''
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type :'hbox',
|
||||
children :
|
||||
[
|
||||
{
|
||||
type :'text',
|
||||
id :'style',
|
||||
style :'width: 100%;',
|
||||
label :editor.lang.common.cssStyle,
|
||||
'default' : '',
|
||||
commit : function( element )
|
||||
{
|
||||
// Merge with 'elementStyle', which is of higher priority.
|
||||
var merged = this.getValue() + ( element.getCustomData( 'elementStyle' ) || '' );
|
||||
element.setAttribute( 'style', merged );
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type :'hbox',
|
||||
children :
|
||||
[
|
||||
{
|
||||
type :'text',
|
||||
id :'title',
|
||||
style :'width: 100%;',
|
||||
label :editor.lang.common.advisoryTitle,
|
||||
'default' : ''
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type :'select',
|
||||
id :'dir',
|
||||
style :'width: 100%;',
|
||||
label :editor.lang.common.langDir,
|
||||
'default' : '',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.common.notSet , '' ],
|
||||
[
|
||||
editor.lang.common.langDirLtr,
|
||||
'ltr'
|
||||
],
|
||||
[
|
||||
editor.lang.common.langDirRtl,
|
||||
'rtl'
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
onLoad : function()
|
||||
{
|
||||
setupFields.call( this );
|
||||
|
||||
// Preparing for the 'elementStyle' field.
|
||||
var dialog = this,
|
||||
stylesField = this.getContentElement( 'info', 'elementStyle' );
|
||||
|
||||
// Reuse the 'stylescombo' plugin's styles definition.
|
||||
editor.getStylesSet( function( stylesDefinitions )
|
||||
{
|
||||
var styleName;
|
||||
|
||||
if ( stylesDefinitions )
|
||||
{
|
||||
// Digg only those styles that apply to 'div'.
|
||||
for ( var i = 0 ; i < stylesDefinitions.length ; i++ )
|
||||
{
|
||||
var styleDefinition = stylesDefinitions[ i ];
|
||||
if ( styleDefinition.element && styleDefinition.element == 'div' )
|
||||
{
|
||||
styleName = styleDefinition.name;
|
||||
styles[ styleName ] = new CKEDITOR.style( styleDefinition );
|
||||
|
||||
// Populate the styles field options with style name.
|
||||
stylesField.items.push( [ styleName, styleName ] );
|
||||
stylesField.add( styleName, styleName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We should disable the content element
|
||||
// it if no options are available at all.
|
||||
stylesField[ stylesField.items.length > 1 ? 'enable' : 'disable' ]();
|
||||
|
||||
// Now setup the field value manually.
|
||||
setTimeout( function() { stylesField.setup( dialog._element ); }, 0 );
|
||||
} );
|
||||
},
|
||||
onShow : function()
|
||||
{
|
||||
// Whether always create new container regardless of existed
|
||||
// ones.
|
||||
if ( command == 'editdiv' )
|
||||
{
|
||||
// Try to discover the containers that already existed in
|
||||
// ranges
|
||||
var div = getDiv( editor );
|
||||
// update dialog field values
|
||||
div && this.setupContent( this._element = div );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
if ( command == 'editdiv' )
|
||||
containers = [ this._element ];
|
||||
else
|
||||
containers = createDiv( editor, true );
|
||||
|
||||
// Update elements attributes
|
||||
var size = containers.length;
|
||||
for ( var i = 0; i < size; i++ )
|
||||
{
|
||||
this.commitContent( containers[ i ] );
|
||||
|
||||
// Remove empty 'style' attribute.
|
||||
!containers[ i ].getAttribute( 'style' ) && containers[ i ].removeAttribute( 'style' );
|
||||
}
|
||||
|
||||
this.hide();
|
||||
},
|
||||
onHide : function()
|
||||
{
|
||||
// Remove style only when editing existing DIV. (#6315)
|
||||
if ( command == 'editdiv' )
|
||||
this._element.removeCustomData( 'elementStyle' );
|
||||
delete this._element;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
CKEDITOR.dialog.add( 'creatediv', function( editor )
|
||||
{
|
||||
return divDialog( editor, 'creatediv' );
|
||||
} );
|
||||
CKEDITOR.dialog.add( 'editdiv', function( editor )
|
||||
{
|
||||
return divDialog( editor, 'editdiv' );
|
||||
} );
|
||||
} )();
|
||||
|
||||
/*
|
||||
* @name CKEDITOR.config.div_wrapTable
|
||||
* Whether to wrap the whole table instead of indivisual cells when created 'div' in table cell.
|
||||
* @type Boolean
|
||||
* @default false
|
||||
* @example config.div_wrapTable = true;
|
||||
*/
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,674 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'docProps', function( editor )
|
||||
{
|
||||
var lang = editor.lang.docprops,
|
||||
langCommon = editor.lang.common,
|
||||
metaHash = {};
|
||||
|
||||
function getDialogValue( dialogName, callback )
|
||||
{
|
||||
var onOk = function()
|
||||
{
|
||||
releaseHandlers( this );
|
||||
callback( this, this._.parentDialog );
|
||||
};
|
||||
var releaseHandlers = function( dialog )
|
||||
{
|
||||
dialog.removeListener( 'ok', onOk );
|
||||
dialog.removeListener( 'cancel', releaseHandlers );
|
||||
};
|
||||
var bindToDialog = function( dialog )
|
||||
{
|
||||
dialog.on( 'ok', onOk );
|
||||
dialog.on( 'cancel', releaseHandlers );
|
||||
};
|
||||
editor.execCommand( dialogName );
|
||||
if ( editor._.storedDialogs.colordialog )
|
||||
bindToDialog( editor._.storedDialogs.colordialog );
|
||||
else
|
||||
{
|
||||
CKEDITOR.on( 'dialogDefinition', function( e )
|
||||
{
|
||||
if ( e.data.name != dialogName )
|
||||
return;
|
||||
|
||||
var definition = e.data.definition;
|
||||
|
||||
e.removeListener();
|
||||
definition.onLoad = CKEDITOR.tools.override( definition.onLoad, function( orginal )
|
||||
{
|
||||
return function()
|
||||
{
|
||||
bindToDialog( this );
|
||||
definition.onLoad = orginal;
|
||||
if ( typeof orginal == 'function' )
|
||||
orginal.call( this );
|
||||
};
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
function handleOther()
|
||||
{
|
||||
var dialog = this.getDialog(),
|
||||
other = dialog.getContentElement( 'general', this.id + 'Other' );
|
||||
if ( !other )
|
||||
return;
|
||||
if ( this.getValue() == 'other' )
|
||||
{
|
||||
other.getInputElement().removeAttribute( 'readOnly' );
|
||||
other.focus();
|
||||
other.getElement().removeClass( 'cke_disabled' );
|
||||
}
|
||||
else
|
||||
{
|
||||
other.getInputElement().setAttribute( 'readOnly', true );
|
||||
other.getElement().addClass( 'cke_disabled' );
|
||||
}
|
||||
}
|
||||
function commitMeta( name, isHttp, value )
|
||||
{
|
||||
return function( doc, html, head )
|
||||
{
|
||||
var hash = metaHash,
|
||||
val = typeof value != 'undefined' ? value : this.getValue();
|
||||
if ( !val && ( name in hash ) )
|
||||
hash[ name ].remove();
|
||||
else if ( val && ( name in hash ) )
|
||||
hash[ name ].setAttribute( 'content', val );
|
||||
else if ( val )
|
||||
{
|
||||
var meta = new CKEDITOR.dom.element( 'meta', editor.document );
|
||||
meta.setAttribute( isHttp ? 'http-equiv' : 'name', name );
|
||||
meta.setAttribute( 'content', val );
|
||||
head.append( meta );
|
||||
}
|
||||
};
|
||||
}
|
||||
function setupMeta( name, ret )
|
||||
{
|
||||
return function()
|
||||
{
|
||||
var hash = metaHash,
|
||||
result = ( name in hash ) ? hash[ name ].getAttribute( 'content' ) || '' : '';
|
||||
if ( ret )
|
||||
return result;
|
||||
this.setValue( result );
|
||||
return null;
|
||||
};
|
||||
}
|
||||
function commitMargin( name )
|
||||
{
|
||||
return function( doc, html, head, body )
|
||||
{
|
||||
body.removeAttribute( 'margin' + name );
|
||||
var val = this.getValue();
|
||||
if ( val !== '' )
|
||||
body.setStyle( 'margin-' + name, CKEDITOR.tools.cssLength( val ) );
|
||||
else
|
||||
body.removeStyle( 'margin-' + name );
|
||||
};
|
||||
}
|
||||
|
||||
function createMetaHash( doc )
|
||||
{
|
||||
var hash = {},
|
||||
metas = doc.getElementsByTag( 'meta' ),
|
||||
count = metas.count();
|
||||
|
||||
for ( var i = 0; i < count; i++ )
|
||||
{
|
||||
var meta = metas.getItem( i );
|
||||
hash[ meta.getAttribute( meta.hasAttribute( 'http-equiv' ) ? 'http-equiv' : 'name' ).toLowerCase() ] = meta;
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
// We cannot just remove the style from the element, as it might be affected from non-inline stylesheets.
|
||||
// To get the proper result, we should manually set the inline style to its default value.
|
||||
function resetStyle( element, prop, resetVal )
|
||||
{
|
||||
element.removeStyle( prop );
|
||||
if ( element.getComputedStyle( prop ) != resetVal )
|
||||
element.setStyle( prop, resetVal );
|
||||
}
|
||||
|
||||
// Utilty to shorten the creation of color fields in the dialog.
|
||||
var colorField = function( id, label, fieldProps )
|
||||
{
|
||||
return {
|
||||
type : 'hbox',
|
||||
padding : 0,
|
||||
widths : [ '60%', '40%' ],
|
||||
children : [
|
||||
CKEDITOR.tools.extend( {
|
||||
type : 'text',
|
||||
id : id,
|
||||
label : lang[ label ]
|
||||
}, fieldProps || {}, 1 ),
|
||||
{
|
||||
type : 'button',
|
||||
id : id + 'Choose',
|
||||
label : lang.chooseColor,
|
||||
className : 'colorChooser',
|
||||
onClick : function()
|
||||
{
|
||||
var self = this;
|
||||
getDialogValue( 'colordialog', function( colorDialog )
|
||||
{
|
||||
var dialog = self.getDialog();
|
||||
dialog.getContentElement( dialog._.currentTabId, id ).setValue( colorDialog.getContentElement( 'picker', 'selectedColor' ).getValue() );
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
var previewSrc = 'javascript:' +
|
||||
'void((function(){' +
|
||||
encodeURIComponent(
|
||||
'document.open();' +
|
||||
( CKEDITOR.env.isCustomDomain() ? 'document.domain=\'' + document.domain + '\';' : '' ) +
|
||||
'document.write( \'<html style="background-color: #ffffff; height: 100%"><head></head><body style="width: 100%; height: 100%; margin: 0px">' + lang.previewHtml + '</body></html>\' );' +
|
||||
'document.close();'
|
||||
) +
|
||||
'})())';
|
||||
|
||||
return {
|
||||
title : lang.title,
|
||||
minHeight: 330,
|
||||
minWidth: 500,
|
||||
onShow : function()
|
||||
{
|
||||
var doc = editor.document,
|
||||
html = doc.getElementsByTag( 'html' ).getItem( 0 ),
|
||||
head = doc.getHead(),
|
||||
body = doc.getBody();
|
||||
metaHash = createMetaHash( doc );
|
||||
this.setupContent( doc, html, head, body );
|
||||
},
|
||||
onHide : function()
|
||||
{
|
||||
metaHash = {};
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var doc = editor.document,
|
||||
html = doc.getElementsByTag( 'html' ).getItem( 0 ),
|
||||
head = doc.getHead(),
|
||||
body = doc.getBody();
|
||||
this.commitContent( doc, html, head, body );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'general',
|
||||
label : langCommon.generalTab,
|
||||
elements : [
|
||||
{
|
||||
type : 'text',
|
||||
id : 'title',
|
||||
label : lang.docTitle,
|
||||
setup : function( doc )
|
||||
{
|
||||
this.setValue( doc.getElementsByTag( 'title' ).getItem( 0 ).data( 'cke-title' ) );
|
||||
},
|
||||
commit : function( doc, html, head, body, isPreview )
|
||||
{
|
||||
if ( isPreview )
|
||||
return;
|
||||
doc.getElementsByTag( 'title' ).getItem( 0 ).data( 'cke-title', this.getValue() );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
children : [
|
||||
{
|
||||
type : 'select',
|
||||
id : 'dir',
|
||||
label : langCommon.langDir,
|
||||
style : 'width: 100%',
|
||||
items : [
|
||||
[ langCommon.notSet , '' ],
|
||||
[ langCommon.langDirLtr, 'ltr' ],
|
||||
[ langCommon.langDirRtl, 'rtl' ]
|
||||
],
|
||||
setup : function( doc, html, head, body )
|
||||
{
|
||||
this.setValue( body.getDirection() || '' );
|
||||
},
|
||||
commit : function( doc, html, head, body )
|
||||
{
|
||||
var val = this.getValue();
|
||||
if ( val )
|
||||
body.setAttribute( 'dir', val );
|
||||
else
|
||||
body.removeAttribute( 'dir' );
|
||||
body.removeStyle( 'direction' );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'langCode',
|
||||
label : langCommon.langCode,
|
||||
setup : function( doc, html )
|
||||
{
|
||||
this.setValue( html.getAttribute( 'xml:lang' ) || html.getAttribute( 'lang' ) || '' );
|
||||
},
|
||||
commit : function( doc, html, head, body, isPreview )
|
||||
{
|
||||
if ( isPreview )
|
||||
return;
|
||||
var val = this.getValue();
|
||||
if ( val )
|
||||
html.setAttributes( { 'xml:lang' : val, lang : val } );
|
||||
else
|
||||
html.removeAttributes( { 'xml:lang' : 1, lang : 1 } );
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
children : [
|
||||
{
|
||||
type : 'select',
|
||||
id : 'charset',
|
||||
label : lang.charset,
|
||||
style : 'width: 100%',
|
||||
items : [
|
||||
[ langCommon.notSet, '' ],
|
||||
[ lang.charsetASCII, 'us-ascii' ],
|
||||
[ lang.charsetCE, 'iso-8859-2' ],
|
||||
[ lang.charsetCT, 'big5' ],
|
||||
[ lang.charsetCR, 'iso-8859-5' ],
|
||||
[ lang.charsetGR, 'iso-8859-7' ],
|
||||
[ lang.charsetJP, 'iso-2022-jp' ],
|
||||
[ lang.charsetKR, 'iso-2022-kr' ],
|
||||
[ lang.charsetTR, 'iso-8859-9' ],
|
||||
[ lang.charsetUN, 'utf-8' ],
|
||||
[ lang.charsetWE, 'iso-8859-1' ],
|
||||
[ lang.other, 'other' ]
|
||||
],
|
||||
'default' : '',
|
||||
onChange : function()
|
||||
{
|
||||
this.getDialog().selectedCharset = this.getValue() != 'other' ? this.getValue() : '';
|
||||
handleOther.call( this );
|
||||
},
|
||||
setup : function()
|
||||
{
|
||||
this.metaCharset = ( 'charset' in metaHash );
|
||||
|
||||
var func = setupMeta( this.metaCharset ? 'charset' : 'content-type', 1, 1 ),
|
||||
val = func.call( this );
|
||||
|
||||
!this.metaCharset && val.match( /charset=[^=]+$/ ) && ( val = val.substring( val.indexOf( '=' ) + 1 ) );
|
||||
|
||||
if ( val )
|
||||
{
|
||||
this.setValue( val.toLowerCase() );
|
||||
if ( !this.getValue() )
|
||||
{
|
||||
this.setValue( 'other' );
|
||||
var other = this.getDialog().getContentElement( 'general', 'charsetOther' );
|
||||
other && other.setValue( val );
|
||||
}
|
||||
this.getDialog().selectedCharset = val;
|
||||
}
|
||||
|
||||
handleOther.call( this );
|
||||
},
|
||||
commit : function( doc, html, head, body, isPreview )
|
||||
{
|
||||
if ( isPreview )
|
||||
return;
|
||||
var value = this.getValue(),
|
||||
other = this.getDialog().getContentElement( 'general', 'charsetOther' );
|
||||
|
||||
value == 'other' && ( value = other ? other.getValue() : '' );
|
||||
|
||||
value && !this.metaCharset && ( value = ( metaHash[ 'content-type' ] ? metaHash[ 'content-type' ].getAttribute( 'content' ).split( ';' )[0] : 'text/html' ) + '; charset=' + value );
|
||||
|
||||
var func = commitMeta( this.metaCharset ? 'charset' : 'content-type', 1, value );
|
||||
func.call( this, doc, html, head );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'charsetOther',
|
||||
label : lang.charsetOther,
|
||||
onChange : function(){ this.getDialog().selectedCharset = this.getValue(); }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
children : [
|
||||
{
|
||||
type : 'select',
|
||||
id : 'docType',
|
||||
label : lang.docType,
|
||||
style : 'width: 100%',
|
||||
items : [
|
||||
[ langCommon.notSet , '' ],
|
||||
[ 'XHTML 1.1', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">' ],
|
||||
[ 'XHTML 1.0 Transitional', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ],
|
||||
[ 'XHTML 1.0 Strict', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' ],
|
||||
[ 'XHTML 1.0 Frameset', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">' ],
|
||||
[ 'HTML 5', '<!DOCTYPE html>' ],
|
||||
[ 'HTML 4.01 Transitional', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' ],
|
||||
[ 'HTML 4.01 Strict', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' ],
|
||||
[ 'HTML 4.01 Frameset', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">' ],
|
||||
[ 'HTML 3.2', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">' ],
|
||||
[ 'HTML 2.0', '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">' ],
|
||||
[ lang.other, 'other' ]
|
||||
],
|
||||
onChange : handleOther,
|
||||
setup : function()
|
||||
{
|
||||
if ( editor.docType )
|
||||
{
|
||||
this.setValue( editor.docType );
|
||||
if ( !this.getValue() )
|
||||
{
|
||||
this.setValue( 'other' );
|
||||
var other = this.getDialog().getContentElement( 'general', 'docTypeOther' );
|
||||
other && other.setValue( editor.docType );
|
||||
}
|
||||
}
|
||||
handleOther.call( this );
|
||||
},
|
||||
commit : function( doc, html, head, body, isPreview )
|
||||
{
|
||||
if ( isPreview )
|
||||
return;
|
||||
var value = this.getValue(),
|
||||
other = this.getDialog().getContentElement( 'general', 'docTypeOther' );
|
||||
editor.docType = value == 'other' ? ( other ? other.getValue() : '' ) : value;
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'docTypeOther',
|
||||
label : lang.docTypeOther
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'checkbox',
|
||||
id : 'xhtmlDec',
|
||||
label : lang.xhtmlDec,
|
||||
setup : function()
|
||||
{
|
||||
this.setValue( !!editor.xmlDeclaration );
|
||||
},
|
||||
commit : function( doc, html, head, body, isPreview )
|
||||
{
|
||||
if ( isPreview )
|
||||
return;
|
||||
if ( this.getValue() )
|
||||
{
|
||||
editor.xmlDeclaration = '<?xml version="1.0" encoding="' + ( this.getDialog().selectedCharset || 'utf-8' )+ '"?>' ;
|
||||
html.setAttribute( 'xmlns', 'http://www.w3.org/1999/xhtml' );
|
||||
}
|
||||
else
|
||||
{
|
||||
editor.xmlDeclaration = '';
|
||||
html.removeAttribute( 'xmlns' );
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'design',
|
||||
label : lang.design,
|
||||
elements : [
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '60%', '40%' ],
|
||||
children : [
|
||||
{
|
||||
type : 'vbox',
|
||||
children : [
|
||||
colorField( 'txtColor', 'txtColor',
|
||||
{
|
||||
setup : function( doc, html, head, body )
|
||||
{
|
||||
this.setValue( body.getComputedStyle( 'color' ) );
|
||||
},
|
||||
commit : function( doc, html, head, body, isPreview )
|
||||
{
|
||||
if ( this.isChanged() || isPreview )
|
||||
{
|
||||
body.removeAttribute( 'text' );
|
||||
var val = this.getValue();
|
||||
if ( val )
|
||||
body.setStyle( 'color', val );
|
||||
else
|
||||
body.removeStyle( 'color' );
|
||||
}
|
||||
}
|
||||
}),
|
||||
colorField( 'bgColor', 'bgColor', {
|
||||
setup : function( doc, html, head, body )
|
||||
{
|
||||
var val = body.getComputedStyle( 'background-color' ) || '';
|
||||
this.setValue( val == 'transparent' ? '' : val );
|
||||
},
|
||||
commit : function( doc, html, head, body, isPreview )
|
||||
{
|
||||
if ( this.isChanged() || isPreview )
|
||||
{
|
||||
body.removeAttribute( 'bgcolor' );
|
||||
var val = this.getValue();
|
||||
if ( val )
|
||||
body.setStyle( 'background-color', val );
|
||||
else
|
||||
resetStyle( body, 'background-color', 'transparent' );
|
||||
}
|
||||
}
|
||||
}),
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '60%', '40%' ],
|
||||
padding : 1,
|
||||
children : [
|
||||
{
|
||||
type : 'text',
|
||||
id : 'bgImage',
|
||||
label : lang.bgImage,
|
||||
setup : function( doc, html, head, body )
|
||||
{
|
||||
var val = body.getComputedStyle( 'background-image' ) || '';
|
||||
if ( val == 'none' )
|
||||
val = '';
|
||||
else
|
||||
{
|
||||
val = val.replace( /url\(\s*(["']?)\s*([^\)]*)\s*\1\s*\)/i, function( match, quote, url )
|
||||
{
|
||||
return url;
|
||||
});
|
||||
}
|
||||
this.setValue( val );
|
||||
},
|
||||
commit : function( doc, html, head, body )
|
||||
{
|
||||
body.removeAttribute( 'background' );
|
||||
var val = this.getValue();
|
||||
if ( val )
|
||||
body.setStyle( 'background-image', 'url(' + val + ')' );
|
||||
else
|
||||
resetStyle( body, 'background-image', 'none' );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'button',
|
||||
id : 'bgImageChoose',
|
||||
label : langCommon.browseServer,
|
||||
style : 'display:inline-block;margin-top:10px;',
|
||||
hidden : true,
|
||||
filebrowser : 'design:bgImage'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'checkbox',
|
||||
id : 'bgFixed',
|
||||
label : lang.bgFixed,
|
||||
setup : function( doc, html, head, body )
|
||||
{
|
||||
this.setValue( body.getComputedStyle( 'background-attachment' ) == 'fixed' );
|
||||
},
|
||||
commit : function( doc, html, head, body )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
body.setStyle( 'background-attachment', 'fixed' );
|
||||
else
|
||||
resetStyle( body, 'background-attachment', 'scroll' );
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'vbox',
|
||||
children : [
|
||||
{
|
||||
type : 'html',
|
||||
id : 'marginTitle',
|
||||
html : '<div style="text-align: center; margin: 0px auto; font-weight: bold">' + lang.margin + '</div>'
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'marginTop',
|
||||
label : lang.marginTop,
|
||||
style : 'width: 80px; text-align: center',
|
||||
align : 'center',
|
||||
inputStyle : 'text-align: center',
|
||||
setup : function( doc, html, head, body )
|
||||
{
|
||||
this.setValue( body.getStyle( 'margin-top' ) || body.getAttribute( 'margintop' ) || '' );
|
||||
},
|
||||
commit : commitMargin( 'top' )
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
children : [
|
||||
{
|
||||
type : 'text',
|
||||
id : 'marginLeft',
|
||||
label : lang.marginLeft,
|
||||
style : 'width: 80px; text-align: center',
|
||||
align : 'center',
|
||||
inputStyle : 'text-align: center',
|
||||
setup : function( doc, html, head, body )
|
||||
{
|
||||
this.setValue( body.getStyle( 'margin-left' ) || body.getAttribute( 'marginleft' ) || '' );
|
||||
},
|
||||
commit : commitMargin( 'left' )
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'marginRight',
|
||||
label : lang.marginRight,
|
||||
style : 'width: 80px; text-align: center',
|
||||
align : 'center',
|
||||
inputStyle : 'text-align: center',
|
||||
setup : function( doc, html, head, body )
|
||||
{
|
||||
this.setValue( body.getStyle( 'margin-right' ) || body.getAttribute( 'marginright' ) || '' );
|
||||
},
|
||||
commit : commitMargin( 'right' )
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'marginBottom',
|
||||
label : lang.marginBottom,
|
||||
style : 'width: 80px; text-align: center',
|
||||
align : 'center',
|
||||
inputStyle : 'text-align: center',
|
||||
setup : function( doc, html, head, body )
|
||||
{
|
||||
this.setValue( body.getStyle( 'margin-bottom' ) || body.getAttribute( 'marginbottom' ) || '' );
|
||||
},
|
||||
commit : commitMargin( 'bottom' )
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'meta',
|
||||
label : lang.meta,
|
||||
elements : [
|
||||
{
|
||||
type : 'textarea',
|
||||
id : 'metaKeywords',
|
||||
label : lang.metaKeywords,
|
||||
setup : setupMeta( 'keywords' ),
|
||||
commit : commitMeta( 'keywords' )
|
||||
},
|
||||
{
|
||||
type : 'textarea',
|
||||
id : 'metaDescription',
|
||||
label : lang.metaDescription,
|
||||
setup : setupMeta( 'description' ),
|
||||
commit : commitMeta( 'description' )
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'metaAuthor',
|
||||
label : lang.metaAuthor,
|
||||
setup : setupMeta( 'author' ),
|
||||
commit : commitMeta( 'author' )
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'metaCopyright',
|
||||
label : lang.metaCopyright,
|
||||
setup : setupMeta( 'copyright' ),
|
||||
commit : commitMeta( 'copyright' )
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'preview',
|
||||
label : langCommon.preview,
|
||||
elements : [
|
||||
{
|
||||
type : 'html',
|
||||
id : 'previewHtml',
|
||||
html : '<iframe src="' + previewSrc + '" style="width: 100%; height: 310px" hidefocus="true" frameborder="0" ' +
|
||||
'id="cke_docProps_preview_iframe"></iframe>',
|
||||
onLoad : function()
|
||||
{
|
||||
this.getDialog().on( 'selectPage', function( ev )
|
||||
{
|
||||
if ( ev.data.page == 'preview' )
|
||||
{
|
||||
var self = this;
|
||||
setTimeout( function()
|
||||
{
|
||||
var doc = CKEDITOR.document.getById( 'cke_docProps_preview_iframe' ).getFrameDocument(),
|
||||
html = doc.getElementsByTag( 'html' ).getItem( 0 ),
|
||||
head = doc.getHead(),
|
||||
body = doc.getBody();
|
||||
self.commitContent( doc, html, head, body, 1 );
|
||||
}, 50 );
|
||||
}
|
||||
});
|
||||
CKEDITOR.document.getById( 'cke_docProps_preview_iframe' ).getAscendant( 'table' ).setStyle( 'height', '100%' );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'docprops',
|
||||
{
|
||||
init : function( editor )
|
||||
{
|
||||
var cmd = new CKEDITOR.dialogCommand( 'docProps' );
|
||||
// Only applicable on full page mode.
|
||||
cmd.modes = { wysiwyg : editor.config.fullPage };
|
||||
editor.addCommand( 'docProps', cmd );
|
||||
CKEDITOR.dialog.add( 'docProps', this.path + 'dialogs/docprops.js' );
|
||||
|
||||
editor.ui.addButton( 'DocProps',
|
||||
{
|
||||
label : editor.lang.docprops.label,
|
||||
command : 'docProps'
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,915 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var isReplace;
|
||||
|
||||
function findEvaluator( node )
|
||||
{
|
||||
return node.type == CKEDITOR.NODE_TEXT && node.getLength() > 0 && ( !isReplace || !node.isReadOnly() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Elements which break characters been considered as sequence.
|
||||
*/
|
||||
function nonCharactersBoundary( node )
|
||||
{
|
||||
return !( node.type == CKEDITOR.NODE_ELEMENT && node.isBlockBoundary(
|
||||
CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$empty, CKEDITOR.dtd.$nonEditable ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cursor object which represent both current character and it's dom
|
||||
* position thing.
|
||||
*/
|
||||
var cursorStep = function()
|
||||
{
|
||||
return {
|
||||
textNode : this.textNode,
|
||||
offset : this.offset,
|
||||
character : this.textNode ?
|
||||
this.textNode.getText().charAt( this.offset ) : null,
|
||||
hitMatchBoundary : this._.matchBoundary
|
||||
};
|
||||
};
|
||||
|
||||
var pages = [ 'find', 'replace' ],
|
||||
fieldsMapping = [
|
||||
[ 'txtFindFind', 'txtFindReplace' ],
|
||||
[ 'txtFindCaseChk', 'txtReplaceCaseChk' ],
|
||||
[ 'txtFindWordChk', 'txtReplaceWordChk' ],
|
||||
[ 'txtFindCyclic', 'txtReplaceCyclic' ] ];
|
||||
|
||||
/**
|
||||
* Synchronize corresponding filed values between 'replace' and 'find' pages.
|
||||
* @param {String} currentPageId The page id which receive values.
|
||||
*/
|
||||
function syncFieldsBetweenTabs( currentPageId )
|
||||
{
|
||||
var sourceIndex, targetIndex,
|
||||
sourceField, targetField;
|
||||
|
||||
sourceIndex = currentPageId === 'find' ? 1 : 0;
|
||||
targetIndex = 1 - sourceIndex;
|
||||
var i, l = fieldsMapping.length;
|
||||
for ( i = 0 ; i < l ; i++ )
|
||||
{
|
||||
sourceField = this.getContentElement( pages[ sourceIndex ],
|
||||
fieldsMapping[ i ][ sourceIndex ] );
|
||||
targetField = this.getContentElement( pages[ targetIndex ],
|
||||
fieldsMapping[ i ][ targetIndex ] );
|
||||
|
||||
targetField.setValue( sourceField.getValue() );
|
||||
}
|
||||
}
|
||||
|
||||
var findDialog = function( editor, startupPage )
|
||||
{
|
||||
// Style object for highlights: (#5018)
|
||||
// 1. Defined as full match style to avoid compromising ordinary text color styles.
|
||||
// 2. Must be apply onto inner-most text to avoid conflicting with ordinary text color styles visually.
|
||||
var highlightStyle = new CKEDITOR.style(
|
||||
CKEDITOR.tools.extend( { attributes : { 'data-cke-highlight': 1 }, fullMatch : 1, ignoreReadonly : 1, childRule : function(){ return 0; } },
|
||||
editor.config.find_highlight, true ) );
|
||||
|
||||
/**
|
||||
* Iterator which walk through the specified range char by char. By
|
||||
* default the walking will not stop at the character boundaries, until
|
||||
* the end of the range is encountered.
|
||||
* @param { CKEDITOR.dom.range } range
|
||||
* @param {Boolean} matchWord Whether the walking will stop at character boundary.
|
||||
*/
|
||||
var characterWalker = function( range , matchWord )
|
||||
{
|
||||
var self = this;
|
||||
var walker =
|
||||
new CKEDITOR.dom.walker( range );
|
||||
walker.guard = matchWord ? nonCharactersBoundary : function( node )
|
||||
{
|
||||
!nonCharactersBoundary( node ) && ( self._.matchBoundary = true );
|
||||
};
|
||||
walker[ 'evaluator' ] = findEvaluator;
|
||||
walker.breakOnFalse = 1;
|
||||
|
||||
if ( range.startContainer.type == CKEDITOR.NODE_TEXT )
|
||||
{
|
||||
this.textNode = range.startContainer;
|
||||
this.offset = range.startOffset - 1;
|
||||
}
|
||||
|
||||
this._ = {
|
||||
matchWord : matchWord,
|
||||
walker : walker,
|
||||
matchBoundary : false
|
||||
};
|
||||
};
|
||||
|
||||
characterWalker.prototype = {
|
||||
next : function()
|
||||
{
|
||||
return this.move();
|
||||
},
|
||||
|
||||
back : function()
|
||||
{
|
||||
return this.move( true );
|
||||
},
|
||||
|
||||
move : function( rtl )
|
||||
{
|
||||
var currentTextNode = this.textNode;
|
||||
// Already at the end of document, no more character available.
|
||||
if ( currentTextNode === null )
|
||||
return cursorStep.call( this );
|
||||
|
||||
this._.matchBoundary = false;
|
||||
|
||||
// There are more characters in the text node, step forward.
|
||||
if ( currentTextNode
|
||||
&& rtl
|
||||
&& this.offset > 0 )
|
||||
{
|
||||
this.offset--;
|
||||
return cursorStep.call( this );
|
||||
}
|
||||
else if ( currentTextNode
|
||||
&& this.offset < currentTextNode.getLength() - 1 )
|
||||
{
|
||||
this.offset++;
|
||||
return cursorStep.call( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
currentTextNode = null;
|
||||
// At the end of the text node, walking foward for the next.
|
||||
while ( !currentTextNode )
|
||||
{
|
||||
currentTextNode =
|
||||
this._.walker[ rtl ? 'previous' : 'next' ].call( this._.walker );
|
||||
|
||||
// Stop searching if we're need full word match OR
|
||||
// already reach document end.
|
||||
if ( this._.matchWord && !currentTextNode
|
||||
|| this._.walker._.end )
|
||||
break;
|
||||
}
|
||||
// Found a fresh text node.
|
||||
this.textNode = currentTextNode;
|
||||
if ( currentTextNode )
|
||||
this.offset = rtl ? currentTextNode.getLength() - 1 : 0;
|
||||
else
|
||||
this.offset = 0;
|
||||
}
|
||||
|
||||
return cursorStep.call( this );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* A range of cursors which represent a trunk of characters which try to
|
||||
* match, it has the same length as the pattern string.
|
||||
*/
|
||||
var characterRange = function( characterWalker, rangeLength )
|
||||
{
|
||||
this._ = {
|
||||
walker : characterWalker,
|
||||
cursors : [],
|
||||
rangeLength : rangeLength,
|
||||
highlightRange : null,
|
||||
isMatched : 0
|
||||
};
|
||||
};
|
||||
|
||||
characterRange.prototype = {
|
||||
/**
|
||||
* Translate this range to {@link CKEDITOR.dom.range}
|
||||
*/
|
||||
toDomRange : function()
|
||||
{
|
||||
var range = new CKEDITOR.dom.range( editor.document );
|
||||
var cursors = this._.cursors;
|
||||
if ( cursors.length < 1 )
|
||||
{
|
||||
var textNode = this._.walker.textNode;
|
||||
if ( textNode )
|
||||
range.setStartAfter( textNode );
|
||||
else
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
var first = cursors[0],
|
||||
last = cursors[ cursors.length - 1 ];
|
||||
|
||||
range.setStart( first.textNode, first.offset );
|
||||
range.setEnd( last.textNode, last.offset + 1 );
|
||||
}
|
||||
|
||||
return range;
|
||||
},
|
||||
/**
|
||||
* Reflect the latest changes from dom range.
|
||||
*/
|
||||
updateFromDomRange : function( domRange )
|
||||
{
|
||||
var cursor,
|
||||
walker = new characterWalker( domRange );
|
||||
this._.cursors = [];
|
||||
do
|
||||
{
|
||||
cursor = walker.next();
|
||||
if ( cursor.character )
|
||||
this._.cursors.push( cursor );
|
||||
}
|
||||
while ( cursor.character );
|
||||
this._.rangeLength = this._.cursors.length;
|
||||
},
|
||||
|
||||
setMatched : function()
|
||||
{
|
||||
this._.isMatched = true;
|
||||
},
|
||||
|
||||
clearMatched : function()
|
||||
{
|
||||
this._.isMatched = false;
|
||||
},
|
||||
|
||||
isMatched : function()
|
||||
{
|
||||
return this._.isMatched;
|
||||
},
|
||||
|
||||
/**
|
||||
* Hightlight the current matched chunk of text.
|
||||
*/
|
||||
highlight : function()
|
||||
{
|
||||
// Do not apply if nothing is found.
|
||||
if ( this._.cursors.length < 1 )
|
||||
return;
|
||||
|
||||
// Remove the previous highlight if there's one.
|
||||
if ( this._.highlightRange )
|
||||
this.removeHighlight();
|
||||
|
||||
// Apply the highlight.
|
||||
var range = this.toDomRange(),
|
||||
bookmark = range.createBookmark();
|
||||
highlightStyle.applyToRange( range );
|
||||
range.moveToBookmark( bookmark );
|
||||
this._.highlightRange = range;
|
||||
|
||||
// Scroll the editor to the highlighted area.
|
||||
var element = range.startContainer;
|
||||
if ( element.type != CKEDITOR.NODE_ELEMENT )
|
||||
element = element.getParent();
|
||||
element.scrollIntoView();
|
||||
|
||||
// Update the character cursors.
|
||||
this.updateFromDomRange( range );
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove highlighted find result.
|
||||
*/
|
||||
removeHighlight : function()
|
||||
{
|
||||
if ( !this._.highlightRange )
|
||||
return;
|
||||
|
||||
var bookmark = this._.highlightRange.createBookmark();
|
||||
highlightStyle.removeFromRange( this._.highlightRange );
|
||||
this._.highlightRange.moveToBookmark( bookmark );
|
||||
this.updateFromDomRange( this._.highlightRange );
|
||||
this._.highlightRange = null;
|
||||
},
|
||||
|
||||
isReadOnly : function()
|
||||
{
|
||||
if ( !this._.highlightRange )
|
||||
return 0;
|
||||
|
||||
return this._.highlightRange.startContainer.isReadOnly();
|
||||
},
|
||||
|
||||
moveBack : function()
|
||||
{
|
||||
var retval = this._.walker.back(),
|
||||
cursors = this._.cursors;
|
||||
|
||||
if ( retval.hitMatchBoundary )
|
||||
this._.cursors = cursors = [];
|
||||
|
||||
cursors.unshift( retval );
|
||||
if ( cursors.length > this._.rangeLength )
|
||||
cursors.pop();
|
||||
|
||||
return retval;
|
||||
},
|
||||
|
||||
moveNext : function()
|
||||
{
|
||||
var retval = this._.walker.next(),
|
||||
cursors = this._.cursors;
|
||||
|
||||
// Clear the cursors queue if we've crossed a match boundary.
|
||||
if ( retval.hitMatchBoundary )
|
||||
this._.cursors = cursors = [];
|
||||
|
||||
cursors.push( retval );
|
||||
if ( cursors.length > this._.rangeLength )
|
||||
cursors.shift();
|
||||
|
||||
return retval;
|
||||
},
|
||||
|
||||
getEndCharacter : function()
|
||||
{
|
||||
var cursors = this._.cursors;
|
||||
if ( cursors.length < 1 )
|
||||
return null;
|
||||
|
||||
return cursors[ cursors.length - 1 ].character;
|
||||
},
|
||||
|
||||
getNextCharacterRange : function( maxLength )
|
||||
{
|
||||
var lastCursor,
|
||||
nextRangeWalker,
|
||||
cursors = this._.cursors;
|
||||
|
||||
if ( ( lastCursor = cursors[ cursors.length - 1 ] ) && lastCursor.textNode )
|
||||
nextRangeWalker = new characterWalker( getRangeAfterCursor( lastCursor ) );
|
||||
// In case it's an empty range (no cursors), figure out next range from walker (#4951).
|
||||
else
|
||||
nextRangeWalker = this._.walker;
|
||||
|
||||
return new characterRange( nextRangeWalker, maxLength );
|
||||
},
|
||||
|
||||
getCursors : function()
|
||||
{
|
||||
return this._.cursors;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// The remaining document range after the character cursor.
|
||||
function getRangeAfterCursor( cursor , inclusive )
|
||||
{
|
||||
var range = new CKEDITOR.dom.range();
|
||||
range.setStart( cursor.textNode,
|
||||
( inclusive ? cursor.offset : cursor.offset + 1 ) );
|
||||
range.setEndAt( editor.document.getBody(),
|
||||
CKEDITOR.POSITION_BEFORE_END );
|
||||
return range;
|
||||
}
|
||||
|
||||
// The document range before the character cursor.
|
||||
function getRangeBeforeCursor( cursor )
|
||||
{
|
||||
var range = new CKEDITOR.dom.range();
|
||||
range.setStartAt( editor.document.getBody(),
|
||||
CKEDITOR.POSITION_AFTER_START );
|
||||
range.setEnd( cursor.textNode, cursor.offset );
|
||||
return range;
|
||||
}
|
||||
|
||||
var KMP_NOMATCH = 0,
|
||||
KMP_ADVANCED = 1,
|
||||
KMP_MATCHED = 2;
|
||||
/**
|
||||
* Examination the occurrence of a word which implement KMP algorithm.
|
||||
*/
|
||||
var kmpMatcher = function( pattern, ignoreCase )
|
||||
{
|
||||
var overlap = [ -1 ];
|
||||
if ( ignoreCase )
|
||||
pattern = pattern.toLowerCase();
|
||||
for ( var i = 0 ; i < pattern.length ; i++ )
|
||||
{
|
||||
overlap.push( overlap[i] + 1 );
|
||||
while ( overlap[ i + 1 ] > 0
|
||||
&& pattern.charAt( i ) != pattern
|
||||
.charAt( overlap[ i + 1 ] - 1 ) )
|
||||
overlap[ i + 1 ] = overlap[ overlap[ i + 1 ] - 1 ] + 1;
|
||||
}
|
||||
|
||||
this._ = {
|
||||
overlap : overlap,
|
||||
state : 0,
|
||||
ignoreCase : !!ignoreCase,
|
||||
pattern : pattern
|
||||
};
|
||||
};
|
||||
|
||||
kmpMatcher.prototype =
|
||||
{
|
||||
feedCharacter : function( c )
|
||||
{
|
||||
if ( this._.ignoreCase )
|
||||
c = c.toLowerCase();
|
||||
|
||||
while ( true )
|
||||
{
|
||||
if ( c == this._.pattern.charAt( this._.state ) )
|
||||
{
|
||||
this._.state++;
|
||||
if ( this._.state == this._.pattern.length )
|
||||
{
|
||||
this._.state = 0;
|
||||
return KMP_MATCHED;
|
||||
}
|
||||
return KMP_ADVANCED;
|
||||
}
|
||||
else if ( !this._.state )
|
||||
return KMP_NOMATCH;
|
||||
else
|
||||
this._.state = this._.overlap[ this._.state ];
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
reset : function()
|
||||
{
|
||||
this._.state = 0;
|
||||
}
|
||||
};
|
||||
|
||||
var wordSeparatorRegex =
|
||||
/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/;
|
||||
|
||||
var isWordSeparator = function( c )
|
||||
{
|
||||
if ( !c )
|
||||
return true;
|
||||
var code = c.charCodeAt( 0 );
|
||||
return ( code >= 9 && code <= 0xd )
|
||||
|| ( code >= 0x2000 && code <= 0x200a )
|
||||
|| wordSeparatorRegex.test( c );
|
||||
};
|
||||
|
||||
var finder = {
|
||||
searchRange : null,
|
||||
matchRange : null,
|
||||
find : function( pattern, matchCase, matchWord, matchCyclic, highlightMatched, cyclicRerun )
|
||||
{
|
||||
if ( !this.matchRange )
|
||||
this.matchRange =
|
||||
new characterRange(
|
||||
new characterWalker( this.searchRange ),
|
||||
pattern.length );
|
||||
else
|
||||
{
|
||||
this.matchRange.removeHighlight();
|
||||
this.matchRange = this.matchRange.getNextCharacterRange( pattern.length );
|
||||
}
|
||||
|
||||
var matcher = new kmpMatcher( pattern, !matchCase ),
|
||||
matchState = KMP_NOMATCH,
|
||||
character = '%';
|
||||
|
||||
while ( character !== null )
|
||||
{
|
||||
this.matchRange.moveNext();
|
||||
while ( ( character = this.matchRange.getEndCharacter() ) )
|
||||
{
|
||||
matchState = matcher.feedCharacter( character );
|
||||
if ( matchState == KMP_MATCHED )
|
||||
break;
|
||||
if ( this.matchRange.moveNext().hitMatchBoundary )
|
||||
matcher.reset();
|
||||
}
|
||||
|
||||
if ( matchState == KMP_MATCHED )
|
||||
{
|
||||
if ( matchWord )
|
||||
{
|
||||
var cursors = this.matchRange.getCursors(),
|
||||
tail = cursors[ cursors.length - 1 ],
|
||||
head = cursors[ 0 ];
|
||||
|
||||
var headWalker = new characterWalker( getRangeBeforeCursor( head ), true ),
|
||||
tailWalker = new characterWalker( getRangeAfterCursor( tail ), true );
|
||||
|
||||
if ( ! ( isWordSeparator( headWalker.back().character )
|
||||
&& isWordSeparator( tailWalker.next().character ) ) )
|
||||
continue;
|
||||
}
|
||||
this.matchRange.setMatched();
|
||||
if ( highlightMatched !== false )
|
||||
this.matchRange.highlight();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
this.matchRange.clearMatched();
|
||||
this.matchRange.removeHighlight();
|
||||
// Clear current session and restart with the default search
|
||||
// range.
|
||||
// Re-run the finding once for cyclic.(#3517)
|
||||
if ( matchCyclic && !cyclicRerun )
|
||||
{
|
||||
this.searchRange = getSearchRange( 1 );
|
||||
this.matchRange = null;
|
||||
return arguments.callee.apply( this,
|
||||
Array.prototype.slice.call( arguments ).concat( [ true ] ) );
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Record how much replacement occurred toward one replacing.
|
||||
*/
|
||||
replaceCounter : 0,
|
||||
|
||||
replace : function( dialog, pattern, newString, matchCase, matchWord,
|
||||
matchCyclic , isReplaceAll )
|
||||
{
|
||||
isReplace = 1;
|
||||
|
||||
// Successiveness of current replace/find.
|
||||
var result = 0;
|
||||
|
||||
// 1. Perform the replace when there's already a match here.
|
||||
// 2. Otherwise perform the find but don't replace it immediately.
|
||||
if ( this.matchRange && this.matchRange.isMatched()
|
||||
&& !this.matchRange._.isReplaced && !this.matchRange.isReadOnly() )
|
||||
{
|
||||
// Turn off highlight for a while when saving snapshots.
|
||||
this.matchRange.removeHighlight();
|
||||
var domRange = this.matchRange.toDomRange();
|
||||
var text = editor.document.createText( newString );
|
||||
if ( !isReplaceAll )
|
||||
{
|
||||
// Save undo snaps before and after the replacement.
|
||||
var selection = editor.getSelection();
|
||||
selection.selectRanges( [ domRange ] );
|
||||
editor.fire( 'saveSnapshot' );
|
||||
}
|
||||
domRange.deleteContents();
|
||||
domRange.insertNode( text );
|
||||
if ( !isReplaceAll )
|
||||
{
|
||||
selection.selectRanges( [ domRange ] );
|
||||
editor.fire( 'saveSnapshot' );
|
||||
}
|
||||
this.matchRange.updateFromDomRange( domRange );
|
||||
if ( !isReplaceAll )
|
||||
this.matchRange.highlight();
|
||||
this.matchRange._.isReplaced = true;
|
||||
this.replaceCounter++;
|
||||
result = 1;
|
||||
}
|
||||
else
|
||||
result = this.find( pattern, matchCase, matchWord, matchCyclic, !isReplaceAll );
|
||||
|
||||
isReplace = 0;
|
||||
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The range in which find/replace happened, receive from user
|
||||
* selection prior.
|
||||
*/
|
||||
function getSearchRange( isDefault )
|
||||
{
|
||||
var searchRange,
|
||||
sel = editor.getSelection(),
|
||||
body = editor.document.getBody();
|
||||
if ( sel && !isDefault )
|
||||
{
|
||||
searchRange = sel.getRanges()[ 0 ].clone();
|
||||
searchRange.collapse( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
searchRange = new CKEDITOR.dom.range();
|
||||
searchRange.setStartAt( body, CKEDITOR.POSITION_AFTER_START );
|
||||
}
|
||||
searchRange.setEndAt( body, CKEDITOR.POSITION_BEFORE_END );
|
||||
return searchRange;
|
||||
}
|
||||
|
||||
var lang = editor.lang.findAndReplace;
|
||||
return {
|
||||
title : lang.title,
|
||||
resizable : CKEDITOR.DIALOG_RESIZE_NONE,
|
||||
minWidth : 350,
|
||||
minHeight : 170,
|
||||
buttons : [ CKEDITOR.dialog.cancelButton ], // Cancel button only.
|
||||
contents : [
|
||||
{
|
||||
id : 'find',
|
||||
label : lang.find,
|
||||
title : lang.find,
|
||||
accessKey : '',
|
||||
elements : [
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '230px', '90px' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'text',
|
||||
id : 'txtFindFind',
|
||||
label : lang.findWhat,
|
||||
isChanged : false,
|
||||
labelLayout : 'horizontal',
|
||||
accessKey : 'F'
|
||||
},
|
||||
{
|
||||
type : 'button',
|
||||
id : 'btnFind',
|
||||
align : 'left',
|
||||
style : 'width:100%',
|
||||
label : lang.find,
|
||||
onClick : function()
|
||||
{
|
||||
var dialog = this.getDialog();
|
||||
if ( !finder.find( dialog.getValueOf( 'find', 'txtFindFind' ),
|
||||
dialog.getValueOf( 'find', 'txtFindCaseChk' ),
|
||||
dialog.getValueOf( 'find', 'txtFindWordChk' ),
|
||||
dialog.getValueOf( 'find', 'txtFindCyclic' ) ) )
|
||||
alert( lang
|
||||
.notFoundMsg );
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'fieldset',
|
||||
label : CKEDITOR.tools.htmlEncode( lang.findOptions ),
|
||||
style : 'margin-top:29px',
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'vbox',
|
||||
padding : 0,
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'checkbox',
|
||||
id : 'txtFindCaseChk',
|
||||
isChanged : false,
|
||||
label : lang.matchCase
|
||||
},
|
||||
{
|
||||
type : 'checkbox',
|
||||
id : 'txtFindWordChk',
|
||||
isChanged : false,
|
||||
label : lang.matchWord
|
||||
},
|
||||
{
|
||||
type : 'checkbox',
|
||||
id : 'txtFindCyclic',
|
||||
isChanged : false,
|
||||
'default' : true,
|
||||
label : lang.matchCyclic
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'replace',
|
||||
label : lang.replace,
|
||||
accessKey : 'M',
|
||||
elements : [
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '230px', '90px' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'text',
|
||||
id : 'txtFindReplace',
|
||||
label : lang.findWhat,
|
||||
isChanged : false,
|
||||
labelLayout : 'horizontal',
|
||||
accessKey : 'F'
|
||||
},
|
||||
{
|
||||
type : 'button',
|
||||
id : 'btnFindReplace',
|
||||
align : 'left',
|
||||
style : 'width:100%',
|
||||
label : lang.replace,
|
||||
onClick : function()
|
||||
{
|
||||
var dialog = this.getDialog();
|
||||
if ( !finder.replace( dialog,
|
||||
dialog.getValueOf( 'replace', 'txtFindReplace' ),
|
||||
dialog.getValueOf( 'replace', 'txtReplace' ),
|
||||
dialog.getValueOf( 'replace', 'txtReplaceCaseChk' ),
|
||||
dialog.getValueOf( 'replace', 'txtReplaceWordChk' ),
|
||||
dialog.getValueOf( 'replace', 'txtReplaceCyclic' ) ) )
|
||||
alert( lang
|
||||
.notFoundMsg );
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '230px', '90px' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'text',
|
||||
id : 'txtReplace',
|
||||
label : lang.replaceWith,
|
||||
isChanged : false,
|
||||
labelLayout : 'horizontal',
|
||||
accessKey : 'R'
|
||||
},
|
||||
{
|
||||
type : 'button',
|
||||
id : 'btnReplaceAll',
|
||||
align : 'left',
|
||||
style : 'width:100%',
|
||||
label : lang.replaceAll,
|
||||
isChanged : false,
|
||||
onClick : function()
|
||||
{
|
||||
var dialog = this.getDialog();
|
||||
var replaceNums;
|
||||
|
||||
finder.replaceCounter = 0;
|
||||
|
||||
// Scope to full document.
|
||||
finder.searchRange = getSearchRange( 1 );
|
||||
if ( finder.matchRange )
|
||||
{
|
||||
finder.matchRange.removeHighlight();
|
||||
finder.matchRange = null;
|
||||
}
|
||||
editor.fire( 'saveSnapshot' );
|
||||
while ( finder.replace( dialog,
|
||||
dialog.getValueOf( 'replace', 'txtFindReplace' ),
|
||||
dialog.getValueOf( 'replace', 'txtReplace' ),
|
||||
dialog.getValueOf( 'replace', 'txtReplaceCaseChk' ),
|
||||
dialog.getValueOf( 'replace', 'txtReplaceWordChk' ),
|
||||
false, true ) )
|
||||
{ /*jsl:pass*/ }
|
||||
|
||||
if ( finder.replaceCounter )
|
||||
{
|
||||
alert( lang.replaceSuccessMsg.replace( /%1/, finder.replaceCounter ) );
|
||||
editor.fire( 'saveSnapshot' );
|
||||
}
|
||||
else
|
||||
alert( lang.notFoundMsg );
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'fieldset',
|
||||
label : CKEDITOR.tools.htmlEncode( lang.findOptions ),
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'vbox',
|
||||
padding : 0,
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'checkbox',
|
||||
id : 'txtReplaceCaseChk',
|
||||
isChanged : false,
|
||||
label : lang.matchCase
|
||||
},
|
||||
{
|
||||
type : 'checkbox',
|
||||
id : 'txtReplaceWordChk',
|
||||
isChanged : false,
|
||||
label : lang.matchWord
|
||||
},
|
||||
{
|
||||
type : 'checkbox',
|
||||
id : 'txtReplaceCyclic',
|
||||
isChanged : false,
|
||||
'default' : true,
|
||||
label : lang.matchCyclic
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
onLoad : function()
|
||||
{
|
||||
var dialog = this;
|
||||
|
||||
// Keep track of the current pattern field in use.
|
||||
var patternField, wholeWordChkField;
|
||||
|
||||
// Ignore initial page select on dialog show
|
||||
var isUserSelect = 0;
|
||||
this.on( 'hide', function()
|
||||
{
|
||||
isUserSelect = 0;
|
||||
});
|
||||
this.on( 'show', function()
|
||||
{
|
||||
isUserSelect = 1;
|
||||
});
|
||||
|
||||
this.selectPage = CKEDITOR.tools.override( this.selectPage, function( originalFunc )
|
||||
{
|
||||
return function( pageId )
|
||||
{
|
||||
originalFunc.call( dialog, pageId );
|
||||
|
||||
var currPage = dialog._.tabs[ pageId ];
|
||||
var patternFieldInput, patternFieldId, wholeWordChkFieldId;
|
||||
patternFieldId = pageId === 'find' ? 'txtFindFind' : 'txtFindReplace';
|
||||
wholeWordChkFieldId = pageId === 'find' ? 'txtFindWordChk' : 'txtReplaceWordChk';
|
||||
|
||||
patternField = dialog.getContentElement( pageId,
|
||||
patternFieldId );
|
||||
wholeWordChkField = dialog.getContentElement( pageId,
|
||||
wholeWordChkFieldId );
|
||||
|
||||
// Prepare for check pattern text filed 'keyup' event
|
||||
if ( !currPage.initialized )
|
||||
{
|
||||
patternFieldInput = CKEDITOR.document
|
||||
.getById( patternField._.inputId );
|
||||
currPage.initialized = true;
|
||||
}
|
||||
|
||||
// Synchronize fields on tab switch.
|
||||
if ( isUserSelect )
|
||||
syncFieldsBetweenTabs.call( this, pageId );
|
||||
};
|
||||
} );
|
||||
|
||||
},
|
||||
onShow : function()
|
||||
{
|
||||
// Establish initial searching start position.
|
||||
finder.searchRange = getSearchRange();
|
||||
|
||||
// Fill in the find field with selected text.
|
||||
var selectedText = this.getParentEditor().getSelection().getSelectedText(),
|
||||
patternFieldId = ( startupPage == 'find' ? 'txtFindFind' : 'txtFindReplace' );
|
||||
|
||||
var field = this.getContentElement( startupPage, patternFieldId );
|
||||
field.setValue( selectedText );
|
||||
field.select();
|
||||
|
||||
this.selectPage( startupPage );
|
||||
|
||||
this[ ( startupPage == 'find' && this._.editor.readOnly? 'hide' : 'show' ) + 'Page' ]( 'replace');
|
||||
},
|
||||
onHide : function()
|
||||
{
|
||||
var range;
|
||||
if ( finder.matchRange && finder.matchRange.isMatched() )
|
||||
{
|
||||
finder.matchRange.removeHighlight();
|
||||
editor.focus();
|
||||
|
||||
range = finder.matchRange.toDomRange();
|
||||
if ( range )
|
||||
editor.getSelection().selectRanges( [ range ] );
|
||||
}
|
||||
|
||||
// Clear current session before dialog close
|
||||
delete finder.matchRange;
|
||||
},
|
||||
onFocus : function()
|
||||
{
|
||||
if ( startupPage == 'replace' )
|
||||
return this.getContentElement( 'replace', 'txtFindReplace' );
|
||||
else
|
||||
return this.getContentElement( 'find', 'txtFindFind' );
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
CKEDITOR.dialog.add( 'find', function( editor )
|
||||
{
|
||||
return findDialog( editor, 'find' );
|
||||
});
|
||||
|
||||
CKEDITOR.dialog.add( 'replace', function( editor )
|
||||
{
|
||||
return findDialog( editor, 'replace' );
|
||||
});
|
||||
})();
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,674 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
/*
|
||||
* It is possible to set things in three different places.
|
||||
* 1. As attributes in the object tag.
|
||||
* 2. As param tags under the object tag.
|
||||
* 3. As attributes in the embed tag.
|
||||
* It is possible for a single attribute to be present in more than one place.
|
||||
* So let's define a mapping between a sementic attribute and its syntactic
|
||||
* equivalents.
|
||||
* Then we'll set and retrieve attribute values according to the mapping,
|
||||
* instead of having to check and set each syntactic attribute every time.
|
||||
*
|
||||
* Reference: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701
|
||||
*/
|
||||
var ATTRTYPE_OBJECT = 1,
|
||||
ATTRTYPE_PARAM = 2,
|
||||
ATTRTYPE_EMBED = 4;
|
||||
|
||||
var attributesMap =
|
||||
{
|
||||
id : [ { type : ATTRTYPE_OBJECT, name : 'id' } ],
|
||||
classid : [ { type : ATTRTYPE_OBJECT, name : 'classid' } ],
|
||||
codebase : [ { type : ATTRTYPE_OBJECT, name : 'codebase'} ],
|
||||
pluginspage : [ { type : ATTRTYPE_EMBED, name : 'pluginspage' } ],
|
||||
src : [ { type : ATTRTYPE_PARAM, name : 'movie' }, { type : ATTRTYPE_EMBED, name : 'src' }, { type : ATTRTYPE_OBJECT, name : 'data' } ],
|
||||
name : [ { type : ATTRTYPE_EMBED, name : 'name' } ],
|
||||
align : [ { type : ATTRTYPE_OBJECT, name : 'align' } ],
|
||||
title : [ { type : ATTRTYPE_OBJECT, name : 'title' }, { type : ATTRTYPE_EMBED, name : 'title' } ],
|
||||
'class' : [ { type : ATTRTYPE_OBJECT, name : 'class' }, { type : ATTRTYPE_EMBED, name : 'class'} ],
|
||||
width : [ { type : ATTRTYPE_OBJECT, name : 'width' }, { type : ATTRTYPE_EMBED, name : 'width' } ],
|
||||
height : [ { type : ATTRTYPE_OBJECT, name : 'height' }, { type : ATTRTYPE_EMBED, name : 'height' } ],
|
||||
hSpace : [ { type : ATTRTYPE_OBJECT, name : 'hSpace' }, { type : ATTRTYPE_EMBED, name : 'hSpace' } ],
|
||||
vSpace : [ { type : ATTRTYPE_OBJECT, name : 'vSpace' }, { type : ATTRTYPE_EMBED, name : 'vSpace' } ],
|
||||
style : [ { type : ATTRTYPE_OBJECT, name : 'style' }, { type : ATTRTYPE_EMBED, name : 'style' } ],
|
||||
type : [ { type : ATTRTYPE_EMBED, name : 'type' } ]
|
||||
};
|
||||
|
||||
var names = [ 'play', 'loop', 'menu', 'quality', 'scale', 'salign', 'wmode', 'bgcolor', 'base', 'flashvars', 'allowScriptAccess',
|
||||
'allowFullScreen' ];
|
||||
for ( var i = 0 ; i < names.length ; i++ )
|
||||
attributesMap[ names[i] ] = [ { type : ATTRTYPE_EMBED, name : names[i] }, { type : ATTRTYPE_PARAM, name : names[i] } ];
|
||||
names = [ 'allowFullScreen', 'play', 'loop', 'menu' ];
|
||||
for ( i = 0 ; i < names.length ; i++ )
|
||||
attributesMap[ names[i] ][0]['default'] = attributesMap[ names[i] ][1]['default'] = true;
|
||||
|
||||
var defaultToPixel = CKEDITOR.tools.cssLength;
|
||||
|
||||
function loadValue( objectNode, embedNode, paramMap )
|
||||
{
|
||||
var attributes = attributesMap[ this.id ];
|
||||
if ( !attributes )
|
||||
return;
|
||||
|
||||
var isCheckbox = ( this instanceof CKEDITOR.ui.dialog.checkbox );
|
||||
for ( var i = 0 ; i < attributes.length ; i++ )
|
||||
{
|
||||
var attrDef = attributes[ i ];
|
||||
switch ( attrDef.type )
|
||||
{
|
||||
case ATTRTYPE_OBJECT:
|
||||
if ( !objectNode )
|
||||
continue;
|
||||
if ( objectNode.getAttribute( attrDef.name ) !== null )
|
||||
{
|
||||
var value = objectNode.getAttribute( attrDef.name );
|
||||
if ( isCheckbox )
|
||||
this.setValue( value.toLowerCase() == 'true' );
|
||||
else
|
||||
this.setValue( value );
|
||||
return;
|
||||
}
|
||||
else if ( isCheckbox )
|
||||
this.setValue( !!attrDef[ 'default' ] );
|
||||
break;
|
||||
case ATTRTYPE_PARAM:
|
||||
if ( !objectNode )
|
||||
continue;
|
||||
if ( attrDef.name in paramMap )
|
||||
{
|
||||
value = paramMap[ attrDef.name ];
|
||||
if ( isCheckbox )
|
||||
this.setValue( value.toLowerCase() == 'true' );
|
||||
else
|
||||
this.setValue( value );
|
||||
return;
|
||||
}
|
||||
else if ( isCheckbox )
|
||||
this.setValue( !!attrDef[ 'default' ] );
|
||||
break;
|
||||
case ATTRTYPE_EMBED:
|
||||
if ( !embedNode )
|
||||
continue;
|
||||
if ( embedNode.getAttribute( attrDef.name ) )
|
||||
{
|
||||
value = embedNode.getAttribute( attrDef.name );
|
||||
if ( isCheckbox )
|
||||
this.setValue( value.toLowerCase() == 'true' );
|
||||
else
|
||||
this.setValue( value );
|
||||
return;
|
||||
}
|
||||
else if ( isCheckbox )
|
||||
this.setValue( !!attrDef[ 'default' ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function commitValue( objectNode, embedNode, paramMap )
|
||||
{
|
||||
var attributes = attributesMap[ this.id ];
|
||||
if ( !attributes )
|
||||
return;
|
||||
|
||||
var isRemove = ( this.getValue() === '' ),
|
||||
isCheckbox = ( this instanceof CKEDITOR.ui.dialog.checkbox );
|
||||
|
||||
for ( var i = 0 ; i < attributes.length ; i++ )
|
||||
{
|
||||
var attrDef = attributes[i];
|
||||
switch ( attrDef.type )
|
||||
{
|
||||
case ATTRTYPE_OBJECT:
|
||||
// Avoid applying the data attribute when not needed (#7733)
|
||||
if ( !objectNode || ( attrDef.name == 'data' && embedNode && !objectNode.hasAttribute( 'data' ) ) )
|
||||
continue;
|
||||
var value = this.getValue();
|
||||
if ( isRemove || isCheckbox && value === attrDef[ 'default' ] )
|
||||
objectNode.removeAttribute( attrDef.name );
|
||||
else
|
||||
objectNode.setAttribute( attrDef.name, value );
|
||||
break;
|
||||
case ATTRTYPE_PARAM:
|
||||
if ( !objectNode )
|
||||
continue;
|
||||
value = this.getValue();
|
||||
if ( isRemove || isCheckbox && value === attrDef[ 'default' ] )
|
||||
{
|
||||
if ( attrDef.name in paramMap )
|
||||
paramMap[ attrDef.name ].remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( attrDef.name in paramMap )
|
||||
paramMap[ attrDef.name ].setAttribute( 'value', value );
|
||||
else
|
||||
{
|
||||
var param = CKEDITOR.dom.element.createFromHtml( '<cke:param></cke:param>', objectNode.getDocument() );
|
||||
param.setAttributes( { name : attrDef.name, value : value } );
|
||||
if ( objectNode.getChildCount() < 1 )
|
||||
param.appendTo( objectNode );
|
||||
else
|
||||
param.insertBefore( objectNode.getFirst() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ATTRTYPE_EMBED:
|
||||
if ( !embedNode )
|
||||
continue;
|
||||
value = this.getValue();
|
||||
if ( isRemove || isCheckbox && value === attrDef[ 'default' ])
|
||||
embedNode.removeAttribute( attrDef.name );
|
||||
else
|
||||
embedNode.setAttribute( attrDef.name, value );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.dialog.add( 'flash', function( editor )
|
||||
{
|
||||
var makeObjectTag = !editor.config.flashEmbedTagOnly,
|
||||
makeEmbedTag = editor.config.flashAddEmbedTag || editor.config.flashEmbedTagOnly;
|
||||
|
||||
var previewPreloader,
|
||||
previewAreaHtml = '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'<br>' +
|
||||
'<div id="cke_FlashPreviewLoader' + CKEDITOR.tools.getNextNumber() + '" style="display:none"><div class="loading"> </div></div>' +
|
||||
'<div id="cke_FlashPreviewBox' + CKEDITOR.tools.getNextNumber() + '" class="FlashPreviewBox"></div></div>';
|
||||
|
||||
return {
|
||||
title : editor.lang.flash.title,
|
||||
minWidth : 420,
|
||||
minHeight : 310,
|
||||
onShow : function()
|
||||
{
|
||||
// Clear previously saved elements.
|
||||
this.fakeImage = this.objectNode = this.embedNode = null;
|
||||
previewPreloader = new CKEDITOR.dom.element( 'embed', editor.document );
|
||||
|
||||
// Try to detect any embed or object tag that has Flash parameters.
|
||||
var fakeImage = this.getSelectedElement();
|
||||
if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'flash' )
|
||||
{
|
||||
this.fakeImage = fakeImage;
|
||||
|
||||
var realElement = editor.restoreRealElement( fakeImage ),
|
||||
objectNode = null, embedNode = null, paramMap = {};
|
||||
if ( realElement.getName() == 'cke:object' )
|
||||
{
|
||||
objectNode = realElement;
|
||||
var embedList = objectNode.getElementsByTag( 'embed', 'cke' );
|
||||
if ( embedList.count() > 0 )
|
||||
embedNode = embedList.getItem( 0 );
|
||||
var paramList = objectNode.getElementsByTag( 'param', 'cke' );
|
||||
for ( var i = 0, length = paramList.count() ; i < length ; i++ )
|
||||
{
|
||||
var item = paramList.getItem( i ),
|
||||
name = item.getAttribute( 'name' ),
|
||||
value = item.getAttribute( 'value' );
|
||||
paramMap[ name ] = value;
|
||||
}
|
||||
}
|
||||
else if ( realElement.getName() == 'cke:embed' )
|
||||
embedNode = realElement;
|
||||
|
||||
this.objectNode = objectNode;
|
||||
this.embedNode = embedNode;
|
||||
|
||||
this.setupContent( objectNode, embedNode, paramMap, fakeImage );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
// If there's no selected object or embed, create one. Otherwise, reuse the
|
||||
// selected object and embed nodes.
|
||||
var objectNode = null,
|
||||
embedNode = null,
|
||||
paramMap = null;
|
||||
if ( !this.fakeImage )
|
||||
{
|
||||
if ( makeObjectTag )
|
||||
{
|
||||
objectNode = CKEDITOR.dom.element.createFromHtml( '<cke:object></cke:object>', editor.document );
|
||||
var attributes = {
|
||||
classid : 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',
|
||||
codebase : 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'
|
||||
};
|
||||
objectNode.setAttributes( attributes );
|
||||
}
|
||||
if ( makeEmbedTag )
|
||||
{
|
||||
embedNode = CKEDITOR.dom.element.createFromHtml( '<cke:embed></cke:embed>', editor.document );
|
||||
embedNode.setAttributes(
|
||||
{
|
||||
type : 'application/x-shockwave-flash',
|
||||
pluginspage : 'http://www.macromedia.com/go/getflashplayer'
|
||||
} );
|
||||
if ( objectNode )
|
||||
embedNode.appendTo( objectNode );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
objectNode = this.objectNode;
|
||||
embedNode = this.embedNode;
|
||||
}
|
||||
|
||||
// Produce the paramMap if there's an object tag.
|
||||
if ( objectNode )
|
||||
{
|
||||
paramMap = {};
|
||||
var paramList = objectNode.getElementsByTag( 'param', 'cke' );
|
||||
for ( var i = 0, length = paramList.count() ; i < length ; i++ )
|
||||
paramMap[ paramList.getItem( i ).getAttribute( 'name' ) ] = paramList.getItem( i );
|
||||
}
|
||||
|
||||
// A subset of the specified attributes/styles
|
||||
// should also be applied on the fake element to
|
||||
// have better visual effect. (#5240)
|
||||
var extraStyles = {}, extraAttributes = {};
|
||||
this.commitContent( objectNode, embedNode, paramMap, extraStyles, extraAttributes );
|
||||
|
||||
// Refresh the fake image.
|
||||
var newFakeImage = editor.createFakeElement( objectNode || embedNode, 'cke_flash', 'flash', true );
|
||||
newFakeImage.setAttributes( extraAttributes );
|
||||
newFakeImage.setStyles( extraStyles );
|
||||
if ( this.fakeImage )
|
||||
{
|
||||
newFakeImage.replace( this.fakeImage );
|
||||
editor.getSelection().selectElement( newFakeImage );
|
||||
}
|
||||
else
|
||||
editor.insertElement( newFakeImage );
|
||||
},
|
||||
|
||||
onHide : function()
|
||||
{
|
||||
if ( this.preview )
|
||||
this.preview.setHtml('');
|
||||
},
|
||||
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.common.generalTab,
|
||||
accessKey : 'I',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'vbox',
|
||||
padding : 0,
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '280px', '110px' ],
|
||||
align : 'right',
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'src',
|
||||
type : 'text',
|
||||
label : editor.lang.common.url,
|
||||
required : true,
|
||||
validate : CKEDITOR.dialog.validate.notEmpty( editor.lang.flash.validateSrc ),
|
||||
setup : loadValue,
|
||||
commit : commitValue,
|
||||
onLoad : function()
|
||||
{
|
||||
var dialog = this.getDialog(),
|
||||
updatePreview = function( src ){
|
||||
// Query the preloader to figure out the url impacted by based href.
|
||||
previewPreloader.setAttribute( 'src', src );
|
||||
dialog.preview.setHtml( '<embed height="100%" width="100%" src="'
|
||||
+ CKEDITOR.tools.htmlEncode( previewPreloader.getAttribute( 'src' ) )
|
||||
+ '" type="application/x-shockwave-flash"></embed>' );
|
||||
};
|
||||
// Preview element
|
||||
dialog.preview = dialog.getContentElement( 'info', 'preview' ).getElement().getChild( 3 );
|
||||
|
||||
// Sync on inital value loaded.
|
||||
this.on( 'change', function( evt ){
|
||||
|
||||
if ( evt.data && evt.data.value )
|
||||
updatePreview( evt.data.value );
|
||||
} );
|
||||
// Sync when input value changed.
|
||||
this.getInputElement().on( 'change', function( evt ){
|
||||
|
||||
updatePreview( this.getValue() );
|
||||
}, this );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'button',
|
||||
id : 'browse',
|
||||
filebrowser : 'info:src',
|
||||
hidden : true,
|
||||
// v-align with the 'src' field.
|
||||
// TODO: We need something better than a fixed size here.
|
||||
style : 'display:inline-block;margin-top:10px;',
|
||||
label : editor.lang.common.browseServer
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '25%', '25%', '25%', '25%', '25%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'text',
|
||||
id : 'width',
|
||||
style : 'width:95px',
|
||||
label : editor.lang.common.width,
|
||||
validate : CKEDITOR.dialog.validate.htmlLength( editor.lang.common.invalidHtmlLength.replace( '%1', editor.lang.common.width ) ),
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'height',
|
||||
style : 'width:95px',
|
||||
label : editor.lang.common.height,
|
||||
validate : CKEDITOR.dialog.validate.htmlLength( editor.lang.common.invalidHtmlLength.replace( '%1', editor.lang.common.height ) ),
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'hSpace',
|
||||
style : 'width:95px',
|
||||
label : editor.lang.flash.hSpace,
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateHSpace ),
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'vSpace',
|
||||
style : 'width:95px',
|
||||
label : editor.lang.flash.vSpace,
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateVSpace ),
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
type : 'vbox',
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
id : 'preview',
|
||||
style : 'width:95%;',
|
||||
html : previewAreaHtml
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'Upload',
|
||||
hidden : true,
|
||||
filebrowser : 'uploadButton',
|
||||
label : editor.lang.common.upload,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'file',
|
||||
id : 'upload',
|
||||
label : editor.lang.common.upload,
|
||||
size : 38
|
||||
},
|
||||
{
|
||||
type : 'fileButton',
|
||||
id : 'uploadButton',
|
||||
label : editor.lang.common.uploadSubmit,
|
||||
filebrowser : 'info:src',
|
||||
'for' : [ 'Upload', 'upload' ]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'properties',
|
||||
label : editor.lang.flash.propertiesTab,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'scale',
|
||||
type : 'select',
|
||||
label : editor.lang.flash.scale,
|
||||
'default' : '',
|
||||
style : 'width : 100%;',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.common.notSet , ''],
|
||||
[ editor.lang.flash.scaleAll, 'showall' ],
|
||||
[ editor.lang.flash.scaleNoBorder, 'noborder' ],
|
||||
[ editor.lang.flash.scaleFit, 'exactfit' ]
|
||||
],
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
id : 'allowScriptAccess',
|
||||
type : 'select',
|
||||
label : editor.lang.flash.access,
|
||||
'default' : '',
|
||||
style : 'width : 100%;',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.common.notSet , ''],
|
||||
[ editor.lang.flash.accessAlways, 'always' ],
|
||||
[ editor.lang.flash.accessSameDomain, 'samedomain' ],
|
||||
[ editor.lang.flash.accessNever, 'never' ]
|
||||
],
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'wmode',
|
||||
type : 'select',
|
||||
label : editor.lang.flash.windowMode,
|
||||
'default' : '',
|
||||
style : 'width : 100%;',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.common.notSet , '' ],
|
||||
[ editor.lang.flash.windowModeWindow, 'window' ],
|
||||
[ editor.lang.flash.windowModeOpaque, 'opaque' ],
|
||||
[ editor.lang.flash.windowModeTransparent, 'transparent' ]
|
||||
],
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
id : 'quality',
|
||||
type : 'select',
|
||||
label : editor.lang.flash.quality,
|
||||
'default' : 'high',
|
||||
style : 'width : 100%;',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.common.notSet , '' ],
|
||||
[ editor.lang.flash.qualityBest, 'best' ],
|
||||
[ editor.lang.flash.qualityHigh, 'high' ],
|
||||
[ editor.lang.flash.qualityAutoHigh, 'autohigh' ],
|
||||
[ editor.lang.flash.qualityMedium, 'medium' ],
|
||||
[ editor.lang.flash.qualityAutoLow, 'autolow' ],
|
||||
[ editor.lang.flash.qualityLow, 'low' ]
|
||||
],
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'align',
|
||||
type : 'select',
|
||||
label : editor.lang.common.align,
|
||||
'default' : '',
|
||||
style : 'width : 100%;',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.common.notSet , ''],
|
||||
[ editor.lang.common.alignLeft , 'left'],
|
||||
[ editor.lang.flash.alignAbsBottom , 'absBottom'],
|
||||
[ editor.lang.flash.alignAbsMiddle , 'absMiddle'],
|
||||
[ editor.lang.flash.alignBaseline , 'baseline'],
|
||||
[ editor.lang.common.alignBottom , 'bottom'],
|
||||
[ editor.lang.common.alignMiddle , 'middle'],
|
||||
[ editor.lang.common.alignRight , 'right'],
|
||||
[ editor.lang.flash.alignTextTop , 'textTop'],
|
||||
[ editor.lang.common.alignTop , 'top']
|
||||
],
|
||||
setup : loadValue,
|
||||
commit : function( objectNode, embedNode, paramMap, extraStyles, extraAttributes )
|
||||
{
|
||||
var value = this.getValue();
|
||||
commitValue.apply( this, arguments );
|
||||
value && ( extraAttributes.align = value );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'html',
|
||||
html : '<div></div>'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'fieldset',
|
||||
label : CKEDITOR.tools.htmlEncode( editor.lang.flash.flashvars ),
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'vbox',
|
||||
padding : 0,
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'checkbox',
|
||||
id : 'menu',
|
||||
label : editor.lang.flash.chkMenu,
|
||||
'default' : true,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
type : 'checkbox',
|
||||
id : 'play',
|
||||
label : editor.lang.flash.chkPlay,
|
||||
'default' : true,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
type : 'checkbox',
|
||||
id : 'loop',
|
||||
label : editor.lang.flash.chkLoop,
|
||||
'default' : true,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
type : 'checkbox',
|
||||
id : 'allowFullScreen',
|
||||
label : editor.lang.flash.chkFull,
|
||||
'default' : true,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'advanced',
|
||||
label : editor.lang.common.advancedTab,
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '45%', '55%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'text',
|
||||
id : 'id',
|
||||
label : editor.lang.common.id,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'title',
|
||||
label : editor.lang.common.advisoryTitle,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '45%', '55%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'text',
|
||||
id : 'bgcolor',
|
||||
label : editor.lang.flash.bgcolor,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'class',
|
||||
label : editor.lang.common.cssClass,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'text',
|
||||
id : 'style',
|
||||
validate : CKEDITOR.dialog.validate.inlineStyle( editor.lang.common.invalidInlineStyle ),
|
||||
label : editor.lang.common.cssStyle,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
} );
|
||||
})();
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 256 B |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'button', function( editor )
|
||||
{
|
||||
function commitAttributes( element )
|
||||
{
|
||||
var val = this.getValue();
|
||||
if ( val )
|
||||
{
|
||||
element.attributes[ this.id ] = val;
|
||||
if ( this.id == 'name' )
|
||||
element.attributes[ 'data-cke-saved-name' ] = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete element.attributes[ this.id ];
|
||||
if ( this.id == 'name' )
|
||||
delete element.attributes[ 'data-cke-saved-name' ];
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
title : editor.lang.button.title,
|
||||
minWidth : 350,
|
||||
minHeight : 150,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.button;
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.is( 'input' ) )
|
||||
{
|
||||
var type = element.getAttribute( 'type' );
|
||||
if ( type in { button:1, reset:1, submit:1 } )
|
||||
{
|
||||
this.button = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor = this.getParentEditor(),
|
||||
element = this.button,
|
||||
isInsertMode = !element;
|
||||
|
||||
var fake = element ? CKEDITOR.htmlParser.fragment.fromHtml( element.getOuterHtml() ).children[ 0 ]
|
||||
: new CKEDITOR.htmlParser.element( 'input' );
|
||||
this.commitContent( fake );
|
||||
|
||||
var writer = new CKEDITOR.htmlParser.basicWriter();
|
||||
fake.writeHtml( writer );
|
||||
var newElement = CKEDITOR.dom.element.createFromHtml( writer.getHtml(), editor.document );
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( newElement );
|
||||
else
|
||||
{
|
||||
newElement.replace( element );
|
||||
editor.getSelection().selectElement( newElement );
|
||||
}
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.button.title,
|
||||
title : editor.lang.button.title,
|
||||
elements : [
|
||||
{
|
||||
id : 'name',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : commitAttributes
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'text',
|
||||
label : editor.lang.button.text,
|
||||
accessKey : 'V',
|
||||
'default' : '',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'value' ) || '' );
|
||||
},
|
||||
commit : commitAttributes
|
||||
},
|
||||
{
|
||||
id : 'type',
|
||||
type : 'select',
|
||||
label : editor.lang.button.type,
|
||||
'default' : 'button',
|
||||
accessKey : 'T',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.button.typeBtn, 'button' ],
|
||||
[ editor.lang.button.typeSbm, 'submit' ],
|
||||
[ editor.lang.button.typeRst, 'reset' ]
|
||||
],
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'type' ) || '' );
|
||||
},
|
||||
commit : commitAttributes
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'checkbox', function( editor )
|
||||
{
|
||||
return {
|
||||
title : editor.lang.checkboxAndRadio.checkboxTitle,
|
||||
minWidth : 350,
|
||||
minHeight : 140,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.checkbox;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
|
||||
if ( element && element.getAttribute( 'type' ) == 'checkbox' )
|
||||
{
|
||||
this.checkbox = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.checkbox,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'input' );
|
||||
element.setAttribute( 'type', 'checkbox' );
|
||||
editor.insertElement( element );
|
||||
}
|
||||
this.commitContent( { element : element } );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.checkboxAndRadio.checkboxTitle,
|
||||
title : editor.lang.checkboxAndRadio.checkboxTitle,
|
||||
startupFocus : 'txtName',
|
||||
elements : [
|
||||
{
|
||||
id : 'txtName',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
// IE failed to update 'name' property on input elements, protect it now.
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'txtValue',
|
||||
type : 'text',
|
||||
label : editor.lang.checkboxAndRadio.value,
|
||||
'default' : '',
|
||||
accessKey : 'V',
|
||||
setup : function( element )
|
||||
{
|
||||
var value = element.getAttribute( 'value' );
|
||||
// IE Return 'on' as default attr value.
|
||||
this.setValue( CKEDITOR.env.ie && value == 'on' ? '' : value );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element,
|
||||
value = this.getValue();
|
||||
|
||||
if ( value && !( CKEDITOR.env.ie && value == 'on' ) )
|
||||
element.setAttribute( 'value', value );
|
||||
else
|
||||
{
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
// Remove attribute 'value' of checkbox (#4721).
|
||||
var checkbox = new CKEDITOR.dom.element( 'input', element.getDocument() );
|
||||
element.copyAttributes( checkbox, { value: 1 } );
|
||||
checkbox.replace( element );
|
||||
editor.getSelection().selectElement( checkbox );
|
||||
data.element = checkbox;
|
||||
}
|
||||
else
|
||||
element.removeAttribute( 'value' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'cmbSelected',
|
||||
type : 'checkbox',
|
||||
label : editor.lang.checkboxAndRadio.selected,
|
||||
'default' : '',
|
||||
accessKey : 'S',
|
||||
value : "checked",
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'checked' ) );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var isElementChecked = !!element.getAttribute( 'checked' ),
|
||||
isChecked = !!this.getValue();
|
||||
|
||||
if ( isElementChecked != isChecked )
|
||||
{
|
||||
var replace = CKEDITOR.dom.element.createFromHtml( '<input type="checkbox"'
|
||||
+ ( isChecked ? ' checked="checked"' : '' )
|
||||
+ '/>', editor.document );
|
||||
|
||||
element.copyAttributes( replace, { type : 1, checked : 1 } );
|
||||
replace.replace( element );
|
||||
editor.getSelection().selectElement( replace );
|
||||
data.element = replace;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var value = this.getValue();
|
||||
if ( value )
|
||||
element.setAttribute( 'checked', 'checked' );
|
||||
else
|
||||
element.removeAttribute( 'checked' );
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,177 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'form', function( editor )
|
||||
{
|
||||
var autoAttributes =
|
||||
{
|
||||
action : 1,
|
||||
id : 1,
|
||||
method : 1,
|
||||
enctype : 1,
|
||||
target : 1
|
||||
};
|
||||
|
||||
return {
|
||||
title : editor.lang.form.title,
|
||||
minWidth : 350,
|
||||
minHeight : 200,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.form;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getStartElement();
|
||||
var form = element && element.getAscendant( 'form', true );
|
||||
if ( form )
|
||||
{
|
||||
this.form = form;
|
||||
this.setupContent( form );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.form,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'form' );
|
||||
!CKEDITOR.env.ie && element.append( editor.document.createElement( 'br' ) );
|
||||
}
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( element );
|
||||
this.commitContent( element );
|
||||
},
|
||||
onLoad : function()
|
||||
{
|
||||
function autoSetup( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( this.id ) || '' );
|
||||
}
|
||||
|
||||
function autoCommit( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( this.id, this.getValue() );
|
||||
else
|
||||
element.removeAttribute( this.id );
|
||||
}
|
||||
|
||||
this.foreach( function( contentObj )
|
||||
{
|
||||
if ( autoAttributes[ contentObj.id ] )
|
||||
{
|
||||
contentObj.setup = autoSetup;
|
||||
contentObj.commit = autoCommit;
|
||||
}
|
||||
} );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.form.title,
|
||||
title : editor.lang.form.title,
|
||||
elements : [
|
||||
{
|
||||
id : 'txtName',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'action',
|
||||
type : 'text',
|
||||
label : editor.lang.form.action,
|
||||
'default' : '',
|
||||
accessKey : 'T'
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '45%', '55%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'id',
|
||||
type : 'text',
|
||||
label : editor.lang.common.id,
|
||||
'default' : '',
|
||||
accessKey : 'I'
|
||||
},
|
||||
{
|
||||
id : 'enctype',
|
||||
type : 'select',
|
||||
label : editor.lang.form.encoding,
|
||||
style : 'width:100%',
|
||||
accessKey : 'E',
|
||||
'default' : '',
|
||||
items :
|
||||
[
|
||||
[ '' ],
|
||||
[ 'text/plain' ],
|
||||
[ 'multipart/form-data' ],
|
||||
[ 'application/x-www-form-urlencoded' ]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '45%', '55%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'target',
|
||||
type : 'select',
|
||||
label : editor.lang.common.target,
|
||||
style : 'width:100%',
|
||||
accessKey : 'M',
|
||||
'default' : '',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.common.notSet, '' ],
|
||||
[ editor.lang.common.targetNew, '_blank' ],
|
||||
[ editor.lang.common.targetTop, '_top' ],
|
||||
[ editor.lang.common.targetSelf, '_self' ],
|
||||
[ editor.lang.common.targetParent, '_parent' ]
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'method',
|
||||
type : 'select',
|
||||
label : editor.lang.form.method,
|
||||
accessKey : 'M',
|
||||
'default' : 'GET',
|
||||
items :
|
||||
[
|
||||
[ 'GET', 'get' ],
|
||||
[ 'POST', 'post' ]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'hiddenfield', function( editor )
|
||||
{
|
||||
return {
|
||||
title : editor.lang.hidden.title,
|
||||
hiddenField : null,
|
||||
minWidth : 350,
|
||||
minHeight : 110,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.hiddenField;
|
||||
|
||||
var editor = this.getParentEditor(),
|
||||
selection = editor.getSelection(),
|
||||
element = selection.getSelectedElement();
|
||||
|
||||
if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' )
|
||||
{
|
||||
this.hiddenField = element;
|
||||
element = editor.restoreRealElement( this.hiddenField );
|
||||
this.setupContent( element );
|
||||
selection.selectElement( this.hiddenField );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var name = this.getValueOf( 'info', '_cke_saved_name' ),
|
||||
value = this.getValueOf( 'info', 'value' ),
|
||||
editor = this.getParentEditor(),
|
||||
element = CKEDITOR.env.ie && !( CKEDITOR.document.$.documentMode >= 8 ) ?
|
||||
editor.document.createElement( '<input name="' + CKEDITOR.tools.htmlEncode( name ) + '">' )
|
||||
: editor.document.createElement( 'input' );
|
||||
|
||||
element.setAttribute( 'type', 'hidden' );
|
||||
this.commitContent( element );
|
||||
var fakeElement = editor.createFakeElement( element, 'cke_hidden', 'hiddenfield' );
|
||||
if ( !this.hiddenField )
|
||||
editor.insertElement( fakeElement );
|
||||
else
|
||||
{
|
||||
fakeElement.replace( this.hiddenField );
|
||||
editor.getSelection().selectElement( fakeElement );
|
||||
}
|
||||
return true;
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.hidden.title,
|
||||
title : editor.lang.hidden.title,
|
||||
elements : [
|
||||
{
|
||||
id : '_cke_saved_name',
|
||||
type : 'text',
|
||||
label : editor.lang.hidden.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'text',
|
||||
label : editor.lang.hidden.value,
|
||||
'default' : '',
|
||||
accessKey : 'V',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'value' ) || '' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'value', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'value' );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'radio', function( editor )
|
||||
{
|
||||
return {
|
||||
title : editor.lang.checkboxAndRadio.radioTitle,
|
||||
minWidth : 350,
|
||||
minHeight : 140,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.radioButton;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.getName() == 'input' && element.getAttribute( 'type' ) == 'radio' )
|
||||
{
|
||||
this.radioButton = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.radioButton,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'input' );
|
||||
element.setAttribute( 'type', 'radio' );
|
||||
}
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( element );
|
||||
this.commitContent( { element : element } );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.checkboxAndRadio.radioTitle,
|
||||
title : editor.lang.checkboxAndRadio.radioTitle,
|
||||
elements : [
|
||||
{
|
||||
id : 'name',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'text',
|
||||
label : editor.lang.checkboxAndRadio.value,
|
||||
'default' : '',
|
||||
accessKey : 'V',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'value' ) || '' );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'value', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'value' );
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'checked',
|
||||
type : 'checkbox',
|
||||
label : editor.lang.checkboxAndRadio.selected,
|
||||
'default' : '',
|
||||
accessKey : 'S',
|
||||
value : "checked",
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'checked' ) );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera ) )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'checked', 'checked' );
|
||||
else
|
||||
element.removeAttribute( 'checked' );
|
||||
}
|
||||
else
|
||||
{
|
||||
var isElementChecked = element.getAttribute( 'checked' );
|
||||
var isChecked = !!this.getValue();
|
||||
|
||||
if ( isElementChecked != isChecked )
|
||||
{
|
||||
var replace = CKEDITOR.dom.element.createFromHtml( '<input type="radio"'
|
||||
+ ( isChecked ? ' checked="checked"' : '' )
|
||||
+ '></input>', editor.document );
|
||||
element.copyAttributes( replace, { type : 1, checked : 1 } );
|
||||
replace.replace( element );
|
||||
editor.getSelection().selectElement( replace );
|
||||
data.element = replace;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,558 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'select', function( editor )
|
||||
{
|
||||
// Add a new option to a SELECT object (combo or list).
|
||||
function addOption( combo, optionText, optionValue, documentObject, index )
|
||||
{
|
||||
combo = getSelect( combo );
|
||||
var oOption;
|
||||
if ( documentObject )
|
||||
oOption = documentObject.createElement( "OPTION" );
|
||||
else
|
||||
oOption = document.createElement( "OPTION" );
|
||||
|
||||
if ( combo && oOption && oOption.getName() == 'option' )
|
||||
{
|
||||
if ( CKEDITOR.env.ie ) {
|
||||
if ( !isNaN( parseInt( index, 10) ) )
|
||||
combo.$.options.add( oOption.$, index );
|
||||
else
|
||||
combo.$.options.add( oOption.$ );
|
||||
|
||||
oOption.$.innerHTML = optionText.length > 0 ? optionText : '';
|
||||
oOption.$.value = optionValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( index !== null && index < combo.getChildCount() )
|
||||
combo.getChild( index < 0 ? 0 : index ).insertBeforeMe( oOption );
|
||||
else
|
||||
combo.append( oOption );
|
||||
|
||||
oOption.setText( optionText.length > 0 ? optionText : '' );
|
||||
oOption.setValue( optionValue );
|
||||
}
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
return oOption;
|
||||
}
|
||||
// Remove all selected options from a SELECT object.
|
||||
function removeSelectedOptions( combo )
|
||||
{
|
||||
combo = getSelect( combo );
|
||||
|
||||
// Save the selected index
|
||||
var iSelectedIndex = getSelectedIndex( combo );
|
||||
|
||||
// Remove all selected options.
|
||||
for ( var i = combo.getChildren().count() - 1 ; i >= 0 ; i-- )
|
||||
{
|
||||
if ( combo.getChild( i ).$.selected )
|
||||
combo.getChild( i ).remove();
|
||||
}
|
||||
|
||||
// Reset the selection based on the original selected index.
|
||||
setSelectedIndex( combo, iSelectedIndex );
|
||||
}
|
||||
//Modify option from a SELECT object.
|
||||
function modifyOption( combo, index, title, value )
|
||||
{
|
||||
combo = getSelect( combo );
|
||||
if ( index < 0 )
|
||||
return false;
|
||||
var child = combo.getChild( index );
|
||||
child.setText( title );
|
||||
child.setValue( value );
|
||||
return child;
|
||||
}
|
||||
function removeAllOptions( combo )
|
||||
{
|
||||
combo = getSelect( combo );
|
||||
while ( combo.getChild( 0 ) && combo.getChild( 0 ).remove() )
|
||||
{ /*jsl:pass*/ }
|
||||
}
|
||||
// Moves the selected option by a number of steps (also negative).
|
||||
function changeOptionPosition( combo, steps, documentObject )
|
||||
{
|
||||
combo = getSelect( combo );
|
||||
var iActualIndex = getSelectedIndex( combo );
|
||||
if ( iActualIndex < 0 )
|
||||
return false;
|
||||
|
||||
var iFinalIndex = iActualIndex + steps;
|
||||
iFinalIndex = ( iFinalIndex < 0 ) ? 0 : iFinalIndex;
|
||||
iFinalIndex = ( iFinalIndex >= combo.getChildCount() ) ? combo.getChildCount() - 1 : iFinalIndex;
|
||||
|
||||
if ( iActualIndex == iFinalIndex )
|
||||
return false;
|
||||
|
||||
var oOption = combo.getChild( iActualIndex ),
|
||||
sText = oOption.getText(),
|
||||
sValue = oOption.getValue();
|
||||
|
||||
oOption.remove();
|
||||
|
||||
oOption = addOption( combo, sText, sValue, ( !documentObject ) ? null : documentObject, iFinalIndex );
|
||||
setSelectedIndex( combo, iFinalIndex );
|
||||
return oOption;
|
||||
}
|
||||
function getSelectedIndex( combo )
|
||||
{
|
||||
combo = getSelect( combo );
|
||||
return combo ? combo.$.selectedIndex : -1;
|
||||
}
|
||||
function setSelectedIndex( combo, index )
|
||||
{
|
||||
combo = getSelect( combo );
|
||||
if ( index < 0 )
|
||||
return null;
|
||||
var count = combo.getChildren().count();
|
||||
combo.$.selectedIndex = ( index >= count ) ? ( count - 1 ) : index;
|
||||
return combo;
|
||||
}
|
||||
function getOptions( combo )
|
||||
{
|
||||
combo = getSelect( combo );
|
||||
return combo ? combo.getChildren() : false;
|
||||
}
|
||||
function getSelect( obj )
|
||||
{
|
||||
if ( obj && obj.domId && obj.getInputElement().$ ) // Dialog element.
|
||||
return obj.getInputElement();
|
||||
else if ( obj && obj.$ )
|
||||
return obj;
|
||||
return false;
|
||||
}
|
||||
|
||||
return {
|
||||
title : editor.lang.select.title,
|
||||
minWidth : CKEDITOR.env.ie ? 460 : 395,
|
||||
minHeight : CKEDITOR.env.ie ? 320 : 300,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.selectBox;
|
||||
this.setupContent( 'clear' );
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.getName() == "select" )
|
||||
{
|
||||
this.selectBox = element;
|
||||
this.setupContent( element.getName(), element );
|
||||
|
||||
// Load Options into dialog.
|
||||
var objOptions = getOptions( element );
|
||||
for ( var i = 0 ; i < objOptions.count() ; i++ )
|
||||
this.setupContent( 'option', objOptions.getItem( i ) );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor = this.getParentEditor(),
|
||||
element = this.selectBox,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
element = editor.document.createElement( 'select' );
|
||||
this.commitContent( element );
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor.insertElement( element );
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var sel = editor.getSelection(),
|
||||
bms = sel.createBookmarks();
|
||||
setTimeout(function()
|
||||
{
|
||||
sel.selectBookmarks( bms );
|
||||
}, 0 );
|
||||
}
|
||||
}
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.select.selectInfo,
|
||||
title : editor.lang.select.selectInfo,
|
||||
accessKey : '',
|
||||
elements : [
|
||||
{
|
||||
id : 'txtName',
|
||||
type : 'text',
|
||||
widths : [ '25%','75%' ],
|
||||
labelLayout : 'horizontal',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
style : 'width:350px',
|
||||
setup : function( name, element )
|
||||
{
|
||||
if ( name == 'clear' )
|
||||
this.setValue( this[ 'default' ] || '' );
|
||||
else if ( name == 'select' )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
}
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'txtValue',
|
||||
type : 'text',
|
||||
widths : [ '25%','75%' ],
|
||||
labelLayout : 'horizontal',
|
||||
label : editor.lang.select.value,
|
||||
style : 'width:350px',
|
||||
'default' : '',
|
||||
className : 'cke_disabled',
|
||||
onLoad : function()
|
||||
{
|
||||
this.getInputElement().setAttribute( 'readOnly', true );
|
||||
},
|
||||
setup : function( name, element )
|
||||
{
|
||||
if ( name == 'clear' )
|
||||
this.setValue( '' );
|
||||
else if ( name == 'option' && element.getAttribute( 'selected' ) )
|
||||
this.setValue( element.$.value );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '175px', '170px' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'txtSize',
|
||||
type : 'text',
|
||||
labelLayout : 'horizontal',
|
||||
label : editor.lang.select.size,
|
||||
'default' : '',
|
||||
accessKey : 'S',
|
||||
style : 'width:175px',
|
||||
validate: function()
|
||||
{
|
||||
var func = CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed );
|
||||
return ( ( this.getValue() === '' ) || func.apply( this ) );
|
||||
},
|
||||
setup : function( name, element )
|
||||
{
|
||||
if ( name == 'select' )
|
||||
this.setValue( element.getAttribute( 'size' ) || '' );
|
||||
if ( CKEDITOR.env.webkit )
|
||||
this.getInputElement().setStyle( 'width', '86px' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'size', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'size' );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'html',
|
||||
html : '<span>' + CKEDITOR.tools.htmlEncode( editor.lang.select.lines ) + '</span>'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'html',
|
||||
html : '<span>' + CKEDITOR.tools.htmlEncode( editor.lang.select.opAvail ) + '</span>'
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '115px', '115px' ,'100px' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'vbox',
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'txtOptName',
|
||||
type : 'text',
|
||||
label : editor.lang.select.opText,
|
||||
style : 'width:115px',
|
||||
setup : function( name, element )
|
||||
{
|
||||
if ( name == 'clear' )
|
||||
this.setValue( "" );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'select',
|
||||
id : 'cmbName',
|
||||
label : '',
|
||||
title : '',
|
||||
size : 5,
|
||||
style : 'width:115px;height:75px',
|
||||
items : [],
|
||||
onChange : function()
|
||||
{
|
||||
var dialog = this.getDialog(),
|
||||
values = dialog.getContentElement( 'info', 'cmbValue' ),
|
||||
optName = dialog.getContentElement( 'info', 'txtOptName' ),
|
||||
optValue = dialog.getContentElement( 'info', 'txtOptValue' ),
|
||||
iIndex = getSelectedIndex( this );
|
||||
|
||||
setSelectedIndex( values, iIndex );
|
||||
optName.setValue( this.getValue() );
|
||||
optValue.setValue( values.getValue() );
|
||||
},
|
||||
setup : function( name, element )
|
||||
{
|
||||
if ( name == 'clear' )
|
||||
removeAllOptions( this );
|
||||
else if ( name == 'option' )
|
||||
addOption( this, element.getText(), element.getText(),
|
||||
this.getDialog().getParentEditor().document );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
var dialog = this.getDialog(),
|
||||
optionsNames = getOptions( this ),
|
||||
optionsValues = getOptions( dialog.getContentElement( 'info', 'cmbValue' ) ),
|
||||
selectValue = dialog.getContentElement( 'info', 'txtValue' ).getValue();
|
||||
|
||||
removeAllOptions( element );
|
||||
|
||||
for ( var i = 0 ; i < optionsNames.count() ; i++ )
|
||||
{
|
||||
var oOption = addOption( element, optionsNames.getItem( i ).getValue(),
|
||||
optionsValues.getItem( i ).getValue(), dialog.getParentEditor().document );
|
||||
if ( optionsValues.getItem( i ).getValue() == selectValue )
|
||||
{
|
||||
oOption.setAttribute( 'selected', 'selected' );
|
||||
oOption.selected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'vbox',
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'txtOptValue',
|
||||
type : 'text',
|
||||
label : editor.lang.select.opValue,
|
||||
style : 'width:115px',
|
||||
setup : function( name, element )
|
||||
{
|
||||
if ( name == 'clear' )
|
||||
this.setValue( "" );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'select',
|
||||
id : 'cmbValue',
|
||||
label : '',
|
||||
size : 5,
|
||||
style : 'width:115px;height:75px',
|
||||
items : [],
|
||||
onChange : function()
|
||||
{
|
||||
var dialog = this.getDialog(),
|
||||
names = dialog.getContentElement( 'info', 'cmbName' ),
|
||||
optName = dialog.getContentElement( 'info', 'txtOptName' ),
|
||||
optValue = dialog.getContentElement( 'info', 'txtOptValue' ),
|
||||
iIndex = getSelectedIndex( this );
|
||||
|
||||
setSelectedIndex( names, iIndex );
|
||||
optName.setValue( names.getValue() );
|
||||
optValue.setValue( this.getValue() );
|
||||
},
|
||||
setup : function( name, element )
|
||||
{
|
||||
if ( name == 'clear' )
|
||||
removeAllOptions( this );
|
||||
else if ( name == 'option' )
|
||||
{
|
||||
var oValue = element.getValue();
|
||||
addOption( this, oValue, oValue,
|
||||
this.getDialog().getParentEditor().document );
|
||||
if ( element.getAttribute( 'selected' ) == 'selected' )
|
||||
this.getDialog().getContentElement( 'info', 'txtValue' ).setValue( oValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'vbox',
|
||||
padding : 5,
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'button',
|
||||
id : 'btnAdd',
|
||||
style : '',
|
||||
label : editor.lang.select.btnAdd,
|
||||
title : editor.lang.select.btnAdd,
|
||||
style : 'width:100%;',
|
||||
onClick : function()
|
||||
{
|
||||
//Add new option.
|
||||
var dialog = this.getDialog(),
|
||||
parentEditor = dialog.getParentEditor(),
|
||||
optName = dialog.getContentElement( 'info', 'txtOptName' ),
|
||||
optValue = dialog.getContentElement( 'info', 'txtOptValue' ),
|
||||
names = dialog.getContentElement( 'info', 'cmbName' ),
|
||||
values = dialog.getContentElement( 'info', 'cmbValue' );
|
||||
|
||||
addOption(names, optName.getValue(), optName.getValue(), dialog.getParentEditor().document );
|
||||
addOption(values, optValue.getValue(), optValue.getValue(), dialog.getParentEditor().document );
|
||||
|
||||
optName.setValue( "" );
|
||||
optValue.setValue( "" );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'button',
|
||||
id : 'btnModify',
|
||||
label : editor.lang.select.btnModify,
|
||||
title : editor.lang.select.btnModify,
|
||||
style : 'width:100%;',
|
||||
onClick : function()
|
||||
{
|
||||
//Modify selected option.
|
||||
var dialog = this.getDialog(),
|
||||
optName = dialog.getContentElement( 'info', 'txtOptName' ),
|
||||
optValue = dialog.getContentElement( 'info', 'txtOptValue' ),
|
||||
names = dialog.getContentElement( 'info', 'cmbName' ),
|
||||
values = dialog.getContentElement( 'info', 'cmbValue' ),
|
||||
iIndex = getSelectedIndex( names );
|
||||
|
||||
if ( iIndex >= 0 )
|
||||
{
|
||||
modifyOption( names, iIndex, optName.getValue(), optName.getValue() );
|
||||
modifyOption( values, iIndex, optValue.getValue(), optValue.getValue() );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'button',
|
||||
id : 'btnUp',
|
||||
style : 'width:100%;',
|
||||
label : editor.lang.select.btnUp,
|
||||
title : editor.lang.select.btnUp,
|
||||
onClick : function()
|
||||
{
|
||||
//Move up.
|
||||
var dialog = this.getDialog(),
|
||||
names = dialog.getContentElement( 'info', 'cmbName' ),
|
||||
values = dialog.getContentElement( 'info', 'cmbValue' );
|
||||
|
||||
changeOptionPosition( names, -1, dialog.getParentEditor().document );
|
||||
changeOptionPosition( values, -1, dialog.getParentEditor().document );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'button',
|
||||
id : 'btnDown',
|
||||
style : 'width:100%;',
|
||||
label : editor.lang.select.btnDown,
|
||||
title : editor.lang.select.btnDown,
|
||||
onClick : function()
|
||||
{
|
||||
//Move down.
|
||||
var dialog = this.getDialog(),
|
||||
names = dialog.getContentElement( 'info', 'cmbName' ),
|
||||
values = dialog.getContentElement( 'info', 'cmbValue' );
|
||||
|
||||
changeOptionPosition( names, 1, dialog.getParentEditor().document );
|
||||
changeOptionPosition( values, 1, dialog.getParentEditor().document );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '40%', '20%', '40%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
type : 'button',
|
||||
id : 'btnSetValue',
|
||||
label : editor.lang.select.btnSetValue,
|
||||
title : editor.lang.select.btnSetValue,
|
||||
onClick : function()
|
||||
{
|
||||
//Set as default value.
|
||||
var dialog = this.getDialog(),
|
||||
values = dialog.getContentElement( 'info', 'cmbValue' ),
|
||||
txtValue = dialog.getContentElement( 'info', 'txtValue' );
|
||||
txtValue.setValue( values.getValue() );
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'button',
|
||||
id : 'btnDelete',
|
||||
label : editor.lang.select.btnDelete,
|
||||
title : editor.lang.select.btnDelete,
|
||||
onClick : function()
|
||||
{
|
||||
// Delete option.
|
||||
var dialog = this.getDialog(),
|
||||
names = dialog.getContentElement( 'info', 'cmbName' ),
|
||||
values = dialog.getContentElement( 'info', 'cmbValue' ),
|
||||
optName = dialog.getContentElement( 'info', 'txtOptName' ),
|
||||
optValue = dialog.getContentElement( 'info', 'txtOptValue' );
|
||||
|
||||
removeSelectedOptions( names );
|
||||
removeSelectedOptions( values );
|
||||
|
||||
optName.setValue( "" );
|
||||
optValue.setValue( "" );
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'chkMulti',
|
||||
type : 'checkbox',
|
||||
label : editor.lang.select.chkMulti,
|
||||
'default' : '',
|
||||
accessKey : 'M',
|
||||
value : "checked",
|
||||
setup : function( name, element )
|
||||
{
|
||||
if ( name == 'select' )
|
||||
this.setValue( element.getAttribute( 'multiple' ) );
|
||||
if ( CKEDITOR.env.webkit )
|
||||
this.getElement().getParent().setStyle( 'vertical-align', 'middle' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'multiple', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'multiple' );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'textarea', function( editor )
|
||||
{
|
||||
return {
|
||||
title : editor.lang.textarea.title,
|
||||
minWidth : 350,
|
||||
minHeight : 220,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.textarea;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.getName() == "textarea" )
|
||||
{
|
||||
this.textarea = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.textarea,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'textarea' );
|
||||
}
|
||||
this.commitContent( element );
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( element );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.textarea.title,
|
||||
title : editor.lang.textarea.title,
|
||||
elements : [
|
||||
{
|
||||
id : '_cke_saved_name',
|
||||
type : 'text',
|
||||
label : editor.lang.common.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths:['50%','50%'],
|
||||
children:[
|
||||
{
|
||||
id : 'cols',
|
||||
type : 'text',
|
||||
label : editor.lang.textarea.cols,
|
||||
'default' : '',
|
||||
accessKey : 'C',
|
||||
style : 'width:50px',
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ),
|
||||
setup : function( element )
|
||||
{
|
||||
var value = element.hasAttribute( 'cols' ) && element.getAttribute( 'cols' );
|
||||
this.setValue( value || '' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'cols', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'cols' );
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'rows',
|
||||
type : 'text',
|
||||
label : editor.lang.textarea.rows,
|
||||
'default' : '',
|
||||
accessKey : 'R',
|
||||
style : 'width:50px',
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ),
|
||||
setup : function( element )
|
||||
{
|
||||
var value = element.hasAttribute( 'rows' ) && element.getAttribute( 'rows' );
|
||||
this.setValue( value || '' );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'rows', this.getValue() );
|
||||
else
|
||||
element.removeAttribute( 'rows' );
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'textarea',
|
||||
label : editor.lang.textfield.value,
|
||||
'default' : '',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.$.defaultValue );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
element.$.value = element.$.defaultValue = this.getValue() ;
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,199 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add( 'textfield', function( editor )
|
||||
{
|
||||
var autoAttributes =
|
||||
{
|
||||
value : 1,
|
||||
size : 1,
|
||||
maxLength : 1
|
||||
};
|
||||
|
||||
var acceptedTypes =
|
||||
{
|
||||
text : 1,
|
||||
password : 1
|
||||
};
|
||||
|
||||
return {
|
||||
title : editor.lang.textfield.title,
|
||||
minWidth : 350,
|
||||
minHeight : 150,
|
||||
onShow : function()
|
||||
{
|
||||
delete this.textField;
|
||||
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
if ( element && element.getName() == "input" &&
|
||||
( acceptedTypes[ element.getAttribute( 'type' ) ] || !element.getAttribute( 'type' ) ) )
|
||||
{
|
||||
this.textField = element;
|
||||
this.setupContent( element );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor,
|
||||
element = this.textField,
|
||||
isInsertMode = !element;
|
||||
|
||||
if ( isInsertMode )
|
||||
{
|
||||
editor = this.getParentEditor();
|
||||
element = editor.document.createElement( 'input' );
|
||||
element.setAttribute( 'type', 'text' );
|
||||
}
|
||||
|
||||
if ( isInsertMode )
|
||||
editor.insertElement( element );
|
||||
this.commitContent( { element : element } );
|
||||
},
|
||||
onLoad : function()
|
||||
{
|
||||
var autoSetup = function( element )
|
||||
{
|
||||
var value = element.hasAttribute( this.id ) && element.getAttribute( this.id );
|
||||
this.setValue( value || '' );
|
||||
};
|
||||
|
||||
var autoCommit = function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
var value = this.getValue();
|
||||
|
||||
if ( value )
|
||||
element.setAttribute( this.id, value );
|
||||
else
|
||||
element.removeAttribute( this.id );
|
||||
};
|
||||
|
||||
this.foreach( function( contentObj )
|
||||
{
|
||||
if ( autoAttributes[ contentObj.id ] )
|
||||
{
|
||||
contentObj.setup = autoSetup;
|
||||
contentObj.commit = autoCommit;
|
||||
}
|
||||
} );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.textfield.title,
|
||||
title : editor.lang.textfield.title,
|
||||
elements : [
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : '_cke_saved_name',
|
||||
type : 'text',
|
||||
label : editor.lang.textfield.name,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue(
|
||||
element.data( 'cke-saved-name' ) ||
|
||||
element.getAttribute( 'name' ) ||
|
||||
'' );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.data( 'cke-saved-name', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.data( 'cke-saved-name', false );
|
||||
element.removeAttribute( 'name' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'value',
|
||||
type : 'text',
|
||||
label : editor.lang.textfield.value,
|
||||
'default' : '',
|
||||
accessKey : 'V'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'size',
|
||||
type : 'text',
|
||||
label : editor.lang.textfield.charWidth,
|
||||
'default' : '',
|
||||
accessKey : 'C',
|
||||
style : 'width:50px',
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed )
|
||||
},
|
||||
{
|
||||
id : 'maxLength',
|
||||
type : 'text',
|
||||
label : editor.lang.textfield.maxChars,
|
||||
'default' : '',
|
||||
accessKey : 'M',
|
||||
style : 'width:50px',
|
||||
validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed )
|
||||
}
|
||||
],
|
||||
onLoad : function()
|
||||
{
|
||||
// Repaint the style for IE7 (#6068)
|
||||
if ( CKEDITOR.env.ie7Compat )
|
||||
this.getElement().setStyle( 'zoom', '100%' );
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'type',
|
||||
type : 'select',
|
||||
label : editor.lang.textfield.type,
|
||||
'default' : 'text',
|
||||
accessKey : 'M',
|
||||
items :
|
||||
[
|
||||
[ editor.lang.textfield.typeText, 'text' ],
|
||||
[ editor.lang.textfield.typePass, 'password' ]
|
||||
],
|
||||
setup : function( element )
|
||||
{
|
||||
this.setValue( element.getAttribute( 'type' ) );
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( CKEDITOR.env.ie )
|
||||
{
|
||||
var elementType = element.getAttribute( 'type' );
|
||||
var myType = this.getValue();
|
||||
|
||||
if ( elementType != myType )
|
||||
{
|
||||
var replace = CKEDITOR.dom.element.createFromHtml( '<input type="' + myType + '"></input>', editor.document );
|
||||
element.copyAttributes( replace, { type : 1 } );
|
||||
replace.replace( element );
|
||||
editor.getSelection().selectElement( replace );
|
||||
data.element = replace;
|
||||
}
|
||||
}
|
||||
else
|
||||
element.setAttribute( 'type', this.getValue() );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
After Width: | Height: | Size: 105 B |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,229 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
// Map 'true' and 'false' values to match W3C's specifications
|
||||
// http://www.w3.org/TR/REC-html40/present/frames.html#h-16.5
|
||||
var checkboxValues =
|
||||
{
|
||||
scrolling : { 'true' : 'yes', 'false' : 'no' },
|
||||
frameborder : { 'true' : '1', 'false' : '0' }
|
||||
};
|
||||
|
||||
function loadValue( iframeNode )
|
||||
{
|
||||
var isCheckbox = this instanceof CKEDITOR.ui.dialog.checkbox;
|
||||
if ( iframeNode.hasAttribute( this.id ) )
|
||||
{
|
||||
var value = iframeNode.getAttribute( this.id );
|
||||
if ( isCheckbox )
|
||||
this.setValue( checkboxValues[ this.id ][ 'true' ] == value.toLowerCase() );
|
||||
else
|
||||
this.setValue( value );
|
||||
}
|
||||
}
|
||||
|
||||
function commitValue( iframeNode )
|
||||
{
|
||||
var isRemove = this.getValue() === '',
|
||||
isCheckbox = this instanceof CKEDITOR.ui.dialog.checkbox,
|
||||
value = this.getValue();
|
||||
if ( isRemove )
|
||||
iframeNode.removeAttribute( this.att || this.id );
|
||||
else if ( isCheckbox )
|
||||
iframeNode.setAttribute( this.id, checkboxValues[ this.id ][ value ] );
|
||||
else
|
||||
iframeNode.setAttribute( this.att || this.id, value );
|
||||
}
|
||||
|
||||
CKEDITOR.dialog.add( 'iframe', function( editor )
|
||||
{
|
||||
var iframeLang = editor.lang.iframe,
|
||||
commonLang = editor.lang.common,
|
||||
dialogadvtab = editor.plugins.dialogadvtab;
|
||||
return {
|
||||
title : iframeLang.title,
|
||||
minWidth : 350,
|
||||
minHeight : 260,
|
||||
onShow : function()
|
||||
{
|
||||
// Clear previously saved elements.
|
||||
this.fakeImage = this.iframeNode = null;
|
||||
|
||||
var fakeImage = this.getSelectedElement();
|
||||
if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'iframe' )
|
||||
{
|
||||
this.fakeImage = fakeImage;
|
||||
|
||||
var iframeNode = editor.restoreRealElement( fakeImage );
|
||||
this.iframeNode = iframeNode;
|
||||
|
||||
this.setupContent( iframeNode );
|
||||
}
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var iframeNode;
|
||||
if ( !this.fakeImage )
|
||||
iframeNode = new CKEDITOR.dom.element( 'iframe' );
|
||||
else
|
||||
iframeNode = this.iframeNode;
|
||||
|
||||
// A subset of the specified attributes/styles
|
||||
// should also be applied on the fake element to
|
||||
// have better visual effect. (#5240)
|
||||
var extraStyles = {}, extraAttributes = {};
|
||||
this.commitContent( iframeNode, extraStyles, extraAttributes );
|
||||
|
||||
// Refresh the fake image.
|
||||
var newFakeImage = editor.createFakeElement( iframeNode, 'cke_iframe', 'iframe', true );
|
||||
newFakeImage.setAttributes( extraAttributes );
|
||||
newFakeImage.setStyles( extraStyles );
|
||||
if ( this.fakeImage )
|
||||
{
|
||||
newFakeImage.replace( this.fakeImage );
|
||||
editor.getSelection().selectElement( newFakeImage );
|
||||
}
|
||||
else
|
||||
editor.insertElement( newFakeImage );
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : commonLang.generalTab,
|
||||
accessKey : 'I',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'vbox',
|
||||
padding : 0,
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'src',
|
||||
type : 'text',
|
||||
label : commonLang.url,
|
||||
required : true,
|
||||
validate : CKEDITOR.dialog.validate.notEmpty( iframeLang.noUrl ),
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'width',
|
||||
type : 'text',
|
||||
style : 'width:100%',
|
||||
labelLayout : 'vertical',
|
||||
label : commonLang.width,
|
||||
validate : CKEDITOR.dialog.validate.htmlLength( commonLang.invalidHtmlLength.replace( '%1', commonLang.width ) ),
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
id : 'height',
|
||||
type : 'text',
|
||||
style : 'width:100%',
|
||||
labelLayout : 'vertical',
|
||||
label : commonLang.height,
|
||||
validate : CKEDITOR.dialog.validate.htmlLength( commonLang.invalidHtmlLength.replace( '%1', commonLang.height ) ),
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
id : 'align',
|
||||
type : 'select',
|
||||
'default' : '',
|
||||
items :
|
||||
[
|
||||
[ commonLang.notSet , '' ],
|
||||
[ commonLang.alignLeft , 'left' ],
|
||||
[ commonLang.alignRight , 'right' ],
|
||||
[ commonLang.alignTop , 'top' ],
|
||||
[ commonLang.alignMiddle , 'middle' ],
|
||||
[ commonLang.alignBottom , 'bottom' ]
|
||||
],
|
||||
style : 'width:100%',
|
||||
labelLayout : 'vertical',
|
||||
label : commonLang.align,
|
||||
setup : function( iframeNode, fakeImage )
|
||||
{
|
||||
loadValue.apply( this, arguments );
|
||||
if ( fakeImage )
|
||||
{
|
||||
var fakeImageAlign = fakeImage.getAttribute( 'align' );
|
||||
this.setValue( fakeImageAlign && fakeImageAlign.toLowerCase() || '' );
|
||||
}
|
||||
},
|
||||
commit : function( iframeNode, extraStyles, extraAttributes )
|
||||
{
|
||||
commitValue.apply( this, arguments );
|
||||
if ( this.getValue() )
|
||||
extraAttributes.align = this.getValue();
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'scrolling',
|
||||
type : 'checkbox',
|
||||
label : iframeLang.scrolling,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
id : 'frameborder',
|
||||
type : 'checkbox',
|
||||
label : iframeLang.border,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '50%', '50%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
id : 'name',
|
||||
type : 'text',
|
||||
label : commonLang.name,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
},
|
||||
{
|
||||
id : 'title',
|
||||
type : 'text',
|
||||
label : commonLang.advisoryTitle,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id : 'longdesc',
|
||||
type : 'text',
|
||||
label : commonLang.longDescr,
|
||||
setup : loadValue,
|
||||
commit : commitValue
|
||||
}
|
||||
]
|
||||
},
|
||||
dialogadvtab && dialogadvtab.createAdvancedTab( editor, { id:1, classes:1, styles:1 })
|
||||
]
|
||||
};
|
||||
});
|
||||
})();
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 449 B |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,188 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview Plugin for making iframe based dialogs.
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.add( 'iframedialog',
|
||||
{
|
||||
requires : [ 'dialog' ],
|
||||
onLoad : function()
|
||||
{
|
||||
/**
|
||||
* An iframe base dialog.
|
||||
* @param {String} name Name of the dialog
|
||||
* @param {String} title Title of the dialog
|
||||
* @param {Number} minWidth Minimum width of the dialog
|
||||
* @param {Number} minHeight Minimum height of the dialog
|
||||
* @param {Function} [onContentLoad] Function called when the iframe has been loaded.
|
||||
* If it isn't specified, the inner frame is notified of the dialog events ('load',
|
||||
* 'resize', 'ok' and 'cancel') on a function called 'onDialogEvent'
|
||||
* @param {Object} [userDefinition] Additional properties for the dialog definition
|
||||
* @example
|
||||
*/
|
||||
CKEDITOR.dialog.addIframe = function( name, title, src, minWidth, minHeight, onContentLoad, userDefinition )
|
||||
{
|
||||
var element =
|
||||
{
|
||||
type : 'iframe',
|
||||
src : src,
|
||||
width : '100%',
|
||||
height : '100%'
|
||||
};
|
||||
|
||||
if ( typeof( onContentLoad ) == 'function' )
|
||||
element.onContentLoad = onContentLoad;
|
||||
else
|
||||
element.onContentLoad = function()
|
||||
{
|
||||
var element = this.getElement(),
|
||||
childWindow = element.$.contentWindow;
|
||||
|
||||
// If the inner frame has defined a "onDialogEvent" function, setup listeners
|
||||
if ( childWindow.onDialogEvent )
|
||||
{
|
||||
var dialog = this.getDialog(),
|
||||
notifyEvent = function(e)
|
||||
{
|
||||
return childWindow.onDialogEvent(e);
|
||||
};
|
||||
|
||||
dialog.on( 'ok', notifyEvent );
|
||||
dialog.on( 'cancel', notifyEvent );
|
||||
dialog.on( 'resize', notifyEvent );
|
||||
|
||||
// Clear listeners
|
||||
dialog.on( 'hide', function(e)
|
||||
{
|
||||
dialog.removeListener( 'ok', notifyEvent );
|
||||
dialog.removeListener( 'cancel', notifyEvent );
|
||||
dialog.removeListener( 'resize', notifyEvent );
|
||||
|
||||
e.removeListener();
|
||||
} );
|
||||
|
||||
// Notify child iframe of load:
|
||||
childWindow.onDialogEvent( {
|
||||
name : 'load',
|
||||
sender : this,
|
||||
editor : dialog._.editor
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
var definition =
|
||||
{
|
||||
title : title,
|
||||
minWidth : minWidth,
|
||||
minHeight : minHeight,
|
||||
contents :
|
||||
[
|
||||
{
|
||||
id : 'iframe',
|
||||
label : title,
|
||||
expand : true,
|
||||
elements : [ element ]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
for ( var i in userDefinition )
|
||||
definition[i] = userDefinition[i];
|
||||
|
||||
this.add( name, function(){ return definition; } );
|
||||
};
|
||||
|
||||
(function()
|
||||
{
|
||||
/**
|
||||
* An iframe element.
|
||||
* @extends CKEDITOR.ui.dialog.uiElement
|
||||
* @example
|
||||
* @constructor
|
||||
* @param {CKEDITOR.dialog} dialog
|
||||
* Parent dialog object.
|
||||
* @param {CKEDITOR.dialog.definition.uiElement} elementDefinition
|
||||
* The element definition. Accepted fields:
|
||||
* <ul>
|
||||
* <li><strong>src</strong> (Required) The src field of the iframe. </li>
|
||||
* <li><strong>width</strong> (Required) The iframe's width.</li>
|
||||
* <li><strong>height</strong> (Required) The iframe's height.</li>
|
||||
* <li><strong>onContentLoad</strong> (Optional) A function to be executed
|
||||
* after the iframe's contents has finished loading.</li>
|
||||
* </ul>
|
||||
* @param {Array} htmlList
|
||||
* List of HTML code to output to.
|
||||
*/
|
||||
var iframeElement = function( dialog, elementDefinition, htmlList )
|
||||
{
|
||||
if ( arguments.length < 3 )
|
||||
return;
|
||||
|
||||
var _ = ( this._ || ( this._ = {} ) ),
|
||||
contentLoad = elementDefinition.onContentLoad && CKEDITOR.tools.bind( elementDefinition.onContentLoad, this ),
|
||||
cssWidth = CKEDITOR.tools.cssLength( elementDefinition.width ),
|
||||
cssHeight = CKEDITOR.tools.cssLength( elementDefinition.height );
|
||||
_.frameId = CKEDITOR.tools.getNextId() + '_iframe';
|
||||
|
||||
// IE BUG: Parent container does not resize to contain the iframe automatically.
|
||||
dialog.on( 'load', function()
|
||||
{
|
||||
var iframe = CKEDITOR.document.getById( _.frameId ),
|
||||
parentContainer = iframe.getParent();
|
||||
|
||||
parentContainer.setStyles(
|
||||
{
|
||||
width : cssWidth,
|
||||
height : cssHeight
|
||||
} );
|
||||
} );
|
||||
|
||||
var attributes =
|
||||
{
|
||||
src : '%2',
|
||||
id : _.frameId,
|
||||
frameborder : 0,
|
||||
allowtransparency : true
|
||||
};
|
||||
var myHtml = [];
|
||||
|
||||
if ( typeof( elementDefinition.onContentLoad ) == 'function' )
|
||||
attributes.onload = 'CKEDITOR.tools.callFunction(%1);';
|
||||
|
||||
CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, myHtml, 'iframe',
|
||||
{
|
||||
width : cssWidth,
|
||||
height : cssHeight
|
||||
}, attributes, '' );
|
||||
|
||||
// Put a placeholder for the first time.
|
||||
htmlList.push( '<div style="width:' + cssWidth + ';height:' + cssHeight + ';" id="' + this.domId + '"></div>' );
|
||||
|
||||
// Iframe elements should be refreshed whenever it is shown.
|
||||
myHtml = myHtml.join( '' );
|
||||
dialog.on( 'show', function()
|
||||
{
|
||||
var iframe = CKEDITOR.document.getById( _.frameId ),
|
||||
parentContainer = iframe.getParent(),
|
||||
callIndex = CKEDITOR.tools.addFunction( contentLoad ),
|
||||
html = myHtml.replace( '%1', callIndex ).replace( '%2', CKEDITOR.tools.htmlEncode( elementDefinition.src ) );
|
||||
parentContainer.setHtml( html );
|
||||
} );
|
||||
};
|
||||
|
||||
iframeElement.prototype = new CKEDITOR.ui.dialog.uiElement;
|
||||
|
||||
CKEDITOR.dialog.addUIElement( 'iframe',
|
||||
{
|
||||
build : function( dialog, elementDefinition, output )
|
||||
{
|
||||
return new iframeElement( dialog, elementDefinition, output );
|
||||
}
|
||||
} );
|
||||
})();
|
||||
}
|
||||
} );
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,246 @@
|
||||
/*
|
||||
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*
|
||||
* This plug in by:
|
||||
* Matt Mecham 2011
|
||||
* Invision Power Services, Inc.
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
var ipsBbCodeDialog = function( editor, initVal )
|
||||
{
|
||||
var fetchDdContents = function()
|
||||
{
|
||||
arr = [];
|
||||
arr[0] = [ ipb.lang['ckeditor__pselectbbcode'], 'nill' ];
|
||||
|
||||
$H(editor.config.IPS_BBCODE).each( function( tag )
|
||||
{
|
||||
k = tag.key;
|
||||
v = tag.value;
|
||||
|
||||
arr[ arr.length ] = [ v.title, v.tag ];
|
||||
} );
|
||||
|
||||
return arr;
|
||||
};
|
||||
|
||||
var fetchTagData = function( tag )
|
||||
{
|
||||
return ( editor.config.IPS_BBCODE[tag] ) ? editor.config.IPS_BBCODE[tag] : [];
|
||||
}
|
||||
|
||||
// Handles the event when the "Type" selection box is changed.
|
||||
var bbCodeChanged = function()
|
||||
{
|
||||
var dialog = this.getDialog(),
|
||||
typeValue = this.getValue();
|
||||
|
||||
var tagData = fetchTagData( typeValue );
|
||||
var option = dialog.getContentElement( 'info', 'option' ).getElement();
|
||||
var content = dialog.getContentElement( 'info', 'content' ).getElement();
|
||||
Debug.dir( tagData );
|
||||
option.hide();
|
||||
content.hide();
|
||||
$('bbcode-description').hide();
|
||||
|
||||
if ( typeValue != 'nill' && tagData.tag )
|
||||
{
|
||||
$('bbcode-description').update( tagData.desc ).show();
|
||||
|
||||
/* Show contents */
|
||||
if ( parseInt( tagData.useoption ) == 1 )
|
||||
{
|
||||
oid = option.getAttribute('id');
|
||||
option.show();
|
||||
$(oid).down('label').update( tagData.menu_option_text ? tagData.menu_option_text : ipb.lang['ckeditor__genoption'] );
|
||||
}
|
||||
|
||||
/* Show value */
|
||||
if( parseInt( tagData.single_tag ) == 0 )
|
||||
{
|
||||
cid = content.getAttribute('id');
|
||||
content.show();
|
||||
$(cid).down('label').update( tagData.menu_content_text ? tagData.menu_content_text : ipb.lang['ckeditor__gencontent'] );
|
||||
|
||||
var html = IPSCKTools.getSelectionHtml( editor );
|
||||
var sText = IPSCKTools.cleanHtmlForTagWrap( html );
|
||||
|
||||
if ( sText != '' )
|
||||
{
|
||||
$(cid).down('textarea').value = sText;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
title : ipb.lang['ckeditor__bbcode'],
|
||||
minWidth : 350,
|
||||
minHeight : 140,
|
||||
onShow : function()
|
||||
{
|
||||
var element = this.getParentEditor().getSelection().getSelectedElement();
|
||||
},
|
||||
onOk : function()
|
||||
{
|
||||
var editor = this.getParentEditor();
|
||||
|
||||
element = editor.document.createElement( 'span' );
|
||||
element.setAttribute( 'name', 'bbcodename' );
|
||||
|
||||
this.commitContent( { element : element } );
|
||||
|
||||
tag = element.getAttribute('cke-saved-bbcode-tag');
|
||||
option = element.getAttribute('cke-saved-bbcode-option');
|
||||
ourcontent = element.getAttribute('cke-saved-bbcode-content');
|
||||
|
||||
if( ourcontent == 'false' )
|
||||
{
|
||||
ourcontent = '';
|
||||
}
|
||||
|
||||
if( option == 'false' )
|
||||
{
|
||||
option = '';
|
||||
}
|
||||
|
||||
var tagData = fetchTagData( tag );
|
||||
|
||||
if ( tagData.tag )
|
||||
{
|
||||
if( parseInt( tagData.single_tag ) == 1 )
|
||||
{
|
||||
if ( parseInt( tagData.useoption ) == 1 )
|
||||
{
|
||||
mytag = '[' + tag + '=\'' + option + '\']';
|
||||
}
|
||||
else
|
||||
{
|
||||
mytag = '[' + tag + ']';
|
||||
}
|
||||
}
|
||||
else if ( parseInt( tagData.useoption ) == 1 )
|
||||
{
|
||||
if ( tagData.optional_option == 1 && option == '' )
|
||||
{
|
||||
mytag = '[' + tag + ']' + ourcontent + '[/' + tag + ']';
|
||||
}
|
||||
else
|
||||
{
|
||||
mytag = '[' + tag + '=\'' + option + '\']' + ourcontent + '[/' + tag + ']';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mytag = '[' + tag + ']' + ourcontent + '[/' + tag + ']';
|
||||
}
|
||||
|
||||
// @link http://community.invisionpower.com/tracker/issue-29434-html-code-gets-stripped
|
||||
// Insert as pure text otherwise tags can get stripped
|
||||
editor.insertText( mytag );
|
||||
}
|
||||
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : ipb.lang['ckeditor__bbcodelabel'],
|
||||
title : ipb.lang['ckeditor__bbcodelabel'],
|
||||
elements : [
|
||||
{
|
||||
id : 'bbcodeTag',
|
||||
type : 'select',
|
||||
label : ipb.lang['ckeditor__bbcodelabel'],
|
||||
items : fetchDdContents(),
|
||||
'default': initVal,
|
||||
onLoad: bbCodeChanged,
|
||||
onChange : bbCodeChanged,
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'cke-saved-bbcode-tag', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.setAttribute( 'cke-saved-bbcode-tag', false );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'codedescription',
|
||||
type : 'html',
|
||||
html: '<div id="bbcode-description"></div>'
|
||||
},
|
||||
{
|
||||
id : 'option',
|
||||
type : 'text',
|
||||
label : ipb.lang['ckeditor__genoption'],
|
||||
hidden: 1,
|
||||
'default' : '',
|
||||
accessKey : 'N',
|
||||
setup : function( element )
|
||||
{
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'cke-saved-bbcode-option', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.setAttribute( 'cke-saved-bbcode-option', false );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'content',
|
||||
type : 'textarea',
|
||||
label : ipb.lang['ckeditor__gencontent'],
|
||||
'default' : '',
|
||||
hidden: 1,
|
||||
accessKey : 'O',
|
||||
setup : function( data )
|
||||
{
|
||||
},
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'cke-saved-bbcode-content', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.setAttribute( 'cke-saved-bbcode-content', false );
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
$H(CKEDITOR.config.IPS_BBCODE).each( function( tag )
|
||||
{
|
||||
k = tag.key;
|
||||
v = tag.value;
|
||||
|
||||
if ( v.image && v.image != '' )
|
||||
{
|
||||
eval( "CKEDITOR.dialog.add( 'ipsbbcode_" + v.tag + "', function( editor ) { return ipsBbCodeDialog( editor, '" + v.tag + "' ); } );" );
|
||||
}
|
||||
} );
|
||||
|
||||
CKEDITOR.dialog.add( 'ipsbbcode', function( editor )
|
||||
{
|
||||
return ipsBbCodeDialog( editor, '' );
|
||||
|
||||
} );
|
||||
|
||||
} )();
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 585 B |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
CKEDITOR.dialog.add( 'ipscode', function( editor )
|
||||
{
|
||||
return {
|
||||
title : ipb.lang['ckeditor__code_title'],
|
||||
|
||||
minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 368 : 350,
|
||||
minHeight : 340,
|
||||
|
||||
onShow : function()
|
||||
{
|
||||
// Reset the textarea value.
|
||||
this.getContentElement( 'general', 'content' ).getInputElement().setValue( '' );
|
||||
},
|
||||
|
||||
onOk : function()
|
||||
{
|
||||
// Get the textarea value.
|
||||
var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue(),
|
||||
editor = this.getParentEditor();
|
||||
|
||||
setTimeout( function()
|
||||
{
|
||||
editor.fire( 'paste', { 'text' : "[CODE]\n" + text + "\n[/CODE]" } );
|
||||
}, 0 );
|
||||
},
|
||||
|
||||
contents :
|
||||
[
|
||||
{
|
||||
label : ipb.lang['ckeditor__code_title'],
|
||||
id : 'general',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'html',
|
||||
id : 'pasteMsg',
|
||||
html : '<div style="white-space:normal;width:340px;">' + editor.lang.clipboard.pasteMsg + '</div>'
|
||||
},
|
||||
{
|
||||
type : 'textarea',
|
||||
id : 'content',
|
||||
className : 'cke_pastetext',
|
||||
|
||||
onLoad : function()
|
||||
{
|
||||
var label = this.getDialog().getContentElement( 'general', 'pasteMsg' ).getElement(),
|
||||
input = this.getElement().getElementsByTag( 'textarea' ).getItem( 0 );
|
||||
|
||||
input.setAttribute( 'aria-labelledby', label.$.id );
|
||||
input.setStyle( 'width', '98%' );
|
||||
input.setStyle( 'height', '280px' );
|
||||
input.setStyle( 'direction', editor.config.contentsLangDirection );
|
||||
},
|
||||
|
||||
focus : function()
|
||||
{
|
||||
this.getElement().focus();
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
})();
|
||||
|
After Width: | Height: | Size: 389 B |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 904 B |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 691 B |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 413 B |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 541 B |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'anchor', function( editor )
|
||||
{
|
||||
// Function called in onShow to load selected element.
|
||||
var loadElements = function( element )
|
||||
{
|
||||
this._.selectedElement = element;
|
||||
|
||||
var attributeValue = element.data( 'cke-saved-name' );
|
||||
this.setValueOf( 'info','txtName', attributeValue || '' );
|
||||
};
|
||||
|
||||
function createFakeAnchor( editor, anchor )
|
||||
{
|
||||
return editor.createFakeElement( anchor, 'cke_anchor', 'anchor' );
|
||||
}
|
||||
|
||||
return {
|
||||
title : editor.lang.anchor.title,
|
||||
minWidth : 300,
|
||||
minHeight : 60,
|
||||
onOk : function()
|
||||
{
|
||||
var name = this.getValueOf( 'info', 'txtName' );
|
||||
var attributes =
|
||||
{
|
||||
name : name,
|
||||
'data-cke-saved-name' : name
|
||||
};
|
||||
|
||||
if ( this._.selectedElement )
|
||||
{
|
||||
if ( this._.selectedElement.data( 'cke-realelement' ) )
|
||||
{
|
||||
var newFake = createFakeAnchor( editor, editor.document.createElement( 'a', { attributes: attributes } ) );
|
||||
newFake.replace( this._.selectedElement );
|
||||
}
|
||||
else
|
||||
this._.selectedElement.setAttributes( attributes );
|
||||
}
|
||||
else
|
||||
{
|
||||
var sel = editor.getSelection(),
|
||||
range = sel && sel.getRanges()[ 0 ];
|
||||
|
||||
// Empty anchor
|
||||
if ( range.collapsed )
|
||||
{
|
||||
if ( CKEDITOR.plugins.link.synAnchorSelector )
|
||||
attributes[ 'class' ] = 'cke_anchor_empty';
|
||||
|
||||
if ( CKEDITOR.plugins.link.emptyAnchorFix )
|
||||
{
|
||||
attributes[ 'contenteditable' ] = 'false';
|
||||
attributes[ 'data-cke-editable' ] = 1;
|
||||
}
|
||||
|
||||
var anchor = editor.document.createElement( 'a', { attributes: attributes } );
|
||||
|
||||
// Transform the anchor into a fake element for browsers that need it.
|
||||
if ( CKEDITOR.plugins.link.fakeAnchor )
|
||||
anchor = createFakeAnchor( editor, anchor );
|
||||
|
||||
range.insertNode( anchor );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
|
||||
attributes['class'] = 'cke_anchor';
|
||||
|
||||
// Apply style.
|
||||
var style = new CKEDITOR.style( { element : 'a', attributes : attributes } );
|
||||
style.type = CKEDITOR.STYLE_INLINE;
|
||||
style.apply( editor.document );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onHide : function()
|
||||
{
|
||||
delete this._.selectedElement;
|
||||
},
|
||||
|
||||
onShow : function()
|
||||
{
|
||||
var selection = editor.getSelection(),
|
||||
fullySelected = selection.getSelectedElement(),
|
||||
partialSelected;
|
||||
|
||||
// Detect the anchor under selection.
|
||||
if ( fullySelected )
|
||||
{
|
||||
if ( CKEDITOR.plugins.link.fakeAnchor )
|
||||
{
|
||||
var realElement = CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, fullySelected );
|
||||
realElement && loadElements.call( this, realElement );
|
||||
this._.selectedElement = fullySelected;
|
||||
}
|
||||
else if ( fullySelected.is( 'a' ) && fullySelected.hasAttribute( 'name' ) )
|
||||
loadElements.call( this, fullySelected );
|
||||
}
|
||||
else
|
||||
{
|
||||
partialSelected = CKEDITOR.plugins.link.getSelectedLink( editor );
|
||||
if ( partialSelected )
|
||||
{
|
||||
loadElements.call( this, partialSelected );
|
||||
selection.selectElement( partialSelected );
|
||||
}
|
||||
}
|
||||
|
||||
this.getContentElement( 'info', 'txtName' ).focus();
|
||||
},
|
||||
contents : [
|
||||
{
|
||||
id : 'info',
|
||||
label : editor.lang.anchor.title,
|
||||
accessKey : 'I',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'text',
|
||||
id : 'txtName',
|
||||
label : editor.lang.anchor.name,
|
||||
required: true,
|
||||
validate : function()
|
||||
{
|
||||
if ( !this.getValue() )
|
||||
{
|
||||
alert( editor.lang.anchor.errorName );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
} );
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 184 B |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,225 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
function getListElement( editor, listTag )
|
||||
{
|
||||
var range;
|
||||
try { range = editor.getSelection().getRanges()[ 0 ]; }
|
||||
catch( e ) { return null; }
|
||||
|
||||
range.shrink( CKEDITOR.SHRINK_TEXT );
|
||||
return range.getCommonAncestor().getAscendant( listTag, 1 );
|
||||
}
|
||||
|
||||
var listItem = function( node ) { return node.type == CKEDITOR.NODE_ELEMENT && node.is( 'li' ); };
|
||||
|
||||
var mapListStyle = {
|
||||
'a' : 'lower-alpha',
|
||||
'A' : 'upper-alpha',
|
||||
'i' : 'lower-roman',
|
||||
'I' : 'upper-roman',
|
||||
'1' : 'decimal',
|
||||
'disc' : 'disc',
|
||||
'circle': 'circle',
|
||||
'square' : 'square'
|
||||
};
|
||||
|
||||
function listStyle( editor, startupPage )
|
||||
{
|
||||
var lang = editor.lang.list;
|
||||
if ( startupPage == 'bulletedListStyle' )
|
||||
{
|
||||
return {
|
||||
title : lang.bulletedTitle,
|
||||
minWidth : 300,
|
||||
minHeight : 50,
|
||||
contents :
|
||||
[
|
||||
{
|
||||
id : 'info',
|
||||
accessKey : 'I',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'select',
|
||||
label : lang.type,
|
||||
id : 'type',
|
||||
align : 'center',
|
||||
style : 'width:150px',
|
||||
items :
|
||||
[
|
||||
[ lang.notset, '' ],
|
||||
[ lang.circle, 'circle' ],
|
||||
[ lang.disc, 'disc' ],
|
||||
[ lang.square, 'square' ]
|
||||
],
|
||||
setup : function( element )
|
||||
{
|
||||
var value = element.getStyle( 'list-style-type' )
|
||||
|| mapListStyle[ element.getAttribute( 'type' ) ]
|
||||
|| element.getAttribute( 'type' )
|
||||
|| '';
|
||||
|
||||
this.setValue( value );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
var value = this.getValue();
|
||||
if ( value )
|
||||
element.setStyle( 'list-style-type', value );
|
||||
else
|
||||
element.removeStyle( 'list-style-type' );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
onShow: function()
|
||||
{
|
||||
var editor = this.getParentEditor(),
|
||||
element = getListElement( editor, 'ul' );
|
||||
|
||||
element && this.setupContent( element );
|
||||
},
|
||||
onOk: function()
|
||||
{
|
||||
var editor = this.getParentEditor(),
|
||||
element = getListElement( editor, 'ul' );
|
||||
|
||||
element && this.commitContent( element );
|
||||
}
|
||||
};
|
||||
}
|
||||
else if ( startupPage == 'numberedListStyle' )
|
||||
{
|
||||
|
||||
var listStyleOptions =
|
||||
[
|
||||
[ lang.notset, '' ],
|
||||
[ lang.lowerRoman, 'lower-roman' ],
|
||||
[ lang.upperRoman, 'upper-roman' ],
|
||||
[ lang.lowerAlpha, 'lower-alpha' ],
|
||||
[ lang.upperAlpha, 'upper-alpha' ],
|
||||
[ lang.decimal, 'decimal' ]
|
||||
];
|
||||
|
||||
if ( !CKEDITOR.env.ie || CKEDITOR.env.version > 7 )
|
||||
{
|
||||
listStyleOptions.concat( [
|
||||
[ lang.armenian, 'armenian' ],
|
||||
[ lang.decimalLeadingZero, 'decimal-leading-zero' ],
|
||||
[ lang.georgian, 'georgian' ],
|
||||
[ lang.lowerGreek, 'lower-greek' ]
|
||||
]);
|
||||
}
|
||||
|
||||
return {
|
||||
title : lang.numberedTitle,
|
||||
minWidth : 300,
|
||||
minHeight : 50,
|
||||
contents :
|
||||
[
|
||||
{
|
||||
id : 'info',
|
||||
accessKey : 'I',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'hbox',
|
||||
widths : [ '25%', '75%' ],
|
||||
children :
|
||||
[
|
||||
{
|
||||
label : lang.start,
|
||||
type : 'text',
|
||||
id : 'start',
|
||||
validate : CKEDITOR.dialog.validate.integer( lang.validateStartNumber ),
|
||||
setup : function( element )
|
||||
{
|
||||
// List item start number dominates.
|
||||
var value = element.getFirst( listItem ).getAttribute( 'value' ) || element.getAttribute( 'start' ) || 1;
|
||||
value && this.setValue( value );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
var firstItem = element.getFirst( listItem );
|
||||
var oldStart = firstItem.getAttribute( 'value' ) || element.getAttribute( 'start' ) || 1;
|
||||
|
||||
// Force start number on list root.
|
||||
element.getFirst( listItem ).removeAttribute( 'value' );
|
||||
var val = parseInt( this.getValue(), 10 );
|
||||
if ( isNaN( val ) )
|
||||
element.removeAttribute( 'start' );
|
||||
else
|
||||
element.setAttribute( 'start', val );
|
||||
|
||||
// Update consequent list item numbering.
|
||||
var nextItem = firstItem, conseq = oldStart, startNumber = isNaN( val ) ? 1 : val;
|
||||
while ( ( nextItem = nextItem.getNext( listItem ) ) && conseq++ )
|
||||
{
|
||||
if ( nextItem.getAttribute( 'value' ) == conseq )
|
||||
nextItem.setAttribute( 'value', startNumber + conseq - oldStart );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'select',
|
||||
label : lang.type,
|
||||
id : 'type',
|
||||
style : 'width: 100%;',
|
||||
items : listStyleOptions,
|
||||
setup : function( element )
|
||||
{
|
||||
var value = element.getStyle( 'list-style-type' )
|
||||
|| mapListStyle[ element.getAttribute( 'type' ) ]
|
||||
|| element.getAttribute( 'type' )
|
||||
|| '';
|
||||
|
||||
this.setValue( value );
|
||||
},
|
||||
commit : function( element )
|
||||
{
|
||||
var value = this.getValue();
|
||||
if ( value )
|
||||
element.setStyle( 'list-style-type', value );
|
||||
else
|
||||
element.removeStyle( 'list-style-type' );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
onShow: function()
|
||||
{
|
||||
var editor = this.getParentEditor(),
|
||||
element = getListElement( editor, 'ol' );
|
||||
|
||||
element && this.setupContent( element );
|
||||
},
|
||||
onOk: function()
|
||||
{
|
||||
var editor = this.getParentEditor(),
|
||||
element = getListElement( editor, 'ol' );
|
||||
|
||||
element && this.commitContent( element );
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.dialog.add( 'numberedListStyle', function( editor )
|
||||
{
|
||||
return listStyle( editor, 'numberedListStyle' );
|
||||
});
|
||||
|
||||
CKEDITOR.dialog.add( 'bulletedListStyle', function( editor )
|
||||
{
|
||||
return listStyle( editor, 'bulletedListStyle' );
|
||||
});
|
||||
})();
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 54 B |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||