Version Description
Download this release
Release Info
Developer | azaozz |
Plugin | TinyMCE Advanced |
Version | 3.2 |
Comparing to | |
See all releases |
Code changes from version 3.1 to 3.2
- css/tadv-mce.css +1 -24
- css/tadv-styles.css +3 -3
- js/tadv.js +1 -0
- mce/advhr/css/advhr.css +5 -5
- mce/advhr/js/rule.js +43 -43
- mce/advhr/langs/en_dlg.js +4 -4
- mce/advhr/langs/langs.php +5 -3
- mce/advhr/rule.htm +63 -63
- mce/advimage/css/advimage.css +13 -13
- mce/advimage/image.htm +238 -238
- mce/advimage/js/image.js +441 -441
- mce/advimage/langs/en_dlg.js +42 -42
- mce/advimage/langs/langs.php +5 -3
- mce/advlink/css/advlink.css +8 -8
- mce/advlink/js/advlink.js +527 -527
- mce/advlink/langs/en_dlg.js +51 -51
- mce/advlink/langs/langs.php +5 -3
- mce/advlink/link.htm +339 -339
- mce/emotions/emotions.htm +21 -19
- mce/searchreplace/css/searchreplace.css +6 -6
- mce/searchreplace/js/searchreplace.js +126 -117
- mce/searchreplace/langs/en_dlg.js +15 -15
- mce/searchreplace/langs/langs.php +5 -3
- mce/searchreplace/searchreplace.htm +105 -105
- mce/style/css/props.css +13 -13
- mce/style/js/props.js +641 -641
- mce/style/langs/en_dlg.js +62 -62
- mce/style/langs/langs.php +5 -3
- mce/style/props.htm +6 -6
- mce/table/cell.htm +184 -184
- mce/table/css/cell.css +16 -16
- mce/table/css/row.css +25 -25
- mce/table/css/table.css +13 -13
- mce/table/editor_plugin.js +1 -1
- mce/table/js/cell.js +269 -259
- mce/table/js/merge_cells.js +29 -29
- mce/table/js/row.js +212 -212
- mce/table/js/table.js +413 -410
- mce/table/langs/en_dlg.js +73 -73
- mce/table/langs/langs.php +5 -3
- mce/table/merge_cells.htm +38 -38
- mce/table/row.htm +161 -161
- mce/table/table.htm +193 -193
- mce/xhtmlxtras/abbr.htm +149 -149
- mce/xhtmlxtras/acronym.htm +149 -149
- mce/xhtmlxtras/attributes.htm +154 -154
- mce/xhtmlxtras/cite.htm +149 -149
- mce/xhtmlxtras/css/attributes.css +11 -11
- mce/xhtmlxtras/css/popup.css +9 -9
- mce/xhtmlxtras/del.htm +170 -170
- mce/xhtmlxtras/editor_plugin.js +1 -1
- mce/xhtmlxtras/ins.htm +170 -170
- mce/xhtmlxtras/js/abbr.js +25 -25
- mce/xhtmlxtras/js/acronym.js +25 -25
- mce/xhtmlxtras/js/attributes.js +123 -123
- mce/xhtmlxtras/js/cite.js +25 -25
- mce/xhtmlxtras/js/del.js +60 -50
- mce/xhtmlxtras/js/element_common.js +231 -221
- mce/xhtmlxtras/js/ins.js +59 -49
- mce/xhtmlxtras/langs/en_dlg.js +31 -31
- mce/xhtmlxtras/langs/langs.php +5 -3
- readme.txt +10 -8
- tadv_admin.php +15 -19
- tiny_mce_popup.js +294 -275
- tinymce-advanced.php +41 -5
- utils/editable_selects.js +69 -69
- utils/form_utils.js +199 -199
- utils/mclayer.js +0 -210
- utils/mctabs.js +76 -76
- utils/validate.js +219 -219
css/tadv-mce.css
CHANGED
@@ -1,26 +1,3 @@
|
|
1 |
-
/*
|
2 |
Â
.shutter {}
|
3 |
Â
.shutterset {}
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
/* styles for the TinyMCE editor */
|
19 |
-
body#tinymce {
|
20 |
-
text-align: left;
|
21 |
-
background: #fff;
|
22 |
-
color: #000;
|
23 |
-
font: 13px/19px "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;
|
24 |
-
padding: 0.6em;
|
25 |
-
margin: 0;
|
26 |
-
}
|
1 |
+
/* Add css class names below and they will show in all "Style" drop-downs */
|
2 |
Â
.shutter {}
|
3 |
Â
.shutterset {}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
css/tadv-styles.css
CHANGED
@@ -51,7 +51,7 @@ form#tadvadmin {
|
|
51 |
Â
margin-left: 8px;
|
52 |
Â
}
|
53 |
Â
#tadvzones {
|
54 |
-
margin-right:
|
55 |
Â
}
|
56 |
Â
.tadvdropzone {
|
57 |
Â
float: left;
|
@@ -75,7 +75,7 @@ form#tadvadmin {
|
|
75 |
Â
}
|
76 |
Â
.tadvdropzone ul {
|
77 |
Â
height: 30px;
|
78 |
-
background-color: #
|
79 |
Â
width: 99.99%;
|
80 |
Â
float: left;
|
81 |
Â
margin: 0;
|
@@ -183,7 +183,7 @@ form#tadvadmin {
|
|
183 |
Â
width: 1px;
|
184 |
Â
}
|
185 |
Â
#tadvpalette .separator .tadvitem {
|
186 |
-
background: #
|
187 |
Â
border: 1px solid #AAAAAA;
|
188 |
Â
display: block;
|
189 |
Â
height: 20px;
|
51 |
Â
margin-left: 8px;
|
52 |
Â
}
|
53 |
Â
#tadvzones {
|
54 |
+
margin-right: 280px;
|
55 |
Â
}
|
56 |
Â
.tadvdropzone {
|
57 |
Â
float: left;
|
75 |
Â
}
|
76 |
Â
.tadvdropzone ul {
|
77 |
Â
height: 30px;
|
78 |
+
background-color: #E5E5E5;
|
79 |
Â
width: 99.99%;
|
80 |
Â
float: left;
|
81 |
Â
margin: 0;
|
183 |
Â
width: 1px;
|
184 |
Â
}
|
185 |
Â
#tadvpalette .separator .tadvitem {
|
186 |
+
background-color: #e5e5e5;
|
187 |
Â
border: 1px solid #AAAAAA;
|
188 |
Â
display: block;
|
189 |
Â
height: 20px;
|
js/tadv.js
CHANGED
@@ -79,6 +79,7 @@
|
|
79 |
Â
|
80 |
Â
reset : function() {
|
81 |
Â
var pd = this.I('tadvpalette');
|
Â
|
|
82 |
Â
if( pd.childNodes.length > 6 ) {
|
83 |
Â
var last = pd.lastChild.previousSibling;
|
84 |
Â
pd.style.height = last.offsetTop + last.offsetHeight + 30 + "px";
|
79 |
Â
|
80 |
Â
reset : function() {
|
81 |
Â
var pd = this.I('tadvpalette');
|
82 |
+
if ( ! pd ) return;
|
83 |
Â
if( pd.childNodes.length > 6 ) {
|
84 |
Â
var last = pd.lastChild.previousSibling;
|
85 |
Â
pd.style.height = last.offsetTop + last.offsetHeight + 30 + "px";
|
mce/advhr/css/advhr.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
input.radio {border:1px none #000; background:transparent; vertical-align:middle;}
|
2 |
-
.panel_wrapper div.current {height:80px;}
|
3 |
-
#width {width:50px; vertical-align:middle;}
|
4 |
-
#width2 {width:50px; vertical-align:middle;}
|
5 |
-
#size {width:100px;}
|
1 |
+
input.radio {border:1px none #000; background:transparent; vertical-align:middle;}
|
2 |
+
.panel_wrapper div.current {height:80px;}
|
3 |
+
#width {width:50px; vertical-align:middle;}
|
4 |
+
#width2 {width:50px; vertical-align:middle;}
|
5 |
+
#size {width:100px;}
|
mce/advhr/js/rule.js
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
-
var AdvHRDialog = {
|
2 |
-
init : function(ed) {
|
3 |
-
var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w;
|
4 |
-
|
5 |
-
w = dom.getAttrib(n, 'width');
|
6 |
-
f.width.value = w ? parseInt(w) : (dom.getStyle('width') || '');
|
7 |
-
f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || '';
|
8 |
-
f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width');
|
9 |
-
selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px');
|
10 |
-
},
|
11 |
-
|
12 |
-
update : function() {
|
13 |
-
var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = '';
|
14 |
-
|
15 |
-
h = '<hr';
|
16 |
-
|
17 |
-
if (f.size.value) {
|
18 |
-
h += ' size="' + f.size.value + '"';
|
19 |
-
st += ' height:' + f.size.value + 'px;';
|
20 |
-
}
|
21 |
-
|
22 |
-
if (f.width.value) {
|
23 |
-
h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"';
|
24 |
-
st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';';
|
25 |
-
}
|
26 |
-
|
27 |
-
if (f.noshade.checked) {
|
28 |
-
h += ' noshade="noshade"';
|
29 |
-
st += ' border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;';
|
30 |
-
}
|
31 |
-
|
32 |
-
if (ed.settings.inline_styles)
|
33 |
-
h += ' style="' + tinymce.trim(st) + '"';
|
34 |
-
|
35 |
-
h += ' />';
|
36 |
-
|
37 |
-
ed.execCommand("mceInsertContent", false, h);
|
38 |
-
tinyMCEPopup.close();
|
39 |
-
}
|
40 |
-
};
|
41 |
-
|
42 |
-
tinyMCEPopup.requireLangPack();
|
43 |
-
tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);
|
1 |
+
var AdvHRDialog = {
|
2 |
+
init : function(ed) {
|
3 |
+
var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w;
|
4 |
+
|
5 |
+
w = dom.getAttrib(n, 'width');
|
6 |
+
f.width.value = w ? parseInt(w) : (dom.getStyle('width') || '');
|
7 |
+
f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || '';
|
8 |
+
f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width');
|
9 |
+
selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px');
|
10 |
+
},
|
11 |
+
|
12 |
+
update : function() {
|
13 |
+
var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = '';
|
14 |
+
|
15 |
+
h = '<hr';
|
16 |
+
|
17 |
+
if (f.size.value) {
|
18 |
+
h += ' size="' + f.size.value + '"';
|
19 |
+
st += ' height:' + f.size.value + 'px;';
|
20 |
+
}
|
21 |
+
|
22 |
+
if (f.width.value) {
|
23 |
+
h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"';
|
24 |
+
st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';';
|
25 |
+
}
|
26 |
+
|
27 |
+
if (f.noshade.checked) {
|
28 |
+
h += ' noshade="noshade"';
|
29 |
+
st += ' border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;';
|
30 |
+
}
|
31 |
+
|
32 |
+
if (ed.settings.inline_styles)
|
33 |
+
h += ' style="' + tinymce.trim(st) + '"';
|
34 |
+
|
35 |
+
h += ' />';
|
36 |
+
|
37 |
+
ed.execCommand("mceInsertContent", false, h);
|
38 |
+
tinyMCEPopup.close();
|
39 |
+
}
|
40 |
+
};
|
41 |
+
|
42 |
+
tinyMCEPopup.requireLangPack();
|
43 |
+
tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);
|
mce/advhr/langs/en_dlg.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
tinyMCE.addI18n('en.advhr_dlg',{
|
2 |
-
width:"Width",
|
3 |
-
size:"Height",
|
4 |
-
noshade:"No shadow"
|
5 |
Â
});
|
1 |
+
tinyMCE.addI18n('en.advhr_dlg',{
|
2 |
+
width:"Width",
|
3 |
+
size:"Height",
|
4 |
+
noshade:"No shadow"
|
5 |
Â
});
|
mce/advhr/langs/langs.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
-
$strings
|
6 |
-
else
|
7 |
-
|
Â
|
|
Â
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
+
$strings = tdav_get_file($lang_file);
|
6 |
+
else {
|
7 |
+
$strings = tdav_get_file(dirname(__FILE__) . '/en_dlg.js');
|
8 |
+
$strings = preg_replace( '/([\'"])en\./', '$1'.$mce_locale.'.', $strings, 1 );
|
9 |
+
}
|
mce/advhr/rule.htm
CHANGED
@@ -1,63 +1,63 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#advhr.advhr_desc}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="js/rule.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
9 |
-
<link href="css/advhr.css?ver=
|
10 |
-
<base target="_self" />
|
11 |
-
</head>
|
12 |
-
<body>
|
13 |
-
<form onsubmit="AdvHRDialog.update();return false;" action="#">
|
14 |
-
<div class="tabs">
|
15 |
-
<ul>
|
16 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
|
17 |
-
</ul>
|
18 |
-
</div>
|
19 |
-
|
20 |
-
<div class="panel_wrapper">
|
21 |
-
<div id="general_panel" class="panel current">
|
22 |
-
<table border="0" cellpadding="4" cellspacing="0">
|
23 |
-
<tr>
|
24 |
-
<td><label for="width">{#advhr_dlg.width}</label></td>
|
25 |
-
<td nowrap="nowrap">
|
26 |
-
<input id="width" name="width" type="text" value="" class="mceFocus" />
|
27 |
-
<select name="width2" id="width2">
|
28 |
-
<option value="">px</option>
|
29 |
-
<option value="%">%</option>
|
30 |
-
</select>
|
31 |
-
</td>
|
32 |
-
</tr>
|
33 |
-
<tr>
|
34 |
-
<td><label for="size">{#advhr_dlg.size}</label></td>
|
35 |
-
<td><select id="size" name="size">
|
36 |
-
<option value="">Normal</option>
|
37 |
-
<option value="1">1</option>
|
38 |
-
<option value="2">2</option>
|
39 |
-
<option value="3">3</option>
|
40 |
-
<option value="4">4</option>
|
41 |
-
<option value="5">5</option>
|
42 |
-
</select></td>
|
43 |
-
</tr>
|
44 |
-
<tr>
|
45 |
-
<td><label for="noshade">{#advhr_dlg.noshade}</label></td>
|
46 |
-
<td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
|
47 |
-
</tr>
|
48 |
-
</table>
|
49 |
-
</div>
|
50 |
-
</div>
|
51 |
-
|
52 |
-
<div class="mceActionPanel">
|
53 |
-
<div style="float: left">
|
54 |
-
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
55 |
-
</div>
|
56 |
-
|
57 |
-
<div style="float: right">
|
58 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
59 |
-
</div>
|
60 |
-
</div>
|
61 |
-
</form>
|
62 |
-
</body>
|
63 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#advhr.advhr_desc}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="js/rule.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
9 |
+
<link href="css/advhr.css?ver=3211" rel="stylesheet" type="text/css" />
|
10 |
+
<base target="_self" />
|
11 |
+
</head>
|
12 |
+
<body>
|
13 |
+
<form onsubmit="AdvHRDialog.update();return false;" action="#">
|
14 |
+
<div class="tabs">
|
15 |
+
<ul>
|
16 |
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
|
17 |
+
</ul>
|
18 |
+
</div>
|
19 |
+
|
20 |
+
<div class="panel_wrapper">
|
21 |
+
<div id="general_panel" class="panel current">
|
22 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
23 |
+
<tr>
|
24 |
+
<td><label for="width">{#advhr_dlg.width}</label></td>
|
25 |
+
<td nowrap="nowrap">
|
26 |
+
<input id="width" name="width" type="text" value="" class="mceFocus" />
|
27 |
+
<select name="width2" id="width2">
|
28 |
+
<option value="">px</option>
|
29 |
+
<option value="%">%</option>
|
30 |
+
</select>
|
31 |
+
</td>
|
32 |
+
</tr>
|
33 |
+
<tr>
|
34 |
+
<td><label for="size">{#advhr_dlg.size}</label></td>
|
35 |
+
<td><select id="size" name="size">
|
36 |
+
<option value="">Normal</option>
|
37 |
+
<option value="1">1</option>
|
38 |
+
<option value="2">2</option>
|
39 |
+
<option value="3">3</option>
|
40 |
+
<option value="4">4</option>
|
41 |
+
<option value="5">5</option>
|
42 |
+
</select></td>
|
43 |
+
</tr>
|
44 |
+
<tr>
|
45 |
+
<td><label for="noshade">{#advhr_dlg.noshade}</label></td>
|
46 |
+
<td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
|
47 |
+
</tr>
|
48 |
+
</table>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
|
52 |
+
<div class="mceActionPanel">
|
53 |
+
<div style="float: left">
|
54 |
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
55 |
+
</div>
|
56 |
+
|
57 |
+
<div style="float: right">
|
58 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
</form>
|
62 |
+
</body>
|
63 |
+
</html>
|
mce/advimage/css/advimage.css
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
#src_list, #over_list, #out_list {width:280px;}
|
2 |
-
.mceActionPanel {margin-top:7px;}
|
3 |
-
.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;}
|
4 |
-
.checkbox {border:0;}
|
5 |
-
.panel_wrapper div.current {height:305px;}
|
6 |
-
#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;}
|
7 |
-
#align, #classlist {width:150px;}
|
8 |
-
#width, #height {vertical-align:middle; width:50px; text-align:center;}
|
9 |
-
#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;}
|
10 |
-
#class_list {width:180px;}
|
11 |
-
input {width: 280px;}
|
12 |
-
#constrain, #onmousemovecheck {width:auto;}
|
13 |
-
#id, #dir, #lang, #usemap, #longdesc {width:200px;}
|
1 |
+
#src_list, #over_list, #out_list {width:280px;}
|
2 |
+
.mceActionPanel {margin-top:7px;}
|
3 |
+
.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;}
|
4 |
+
.checkbox {border:0;}
|
5 |
+
.panel_wrapper div.current {height:305px;}
|
6 |
+
#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;}
|
7 |
+
#align, #classlist {width:150px;}
|
8 |
+
#width, #height {vertical-align:middle; width:50px; text-align:center;}
|
9 |
+
#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;}
|
10 |
+
#class_list {width:180px;}
|
11 |
+
input {width: 280px;}
|
12 |
+
#constrain, #onmousemovecheck {width:auto;}
|
13 |
+
#id, #dir, #lang, #usemap, #longdesc {width:200px;}
|
mce/advimage/image.htm
CHANGED
@@ -1,238 +1,238 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#advimage_dlg.dialog_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/validate.js?ver=
|
9 |
-
<script type="text/javascript" src="../../utils/editable_selects.js?ver=
|
10 |
-
<script type="text/javascript" src="js/image.js?ver=
|
11 |
-
<link href="css/advimage.css?ver=
|
12 |
-
<base target="_self" />
|
13 |
-
</head>
|
14 |
-
<body id="advimage" style="display: none">
|
15 |
-
<form onsubmit="ImageDialog.insert();return false;" action="#">
|
16 |
-
<div class="tabs">
|
17 |
-
<ul>
|
18 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li>
|
19 |
-
<li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li>
|
20 |
-
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li>
|
21 |
-
</ul>
|
22 |
-
</div>
|
23 |
-
|
24 |
-
<div class="panel_wrapper">
|
25 |
-
<div id="general_panel" class="panel current">
|
26 |
-
<fieldset>
|
27 |
-
<legend>{#advimage_dlg.general}</legend>
|
28 |
-
|
29 |
-
<table class="properties">
|
30 |
-
<tr>
|
31 |
-
<td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td>
|
32 |
-
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
|
33 |
-
<tr>
|
34 |
-
<td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" /></td>
|
35 |
-
<td id="srcbrowsercontainer"> </td>
|
36 |
-
</tr>
|
37 |
-
</table></td>
|
38 |
-
</tr>
|
39 |
-
<tr>
|
40 |
-
<td><label for="src_list">{#advimage_dlg.image_list}</label></td>
|
41 |
-
<td><select id="src_list" name="src_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;document.getElementById('title').value=this.options[this.selectedIndex].text;ImageDialog.showPreviewImage(this.options[this.selectedIndex].value);"></select></td>
|
42 |
-
</tr>
|
43 |
-
<tr>
|
44 |
-
<td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td>
|
45 |
-
<td colspan="2"><input id="alt" name="alt" type="text" value="" /></td>
|
46 |
-
</tr>
|
47 |
-
<tr>
|
48 |
-
<td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td>
|
49 |
-
<td colspan="2"><input id="title" name="title" type="text" value="" /></td>
|
50 |
-
</tr>
|
51 |
-
</table>
|
52 |
-
</fieldset>
|
53 |
-
|
54 |
-
<fieldset>
|
55 |
-
<legend>{#advimage_dlg.preview}</legend>
|
56 |
-
<div id="prev"></div>
|
57 |
-
</fieldset>
|
58 |
-
</div>
|
59 |
-
|
60 |
-
<div id="appearance_panel" class="panel">
|
61 |
-
<fieldset>
|
62 |
-
<legend>{#advimage_dlg.tab_appearance}</legend>
|
63 |
-
|
64 |
-
<table border="0" cellpadding="4" cellspacing="0">
|
65 |
-
<tr>
|
66 |
-
<td class="column1"><label id="alignlabel" for="align">{#advimage_dlg.align}</label></td>
|
67 |
-
<td><select id="align" name="align" onchange="ImageDialog.updateStyle('align');ImageDialog.changeAppearance();">
|
68 |
-
<option value="">{#not_set}</option>
|
69 |
-
<option value="baseline">{#advimage_dlg.align_baseline}</option>
|
70 |
-
<option value="top">{#advimage_dlg.align_top}</option>
|
71 |
-
<option value="middle">{#advimage_dlg.align_middle}</option>
|
72 |
-
<option value="bottom">{#advimage_dlg.align_bottom}</option>
|
73 |
-
<option value="text-top">{#advimage_dlg.align_texttop}</option>
|
74 |
-
<option value="text-bottom">{#advimage_dlg.align_textbottom}</option>
|
75 |
-
<option value="left">{#advimage_dlg.align_left}</option>
|
76 |
-
<option value="right">{#advimage_dlg.align_right}</option>
|
77 |
-
</select>
|
78 |
-
</td>
|
79 |
-
<td rowspan="6" valign="top">
|
80 |
-
<div class="alignPreview">
|
81 |
-
<img id="alignSampleImg" src="img/sample.gif" alt="{#advimage_dlg.example_img}" />
|
82 |
-
Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam
|
83 |
-
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum
|
84 |
-
edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
|
85 |
-
erat volutpat.
|
86 |
-
</div>
|
87 |
-
</td>
|
88 |
-
</tr>
|
89 |
-
|
90 |
-
<tr>
|
91 |
-
<td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td>
|
92 |
-
<td nowrap="nowrap">
|
93 |
-
<input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" /> x
|
94 |
-
<input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" /> px
|
95 |
-
</td>
|
96 |
-
</tr>
|
97 |
-
|
98 |
-
<tr>
|
99 |
-
<td> </td>
|
100 |
-
<td><table border="0" cellpadding="0" cellspacing="0">
|
101 |
-
<tr>
|
102 |
-
<td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
|
103 |
-
<td><label id="constrainlabel" for="constrain">{#advimage_dlg.constrain_proportions}</label></td>
|
104 |
-
</tr>
|
105 |
-
</table></td>
|
106 |
-
</tr>
|
107 |
-
|
108 |
-
<tr>
|
109 |
-
<td class="column1"><label id="vspacelabel" for="vspace">{#advimage_dlg.vspace}</label></td>
|
110 |
-
<td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" />
|
111 |
-
</td>
|
112 |
-
</tr>
|
113 |
-
|
114 |
-
<tr>
|
115 |
-
<td class="column1"><label id="hspacelabel" for="hspace">{#advimage_dlg.hspace}</label></td>
|
116 |
-
<td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" /></td>
|
117 |
-
</tr>
|
118 |
-
|
119 |
-
<tr>
|
120 |
-
<td class="column1"><label id="borderlabel" for="border">{#advimage_dlg.border}</label></td>
|
121 |
-
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" /></td>
|
122 |
-
</tr>
|
123 |
-
|
124 |
-
<tr>
|
125 |
-
<td><label for="class_list">{#class_name}</label></td>
|
126 |
-
<td colspan="2"><select id="class_list" name="class_list" class="mceEditableSelect"></select></td>
|
127 |
-
</tr>
|
128 |
-
|
129 |
-
<tr>
|
130 |
-
<td class="column1"><label id="stylelabel" for="style">{#advimage_dlg.style}</label></td>
|
131 |
-
<td colspan="2"><input id="style" name="style" type="text" value="" onchange="ImageDialog.changeAppearance();" /></td>
|
132 |
-
</tr>
|
133 |
-
|
134 |
-
<!-- <tr>
|
135 |
-
<td class="column1"><label id="classeslabel" for="classes">{#advimage_dlg.classes}</label></td>
|
136 |
-
<td colspan="2"><input id="classes" name="classes" type="text" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
|
137 |
-
</tr> -->
|
138 |
-
</table>
|
139 |
-
</fieldset>
|
140 |
-
</div>
|
141 |
-
|
142 |
-
<div id="advanced_panel" class="panel">
|
143 |
-
<fieldset>
|
144 |
-
<legend>{#advimage_dlg.swap_image}</legend>
|
145 |
-
|
146 |
-
<input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="ImageDialog.setSwapImage(this.checked);" />
|
147 |
-
<label id="onmousemovechecklabel" for="onmousemovecheck">{#advimage_dlg.alt_image}</label>
|
148 |
-
|
149 |
-
<table border="0" cellpadding="4" cellspacing="0" width="100%">
|
150 |
-
<tr>
|
151 |
-
<td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{#advimage_dlg.mouseover}</label></td>
|
152 |
-
<td><table border="0" cellspacing="0" cellpadding="0">
|
153 |
-
<tr>
|
154 |
-
<td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td>
|
155 |
-
<td id="onmouseoversrccontainer"> </td>
|
156 |
-
</tr>
|
157 |
-
</table></td>
|
158 |
-
</tr>
|
159 |
-
<tr>
|
160 |
-
<td><label for="over_list">{#advimage_dlg.image_list}</label></td>
|
161 |
-
<td><select id="over_list" name="over_list" onchange="document.getElementById('onmouseoversrc').value=this.options[this.selectedIndex].value;"></select></td>
|
162 |
-
</tr>
|
163 |
-
<tr>
|
164 |
-
<td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{#advimage_dlg.mouseout}</label></td>
|
165 |
-
<td class="column2"><table border="0" cellspacing="0" cellpadding="0">
|
166 |
-
<tr>
|
167 |
-
<td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td>
|
168 |
-
<td id="onmouseoutsrccontainer"> </td>
|
169 |
-
</tr>
|
170 |
-
</table></td>
|
171 |
-
</tr>
|
172 |
-
<tr>
|
173 |
-
<td><label for="out_list">{#advimage_dlg.image_list}</label></td>
|
174 |
-
<td><select id="out_list" name="out_list" onchange="document.getElementById('onmouseoutsrc').value=this.options[this.selectedIndex].value;"></select></td>
|
175 |
-
</tr>
|
176 |
-
</table>
|
177 |
-
</fieldset>
|
178 |
-
|
179 |
-
<fieldset>
|
180 |
-
<legend>{#advimage_dlg.misc}</legend>
|
181 |
-
|
182 |
-
<table border="0" cellpadding="4" cellspacing="0">
|
183 |
-
<tr>
|
184 |
-
<td class="column1"><label id="idlabel" for="id">{#advimage_dlg.id}</label></td>
|
185 |
-
<td><input id="id" name="id" type="text" value="" /></td>
|
186 |
-
</tr>
|
187 |
-
|
188 |
-
<tr>
|
189 |
-
<td class="column1"><label id="dirlabel" for="dir">{#advimage_dlg.langdir}</label></td>
|
190 |
-
<td>
|
191 |
-
<select id="dir" name="dir" onchange="ImageDialog.changeAppearance();">
|
192 |
-
<option value="">{#not_set}</option>
|
193 |
-
<option value="ltr">{#advimage_dlg.ltr}</option>
|
194 |
-
<option value="rtl">{#advimage_dlg.rtl}</option>
|
195 |
-
</select>
|
196 |
-
</td>
|
197 |
-
</tr>
|
198 |
-
|
199 |
-
<tr>
|
200 |
-
<td class="column1"><label id="langlabel" for="lang">{#advimage_dlg.langcode}</label></td>
|
201 |
-
<td>
|
202 |
-
<input id="lang" name="lang" type="text" value="" />
|
203 |
-
</td>
|
204 |
-
</tr>
|
205 |
-
|
206 |
-
<tr>
|
207 |
-
<td class="column1"><label id="usemaplabel" for="usemap">{#advimage_dlg.map}</label></td>
|
208 |
-
<td>
|
209 |
-
<input id="usemap" name="usemap" type="text" value="" />
|
210 |
-
</td>
|
211 |
-
</tr>
|
212 |
-
|
213 |
-
<tr>
|
214 |
-
<td class="column1"><label id="longdesclabel" for="longdesc">{#advimage_dlg.long_desc}</label></td>
|
215 |
-
<td><table border="0" cellspacing="0" cellpadding="0">
|
216 |
-
<tr>
|
217 |
-
<td><input id="longdesc" name="longdesc" type="text" value="" /></td>
|
218 |
-
<td id="longdesccontainer"> </td>
|
219 |
-
</tr>
|
220 |
-
</table></td>
|
221 |
-
</tr>
|
222 |
-
</table>
|
223 |
-
</fieldset>
|
224 |
-
</div>
|
225 |
-
</div>
|
226 |
-
|
227 |
-
<div class="mceActionPanel">
|
228 |
-
<div style="float: left">
|
229 |
-
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
230 |
-
</div>
|
231 |
-
|
232 |
-
<div style="float: right">
|
233 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
234 |
-
</div>
|
235 |
-
</div>
|
236 |
-
</form>
|
237 |
-
</body>
|
238 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#advimage_dlg.dialog_title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/validate.js?ver=3211"></script>
|
9 |
+
<script type="text/javascript" src="../../utils/editable_selects.js?ver=3211"></script>
|
10 |
+
<script type="text/javascript" src="js/image.js?ver=3211"></script>
|
11 |
+
<link href="css/advimage.css?ver=3211" rel="stylesheet" type="text/css" />
|
12 |
+
<base target="_self" />
|
13 |
+
</head>
|
14 |
+
<body id="advimage" style="display: none">
|
15 |
+
<form onsubmit="ImageDialog.insert();return false;" action="#">
|
16 |
+
<div class="tabs">
|
17 |
+
<ul>
|
18 |
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li>
|
19 |
+
<li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li>
|
20 |
+
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li>
|
21 |
+
</ul>
|
22 |
+
</div>
|
23 |
+
|
24 |
+
<div class="panel_wrapper">
|
25 |
+
<div id="general_panel" class="panel current">
|
26 |
+
<fieldset>
|
27 |
+
<legend>{#advimage_dlg.general}</legend>
|
28 |
+
|
29 |
+
<table class="properties">
|
30 |
+
<tr>
|
31 |
+
<td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td>
|
32 |
+
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
|
33 |
+
<tr>
|
34 |
+
<td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" /></td>
|
35 |
+
<td id="srcbrowsercontainer"> </td>
|
36 |
+
</tr>
|
37 |
+
</table></td>
|
38 |
+
</tr>
|
39 |
+
<tr>
|
40 |
+
<td><label for="src_list">{#advimage_dlg.image_list}</label></td>
|
41 |
+
<td><select id="src_list" name="src_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;document.getElementById('title').value=this.options[this.selectedIndex].text;ImageDialog.showPreviewImage(this.options[this.selectedIndex].value);"></select></td>
|
42 |
+
</tr>
|
43 |
+
<tr>
|
44 |
+
<td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td>
|
45 |
+
<td colspan="2"><input id="alt" name="alt" type="text" value="" /></td>
|
46 |
+
</tr>
|
47 |
+
<tr>
|
48 |
+
<td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td>
|
49 |
+
<td colspan="2"><input id="title" name="title" type="text" value="" /></td>
|
50 |
+
</tr>
|
51 |
+
</table>
|
52 |
+
</fieldset>
|
53 |
+
|
54 |
+
<fieldset>
|
55 |
+
<legend>{#advimage_dlg.preview}</legend>
|
56 |
+
<div id="prev"></div>
|
57 |
+
</fieldset>
|
58 |
+
</div>
|
59 |
+
|
60 |
+
<div id="appearance_panel" class="panel">
|
61 |
+
<fieldset>
|
62 |
+
<legend>{#advimage_dlg.tab_appearance}</legend>
|
63 |
+
|
64 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
65 |
+
<tr>
|
66 |
+
<td class="column1"><label id="alignlabel" for="align">{#advimage_dlg.align}</label></td>
|
67 |
+
<td><select id="align" name="align" onchange="ImageDialog.updateStyle('align');ImageDialog.changeAppearance();">
|
68 |
+
<option value="">{#not_set}</option>
|
69 |
+
<option value="baseline">{#advimage_dlg.align_baseline}</option>
|
70 |
+
<option value="top">{#advimage_dlg.align_top}</option>
|
71 |
+
<option value="middle">{#advimage_dlg.align_middle}</option>
|
72 |
+
<option value="bottom">{#advimage_dlg.align_bottom}</option>
|
73 |
+
<option value="text-top">{#advimage_dlg.align_texttop}</option>
|
74 |
+
<option value="text-bottom">{#advimage_dlg.align_textbottom}</option>
|
75 |
+
<option value="left">{#advimage_dlg.align_left}</option>
|
76 |
+
<option value="right">{#advimage_dlg.align_right}</option>
|
77 |
+
</select>
|
78 |
+
</td>
|
79 |
+
<td rowspan="6" valign="top">
|
80 |
+
<div class="alignPreview">
|
81 |
+
<img id="alignSampleImg" src="img/sample.gif" alt="{#advimage_dlg.example_img}" />
|
82 |
+
Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam
|
83 |
+
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum
|
84 |
+
edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
|
85 |
+
erat volutpat.
|
86 |
+
</div>
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
|
90 |
+
<tr>
|
91 |
+
<td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td>
|
92 |
+
<td nowrap="nowrap">
|
93 |
+
<input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" /> x
|
94 |
+
<input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" /> px
|
95 |
+
</td>
|
96 |
+
</tr>
|
97 |
+
|
98 |
+
<tr>
|
99 |
+
<td> </td>
|
100 |
+
<td><table border="0" cellpadding="0" cellspacing="0">
|
101 |
+
<tr>
|
102 |
+
<td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
|
103 |
+
<td><label id="constrainlabel" for="constrain">{#advimage_dlg.constrain_proportions}</label></td>
|
104 |
+
</tr>
|
105 |
+
</table></td>
|
106 |
+
</tr>
|
107 |
+
|
108 |
+
<tr>
|
109 |
+
<td class="column1"><label id="vspacelabel" for="vspace">{#advimage_dlg.vspace}</label></td>
|
110 |
+
<td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" />
|
111 |
+
</td>
|
112 |
+
</tr>
|
113 |
+
|
114 |
+
<tr>
|
115 |
+
<td class="column1"><label id="hspacelabel" for="hspace">{#advimage_dlg.hspace}</label></td>
|
116 |
+
<td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" /></td>
|
117 |
+
</tr>
|
118 |
+
|
119 |
+
<tr>
|
120 |
+
<td class="column1"><label id="borderlabel" for="border">{#advimage_dlg.border}</label></td>
|
121 |
+
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" /></td>
|
122 |
+
</tr>
|
123 |
+
|
124 |
+
<tr>
|
125 |
+
<td><label for="class_list">{#class_name}</label></td>
|
126 |
+
<td colspan="2"><select id="class_list" name="class_list" class="mceEditableSelect"></select></td>
|
127 |
+
</tr>
|
128 |
+
|
129 |
+
<tr>
|
130 |
+
<td class="column1"><label id="stylelabel" for="style">{#advimage_dlg.style}</label></td>
|
131 |
+
<td colspan="2"><input id="style" name="style" type="text" value="" onchange="ImageDialog.changeAppearance();" /></td>
|
132 |
+
</tr>
|
133 |
+
|
134 |
+
<!-- <tr>
|
135 |
+
<td class="column1"><label id="classeslabel" for="classes">{#advimage_dlg.classes}</label></td>
|
136 |
+
<td colspan="2"><input id="classes" name="classes" type="text" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
|
137 |
+
</tr> -->
|
138 |
+
</table>
|
139 |
+
</fieldset>
|
140 |
+
</div>
|
141 |
+
|
142 |
+
<div id="advanced_panel" class="panel">
|
143 |
+
<fieldset>
|
144 |
+
<legend>{#advimage_dlg.swap_image}</legend>
|
145 |
+
|
146 |
+
<input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="ImageDialog.setSwapImage(this.checked);" />
|
147 |
+
<label id="onmousemovechecklabel" for="onmousemovecheck">{#advimage_dlg.alt_image}</label>
|
148 |
+
|
149 |
+
<table border="0" cellpadding="4" cellspacing="0" width="100%">
|
150 |
+
<tr>
|
151 |
+
<td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{#advimage_dlg.mouseover}</label></td>
|
152 |
+
<td><table border="0" cellspacing="0" cellpadding="0">
|
153 |
+
<tr>
|
154 |
+
<td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td>
|
155 |
+
<td id="onmouseoversrccontainer"> </td>
|
156 |
+
</tr>
|
157 |
+
</table></td>
|
158 |
+
</tr>
|
159 |
+
<tr>
|
160 |
+
<td><label for="over_list">{#advimage_dlg.image_list}</label></td>
|
161 |
+
<td><select id="over_list" name="over_list" onchange="document.getElementById('onmouseoversrc').value=this.options[this.selectedIndex].value;"></select></td>
|
162 |
+
</tr>
|
163 |
+
<tr>
|
164 |
+
<td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{#advimage_dlg.mouseout}</label></td>
|
165 |
+
<td class="column2"><table border="0" cellspacing="0" cellpadding="0">
|
166 |
+
<tr>
|
167 |
+
<td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td>
|
168 |
+
<td id="onmouseoutsrccontainer"> </td>
|
169 |
+
</tr>
|
170 |
+
</table></td>
|
171 |
+
</tr>
|
172 |
+
<tr>
|
173 |
+
<td><label for="out_list">{#advimage_dlg.image_list}</label></td>
|
174 |
+
<td><select id="out_list" name="out_list" onchange="document.getElementById('onmouseoutsrc').value=this.options[this.selectedIndex].value;"></select></td>
|
175 |
+
</tr>
|
176 |
+
</table>
|
177 |
+
</fieldset>
|
178 |
+
|
179 |
+
<fieldset>
|
180 |
+
<legend>{#advimage_dlg.misc}</legend>
|
181 |
+
|
182 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
183 |
+
<tr>
|
184 |
+
<td class="column1"><label id="idlabel" for="id">{#advimage_dlg.id}</label></td>
|
185 |
+
<td><input id="id" name="id" type="text" value="" /></td>
|
186 |
+
</tr>
|
187 |
+
|
188 |
+
<tr>
|
189 |
+
<td class="column1"><label id="dirlabel" for="dir">{#advimage_dlg.langdir}</label></td>
|
190 |
+
<td>
|
191 |
+
<select id="dir" name="dir" onchange="ImageDialog.changeAppearance();">
|
192 |
+
<option value="">{#not_set}</option>
|
193 |
+
<option value="ltr">{#advimage_dlg.ltr}</option>
|
194 |
+
<option value="rtl">{#advimage_dlg.rtl}</option>
|
195 |
+
</select>
|
196 |
+
</td>
|
197 |
+
</tr>
|
198 |
+
|
199 |
+
<tr>
|
200 |
+
<td class="column1"><label id="langlabel" for="lang">{#advimage_dlg.langcode}</label></td>
|
201 |
+
<td>
|
202 |
+
<input id="lang" name="lang" type="text" value="" />
|
203 |
+
</td>
|
204 |
+
</tr>
|
205 |
+
|
206 |
+
<tr>
|
207 |
+
<td class="column1"><label id="usemaplabel" for="usemap">{#advimage_dlg.map}</label></td>
|
208 |
+
<td>
|
209 |
+
<input id="usemap" name="usemap" type="text" value="" />
|
210 |
+
</td>
|
211 |
+
</tr>
|
212 |
+
|
213 |
+
<tr>
|
214 |
+
<td class="column1"><label id="longdesclabel" for="longdesc">{#advimage_dlg.long_desc}</label></td>
|
215 |
+
<td><table border="0" cellspacing="0" cellpadding="0">
|
216 |
+
<tr>
|
217 |
+
<td><input id="longdesc" name="longdesc" type="text" value="" /></td>
|
218 |
+
<td id="longdesccontainer"> </td>
|
219 |
+
</tr>
|
220 |
+
</table></td>
|
221 |
+
</tr>
|
222 |
+
</table>
|
223 |
+
</fieldset>
|
224 |
+
</div>
|
225 |
+
</div>
|
226 |
+
|
227 |
+
<div class="mceActionPanel">
|
228 |
+
<div style="float: left">
|
229 |
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
230 |
+
</div>
|
231 |
+
|
232 |
+
<div style="float: right">
|
233 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
234 |
+
</div>
|
235 |
+
</div>
|
236 |
+
</form>
|
237 |
+
</body>
|
238 |
+
</html>
|
mce/advimage/js/image.js
CHANGED
@@ -1,441 +1,441 @@
|
|
1 |
-
var ImageDialog = {
|
2 |
-
preInit : function() {
|
3 |
-
var url;
|
4 |
-
|
5 |
-
tinyMCEPopup.requireLangPack();
|
6 |
-
|
7 |
-
if (url = tinyMCEPopup.getParam("external_image_list_url"))
|
8 |
-
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
9 |
-
},
|
10 |
-
|
11 |
-
init : function(ed) {
|
12 |
-
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode();
|
13 |
-
|
14 |
-
tinyMCEPopup.resizeToInnerSize();
|
15 |
-
this.fillClassList('class_list');
|
16 |
-
this.fillFileList('src_list', 'tinyMCEImageList');
|
17 |
-
this.fillFileList('over_list', 'tinyMCEImageList');
|
18 |
-
this.fillFileList('out_list', 'tinyMCEImageList');
|
19 |
-
TinyMCE_EditableSelects.init();
|
20 |
-
|
21 |
-
if (n.nodeName == 'IMG') {
|
22 |
-
nl.src.value = dom.getAttrib(n, 'src');
|
23 |
-
nl.width.value = dom.getAttrib(n, 'width');
|
24 |
-
nl.height.value = dom.getAttrib(n, 'height');
|
25 |
-
nl.alt.value = dom.getAttrib(n, 'alt');
|
26 |
-
nl.title.value = dom.getAttrib(n, 'title');
|
27 |
-
nl.vspace.value = this.getAttrib(n, 'vspace');
|
28 |
-
nl.hspace.value = this.getAttrib(n, 'hspace');
|
29 |
-
nl.border.value = this.getAttrib(n, 'border');
|
30 |
-
selectByValue(f, 'align', this.getAttrib(n, 'align'));
|
31 |
-
selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true);
|
32 |
-
nl.style.value = dom.getAttrib(n, 'style');
|
33 |
-
nl.id.value = dom.getAttrib(n, 'id');
|
34 |
-
nl.dir.value = dom.getAttrib(n, 'dir');
|
35 |
-
nl.lang.value = dom.getAttrib(n, 'lang');
|
36 |
-
nl.usemap.value = dom.getAttrib(n, 'usemap');
|
37 |
-
nl.longdesc.value = dom.getAttrib(n, 'longdesc');
|
38 |
-
nl.insert.value = ed.getLang('update');
|
39 |
-
|
40 |
-
if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover')))
|
41 |
-
nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
|
42 |
-
|
43 |
-
if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout')))
|
44 |
-
nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
|
45 |
-
|
46 |
-
if (ed.settings.inline_styles) {
|
47 |
-
// Move attribs to styles
|
48 |
-
if (dom.getAttrib(n, 'align'))
|
49 |
-
this.updateStyle('align');
|
50 |
-
|
51 |
-
if (dom.getAttrib(n, 'hspace'))
|
52 |
-
this.updateStyle('hspace');
|
53 |
-
|
54 |
-
if (dom.getAttrib(n, 'border'))
|
55 |
-
this.updateStyle('border');
|
56 |
-
|
57 |
-
if (dom.getAttrib(n, 'vspace'))
|
58 |
-
this.updateStyle('vspace');
|
59 |
-
}
|
60 |
-
}
|
61 |
-
|
62 |
-
// Setup browse button
|
63 |
-
document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
|
64 |
-
if (isVisible('srcbrowser'))
|
65 |
-
document.getElementById('src').style.width = '260px';
|
66 |
-
|
67 |
-
// Setup browse button
|
68 |
-
document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image');
|
69 |
-
if (isVisible('overbrowser'))
|
70 |
-
document.getElementById('onmouseoversrc').style.width = '260px';
|
71 |
-
|
72 |
-
// Setup browse button
|
73 |
-
document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image');
|
74 |
-
if (isVisible('outbrowser'))
|
75 |
-
document.getElementById('onmouseoutsrc').style.width = '260px';
|
76 |
-
|
77 |
-
// If option enabled default contrain proportions to checked
|
78 |
-
if (ed.getParam("advimage_constrain_proportions", true))
|
79 |
-
f.constrain.checked = true;
|
80 |
-
|
81 |
-
// Check swap image if valid data
|
82 |
-
if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value)
|
83 |
-
this.setSwapImage(true);
|
84 |
-
else
|
85 |
-
this.setSwapImage(false);
|
86 |
-
|
87 |
-
this.changeAppearance();
|
88 |
-
this.showPreviewImage(nl.src.value, 1);
|
89 |
-
},
|
90 |
-
|
91 |
-
insert : function(file, title) {
|
92 |
-
var ed = tinyMCEPopup.editor, t = this, f = document.forms[0];
|
93 |
-
|
94 |
-
if (f.src.value === '') {
|
95 |
-
if (ed.selection.getNode().nodeName == 'IMG') {
|
96 |
-
ed.dom.remove(ed.selection.getNode());
|
97 |
-
ed.execCommand('mceRepaint');
|
98 |
-
}
|
99 |
-
|
100 |
-
tinyMCEPopup.close();
|
101 |
-
return;
|
102 |
-
}
|
103 |
-
|
104 |
-
if (tinyMCEPopup.getParam("accessibility_warnings", 1)) {
|
105 |
-
if (!f.alt.value) {
|
106 |
-
tinyMCEPopup.
|
107 |
-
if (s)
|
108 |
-
t.insertAndClose();
|
109 |
-
});
|
110 |
-
|
111 |
-
return;
|
112 |
-
}
|
113 |
-
}
|
114 |
-
|
115 |
-
t.insertAndClose();
|
116 |
-
},
|
117 |
-
|
118 |
-
insertAndClose : function() {
|
119 |
-
var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el;
|
120 |
-
|
121 |
-
tinyMCEPopup.restoreSelection();
|
122 |
-
|
123 |
-
// Fixes crash in Safari
|
124 |
-
if (tinymce.isWebKit)
|
125 |
-
ed.getWin().focus();
|
126 |
-
|
127 |
-
if (!ed.settings.inline_styles) {
|
128 |
-
args = {
|
129 |
-
vspace : nl.vspace.value,
|
130 |
-
hspace : nl.hspace.value,
|
131 |
-
border : nl.border.value,
|
132 |
-
align : getSelectValue(f, 'align')
|
133 |
-
};
|
134 |
-
} else {
|
135 |
-
// Remove deprecated values
|
136 |
-
args = {
|
137 |
-
vspace : '',
|
138 |
-
hspace : '',
|
139 |
-
border : '',
|
140 |
-
align : ''
|
141 |
-
};
|
142 |
-
}
|
143 |
-
|
144 |
-
tinymce.extend(args, {
|
145 |
-
src : nl.src.value,
|
146 |
-
width : nl.width.value,
|
147 |
-
height : nl.height.value,
|
148 |
-
alt : nl.alt.value,
|
149 |
-
title : nl.title.value,
|
150 |
-
'class' : getSelectValue(f, 'class_list'),
|
151 |
-
style : nl.style.value,
|
152 |
-
id : nl.id.value,
|
153 |
-
dir : nl.dir.value,
|
154 |
-
lang : nl.lang.value,
|
155 |
-
usemap : nl.usemap.value,
|
156 |
-
longdesc : nl.longdesc.value
|
157 |
-
});
|
158 |
-
|
159 |
-
args.onmouseover = args.onmouseout = '';
|
160 |
-
|
161 |
-
if (f.onmousemovecheck.checked) {
|
162 |
-
if (nl.onmouseoversrc.value)
|
163 |
-
args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';";
|
164 |
-
|
165 |
-
if (nl.onmouseoutsrc.value)
|
166 |
-
args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';";
|
167 |
-
}
|
168 |
-
|
169 |
-
el = ed.selection.getNode();
|
170 |
-
|
171 |
-
if (el && el.nodeName == 'IMG') {
|
172 |
-
ed.dom.setAttribs(el, args);
|
173 |
-
} else {
|
174 |
-
ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" />', {skip_undo : 1});
|
175 |
-
ed.dom.setAttribs('__mce_tmp', args);
|
176 |
-
ed.dom.setAttrib('__mce_tmp', 'id', '');
|
177 |
-
ed.undoManager.add();
|
178 |
-
}
|
179 |
-
|
180 |
-
tinyMCEPopup.close();
|
181 |
-
},
|
182 |
-
|
183 |
-
getAttrib : function(e, at) {
|
184 |
-
var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
|
185 |
-
|
186 |
-
if (ed.settings.inline_styles) {
|
187 |
-
switch (at) {
|
188 |
-
case 'align':
|
189 |
-
if (v = dom.getStyle(e, 'float'))
|
190 |
-
return v;
|
191 |
-
|
192 |
-
if (v = dom.getStyle(e, 'vertical-align'))
|
193 |
-
return v;
|
194 |
-
|
195 |
-
break;
|
196 |
-
|
197 |
-
case 'hspace':
|
198 |
-
v = dom.getStyle(e, 'margin-left')
|
199 |
-
v2 = dom.getStyle(e, 'margin-right');
|
200 |
-
|
201 |
-
if (v && v == v2)
|
202 |
-
return parseInt(v.replace(/[^0-9]/g, ''));
|
203 |
-
|
204 |
-
break;
|
205 |
-
|
206 |
-
case 'vspace':
|
207 |
-
v = dom.getStyle(e, 'margin-top')
|
208 |
-
v2 = dom.getStyle(e, 'margin-bottom');
|
209 |
-
if (v && v == v2)
|
210 |
-
return parseInt(v.replace(/[^0-9]/g, ''));
|
211 |
-
|
212 |
-
break;
|
213 |
-
|
214 |
-
case 'border':
|
215 |
-
v = 0;
|
216 |
-
|
217 |
-
tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
|
218 |
-
sv = dom.getStyle(e, 'border-' + sv + '-width');
|
219 |
-
|
220 |
-
// False or not the same as prev
|
221 |
-
if (!sv || (sv != v && v !== 0)) {
|
222 |
-
v = 0;
|
223 |
-
return false;
|
224 |
-
}
|
225 |
-
|
226 |
-
if (sv)
|
227 |
-
v = sv;
|
228 |
-
});
|
229 |
-
|
230 |
-
if (v)
|
231 |
-
return parseInt(v.replace(/[^0-9]/g, ''));
|
232 |
-
|
233 |
-
break;
|
234 |
-
}
|
235 |
-
}
|
236 |
-
|
237 |
-
if (v = dom.getAttrib(e, at))
|
238 |
-
return v;
|
239 |
-
|
240 |
-
return '';
|
241 |
-
},
|
242 |
-
|
243 |
-
setSwapImage : function(st) {
|
244 |
-
var f = document.forms[0];
|
245 |
-
|
246 |
-
f.onmousemovecheck.checked = st;
|
247 |
-
setBrowserDisabled('overbrowser', !st);
|
248 |
-
setBrowserDisabled('outbrowser', !st);
|
249 |
-
|
250 |
-
if (f.over_list)
|
251 |
-
f.over_list.disabled = !st;
|
252 |
-
|
253 |
-
if (f.out_list)
|
254 |
-
f.out_list.disabled = !st;
|
255 |
-
|
256 |
-
f.onmouseoversrc.disabled = !st;
|
257 |
-
f.onmouseoutsrc.disabled = !st;
|
258 |
-
},
|
259 |
-
|
260 |
-
fillClassList : function(id) {
|
261 |
-
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
262 |
-
|
263 |
-
if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
|
264 |
-
cl = [];
|
265 |
-
|
266 |
-
tinymce.each(v.split(';'), function(v) {
|
267 |
-
var p = v.split('=');
|
268 |
-
|
269 |
-
cl.push({'title' : p[0], 'class' : p[1]});
|
270 |
-
});
|
271 |
-
} else
|
272 |
-
cl = tinyMCEPopup.editor.dom.getClasses();
|
273 |
-
|
274 |
-
if (cl.length > 0) {
|
275 |
-
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
276 |
-
|
277 |
-
tinymce.each(cl, function(o) {
|
278 |
-
lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
|
279 |
-
});
|
280 |
-
} else
|
281 |
-
dom.remove(dom.getParent(id, 'tr'));
|
282 |
-
},
|
283 |
-
|
284 |
-
fillFileList : function(id, l) {
|
285 |
-
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
286 |
-
|
287 |
-
l = window[l];
|
288 |
-
|
289 |
-
if (l && l.length > 0) {
|
290 |
-
lst.options[lst.options.length] = new Option('', '');
|
291 |
-
|
292 |
-
tinymce.each(l, function(o) {
|
293 |
-
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
294 |
-
});
|
295 |
-
} else
|
296 |
-
dom.remove(dom.getParent(id, 'tr'));
|
297 |
-
},
|
298 |
-
|
299 |
-
resetImageData : function() {
|
300 |
-
var f = document.forms[0];
|
301 |
-
|
302 |
-
f.elements.width.value = f.elements.height.value = '';
|
303 |
-
},
|
304 |
-
|
305 |
-
updateImageData : function(img, st) {
|
306 |
-
var f = document.forms[0];
|
307 |
-
|
308 |
-
if (!st) {
|
309 |
-
f.elements.width.value = img.width;
|
310 |
-
f.elements.height.value = img.height;
|
311 |
-
}
|
312 |
-
|
313 |
-
this.preloadImg = img;
|
314 |
-
},
|
315 |
-
|
316 |
-
changeAppearance : function() {
|
317 |
-
var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg');
|
318 |
-
|
319 |
-
if (img) {
|
320 |
-
if (ed.getParam('inline_styles')) {
|
321 |
-
ed.dom.setAttrib(img, 'style', f.style.value);
|
322 |
-
} else {
|
323 |
-
img.align = f.align.value;
|
324 |
-
img.border = f.border.value;
|
325 |
-
img.hspace = f.hspace.value;
|
326 |
-
img.vspace = f.vspace.value;
|
327 |
-
}
|
328 |
-
}
|
329 |
-
},
|
330 |
-
|
331 |
-
changeHeight : function() {
|
332 |
-
var f = document.forms[0], tp, t = this;
|
333 |
-
|
334 |
-
if (!f.constrain.checked || !t.preloadImg) {
|
335 |
-
return;
|
336 |
-
}
|
337 |
-
|
338 |
-
if (f.width.value == "" || f.height.value == "")
|
339 |
-
return;
|
340 |
-
|
341 |
-
tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height;
|
342 |
-
f.height.value = tp.toFixed(0);
|
343 |
-
},
|
344 |
-
|
345 |
-
changeWidth : function() {
|
346 |
-
var f = document.forms[0], tp, t = this;
|
347 |
-
|
348 |
-
if (!f.constrain.checked || !t.preloadImg) {
|
349 |
-
return;
|
350 |
-
}
|
351 |
-
|
352 |
-
if (f.width.value == "" || f.height.value == "")
|
353 |
-
return;
|
354 |
-
|
355 |
-
tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width;
|
356 |
-
f.width.value = tp.toFixed(0);
|
357 |
-
},
|
358 |
-
|
359 |
-
updateStyle : function(ty) {
|
360 |
-
var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value});
|
361 |
-
|
362 |
-
if (tinyMCEPopup.editor.settings.inline_styles) {
|
363 |
-
// Handle align
|
364 |
-
if (ty == 'align') {
|
365 |
-
dom.setStyle(img, 'float', '');
|
366 |
-
dom.setStyle(img, 'vertical-align', '');
|
367 |
-
|
368 |
-
v = getSelectValue(f, 'align');
|
369 |
-
if (v) {
|
370 |
-
if (v == 'left' || v == 'right')
|
371 |
-
dom.setStyle(img, 'float', v);
|
372 |
-
else
|
373 |
-
img.style.verticalAlign = v;
|
374 |
-
}
|
375 |
-
}
|
376 |
-
|
377 |
-
// Handle border
|
378 |
-
if (ty == 'border') {
|
379 |
-
dom.setStyle(img, 'border', '');
|
380 |
-
|
381 |
-
v = f.border.value;
|
382 |
-
if (v || v == '0') {
|
383 |
-
if (v == '0')
|
384 |
-
img.style.border = '0';
|
385 |
-
else
|
386 |
-
img.style.border = v + 'px solid black';
|
387 |
-
}
|
388 |
-
}
|
389 |
-
|
390 |
-
// Handle hspace
|
391 |
-
if (ty == 'hspace') {
|
392 |
-
dom.setStyle(img, 'marginLeft', '');
|
393 |
-
dom.setStyle(img, 'marginRight', '');
|
394 |
-
|
395 |
-
v = f.hspace.value;
|
396 |
-
if (v) {
|
397 |
-
img.style.marginLeft = v + 'px';
|
398 |
-
img.style.marginRight = v + 'px';
|
399 |
-
}
|
400 |
-
}
|
401 |
-
|
402 |
-
// Handle vspace
|
403 |
-
if (ty == 'vspace') {
|
404 |
-
dom.setStyle(img, 'marginTop', '');
|
405 |
-
dom.setStyle(img, 'marginBottom', '');
|
406 |
-
|
407 |
-
v = f.vspace.value;
|
408 |
-
if (v) {
|
409 |
-
img.style.marginTop = v + 'px';
|
410 |
-
img.style.marginBottom = v + 'px';
|
411 |
-
}
|
412 |
-
}
|
413 |
-
|
414 |
-
// Merge
|
415 |
-
dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText));
|
416 |
-
}
|
417 |
-
},
|
418 |
-
|
419 |
-
changeMouseMove : function() {
|
420 |
-
},
|
421 |
-
|
422 |
-
showPreviewImage : function(u, st) {
|
423 |
-
if (!u) {
|
424 |
-
tinyMCEPopup.dom.setHTML('prev', '');
|
425 |
-
return;
|
426 |
-
}
|
427 |
-
|
428 |
-
if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true))
|
429 |
-
this.resetImageData();
|
430 |
-
|
431 |
-
u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u);
|
432 |
-
|
433 |
-
if (!st)
|
434 |
-
tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this);" onerror="ImageDialog.resetImageData();" />');
|
435 |
-
else
|
436 |
-
tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this, 1);" />');
|
437 |
-
}
|
438 |
-
};
|
439 |
-
|
440 |
-
ImageDialog.preInit();
|
441 |
-
tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
|
1 |
+
var ImageDialog = {
|
2 |
+
preInit : function() {
|
3 |
+
var url;
|
4 |
+
|
5 |
+
tinyMCEPopup.requireLangPack();
|
6 |
+
|
7 |
+
if (url = tinyMCEPopup.getParam("external_image_list_url"))
|
8 |
+
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
9 |
+
},
|
10 |
+
|
11 |
+
init : function(ed) {
|
12 |
+
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode();
|
13 |
+
|
14 |
+
tinyMCEPopup.resizeToInnerSize();
|
15 |
+
this.fillClassList('class_list');
|
16 |
+
this.fillFileList('src_list', 'tinyMCEImageList');
|
17 |
+
this.fillFileList('over_list', 'tinyMCEImageList');
|
18 |
+
this.fillFileList('out_list', 'tinyMCEImageList');
|
19 |
+
TinyMCE_EditableSelects.init();
|
20 |
+
|
21 |
+
if (n.nodeName == 'IMG') {
|
22 |
+
nl.src.value = dom.getAttrib(n, 'src');
|
23 |
+
nl.width.value = dom.getAttrib(n, 'width');
|
24 |
+
nl.height.value = dom.getAttrib(n, 'height');
|
25 |
+
nl.alt.value = dom.getAttrib(n, 'alt');
|
26 |
+
nl.title.value = dom.getAttrib(n, 'title');
|
27 |
+
nl.vspace.value = this.getAttrib(n, 'vspace');
|
28 |
+
nl.hspace.value = this.getAttrib(n, 'hspace');
|
29 |
+
nl.border.value = this.getAttrib(n, 'border');
|
30 |
+
selectByValue(f, 'align', this.getAttrib(n, 'align'));
|
31 |
+
selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true);
|
32 |
+
nl.style.value = dom.getAttrib(n, 'style');
|
33 |
+
nl.id.value = dom.getAttrib(n, 'id');
|
34 |
+
nl.dir.value = dom.getAttrib(n, 'dir');
|
35 |
+
nl.lang.value = dom.getAttrib(n, 'lang');
|
36 |
+
nl.usemap.value = dom.getAttrib(n, 'usemap');
|
37 |
+
nl.longdesc.value = dom.getAttrib(n, 'longdesc');
|
38 |
+
nl.insert.value = ed.getLang('update');
|
39 |
+
|
40 |
+
if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover')))
|
41 |
+
nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
|
42 |
+
|
43 |
+
if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout')))
|
44 |
+
nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
|
45 |
+
|
46 |
+
if (ed.settings.inline_styles) {
|
47 |
+
// Move attribs to styles
|
48 |
+
if (dom.getAttrib(n, 'align'))
|
49 |
+
this.updateStyle('align');
|
50 |
+
|
51 |
+
if (dom.getAttrib(n, 'hspace'))
|
52 |
+
this.updateStyle('hspace');
|
53 |
+
|
54 |
+
if (dom.getAttrib(n, 'border'))
|
55 |
+
this.updateStyle('border');
|
56 |
+
|
57 |
+
if (dom.getAttrib(n, 'vspace'))
|
58 |
+
this.updateStyle('vspace');
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
// Setup browse button
|
63 |
+
document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
|
64 |
+
if (isVisible('srcbrowser'))
|
65 |
+
document.getElementById('src').style.width = '260px';
|
66 |
+
|
67 |
+
// Setup browse button
|
68 |
+
document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image');
|
69 |
+
if (isVisible('overbrowser'))
|
70 |
+
document.getElementById('onmouseoversrc').style.width = '260px';
|
71 |
+
|
72 |
+
// Setup browse button
|
73 |
+
document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image');
|
74 |
+
if (isVisible('outbrowser'))
|
75 |
+
document.getElementById('onmouseoutsrc').style.width = '260px';
|
76 |
+
|
77 |
+
// If option enabled default contrain proportions to checked
|
78 |
+
if (ed.getParam("advimage_constrain_proportions", true))
|
79 |
+
f.constrain.checked = true;
|
80 |
+
|
81 |
+
// Check swap image if valid data
|
82 |
+
if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value)
|
83 |
+
this.setSwapImage(true);
|
84 |
+
else
|
85 |
+
this.setSwapImage(false);
|
86 |
+
|
87 |
+
this.changeAppearance();
|
88 |
+
this.showPreviewImage(nl.src.value, 1);
|
89 |
+
},
|
90 |
+
|
91 |
+
insert : function(file, title) {
|
92 |
+
var ed = tinyMCEPopup.editor, t = this, f = document.forms[0];
|
93 |
+
|
94 |
+
if (f.src.value === '') {
|
95 |
+
if (ed.selection.getNode().nodeName == 'IMG') {
|
96 |
+
ed.dom.remove(ed.selection.getNode());
|
97 |
+
ed.execCommand('mceRepaint');
|
98 |
+
}
|
99 |
+
|
100 |
+
tinyMCEPopup.close();
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
|
104 |
+
if (tinyMCEPopup.getParam("accessibility_warnings", 1)) {
|
105 |
+
if (!f.alt.value) {
|
106 |
+
tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) {
|
107 |
+
if (s)
|
108 |
+
t.insertAndClose();
|
109 |
+
});
|
110 |
+
|
111 |
+
return;
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
t.insertAndClose();
|
116 |
+
},
|
117 |
+
|
118 |
+
insertAndClose : function() {
|
119 |
+
var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el;
|
120 |
+
|
121 |
+
tinyMCEPopup.restoreSelection();
|
122 |
+
|
123 |
+
// Fixes crash in Safari
|
124 |
+
if (tinymce.isWebKit)
|
125 |
+
ed.getWin().focus();
|
126 |
+
|
127 |
+
if (!ed.settings.inline_styles) {
|
128 |
+
args = {
|
129 |
+
vspace : nl.vspace.value,
|
130 |
+
hspace : nl.hspace.value,
|
131 |
+
border : nl.border.value,
|
132 |
+
align : getSelectValue(f, 'align')
|
133 |
+
};
|
134 |
+
} else {
|
135 |
+
// Remove deprecated values
|
136 |
+
args = {
|
137 |
+
vspace : '',
|
138 |
+
hspace : '',
|
139 |
+
border : '',
|
140 |
+
align : ''
|
141 |
+
};
|
142 |
+
}
|
143 |
+
|
144 |
+
tinymce.extend(args, {
|
145 |
+
src : nl.src.value,
|
146 |
+
width : nl.width.value,
|
147 |
+
height : nl.height.value,
|
148 |
+
alt : nl.alt.value,
|
149 |
+
title : nl.title.value,
|
150 |
+
'class' : getSelectValue(f, 'class_list'),
|
151 |
+
style : nl.style.value,
|
152 |
+
id : nl.id.value,
|
153 |
+
dir : nl.dir.value,
|
154 |
+
lang : nl.lang.value,
|
155 |
+
usemap : nl.usemap.value,
|
156 |
+
longdesc : nl.longdesc.value
|
157 |
+
});
|
158 |
+
|
159 |
+
args.onmouseover = args.onmouseout = '';
|
160 |
+
|
161 |
+
if (f.onmousemovecheck.checked) {
|
162 |
+
if (nl.onmouseoversrc.value)
|
163 |
+
args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';";
|
164 |
+
|
165 |
+
if (nl.onmouseoutsrc.value)
|
166 |
+
args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';";
|
167 |
+
}
|
168 |
+
|
169 |
+
el = ed.selection.getNode();
|
170 |
+
|
171 |
+
if (el && el.nodeName == 'IMG') {
|
172 |
+
ed.dom.setAttribs(el, args);
|
173 |
+
} else {
|
174 |
+
ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" />', {skip_undo : 1});
|
175 |
+
ed.dom.setAttribs('__mce_tmp', args);
|
176 |
+
ed.dom.setAttrib('__mce_tmp', 'id', '');
|
177 |
+
ed.undoManager.add();
|
178 |
+
}
|
179 |
+
|
180 |
+
tinyMCEPopup.close();
|
181 |
+
},
|
182 |
+
|
183 |
+
getAttrib : function(e, at) {
|
184 |
+
var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
|
185 |
+
|
186 |
+
if (ed.settings.inline_styles) {
|
187 |
+
switch (at) {
|
188 |
+
case 'align':
|
189 |
+
if (v = dom.getStyle(e, 'float'))
|
190 |
+
return v;
|
191 |
+
|
192 |
+
if (v = dom.getStyle(e, 'vertical-align'))
|
193 |
+
return v;
|
194 |
+
|
195 |
+
break;
|
196 |
+
|
197 |
+
case 'hspace':
|
198 |
+
v = dom.getStyle(e, 'margin-left')
|
199 |
+
v2 = dom.getStyle(e, 'margin-right');
|
200 |
+
|
201 |
+
if (v && v == v2)
|
202 |
+
return parseInt(v.replace(/[^0-9]/g, ''));
|
203 |
+
|
204 |
+
break;
|
205 |
+
|
206 |
+
case 'vspace':
|
207 |
+
v = dom.getStyle(e, 'margin-top')
|
208 |
+
v2 = dom.getStyle(e, 'margin-bottom');
|
209 |
+
if (v && v == v2)
|
210 |
+
return parseInt(v.replace(/[^0-9]/g, ''));
|
211 |
+
|
212 |
+
break;
|
213 |
+
|
214 |
+
case 'border':
|
215 |
+
v = 0;
|
216 |
+
|
217 |
+
tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
|
218 |
+
sv = dom.getStyle(e, 'border-' + sv + '-width');
|
219 |
+
|
220 |
+
// False or not the same as prev
|
221 |
+
if (!sv || (sv != v && v !== 0)) {
|
222 |
+
v = 0;
|
223 |
+
return false;
|
224 |
+
}
|
225 |
+
|
226 |
+
if (sv)
|
227 |
+
v = sv;
|
228 |
+
});
|
229 |
+
|
230 |
+
if (v)
|
231 |
+
return parseInt(v.replace(/[^0-9]/g, ''));
|
232 |
+
|
233 |
+
break;
|
234 |
+
}
|
235 |
+
}
|
236 |
+
|
237 |
+
if (v = dom.getAttrib(e, at))
|
238 |
+
return v;
|
239 |
+
|
240 |
+
return '';
|
241 |
+
},
|
242 |
+
|
243 |
+
setSwapImage : function(st) {
|
244 |
+
var f = document.forms[0];
|
245 |
+
|
246 |
+
f.onmousemovecheck.checked = st;
|
247 |
+
setBrowserDisabled('overbrowser', !st);
|
248 |
+
setBrowserDisabled('outbrowser', !st);
|
249 |
+
|
250 |
+
if (f.over_list)
|
251 |
+
f.over_list.disabled = !st;
|
252 |
+
|
253 |
+
if (f.out_list)
|
254 |
+
f.out_list.disabled = !st;
|
255 |
+
|
256 |
+
f.onmouseoversrc.disabled = !st;
|
257 |
+
f.onmouseoutsrc.disabled = !st;
|
258 |
+
},
|
259 |
+
|
260 |
+
fillClassList : function(id) {
|
261 |
+
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
262 |
+
|
263 |
+
if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
|
264 |
+
cl = [];
|
265 |
+
|
266 |
+
tinymce.each(v.split(';'), function(v) {
|
267 |
+
var p = v.split('=');
|
268 |
+
|
269 |
+
cl.push({'title' : p[0], 'class' : p[1]});
|
270 |
+
});
|
271 |
+
} else
|
272 |
+
cl = tinyMCEPopup.editor.dom.getClasses();
|
273 |
+
|
274 |
+
if (cl.length > 0) {
|
275 |
+
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
276 |
+
|
277 |
+
tinymce.each(cl, function(o) {
|
278 |
+
lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
|
279 |
+
});
|
280 |
+
} else
|
281 |
+
dom.remove(dom.getParent(id, 'tr'));
|
282 |
+
},
|
283 |
+
|
284 |
+
fillFileList : function(id, l) {
|
285 |
+
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
286 |
+
|
287 |
+
l = window[l];
|
288 |
+
|
289 |
+
if (l && l.length > 0) {
|
290 |
+
lst.options[lst.options.length] = new Option('', '');
|
291 |
+
|
292 |
+
tinymce.each(l, function(o) {
|
293 |
+
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
294 |
+
});
|
295 |
+
} else
|
296 |
+
dom.remove(dom.getParent(id, 'tr'));
|
297 |
+
},
|
298 |
+
|
299 |
+
resetImageData : function() {
|
300 |
+
var f = document.forms[0];
|
301 |
+
|
302 |
+
f.elements.width.value = f.elements.height.value = '';
|
303 |
+
},
|
304 |
+
|
305 |
+
updateImageData : function(img, st) {
|
306 |
+
var f = document.forms[0];
|
307 |
+
|
308 |
+
if (!st) {
|
309 |
+
f.elements.width.value = img.width;
|
310 |
+
f.elements.height.value = img.height;
|
311 |
+
}
|
312 |
+
|
313 |
+
this.preloadImg = img;
|
314 |
+
},
|
315 |
+
|
316 |
+
changeAppearance : function() {
|
317 |
+
var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg');
|
318 |
+
|
319 |
+
if (img) {
|
320 |
+
if (ed.getParam('inline_styles')) {
|
321 |
+
ed.dom.setAttrib(img, 'style', f.style.value);
|
322 |
+
} else {
|
323 |
+
img.align = f.align.value;
|
324 |
+
img.border = f.border.value;
|
325 |
+
img.hspace = f.hspace.value;
|
326 |
+
img.vspace = f.vspace.value;
|
327 |
+
}
|
328 |
+
}
|
329 |
+
},
|
330 |
+
|
331 |
+
changeHeight : function() {
|
332 |
+
var f = document.forms[0], tp, t = this;
|
333 |
+
|
334 |
+
if (!f.constrain.checked || !t.preloadImg) {
|
335 |
+
return;
|
336 |
+
}
|
337 |
+
|
338 |
+
if (f.width.value == "" || f.height.value == "")
|
339 |
+
return;
|
340 |
+
|
341 |
+
tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height;
|
342 |
+
f.height.value = tp.toFixed(0);
|
343 |
+
},
|
344 |
+
|
345 |
+
changeWidth : function() {
|
346 |
+
var f = document.forms[0], tp, t = this;
|
347 |
+
|
348 |
+
if (!f.constrain.checked || !t.preloadImg) {
|
349 |
+
return;
|
350 |
+
}
|
351 |
+
|
352 |
+
if (f.width.value == "" || f.height.value == "")
|
353 |
+
return;
|
354 |
+
|
355 |
+
tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width;
|
356 |
+
f.width.value = tp.toFixed(0);
|
357 |
+
},
|
358 |
+
|
359 |
+
updateStyle : function(ty) {
|
360 |
+
var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value});
|
361 |
+
|
362 |
+
if (tinyMCEPopup.editor.settings.inline_styles) {
|
363 |
+
// Handle align
|
364 |
+
if (ty == 'align') {
|
365 |
+
dom.setStyle(img, 'float', '');
|
366 |
+
dom.setStyle(img, 'vertical-align', '');
|
367 |
+
|
368 |
+
v = getSelectValue(f, 'align');
|
369 |
+
if (v) {
|
370 |
+
if (v == 'left' || v == 'right')
|
371 |
+
dom.setStyle(img, 'float', v);
|
372 |
+
else
|
373 |
+
img.style.verticalAlign = v;
|
374 |
+
}
|
375 |
+
}
|
376 |
+
|
377 |
+
// Handle border
|
378 |
+
if (ty == 'border') {
|
379 |
+
dom.setStyle(img, 'border', '');
|
380 |
+
|
381 |
+
v = f.border.value;
|
382 |
+
if (v || v == '0') {
|
383 |
+
if (v == '0')
|
384 |
+
img.style.border = '0';
|
385 |
+
else
|
386 |
+
img.style.border = v + 'px solid black';
|
387 |
+
}
|
388 |
+
}
|
389 |
+
|
390 |
+
// Handle hspace
|
391 |
+
if (ty == 'hspace') {
|
392 |
+
dom.setStyle(img, 'marginLeft', '');
|
393 |
+
dom.setStyle(img, 'marginRight', '');
|
394 |
+
|
395 |
+
v = f.hspace.value;
|
396 |
+
if (v) {
|
397 |
+
img.style.marginLeft = v + 'px';
|
398 |
+
img.style.marginRight = v + 'px';
|
399 |
+
}
|
400 |
+
}
|
401 |
+
|
402 |
+
// Handle vspace
|
403 |
+
if (ty == 'vspace') {
|
404 |
+
dom.setStyle(img, 'marginTop', '');
|
405 |
+
dom.setStyle(img, 'marginBottom', '');
|
406 |
+
|
407 |
+
v = f.vspace.value;
|
408 |
+
if (v) {
|
409 |
+
img.style.marginTop = v + 'px';
|
410 |
+
img.style.marginBottom = v + 'px';
|
411 |
+
}
|
412 |
+
}
|
413 |
+
|
414 |
+
// Merge
|
415 |
+
dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText));
|
416 |
+
}
|
417 |
+
},
|
418 |
+
|
419 |
+
changeMouseMove : function() {
|
420 |
+
},
|
421 |
+
|
422 |
+
showPreviewImage : function(u, st) {
|
423 |
+
if (!u) {
|
424 |
+
tinyMCEPopup.dom.setHTML('prev', '');
|
425 |
+
return;
|
426 |
+
}
|
427 |
+
|
428 |
+
if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true))
|
429 |
+
this.resetImageData();
|
430 |
+
|
431 |
+
u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u);
|
432 |
+
|
433 |
+
if (!st)
|
434 |
+
tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this);" onerror="ImageDialog.resetImageData();" />');
|
435 |
+
else
|
436 |
+
tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this, 1);" />');
|
437 |
+
}
|
438 |
+
};
|
439 |
+
|
440 |
+
ImageDialog.preInit();
|
441 |
+
tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
|
mce/advimage/langs/en_dlg.js
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
-
tinyMCE.addI18n('en.advimage_dlg',{
|
2 |
-
tab_general:"General",
|
3 |
-
tab_appearance:"Appearance",
|
4 |
-
tab_advanced:"Advanced",
|
5 |
-
general:"General",
|
6 |
-
title:"Title",
|
7 |
-
preview:"Preview",
|
8 |
-
constrain_proportions:"Constrain proportions",
|
9 |
-
langdir:"Language direction",
|
10 |
-
langcode:"Language code",
|
11 |
-
long_desc:"Long description link",
|
12 |
-
style:"Style",
|
13 |
-
classes:"Classes",
|
14 |
-
ltr:"Left to right",
|
15 |
-
rtl:"Right to left",
|
16 |
-
id:"Id",
|
17 |
-
map:"Image map",
|
18 |
-
swap_image:"Swap image",
|
19 |
-
alt_image:"Alternative image",
|
20 |
-
mouseover:"for mouse over",
|
21 |
-
mouseout:"for mouse out",
|
22 |
-
misc:"Miscellaneous",
|
23 |
-
example_img:"Appearance preview image",
|
24 |
-
missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.",
|
25 |
-
dialog_title:"Insert/edit image",
|
26 |
-
src:"Image URL",
|
27 |
-
alt:"Image description",
|
28 |
-
list:"Image list",
|
29 |
-
border:"Border",
|
30 |
-
dimensions:"Dimensions",
|
31 |
-
vspace:"Vertical space",
|
32 |
-
hspace:"Horizontal space",
|
33 |
-
align:"Alignment",
|
34 |
-
align_baseline:"Baseline",
|
35 |
-
align_top:"Top",
|
36 |
-
align_middle:"Middle",
|
37 |
-
align_bottom:"Bottom",
|
38 |
-
align_texttop:"Text top",
|
39 |
-
align_textbottom:"Text bottom",
|
40 |
-
align_left:"Left",
|
41 |
-
align_right:"Right",
|
42 |
-
image_list:"Image list"
|
43 |
Â
});
|
1 |
+
tinyMCE.addI18n('en.advimage_dlg',{
|
2 |
+
tab_general:"General",
|
3 |
+
tab_appearance:"Appearance",
|
4 |
+
tab_advanced:"Advanced",
|
5 |
+
general:"General",
|
6 |
+
title:"Title",
|
7 |
+
preview:"Preview",
|
8 |
+
constrain_proportions:"Constrain proportions",
|
9 |
+
langdir:"Language direction",
|
10 |
+
langcode:"Language code",
|
11 |
+
long_desc:"Long description link",
|
12 |
+
style:"Style",
|
13 |
+
classes:"Classes",
|
14 |
+
ltr:"Left to right",
|
15 |
+
rtl:"Right to left",
|
16 |
+
id:"Id",
|
17 |
+
map:"Image map",
|
18 |
+
swap_image:"Swap image",
|
19 |
+
alt_image:"Alternative image",
|
20 |
+
mouseover:"for mouse over",
|
21 |
+
mouseout:"for mouse out",
|
22 |
+
misc:"Miscellaneous",
|
23 |
+
example_img:"Appearance preview image",
|
24 |
+
missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.",
|
25 |
+
dialog_title:"Insert/edit image",
|
26 |
+
src:"Image URL",
|
27 |
+
alt:"Image description",
|
28 |
+
list:"Image list",
|
29 |
+
border:"Border",
|
30 |
+
dimensions:"Dimensions",
|
31 |
+
vspace:"Vertical space",
|
32 |
+
hspace:"Horizontal space",
|
33 |
+
align:"Alignment",
|
34 |
+
align_baseline:"Baseline",
|
35 |
+
align_top:"Top",
|
36 |
+
align_middle:"Middle",
|
37 |
+
align_bottom:"Bottom",
|
38 |
+
align_texttop:"Text top",
|
39 |
+
align_textbottom:"Text bottom",
|
40 |
+
align_left:"Left",
|
41 |
+
align_right:"Right",
|
42 |
+
image_list:"Image list"
|
43 |
Â
});
|
mce/advimage/langs/langs.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
-
$strings
|
6 |
-
else
|
7 |
-
|
Â
|
|
Â
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
+
$strings = tdav_get_file($lang_file);
|
6 |
+
else {
|
7 |
+
$strings = tdav_get_file(dirname(__FILE__) . '/en_dlg.js');
|
8 |
+
$strings = preg_replace( '/([\'"])en\./', '$1'.$mce_locale.'.', $strings, 1 );
|
9 |
+
}
|
mce/advlink/css/advlink.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
.mceLinkList, .mceAnchorList, #targetlist {width:280px;}
|
2 |
-
.mceActionPanel {margin-top:7px;}
|
3 |
-
.panel_wrapper div.current {height:320px;}
|
4 |
-
#classlist, #title, #href {width:280px;}
|
5 |
-
#popupurl, #popupname {width:200px;}
|
6 |
-
#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;}
|
7 |
-
#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;}
|
8 |
-
#events_panel input {width:200px;}
|
1 |
+
.mceLinkList, .mceAnchorList, #targetlist {width:280px;}
|
2 |
+
.mceActionPanel {margin-top:7px;}
|
3 |
+
.panel_wrapper div.current {height:320px;}
|
4 |
+
#classlist, #title, #href {width:280px;}
|
5 |
+
#popupurl, #popupname {width:200px;}
|
6 |
+
#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;}
|
7 |
+
#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;}
|
8 |
+
#events_panel input {width:200px;}
|
mce/advlink/js/advlink.js
CHANGED
@@ -1,527 +1,527 @@
|
|
1 |
-
/* Functions for the advlink plugin popup */
|
2 |
-
|
3 |
-
tinyMCEPopup.requireLangPack();
|
4 |
-
|
5 |
-
var templates = {
|
6 |
-
"window.open" : "window.open('${url}','${target}','${options}')"
|
7 |
-
};
|
8 |
-
|
9 |
-
function preinit() {
|
10 |
-
var url;
|
11 |
-
|
12 |
-
if (url = tinyMCEPopup.getParam("external_link_list_url"))
|
13 |
-
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
14 |
-
}
|
15 |
-
|
16 |
-
function changeClass() {
|
17 |
-
var f = document.forms[0];
|
18 |
-
|
19 |
-
f.classes.value = getSelectValue(f, 'classlist');
|
20 |
-
}
|
21 |
-
|
22 |
-
function init() {
|
23 |
-
tinyMCEPopup.resizeToInnerSize();
|
24 |
-
|
25 |
-
var formObj = document.forms[0];
|
26 |
-
var inst = tinyMCEPopup.editor;
|
27 |
-
var elm = inst.selection.getNode();
|
28 |
-
var action = "insert";
|
29 |
-
var html;
|
30 |
-
|
31 |
-
document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
|
32 |
-
document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
|
33 |
-
document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href');
|
34 |
-
document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href');
|
35 |
-
document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
|
36 |
-
|
37 |
-
// Link list
|
38 |
-
html = getLinkListHTML('linklisthref','href');
|
39 |
-
if (html == "")
|
40 |
-
document.getElementById("linklisthrefrow").style.display = 'none';
|
41 |
-
else
|
42 |
-
document.getElementById("linklisthrefcontainer").innerHTML = html;
|
43 |
-
|
44 |
-
// Resize some elements
|
45 |
-
if (isVisible('hrefbrowser'))
|
46 |
-
document.getElementById('href').style.width = '260px';
|
47 |
-
|
48 |
-
if (isVisible('popupurlbrowser'))
|
49 |
-
document.getElementById('popupurl').style.width = '180px';
|
50 |
-
|
51 |
-
elm = inst.dom.getParent(elm, "A");
|
52 |
-
if (elm != null && elm.nodeName == "A")
|
53 |
-
action = "update";
|
54 |
-
|
55 |
-
formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
|
56 |
-
|
57 |
-
setPopupControlsDisabled(true);
|
58 |
-
|
59 |
-
if (action == "update") {
|
60 |
-
var href = inst.dom.getAttrib(elm, 'href');
|
61 |
-
var onclick = inst.dom.getAttrib(elm, 'onclick');
|
62 |
-
|
63 |
-
// Setup form data
|
64 |
-
setFormValue('href', href);
|
65 |
-
setFormValue('title', inst.dom.getAttrib(elm, 'title'));
|
66 |
-
setFormValue('id', inst.dom.getAttrib(elm, 'id'));
|
67 |
-
setFormValue('style', inst.dom.getAttrib(elm, "style"));
|
68 |
-
setFormValue('rel', inst.dom.getAttrib(elm, 'rel'));
|
69 |
-
setFormValue('rev', inst.dom.getAttrib(elm, 'rev'));
|
70 |
-
setFormValue('charset', inst.dom.getAttrib(elm, 'charset'));
|
71 |
-
setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang'));
|
72 |
-
setFormValue('dir', inst.dom.getAttrib(elm, 'dir'));
|
73 |
-
setFormValue('lang', inst.dom.getAttrib(elm, 'lang'));
|
74 |
-
setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
|
75 |
-
setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
|
76 |
-
setFormValue('type', inst.dom.getAttrib(elm, 'type'));
|
77 |
-
setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus'));
|
78 |
-
setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur'));
|
79 |
-
setFormValue('onclick', onclick);
|
80 |
-
setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick'));
|
81 |
-
setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown'));
|
82 |
-
setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup'));
|
83 |
-
setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover'));
|
84 |
-
setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove'));
|
85 |
-
setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout'));
|
86 |
-
setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
|
87 |
-
setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
|
88 |
-
setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
|
89 |
-
setFormValue('target', inst.dom.getAttrib(elm, 'target'));
|
90 |
-
setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
|
91 |
-
|
92 |
-
// Parse onclick data
|
93 |
-
if (onclick != null && onclick.indexOf('window.open') != -1)
|
94 |
-
parseWindowOpen(onclick);
|
95 |
-
else
|
96 |
-
parseFunction(onclick);
|
97 |
-
|
98 |
-
// Select by the values
|
99 |
-
selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir'));
|
100 |
-
selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel'));
|
101 |
-
selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev'));
|
102 |
-
selectByValue(formObj, 'linklisthref', href);
|
103 |
-
|
104 |
-
if (href.charAt(0) == '#')
|
105 |
-
selectByValue(formObj, 'anchorlist', href);
|
106 |
-
|
107 |
-
addClassesToList('classlist', 'advlink_styles');
|
108 |
-
|
109 |
-
selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
|
110 |
-
selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true);
|
111 |
-
} else
|
112 |
-
addClassesToList('classlist', 'advlink_styles');
|
113 |
-
}
|
114 |
-
|
115 |
-
function checkPrefix(n) {
|
116 |
-
if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email')))
|
117 |
-
n.value = 'mailto:' + n.value;
|
118 |
-
|
119 |
-
if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external')))
|
120 |
-
n.value = 'http://' + n.value;
|
121 |
-
}
|
122 |
-
|
123 |
-
function setFormValue(name, value) {
|
124 |
-
document.forms[0].elements[name].value = value;
|
125 |
-
}
|
126 |
-
|
127 |
-
function parseWindowOpen(onclick) {
|
128 |
-
var formObj = document.forms[0];
|
129 |
-
|
130 |
-
// Preprocess center code
|
131 |
-
if (onclick.indexOf('return false;') != -1) {
|
132 |
-
formObj.popupreturn.checked = true;
|
133 |
-
onclick = onclick.replace('return false;', '');
|
134 |
-
} else
|
135 |
-
formObj.popupreturn.checked = false;
|
136 |
-
|
137 |
-
var onClickData = parseLink(onclick);
|
138 |
-
|
139 |
-
if (onClickData != null) {
|
140 |
-
formObj.ispopup.checked = true;
|
141 |
-
setPopupControlsDisabled(false);
|
142 |
-
|
143 |
-
var onClickWindowOptions = parseOptions(onClickData['options']);
|
144 |
-
var url = onClickData['url'];
|
145 |
-
|
146 |
-
formObj.popupname.value = onClickData['target'];
|
147 |
-
formObj.popupurl.value = url;
|
148 |
-
formObj.popupwidth.value = getOption(onClickWindowOptions, 'width');
|
149 |
-
formObj.popupheight.value = getOption(onClickWindowOptions, 'height');
|
150 |
-
|
151 |
-
formObj.popupleft.value = getOption(onClickWindowOptions, 'left');
|
152 |
-
formObj.popuptop.value = getOption(onClickWindowOptions, 'top');
|
153 |
-
|
154 |
-
if (formObj.popupleft.value.indexOf('screen') != -1)
|
155 |
-
formObj.popupleft.value = "c";
|
156 |
-
|
157 |
-
if (formObj.popuptop.value.indexOf('screen') != -1)
|
158 |
-
formObj.popuptop.value = "c";
|
159 |
-
|
160 |
-
formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes";
|
161 |
-
formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes";
|
162 |
-
formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes";
|
163 |
-
formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes";
|
164 |
-
formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes";
|
165 |
-
formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes";
|
166 |
-
formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes";
|
167 |
-
|
168 |
-
buildOnClick();
|
169 |
-
}
|
170 |
-
}
|
171 |
-
|
172 |
-
function parseFunction(onclick) {
|
173 |
-
var formObj = document.forms[0];
|
174 |
-
var onClickData = parseLink(onclick);
|
175 |
-
|
176 |
-
// TODO: Add stuff here
|
177 |
-
}
|
178 |
-
|
179 |
-
function getOption(opts, name) {
|
180 |
-
return typeof(opts[name]) == "undefined" ? "" : opts[name];
|
181 |
-
}
|
182 |
-
|
183 |
-
function setPopupControlsDisabled(state) {
|
184 |
-
var formObj = document.forms[0];
|
185 |
-
|
186 |
-
formObj.popupname.disabled = state;
|
187 |
-
formObj.popupurl.disabled = state;
|
188 |
-
formObj.popupwidth.disabled = state;
|
189 |
-
formObj.popupheight.disabled = state;
|
190 |
-
formObj.popupleft.disabled = state;
|
191 |
-
formObj.popuptop.disabled = state;
|
192 |
-
formObj.popuplocation.disabled = state;
|
193 |
-
formObj.popupscrollbars.disabled = state;
|
194 |
-
formObj.popupmenubar.disabled = state;
|
195 |
-
formObj.popupresizable.disabled = state;
|
196 |
-
formObj.popuptoolbar.disabled = state;
|
197 |
-
formObj.popupstatus.disabled = state;
|
198 |
-
formObj.popupreturn.disabled = state;
|
199 |
-
formObj.popupdependent.disabled = state;
|
200 |
-
|
201 |
-
setBrowserDisabled('popupurlbrowser', state);
|
202 |
-
}
|
203 |
-
|
204 |
-
function parseLink(link) {
|
205 |
-
link = link.replace(new RegExp(''', 'g'), "'");
|
206 |
-
|
207 |
-
var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1");
|
208 |
-
|
209 |
-
// Is function name a template function
|
210 |
-
var template = templates[fnName];
|
211 |
-
if (template) {
|
212 |
-
// Build regexp
|
213 |
-
var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi"));
|
214 |
-
var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\(";
|
215 |
-
var replaceStr = "";
|
216 |
-
for (var i=0; i<variableNames.length; i++) {
|
217 |
-
// Is string value
|
218 |
-
if (variableNames[i].indexOf("'${") != -1)
|
219 |
-
regExp += "'(.*)'";
|
220 |
-
else // Number value
|
221 |
-
regExp += "([0-9]*)";
|
222 |
-
|
223 |
-
replaceStr += "$" + (i+1);
|
224 |
-
|
225 |
-
// Cleanup variable name
|
226 |
-
variableNames[i] = variableNames[i].replace(new RegExp("[^A-Za-z0-9]", "gi"), "");
|
227 |
-
|
228 |
-
if (i != variableNames.length-1) {
|
229 |
-
regExp += "\\s*,\\s*";
|
230 |
-
replaceStr += "<delim>";
|
231 |
-
} else
|
232 |
-
regExp += ".*";
|
233 |
-
}
|
234 |
-
|
235 |
-
regExp += "\\);?";
|
236 |
-
|
237 |
-
// Build variable array
|
238 |
-
var variables = [];
|
239 |
-
variables["_function"] = fnName;
|
240 |
-
var variableValues = link.replace(new RegExp(regExp, "gi"), replaceStr).split('<delim>');
|
241 |
-
for (var i=0; i<variableNames.length; i++)
|
242 |
-
variables[variableNames[i]] = variableValues[i];
|
243 |
-
|
244 |
-
return variables;
|
245 |
-
}
|
246 |
-
|
247 |
-
return null;
|
248 |
-
}
|
249 |
-
|
250 |
-
function parseOptions(opts) {
|
251 |
-
if (opts == null || opts == "")
|
252 |
-
return [];
|
253 |
-
|
254 |
-
// Cleanup the options
|
255 |
-
opts = opts.toLowerCase();
|
256 |
-
opts = opts.replace(/;/g, ",");
|
257 |
-
opts = opts.replace(/[^0-9a-z=,]/g, "");
|
258 |
-
|
259 |
-
var optionChunks = opts.split(',');
|
260 |
-
var options = [];
|
261 |
-
|
262 |
-
for (var i=0; i<optionChunks.length; i++) {
|
263 |
-
var parts = optionChunks[i].split('=');
|
264 |
-
|
265 |
-
if (parts.length == 2)
|
266 |
-
options[parts[0]] = parts[1];
|
267 |
-
}
|
268 |
-
|
269 |
-
return options;
|
270 |
-
}
|
271 |
-
|
272 |
-
function buildOnClick() {
|
273 |
-
var formObj = document.forms[0];
|
274 |
-
|
275 |
-
if (!formObj.ispopup.checked) {
|
276 |
-
formObj.onclick.value = "";
|
277 |
-
return;
|
278 |
-
}
|
279 |
-
|
280 |
-
var onclick = "window.open('";
|
281 |
-
var url = formObj.popupurl.value;
|
282 |
-
|
283 |
-
onclick += url + "','";
|
284 |
-
onclick += formObj.popupname.value + "','";
|
285 |
-
|
286 |
-
if (formObj.popuplocation.checked)
|
287 |
-
onclick += "location=yes,";
|
288 |
-
|
289 |
-
if (formObj.popupscrollbars.checked)
|
290 |
-
onclick += "scrollbars=yes,";
|
291 |
-
|
292 |
-
if (formObj.popupmenubar.checked)
|
293 |
-
onclick += "menubar=yes,";
|
294 |
-
|
295 |
-
if (formObj.popupresizable.checked)
|
296 |
-
onclick += "resizable=yes,";
|
297 |
-
|
298 |
-
if (formObj.popuptoolbar.checked)
|
299 |
-
onclick += "toolbar=yes,";
|
300 |
-
|
301 |
-
if (formObj.popupstatus.checked)
|
302 |
-
onclick += "status=yes,";
|
303 |
-
|
304 |
-
if (formObj.popupdependent.checked)
|
305 |
-
onclick += "dependent=yes,";
|
306 |
-
|
307 |
-
if (formObj.popupwidth.value != "")
|
308 |
-
onclick += "width=" + formObj.popupwidth.value + ",";
|
309 |
-
|
310 |
-
if (formObj.popupheight.value != "")
|
311 |
-
onclick += "height=" + formObj.popupheight.value + ",";
|
312 |
-
|
313 |
-
if (formObj.popupleft.value != "") {
|
314 |
-
if (formObj.popupleft.value != "c")
|
315 |
-
onclick += "left=" + formObj.popupleft.value + ",";
|
316 |
-
else
|
317 |
-
onclick += "left='+(screen.availWidth/2-" + (formObj.popupwidth.value/2) + ")+',";
|
318 |
-
}
|
319 |
-
|
320 |
-
if (formObj.popuptop.value != "") {
|
321 |
-
if (formObj.popuptop.value != "c")
|
322 |
-
onclick += "top=" + formObj.popuptop.value + ",";
|
323 |
-
else
|
324 |
-
onclick += "top='+(screen.availHeight/2-" + (formObj.popupheight.value/2) + ")+',";
|
325 |
-
}
|
326 |
-
|
327 |
-
if (onclick.charAt(onclick.length-1) == ',')
|
328 |
-
onclick = onclick.substring(0, onclick.length-1);
|
329 |
-
|
330 |
-
onclick += "');";
|
331 |
-
|
332 |
-
if (formObj.popupreturn.checked)
|
333 |
-
onclick += "return false;";
|
334 |
-
|
335 |
-
// tinyMCE.debug(onclick);
|
336 |
-
|
337 |
-
formObj.onclick.value = onclick;
|
338 |
-
|
339 |
-
if (formObj.href.value == "")
|
340 |
-
formObj.href.value = url;
|
341 |
-
}
|
342 |
-
|
343 |
-
function setAttrib(elm, attrib, value) {
|
344 |
-
var formObj = document.forms[0];
|
345 |
-
var valueElm = formObj.elements[attrib.toLowerCase()];
|
346 |
-
var dom = tinyMCEPopup.editor.dom;
|
347 |
-
|
348 |
-
if (typeof(value) == "undefined" || value == null) {
|
349 |
-
value = "";
|
350 |
-
|
351 |
-
if (valueElm)
|
352 |
-
value = valueElm.value;
|
353 |
-
}
|
354 |
-
|
355 |
-
// Clean up the style
|
356 |
-
if (attrib == 'style')
|
357 |
-
value = dom.serializeStyle(dom.parseStyle(value));
|
358 |
-
|
359 |
-
dom.setAttrib(elm, attrib, value);
|
360 |
-
}
|
361 |
-
|
362 |
-
function getAnchorListHTML(id, target) {
|
363 |
-
var inst = tinyMCEPopup.editor;
|
364 |
-
var nodes = inst.dom.select('a.mceItemAnchor,img.mceItemAnchor'), name, i;
|
365 |
-
var html = "";
|
366 |
-
|
367 |
-
html += '<select id="' + id + '" name="' + id + '" class="mceAnchorList" o2nfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target + '.value=';
|
368 |
-
html += 'this.options[this.selectedIndex].value;">';
|
369 |
-
html += '<option value="">---</option>';
|
370 |
-
|
371 |
-
for (i=0; i<nodes.length; i++) {
|
372 |
-
if ((name = inst.dom.getAttrib(nodes[i], "name")) != "")
|
373 |
-
html += '<option value="#' + name + '">' + name + '</option>';
|
374 |
-
}
|
375 |
-
|
376 |
-
html += '</select>';
|
377 |
-
|
378 |
-
return html;
|
379 |
-
}
|
380 |
-
|
381 |
-
function insertAction() {
|
382 |
-
var inst = tinyMCEPopup.editor;
|
383 |
-
var elm, elementArray, i;
|
384 |
-
|
385 |
-
elm = inst.selection.getNode();
|
386 |
-
checkPrefix(document.forms[0].href);
|
387 |
-
|
388 |
-
elm = inst.dom.getParent(elm, "A");
|
389 |
-
|
390 |
-
// Remove element if there is no href
|
391 |
-
if (!document.forms[0].href.value) {
|
392 |
-
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
393 |
-
i = inst.selection.getBookmark();
|
394 |
-
inst.dom.remove(elm, 1);
|
395 |
-
inst.selection.moveToBookmark(i);
|
396 |
-
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
397 |
-
tinyMCEPopup.close();
|
398 |
-
return;
|
399 |
-
}
|
400 |
-
|
401 |
-
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
402 |
-
|
403 |
-
// Create new anchor elements
|
404 |
-
if (elm == null) {
|
405 |
-
tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1});
|
406 |
-
|
407 |
-
elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';});
|
408 |
-
for (i=0; i<elementArray.length; i++)
|
409 |
-
setAllAttribs(elm = elementArray[i]);
|
410 |
-
} else
|
411 |
-
setAllAttribs(elm);
|
412 |
-
|
413 |
-
// Don't move caret if selection was image
|
414 |
-
if (elm.childNodes.length != 1 || elm.firstChild.nodeName != 'IMG') {
|
415 |
-
inst.focus();
|
416 |
-
inst.selection.select(elm);
|
417 |
-
inst.selection.collapse(0);
|
418 |
-
tinyMCEPopup.storeSelection();
|
419 |
-
}
|
420 |
-
|
421 |
-
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
422 |
-
tinyMCEPopup.close();
|
423 |
-
}
|
424 |
-
|
425 |
-
function setAllAttribs(elm) {
|
426 |
-
var formObj = document.forms[0];
|
427 |
-
var href = formObj.href.value;
|
428 |
-
var target = getSelectValue(formObj, 'targetlist');
|
429 |
-
|
430 |
-
setAttrib(elm, 'href', href);
|
431 |
-
setAttrib(elm, 'title');
|
432 |
-
setAttrib(elm, 'target', target == '_self' ? '' : target);
|
433 |
-
setAttrib(elm, 'id');
|
434 |
-
setAttrib(elm, 'style');
|
435 |
-
setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
|
436 |
-
setAttrib(elm, 'rel');
|
437 |
-
setAttrib(elm, 'rev');
|
438 |
-
setAttrib(elm, 'charset');
|
439 |
-
setAttrib(elm, 'hreflang');
|
440 |
-
setAttrib(elm, 'dir');
|
441 |
-
setAttrib(elm, 'lang');
|
442 |
-
setAttrib(elm, 'tabindex');
|
443 |
-
setAttrib(elm, 'accesskey');
|
444 |
-
setAttrib(elm, 'type');
|
445 |
-
setAttrib(elm, 'onfocus');
|
446 |
-
setAttrib(elm, 'onblur');
|
447 |
-
setAttrib(elm, 'onclick');
|
448 |
-
setAttrib(elm, 'ondblclick');
|
449 |
-
setAttrib(elm, 'onmousedown');
|
450 |
-
setAttrib(elm, 'onmouseup');
|
451 |
-
setAttrib(elm, 'onmouseover');
|
452 |
-
setAttrib(elm, 'onmousemove');
|
453 |
-
setAttrib(elm, 'onmouseout');
|
454 |
-
setAttrib(elm, 'onkeypress');
|
455 |
-
setAttrib(elm, 'onkeydown');
|
456 |
-
setAttrib(elm, 'onkeyup');
|
457 |
-
|
458 |
-
// Refresh in old MSIE
|
459 |
-
if (tinyMCE.isMSIE5)
|
460 |
-
elm.outerHTML = elm.outerHTML;
|
461 |
-
}
|
462 |
-
|
463 |
-
function getSelectValue(form_obj, field_name) {
|
464 |
-
var elm = form_obj.elements[field_name];
|
465 |
-
|
466 |
-
if (!elm || elm.options == null || elm.selectedIndex == -1)
|
467 |
-
return "";
|
468 |
-
|
469 |
-
return elm.options[elm.selectedIndex].value;
|
470 |
-
}
|
471 |
-
|
472 |
-
function getLinkListHTML(elm_id, target_form_element, onchange_func) {
|
473 |
-
if (typeof(tinyMCELinkList) == "undefined" || tinyMCELinkList.length == 0)
|
474 |
-
return "";
|
475 |
-
|
476 |
-
var html = "";
|
477 |
-
|
478 |
-
html += '<select id="' + elm_id + '" name="' + elm_id + '"';
|
479 |
-
html += ' class="mceLinkList" onfoc2us="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
|
480 |
-
html += 'this.options[this.selectedIndex].value;';
|
481 |
-
|
482 |
-
if (typeof(onchange_func) != "undefined")
|
483 |
-
html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
|
484 |
-
|
485 |
-
html += '"><option value="">---</option>';
|
486 |
-
|
487 |
-
for (var i=0; i<tinyMCELinkList.length; i++)
|
488 |
-
html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
|
489 |
-
|
490 |
-
html += '</select>';
|
491 |
-
|
492 |
-
return html;
|
493 |
-
|
494 |
-
// tinyMCE.debug('-- image list start --', html, '-- image list end --');
|
495 |
-
}
|
496 |
-
|
497 |
-
function getTargetListHTML(elm_id, target_form_element) {
|
498 |
-
var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
|
499 |
-
var html = '';
|
500 |
-
|
501 |
-
html += '<select id="' + elm_id + '" name="' + elm_id + '" onf2ocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
|
502 |
-
html += 'this.options[this.selectedIndex].value;">';
|
503 |
-
html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
|
504 |
-
html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
|
505 |
-
html += '<option value="_parent">' + tinyMCEPopup.getLang('advlink_dlg.target_parent') + ' (_parent)</option>';
|
506 |
-
html += '<option value="_top">' + tinyMCEPopup.getLang('advlink_dlg.target_top') + ' (_top)</option>';
|
507 |
-
|
508 |
-
for (var i=0; i<targets.length; i++) {
|
509 |
-
var key, value;
|
510 |
-
|
511 |
-
if (targets[i] == "")
|
512 |
-
continue;
|
513 |
-
|
514 |
-
key = targets[i].split('=')[0];
|
515 |
-
value = targets[i].split('=')[1];
|
516 |
-
|
517 |
-
html += '<option value="' + key + '">' + value + ' (' + key + ')</option>';
|
518 |
-
}
|
519 |
-
|
520 |
-
html += '</select>';
|
521 |
-
|
522 |
-
return html;
|
523 |
-
}
|
524 |
-
|
525 |
-
// While loading
|
526 |
-
preinit();
|
527 |
-
tinyMCEPopup.onInit.add(init);
|
1 |
+
/* Functions for the advlink plugin popup */
|
2 |
+
|
3 |
+
tinyMCEPopup.requireLangPack();
|
4 |
+
|
5 |
+
var templates = {
|
6 |
+
"window.open" : "window.open('${url}','${target}','${options}')"
|
7 |
+
};
|
8 |
+
|
9 |
+
function preinit() {
|
10 |
+
var url;
|
11 |
+
|
12 |
+
if (url = tinyMCEPopup.getParam("external_link_list_url"))
|
13 |
+
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
14 |
+
}
|
15 |
+
|
16 |
+
function changeClass() {
|
17 |
+
var f = document.forms[0];
|
18 |
+
|
19 |
+
f.classes.value = getSelectValue(f, 'classlist');
|
20 |
+
}
|
21 |
+
|
22 |
+
function init() {
|
23 |
+
tinyMCEPopup.resizeToInnerSize();
|
24 |
+
|
25 |
+
var formObj = document.forms[0];
|
26 |
+
var inst = tinyMCEPopup.editor;
|
27 |
+
var elm = inst.selection.getNode();
|
28 |
+
var action = "insert";
|
29 |
+
var html;
|
30 |
+
|
31 |
+
document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
|
32 |
+
document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
|
33 |
+
document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href');
|
34 |
+
document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href');
|
35 |
+
document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
|
36 |
+
|
37 |
+
// Link list
|
38 |
+
html = getLinkListHTML('linklisthref','href');
|
39 |
+
if (html == "")
|
40 |
+
document.getElementById("linklisthrefrow").style.display = 'none';
|
41 |
+
else
|
42 |
+
document.getElementById("linklisthrefcontainer").innerHTML = html;
|
43 |
+
|
44 |
+
// Resize some elements
|
45 |
+
if (isVisible('hrefbrowser'))
|
46 |
+
document.getElementById('href').style.width = '260px';
|
47 |
+
|
48 |
+
if (isVisible('popupurlbrowser'))
|
49 |
+
document.getElementById('popupurl').style.width = '180px';
|
50 |
+
|
51 |
+
elm = inst.dom.getParent(elm, "A");
|
52 |
+
if (elm != null && elm.nodeName == "A")
|
53 |
+
action = "update";
|
54 |
+
|
55 |
+
formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
|
56 |
+
|
57 |
+
setPopupControlsDisabled(true);
|
58 |
+
|
59 |
+
if (action == "update") {
|
60 |
+
var href = inst.dom.getAttrib(elm, 'href');
|
61 |
+
var onclick = inst.dom.getAttrib(elm, 'onclick');
|
62 |
+
|
63 |
+
// Setup form data
|
64 |
+
setFormValue('href', href);
|
65 |
+
setFormValue('title', inst.dom.getAttrib(elm, 'title'));
|
66 |
+
setFormValue('id', inst.dom.getAttrib(elm, 'id'));
|
67 |
+
setFormValue('style', inst.dom.getAttrib(elm, "style"));
|
68 |
+
setFormValue('rel', inst.dom.getAttrib(elm, 'rel'));
|
69 |
+
setFormValue('rev', inst.dom.getAttrib(elm, 'rev'));
|
70 |
+
setFormValue('charset', inst.dom.getAttrib(elm, 'charset'));
|
71 |
+
setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang'));
|
72 |
+
setFormValue('dir', inst.dom.getAttrib(elm, 'dir'));
|
73 |
+
setFormValue('lang', inst.dom.getAttrib(elm, 'lang'));
|
74 |
+
setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
|
75 |
+
setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
|
76 |
+
setFormValue('type', inst.dom.getAttrib(elm, 'type'));
|
77 |
+
setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus'));
|
78 |
+
setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur'));
|
79 |
+
setFormValue('onclick', onclick);
|
80 |
+
setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick'));
|
81 |
+
setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown'));
|
82 |
+
setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup'));
|
83 |
+
setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover'));
|
84 |
+
setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove'));
|
85 |
+
setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout'));
|
86 |
+
setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
|
87 |
+
setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
|
88 |
+
setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
|
89 |
+
setFormValue('target', inst.dom.getAttrib(elm, 'target'));
|
90 |
+
setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
|
91 |
+
|
92 |
+
// Parse onclick data
|
93 |
+
if (onclick != null && onclick.indexOf('window.open') != -1)
|
94 |
+
parseWindowOpen(onclick);
|
95 |
+
else
|
96 |
+
parseFunction(onclick);
|
97 |
+
|
98 |
+
// Select by the values
|
99 |
+
selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir'));
|
100 |
+
selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel'));
|
101 |
+
selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev'));
|
102 |
+
selectByValue(formObj, 'linklisthref', href);
|
103 |
+
|
104 |
+
if (href.charAt(0) == '#')
|
105 |
+
selectByValue(formObj, 'anchorlist', href);
|
106 |
+
|
107 |
+
addClassesToList('classlist', 'advlink_styles');
|
108 |
+
|
109 |
+
selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
|
110 |
+
selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true);
|
111 |
+
} else
|
112 |
+
addClassesToList('classlist', 'advlink_styles');
|
113 |
+
}
|
114 |
+
|
115 |
+
function checkPrefix(n) {
|
116 |
+
if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email')))
|
117 |
+
n.value = 'mailto:' + n.value;
|
118 |
+
|
119 |
+
if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external')))
|
120 |
+
n.value = 'http://' + n.value;
|
121 |
+
}
|
122 |
+
|
123 |
+
function setFormValue(name, value) {
|
124 |
+
document.forms[0].elements[name].value = value;
|
125 |
+
}
|
126 |
+
|
127 |
+
function parseWindowOpen(onclick) {
|
128 |
+
var formObj = document.forms[0];
|
129 |
+
|
130 |
+
// Preprocess center code
|
131 |
+
if (onclick.indexOf('return false;') != -1) {
|
132 |
+
formObj.popupreturn.checked = true;
|
133 |
+
onclick = onclick.replace('return false;', '');
|
134 |
+
} else
|
135 |
+
formObj.popupreturn.checked = false;
|
136 |
+
|
137 |
+
var onClickData = parseLink(onclick);
|
138 |
+
|
139 |
+
if (onClickData != null) {
|
140 |
+
formObj.ispopup.checked = true;
|
141 |
+
setPopupControlsDisabled(false);
|
142 |
+
|
143 |
+
var onClickWindowOptions = parseOptions(onClickData['options']);
|
144 |
+
var url = onClickData['url'];
|
145 |
+
|
146 |
+
formObj.popupname.value = onClickData['target'];
|
147 |
+
formObj.popupurl.value = url;
|
148 |
+
formObj.popupwidth.value = getOption(onClickWindowOptions, 'width');
|
149 |
+
formObj.popupheight.value = getOption(onClickWindowOptions, 'height');
|
150 |
+
|
151 |
+
formObj.popupleft.value = getOption(onClickWindowOptions, 'left');
|
152 |
+
formObj.popuptop.value = getOption(onClickWindowOptions, 'top');
|
153 |
+
|
154 |
+
if (formObj.popupleft.value.indexOf('screen') != -1)
|
155 |
+
formObj.popupleft.value = "c";
|
156 |
+
|
157 |
+
if (formObj.popuptop.value.indexOf('screen') != -1)
|
158 |
+
formObj.popuptop.value = "c";
|
159 |
+
|
160 |
+
formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes";
|
161 |
+
formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes";
|
162 |
+
formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes";
|
163 |
+
formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes";
|
164 |
+
formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes";
|
165 |
+
formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes";
|
166 |
+
formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes";
|
167 |
+
|
168 |
+
buildOnClick();
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
function parseFunction(onclick) {
|
173 |
+
var formObj = document.forms[0];
|
174 |
+
var onClickData = parseLink(onclick);
|
175 |
+
|
176 |
+
// TODO: Add stuff here
|
177 |
+
}
|
178 |
+
|
179 |
+
function getOption(opts, name) {
|
180 |
+
return typeof(opts[name]) == "undefined" ? "" : opts[name];
|
181 |
+
}
|
182 |
+
|
183 |
+
function setPopupControlsDisabled(state) {
|
184 |
+
var formObj = document.forms[0];
|
185 |
+
|
186 |
+
formObj.popupname.disabled = state;
|
187 |
+
formObj.popupurl.disabled = state;
|
188 |
+
formObj.popupwidth.disabled = state;
|
189 |
+
formObj.popupheight.disabled = state;
|
190 |
+
formObj.popupleft.disabled = state;
|
191 |
+
formObj.popuptop.disabled = state;
|
192 |
+
formObj.popuplocation.disabled = state;
|
193 |
+
formObj.popupscrollbars.disabled = state;
|
194 |
+
formObj.popupmenubar.disabled = state;
|
195 |
+
formObj.popupresizable.disabled = state;
|
196 |
+
formObj.popuptoolbar.disabled = state;
|
197 |
+
formObj.popupstatus.disabled = state;
|
198 |
+
formObj.popupreturn.disabled = state;
|
199 |
+
formObj.popupdependent.disabled = state;
|
200 |
+
|
201 |
+
setBrowserDisabled('popupurlbrowser', state);
|
202 |
+
}
|
203 |
+
|
204 |
+
function parseLink(link) {
|
205 |
+
link = link.replace(new RegExp(''', 'g'), "'");
|
206 |
+
|
207 |
+
var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1");
|
208 |
+
|
209 |
+
// Is function name a template function
|
210 |
+
var template = templates[fnName];
|
211 |
+
if (template) {
|
212 |
+
// Build regexp
|
213 |
+
var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi"));
|
214 |
+
var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\(";
|
215 |
+
var replaceStr = "";
|
216 |
+
for (var i=0; i<variableNames.length; i++) {
|
217 |
+
// Is string value
|
218 |
+
if (variableNames[i].indexOf("'${") != -1)
|
219 |
+
regExp += "'(.*)'";
|
220 |
+
else // Number value
|
221 |
+
regExp += "([0-9]*)";
|
222 |
+
|
223 |
+
replaceStr += "$" + (i+1);
|
224 |
+
|
225 |
+
// Cleanup variable name
|
226 |
+
variableNames[i] = variableNames[i].replace(new RegExp("[^A-Za-z0-9]", "gi"), "");
|
227 |
+
|
228 |
+
if (i != variableNames.length-1) {
|
229 |
+
regExp += "\\s*,\\s*";
|
230 |
+
replaceStr += "<delim>";
|
231 |
+
} else
|
232 |
+
regExp += ".*";
|
233 |
+
}
|
234 |
+
|
235 |
+
regExp += "\\);?";
|
236 |
+
|
237 |
+
// Build variable array
|
238 |
+
var variables = [];
|
239 |
+
variables["_function"] = fnName;
|
240 |
+
var variableValues = link.replace(new RegExp(regExp, "gi"), replaceStr).split('<delim>');
|
241 |
+
for (var i=0; i<variableNames.length; i++)
|
242 |
+
variables[variableNames[i]] = variableValues[i];
|
243 |
+
|
244 |
+
return variables;
|
245 |
+
}
|
246 |
+
|
247 |
+
return null;
|
248 |
+
}
|
249 |
+
|
250 |
+
function parseOptions(opts) {
|
251 |
+
if (opts == null || opts == "")
|
252 |
+
return [];
|
253 |
+
|
254 |
+
// Cleanup the options
|
255 |
+
opts = opts.toLowerCase();
|
256 |
+
opts = opts.replace(/;/g, ",");
|
257 |
+
opts = opts.replace(/[^0-9a-z=,]/g, "");
|
258 |
+
|
259 |
+
var optionChunks = opts.split(',');
|
260 |
+
var options = [];
|
261 |
+
|
262 |
+
for (var i=0; i<optionChunks.length; i++) {
|
263 |
+
var parts = optionChunks[i].split('=');
|
264 |
+
|
265 |
+
if (parts.length == 2)
|
266 |
+
options[parts[0]] = parts[1];
|
267 |
+
}
|
268 |
+
|
269 |
+
return options;
|
270 |
+
}
|
271 |
+
|
272 |
+
function buildOnClick() {
|
273 |
+
var formObj = document.forms[0];
|
274 |
+
|
275 |
+
if (!formObj.ispopup.checked) {
|
276 |
+
formObj.onclick.value = "";
|
277 |
+
return;
|
278 |
+
}
|
279 |
+
|
280 |
+
var onclick = "window.open('";
|
281 |
+
var url = formObj.popupurl.value;
|
282 |
+
|
283 |
+
onclick += url + "','";
|
284 |
+
onclick += formObj.popupname.value + "','";
|
285 |
+
|
286 |
+
if (formObj.popuplocation.checked)
|
287 |
+
onclick += "location=yes,";
|
288 |
+
|
289 |
+
if (formObj.popupscrollbars.checked)
|
290 |
+
onclick += "scrollbars=yes,";
|
291 |
+
|
292 |
+
if (formObj.popupmenubar.checked)
|
293 |
+
onclick += "menubar=yes,";
|
294 |
+
|
295 |
+
if (formObj.popupresizable.checked)
|
296 |
+
onclick += "resizable=yes,";
|
297 |
+
|
298 |
+
if (formObj.popuptoolbar.checked)
|
299 |
+
onclick += "toolbar=yes,";
|
300 |
+
|
301 |
+
if (formObj.popupstatus.checked)
|
302 |
+
onclick += "status=yes,";
|
303 |
+
|
304 |
+
if (formObj.popupdependent.checked)
|
305 |
+
onclick += "dependent=yes,";
|
306 |
+
|
307 |
+
if (formObj.popupwidth.value != "")
|
308 |
+
onclick += "width=" + formObj.popupwidth.value + ",";
|
309 |
+
|
310 |
+
if (formObj.popupheight.value != "")
|
311 |
+
onclick += "height=" + formObj.popupheight.value + ",";
|
312 |
+
|
313 |
+
if (formObj.popupleft.value != "") {
|
314 |
+
if (formObj.popupleft.value != "c")
|
315 |
+
onclick += "left=" + formObj.popupleft.value + ",";
|
316 |
+
else
|
317 |
+
onclick += "left='+(screen.availWidth/2-" + (formObj.popupwidth.value/2) + ")+',";
|
318 |
+
}
|
319 |
+
|
320 |
+
if (formObj.popuptop.value != "") {
|
321 |
+
if (formObj.popuptop.value != "c")
|
322 |
+
onclick += "top=" + formObj.popuptop.value + ",";
|
323 |
+
else
|
324 |
+
onclick += "top='+(screen.availHeight/2-" + (formObj.popupheight.value/2) + ")+',";
|
325 |
+
}
|
326 |
+
|
327 |
+
if (onclick.charAt(onclick.length-1) == ',')
|
328 |
+
onclick = onclick.substring(0, onclick.length-1);
|
329 |
+
|
330 |
+
onclick += "');";
|
331 |
+
|
332 |
+
if (formObj.popupreturn.checked)
|
333 |
+
onclick += "return false;";
|
334 |
+
|
335 |
+
// tinyMCE.debug(onclick);
|
336 |
+
|
337 |
+
formObj.onclick.value = onclick;
|
338 |
+
|
339 |
+
if (formObj.href.value == "")
|
340 |
+
formObj.href.value = url;
|
341 |
+
}
|
342 |
+
|
343 |
+
function setAttrib(elm, attrib, value) {
|
344 |
+
var formObj = document.forms[0];
|
345 |
+
var valueElm = formObj.elements[attrib.toLowerCase()];
|
346 |
+
var dom = tinyMCEPopup.editor.dom;
|
347 |
+
|
348 |
+
if (typeof(value) == "undefined" || value == null) {
|
349 |
+
value = "";
|
350 |
+
|
351 |
+
if (valueElm)
|
352 |
+
value = valueElm.value;
|
353 |
+
}
|
354 |
+
|
355 |
+
// Clean up the style
|
356 |
+
if (attrib == 'style')
|
357 |
+
value = dom.serializeStyle(dom.parseStyle(value));
|
358 |
+
|
359 |
+
dom.setAttrib(elm, attrib, value);
|
360 |
+
}
|
361 |
+
|
362 |
+
function getAnchorListHTML(id, target) {
|
363 |
+
var inst = tinyMCEPopup.editor;
|
364 |
+
var nodes = inst.dom.select('a.mceItemAnchor,img.mceItemAnchor'), name, i;
|
365 |
+
var html = "";
|
366 |
+
|
367 |
+
html += '<select id="' + id + '" name="' + id + '" class="mceAnchorList" o2nfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target + '.value=';
|
368 |
+
html += 'this.options[this.selectedIndex].value;">';
|
369 |
+
html += '<option value="">---</option>';
|
370 |
+
|
371 |
+
for (i=0; i<nodes.length; i++) {
|
372 |
+
if ((name = inst.dom.getAttrib(nodes[i], "name")) != "")
|
373 |
+
html += '<option value="#' + name + '">' + name + '</option>';
|
374 |
+
}
|
375 |
+
|
376 |
+
html += '</select>';
|
377 |
+
|
378 |
+
return html;
|
379 |
+
}
|
380 |
+
|
381 |
+
function insertAction() {
|
382 |
+
var inst = tinyMCEPopup.editor;
|
383 |
+
var elm, elementArray, i;
|
384 |
+
|
385 |
+
elm = inst.selection.getNode();
|
386 |
+
checkPrefix(document.forms[0].href);
|
387 |
+
|
388 |
+
elm = inst.dom.getParent(elm, "A");
|
389 |
+
|
390 |
+
// Remove element if there is no href
|
391 |
+
if (!document.forms[0].href.value) {
|
392 |
+
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
393 |
+
i = inst.selection.getBookmark();
|
394 |
+
inst.dom.remove(elm, 1);
|
395 |
+
inst.selection.moveToBookmark(i);
|
396 |
+
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
397 |
+
tinyMCEPopup.close();
|
398 |
+
return;
|
399 |
+
}
|
400 |
+
|
401 |
+
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
402 |
+
|
403 |
+
// Create new anchor elements
|
404 |
+
if (elm == null) {
|
405 |
+
tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1});
|
406 |
+
|
407 |
+
elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';});
|
408 |
+
for (i=0; i<elementArray.length; i++)
|
409 |
+
setAllAttribs(elm = elementArray[i]);
|
410 |
+
} else
|
411 |
+
setAllAttribs(elm);
|
412 |
+
|
413 |
+
// Don't move caret if selection was image
|
414 |
+
if (elm.childNodes.length != 1 || elm.firstChild.nodeName != 'IMG') {
|
415 |
+
inst.focus();
|
416 |
+
inst.selection.select(elm);
|
417 |
+
inst.selection.collapse(0);
|
418 |
+
tinyMCEPopup.storeSelection();
|
419 |
+
}
|
420 |
+
|
421 |
+
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
422 |
+
tinyMCEPopup.close();
|
423 |
+
}
|
424 |
+
|
425 |
+
function setAllAttribs(elm) {
|
426 |
+
var formObj = document.forms[0];
|
427 |
+
var href = formObj.href.value;
|
428 |
+
var target = getSelectValue(formObj, 'targetlist');
|
429 |
+
|
430 |
+
setAttrib(elm, 'href', href);
|
431 |
+
setAttrib(elm, 'title');
|
432 |
+
setAttrib(elm, 'target', target == '_self' ? '' : target);
|
433 |
+
setAttrib(elm, 'id');
|
434 |
+
setAttrib(elm, 'style');
|
435 |
+
setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
|
436 |
+
setAttrib(elm, 'rel');
|
437 |
+
setAttrib(elm, 'rev');
|
438 |
+
setAttrib(elm, 'charset');
|
439 |
+
setAttrib(elm, 'hreflang');
|
440 |
+
setAttrib(elm, 'dir');
|
441 |
+
setAttrib(elm, 'lang');
|
442 |
+
setAttrib(elm, 'tabindex');
|
443 |
+
setAttrib(elm, 'accesskey');
|
444 |
+
setAttrib(elm, 'type');
|
445 |
+
setAttrib(elm, 'onfocus');
|
446 |
+
setAttrib(elm, 'onblur');
|
447 |
+
setAttrib(elm, 'onclick');
|
448 |
+
setAttrib(elm, 'ondblclick');
|
449 |
+
setAttrib(elm, 'onmousedown');
|
450 |
+
setAttrib(elm, 'onmouseup');
|
451 |
+
setAttrib(elm, 'onmouseover');
|
452 |
+
setAttrib(elm, 'onmousemove');
|
453 |
+
setAttrib(elm, 'onmouseout');
|
454 |
+
setAttrib(elm, 'onkeypress');
|
455 |
+
setAttrib(elm, 'onkeydown');
|
456 |
+
setAttrib(elm, 'onkeyup');
|
457 |
+
|
458 |
+
// Refresh in old MSIE
|
459 |
+
if (tinyMCE.isMSIE5)
|
460 |
+
elm.outerHTML = elm.outerHTML;
|
461 |
+
}
|
462 |
+
|
463 |
+
function getSelectValue(form_obj, field_name) {
|
464 |
+
var elm = form_obj.elements[field_name];
|
465 |
+
|
466 |
+
if (!elm || elm.options == null || elm.selectedIndex == -1)
|
467 |
+
return "";
|
468 |
+
|
469 |
+
return elm.options[elm.selectedIndex].value;
|
470 |
+
}
|
471 |
+
|
472 |
+
function getLinkListHTML(elm_id, target_form_element, onchange_func) {
|
473 |
+
if (typeof(tinyMCELinkList) == "undefined" || tinyMCELinkList.length == 0)
|
474 |
+
return "";
|
475 |
+
|
476 |
+
var html = "";
|
477 |
+
|
478 |
+
html += '<select id="' + elm_id + '" name="' + elm_id + '"';
|
479 |
+
html += ' class="mceLinkList" onfoc2us="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
|
480 |
+
html += 'this.options[this.selectedIndex].value;';
|
481 |
+
|
482 |
+
if (typeof(onchange_func) != "undefined")
|
483 |
+
html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
|
484 |
+
|
485 |
+
html += '"><option value="">---</option>';
|
486 |
+
|
487 |
+
for (var i=0; i<tinyMCELinkList.length; i++)
|
488 |
+
html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
|
489 |
+
|
490 |
+
html += '</select>';
|
491 |
+
|
492 |
+
return html;
|
493 |
+
|
494 |
+
// tinyMCE.debug('-- image list start --', html, '-- image list end --');
|
495 |
+
}
|
496 |
+
|
497 |
+
function getTargetListHTML(elm_id, target_form_element) {
|
498 |
+
var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
|
499 |
+
var html = '';
|
500 |
+
|
501 |
+
html += '<select id="' + elm_id + '" name="' + elm_id + '" onf2ocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
|
502 |
+
html += 'this.options[this.selectedIndex].value;">';
|
503 |
+
html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
|
504 |
+
html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
|
505 |
+
html += '<option value="_parent">' + tinyMCEPopup.getLang('advlink_dlg.target_parent') + ' (_parent)</option>';
|
506 |
+
html += '<option value="_top">' + tinyMCEPopup.getLang('advlink_dlg.target_top') + ' (_top)</option>';
|
507 |
+
|
508 |
+
for (var i=0; i<targets.length; i++) {
|
509 |
+
var key, value;
|
510 |
+
|
511 |
+
if (targets[i] == "")
|
512 |
+
continue;
|
513 |
+
|
514 |
+
key = targets[i].split('=')[0];
|
515 |
+
value = targets[i].split('=')[1];
|
516 |
+
|
517 |
+
html += '<option value="' + key + '">' + value + ' (' + key + ')</option>';
|
518 |
+
}
|
519 |
+
|
520 |
+
html += '</select>';
|
521 |
+
|
522 |
+
return html;
|
523 |
+
}
|
524 |
+
|
525 |
+
// While loading
|
526 |
+
preinit();
|
527 |
+
tinyMCEPopup.onInit.add(init);
|
mce/advlink/langs/en_dlg.js
CHANGED
@@ -1,52 +1,52 @@
|
|
1 |
-
tinyMCE.addI18n('en.advlink_dlg',{
|
2 |
-
title:"Insert/edit link",
|
3 |
-
url:"Link URL",
|
4 |
-
target:"Target",
|
5 |
-
titlefield:"Title",
|
6 |
-
is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
|
7 |
-
is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?",
|
8 |
-
list:"Link list",
|
9 |
-
general_tab:"General",
|
10 |
-
popup_tab:"Popup",
|
11 |
-
events_tab:"Events",
|
12 |
-
advanced_tab:"Advanced",
|
13 |
-
general_props:"General properties",
|
14 |
-
popup_props:"Popup properties",
|
15 |
-
event_props:"Events",
|
16 |
-
advanced_props:"Advanced properties",
|
17 |
-
popup_opts:"Options",
|
18 |
-
anchor_names:"Anchors",
|
19 |
-
target_same:"Open in this window / frame",
|
20 |
-
target_parent:"Open in parent window / frame",
|
21 |
-
target_top:"Open in top frame (replaces all frames)",
|
22 |
-
target_blank:"Open in new window",
|
23 |
-
popup:"Javascript popup",
|
24 |
-
popup_url:"Popup URL",
|
25 |
-
popup_name:"Window name",
|
26 |
-
popup_return:"Insert 'return false'",
|
27 |
-
popup_scrollbars:"Show scrollbars",
|
28 |
-
popup_statusbar:"Show status bar",
|
29 |
-
popup_toolbar:"Show toolbars",
|
30 |
-
popup_menubar:"Show menu bar",
|
31 |
-
popup_location:"Show location bar",
|
32 |
-
popup_resizable:"Make window resizable",
|
33 |
-
popup_dependent:"Dependent (Mozilla/Firefox only)",
|
34 |
-
popup_size:"Size",
|
35 |
-
popup_position:"Position (X/Y)",
|
36 |
-
id:"Id",
|
37 |
-
style:"Style",
|
38 |
-
classes:"Classes",
|
39 |
-
target_name:"Target name",
|
40 |
-
langdir:"Language direction",
|
41 |
-
target_langcode:"Target language",
|
42 |
-
langcode:"Language code",
|
43 |
-
encoding:"Target character encoding",
|
44 |
-
mime:"Target MIME type",
|
45 |
-
rel:"Relationship page to target",
|
46 |
-
rev:"Relationship target to page",
|
47 |
-
tabindex:"Tabindex",
|
48 |
-
accesskey:"Accesskey",
|
49 |
-
ltr:"Left to right",
|
50 |
-
rtl:"Right to left",
|
51 |
-
link_list:"Link list"
|
52 |
Â
});
|
1 |
+
tinyMCE.addI18n('en.advlink_dlg',{
|
2 |
+
title:"Insert/edit link",
|
3 |
+
url:"Link URL",
|
4 |
+
target:"Target",
|
5 |
+
titlefield:"Title",
|
6 |
+
is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
|
7 |
+
is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?",
|
8 |
+
list:"Link list",
|
9 |
+
general_tab:"General",
|
10 |
+
popup_tab:"Popup",
|
11 |
+
events_tab:"Events",
|
12 |
+
advanced_tab:"Advanced",
|
13 |
+
general_props:"General properties",
|
14 |
+
popup_props:"Popup properties",
|
15 |
+
event_props:"Events",
|
16 |
+
advanced_props:"Advanced properties",
|
17 |
+
popup_opts:"Options",
|
18 |
+
anchor_names:"Anchors",
|
19 |
+
target_same:"Open in this window / frame",
|
20 |
+
target_parent:"Open in parent window / frame",
|
21 |
+
target_top:"Open in top frame (replaces all frames)",
|
22 |
+
target_blank:"Open in new window",
|
23 |
+
popup:"Javascript popup",
|
24 |
+
popup_url:"Popup URL",
|
25 |
+
popup_name:"Window name",
|
26 |
+
popup_return:"Insert 'return false'",
|
27 |
+
popup_scrollbars:"Show scrollbars",
|
28 |
+
popup_statusbar:"Show status bar",
|
29 |
+
popup_toolbar:"Show toolbars",
|
30 |
+
popup_menubar:"Show menu bar",
|
31 |
+
popup_location:"Show location bar",
|
32 |
+
popup_resizable:"Make window resizable",
|
33 |
+
popup_dependent:"Dependent (Mozilla/Firefox only)",
|
34 |
+
popup_size:"Size",
|
35 |
+
popup_position:"Position (X/Y)",
|
36 |
+
id:"Id",
|
37 |
+
style:"Style",
|
38 |
+
classes:"Classes",
|
39 |
+
target_name:"Target name",
|
40 |
+
langdir:"Language direction",
|
41 |
+
target_langcode:"Target language",
|
42 |
+
langcode:"Language code",
|
43 |
+
encoding:"Target character encoding",
|
44 |
+
mime:"Target MIME type",
|
45 |
+
rel:"Relationship page to target",
|
46 |
+
rev:"Relationship target to page",
|
47 |
+
tabindex:"Tabindex",
|
48 |
+
accesskey:"Accesskey",
|
49 |
+
ltr:"Left to right",
|
50 |
+
rtl:"Right to left",
|
51 |
+
link_list:"Link list"
|
52 |
Â
});
|
mce/advlink/langs/langs.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
-
$strings
|
6 |
-
else
|
7 |
-
|
Â
|
|
Â
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
+
$strings = tdav_get_file($lang_file);
|
6 |
+
else {
|
7 |
+
$strings = tdav_get_file(dirname(__FILE__) . '/en_dlg.js');
|
8 |
+
$strings = preg_replace( '/([\'"])en\./', '$1'.$mce_locale.'.', $strings, 1 );
|
9 |
+
}
|
mce/advlink/link.htm
CHANGED
@@ -1,339 +1,339 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#advlink_dlg.title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/validate.js?ver=
|
9 |
-
<script type="text/javascript" src="js/advlink.js?ver=
|
10 |
-
<link href="css/advlink.css?ver=
|
11 |
-
<base target="_self" />
|
12 |
-
</head>
|
13 |
-
<body id="advlink" style="display: none">
|
14 |
-
<form onsubmit="insertAction();return false;" action="#">
|
15 |
-
<div class="tabs">
|
16 |
-
<ul>
|
17 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
|
18 |
-
<li id="popup_tab"><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
|
19 |
-
<li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
|
20 |
-
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
|
21 |
-
</ul>
|
22 |
-
</div>
|
23 |
-
|
24 |
-
<div class="panel_wrapper">
|
25 |
-
<div id="general_panel" class="panel current">
|
26 |
-
<fieldset>
|
27 |
-
<legend>{#advlink_dlg.general_props}</legend>
|
28 |
-
|
29 |
-
<table border="0" cellpadding="4" cellspacing="0">
|
30 |
-
<tr>
|
31 |
-
<td nowrap="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
|
32 |
-
<td><table border="0" cellspacing="0" cellpadding="0">
|
33 |
-
<tr>
|
34 |
-
<td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td>
|
35 |
-
<td id="hrefbrowsercontainer"> </td>
|
36 |
-
</tr>
|
37 |
-
</table></td>
|
38 |
-
</tr>
|
39 |
-
<tr id="linklisthrefrow">
|
40 |
-
<td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td>
|
41 |
-
<td colspan="2" id="linklisthrefcontainer"> </td>
|
42 |
-
</tr>
|
43 |
-
<tr>
|
44 |
-
<td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td>
|
45 |
-
<td colspan="2" id="anchorlistcontainer"> </td>
|
46 |
-
</tr>
|
47 |
-
<tr>
|
48 |
-
<td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td>
|
49 |
-
<td id="targetlistcontainer"> </td>
|
50 |
-
</tr>
|
51 |
-
<tr>
|
52 |
-
<td nowrap="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td>
|
53 |
-
<td><input id="title" name="title" type="text" value="" /></td>
|
54 |
-
</tr>
|
55 |
-
<tr>
|
56 |
-
<td><label id="classlabel" for="classlist">{#class_name}</label></td>
|
57 |
-
<td>
|
58 |
-
<select id="classlist" name="classlist" onchange="changeClass();">
|
59 |
-
<option value="" selected>{#not_set}</option>
|
60 |
-
</select>
|
61 |
-
</td>
|
62 |
-
</tr>
|
63 |
-
</table>
|
64 |
-
</fieldset>
|
65 |
-
</div>
|
66 |
-
|
67 |
-
<div id="popup_panel" class="panel">
|
68 |
-
<fieldset>
|
69 |
-
<legend>{#advlink_dlg.popup_props}</legend>
|
70 |
-
|
71 |
-
<input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
|
72 |
-
<label id="ispopuplabel" for="ispopup">{#advlink_dlg.popup}</label>
|
73 |
-
|
74 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
75 |
-
<tr>
|
76 |
-
<td nowrap="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label> </td>
|
77 |
-
<td>
|
78 |
-
<table border="0" cellspacing="0" cellpadding="0">
|
79 |
-
<tr>
|
80 |
-
<td><input type="text" name="popupurl" id="popupurl" value="" onchange="buildOnClick();" /></td>
|
81 |
-
<td id="popupurlbrowsercontainer"> </td>
|
82 |
-
</tr>
|
83 |
-
</table>
|
84 |
-
</td>
|
85 |
-
</tr>
|
86 |
-
<tr>
|
87 |
-
<td nowrap="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label> </td>
|
88 |
-
<td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
|
89 |
-
</tr>
|
90 |
-
<tr>
|
91 |
-
<td nowrap="nowrap"><label>{#advlink_dlg.popup_size}</label> </td>
|
92 |
-
<td nowrap="nowrap">
|
93 |
-
<input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x
|
94 |
-
<input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px
|
95 |
-
</td>
|
96 |
-
</tr>
|
97 |
-
<tr>
|
98 |
-
<td nowrap="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label> </td>
|
99 |
-
<td nowrap="nowrap">
|
100 |
-
<input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> /
|
101 |
-
<input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center)
|
102 |
-
</td>
|
103 |
-
</tr>
|
104 |
-
</table>
|
105 |
-
|
106 |
-
<fieldset>
|
107 |
-
<legend>{#advlink_dlg.popup_opts}</legend>
|
108 |
-
|
109 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
110 |
-
<tr>
|
111 |
-
<td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
|
112 |
-
<td nowrap="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td>
|
113 |
-
<td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td>
|
114 |
-
<td nowrap="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td>
|
115 |
-
</tr>
|
116 |
-
<tr>
|
117 |
-
<td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td>
|
118 |
-
<td nowrap="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td>
|
119 |
-
<td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td>
|
120 |
-
<td nowrap="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td>
|
121 |
-
</tr>
|
122 |
-
<tr>
|
123 |
-
<td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td>
|
124 |
-
<td nowrap="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td>
|
125 |
-
<td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td>
|
126 |
-
<td nowrap="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td>
|
127 |
-
</tr>
|
128 |
-
<tr>
|
129 |
-
<td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td>
|
130 |
-
<td nowrap="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td>
|
131 |
-
<td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td>
|
132 |
-
<td nowrap="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td>
|
133 |
-
</tr>
|
134 |
-
</table>
|
135 |
-
</fieldset>
|
136 |
-
</fieldset>
|
137 |
-
</div>
|
138 |
-
|
139 |
-
<div id="advanced_panel" class="panel">
|
140 |
-
<fieldset>
|
141 |
-
<legend>{#advlink_dlg.advanced_props}</legend>
|
142 |
-
|
143 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
144 |
-
<tr>
|
145 |
-
<td class="column1"><label id="idlabel" for="id">{#advlink_dlg.id}</label></td>
|
146 |
-
<td><input id="id" name="id" type="text" value="" /></td>
|
147 |
-
</tr>
|
148 |
-
|
149 |
-
<tr>
|
150 |
-
<td><label id="stylelabel" for="style">{#advlink_dlg.style}</label></td>
|
151 |
-
<td><input type="text" id="style" name="style" value="" /></td>
|
152 |
-
</tr>
|
153 |
-
|
154 |
-
<tr>
|
155 |
-
<td><label id="classeslabel" for="classes">{#advlink_dlg.classes}</label></td>
|
156 |
-
<td><input type="text" id="classes" name="classes" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
|
157 |
-
</tr>
|
158 |
-
|
159 |
-
<tr>
|
160 |
-
<td><label id="targetlabel" for="target">{#advlink_dlg.target_name}</label></td>
|
161 |
-
<td><input type="text" id="target" name="target" value="" onchange="selectByValue(this.form,'targetlist',this.value,true);" /></td>
|
162 |
-
</tr>
|
163 |
-
|
164 |
-
<tr>
|
165 |
-
<td class="column1"><label id="dirlabel" for="dir">{#advlink_dlg.langdir}</label></td>
|
166 |
-
<td>
|
167 |
-
<select id="dir" name="dir">
|
168 |
-
<option value="">{#not_set}</option>
|
169 |
-
<option value="ltr">{#advlink_dlg.ltr}</option>
|
170 |
-
<option value="rtl">{#advlink_dlg.rtl}</option>
|
171 |
-
</select>
|
172 |
-
</td>
|
173 |
-
</tr>
|
174 |
-
|
175 |
-
<tr>
|
176 |
-
<td><label id="hreflanglabel" for="hreflang">{#advlink_dlg.target_langcode}</label></td>
|
177 |
-
<td><input type="text" id="hreflang" name="hreflang" value="" /></td>
|
178 |
-
</tr>
|
179 |
-
|
180 |
-
<tr>
|
181 |
-
<td class="column1"><label id="langlabel" for="lang">{#advlink_dlg.langcode}</label></td>
|
182 |
-
<td>
|
183 |
-
<input id="lang" name="lang" type="text" value="" />
|
184 |
-
</td>
|
185 |
-
</tr>
|
186 |
-
|
187 |
-
<tr>
|
188 |
-
<td><label id="charsetlabel" for="charset">{#advlink_dlg.encoding}</label></td>
|
189 |
-
<td><input type="text" id="charset" name="charset" value="" /></td>
|
190 |
-
</tr>
|
191 |
-
|
192 |
-
<tr>
|
193 |
-
<td><label id="typelabel" for="type">{#advlink_dlg.mime}</label></td>
|
194 |
-
<td><input type="text" id="type" name="type" value="" /></td>
|
195 |
-
</tr>
|
196 |
-
|
197 |
-
<tr>
|
198 |
-
<td><label id="rellabel" for="rel">{#advlink_dlg.rel}</label></td>
|
199 |
-
<td><select id="rel" name="rel">
|
200 |
-
<option value="">{#not_set}</option>
|
201 |
-
<option value="lightbox">Lightbox</option>
|
202 |
-
<option value="alternate">Alternate</option>
|
203 |
-
<option value="designates">Designates</option>
|
204 |
-
<option value="stylesheet">Stylesheet</option>
|
205 |
-
<option value="start">Start</option>
|
206 |
-
<option value="next">Next</option>
|
207 |
-
<option value="prev">Prev</option>
|
208 |
-
<option value="contents">Contents</option>
|
209 |
-
<option value="index">Index</option>
|
210 |
-
<option value="glossary">Glossary</option>
|
211 |
-
<option value="copyright">Copyright</option>
|
212 |
-
<option value="chapter">Chapter</option>
|
213 |
-
<option value="subsection">Subsection</option>
|
214 |
-
<option value="appendix">Appendix</option>
|
215 |
-
<option value="help">Help</option>
|
216 |
-
<option value="bookmark">Bookmark</option>
|
217 |
-
<option value="nofollow">No Follow</option>
|
218 |
-
<option value="tag">Tag</option>
|
219 |
-
</select>
|
220 |
-
</td>
|
221 |
-
</tr>
|
222 |
-
|
223 |
-
<tr>
|
224 |
-
<td><label id="revlabel" for="rev">{#advlink_dlg.rev}</label></td>
|
225 |
-
<td><select id="rev" name="rev">
|
226 |
-
<option value="">{#not_set}</option>
|
227 |
-
<option value="alternate">Alternate</option>
|
228 |
-
<option value="designates">Designates</option>
|
229 |
-
<option value="stylesheet">Stylesheet</option>
|
230 |
-
<option value="start">Start</option>
|
231 |
-
<option value="next">Next</option>
|
232 |
-
<option value="prev">Prev</option>
|
233 |
-
<option value="contents">Contents</option>
|
234 |
-
<option value="index">Index</option>
|
235 |
-
<option value="glossary">Glossary</option>
|
236 |
-
<option value="copyright">Copyright</option>
|
237 |
-
<option value="chapter">Chapter</option>
|
238 |
-
<option value="subsection">Subsection</option>
|
239 |
-
<option value="appendix">Appendix</option>
|
240 |
-
<option value="help">Help</option>
|
241 |
-
<option value="bookmark">Bookmark</option>
|
242 |
-
</select>
|
243 |
-
</td>
|
244 |
-
</tr>
|
245 |
-
|
246 |
-
<tr>
|
247 |
-
<td><label id="tabindexlabel" for="tabindex">{#advlink_dlg.tabindex}</label></td>
|
248 |
-
<td><input type="text" id="tabindex" name="tabindex" value="" /></td>
|
249 |
-
</tr>
|
250 |
-
|
251 |
-
<tr>
|
252 |
-
<td><label id="accesskeylabel" for="accesskey">{#advlink_dlg.accesskey}</label></td>
|
253 |
-
<td><input type="text" id="accesskey" name="accesskey" value="" /></td>
|
254 |
-
</tr>
|
255 |
-
</table>
|
256 |
-
</fieldset>
|
257 |
-
</div>
|
258 |
-
|
259 |
-
<div id="events_panel" class="panel">
|
260 |
-
<fieldset>
|
261 |
-
<legend>{#advlink_dlg.event_props}</legend>
|
262 |
-
|
263 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
264 |
-
<tr>
|
265 |
-
<td class="column1"><label for="onfocus">onfocus</label></td>
|
266 |
-
<td><input id="onfocus" name="onfocus" type="text" value="" /></td>
|
267 |
-
</tr>
|
268 |
-
|
269 |
-
<tr>
|
270 |
-
<td class="column1"><label for="onblur">onblur</label></td>
|
271 |
-
<td><input id="onblur" name="onblur" type="text" value="" /></td>
|
272 |
-
</tr>
|
273 |
-
|
274 |
-
<tr>
|
275 |
-
<td class="column1"><label for="onclick">onclick</label></td>
|
276 |
-
<td><input id="onclick" name="onclick" type="text" value="" /></td>
|
277 |
-
</tr>
|
278 |
-
|
279 |
-
<tr>
|
280 |
-
<td class="column1"><label for="ondblclick">ondblclick</label></td>
|
281 |
-
<td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
|
282 |
-
</tr>
|
283 |
-
|
284 |
-
<tr>
|
285 |
-
<td class="column1"><label for="onmousedown">onmousedown</label></td>
|
286 |
-
<td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
|
287 |
-
</tr>
|
288 |
-
|
289 |
-
<tr>
|
290 |
-
<td class="column1"><label for="onmouseup">onmouseup</label></td>
|
291 |
-
<td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
|
292 |
-
</tr>
|
293 |
-
|
294 |
-
<tr>
|
295 |
-
<td class="column1"><label for="onmouseover">onmouseover</label></td>
|
296 |
-
<td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
|
297 |
-
</tr>
|
298 |
-
|
299 |
-
<tr>
|
300 |
-
<td class="column1"><label for="onmousemove">onmousemove</label></td>
|
301 |
-
<td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
|
302 |
-
</tr>
|
303 |
-
|
304 |
-
<tr>
|
305 |
-
<td class="column1"><label for="onmouseout">onmouseout</label></td>
|
306 |
-
<td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
|
307 |
-
</tr>
|
308 |
-
|
309 |
-
<tr>
|
310 |
-
<td class="column1"><label for="onkeypress">onkeypress</label></td>
|
311 |
-
<td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
|
312 |
-
</tr>
|
313 |
-
|
314 |
-
<tr>
|
315 |
-
<td class="column1"><label for="onkeydown">onkeydown</label></td>
|
316 |
-
<td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
|
317 |
-
</tr>
|
318 |
-
|
319 |
-
<tr>
|
320 |
-
<td class="column1"><label for="onkeyup">onkeyup</label></td>
|
321 |
-
<td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
|
322 |
-
</tr>
|
323 |
-
</table>
|
324 |
-
</fieldset>
|
325 |
-
</div>
|
326 |
-
</div>
|
327 |
-
|
328 |
-
<div class="mceActionPanel">
|
329 |
-
<div style="float: left">
|
330 |
-
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
331 |
-
</div>
|
332 |
-
|
333 |
-
<div style="float: right">
|
334 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
335 |
-
</div>
|
336 |
-
</div>
|
337 |
-
</form>
|
338 |
-
</body>
|
339 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#advlink_dlg.title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/validate.js?ver=3211"></script>
|
9 |
+
<script type="text/javascript" src="js/advlink.js?ver=3211"></script>
|
10 |
+
<link href="css/advlink.css?ver=3211" rel="stylesheet" type="text/css" />
|
11 |
+
<base target="_self" />
|
12 |
+
</head>
|
13 |
+
<body id="advlink" style="display: none">
|
14 |
+
<form onsubmit="insertAction();return false;" action="#">
|
15 |
+
<div class="tabs">
|
16 |
+
<ul>
|
17 |
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
|
18 |
+
<li id="popup_tab"><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
|
19 |
+
<li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
|
20 |
+
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
|
21 |
+
</ul>
|
22 |
+
</div>
|
23 |
+
|
24 |
+
<div class="panel_wrapper">
|
25 |
+
<div id="general_panel" class="panel current">
|
26 |
+
<fieldset>
|
27 |
+
<legend>{#advlink_dlg.general_props}</legend>
|
28 |
+
|
29 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
30 |
+
<tr>
|
31 |
+
<td nowrap="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
|
32 |
+
<td><table border="0" cellspacing="0" cellpadding="0">
|
33 |
+
<tr>
|
34 |
+
<td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td>
|
35 |
+
<td id="hrefbrowsercontainer"> </td>
|
36 |
+
</tr>
|
37 |
+
</table></td>
|
38 |
+
</tr>
|
39 |
+
<tr id="linklisthrefrow">
|
40 |
+
<td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td>
|
41 |
+
<td colspan="2" id="linklisthrefcontainer"> </td>
|
42 |
+
</tr>
|
43 |
+
<tr>
|
44 |
+
<td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td>
|
45 |
+
<td colspan="2" id="anchorlistcontainer"> </td>
|
46 |
+
</tr>
|
47 |
+
<tr>
|
48 |
+
<td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td>
|
49 |
+
<td id="targetlistcontainer"> </td>
|
50 |
+
</tr>
|
51 |
+
<tr>
|
52 |
+
<td nowrap="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td>
|
53 |
+
<td><input id="title" name="title" type="text" value="" /></td>
|
54 |
+
</tr>
|
55 |
+
<tr>
|
56 |
+
<td><label id="classlabel" for="classlist">{#class_name}</label></td>
|
57 |
+
<td>
|
58 |
+
<select id="classlist" name="classlist" onchange="changeClass();">
|
59 |
+
<option value="" selected>{#not_set}</option>
|
60 |
+
</select>
|
61 |
+
</td>
|
62 |
+
</tr>
|
63 |
+
</table>
|
64 |
+
</fieldset>
|
65 |
+
</div>
|
66 |
+
|
67 |
+
<div id="popup_panel" class="panel">
|
68 |
+
<fieldset>
|
69 |
+
<legend>{#advlink_dlg.popup_props}</legend>
|
70 |
+
|
71 |
+
<input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
|
72 |
+
<label id="ispopuplabel" for="ispopup">{#advlink_dlg.popup}</label>
|
73 |
+
|
74 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
75 |
+
<tr>
|
76 |
+
<td nowrap="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label> </td>
|
77 |
+
<td>
|
78 |
+
<table border="0" cellspacing="0" cellpadding="0">
|
79 |
+
<tr>
|
80 |
+
<td><input type="text" name="popupurl" id="popupurl" value="" onchange="buildOnClick();" /></td>
|
81 |
+
<td id="popupurlbrowsercontainer"> </td>
|
82 |
+
</tr>
|
83 |
+
</table>
|
84 |
+
</td>
|
85 |
+
</tr>
|
86 |
+
<tr>
|
87 |
+
<td nowrap="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label> </td>
|
88 |
+
<td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
|
89 |
+
</tr>
|
90 |
+
<tr>
|
91 |
+
<td nowrap="nowrap"><label>{#advlink_dlg.popup_size}</label> </td>
|
92 |
+
<td nowrap="nowrap">
|
93 |
+
<input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x
|
94 |
+
<input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px
|
95 |
+
</td>
|
96 |
+
</tr>
|
97 |
+
<tr>
|
98 |
+
<td nowrap="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label> </td>
|
99 |
+
<td nowrap="nowrap">
|
100 |
+
<input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> /
|
101 |
+
<input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center)
|
102 |
+
</td>
|
103 |
+
</tr>
|
104 |
+
</table>
|
105 |
+
|
106 |
+
<fieldset>
|
107 |
+
<legend>{#advlink_dlg.popup_opts}</legend>
|
108 |
+
|
109 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
110 |
+
<tr>
|
111 |
+
<td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
|
112 |
+
<td nowrap="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td>
|
113 |
+
<td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td>
|
114 |
+
<td nowrap="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td>
|
115 |
+
</tr>
|
116 |
+
<tr>
|
117 |
+
<td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td>
|
118 |
+
<td nowrap="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td>
|
119 |
+
<td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td>
|
120 |
+
<td nowrap="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td>
|
121 |
+
</tr>
|
122 |
+
<tr>
|
123 |
+
<td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td>
|
124 |
+
<td nowrap="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td>
|
125 |
+
<td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td>
|
126 |
+
<td nowrap="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td>
|
127 |
+
</tr>
|
128 |
+
<tr>
|
129 |
+
<td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td>
|
130 |
+
<td nowrap="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td>
|
131 |
+
<td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td>
|
132 |
+
<td nowrap="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td>
|
133 |
+
</tr>
|
134 |
+
</table>
|
135 |
+
</fieldset>
|
136 |
+
</fieldset>
|
137 |
+
</div>
|
138 |
+
|
139 |
+
<div id="advanced_panel" class="panel">
|
140 |
+
<fieldset>
|
141 |
+
<legend>{#advlink_dlg.advanced_props}</legend>
|
142 |
+
|
143 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
144 |
+
<tr>
|
145 |
+
<td class="column1"><label id="idlabel" for="id">{#advlink_dlg.id}</label></td>
|
146 |
+
<td><input id="id" name="id" type="text" value="" /></td>
|
147 |
+
</tr>
|
148 |
+
|
149 |
+
<tr>
|
150 |
+
<td><label id="stylelabel" for="style">{#advlink_dlg.style}</label></td>
|
151 |
+
<td><input type="text" id="style" name="style" value="" /></td>
|
152 |
+
</tr>
|
153 |
+
|
154 |
+
<tr>
|
155 |
+
<td><label id="classeslabel" for="classes">{#advlink_dlg.classes}</label></td>
|
156 |
+
<td><input type="text" id="classes" name="classes" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
|
157 |
+
</tr>
|
158 |
+
|
159 |
+
<tr>
|
160 |
+
<td><label id="targetlabel" for="target">{#advlink_dlg.target_name}</label></td>
|
161 |
+
<td><input type="text" id="target" name="target" value="" onchange="selectByValue(this.form,'targetlist',this.value,true);" /></td>
|
162 |
+
</tr>
|
163 |
+
|
164 |
+
<tr>
|
165 |
+
<td class="column1"><label id="dirlabel" for="dir">{#advlink_dlg.langdir}</label></td>
|
166 |
+
<td>
|
167 |
+
<select id="dir" name="dir">
|
168 |
+
<option value="">{#not_set}</option>
|
169 |
+
<option value="ltr">{#advlink_dlg.ltr}</option>
|
170 |
+
<option value="rtl">{#advlink_dlg.rtl}</option>
|
171 |
+
</select>
|
172 |
+
</td>
|
173 |
+
</tr>
|
174 |
+
|
175 |
+
<tr>
|
176 |
+
<td><label id="hreflanglabel" for="hreflang">{#advlink_dlg.target_langcode}</label></td>
|
177 |
+
<td><input type="text" id="hreflang" name="hreflang" value="" /></td>
|
178 |
+
</tr>
|
179 |
+
|
180 |
+
<tr>
|
181 |
+
<td class="column1"><label id="langlabel" for="lang">{#advlink_dlg.langcode}</label></td>
|
182 |
+
<td>
|
183 |
+
<input id="lang" name="lang" type="text" value="" />
|
184 |
+
</td>
|
185 |
+
</tr>
|
186 |
+
|
187 |
+
<tr>
|
188 |
+
<td><label id="charsetlabel" for="charset">{#advlink_dlg.encoding}</label></td>
|
189 |
+
<td><input type="text" id="charset" name="charset" value="" /></td>
|
190 |
+
</tr>
|
191 |
+
|
192 |
+
<tr>
|
193 |
+
<td><label id="typelabel" for="type">{#advlink_dlg.mime}</label></td>
|
194 |
+
<td><input type="text" id="type" name="type" value="" /></td>
|
195 |
+
</tr>
|
196 |
+
|
197 |
+
<tr>
|
198 |
+
<td><label id="rellabel" for="rel">{#advlink_dlg.rel}</label></td>
|
199 |
+
<td><select id="rel" name="rel">
|
200 |
+
<option value="">{#not_set}</option>
|
201 |
+
<option value="lightbox">Lightbox</option>
|
202 |
+
<option value="alternate">Alternate</option>
|
203 |
+
<option value="designates">Designates</option>
|
204 |
+
<option value="stylesheet">Stylesheet</option>
|
205 |
+
<option value="start">Start</option>
|
206 |
+
<option value="next">Next</option>
|
207 |
+
<option value="prev">Prev</option>
|
208 |
+
<option value="contents">Contents</option>
|
209 |
+
<option value="index">Index</option>
|
210 |
+
<option value="glossary">Glossary</option>
|
211 |
+
<option value="copyright">Copyright</option>
|
212 |
+
<option value="chapter">Chapter</option>
|
213 |
+
<option value="subsection">Subsection</option>
|
214 |
+
<option value="appendix">Appendix</option>
|
215 |
+
<option value="help">Help</option>
|
216 |
+
<option value="bookmark">Bookmark</option>
|
217 |
+
<option value="nofollow">No Follow</option>
|
218 |
+
<option value="tag">Tag</option>
|
219 |
+
</select>
|
220 |
+
</td>
|
221 |
+
</tr>
|
222 |
+
|
223 |
+
<tr>
|
224 |
+
<td><label id="revlabel" for="rev">{#advlink_dlg.rev}</label></td>
|
225 |
+
<td><select id="rev" name="rev">
|
226 |
+
<option value="">{#not_set}</option>
|
227 |
+
<option value="alternate">Alternate</option>
|
228 |
+
<option value="designates">Designates</option>
|
229 |
+
<option value="stylesheet">Stylesheet</option>
|
230 |
+
<option value="start">Start</option>
|
231 |
+
<option value="next">Next</option>
|
232 |
+
<option value="prev">Prev</option>
|
233 |
+
<option value="contents">Contents</option>
|
234 |
+
<option value="index">Index</option>
|
235 |
+
<option value="glossary">Glossary</option>
|
236 |
+
<option value="copyright">Copyright</option>
|
237 |
+
<option value="chapter">Chapter</option>
|
238 |
+
<option value="subsection">Subsection</option>
|
239 |
+
<option value="appendix">Appendix</option>
|
240 |
+
<option value="help">Help</option>
|
241 |
+
<option value="bookmark">Bookmark</option>
|
242 |
+
</select>
|
243 |
+
</td>
|
244 |
+
</tr>
|
245 |
+
|
246 |
+
<tr>
|
247 |
+
<td><label id="tabindexlabel" for="tabindex">{#advlink_dlg.tabindex}</label></td>
|
248 |
+
<td><input type="text" id="tabindex" name="tabindex" value="" /></td>
|
249 |
+
</tr>
|
250 |
+
|
251 |
+
<tr>
|
252 |
+
<td><label id="accesskeylabel" for="accesskey">{#advlink_dlg.accesskey}</label></td>
|
253 |
+
<td><input type="text" id="accesskey" name="accesskey" value="" /></td>
|
254 |
+
</tr>
|
255 |
+
</table>
|
256 |
+
</fieldset>
|
257 |
+
</div>
|
258 |
+
|
259 |
+
<div id="events_panel" class="panel">
|
260 |
+
<fieldset>
|
261 |
+
<legend>{#advlink_dlg.event_props}</legend>
|
262 |
+
|
263 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
264 |
+
<tr>
|
265 |
+
<td class="column1"><label for="onfocus">onfocus</label></td>
|
266 |
+
<td><input id="onfocus" name="onfocus" type="text" value="" /></td>
|
267 |
+
</tr>
|
268 |
+
|
269 |
+
<tr>
|
270 |
+
<td class="column1"><label for="onblur">onblur</label></td>
|
271 |
+
<td><input id="onblur" name="onblur" type="text" value="" /></td>
|
272 |
+
</tr>
|
273 |
+
|
274 |
+
<tr>
|
275 |
+
<td class="column1"><label for="onclick">onclick</label></td>
|
276 |
+
<td><input id="onclick" name="onclick" type="text" value="" /></td>
|
277 |
+
</tr>
|
278 |
+
|
279 |
+
<tr>
|
280 |
+
<td class="column1"><label for="ondblclick">ondblclick</label></td>
|
281 |
+
<td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
|
282 |
+
</tr>
|
283 |
+
|
284 |
+
<tr>
|
285 |
+
<td class="column1"><label for="onmousedown">onmousedown</label></td>
|
286 |
+
<td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
|
287 |
+
</tr>
|
288 |
+
|
289 |
+
<tr>
|
290 |
+
<td class="column1"><label for="onmouseup">onmouseup</label></td>
|
291 |
+
<td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
|
292 |
+
</tr>
|
293 |
+
|
294 |
+
<tr>
|
295 |
+
<td class="column1"><label for="onmouseover">onmouseover</label></td>
|
296 |
+
<td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
|
297 |
+
</tr>
|
298 |
+
|
299 |
+
<tr>
|
300 |
+
<td class="column1"><label for="onmousemove">onmousemove</label></td>
|
301 |
+
<td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
|
302 |
+
</tr>
|
303 |
+
|
304 |
+
<tr>
|
305 |
+
<td class="column1"><label for="onmouseout">onmouseout</label></td>
|
306 |
+
<td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
|
307 |
+
</tr>
|
308 |
+
|
309 |
+
<tr>
|
310 |
+
<td class="column1"><label for="onkeypress">onkeypress</label></td>
|
311 |
+
<td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
|
312 |
+
</tr>
|
313 |
+
|
314 |
+
<tr>
|
315 |
+
<td class="column1"><label for="onkeydown">onkeydown</label></td>
|
316 |
+
<td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
|
317 |
+
</tr>
|
318 |
+
|
319 |
+
<tr>
|
320 |
+
<td class="column1"><label for="onkeyup">onkeyup</label></td>
|
321 |
+
<td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
|
322 |
+
</tr>
|
323 |
+
</table>
|
324 |
+
</fieldset>
|
325 |
+
</div>
|
326 |
+
</div>
|
327 |
+
|
328 |
+
<div class="mceActionPanel">
|
329 |
+
<div style="float: left">
|
330 |
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
331 |
+
</div>
|
332 |
+
|
333 |
+
<div style="float: right">
|
334 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
335 |
+
</div>
|
336 |
+
</div>
|
337 |
+
</form>
|
338 |
+
</body>
|
339 |
+
</html>
|
mce/emotions/emotions.htm
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Â
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
Â
<head>
|
4 |
Â
<title>{#emotions.emotions_desc}</title>
|
5 |
-
<script type="text/javascript" type="text/javascript" src="../../tiny_mce_popup.js?v=
|
6 |
Â
<script type="text/javascript" type="text/javascript">
|
7 |
Â
var EmotionsDialog = {
|
8 |
Â
init : function(ed) {
|
@@ -15,6 +15,8 @@ var EmotionsDialog = {
|
|
15 |
Â
}
|
16 |
Â
};
|
17 |
Â
tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog);
|
Â
|
|
Â
|
|
18 |
Â
</script>
|
19 |
Â
<style type="text/css">
|
20 |
Â
table#emotions {border:0;}
|
@@ -29,62 +31,62 @@ tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog);
|
|
29 |
Â
<table id="emotions">
|
30 |
Â
<tr>
|
31 |
Â
<td><a href="javascript:EmotionsDialog.insert(' 8-) ');">
|
32 |
-
<img src="
|
33 |
Â
|
34 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :cry: ');">
|
35 |
-
<img src="
|
36 |
Â
|
37 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :oops: ');">
|
38 |
-
<img src="
|
39 |
Â
|
40 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :mrgreen: ');">
|
41 |
-
<img src="
|
42 |
Â
|
43 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-( ');">
|
44 |
-
<img src="
|
45 |
Â
|
46 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :twisted: ');">
|
47 |
-
<img src="
|
48 |
Â
</tr>
|
49 |
Â
|
50 |
Â
<tr>
|
51 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :evil: ');">
|
52 |
-
<img src="
|
53 |
Â
|
54 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :lol: ');">
|
55 |
-
<img src="
|
56 |
Â
|
57 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :roll: ');">
|
58 |
-
<img src="
|
59 |
Â
|
60 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-? ');">
|
61 |
-
<img src="
|
62 |
Â
|
63 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-) ');">
|
64 |
-
<img src="
|
65 |
Â
|
66 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-o ');">
|
67 |
-
<img src="
|
68 |
Â
</tr>
|
69 |
Â
|
70 |
Â
<tr>
|
71 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-P ');">
|
72 |
-
<img src="
|
73 |
Â
|
74 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-| ');">
|
75 |
-
<img src="
|
76 |
Â
|
77 |
Â
<td><a href="javascript:EmotionsDialog.insert(' ;-) ');">
|
78 |
-
<img src="
|
79 |
Â
|
80 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-x ');">
|
81 |
-
<img src="
|
82 |
Â
|
83 |
Â
<td><a href="javascript:EmotionsDialog.insert(' 8-O ');">
|
84 |
-
<img src="
|
85 |
Â
|
86 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-D ');">
|
87 |
-
<img src="
|
88 |
Â
</tr>
|
89 |
Â
</table>
|
90 |
Â
</div>
|
2 |
Â
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
Â
<head>
|
4 |
Â
<title>{#emotions.emotions_desc}</title>
|
5 |
+
<script type="text/javascript" type="text/javascript" src="../../tiny_mce_popup.js?v=3211"></script>
|
6 |
Â
<script type="text/javascript" type="text/javascript">
|
7 |
Â
var EmotionsDialog = {
|
8 |
Â
init : function(ed) {
|
15 |
Â
}
|
16 |
Â
};
|
17 |
Â
tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog);
|
18 |
+
|
19 |
+
document.write('<base href="'+tinymce.baseURL+'" />');
|
20 |
Â
</script>
|
21 |
Â
<style type="text/css">
|
22 |
Â
table#emotions {border:0;}
|
31 |
Â
<table id="emotions">
|
32 |
Â
<tr>
|
33 |
Â
<td><a href="javascript:EmotionsDialog.insert(' 8-) ');">
|
34 |
+
<img src="../images/smilies/icon_cool.gif" width="15" height="15" alt="8-)" title="8-)" /></a></td>
|
35 |
Â
|
36 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :cry: ');">
|
37 |
+
<img src="../images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title=":cry:" /></a></td>
|
38 |
Â
|
39 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :oops: ');">
|
40 |
+
<img src="../images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title=":oops:" /></a></td>
|
41 |
Â
|
42 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :mrgreen: ');">
|
43 |
+
<img src="../images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title=":mrgreen:" /></a></td>
|
44 |
Â
|
45 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-( ');">
|
46 |
+
<img src="../images/smilies/icon_sad.gif" width="15" height="15" alt=":-(" title=":-(" /></a></td>
|
47 |
Â
|
48 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :twisted: ');">
|
49 |
+
<img src="../images/smilies/icon_twisted.gif" width="15" height="15" alt=":twisted:" title=":twisted:" /></a></td>
|
50 |
Â
</tr>
|
51 |
Â
|
52 |
Â
<tr>
|
53 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :evil: ');">
|
54 |
+
<img src="../images/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title=":evil:" /></a></td>
|
55 |
Â
|
56 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :lol: ');">
|
57 |
+
<img src="../images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title=":lol:" /></a></td>
|
58 |
Â
|
59 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :roll: ');">
|
60 |
+
<img src="../images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title=":roll:" /></a></td>
|
61 |
Â
|
62 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-? ');">
|
63 |
+
<img src="../images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title=":-?" /></a></td>
|
64 |
Â
|
65 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-) ');">
|
66 |
+
<img src="../images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title=":-)" /></a></td>
|
67 |
Â
|
68 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-o ');">
|
69 |
+
<img src="../images/smilies/icon_surprised.gif" width="15" height="15" alt=":-o" title=":-o" /></a></td>
|
70 |
Â
</tr>
|
71 |
Â
|
72 |
Â
<tr>
|
73 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-P ');">
|
74 |
+
<img src="../images/smilies/icon_razz.gif" width="15" height="15" alt=":-P" title=":-P" /></a></td>
|
75 |
Â
|
76 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-| ');">
|
77 |
+
<img src="../images/smilies/icon_neutral.gif" width="15" height="15" alt=":-|" title=":-|" /></a></td>
|
78 |
Â
|
79 |
Â
<td><a href="javascript:EmotionsDialog.insert(' ;-) ');">
|
80 |
+
<img src="../images/smilies/icon_wink.gif" width="15" height="15" alt=";-)" title=";-)" /></a></td>
|
81 |
Â
|
82 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-x ');">
|
83 |
+
<img src="../images/smilies/icon_mad.gif" width="15" height="15" alt=":-x" title=":-x" /></a></td>
|
84 |
Â
|
85 |
Â
<td><a href="javascript:EmotionsDialog.insert(' 8-O ');">
|
86 |
+
<img src="../images/smilies/icon_eek.gif" width="15" height="15" alt="8-O" title="8-O" /></a></td>
|
87 |
Â
|
88 |
Â
<td><a href="javascript:EmotionsDialog.insert(' :-D ');">
|
89 |
+
<img src="../images/smilies/icon_biggrin.gif" width="15" height="15" alt=":-D" title=":-D" /></a></td>
|
90 |
Â
</tr>
|
91 |
Â
</table>
|
92 |
Â
</div>
|
mce/searchreplace/css/searchreplace.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
.panel_wrapper {height:85px;}
|
2 |
-
.panel_wrapper div.current {height:85px;}
|
3 |
-
|
4 |
-
/* IE */
|
5 |
-
* html .panel_wrapper {height:100px;}
|
6 |
-
* html .panel_wrapper div.current {height:100px;}
|
1 |
+
.panel_wrapper {height:85px;}
|
2 |
+
.panel_wrapper div.current {height:85px;}
|
3 |
+
|
4 |
+
/* IE */
|
5 |
+
* html .panel_wrapper {height:100px;}
|
6 |
+
* html .panel_wrapper div.current {height:100px;}
|
mce/searchreplace/js/searchreplace.js
CHANGED
@@ -1,117 +1,126 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
var SearchReplaceDialog = {
|
4 |
-
init : function(ed) {
|
5 |
-
var f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode");
|
6 |
-
|
7 |
-
this.switchMode(m);
|
8 |
-
|
9 |
-
f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string");
|
10 |
-
|
11 |
-
// Focus input field
|
12 |
-
f[m + '_panel_searchstring'].focus();
|
13 |
-
},
|
14 |
-
|
15 |
-
switchMode : function(m) {
|
16 |
-
var f, lm = this.lastMode;
|
17 |
-
|
18 |
-
if (lm != m) {
|
19 |
-
f = document.forms[0];
|
20 |
-
|
21 |
-
if (lm) {
|
22 |
-
f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value;
|
23 |
-
f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked;
|
24 |
-
f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked;
|
25 |
-
f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked;
|
26 |
-
}
|
27 |
-
|
28 |
-
mcTabs.displayTab(m + '_tab', m + '_panel');
|
29 |
-
document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none";
|
30 |
-
document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none";
|
31 |
-
this.lastMode = m;
|
32 |
-
}
|
33 |
-
},
|
34 |
-
|
35 |
-
searchNext : function(a) {
|
36 |
-
var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
|
37 |
-
|
38 |
-
// Get input
|
39 |
-
f = document.forms[0];
|
40 |
-
s = f[m + '_panel_searchstring'].value;
|
41 |
-
b = f[m + '_panel_backwardsu'].checked;
|
42 |
-
ca = f[m + '_panel_casesensitivebox'].checked;
|
43 |
-
rs = f['replace_panel_replacestring'].value;
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
replace();
|
77 |
-
fo = 1;
|
78 |
-
}
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
var SearchReplaceDialog = {
|
4 |
+
init : function(ed) {
|
5 |
+
var f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode");
|
6 |
+
|
7 |
+
this.switchMode(m);
|
8 |
+
|
9 |
+
f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string");
|
10 |
+
|
11 |
+
// Focus input field
|
12 |
+
f[m + '_panel_searchstring'].focus();
|
13 |
+
},
|
14 |
+
|
15 |
+
switchMode : function(m) {
|
16 |
+
var f, lm = this.lastMode;
|
17 |
+
|
18 |
+
if (lm != m) {
|
19 |
+
f = document.forms[0];
|
20 |
+
|
21 |
+
if (lm) {
|
22 |
+
f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value;
|
23 |
+
f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked;
|
24 |
+
f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked;
|
25 |
+
f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked;
|
26 |
+
}
|
27 |
+
|
28 |
+
mcTabs.displayTab(m + '_tab', m + '_panel');
|
29 |
+
document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none";
|
30 |
+
document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none";
|
31 |
+
this.lastMode = m;
|
32 |
+
}
|
33 |
+
},
|
34 |
+
|
35 |
+
searchNext : function(a) {
|
36 |
+
var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
|
37 |
+
|
38 |
+
// Get input
|
39 |
+
f = document.forms[0];
|
40 |
+
s = f[m + '_panel_searchstring'].value;
|
41 |
+
b = f[m + '_panel_backwardsu'].checked;
|
42 |
+
ca = f[m + '_panel_casesensitivebox'].checked;
|
43 |
+
rs = f['replace_panel_replacestring'].value;
|
44 |
+
|
45 |
+
if (s == '')
|
46 |
+
return;
|
47 |
+
|
48 |
+
function fix() {
|
49 |
+
// Correct Firefox graphics glitches
|
50 |
+
r = se.getRng().cloneRange();
|
51 |
+
ed.getDoc().execCommand('SelectAll', false, null);
|
52 |
+
se.setRng(r);
|
53 |
+
};
|
54 |
+
|
55 |
+
function replace() {
|
56 |
+
if (tinymce.isIE)
|
57 |
+
ed.selection.getRng().duplicate().pasteHTML(rs); // Needs to be duplicated due to selection bug in IE
|
58 |
+
else
|
59 |
+
ed.getDoc().execCommand('InsertHTML', false, rs);
|
60 |
+
};
|
61 |
+
|
62 |
+
// IE flags
|
63 |
+
if (ca)
|
64 |
+
fl = fl | 4;
|
65 |
+
|
66 |
+
switch (a) {
|
67 |
+
case 'all':
|
68 |
+
// Move caret to beginning of text
|
69 |
+
ed.execCommand('SelectAll');
|
70 |
+
ed.selection.collapse(true);
|
71 |
+
|
72 |
+
if (tinymce.isIE) {
|
73 |
+
while (r.findText(s, b ? -1 : 1, fl)) {
|
74 |
+
r.scrollIntoView();
|
75 |
+
r.select();
|
76 |
+
replace();
|
77 |
+
fo = 1;
|
78 |
+
}
|
79 |
+
|
80 |
+
tinyMCEPopup.storeSelection();
|
81 |
+
} else {
|
82 |
+
while (w.find(s, ca, b, false, false, false, false)) {
|
83 |
+
replace();
|
84 |
+
fo = 1;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
if (fo)
|
89 |
+
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced'));
|
90 |
+
else
|
91 |
+
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
92 |
+
|
93 |
+
return;
|
94 |
+
|
95 |
+
case 'current':
|
96 |
+
if (!ed.selection.isCollapsed())
|
97 |
+
replace();
|
98 |
+
|
99 |
+
break;
|
100 |
+
}
|
101 |
+
|
102 |
+
se.collapse(b);
|
103 |
+
r = se.getRng();
|
104 |
+
|
105 |
+
// Whats the point
|
106 |
+
if (!s)
|
107 |
+
return;
|
108 |
+
|
109 |
+
if (tinymce.isIE) {
|
110 |
+
if (r.findText(s, b ? -1 : 1, fl)) {
|
111 |
+
r.scrollIntoView();
|
112 |
+
r.select();
|
113 |
+
} else
|
114 |
+
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
115 |
+
|
116 |
+
tinyMCEPopup.storeSelection();
|
117 |
+
} else {
|
118 |
+
if (!w.find(s, ca, b, false, false, false, false))
|
119 |
+
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
120 |
+
else
|
121 |
+
fix();
|
122 |
+
}
|
123 |
+
}
|
124 |
+
};
|
125 |
+
|
126 |
+
tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog);
|
mce/searchreplace/langs/en_dlg.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
-
tinyMCE.addI18n('en.searchreplace_dlg',{
|
2 |
-
searchnext_desc:"Find again",
|
3 |
-
notfound:"The search has been completed. The search string could not be found.",
|
4 |
-
search_title:"Find",
|
5 |
-
replace_title:"Find/Replace",
|
6 |
-
allreplaced:"All occurrences of the search string were replaced.",
|
7 |
-
findwhat:"Find what",
|
8 |
-
replacewith:"Replace with",
|
9 |
-
direction:"Direction",
|
10 |
-
up:"Up",
|
11 |
-
down:"Down",
|
12 |
-
mcase:"Match case",
|
13 |
-
findnext:"Find next",
|
14 |
-
replace:"Replace",
|
15 |
-
replaceall:"Replace all"
|
16 |
Â
});
|
1 |
+
tinyMCE.addI18n('en.searchreplace_dlg',{
|
2 |
+
searchnext_desc:"Find again",
|
3 |
+
notfound:"The search has been completed. The search string could not be found.",
|
4 |
+
search_title:"Find",
|
5 |
+
replace_title:"Find/Replace",
|
6 |
+
allreplaced:"All occurrences of the search string were replaced.",
|
7 |
+
findwhat:"Find what",
|
8 |
+
replacewith:"Replace with",
|
9 |
+
direction:"Direction",
|
10 |
+
up:"Up",
|
11 |
+
down:"Down",
|
12 |
+
mcase:"Match case",
|
13 |
+
findnext:"Find next",
|
14 |
+
replace:"Replace",
|
15 |
+
replaceall:"Replace all"
|
16 |
Â
});
|
mce/searchreplace/langs/langs.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
-
$strings
|
6 |
-
else
|
7 |
-
|
Â
|
|
Â
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
+
$strings = tdav_get_file($lang_file);
|
6 |
+
else {
|
7 |
+
$strings = tdav_get_file(dirname(__FILE__) . '/en_dlg.js');
|
8 |
+
$strings = preg_replace( '/([\'"])en\./', '$1'.$mce_locale.'.', $strings, 1 );
|
9 |
+
}
|
mce/searchreplace/searchreplace.htm
CHANGED
@@ -1,105 +1,105 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#searchreplace_dlg.replace_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
8 |
-
<script type="text/javascript" src="js/searchreplace.js?ver=
|
9 |
-
<link rel="stylesheet" type="text/css" href="css/searchreplace.css?ver=
|
10 |
-
<base target="_self" />
|
11 |
-
</head>
|
12 |
-
<body style="display:none;">
|
13 |
-
<form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
|
14 |
-
<div class="tabs">
|
15 |
-
<ul>
|
16 |
-
<li id="search_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
|
17 |
-
<li id="replace_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
|
18 |
-
</ul>
|
19 |
-
</div>
|
20 |
-
|
21 |
-
<div class="panel_wrapper">
|
22 |
-
<div id="search_panel" class="panel">
|
23 |
-
<table border="0" cellspacing="0" cellpadding="2">
|
24 |
-
<tr>
|
25 |
-
<td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
26 |
-
<td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" /></td>
|
27 |
-
</tr>
|
28 |
-
<tr>
|
29 |
-
<td colspan="2">
|
30 |
-
<table border="0" cellspacing="0" cellpadding="0" class="direction">
|
31 |
-
<tr>
|
32 |
-
<td><label>{#searchreplace_dlg.direction}</label></td>
|
33 |
-
<td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
|
34 |
-
<td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
35 |
-
<td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
36 |
-
<td><label for="search_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
37 |
-
</tr>
|
38 |
-
</table>
|
39 |
-
</td>
|
40 |
-
</tr>
|
41 |
-
<tr>
|
42 |
-
<td colspan="2">
|
43 |
-
<table border="0" cellspacing="0" cellpadding="0">
|
44 |
-
<tr>
|
45 |
-
<td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
46 |
-
<td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
47 |
-
</tr>
|
48 |
-
</table>
|
49 |
-
</td>
|
50 |
-
</tr>
|
51 |
-
</table>
|
52 |
-
</div>
|
53 |
-
|
54 |
-
<div id="replace_panel" class="panel">
|
55 |
-
<table border="0" cellspacing="0" cellpadding="2">
|
56 |
-
<tr>
|
57 |
-
<td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
58 |
-
<td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" /></td>
|
59 |
-
</tr>
|
60 |
-
<tr>
|
61 |
-
<td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td>
|
62 |
-
<td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" /></td>
|
63 |
-
</tr>
|
64 |
-
<tr>
|
65 |
-
<td colspan="2">
|
66 |
-
<table border="0" cellspacing="0" cellpadding="0" class="direction">
|
67 |
-
<tr>
|
68 |
-
<td><label>{#searchreplace_dlg.direction}</label></td>
|
69 |
-
<td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
|
70 |
-
<td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
71 |
-
<td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
72 |
-
<td><label for="replace_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
73 |
-
</tr>
|
74 |
-
</table>
|
75 |
-
</td>
|
76 |
-
</tr>
|
77 |
-
<tr>
|
78 |
-
<td colspan="2">
|
79 |
-
<table border="0" cellspacing="0" cellpadding="0">
|
80 |
-
<tr>
|
81 |
-
<td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
82 |
-
<td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
83 |
-
</tr>
|
84 |
-
</table>
|
85 |
-
</td>
|
86 |
-
</tr>
|
87 |
-
</table>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
</div>
|
91 |
-
|
92 |
-
<div class="mceActionPanel">
|
93 |
-
<div style="float: left">
|
94 |
-
<input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
|
95 |
-
<input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
|
96 |
-
<input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
|
97 |
-
</div>
|
98 |
-
|
99 |
-
<div style="float: right">
|
100 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
101 |
-
</div>
|
102 |
-
</div>
|
103 |
-
</form>
|
104 |
-
</body>
|
105 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#searchreplace_dlg.replace_title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="js/searchreplace.js?ver=3211"></script>
|
9 |
+
<link rel="stylesheet" type="text/css" href="css/searchreplace.css?ver=3211" />
|
10 |
+
<base target="_self" />
|
11 |
+
</head>
|
12 |
+
<body style="display:none;">
|
13 |
+
<form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
|
14 |
+
<div class="tabs">
|
15 |
+
<ul>
|
16 |
+
<li id="search_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
|
17 |
+
<li id="replace_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
|
18 |
+
</ul>
|
19 |
+
</div>
|
20 |
+
|
21 |
+
<div class="panel_wrapper">
|
22 |
+
<div id="search_panel" class="panel">
|
23 |
+
<table border="0" cellspacing="0" cellpadding="2">
|
24 |
+
<tr>
|
25 |
+
<td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
26 |
+
<td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" /></td>
|
27 |
+
</tr>
|
28 |
+
<tr>
|
29 |
+
<td colspan="2">
|
30 |
+
<table border="0" cellspacing="0" cellpadding="0" class="direction">
|
31 |
+
<tr>
|
32 |
+
<td><label>{#searchreplace_dlg.direction}</label></td>
|
33 |
+
<td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
|
34 |
+
<td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
35 |
+
<td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
36 |
+
<td><label for="search_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
37 |
+
</tr>
|
38 |
+
</table>
|
39 |
+
</td>
|
40 |
+
</tr>
|
41 |
+
<tr>
|
42 |
+
<td colspan="2">
|
43 |
+
<table border="0" cellspacing="0" cellpadding="0">
|
44 |
+
<tr>
|
45 |
+
<td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
46 |
+
<td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
47 |
+
</tr>
|
48 |
+
</table>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
+
</table>
|
52 |
+
</div>
|
53 |
+
|
54 |
+
<div id="replace_panel" class="panel">
|
55 |
+
<table border="0" cellspacing="0" cellpadding="2">
|
56 |
+
<tr>
|
57 |
+
<td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
58 |
+
<td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" /></td>
|
59 |
+
</tr>
|
60 |
+
<tr>
|
61 |
+
<td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td>
|
62 |
+
<td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" /></td>
|
63 |
+
</tr>
|
64 |
+
<tr>
|
65 |
+
<td colspan="2">
|
66 |
+
<table border="0" cellspacing="0" cellpadding="0" class="direction">
|
67 |
+
<tr>
|
68 |
+
<td><label>{#searchreplace_dlg.direction}</label></td>
|
69 |
+
<td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
|
70 |
+
<td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
71 |
+
<td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
72 |
+
<td><label for="replace_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
73 |
+
</tr>
|
74 |
+
</table>
|
75 |
+
</td>
|
76 |
+
</tr>
|
77 |
+
<tr>
|
78 |
+
<td colspan="2">
|
79 |
+
<table border="0" cellspacing="0" cellpadding="0">
|
80 |
+
<tr>
|
81 |
+
<td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
82 |
+
<td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
83 |
+
</tr>
|
84 |
+
</table>
|
85 |
+
</td>
|
86 |
+
</tr>
|
87 |
+
</table>
|
88 |
+
</div>
|
89 |
+
|
90 |
+
</div>
|
91 |
+
|
92 |
+
<div class="mceActionPanel">
|
93 |
+
<div style="float: left">
|
94 |
+
<input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
|
95 |
+
<input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
|
96 |
+
<input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
|
97 |
+
</div>
|
98 |
+
|
99 |
+
<div style="float: right">
|
100 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
</form>
|
104 |
+
</body>
|
105 |
+
</html>
|
mce/style/css/props.css
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
#text_font {width:250px;}
|
2 |
-
#text_size {width:70px;}
|
3 |
-
.mceAddSelectValue {background:#DDD;}
|
4 |
-
select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;}
|
5 |
-
#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;}
|
6 |
-
#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;}
|
7 |
-
#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;}
|
8 |
-
.panel_wrapper div.current {padding-top:10px;height:230px;}
|
9 |
-
.delim {border-left:1px solid gray;}
|
10 |
-
.tdelim {border-bottom:1px solid gray;}
|
11 |
-
#block_display {width:145px;}
|
12 |
-
#list_type {width:115px;}
|
13 |
-
.disabled {background:#EEE;}
|
1 |
+
#text_font {width:250px;}
|
2 |
+
#text_size {width:70px;}
|
3 |
+
.mceAddSelectValue {background:#DDD;}
|
4 |
+
select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;}
|
5 |
+
#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;}
|
6 |
+
#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;}
|
7 |
+
#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;}
|
8 |
+
.panel_wrapper div.current {padding-top:10px;height:230px;}
|
9 |
+
.delim {border-left:1px solid gray;}
|
10 |
+
.tdelim {border-bottom:1px solid gray;}
|
11 |
+
#block_display {width:145px;}
|
12 |
+
#list_type {width:115px;}
|
13 |
+
.disabled {background:#EEE;}
|
mce/style/js/props.js
CHANGED
@@ -1,641 +1,641 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
var defaultFonts = "" +
|
4 |
-
"Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" +
|
5 |
-
"Times New Roman, Times, serif=Times New Roman, Times, serif;" +
|
6 |
-
"Courier New, Courier, mono=Courier New, Courier, mono;" +
|
7 |
-
"Times New Roman, Times, serif=Times New Roman, Times, serif;" +
|
8 |
-
"Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" +
|
9 |
-
"Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" +
|
10 |
-
"Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif";
|
11 |
-
|
12 |
-
var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger";
|
13 |
-
var defaultMeasurement = "+pixels=px;points=pt;em;in;cm;mm;picas;ems;exs;%";
|
14 |
-
var defaultSpacingMeasurement = "pixels=px;points=pt;in;cm;mm;picas;+ems;exs;%";
|
15 |
-
var defaultIndentMeasurement = "pixels=px;+points=pt;in;cm;mm;picas;ems;exs;%";
|
16 |
-
var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900";
|
17 |
-
var defaultTextStyle = "normal;italic;oblique";
|
18 |
-
var defaultVariant = "normal;small-caps";
|
19 |
-
var defaultLineHeight = "normal";
|
20 |
-
var defaultAttachment = "fixed;scroll";
|
21 |
-
var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y";
|
22 |
-
var defaultPosH = "left;center;right";
|
23 |
-
var defaultPosV = "top;center;bottom";
|
24 |
-
var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom";
|
25 |
-
var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none";
|
26 |
-
var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset";
|
27 |
-
var defaultBorderWidth = "thin;medium;thick";
|
28 |
-
var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none";
|
29 |
-
|
30 |
-
function init() {
|
31 |
-
var ce = document.getElementById('container'), h;
|
32 |
-
|
33 |
-
ce.style.cssText = tinyMCEPopup.getWindowArg('style_text');
|
34 |
-
|
35 |
-
h = getBrowserHTML('background_image_browser','background_image','image','advimage');
|
36 |
-
document.getElementById("background_image_browser").innerHTML = h;
|
37 |
-
|
38 |
-
document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color');
|
39 |
-
document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color');
|
40 |
-
document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top');
|
41 |
-
document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right');
|
42 |
-
document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom');
|
43 |
-
document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left');
|
44 |
-
|
45 |
-
fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true);
|
46 |
-
fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true);
|
47 |
-
fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true);
|
48 |
-
fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true);
|
49 |
-
fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true);
|
50 |
-
fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true);
|
51 |
-
fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true);
|
52 |
-
fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true);
|
53 |
-
fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true);
|
54 |
-
|
55 |
-
fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true);
|
56 |
-
fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true);
|
57 |
-
|
58 |
-
fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true);
|
59 |
-
fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true);
|
60 |
-
|
61 |
-
fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true);
|
62 |
-
fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true);
|
63 |
-
|
64 |
-
fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true);
|
65 |
-
fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true);
|
66 |
-
fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true);
|
67 |
-
fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true);
|
68 |
-
fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true);
|
69 |
-
fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true);
|
70 |
-
fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true);
|
71 |
-
fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true);
|
72 |
-
fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true);
|
73 |
-
|
74 |
-
fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true);
|
75 |
-
fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true);
|
76 |
-
fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true);
|
77 |
-
fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true);
|
78 |
-
fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true);
|
79 |
-
fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true);
|
80 |
-
fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true);
|
81 |
-
fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true);
|
82 |
-
fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true);
|
83 |
-
fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true);
|
84 |
-
fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true);
|
85 |
-
fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true);
|
86 |
-
|
87 |
-
fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true);
|
88 |
-
fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true);
|
89 |
-
fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true);
|
90 |
-
fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true);
|
91 |
-
|
92 |
-
fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true);
|
93 |
-
fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true);
|
94 |
-
fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true);
|
95 |
-
fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true);
|
96 |
-
|
97 |
-
fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true);
|
98 |
-
fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true);
|
99 |
-
fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true);
|
100 |
-
fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true);
|
101 |
-
|
102 |
-
fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true);
|
103 |
-
fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true);
|
104 |
-
|
105 |
-
fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true);
|
106 |
-
fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true);
|
107 |
-
|
108 |
-
fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true);
|
109 |
-
fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true);
|
110 |
-
fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true);
|
111 |
-
|
112 |
-
fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true);
|
113 |
-
fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true);
|
114 |
-
fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true);
|
115 |
-
fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true);
|
116 |
-
|
117 |
-
fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true);
|
118 |
-
fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true);
|
119 |
-
fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true);
|
120 |
-
fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true);
|
121 |
-
|
122 |
-
TinyMCE_EditableSelects.init();
|
123 |
-
setupFormData();
|
124 |
-
showDisabledControls();
|
125 |
-
}
|
126 |
-
|
127 |
-
function setupFormData() {
|
128 |
-
var ce = document.getElementById('container'), f = document.forms[0], s, b, i;
|
129 |
-
|
130 |
-
// Setup text fields
|
131 |
-
|
132 |
-
selectByValue(f, 'text_font', ce.style.fontFamily, true, true);
|
133 |
-
selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true);
|
134 |
-
selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize));
|
135 |
-
selectByValue(f, 'text_weight', ce.style.fontWeight, true, true);
|
136 |
-
selectByValue(f, 'text_style', ce.style.fontStyle, true, true);
|
137 |
-
selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true);
|
138 |
-
selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight));
|
139 |
-
selectByValue(f, 'text_case', ce.style.textTransform, true, true);
|
140 |
-
selectByValue(f, 'text_variant', ce.style.fontVariant, true, true);
|
141 |
-
f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color);
|
142 |
-
updateColor('text_color_pick', 'text_color');
|
143 |
-
f.text_underline.checked = inStr(ce.style.textDecoration, 'underline');
|
144 |
-
f.text_overline.checked = inStr(ce.style.textDecoration, 'overline');
|
145 |
-
f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through');
|
146 |
-
f.text_blink.checked = inStr(ce.style.textDecoration, 'blink');
|
147 |
-
|
148 |
-
// Setup background fields
|
149 |
-
|
150 |
-
f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor);
|
151 |
-
updateColor('background_color_pick', 'background_color');
|
152 |
-
f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
153 |
-
selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true);
|
154 |
-
selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true);
|
155 |
-
selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true);
|
156 |
-
selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0)));
|
157 |
-
selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true);
|
158 |
-
selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1)));
|
159 |
-
|
160 |
-
// Setup block fields
|
161 |
-
|
162 |
-
selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true);
|
163 |
-
selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing));
|
164 |
-
selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true);
|
165 |
-
selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing));
|
166 |
-
selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true);
|
167 |
-
selectByValue(f, 'block_text_align', ce.style.textAlign, true, true);
|
168 |
-
f.block_text_indent.value = getNum(ce.style.textIndent);
|
169 |
-
selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent));
|
170 |
-
selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true);
|
171 |
-
selectByValue(f, 'block_display', ce.style.display, true, true);
|
172 |
-
|
173 |
-
// Setup box fields
|
174 |
-
|
175 |
-
f.box_width.value = getNum(ce.style.width);
|
176 |
-
selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width));
|
177 |
-
|
178 |
-
f.box_height.value = getNum(ce.style.height);
|
179 |
-
selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height));
|
180 |
-
|
181 |
-
if (tinymce.isGecko)
|
182 |
-
selectByValue(f, 'box_float', ce.style.cssFloat, true, true);
|
183 |
-
else
|
184 |
-
selectByValue(f, 'box_float', ce.style.styleFloat, true, true);
|
185 |
-
|
186 |
-
selectByValue(f, 'box_clear', ce.style.clear, true, true);
|
187 |
-
|
188 |
-
setupBox(f, ce, 'box_padding', 'padding', '');
|
189 |
-
setupBox(f, ce, 'box_margin', 'margin', '');
|
190 |
-
|
191 |
-
// Setup border fields
|
192 |
-
|
193 |
-
setupBox(f, ce, 'border_style', 'border', 'Style');
|
194 |
-
setupBox(f, ce, 'border_width', 'border', 'Width');
|
195 |
-
setupBox(f, ce, 'border_color', 'border', 'Color');
|
196 |
-
|
197 |
-
updateColor('border_color_top_pick', 'border_color_top');
|
198 |
-
updateColor('border_color_right_pick', 'border_color_right');
|
199 |
-
updateColor('border_color_bottom_pick', 'border_color_bottom');
|
200 |
-
updateColor('border_color_left_pick', 'border_color_left');
|
201 |
-
|
202 |
-
f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value);
|
203 |
-
f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value);
|
204 |
-
f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value);
|
205 |
-
f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value);
|
206 |
-
|
207 |
-
// Setup list fields
|
208 |
-
|
209 |
-
selectByValue(f, 'list_type', ce.style.listStyleType, true, true);
|
210 |
-
selectByValue(f, 'list_position', ce.style.listStylePosition, true, true);
|
211 |
-
f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
212 |
-
|
213 |
-
// Setup box fields
|
214 |
-
|
215 |
-
selectByValue(f, 'positioning_type', ce.style.position, true, true);
|
216 |
-
selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true);
|
217 |
-
selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true);
|
218 |
-
f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : "";
|
219 |
-
|
220 |
-
f.positioning_width.value = getNum(ce.style.width);
|
221 |
-
selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width));
|
222 |
-
|
223 |
-
f.positioning_height.value = getNum(ce.style.height);
|
224 |
-
selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height));
|
225 |
-
|
226 |
-
setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']);
|
227 |
-
|
228 |
-
s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1");
|
229 |
-
s = s.replace(/,/g, ' ');
|
230 |
-
|
231 |
-
if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) {
|
232 |
-
f.positioning_clip_top.value = getNum(getVal(s, 0));
|
233 |
-
selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
|
234 |
-
f.positioning_clip_right.value = getNum(getVal(s, 1));
|
235 |
-
selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1)));
|
236 |
-
f.positioning_clip_bottom.value = getNum(getVal(s, 2));
|
237 |
-
selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2)));
|
238 |
-
f.positioning_clip_left.value = getNum(getVal(s, 3));
|
239 |
-
selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3)));
|
240 |
-
} else {
|
241 |
-
f.positioning_clip_top.value = getNum(getVal(s, 0));
|
242 |
-
selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
|
243 |
-
f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value;
|
244 |
-
}
|
245 |
-
|
246 |
-
// setupBox(f, ce, '', 'border', 'Color');
|
247 |
-
}
|
248 |
-
|
249 |
-
function getMeasurement(s) {
|
250 |
-
return s.replace(/^([0-9]+)(.*)$/, "$2");
|
251 |
-
}
|
252 |
-
|
253 |
-
function getNum(s) {
|
254 |
-
if (new RegExp('^[0-9]+[a-z%]+$', 'gi').test(s))
|
255 |
-
return s.replace(/[^0-9]/g, '');
|
256 |
-
|
257 |
-
return s;
|
258 |
-
}
|
259 |
-
|
260 |
-
function inStr(s, n) {
|
261 |
-
return new RegExp(n, 'gi').test(s);
|
262 |
-
}
|
263 |
-
|
264 |
-
function getVal(s, i) {
|
265 |
-
var a = s.split(' ');
|
266 |
-
|
267 |
-
if (a.length > 1)
|
268 |
-
return a[i];
|
269 |
-
|
270 |
-
return "";
|
271 |
-
}
|
272 |
-
|
273 |
-
function setValue(f, n, v) {
|
274 |
-
if (f.elements[n].type == "text")
|
275 |
-
f.elements[n].value = v;
|
276 |
-
else
|
277 |
-
selectByValue(f, n, v, true, true);
|
278 |
-
}
|
279 |
-
|
280 |
-
function setupBox(f, ce, fp, pr, sf, b) {
|
281 |
-
if (typeof(b) == "undefined")
|
282 |
-
b = ['Top', 'Right', 'Bottom', 'Left'];
|
283 |
-
|
284 |
-
if (isSame(ce, pr, sf, b)) {
|
285 |
-
f.elements[fp + "_same"].checked = true;
|
286 |
-
|
287 |
-
setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
|
288 |
-
f.elements[fp + "_top"].disabled = false;
|
289 |
-
|
290 |
-
f.elements[fp + "_right"].value = "";
|
291 |
-
f.elements[fp + "_right"].disabled = true;
|
292 |
-
f.elements[fp + "_bottom"].value = "";
|
293 |
-
f.elements[fp + "_bottom"].disabled = true;
|
294 |
-
f.elements[fp + "_left"].value = "";
|
295 |
-
f.elements[fp + "_left"].disabled = true;
|
296 |
-
|
297 |
-
if (f.elements[fp + "_top_measurement"]) {
|
298 |
-
selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
|
299 |
-
f.elements[fp + "_left_measurement"].disabled = true;
|
300 |
-
f.elements[fp + "_bottom_measurement"].disabled = true;
|
301 |
-
f.elements[fp + "_right_measurement"].disabled = true;
|
302 |
-
}
|
303 |
-
} else {
|
304 |
-
f.elements[fp + "_same"].checked = false;
|
305 |
-
|
306 |
-
setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
|
307 |
-
f.elements[fp + "_top"].disabled = false;
|
308 |
-
|
309 |
-
setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf]));
|
310 |
-
f.elements[fp + "_right"].disabled = false;
|
311 |
-
|
312 |
-
setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf]));
|
313 |
-
f.elements[fp + "_bottom"].disabled = false;
|
314 |
-
|
315 |
-
setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf]));
|
316 |
-
f.elements[fp + "_left"].disabled = false;
|
317 |
-
|
318 |
-
if (f.elements[fp + "_top_measurement"]) {
|
319 |
-
selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
|
320 |
-
selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf]));
|
321 |
-
selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf]));
|
322 |
-
selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf]));
|
323 |
-
f.elements[fp + "_left_measurement"].disabled = false;
|
324 |
-
f.elements[fp + "_bottom_measurement"].disabled = false;
|
325 |
-
f.elements[fp + "_right_measurement"].disabled = false;
|
326 |
-
}
|
327 |
-
}
|
328 |
-
}
|
329 |
-
|
330 |
-
function isSame(e, pr, sf, b) {
|
331 |
-
var a = [], i, x;
|
332 |
-
|
333 |
-
if (typeof(b) == "undefined")
|
334 |
-
b = ['Top', 'Right', 'Bottom', 'Left'];
|
335 |
-
|
336 |
-
if (typeof(sf) == "undefined" || sf == null)
|
337 |
-
sf = "";
|
338 |
-
|
339 |
-
a[0] = e.style[pr + b[0] + sf];
|
340 |
-
a[1] = e.style[pr + b[1] + sf];
|
341 |
-
a[2] = e.style[pr + b[2] + sf];
|
342 |
-
a[3] = e.style[pr + b[3] + sf];
|
343 |
-
|
344 |
-
for (i=0; i<a.length; i++) {
|
345 |
-
if (a[i] == null)
|
346 |
-
return false;
|
347 |
-
|
348 |
-
for (x=0; x<a.length; x++) {
|
349 |
-
if (a[x] != a[i])
|
350 |
-
return false;
|
351 |
-
}
|
352 |
-
}
|
353 |
-
|
354 |
-
return true;
|
355 |
-
};
|
356 |
-
|
357 |
-
function hasEqualValues(a) {
|
358 |
-
var i, x;
|
359 |
-
|
360 |
-
for (i=0; i<a.length; i++) {
|
361 |
-
if (a[i] == null)
|
362 |
-
return false;
|
363 |
-
|
364 |
-
for (x=0; x<a.length; x++) {
|
365 |
-
if (a[x] != a[i])
|
366 |
-
return false;
|
367 |
-
}
|
368 |
-
}
|
369 |
-
|
370 |
-
return true;
|
371 |
-
}
|
372 |
-
|
373 |
-
function applyAction() {
|
374 |
-
var ce = document.getElementById('container'), ed = tinyMCEPopup.editor;
|
375 |
-
|
376 |
-
generateCSS();
|
377 |
-
|
378 |
-
tinyMCEPopup.restoreSelection();
|
379 |
-
ed.dom.setAttrib(ed.selection.getNode(), 'style', tinyMCEPopup.editor.dom.serializeStyle(tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText)));
|
380 |
-
}
|
381 |
-
|
382 |
-
function updateAction() {
|
383 |
-
applyAction();
|
384 |
-
tinyMCEPopup.close();
|
385 |
-
}
|
386 |
-
|
387 |
-
function generateCSS() {
|
388 |
-
var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
|
389 |
-
|
390 |
-
ce.style.cssText = "";
|
391 |
-
|
392 |
-
// Build text styles
|
393 |
-
ce.style.fontFamily = f.text_font.value;
|
394 |
-
ce.style.fontSize = f.text_size.value + (isNum(f.text_size.value) ? (f.text_size_measurement.value || 'px') : "");
|
395 |
-
ce.style.fontStyle = f.text_style.value;
|
396 |
-
ce.style.lineHeight = f.text_lineheight.value + (isNum(f.text_lineheight.value) ? f.text_lineheight_measurement.value : "");
|
397 |
-
ce.style.textTransform = f.text_case.value;
|
398 |
-
ce.style.fontWeight = f.text_weight.value;
|
399 |
-
ce.style.fontVariant = f.text_variant.value;
|
400 |
-
ce.style.color = f.text_color.value;
|
401 |
-
|
402 |
-
s = "";
|
403 |
-
s += f.text_underline.checked ? " underline" : "";
|
404 |
-
s += f.text_overline.checked ? " overline" : "";
|
405 |
-
s += f.text_linethrough.checked ? " line-through" : "";
|
406 |
-
s += f.text_blink.checked ? " blink" : "";
|
407 |
-
s = s.length > 0 ? s.substring(1) : s;
|
408 |
-
|
409 |
-
if (f.text_none.checked)
|
410 |
-
s = "none";
|
411 |
-
|
412 |
-
ce.style.textDecoration = s;
|
413 |
-
|
414 |
-
// Build background styles
|
415 |
-
|
416 |
-
ce.style.backgroundColor = f.background_color.value;
|
417 |
-
ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : "";
|
418 |
-
ce.style.backgroundRepeat = f.background_repeat.value;
|
419 |
-
ce.style.backgroundAttachment = f.background_attachment.value;
|
420 |
-
|
421 |
-
if (f.background_hpos.value != "") {
|
422 |
-
s = "";
|
423 |
-
s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " ";
|
424 |
-
s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : "");
|
425 |
-
ce.style.backgroundPosition = s;
|
426 |
-
}
|
427 |
-
|
428 |
-
// Build block styles
|
429 |
-
|
430 |
-
ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : "");
|
431 |
-
ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : "");
|
432 |
-
ce.style.verticalAlign = f.block_vertical_alignment.value;
|
433 |
-
ce.style.textAlign = f.block_text_align.value;
|
434 |
-
ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : "");
|
435 |
-
ce.style.whiteSpace = f.block_whitespace.value;
|
436 |
-
ce.style.display = f.block_display.value;
|
437 |
-
|
438 |
-
// Build box styles
|
439 |
-
|
440 |
-
ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : "");
|
441 |
-
ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : "");
|
442 |
-
ce.style.styleFloat = f.box_float.value;
|
443 |
-
|
444 |
-
if (tinymce.isGecko)
|
445 |
-
ce.style.cssFloat = f.box_float.value;
|
446 |
-
|
447 |
-
ce.style.clear = f.box_clear.value;
|
448 |
-
|
449 |
-
if (!f.box_padding_same.checked) {
|
450 |
-
ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
|
451 |
-
ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : "");
|
452 |
-
ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : "");
|
453 |
-
ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : "");
|
454 |
-
} else
|
455 |
-
ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
|
456 |
-
|
457 |
-
if (!f.box_margin_same.checked) {
|
458 |
-
ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
|
459 |
-
ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : "");
|
460 |
-
ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : "");
|
461 |
-
ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : "");
|
462 |
-
} else
|
463 |
-
ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
|
464 |
-
|
465 |
-
// Build border styles
|
466 |
-
|
467 |
-
if (!f.border_style_same.checked) {
|
468 |
-
ce.style.borderTopStyle = f.border_style_top.value;
|
469 |
-
ce.style.borderRightStyle = f.border_style_right.value;
|
470 |
-
ce.style.borderBottomStyle = f.border_style_bottom.value;
|
471 |
-
ce.style.borderLeftStyle = f.border_style_left.value;
|
472 |
-
} else
|
473 |
-
ce.style.borderStyle = f.border_style_top.value;
|
474 |
-
|
475 |
-
if (!f.border_width_same.checked) {
|
476 |
-
ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
|
477 |
-
ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : "");
|
478 |
-
ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : "");
|
479 |
-
ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : "");
|
480 |
-
} else
|
481 |
-
ce.style.borderWidth = f.border_width_top.value;
|
482 |
-
|
483 |
-
if (!f.border_color_same.checked) {
|
484 |
-
ce.style.borderTopColor = f.border_color_top.value;
|
485 |
-
ce.style.borderRightColor = f.border_color_right.value;
|
486 |
-
ce.style.borderBottomColor = f.border_color_bottom.value;
|
487 |
-
ce.style.borderLeftColor = f.border_color_left.value;
|
488 |
-
} else
|
489 |
-
ce.style.borderColor = f.border_color_top.value;
|
490 |
-
|
491 |
-
// Build list styles
|
492 |
-
|
493 |
-
ce.style.listStyleType = f.list_type.value;
|
494 |
-
ce.style.listStylePosition = f.list_position.value;
|
495 |
-
ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : "";
|
496 |
-
|
497 |
-
// Build positioning styles
|
498 |
-
|
499 |
-
ce.style.position = f.positioning_type.value;
|
500 |
-
ce.style.visibility = f.positioning_visibility.value;
|
501 |
-
|
502 |
-
if (ce.style.width == "")
|
503 |
-
ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : "");
|
504 |
-
|
505 |
-
if (ce.style.height == "")
|
506 |
-
ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : "");
|
507 |
-
|
508 |
-
ce.style.zIndex = f.positioning_zindex.value;
|
509 |
-
ce.style.overflow = f.positioning_overflow.value;
|
510 |
-
|
511 |
-
if (!f.positioning_placement_same.checked) {
|
512 |
-
ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
|
513 |
-
ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : "");
|
514 |
-
ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : "");
|
515 |
-
ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : "");
|
516 |
-
} else {
|
517 |
-
s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
|
518 |
-
ce.style.top = s;
|
519 |
-
ce.style.right = s;
|
520 |
-
ce.style.bottom = s;
|
521 |
-
ce.style.left = s;
|
522 |
-
}
|
523 |
-
|
524 |
-
if (!f.positioning_clip_same.checked) {
|
525 |
-
s = "rect(";
|
526 |
-
s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " ";
|
527 |
-
s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " ";
|
528 |
-
s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " ";
|
529 |
-
s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto");
|
530 |
-
s += ")";
|
531 |
-
|
532 |
-
if (s != "rect(auto auto auto auto)")
|
533 |
-
ce.style.clip = s;
|
534 |
-
} else {
|
535 |
-
s = "rect(";
|
536 |
-
t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto";
|
537 |
-
s += t + " ";
|
538 |
-
s += t + " ";
|
539 |
-
s += t + " ";
|
540 |
-
s += t + ")";
|
541 |
-
|
542 |
-
if (s != "rect(auto auto auto auto)")
|
543 |
-
ce.style.clip = s;
|
544 |
-
}
|
545 |
-
|
546 |
-
ce.style.cssText = ce.style.cssText;
|
547 |
-
}
|
548 |
-
|
549 |
-
function isNum(s) {
|
550 |
-
return new RegExp('[0-9]+', 'g').test(s);
|
551 |
-
}
|
552 |
-
|
553 |
-
function showDisabledControls() {
|
554 |
-
var f = document.forms, i, a;
|
555 |
-
|
556 |
-
for (i=0; i<f.length; i++) {
|
557 |
-
for (a=0; a<f[i].elements.length; a++) {
|
558 |
-
if (f[i].elements[a].disabled)
|
559 |
-
tinyMCEPopup.editor.dom.addClass(f[i].elements[a], "disabled");
|
560 |
-
else
|
561 |
-
tinyMCEPopup.editor.dom.removeClass(f[i].elements[a], "disabled");
|
562 |
-
}
|
563 |
-
}
|
564 |
-
}
|
565 |
-
|
566 |
-
function fillSelect(f, s, param, dval, sep, em) {
|
567 |
-
var i, ar, p, se;
|
568 |
-
|
569 |
-
f = document.forms[f];
|
570 |
-
sep = typeof(sep) == "undefined" ? ";" : sep;
|
571 |
-
|
572 |
-
if (em)
|
573 |
-
addSelectValue(f, s, "", "");
|
574 |
-
|
575 |
-
ar = tinyMCEPopup.getParam(param, dval).split(sep);
|
576 |
-
for (i=0; i<ar.length; i++) {
|
577 |
-
se = false;
|
578 |
-
|
579 |
-
if (ar[i].charAt(0) == '+') {
|
580 |
-
ar[i] = ar[i].substring(1);
|
581 |
-
se = true;
|
582 |
-
}
|
583 |
-
|
584 |
-
p = ar[i].split('=');
|
585 |
-
|
586 |
-
if (p.length > 1) {
|
587 |
-
addSelectValue(f, s, p[0], p[1]);
|
588 |
-
|
589 |
-
if (se)
|
590 |
-
selectByValue(f, s, p[1]);
|
591 |
-
} else {
|
592 |
-
addSelectValue(f, s, p[0], p[0]);
|
593 |
-
|
594 |
-
if (se)
|
595 |
-
selectByValue(f, s, p[0]);
|
596 |
-
}
|
597 |
-
}
|
598 |
-
}
|
599 |
-
|
600 |
-
function toggleSame(ce, pre) {
|
601 |
-
var el = document.forms[0].elements, i;
|
602 |
-
|
603 |
-
if (ce.checked) {
|
604 |
-
el[pre + "_top"].disabled = false;
|
605 |
-
el[pre + "_right"].disabled = true;
|
606 |
-
el[pre + "_bottom"].disabled = true;
|
607 |
-
el[pre + "_left"].disabled = true;
|
608 |
-
|
609 |
-
if (el[pre + "_top_measurement"]) {
|
610 |
-
el[pre + "_top_measurement"].disabled = false;
|
611 |
-
el[pre + "_right_measurement"].disabled = true;
|
612 |
-
el[pre + "_bottom_measurement"].disabled = true;
|
613 |
-
el[pre + "_left_measurement"].disabled = true;
|
614 |
-
}
|
615 |
-
} else {
|
616 |
-
el[pre + "_top"].disabled = false;
|
617 |
-
el[pre + "_right"].disabled = false;
|
618 |
-
el[pre + "_bottom"].disabled = false;
|
619 |
-
el[pre + "_left"].disabled = false;
|
620 |
-
|
621 |
-
if (el[pre + "_top_measurement"]) {
|
622 |
-
el[pre + "_top_measurement"].disabled = false;
|
623 |
-
el[pre + "_right_measurement"].disabled = false;
|
624 |
-
el[pre + "_bottom_measurement"].disabled = false;
|
625 |
-
el[pre + "_left_measurement"].disabled = false;
|
626 |
-
}
|
627 |
-
}
|
628 |
-
|
629 |
-
showDisabledControls();
|
630 |
-
}
|
631 |
-
|
632 |
-
function synch(fr, to) {
|
633 |
-
var f = document.forms[0];
|
634 |
-
|
635 |
-
f.elements[to].value = f.elements[fr].value;
|
636 |
-
|
637 |
-
if (f.elements[fr + "_measurement"])
|
638 |
-
selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value);
|
639 |
-
}
|
640 |
-
|
641 |
-
tinyMCEPopup.onInit.add(init);
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
var defaultFonts = "" +
|
4 |
+
"Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" +
|
5 |
+
"Times New Roman, Times, serif=Times New Roman, Times, serif;" +
|
6 |
+
"Courier New, Courier, mono=Courier New, Courier, mono;" +
|
7 |
+
"Times New Roman, Times, serif=Times New Roman, Times, serif;" +
|
8 |
+
"Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" +
|
9 |
+
"Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" +
|
10 |
+
"Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif";
|
11 |
+
|
12 |
+
var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger";
|
13 |
+
var defaultMeasurement = "+pixels=px;points=pt;em;in;cm;mm;picas;ems;exs;%";
|
14 |
+
var defaultSpacingMeasurement = "pixels=px;points=pt;in;cm;mm;picas;+ems;exs;%";
|
15 |
+
var defaultIndentMeasurement = "pixels=px;+points=pt;in;cm;mm;picas;ems;exs;%";
|
16 |
+
var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900";
|
17 |
+
var defaultTextStyle = "normal;italic;oblique";
|
18 |
+
var defaultVariant = "normal;small-caps";
|
19 |
+
var defaultLineHeight = "normal";
|
20 |
+
var defaultAttachment = "fixed;scroll";
|
21 |
+
var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y";
|
22 |
+
var defaultPosH = "left;center;right";
|
23 |
+
var defaultPosV = "top;center;bottom";
|
24 |
+
var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom";
|
25 |
+
var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none";
|
26 |
+
var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset";
|
27 |
+
var defaultBorderWidth = "thin;medium;thick";
|
28 |
+
var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none";
|
29 |
+
|
30 |
+
function init() {
|
31 |
+
var ce = document.getElementById('container'), h;
|
32 |
+
|
33 |
+
ce.style.cssText = tinyMCEPopup.getWindowArg('style_text');
|
34 |
+
|
35 |
+
h = getBrowserHTML('background_image_browser','background_image','image','advimage');
|
36 |
+
document.getElementById("background_image_browser").innerHTML = h;
|
37 |
+
|
38 |
+
document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color');
|
39 |
+
document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color');
|
40 |
+
document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top');
|
41 |
+
document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right');
|
42 |
+
document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom');
|
43 |
+
document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left');
|
44 |
+
|
45 |
+
fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true);
|
46 |
+
fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true);
|
47 |
+
fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true);
|
48 |
+
fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true);
|
49 |
+
fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true);
|
50 |
+
fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true);
|
51 |
+
fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true);
|
52 |
+
fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true);
|
53 |
+
fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true);
|
54 |
+
|
55 |
+
fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true);
|
56 |
+
fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true);
|
57 |
+
|
58 |
+
fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true);
|
59 |
+
fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true);
|
60 |
+
|
61 |
+
fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true);
|
62 |
+
fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true);
|
63 |
+
|
64 |
+
fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true);
|
65 |
+
fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true);
|
66 |
+
fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true);
|
67 |
+
fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true);
|
68 |
+
fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true);
|
69 |
+
fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true);
|
70 |
+
fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true);
|
71 |
+
fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true);
|
72 |
+
fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true);
|
73 |
+
|
74 |
+
fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true);
|
75 |
+
fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true);
|
76 |
+
fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true);
|
77 |
+
fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true);
|
78 |
+
fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true);
|
79 |
+
fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true);
|
80 |
+
fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true);
|
81 |
+
fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true);
|
82 |
+
fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true);
|
83 |
+
fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true);
|
84 |
+
fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true);
|
85 |
+
fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true);
|
86 |
+
|
87 |
+
fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true);
|
88 |
+
fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true);
|
89 |
+
fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true);
|
90 |
+
fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true);
|
91 |
+
|
92 |
+
fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true);
|
93 |
+
fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true);
|
94 |
+
fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true);
|
95 |
+
fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true);
|
96 |
+
|
97 |
+
fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true);
|
98 |
+
fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true);
|
99 |
+
fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true);
|
100 |
+
fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true);
|
101 |
+
|
102 |
+
fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true);
|
103 |
+
fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true);
|
104 |
+
|
105 |
+
fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true);
|
106 |
+
fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true);
|
107 |
+
|
108 |
+
fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true);
|
109 |
+
fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true);
|
110 |
+
fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true);
|
111 |
+
|
112 |
+
fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true);
|
113 |
+
fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true);
|
114 |
+
fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true);
|
115 |
+
fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true);
|
116 |
+
|
117 |
+
fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true);
|
118 |
+
fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true);
|
119 |
+
fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true);
|
120 |
+
fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true);
|
121 |
+
|
122 |
+
TinyMCE_EditableSelects.init();
|
123 |
+
setupFormData();
|
124 |
+
showDisabledControls();
|
125 |
+
}
|
126 |
+
|
127 |
+
function setupFormData() {
|
128 |
+
var ce = document.getElementById('container'), f = document.forms[0], s, b, i;
|
129 |
+
|
130 |
+
// Setup text fields
|
131 |
+
|
132 |
+
selectByValue(f, 'text_font', ce.style.fontFamily, true, true);
|
133 |
+
selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true);
|
134 |
+
selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize));
|
135 |
+
selectByValue(f, 'text_weight', ce.style.fontWeight, true, true);
|
136 |
+
selectByValue(f, 'text_style', ce.style.fontStyle, true, true);
|
137 |
+
selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true);
|
138 |
+
selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight));
|
139 |
+
selectByValue(f, 'text_case', ce.style.textTransform, true, true);
|
140 |
+
selectByValue(f, 'text_variant', ce.style.fontVariant, true, true);
|
141 |
+
f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color);
|
142 |
+
updateColor('text_color_pick', 'text_color');
|
143 |
+
f.text_underline.checked = inStr(ce.style.textDecoration, 'underline');
|
144 |
+
f.text_overline.checked = inStr(ce.style.textDecoration, 'overline');
|
145 |
+
f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through');
|
146 |
+
f.text_blink.checked = inStr(ce.style.textDecoration, 'blink');
|
147 |
+
|
148 |
+
// Setup background fields
|
149 |
+
|
150 |
+
f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor);
|
151 |
+
updateColor('background_color_pick', 'background_color');
|
152 |
+
f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
153 |
+
selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true);
|
154 |
+
selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true);
|
155 |
+
selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true);
|
156 |
+
selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0)));
|
157 |
+
selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true);
|
158 |
+
selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1)));
|
159 |
+
|
160 |
+
// Setup block fields
|
161 |
+
|
162 |
+
selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true);
|
163 |
+
selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing));
|
164 |
+
selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true);
|
165 |
+
selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing));
|
166 |
+
selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true);
|
167 |
+
selectByValue(f, 'block_text_align', ce.style.textAlign, true, true);
|
168 |
+
f.block_text_indent.value = getNum(ce.style.textIndent);
|
169 |
+
selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent));
|
170 |
+
selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true);
|
171 |
+
selectByValue(f, 'block_display', ce.style.display, true, true);
|
172 |
+
|
173 |
+
// Setup box fields
|
174 |
+
|
175 |
+
f.box_width.value = getNum(ce.style.width);
|
176 |
+
selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width));
|
177 |
+
|
178 |
+
f.box_height.value = getNum(ce.style.height);
|
179 |
+
selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height));
|
180 |
+
|
181 |
+
if (tinymce.isGecko)
|
182 |
+
selectByValue(f, 'box_float', ce.style.cssFloat, true, true);
|
183 |
+
else
|
184 |
+
selectByValue(f, 'box_float', ce.style.styleFloat, true, true);
|
185 |
+
|
186 |
+
selectByValue(f, 'box_clear', ce.style.clear, true, true);
|
187 |
+
|
188 |
+
setupBox(f, ce, 'box_padding', 'padding', '');
|
189 |
+
setupBox(f, ce, 'box_margin', 'margin', '');
|
190 |
+
|
191 |
+
// Setup border fields
|
192 |
+
|
193 |
+
setupBox(f, ce, 'border_style', 'border', 'Style');
|
194 |
+
setupBox(f, ce, 'border_width', 'border', 'Width');
|
195 |
+
setupBox(f, ce, 'border_color', 'border', 'Color');
|
196 |
+
|
197 |
+
updateColor('border_color_top_pick', 'border_color_top');
|
198 |
+
updateColor('border_color_right_pick', 'border_color_right');
|
199 |
+
updateColor('border_color_bottom_pick', 'border_color_bottom');
|
200 |
+
updateColor('border_color_left_pick', 'border_color_left');
|
201 |
+
|
202 |
+
f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value);
|
203 |
+
f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value);
|
204 |
+
f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value);
|
205 |
+
f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value);
|
206 |
+
|
207 |
+
// Setup list fields
|
208 |
+
|
209 |
+
selectByValue(f, 'list_type', ce.style.listStyleType, true, true);
|
210 |
+
selectByValue(f, 'list_position', ce.style.listStylePosition, true, true);
|
211 |
+
f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
212 |
+
|
213 |
+
// Setup box fields
|
214 |
+
|
215 |
+
selectByValue(f, 'positioning_type', ce.style.position, true, true);
|
216 |
+
selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true);
|
217 |
+
selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true);
|
218 |
+
f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : "";
|
219 |
+
|
220 |
+
f.positioning_width.value = getNum(ce.style.width);
|
221 |
+
selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width));
|
222 |
+
|
223 |
+
f.positioning_height.value = getNum(ce.style.height);
|
224 |
+
selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height));
|
225 |
+
|
226 |
+
setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']);
|
227 |
+
|
228 |
+
s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1");
|
229 |
+
s = s.replace(/,/g, ' ');
|
230 |
+
|
231 |
+
if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) {
|
232 |
+
f.positioning_clip_top.value = getNum(getVal(s, 0));
|
233 |
+
selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
|
234 |
+
f.positioning_clip_right.value = getNum(getVal(s, 1));
|
235 |
+
selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1)));
|
236 |
+
f.positioning_clip_bottom.value = getNum(getVal(s, 2));
|
237 |
+
selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2)));
|
238 |
+
f.positioning_clip_left.value = getNum(getVal(s, 3));
|
239 |
+
selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3)));
|
240 |
+
} else {
|
241 |
+
f.positioning_clip_top.value = getNum(getVal(s, 0));
|
242 |
+
selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
|
243 |
+
f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value;
|
244 |
+
}
|
245 |
+
|
246 |
+
// setupBox(f, ce, '', 'border', 'Color');
|
247 |
+
}
|
248 |
+
|
249 |
+
function getMeasurement(s) {
|
250 |
+
return s.replace(/^([0-9]+)(.*)$/, "$2");
|
251 |
+
}
|
252 |
+
|
253 |
+
function getNum(s) {
|
254 |
+
if (new RegExp('^[0-9]+[a-z%]+$', 'gi').test(s))
|
255 |
+
return s.replace(/[^0-9]/g, '');
|
256 |
+
|
257 |
+
return s;
|
258 |
+
}
|
259 |
+
|
260 |
+
function inStr(s, n) {
|
261 |
+
return new RegExp(n, 'gi').test(s);
|
262 |
+
}
|
263 |
+
|
264 |
+
function getVal(s, i) {
|
265 |
+
var a = s.split(' ');
|
266 |
+
|
267 |
+
if (a.length > 1)
|
268 |
+
return a[i];
|
269 |
+
|
270 |
+
return "";
|
271 |
+
}
|
272 |
+
|
273 |
+
function setValue(f, n, v) {
|
274 |
+
if (f.elements[n].type == "text")
|
275 |
+
f.elements[n].value = v;
|
276 |
+
else
|
277 |
+
selectByValue(f, n, v, true, true);
|
278 |
+
}
|
279 |
+
|
280 |
+
function setupBox(f, ce, fp, pr, sf, b) {
|
281 |
+
if (typeof(b) == "undefined")
|
282 |
+
b = ['Top', 'Right', 'Bottom', 'Left'];
|
283 |
+
|
284 |
+
if (isSame(ce, pr, sf, b)) {
|
285 |
+
f.elements[fp + "_same"].checked = true;
|
286 |
+
|
287 |
+
setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
|
288 |
+
f.elements[fp + "_top"].disabled = false;
|
289 |
+
|
290 |
+
f.elements[fp + "_right"].value = "";
|
291 |
+
f.elements[fp + "_right"].disabled = true;
|
292 |
+
f.elements[fp + "_bottom"].value = "";
|
293 |
+
f.elements[fp + "_bottom"].disabled = true;
|
294 |
+
f.elements[fp + "_left"].value = "";
|
295 |
+
f.elements[fp + "_left"].disabled = true;
|
296 |
+
|
297 |
+
if (f.elements[fp + "_top_measurement"]) {
|
298 |
+
selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
|
299 |
+
f.elements[fp + "_left_measurement"].disabled = true;
|
300 |
+
f.elements[fp + "_bottom_measurement"].disabled = true;
|
301 |
+
f.elements[fp + "_right_measurement"].disabled = true;
|
302 |
+
}
|
303 |
+
} else {
|
304 |
+
f.elements[fp + "_same"].checked = false;
|
305 |
+
|
306 |
+
setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
|
307 |
+
f.elements[fp + "_top"].disabled = false;
|
308 |
+
|
309 |
+
setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf]));
|
310 |
+
f.elements[fp + "_right"].disabled = false;
|
311 |
+
|
312 |
+
setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf]));
|
313 |
+
f.elements[fp + "_bottom"].disabled = false;
|
314 |
+
|
315 |
+
setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf]));
|
316 |
+
f.elements[fp + "_left"].disabled = false;
|
317 |
+
|
318 |
+
if (f.elements[fp + "_top_measurement"]) {
|
319 |
+
selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
|
320 |
+
selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf]));
|
321 |
+
selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf]));
|
322 |
+
selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf]));
|
323 |
+
f.elements[fp + "_left_measurement"].disabled = false;
|
324 |
+
f.elements[fp + "_bottom_measurement"].disabled = false;
|
325 |
+
f.elements[fp + "_right_measurement"].disabled = false;
|
326 |
+
}
|
327 |
+
}
|
328 |
+
}
|
329 |
+
|
330 |
+
function isSame(e, pr, sf, b) {
|
331 |
+
var a = [], i, x;
|
332 |
+
|
333 |
+
if (typeof(b) == "undefined")
|
334 |
+
b = ['Top', 'Right', 'Bottom', 'Left'];
|
335 |
+
|
336 |
+
if (typeof(sf) == "undefined" || sf == null)
|
337 |
+
sf = "";
|
338 |
+
|
339 |
+
a[0] = e.style[pr + b[0] + sf];
|
340 |
+
a[1] = e.style[pr + b[1] + sf];
|
341 |
+
a[2] = e.style[pr + b[2] + sf];
|
342 |
+
a[3] = e.style[pr + b[3] + sf];
|
343 |
+
|
344 |
+
for (i=0; i<a.length; i++) {
|
345 |
+
if (a[i] == null)
|
346 |
+
return false;
|
347 |
+
|
348 |
+
for (x=0; x<a.length; x++) {
|
349 |
+
if (a[x] != a[i])
|
350 |
+
return false;
|
351 |
+
}
|
352 |
+
}
|
353 |
+
|
354 |
+
return true;
|
355 |
+
};
|
356 |
+
|
357 |
+
function hasEqualValues(a) {
|
358 |
+
var i, x;
|
359 |
+
|
360 |
+
for (i=0; i<a.length; i++) {
|
361 |
+
if (a[i] == null)
|
362 |
+
return false;
|
363 |
+
|
364 |
+
for (x=0; x<a.length; x++) {
|
365 |
+
if (a[x] != a[i])
|
366 |
+
return false;
|
367 |
+
}
|
368 |
+
}
|
369 |
+
|
370 |
+
return true;
|
371 |
+
}
|
372 |
+
|
373 |
+
function applyAction() {
|
374 |
+
var ce = document.getElementById('container'), ed = tinyMCEPopup.editor;
|
375 |
+
|
376 |
+
generateCSS();
|
377 |
+
|
378 |
+
tinyMCEPopup.restoreSelection();
|
379 |
+
ed.dom.setAttrib(ed.selection.getNode(), 'style', tinyMCEPopup.editor.dom.serializeStyle(tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText)));
|
380 |
+
}
|
381 |
+
|
382 |
+
function updateAction() {
|
383 |
+
applyAction();
|
384 |
+
tinyMCEPopup.close();
|
385 |
+
}
|
386 |
+
|
387 |
+
function generateCSS() {
|
388 |
+
var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
|
389 |
+
|
390 |
+
ce.style.cssText = "";
|
391 |
+
|
392 |
+
// Build text styles
|
393 |
+
ce.style.fontFamily = f.text_font.value;
|
394 |
+
ce.style.fontSize = f.text_size.value + (isNum(f.text_size.value) ? (f.text_size_measurement.value || 'px') : "");
|
395 |
+
ce.style.fontStyle = f.text_style.value;
|
396 |
+
ce.style.lineHeight = f.text_lineheight.value + (isNum(f.text_lineheight.value) ? f.text_lineheight_measurement.value : "");
|
397 |
+
ce.style.textTransform = f.text_case.value;
|
398 |
+
ce.style.fontWeight = f.text_weight.value;
|
399 |
+
ce.style.fontVariant = f.text_variant.value;
|
400 |
+
ce.style.color = f.text_color.value;
|
401 |
+
|
402 |
+
s = "";
|
403 |
+
s += f.text_underline.checked ? " underline" : "";
|
404 |
+
s += f.text_overline.checked ? " overline" : "";
|
405 |
+
s += f.text_linethrough.checked ? " line-through" : "";
|
406 |
+
s += f.text_blink.checked ? " blink" : "";
|
407 |
+
s = s.length > 0 ? s.substring(1) : s;
|
408 |
+
|
409 |
+
if (f.text_none.checked)
|
410 |
+
s = "none";
|
411 |
+
|
412 |
+
ce.style.textDecoration = s;
|
413 |
+
|
414 |
+
// Build background styles
|
415 |
+
|
416 |
+
ce.style.backgroundColor = f.background_color.value;
|
417 |
+
ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : "";
|
418 |
+
ce.style.backgroundRepeat = f.background_repeat.value;
|
419 |
+
ce.style.backgroundAttachment = f.background_attachment.value;
|
420 |
+
|
421 |
+
if (f.background_hpos.value != "") {
|
422 |
+
s = "";
|
423 |
+
s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " ";
|
424 |
+
s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : "");
|
425 |
+
ce.style.backgroundPosition = s;
|
426 |
+
}
|
427 |
+
|
428 |
+
// Build block styles
|
429 |
+
|
430 |
+
ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : "");
|
431 |
+
ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : "");
|
432 |
+
ce.style.verticalAlign = f.block_vertical_alignment.value;
|
433 |
+
ce.style.textAlign = f.block_text_align.value;
|
434 |
+
ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : "");
|
435 |
+
ce.style.whiteSpace = f.block_whitespace.value;
|
436 |
+
ce.style.display = f.block_display.value;
|
437 |
+
|
438 |
+
// Build box styles
|
439 |
+
|
440 |
+
ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : "");
|
441 |
+
ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : "");
|
442 |
+
ce.style.styleFloat = f.box_float.value;
|
443 |
+
|
444 |
+
if (tinymce.isGecko)
|
445 |
+
ce.style.cssFloat = f.box_float.value;
|
446 |
+
|
447 |
+
ce.style.clear = f.box_clear.value;
|
448 |
+
|
449 |
+
if (!f.box_padding_same.checked) {
|
450 |
+
ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
|
451 |
+
ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : "");
|
452 |
+
ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : "");
|
453 |
+
ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : "");
|
454 |
+
} else
|
455 |
+
ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
|
456 |
+
|
457 |
+
if (!f.box_margin_same.checked) {
|
458 |
+
ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
|
459 |
+
ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : "");
|
460 |
+
ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : "");
|
461 |
+
ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : "");
|
462 |
+
} else
|
463 |
+
ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
|
464 |
+
|
465 |
+
// Build border styles
|
466 |
+
|
467 |
+
if (!f.border_style_same.checked) {
|
468 |
+
ce.style.borderTopStyle = f.border_style_top.value;
|
469 |
+
ce.style.borderRightStyle = f.border_style_right.value;
|
470 |
+
ce.style.borderBottomStyle = f.border_style_bottom.value;
|
471 |
+
ce.style.borderLeftStyle = f.border_style_left.value;
|
472 |
+
} else
|
473 |
+
ce.style.borderStyle = f.border_style_top.value;
|
474 |
+
|
475 |
+
if (!f.border_width_same.checked) {
|
476 |
+
ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
|
477 |
+
ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : "");
|
478 |
+
ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : "");
|
479 |
+
ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : "");
|
480 |
+
} else
|
481 |
+
ce.style.borderWidth = f.border_width_top.value;
|
482 |
+
|
483 |
+
if (!f.border_color_same.checked) {
|
484 |
+
ce.style.borderTopColor = f.border_color_top.value;
|
485 |
+
ce.style.borderRightColor = f.border_color_right.value;
|
486 |
+
ce.style.borderBottomColor = f.border_color_bottom.value;
|
487 |
+
ce.style.borderLeftColor = f.border_color_left.value;
|
488 |
+
} else
|
489 |
+
ce.style.borderColor = f.border_color_top.value;
|
490 |
+
|
491 |
+
// Build list styles
|
492 |
+
|
493 |
+
ce.style.listStyleType = f.list_type.value;
|
494 |
+
ce.style.listStylePosition = f.list_position.value;
|
495 |
+
ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : "";
|
496 |
+
|
497 |
+
// Build positioning styles
|
498 |
+
|
499 |
+
ce.style.position = f.positioning_type.value;
|
500 |
+
ce.style.visibility = f.positioning_visibility.value;
|
501 |
+
|
502 |
+
if (ce.style.width == "")
|
503 |
+
ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : "");
|
504 |
+
|
505 |
+
if (ce.style.height == "")
|
506 |
+
ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : "");
|
507 |
+
|
508 |
+
ce.style.zIndex = f.positioning_zindex.value;
|
509 |
+
ce.style.overflow = f.positioning_overflow.value;
|
510 |
+
|
511 |
+
if (!f.positioning_placement_same.checked) {
|
512 |
+
ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
|
513 |
+
ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : "");
|
514 |
+
ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : "");
|
515 |
+
ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : "");
|
516 |
+
} else {
|
517 |
+
s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
|
518 |
+
ce.style.top = s;
|
519 |
+
ce.style.right = s;
|
520 |
+
ce.style.bottom = s;
|
521 |
+
ce.style.left = s;
|
522 |
+
}
|
523 |
+
|
524 |
+
if (!f.positioning_clip_same.checked) {
|
525 |
+
s = "rect(";
|
526 |
+
s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " ";
|
527 |
+
s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " ";
|
528 |
+
s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " ";
|
529 |
+
s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto");
|
530 |
+
s += ")";
|
531 |
+
|
532 |
+
if (s != "rect(auto auto auto auto)")
|
533 |
+
ce.style.clip = s;
|
534 |
+
} else {
|
535 |
+
s = "rect(";
|
536 |
+
t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto";
|
537 |
+
s += t + " ";
|
538 |
+
s += t + " ";
|
539 |
+
s += t + " ";
|
540 |
+
s += t + ")";
|
541 |
+
|
542 |
+
if (s != "rect(auto auto auto auto)")
|
543 |
+
ce.style.clip = s;
|
544 |
+
}
|
545 |
+
|
546 |
+
ce.style.cssText = ce.style.cssText;
|
547 |
+
}
|
548 |
+
|
549 |
+
function isNum(s) {
|
550 |
+
return new RegExp('[0-9]+', 'g').test(s);
|
551 |
+
}
|
552 |
+
|
553 |
+
function showDisabledControls() {
|
554 |
+
var f = document.forms, i, a;
|
555 |
+
|
556 |
+
for (i=0; i<f.length; i++) {
|
557 |
+
for (a=0; a<f[i].elements.length; a++) {
|
558 |
+
if (f[i].elements[a].disabled)
|
559 |
+
tinyMCEPopup.editor.dom.addClass(f[i].elements[a], "disabled");
|
560 |
+
else
|
561 |
+
tinyMCEPopup.editor.dom.removeClass(f[i].elements[a], "disabled");
|
562 |
+
}
|
563 |
+
}
|
564 |
+
}
|
565 |
+
|
566 |
+
function fillSelect(f, s, param, dval, sep, em) {
|
567 |
+
var i, ar, p, se;
|
568 |
+
|
569 |
+
f = document.forms[f];
|
570 |
+
sep = typeof(sep) == "undefined" ? ";" : sep;
|
571 |
+
|
572 |
+
if (em)
|
573 |
+
addSelectValue(f, s, "", "");
|
574 |
+
|
575 |
+
ar = tinyMCEPopup.getParam(param, dval).split(sep);
|
576 |
+
for (i=0; i<ar.length; i++) {
|
577 |
+
se = false;
|
578 |
+
|
579 |
+
if (ar[i].charAt(0) == '+') {
|
580 |
+
ar[i] = ar[i].substring(1);
|
581 |
+
se = true;
|
582 |
+
}
|
583 |
+
|
584 |
+
p = ar[i].split('=');
|
585 |
+
|
586 |
+
if (p.length > 1) {
|
587 |
+
addSelectValue(f, s, p[0], p[1]);
|
588 |
+
|
589 |
+
if (se)
|
590 |
+
selectByValue(f, s, p[1]);
|
591 |
+
} else {
|
592 |
+
addSelectValue(f, s, p[0], p[0]);
|
593 |
+
|
594 |
+
if (se)
|
595 |
+
selectByValue(f, s, p[0]);
|
596 |
+
}
|
597 |
+
}
|
598 |
+
}
|
599 |
+
|
600 |
+
function toggleSame(ce, pre) {
|
601 |
+
var el = document.forms[0].elements, i;
|
602 |
+
|
603 |
+
if (ce.checked) {
|
604 |
+
el[pre + "_top"].disabled = false;
|
605 |
+
el[pre + "_right"].disabled = true;
|
606 |
+
el[pre + "_bottom"].disabled = true;
|
607 |
+
el[pre + "_left"].disabled = true;
|
608 |
+
|
609 |
+
if (el[pre + "_top_measurement"]) {
|
610 |
+
el[pre + "_top_measurement"].disabled = false;
|
611 |
+
el[pre + "_right_measurement"].disabled = true;
|
612 |
+
el[pre + "_bottom_measurement"].disabled = true;
|
613 |
+
el[pre + "_left_measurement"].disabled = true;
|
614 |
+
}
|
615 |
+
} else {
|
616 |
+
el[pre + "_top"].disabled = false;
|
617 |
+
el[pre + "_right"].disabled = false;
|
618 |
+
el[pre + "_bottom"].disabled = false;
|
619 |
+
el[pre + "_left"].disabled = false;
|
620 |
+
|
621 |
+
if (el[pre + "_top_measurement"]) {
|
622 |
+
el[pre + "_top_measurement"].disabled = false;
|
623 |
+
el[pre + "_right_measurement"].disabled = false;
|
624 |
+
el[pre + "_bottom_measurement"].disabled = false;
|
625 |
+
el[pre + "_left_measurement"].disabled = false;
|
626 |
+
}
|
627 |
+
}
|
628 |
+
|
629 |
+
showDisabledControls();
|
630 |
+
}
|
631 |
+
|
632 |
+
function synch(fr, to) {
|
633 |
+
var f = document.forms[0];
|
634 |
+
|
635 |
+
f.elements[to].value = f.elements[fr].value;
|
636 |
+
|
637 |
+
if (f.elements[fr + "_measurement"])
|
638 |
+
selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value);
|
639 |
+
}
|
640 |
+
|
641 |
+
tinyMCEPopup.onInit.add(init);
|
mce/style/langs/en_dlg.js
CHANGED
@@ -1,63 +1,63 @@
|
|
1 |
-
tinyMCE.addI18n('en.style_dlg',{
|
2 |
-
title:"Edit CSS Style",
|
3 |
-
apply:"Apply",
|
4 |
-
text_tab:"Text",
|
5 |
-
background_tab:"Background",
|
6 |
-
block_tab:"Block",
|
7 |
-
box_tab:"Box",
|
8 |
-
border_tab:"Border",
|
9 |
-
list_tab:"List",
|
10 |
-
positioning_tab:"Positioning",
|
11 |
-
text_props:"Text",
|
12 |
-
text_font:"Font",
|
13 |
-
text_size:"Size",
|
14 |
-
text_weight:"Weight",
|
15 |
-
text_style:"Style",
|
16 |
-
text_variant:"Variant",
|
17 |
-
text_lineheight:"Line height",
|
18 |
-
text_case:"Case",
|
19 |
-
text_color:"Color",
|
20 |
-
text_decoration:"Decoration",
|
21 |
-
text_overline:"overline",
|
22 |
-
text_underline:"underline",
|
23 |
-
text_striketrough:"strikethrough",
|
24 |
-
text_blink:"blink",
|
25 |
-
text_none:"none",
|
26 |
-
background_color:"Background color",
|
27 |
-
background_image:"Background image",
|
28 |
-
background_repeat:"Repeat",
|
29 |
-
background_attachment:"Attachment",
|
30 |
-
background_hpos:"Horizontal position",
|
31 |
-
background_vpos:"Vertical position",
|
32 |
-
block_wordspacing:"Word spacing",
|
33 |
-
block_letterspacing:"Letter spacing",
|
34 |
-
block_vertical_alignment:"Vertical alignment",
|
35 |
-
block_text_align:"Text align",
|
36 |
-
block_text_indent:"Text indent",
|
37 |
-
block_whitespace:"Whitespace",
|
38 |
-
block_display:"Display",
|
39 |
-
box_width:"Width",
|
40 |
-
box_height:"Height",
|
41 |
-
box_float:"Float",
|
42 |
-
box_clear:"Clear",
|
43 |
-
padding:"Padding",
|
44 |
-
same:"Same for all",
|
45 |
-
top:"Top",
|
46 |
-
right:"Right",
|
47 |
-
bottom:"Bottom",
|
48 |
-
left:"Left",
|
49 |
-
margin:"Margin",
|
50 |
-
style:"Style",
|
51 |
-
width:"Width",
|
52 |
-
height:"Height",
|
53 |
-
color:"Color",
|
54 |
-
list_type:"Type",
|
55 |
-
bullet_image:"Bullet image",
|
56 |
-
position:"Position",
|
57 |
-
positioning_type:"Type",
|
58 |
-
visibility:"Visibility",
|
59 |
-
zindex:"Z-index",
|
60 |
-
overflow:"Overflow",
|
61 |
-
placement:"Placement",
|
62 |
-
clip:"Clip"
|
63 |
Â
});
|
1 |
+
tinyMCE.addI18n('en.style_dlg',{
|
2 |
+
title:"Edit CSS Style",
|
3 |
+
apply:"Apply",
|
4 |
+
text_tab:"Text",
|
5 |
+
background_tab:"Background",
|
6 |
+
block_tab:"Block",
|
7 |
+
box_tab:"Box",
|
8 |
+
border_tab:"Border",
|
9 |
+
list_tab:"List",
|
10 |
+
positioning_tab:"Positioning",
|
11 |
+
text_props:"Text",
|
12 |
+
text_font:"Font",
|
13 |
+
text_size:"Size",
|
14 |
+
text_weight:"Weight",
|
15 |
+
text_style:"Style",
|
16 |
+
text_variant:"Variant",
|
17 |
+
text_lineheight:"Line height",
|
18 |
+
text_case:"Case",
|
19 |
+
text_color:"Color",
|
20 |
+
text_decoration:"Decoration",
|
21 |
+
text_overline:"overline",
|
22 |
+
text_underline:"underline",
|
23 |
+
text_striketrough:"strikethrough",
|
24 |
+
text_blink:"blink",
|
25 |
+
text_none:"none",
|
26 |
+
background_color:"Background color",
|
27 |
+
background_image:"Background image",
|
28 |
+
background_repeat:"Repeat",
|
29 |
+
background_attachment:"Attachment",
|
30 |
+
background_hpos:"Horizontal position",
|
31 |
+
background_vpos:"Vertical position",
|
32 |
+
block_wordspacing:"Word spacing",
|
33 |
+
block_letterspacing:"Letter spacing",
|
34 |
+
block_vertical_alignment:"Vertical alignment",
|
35 |
+
block_text_align:"Text align",
|
36 |
+
block_text_indent:"Text indent",
|
37 |
+
block_whitespace:"Whitespace",
|
38 |
+
block_display:"Display",
|
39 |
+
box_width:"Width",
|
40 |
+
box_height:"Height",
|
41 |
+
box_float:"Float",
|
42 |
+
box_clear:"Clear",
|
43 |
+
padding:"Padding",
|
44 |
+
same:"Same for all",
|
45 |
+
top:"Top",
|
46 |
+
right:"Right",
|
47 |
+
bottom:"Bottom",
|
48 |
+
left:"Left",
|
49 |
+
margin:"Margin",
|
50 |
+
style:"Style",
|
51 |
+
width:"Width",
|
52 |
+
height:"Height",
|
53 |
+
color:"Color",
|
54 |
+
list_type:"Type",
|
55 |
+
bullet_image:"Bullet image",
|
56 |
+
position:"Position",
|
57 |
+
positioning_type:"Type",
|
58 |
+
visibility:"Visibility",
|
59 |
+
zindex:"Z-index",
|
60 |
+
overflow:"Overflow",
|
61 |
+
placement:"Placement",
|
62 |
+
clip:"Clip"
|
63 |
Â
});
|
mce/style/langs/langs.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
-
$strings
|
6 |
-
else
|
7 |
-
|
Â
|
|
Â
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
+
$strings = tdav_get_file($lang_file);
|
6 |
+
else {
|
7 |
+
$strings = tdav_get_file(dirname(__FILE__) . '/en_dlg.js');
|
8 |
+
$strings = preg_replace( '/([\'"])en\./', '$1'.$mce_locale.'.', $strings, 1 );
|
9 |
+
}
|
mce/style/props.htm
CHANGED
@@ -2,12 +2,12 @@
|
|
2 |
Â
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
Â
<head>
|
4 |
Â
<title>{#style_dlg.title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/editable_selects.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
9 |
-
<script type="text/javascript" src="js/props.js?ver=
|
10 |
-
<link href="css/props.css?ver=
|
11 |
Â
<base target="_self" />
|
12 |
Â
</head>
|
13 |
Â
|
2 |
Â
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
Â
<head>
|
4 |
Â
<title>{#style_dlg.title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/editable_selects.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
9 |
+
<script type="text/javascript" src="js/props.js?ver=3211"></script>
|
10 |
+
<link href="css/props.css?ver=3211" rel="stylesheet" type="text/css" />
|
11 |
Â
<base target="_self" />
|
12 |
Â
</head>
|
13 |
Â
|
mce/table/cell.htm
CHANGED
@@ -1,184 +1,184 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#table_dlg.cell_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/editable_selects.js?ver=
|
9 |
-
<script type="text/javascript" src="js/cell.js?ver=
|
10 |
-
<link href="css/cell.css?ver=
|
11 |
-
<base target="_self" />
|
12 |
-
</head>
|
13 |
-
<body id="tablecell" style="display: none">
|
14 |
-
<form onsubmit="updateAction();return false;" action="#">
|
15 |
-
<div class="tabs">
|
16 |
-
<ul>
|
17 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
18 |
-
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
19 |
-
</ul>
|
20 |
-
</div>
|
21 |
-
|
22 |
-
<div class="panel_wrapper">
|
23 |
-
<div id="general_panel" class="panel current">
|
24 |
-
<fieldset>
|
25 |
-
<legend>{#table_dlg.general_props}</legend>
|
26 |
-
|
27 |
-
<table border="0" cellpadding="4" cellspacing="0">
|
28 |
-
<tr>
|
29 |
-
<td><label for="align">{#table_dlg.align}</label></td>
|
30 |
-
<td>
|
31 |
-
<select id="align" name="align" class="mceFocus">
|
32 |
-
<option value="">{#not_set}</option>
|
33 |
-
<option value="center">{#table_dlg.align_middle}</option>
|
34 |
-
<option value="left">{#table_dlg.align_left}</option>
|
35 |
-
<option value="right">{#table_dlg.align_right}</option>
|
36 |
-
</select>
|
37 |
-
</td>
|
38 |
-
|
39 |
-
<td><label for="celltype">{#table_dlg.cell_type}</label></td>
|
40 |
-
<td>
|
41 |
-
<select id="celltype" name="celltype">
|
42 |
-
<option value="td">{#table_dlg.td}</option>
|
43 |
-
<option value="th">{#table_dlg.th}</option>
|
44 |
-
</select>
|
45 |
-
</td>
|
46 |
-
</tr>
|
47 |
-
|
48 |
-
<tr>
|
49 |
-
<td><label for="valign">{#table_dlg.valign}</label></td>
|
50 |
-
<td>
|
51 |
-
<select id="valign" name="valign">
|
52 |
-
<option value="">{#not_set}</option>
|
53 |
-
<option value="top">{#table_dlg.align_top}</option>
|
54 |
-
<option value="middle">{#table_dlg.align_middle}</option>
|
55 |
-
<option value="bottom">{#table_dlg.align_bottom}</option>
|
56 |
-
</select>
|
57 |
-
</td>
|
58 |
-
|
59 |
-
<td><label for="scope">{#table_dlg.scope}</label></td>
|
60 |
-
<td>
|
61 |
-
<select id="scope" name="scope">
|
62 |
-
<option value="">{#not_set}</option>
|
63 |
-
<option value="col">{#table.col}</option>
|
64 |
-
<option value="row">{#table.row}</option>
|
65 |
-
<option value="rowgroup">{#table_dlg.rowgroup}</option>
|
66 |
-
<option value="colgroup">{#table_dlg.colgroup}</option>
|
67 |
-
</select>
|
68 |
-
</td>
|
69 |
-
|
70 |
-
</tr>
|
71 |
-
|
72 |
-
<tr>
|
73 |
-
<td><label for="width">{#table_dlg.width}</label></td>
|
74 |
-
<td><input id="width" name="width" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
75 |
-
|
76 |
-
<td><label for="height">{#table_dlg.height}</label></td>
|
77 |
-
<td><input id="height" name="height" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
78 |
-
</tr>
|
79 |
-
|
80 |
-
<tr id="styleSelectRow">
|
81 |
-
<td><label for="class">{#class_name}</label></td>
|
82 |
-
<td colspan="3">
|
83 |
-
<select id="class" name="class" class="mceEditableSelect">
|
84 |
-
<option value="" selected="selected">{#not_set}</option>
|
85 |
-
</select>
|
86 |
-
</td>
|
87 |
-
</tr>
|
88 |
-
</table>
|
89 |
-
</fieldset>
|
90 |
-
</div>
|
91 |
-
|
92 |
-
<div id="advanced_panel" class="panel">
|
93 |
-
<fieldset>
|
94 |
-
<legend>{#table_dlg.advanced_props}</legend>
|
95 |
-
|
96 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
97 |
-
<tr>
|
98 |
-
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
99 |
-
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
100 |
-
</tr>
|
101 |
-
|
102 |
-
<tr>
|
103 |
-
<td><label for="style">{#table_dlg.style}</label></td>
|
104 |
-
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
105 |
-
</tr>
|
106 |
-
|
107 |
-
<tr>
|
108 |
-
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
109 |
-
<td>
|
110 |
-
<select id="dir" name="dir" style="width: 200px">
|
111 |
-
<option value="">{#not_set}</option>
|
112 |
-
<option value="ltr">{#table_dlg.ltr}</option>
|
113 |
-
<option value="rtl">{#table_dlg.rtl}</option>
|
114 |
-
</select>
|
115 |
-
</td>
|
116 |
-
</tr>
|
117 |
-
|
118 |
-
<tr>
|
119 |
-
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
120 |
-
<td>
|
121 |
-
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
122 |
-
</td>
|
123 |
-
</tr>
|
124 |
-
|
125 |
-
<tr>
|
126 |
-
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
127 |
-
<td>
|
128 |
-
<table border="0" cellpadding="0" cellspacing="0">
|
129 |
-
<tr>
|
130 |
-
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
131 |
-
<td id="backgroundimagebrowsercontainer"> </td>
|
132 |
-
</tr>
|
133 |
-
</table>
|
134 |
-
</td>
|
135 |
-
</tr>
|
136 |
-
|
137 |
-
<tr>
|
138 |
-
<td class="column1"><label for="bordercolor">{#table_dlg.bordercolor}</label></td>
|
139 |
-
<td>
|
140 |
-
<table border="0" cellpadding="0" cellspacing="0">
|
141 |
-
<tr>
|
142 |
-
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
|
143 |
-
<td id="bordercolor_pickcontainer"> </td>
|
144 |
-
</tr>
|
145 |
-
</table>
|
146 |
-
</td>
|
147 |
-
</tr>
|
148 |
-
|
149 |
-
<tr>
|
150 |
-
<td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
151 |
-
<td>
|
152 |
-
<table border="0" cellpadding="0" cellspacing="0">
|
153 |
-
<tr>
|
154 |
-
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
155 |
-
<td id="bgcolor_pickcontainer"> </td>
|
156 |
-
</tr>
|
157 |
-
</table>
|
158 |
-
</td>
|
159 |
-
</tr>
|
160 |
-
</table>
|
161 |
-
</fieldset>
|
162 |
-
</div>
|
163 |
-
</div>
|
164 |
-
|
165 |
-
<div class="mceActionPanel">
|
166 |
-
<div>
|
167 |
-
<select id="action" name="action">
|
168 |
-
<option value="cell">{#table_dlg.cell_cell}</option>
|
169 |
-
<option value="row">{#table_dlg.cell_row}</option>
|
170 |
-
<option value="all">{#table_dlg.cell_all}</option>
|
171 |
-
</select>
|
172 |
-
</div>
|
173 |
-
|
174 |
-
<div style="float: left">
|
175 |
-
<div><input type="submit" id="insert" name="insert" value="{#update}" /></div>
|
176 |
-
</div>
|
177 |
-
|
178 |
-
<div style="float: right">
|
179 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
180 |
-
</div>
|
181 |
-
</div>
|
182 |
-
</form>
|
183 |
-
</body>
|
184 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#table_dlg.cell_title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/editable_selects.js?ver=3211"></script>
|
9 |
+
<script type="text/javascript" src="js/cell.js?ver=3211"></script>
|
10 |
+
<link href="css/cell.css?ver=3211" rel="stylesheet" type="text/css" />
|
11 |
+
<base target="_self" />
|
12 |
+
</head>
|
13 |
+
<body id="tablecell" style="display: none">
|
14 |
+
<form onsubmit="updateAction();return false;" action="#">
|
15 |
+
<div class="tabs">
|
16 |
+
<ul>
|
17 |
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
18 |
+
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
19 |
+
</ul>
|
20 |
+
</div>
|
21 |
+
|
22 |
+
<div class="panel_wrapper">
|
23 |
+
<div id="general_panel" class="panel current">
|
24 |
+
<fieldset>
|
25 |
+
<legend>{#table_dlg.general_props}</legend>
|
26 |
+
|
27 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
28 |
+
<tr>
|
29 |
+
<td><label for="align">{#table_dlg.align}</label></td>
|
30 |
+
<td>
|
31 |
+
<select id="align" name="align" class="mceFocus">
|
32 |
+
<option value="">{#not_set}</option>
|
33 |
+
<option value="center">{#table_dlg.align_middle}</option>
|
34 |
+
<option value="left">{#table_dlg.align_left}</option>
|
35 |
+
<option value="right">{#table_dlg.align_right}</option>
|
36 |
+
</select>
|
37 |
+
</td>
|
38 |
+
|
39 |
+
<td><label for="celltype">{#table_dlg.cell_type}</label></td>
|
40 |
+
<td>
|
41 |
+
<select id="celltype" name="celltype">
|
42 |
+
<option value="td">{#table_dlg.td}</option>
|
43 |
+
<option value="th">{#table_dlg.th}</option>
|
44 |
+
</select>
|
45 |
+
</td>
|
46 |
+
</tr>
|
47 |
+
|
48 |
+
<tr>
|
49 |
+
<td><label for="valign">{#table_dlg.valign}</label></td>
|
50 |
+
<td>
|
51 |
+
<select id="valign" name="valign">
|
52 |
+
<option value="">{#not_set}</option>
|
53 |
+
<option value="top">{#table_dlg.align_top}</option>
|
54 |
+
<option value="middle">{#table_dlg.align_middle}</option>
|
55 |
+
<option value="bottom">{#table_dlg.align_bottom}</option>
|
56 |
+
</select>
|
57 |
+
</td>
|
58 |
+
|
59 |
+
<td><label for="scope">{#table_dlg.scope}</label></td>
|
60 |
+
<td>
|
61 |
+
<select id="scope" name="scope">
|
62 |
+
<option value="">{#not_set}</option>
|
63 |
+
<option value="col">{#table.col}</option>
|
64 |
+
<option value="row">{#table.row}</option>
|
65 |
+
<option value="rowgroup">{#table_dlg.rowgroup}</option>
|
66 |
+
<option value="colgroup">{#table_dlg.colgroup}</option>
|
67 |
+
</select>
|
68 |
+
</td>
|
69 |
+
|
70 |
+
</tr>
|
71 |
+
|
72 |
+
<tr>
|
73 |
+
<td><label for="width">{#table_dlg.width}</label></td>
|
74 |
+
<td><input id="width" name="width" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
75 |
+
|
76 |
+
<td><label for="height">{#table_dlg.height}</label></td>
|
77 |
+
<td><input id="height" name="height" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
78 |
+
</tr>
|
79 |
+
|
80 |
+
<tr id="styleSelectRow">
|
81 |
+
<td><label for="class">{#class_name}</label></td>
|
82 |
+
<td colspan="3">
|
83 |
+
<select id="class" name="class" class="mceEditableSelect">
|
84 |
+
<option value="" selected="selected">{#not_set}</option>
|
85 |
+
</select>
|
86 |
+
</td>
|
87 |
+
</tr>
|
88 |
+
</table>
|
89 |
+
</fieldset>
|
90 |
+
</div>
|
91 |
+
|
92 |
+
<div id="advanced_panel" class="panel">
|
93 |
+
<fieldset>
|
94 |
+
<legend>{#table_dlg.advanced_props}</legend>
|
95 |
+
|
96 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
97 |
+
<tr>
|
98 |
+
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
99 |
+
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
100 |
+
</tr>
|
101 |
+
|
102 |
+
<tr>
|
103 |
+
<td><label for="style">{#table_dlg.style}</label></td>
|
104 |
+
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
105 |
+
</tr>
|
106 |
+
|
107 |
+
<tr>
|
108 |
+
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
109 |
+
<td>
|
110 |
+
<select id="dir" name="dir" style="width: 200px">
|
111 |
+
<option value="">{#not_set}</option>
|
112 |
+
<option value="ltr">{#table_dlg.ltr}</option>
|
113 |
+
<option value="rtl">{#table_dlg.rtl}</option>
|
114 |
+
</select>
|
115 |
+
</td>
|
116 |
+
</tr>
|
117 |
+
|
118 |
+
<tr>
|
119 |
+
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
120 |
+
<td>
|
121 |
+
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
|
125 |
+
<tr>
|
126 |
+
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
127 |
+
<td>
|
128 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
129 |
+
<tr>
|
130 |
+
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
131 |
+
<td id="backgroundimagebrowsercontainer"> </td>
|
132 |
+
</tr>
|
133 |
+
</table>
|
134 |
+
</td>
|
135 |
+
</tr>
|
136 |
+
|
137 |
+
<tr>
|
138 |
+
<td class="column1"><label for="bordercolor">{#table_dlg.bordercolor}</label></td>
|
139 |
+
<td>
|
140 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
141 |
+
<tr>
|
142 |
+
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
|
143 |
+
<td id="bordercolor_pickcontainer"> </td>
|
144 |
+
</tr>
|
145 |
+
</table>
|
146 |
+
</td>
|
147 |
+
</tr>
|
148 |
+
|
149 |
+
<tr>
|
150 |
+
<td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
151 |
+
<td>
|
152 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
153 |
+
<tr>
|
154 |
+
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
155 |
+
<td id="bgcolor_pickcontainer"> </td>
|
156 |
+
</tr>
|
157 |
+
</table>
|
158 |
+
</td>
|
159 |
+
</tr>
|
160 |
+
</table>
|
161 |
+
</fieldset>
|
162 |
+
</div>
|
163 |
+
</div>
|
164 |
+
|
165 |
+
<div class="mceActionPanel">
|
166 |
+
<div>
|
167 |
+
<select id="action" name="action">
|
168 |
+
<option value="cell">{#table_dlg.cell_cell}</option>
|
169 |
+
<option value="row">{#table_dlg.cell_row}</option>
|
170 |
+
<option value="all">{#table_dlg.cell_all}</option>
|
171 |
+
</select>
|
172 |
+
</div>
|
173 |
+
|
174 |
+
<div style="float: left">
|
175 |
+
<div><input type="submit" id="insert" name="insert" value="{#update}" /></div>
|
176 |
+
</div>
|
177 |
+
|
178 |
+
<div style="float: right">
|
179 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
180 |
+
</div>
|
181 |
+
</div>
|
182 |
+
</form>
|
183 |
+
</body>
|
184 |
+
</html>
|
mce/table/css/cell.css
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
-
/* CSS file for cell dialog in the table plugin */
|
2 |
-
|
3 |
-
.panel_wrapper div.current {
|
4 |
-
height: 200px;
|
5 |
-
}
|
6 |
-
|
7 |
-
.advfield {
|
8 |
-
width: 200px;
|
9 |
-
}
|
10 |
-
|
11 |
-
#action {
|
12 |
-
margin-bottom: 3px;
|
13 |
-
}
|
14 |
-
|
15 |
-
#class {
|
16 |
-
width: 150px;
|
17 |
Â
}
|
1 |
+
/* CSS file for cell dialog in the table plugin */
|
2 |
+
|
3 |
+
.panel_wrapper div.current {
|
4 |
+
height: 200px;
|
5 |
+
}
|
6 |
+
|
7 |
+
.advfield {
|
8 |
+
width: 200px;
|
9 |
+
}
|
10 |
+
|
11 |
+
#action {
|
12 |
+
margin-bottom: 3px;
|
13 |
+
}
|
14 |
+
|
15 |
+
#class {
|
16 |
+
width: 150px;
|
17 |
Â
}
|
mce/table/css/row.css
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
/* CSS file for row dialog in the table plugin */
|
2 |
-
|
3 |
-
.panel_wrapper div.current {
|
4 |
-
height: 200px;
|
5 |
-
}
|
6 |
-
|
7 |
-
.advfield {
|
8 |
-
width: 200px;
|
9 |
-
}
|
10 |
-
|
11 |
-
#action {
|
12 |
-
margin-bottom: 3px;
|
13 |
-
}
|
14 |
-
|
15 |
-
#rowtype,#align,#valign,#class,#height {
|
16 |
-
width: 150px;
|
17 |
-
}
|
18 |
-
|
19 |
-
#height {
|
20 |
-
width: 50px;
|
21 |
-
}
|
22 |
-
|
23 |
-
.col2 {
|
24 |
-
padding-left: 20px;
|
25 |
-
}
|
1 |
+
/* CSS file for row dialog in the table plugin */
|
2 |
+
|
3 |
+
.panel_wrapper div.current {
|
4 |
+
height: 200px;
|
5 |
+
}
|
6 |
+
|
7 |
+
.advfield {
|
8 |
+
width: 200px;
|
9 |
+
}
|
10 |
+
|
11 |
+
#action {
|
12 |
+
margin-bottom: 3px;
|
13 |
+
}
|
14 |
+
|
15 |
+
#rowtype,#align,#valign,#class,#height {
|
16 |
+
width: 150px;
|
17 |
+
}
|
18 |
+
|
19 |
+
#height {
|
20 |
+
width: 50px;
|
21 |
+
}
|
22 |
+
|
23 |
+
.col2 {
|
24 |
+
padding-left: 20px;
|
25 |
+
}
|
mce/table/css/table.css
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
/* CSS file for table dialog in the table plugin */
|
2 |
-
|
3 |
-
.panel_wrapper div.current {
|
4 |
-
height: 245px;
|
5 |
-
}
|
6 |
-
|
7 |
-
.advfield {
|
8 |
-
width: 200px;
|
9 |
-
}
|
10 |
-
|
11 |
-
#class {
|
12 |
-
width: 150px;
|
13 |
-
}
|
1 |
+
/* CSS file for table dialog in the table plugin */
|
2 |
+
|
3 |
+
.panel_wrapper div.current {
|
4 |
+
height: 245px;
|
5 |
+
}
|
6 |
+
|
7 |
+
.advfield {
|
8 |
+
width: 200px;
|
9 |
+
}
|
10 |
+
|
11 |
+
#class {
|
12 |
+
width: 150px;
|
13 |
+
}
|
mce/table/editor_plugin.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.TablePlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;each([['table','table.desc','mceInsertTable',true],['delete_table','table.del','mceTableDelete'],['delete_col','table.delete_col_desc','mceTableDeleteCol'],['delete_row','table.delete_row_desc','mceTableDeleteRow'],['col_after','table.col_after_desc','mceTableInsertColAfter'],['col_before','table.col_before_desc','mceTableInsertColBefore'],['row_after','table.row_after_desc','mceTableInsertRowAfter'],['row_before','table.row_before_desc','mceTableInsertRowBefore'],['row_props','table.row_desc','mceTableRowProps',true],['cell_props','table.cell_desc','mceTableCellProps',true],['split_cells','table.split_cells_desc','mceTableSplitCells',true],['merge_cells','table.merge_cells_desc','mceTableMergeCells',true]],function(c){ed.addButton(c[0],{title:c[1],cmd:c[2],ui:c[3]});});ed.onInit.add(function(){if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){var sm,se=ed.selection,el=se.getNode()||ed.getBody();if(ed.dom.getParent(e,'td')||ed.dom.getParent(e,'th')){m.removeAll();if(el.nodeName=='A'&&!ed.dom.getAttrib(el,'name')){m.add({title:'advanced.link_desc',icon:'link',cmd:ed.plugins.advlink?'mceAdvLink':'mceLink',ui:true});m.add({title:'advanced.unlink_desc',icon:'unlink',cmd:'UnLink'});m.addSeparator();}if(el.nodeName=='IMG'&&el.className.indexOf('mceItem')==-1){m.add({title:'advanced.image_desc',icon:'image',cmd:ed.plugins.advimage?'mceAdvImage':'mceImage',ui:true});m.addSeparator();}m.add({title:'table.desc',icon:'table',cmd:'mceInsertTable',ui:true,value:{action:'insert'}});m.add({title:'table.props_desc',icon:'table_props',cmd:'mceInsertTable',ui:true});m.add({title:'table.del',icon:'delete_table',cmd:'mceTableDelete',ui:true});m.addSeparator();sm=m.addMenu({title:'table.cell'});sm.add({title:'table.cell_desc',icon:'cell_props',cmd:'mceTableCellProps',ui:true});sm.add({title:'table.split_cells_desc',icon:'split_cells',cmd:'mceTableSplitCells',ui:true});sm.add({title:'table.merge_cells_desc',icon:'merge_cells',cmd:'mceTableMergeCells',ui:true});sm=m.addMenu({title:'table.row'});sm.add({title:'table.row_desc',icon:'row_props',cmd:'mceTableRowProps',ui:true});sm.add({title:'table.row_before_desc',icon:'row_before',cmd:'mceTableInsertRowBefore'});sm.add({title:'table.row_after_desc',icon:'row_after',cmd:'mceTableInsertRowAfter'});sm.add({title:'table.delete_row_desc',icon:'delete_row',cmd:'mceTableDeleteRow'});sm.addSeparator();sm.add({title:'table.cut_row_desc',icon:'cut',cmd:'mceTableCutRow'});sm.add({title:'table.copy_row_desc',icon:'copy',cmd:'mceTableCopyRow'});sm.add({title:'table.paste_row_before_desc',icon:'paste',cmd:'mceTablePasteRowBefore'});sm.add({title:'table.paste_row_after_desc',icon:'paste',cmd:'mceTablePasteRowAfter'});sm=m.addMenu({title:'table.col'});sm.add({title:'table.col_before_desc',icon:'col_before',cmd:'mceTableInsertColBefore'});sm.add({title:'table.col_after_desc',icon:'col_after',cmd:'mceTableInsertColAfter'});sm.add({title:'table.delete_col_desc',icon:'delete_col',cmd:'mceTableDeleteCol'});}else m.add({title:'table.desc',icon:'table',cmd:'mceInsertTable',ui:true});});}});ed.onKeyDown.add(function(ed,e){if(e.keyCode==9&&ed.dom.getParent(ed.selection.getNode(),'TABLE')){if(!tinymce.isGecko&&!tinymce.isOpera){tinyMCE.execInstanceCommand(ed.editorId,"mceTableMoveToNextRow",true);return tinymce.dom.Event.cancel(e);}ed.undoManager.add();}});if(!tinymce.isIE){if(ed.getParam('table_selection',true)){ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='TABLE')ed.selection.select(e);});}}ed.onNodeChange.add(function(ed,cm,n){var p=ed.dom.getParent(n,'td,th,caption');cm.setActive('table',n.nodeName==='TABLE'||!!p);if(p&&p.nodeName==='CAPTION')p=null;cm.setDisabled('delete_table',!p);cm.setDisabled('delete_col',!p);cm.setDisabled('delete_table',!p);cm.setDisabled('delete_row',!p);cm.setDisabled('col_after',!p);cm.setDisabled('col_before',!p);cm.setDisabled('row_after',!p);cm.setDisabled('row_before',!p);cm.setDisabled('row_props',!p);cm.setDisabled('cell_props',!p);cm.setDisabled('split_cells',!p||(parseInt(ed.dom.getAttrib(p,'colspan','1'))<2&&parseInt(ed.dom.getAttrib(p,'rowspan','1'))<2));cm.setDisabled('merge_cells',!p);});if(!tinymce.isIE){ed.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g,tinymce.isOpera?'<$1$2> </$1>':'<$1$2><br mce_bogus="1" /></$1>');});}},execCommand:function(cmd,ui,val){var ed=this.editor,b;switch(cmd){case"mceTableMoveToNextRow":case"mceInsertTable":case"mceTableRowProps":case"mceTableCellProps":case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":case"mceTableDelete":ed.execCommand('mceBeginUndoLevel');this._doExecCommand(cmd,ui,val);ed.execCommand('mceEndUndoLevel');return true;}return false;},getInfo:function(){return{longname:'Tables',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_doExecCommand:function(command,user_interface,value){var inst=this.editor,ed=inst,url=this.url;var focusElm=inst.selection.getNode();var trElm=inst.dom.getParent(focusElm,"tr");var tdElm=inst.dom.getParent(focusElm,"td,th");var tableElm=inst.dom.getParent(focusElm,"table");var doc=inst.contentWindow.document;var tableBorder=tableElm?tableElm.getAttribute("border"):"";if(trElm&&tdElm==null)tdElm=trElm.cells[0];function inArray(ar,v){for(var i=0;i<ar.length;i++){if(ar[i].length>0&&inArray(ar[i],v))return true;if(ar[i]==v)return true;}return false;}function select(dx,dy){var td;grid=getTableGrid(tableElm);dx=dx||0;dy=dy||0;dx=Math.max(cpos.cellindex+dx,0);dy=Math.max(cpos.rowindex+dy,0);inst.execCommand('mceRepaint');td=getCell(grid,dy,dx);if(td){inst.selection.select(td.firstChild||td);inst.selection.collapse(1);}};function makeTD(){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';}function getColRowSpan(td){var colspan=inst.dom.getAttrib(td,"colspan");var rowspan=inst.dom.getAttrib(td,"rowspan");colspan=colspan==""?1:parseInt(colspan);rowspan=rowspan==""?1:parseInt(rowspan);return{colspan:colspan,rowspan:rowspan};}function getCellPos(grid,td){var x,y;for(y=0;y<grid.length;y++){for(x=0;x<grid[y].length;x++){if(grid[y][x]==td)return{cellindex:x,rowindex:y};}}return null;}function getCell(grid,row,col){if(grid[row]&&grid[row][col])return grid[row][col];return null;}function getNextCell(table,cell){var cells=[],x=0,i,j,cell,nextCell;for(i=0;i<table.rows.length;i++)for(j=0;j<table.rows[i].cells.length;j++,x++)cells[x]=table.rows[i].cells[j];for(i=0;i<cells.length;i++)if(cells[i]==cell)if(nextCell=cells[i+1])return nextCell;}function getTableGrid(table){var grid=[],rows=table.rows,x,y,td,sd,xstart,x2,y2;for(y=0;y<rows.length;y++){for(x=0;x<rows[y].cells.length;x++){td=rows[y].cells[x];sd=getColRowSpan(td);for(xstart=x;grid[y]&&grid[y][xstart];xstart++);for(y2=y;y2<y+sd['rowspan'];y2++){if(!grid[y2])grid[y2]=[];for(x2=xstart;x2<xstart+sd['colspan'];x2++)grid[y2][x2]=td;}}}return grid;}function trimRow(table,tr,td,new_tr){var grid=getTableGrid(table),cpos=getCellPos(grid,td);var cells,lastElm;if(new_tr.cells.length!=tr.childNodes.length){cells=tr.childNodes;lastElm=null;for(var x=0;td=getCell(grid,cpos.rowindex,x);x++){var remove=true;var sd=getColRowSpan(td);if(inArray(cells,td)){new_tr.childNodes[x]._delete=true;}else if((lastElm==null||td!=lastElm)&&sd.colspan>1){for(var i=x;i<x+td.colSpan;i++)new_tr.childNodes[i]._delete=true;}if((lastElm==null||td!=lastElm)&&sd.rowspan>1)td.rowSpan=sd.rowspan+1;lastElm=td;}deleteMarked(tableElm);}}function prevElm(node,name){while((node=node.previousSibling)!=null){if(node.nodeName==name)return node;}return null;}function nextElm(node,names){var namesAr=names.split(',');while((node=node.nextSibling)!=null){for(var i=0;i<namesAr.length;i++){if(node.nodeName.toLowerCase()==namesAr[i].toLowerCase())return node;}}return null;}function deleteMarked(tbl){if(tbl.rows==0)return;var tr=tbl.rows[0];do{var next=nextElm(tr,"TR");if(tr._delete){tr.parentNode.removeChild(tr);continue;}var td=tr.cells[0];if(td.cells>1){do{var nexttd=nextElm(td,"TD,TH");if(td._delete)td.parentNode.removeChild(td);}while((td=nexttd)!=null);}}while((tr=next)!=null);}function addRows(td_elm,tr_elm,rowspan){td_elm.rowSpan=1;var trNext=nextElm(tr_elm,"TR");for(var i=1;i<rowspan&&trNext;i++){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';if(tinymce.isIE)trNext.insertBefore(newTD,trNext.cells(td_elm.cellIndex));else trNext.insertBefore(newTD,trNext.cells[td_elm.cellIndex]);trNext=nextElm(trNext,"TR");}}function copyRow(doc,table,tr){var grid=getTableGrid(table);var newTR=tr.cloneNode(false);var cpos=getCellPos(grid,tr.cells[0]);var lastCell=null;var tableBorder=inst.dom.getAttrib(table,"border");var tdElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){var newTD=null;if(lastCell!=tdElm){for(var i=0;i<tr.cells.length;i++){if(tdElm==tr.cells[i]){newTD=tdElm.cloneNode(true);break;}}}if(newTD==null){newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';}newTD.colSpan=1;newTD.rowSpan=1;newTR.appendChild(newTD);lastCell=tdElm;}return newTR;}switch(command){case"mceTableMoveToNextRow":var nextCell=getNextCell(tableElm,tdElm);if(!nextCell){inst.execCommand("mceTableInsertRowAfter",tdElm);nextCell=getNextCell(tableElm,tdElm);}inst.selection.select(nextCell);inst.selection.collapse(true);return true;case"mceTableRowProps":if(trElm==null)return true;if(user_interface){inst.windowManager.open({url:url+'/row.htm',width:400+parseInt(inst.getLang('table.rowprops_delta_width',0)),height:295+parseInt(inst.getLang('table.rowprops_delta_height',0)),inline:1},{plugin_url:url});}return true;case"mceTableCellProps":if(tdElm==null)return true;if(user_interface){inst.windowManager.open({url:url+'/cell.htm',width:400+parseInt(inst.getLang('table.cellprops_delta_width',0)),height:295+parseInt(inst.getLang('table.cellprops_delta_height',0)),inline:1},{plugin_url:url});}return true;case"mceInsertTable":if(user_interface){inst.windowManager.open({url:url+'/table.htm',width:400+parseInt(inst.getLang('table.table_delta_width',0)),height:320+parseInt(inst.getLang('table.table_delta_height',0)),inline:1},{plugin_url:url,action:value?value.action:0});}return true;case"mceTableDelete":var table=inst.dom.getParent(inst.selection.getNode(),"table");if(table){table.parentNode.removeChild(table);inst.execCommand('mceRepaint');}return true;case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":if(!tableElm)return true;if(trElm&&tableElm!=trElm.parentNode)tableElm=trElm.parentNode;if(tableElm&&trElm){switch(command){case"mceTableCutRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);inst.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);break;case"mceTablePasteRowBefore":if(!trElm||!tdElm)return true;var newTR=inst.tableRowClipboard.cloneNode(true);var prevTR=prevElm(trElm,"TR");if(prevTR!=null)trimRow(tableElm,prevTR,prevTR.cells[0],newTR);trElm.parentNode.insertBefore(newTR,trElm);break;case"mceTablePasteRowAfter":if(!trElm||!tdElm)return true;var nextTR=nextElm(trElm,"TR");var newTR=inst.tableRowClipboard.cloneNode(true);trimRow(tableElm,trElm,tdElm,newTR);if(nextTR==null)trElm.parentNode.appendChild(newTR);else nextTR.parentNode.insertBefore(newTR,nextTR);break;case"mceTableInsertRowBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;cpos.rowindex--;if(cpos.rowindex<0)cpos.rowindex=0;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}trElm.parentNode.insertBefore(newTR,trElm);select(0,1);break;case"mceTableInsertRowAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}if(newTR.hasChildNodes()){var nextTR=nextElm(trElm,"TR");if(nextTR)nextTR.parentNode.insertBefore(newTR,nextTR);else tableElm.appendChild(newTR);}select(0,1);break;case"mceTableDeleteRow":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);if(grid.length==1&&tableElm.nodeName=='TBODY'){inst.dom.remove(inst.dom.getParent(tableElm,"table"));return true;}var cells=trElm.cells;var nextTR=nextElm(trElm,"TR");for(var x=0;x<cells.length;x++){if(cells[x].rowSpan>1){var newTD=cells[x].cloneNode(true);var sd=getColRowSpan(cells[x]);newTD.rowSpan=sd.rowspan-1;var nextTD=nextTR.cells[x];if(nextTD==null)nextTR.appendChild(newTD);else nextTR.insertBefore(newTD,nextTD);}}var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd.rowspan>1){tdElm.rowSpan=sd.rowspan-1;}else{trElm=tdElm.parentNode;if(trElm.parentNode)trElm._delete=true;}lastTDElm=tdElm;}}deleteMarked(tableElm);select(0,-1);break;case"mceTableInsertColBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';newTD.rowSpan=tdElm.rowSpan;tdElm.parentNode.insertBefore(newTD,tdElm);}else tdElm.colSpan++;lastTDElm=tdElm;}}select();break;case"mceTableInsertColAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';newTD.rowSpan=tdElm.rowSpan;var nextTD=nextElm(tdElm,"TD,TH");if(nextTD==null)tdElm.parentNode.appendChild(newTD);else nextTD.parentNode.insertBefore(newTD,nextTD);}else tdElm.colSpan++;lastTDElm=tdElm;}}select(1);break;case"mceTableDeleteCol":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;if((grid.length>1&&grid[0].length<=1)&&tableElm.nodeName=='TBODY'){inst.dom.remove(inst.dom.getParent(tableElm,"table"));return true;}for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']>1)tdElm.colSpan=sd['colspan']-1;else{if(tdElm.parentNode)tdElm.parentNode.removeChild(tdElm);}lastTDElm=tdElm;}}select(-1);break;case"mceTableSplitCells":if(!trElm||!tdElm)return true;var spandata=getColRowSpan(tdElm);var colspan=spandata["colspan"];var rowspan=spandata["rowspan"];if(colspan>1||rowspan>1){tdElm.colSpan=1;for(var i=1;i<colspan;i++){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';trElm.insertBefore(newTD,nextElm(tdElm,"TD,TH"));if(rowspan>1)addRows(newTD,trElm,rowspan);}addRows(tdElm,trElm,rowspan);}tableElm=inst.dom.getParent(inst.selection.getNode(),"table");break;case"mceTableMergeCells":var rows=[];var sel=inst.selection.getSel();var grid=getTableGrid(tableElm);if(tinymce.isIE||sel.rangeCount==1){if(user_interface){var sp=getColRowSpan(tdElm);inst.windowManager.open({url:url+'/merge_cells.htm',width:240+parseInt(inst.getLang('table.merge_cells_delta_width',0)),height:110+parseInt(inst.getLang('table.merge_cells_delta_height',0)),inline:1},{action:"update",numcols:sp.colspan,numrows:sp.rowspan,plugin_url:url});return true;}else{var numRows=parseInt(value['numrows']);var numCols=parseInt(value['numcols']);var cpos=getCellPos(grid,tdElm);if((""+numRows)=="NaN")numRows=1;if((""+numCols)=="NaN")numCols=1;var tRows=tableElm.rows;for(var y=cpos.rowindex;y<grid.length;y++){var rowCells=[];for(var x=cpos.cellindex;x<grid[y].length;x++){var td=getCell(grid,y,x);if(td&&!inArray(rows,td)&&!inArray(rowCells,td)){var cp=getCellPos(grid,td);if(cp.cellindex<cpos.cellindex+numCols&&cp.rowindex<cpos.rowindex+numRows)rowCells[rowCells.length]=td;}}if(rowCells.length>0)rows[rows.length]=rowCells;var td=getCell(grid,cpos.rowindex,cpos.cellindex);each(ed.dom.select('br',td),function(e,i){if(i>0&&ed.dom.getAttrib('mce_bogus'))ed.dom.remove(e);});}}}else{var cells=[];var sel=inst.selection.getSel();var lastTR=null;var curRow=null;var x1=-1,y1=-1,x2,y2;if(sel.rangeCount<2)return true;for(var i=0;i<sel.rangeCount;i++){var rng=sel.getRangeAt(i);var tdElm=rng.startContainer.childNodes[rng.startOffset];if(!tdElm)break;if(tdElm.nodeName=="TD"||tdElm.nodeName=="TH")cells[cells.length]=tdElm;}var tRows=tableElm.rows;for(var y=0;y<tRows.length;y++){var rowCells=[];for(var x=0;x<tRows[y].cells.length;x++){var td=tRows[y].cells[x];for(var i=0;i<cells.length;i++){if(td==cells[i]){rowCells[rowCells.length]=td;}}}if(rowCells.length>0)rows[rows.length]=rowCells;}var curRow=[];var lastTR=null;for(var y=0;y<grid.length;y++){for(var x=0;x<grid[y].length;x++){grid[y][x]._selected=false;for(var i=0;i<cells.length;i++){if(grid[y][x]==cells[i]){if(x1==-1){x1=x;y1=y;}x2=x;y2=y;grid[y][x]._selected=true;}}}}for(var y=y1;y<=y2;y++){for(var x=x1;x<=x2;x++){if(!grid[y][x]._selected){alert("Invalid selection for merge.");return true;}}}}var rowSpan=1,colSpan=1;var lastRowSpan=-1;for(var y=0;y<rows.length;y++){var rowColSpan=0;for(var x=0;x<rows[y].length;x++){var sd=getColRowSpan(rows[y][x]);rowColSpan+=sd['colspan'];if(lastRowSpan!=-1&&sd['rowspan']!=lastRowSpan){alert("Invalid selection for merge.");return true;}lastRowSpan=sd['rowspan'];}if(rowColSpan>colSpan)colSpan=rowColSpan;lastRowSpan=-1;}var lastColSpan=-1;for(var x=0;x<rows[0].length;x++){var colRowSpan=0;for(var y=0;y<rows.length;y++){var sd=getColRowSpan(rows[y][x]);colRowSpan+=sd['rowspan'];if(lastColSpan!=-1&&sd['colspan']!=lastColSpan){alert("Invalid selection for merge.");return true;}lastColSpan=sd['colspan'];}if(colRowSpan>rowSpan)rowSpan=colRowSpan;lastColSpan=-1;}tdElm=rows[0][0];tdElm.rowSpan=rowSpan;tdElm.colSpan=colSpan;for(var y=0;y<rows.length;y++){for(var x=0;x<rows[y].length;x++){var html=rows[y][x].innerHTML;var chk=html.replace(/[ \t\r\n]/g,"");if(chk!="<br/>"&&chk!="<br>"&&chk!='<br mce_bogus="1"/>'&&(x+y>0))tdElm.innerHTML+=html;if(rows[y][x]!=tdElm&&!rows[y][x]._deleted){var cpos=getCellPos(grid,rows[y][x]);var tr=rows[y][x].parentNode;tr.removeChild(rows[y][x]);rows[y][x]._deleted=true;if(!tr.hasChildNodes()){tr.parentNode.removeChild(tr);var lastCell=null;for(var x=0;cellElm=getCell(grid,cpos.rowindex,x);x++){if(cellElm!=lastCell&&cellElm.rowSpan>1)cellElm.rowSpan--;lastCell=cellElm;}if(tdElm.rowSpan>1)tdElm.rowSpan--;}}}}each(ed.dom.select('br',tdElm),function(e,i){if(i>0&&ed.dom.getAttrib(e,'mce_bogus'))ed.dom.remove(e);});break;}tableElm=inst.dom.getParent(inst.selection.getNode(),"table");inst.addVisual(tableElm);inst.nodeChanged();}return true;}return false;}});tinymce.PluginManager.add('table',tinymce.plugins.TablePlugin);})();
|
1 |
+
(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.TablePlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;each([['table','table.desc','mceInsertTable',true],['delete_table','table.del','mceTableDelete'],['delete_col','table.delete_col_desc','mceTableDeleteCol'],['delete_row','table.delete_row_desc','mceTableDeleteRow'],['col_after','table.col_after_desc','mceTableInsertColAfter'],['col_before','table.col_before_desc','mceTableInsertColBefore'],['row_after','table.row_after_desc','mceTableInsertRowAfter'],['row_before','table.row_before_desc','mceTableInsertRowBefore'],['row_props','table.row_desc','mceTableRowProps',true],['cell_props','table.cell_desc','mceTableCellProps',true],['split_cells','table.split_cells_desc','mceTableSplitCells',true],['merge_cells','table.merge_cells_desc','mceTableMergeCells',true]],function(c){ed.addButton(c[0],{title:c[1],cmd:c[2],ui:c[3]});});if(ed.getParam('inline_styles')){ed.onPreProcess.add(function(ed,o){var dom=ed.dom;each(dom.select('table',o.node),function(n){var v;if(v=dom.getAttrib(n,'width')){dom.setStyle(n,'width',v);dom.setAttrib(n,'width');}if(v=dom.getAttrib(n,'height')){dom.setStyle(n,'height',v);dom.setAttrib(n,'height');}});});}ed.onInit.add(function(){if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){var sm,se=ed.selection,el=se.getNode()||ed.getBody();if(ed.dom.getParent(e,'td')||ed.dom.getParent(e,'th')){m.removeAll();if(el.nodeName=='A'&&!ed.dom.getAttrib(el,'name')){m.add({title:'advanced.link_desc',icon:'link',cmd:ed.plugins.advlink?'mceAdvLink':'mceLink',ui:true});m.add({title:'advanced.unlink_desc',icon:'unlink',cmd:'UnLink'});m.addSeparator();}if(el.nodeName=='IMG'&&el.className.indexOf('mceItem')==-1){m.add({title:'advanced.image_desc',icon:'image',cmd:ed.plugins.advimage?'mceAdvImage':'mceImage',ui:true});m.addSeparator();}m.add({title:'table.desc',icon:'table',cmd:'mceInsertTable',ui:true,value:{action:'insert'}});m.add({title:'table.props_desc',icon:'table_props',cmd:'mceInsertTable',ui:true});m.add({title:'table.del',icon:'delete_table',cmd:'mceTableDelete',ui:true});m.addSeparator();sm=m.addMenu({title:'table.cell'});sm.add({title:'table.cell_desc',icon:'cell_props',cmd:'mceTableCellProps',ui:true});sm.add({title:'table.split_cells_desc',icon:'split_cells',cmd:'mceTableSplitCells',ui:true});sm.add({title:'table.merge_cells_desc',icon:'merge_cells',cmd:'mceTableMergeCells',ui:true});sm=m.addMenu({title:'table.row'});sm.add({title:'table.row_desc',icon:'row_props',cmd:'mceTableRowProps',ui:true});sm.add({title:'table.row_before_desc',icon:'row_before',cmd:'mceTableInsertRowBefore'});sm.add({title:'table.row_after_desc',icon:'row_after',cmd:'mceTableInsertRowAfter'});sm.add({title:'table.delete_row_desc',icon:'delete_row',cmd:'mceTableDeleteRow'});sm.addSeparator();sm.add({title:'table.cut_row_desc',icon:'cut',cmd:'mceTableCutRow'});sm.add({title:'table.copy_row_desc',icon:'copy',cmd:'mceTableCopyRow'});sm.add({title:'table.paste_row_before_desc',icon:'paste',cmd:'mceTablePasteRowBefore'});sm.add({title:'table.paste_row_after_desc',icon:'paste',cmd:'mceTablePasteRowAfter'});sm=m.addMenu({title:'table.col'});sm.add({title:'table.col_before_desc',icon:'col_before',cmd:'mceTableInsertColBefore'});sm.add({title:'table.col_after_desc',icon:'col_after',cmd:'mceTableInsertColAfter'});sm.add({title:'table.delete_col_desc',icon:'delete_col',cmd:'mceTableDeleteCol'});}else m.add({title:'table.desc',icon:'table',cmd:'mceInsertTable',ui:true});});}});ed.onKeyDown.add(function(ed,e){if(e.keyCode==9&&ed.dom.getParent(ed.selection.getNode(),'TABLE')){if(!tinymce.isGecko&&!tinymce.isOpera){tinyMCE.execInstanceCommand(ed.editorId,"mceTableMoveToNextRow",true);return tinymce.dom.Event.cancel(e);}ed.undoManager.add();}});if(!tinymce.isIE){if(ed.getParam('table_selection',true)){ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='TABLE')ed.selection.select(e);});}}ed.onNodeChange.add(function(ed,cm,n){var p=ed.dom.getParent(n,'td,th,caption');cm.setActive('table',n.nodeName==='TABLE'||!!p);if(p&&p.nodeName==='CAPTION')p=null;cm.setDisabled('delete_table',!p);cm.setDisabled('delete_col',!p);cm.setDisabled('delete_table',!p);cm.setDisabled('delete_row',!p);cm.setDisabled('col_after',!p);cm.setDisabled('col_before',!p);cm.setDisabled('row_after',!p);cm.setDisabled('row_before',!p);cm.setDisabled('row_props',!p);cm.setDisabled('cell_props',!p);cm.setDisabled('split_cells',!p||(parseInt(ed.dom.getAttrib(p,'colspan','1'))<2&&parseInt(ed.dom.getAttrib(p,'rowspan','1'))<2));cm.setDisabled('merge_cells',!p);});if(!tinymce.isIE){ed.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g,tinymce.isOpera?'<$1$2> </$1>':'<$1$2><br mce_bogus="1" /></$1>');});}},execCommand:function(cmd,ui,val){var ed=this.editor,b;switch(cmd){case"mceTableMoveToNextRow":case"mceInsertTable":case"mceTableRowProps":case"mceTableCellProps":case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":case"mceTableDelete":ed.execCommand('mceBeginUndoLevel');this._doExecCommand(cmd,ui,val);ed.execCommand('mceEndUndoLevel');return true;}return false;},getInfo:function(){return{longname:'Tables',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_doExecCommand:function(command,user_interface,value){var inst=this.editor,ed=inst,url=this.url;var focusElm=inst.selection.getNode();var trElm=inst.dom.getParent(focusElm,"tr");var tdElm=inst.dom.getParent(focusElm,"td,th");var tableElm=inst.dom.getParent(focusElm,"table");var doc=inst.contentWindow.document;var tableBorder=tableElm?tableElm.getAttribute("border"):"";if(trElm&&tdElm==null)tdElm=trElm.cells[0];function inArray(ar,v){for(var i=0;i<ar.length;i++){if(ar[i].length>0&&inArray(ar[i],v))return true;if(ar[i]==v)return true;}return false;}function select(dx,dy){var td;grid=getTableGrid(tableElm);dx=dx||0;dy=dy||0;dx=Math.max(cpos.cellindex+dx,0);dy=Math.max(cpos.rowindex+dy,0);inst.execCommand('mceRepaint');td=getCell(grid,dy,dx);if(td){inst.selection.select(td.firstChild||td);inst.selection.collapse(1);}};function makeTD(){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';}function getColRowSpan(td){var colspan=inst.dom.getAttrib(td,"colspan");var rowspan=inst.dom.getAttrib(td,"rowspan");colspan=colspan==""?1:parseInt(colspan);rowspan=rowspan==""?1:parseInt(rowspan);return{colspan:colspan,rowspan:rowspan};}function getCellPos(grid,td){var x,y;for(y=0;y<grid.length;y++){for(x=0;x<grid[y].length;x++){if(grid[y][x]==td)return{cellindex:x,rowindex:y};}}return null;}function getCell(grid,row,col){if(grid[row]&&grid[row][col])return grid[row][col];return null;}function getNextCell(table,cell){var cells=[],x=0,i,j,cell,nextCell;for(i=0;i<table.rows.length;i++)for(j=0;j<table.rows[i].cells.length;j++,x++)cells[x]=table.rows[i].cells[j];for(i=0;i<cells.length;i++)if(cells[i]==cell)if(nextCell=cells[i+1])return nextCell;}function getTableGrid(table){var grid=[],rows=table.rows,x,y,td,sd,xstart,x2,y2;for(y=0;y<rows.length;y++){for(x=0;x<rows[y].cells.length;x++){td=rows[y].cells[x];sd=getColRowSpan(td);for(xstart=x;grid[y]&&grid[y][xstart];xstart++);for(y2=y;y2<y+sd['rowspan'];y2++){if(!grid[y2])grid[y2]=[];for(x2=xstart;x2<xstart+sd['colspan'];x2++)grid[y2][x2]=td;}}}return grid;}function trimRow(table,tr,td,new_tr){var grid=getTableGrid(table),cpos=getCellPos(grid,td);var cells,lastElm;if(new_tr.cells.length!=tr.childNodes.length){cells=tr.childNodes;lastElm=null;for(var x=0;td=getCell(grid,cpos.rowindex,x);x++){var remove=true;var sd=getColRowSpan(td);if(inArray(cells,td)){new_tr.childNodes[x]._delete=true;}else if((lastElm==null||td!=lastElm)&&sd.colspan>1){for(var i=x;i<x+td.colSpan;i++)new_tr.childNodes[i]._delete=true;}if((lastElm==null||td!=lastElm)&&sd.rowspan>1)td.rowSpan=sd.rowspan+1;lastElm=td;}deleteMarked(tableElm);}}function prevElm(node,name){while((node=node.previousSibling)!=null){if(node.nodeName==name)return node;}return null;}function nextElm(node,names){var namesAr=names.split(',');while((node=node.nextSibling)!=null){for(var i=0;i<namesAr.length;i++){if(node.nodeName.toLowerCase()==namesAr[i].toLowerCase())return node;}}return null;}function deleteMarked(tbl){if(tbl.rows==0)return;var tr=tbl.rows[0];do{var next=nextElm(tr,"TR");if(tr._delete){tr.parentNode.removeChild(tr);continue;}var td=tr.cells[0];if(td.cells>1){do{var nexttd=nextElm(td,"TD,TH");if(td._delete)td.parentNode.removeChild(td);}while((td=nexttd)!=null);}}while((tr=next)!=null);}function addRows(td_elm,tr_elm,rowspan){td_elm.rowSpan=1;var trNext=nextElm(tr_elm,"TR");for(var i=1;i<rowspan&&trNext;i++){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';if(tinymce.isIE)trNext.insertBefore(newTD,trNext.cells(td_elm.cellIndex));else trNext.insertBefore(newTD,trNext.cells[td_elm.cellIndex]);trNext=nextElm(trNext,"TR");}}function copyRow(doc,table,tr){var grid=getTableGrid(table);var newTR=tr.cloneNode(false);var cpos=getCellPos(grid,tr.cells[0]);var lastCell=null;var tableBorder=inst.dom.getAttrib(table,"border");var tdElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){var newTD=null;if(lastCell!=tdElm){for(var i=0;i<tr.cells.length;i++){if(tdElm==tr.cells[i]){newTD=tdElm.cloneNode(true);break;}}}if(newTD==null){newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';}newTD.colSpan=1;newTD.rowSpan=1;newTR.appendChild(newTD);lastCell=tdElm;}return newTR;}switch(command){case"mceTableMoveToNextRow":var nextCell=getNextCell(tableElm,tdElm);if(!nextCell){inst.execCommand("mceTableInsertRowAfter",tdElm);nextCell=getNextCell(tableElm,tdElm);}inst.selection.select(nextCell);inst.selection.collapse(true);return true;case"mceTableRowProps":if(trElm==null)return true;if(user_interface){inst.windowManager.open({url:url+'/row.htm',width:400+parseInt(inst.getLang('table.rowprops_delta_width',0)),height:295+parseInt(inst.getLang('table.rowprops_delta_height',0)),inline:1},{plugin_url:url});}return true;case"mceTableCellProps":if(tdElm==null)return true;if(user_interface){inst.windowManager.open({url:url+'/cell.htm',width:400+parseInt(inst.getLang('table.cellprops_delta_width',0)),height:295+parseInt(inst.getLang('table.cellprops_delta_height',0)),inline:1},{plugin_url:url});}return true;case"mceInsertTable":if(user_interface){inst.windowManager.open({url:url+'/table.htm',width:400+parseInt(inst.getLang('table.table_delta_width',0)),height:320+parseInt(inst.getLang('table.table_delta_height',0)),inline:1},{plugin_url:url,action:value?value.action:0});}return true;case"mceTableDelete":var table=inst.dom.getParent(inst.selection.getNode(),"table");if(table){table.parentNode.removeChild(table);inst.execCommand('mceRepaint');}return true;case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":if(!tableElm)return true;if(trElm&&tableElm!=trElm.parentNode)tableElm=trElm.parentNode;if(tableElm&&trElm){switch(command){case"mceTableCutRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);inst.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);break;case"mceTablePasteRowBefore":if(!trElm||!tdElm)return true;var newTR=inst.tableRowClipboard.cloneNode(true);var prevTR=prevElm(trElm,"TR");if(prevTR!=null)trimRow(tableElm,prevTR,prevTR.cells[0],newTR);trElm.parentNode.insertBefore(newTR,trElm);break;case"mceTablePasteRowAfter":if(!trElm||!tdElm)return true;var nextTR=nextElm(trElm,"TR");var newTR=inst.tableRowClipboard.cloneNode(true);trimRow(tableElm,trElm,tdElm,newTR);if(nextTR==null)trElm.parentNode.appendChild(newTR);else nextTR.parentNode.insertBefore(newTR,nextTR);break;case"mceTableInsertRowBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;cpos.rowindex--;if(cpos.rowindex<0)cpos.rowindex=0;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}trElm.parentNode.insertBefore(newTR,trElm);select(0,1);break;case"mceTableInsertRowAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}if(newTR.hasChildNodes()){var nextTR=nextElm(trElm,"TR");if(nextTR)nextTR.parentNode.insertBefore(newTR,nextTR);else tableElm.appendChild(newTR);}select(0,1);break;case"mceTableDeleteRow":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);if(grid.length==1&&tableElm.nodeName=='TBODY'){inst.dom.remove(inst.dom.getParent(tableElm,"table"));return true;}var cells=trElm.cells;var nextTR=nextElm(trElm,"TR");for(var x=0;x<cells.length;x++){if(cells[x].rowSpan>1){var newTD=cells[x].cloneNode(true);var sd=getColRowSpan(cells[x]);newTD.rowSpan=sd.rowspan-1;var nextTD=nextTR.cells[x];if(nextTD==null)nextTR.appendChild(newTD);else nextTR.insertBefore(newTD,nextTD);}}var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd.rowspan>1){tdElm.rowSpan=sd.rowspan-1;}else{trElm=tdElm.parentNode;if(trElm.parentNode)trElm._delete=true;}lastTDElm=tdElm;}}deleteMarked(tableElm);select(0,-1);break;case"mceTableInsertColBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(inst.dom.getParent(tableElm,"table"));var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';newTD.rowSpan=tdElm.rowSpan;tdElm.parentNode.insertBefore(newTD,tdElm);}else tdElm.colSpan++;lastTDElm=tdElm;}}select();break;case"mceTableInsertColAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(inst.dom.getParent(tableElm,"table"));var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';newTD.rowSpan=tdElm.rowSpan;var nextTD=nextElm(tdElm,"TD,TH");if(nextTD==null)tdElm.parentNode.appendChild(newTD);else nextTD.parentNode.insertBefore(newTD,nextTD);}else tdElm.colSpan++;lastTDElm=tdElm;}}select(1);break;case"mceTableDeleteCol":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;if((grid.length>1&&grid[0].length<=1)&&tableElm.nodeName=='TBODY'){inst.dom.remove(inst.dom.getParent(tableElm,"table"));return true;}for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']>1)tdElm.colSpan=sd['colspan']-1;else{if(tdElm.parentNode)tdElm.parentNode.removeChild(tdElm);}lastTDElm=tdElm;}}select(-1);break;case"mceTableSplitCells":if(!trElm||!tdElm)return true;var spandata=getColRowSpan(tdElm);var colspan=spandata["colspan"];var rowspan=spandata["rowspan"];if(colspan>1||rowspan>1){tdElm.colSpan=1;for(var i=1;i<colspan;i++){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';trElm.insertBefore(newTD,nextElm(tdElm,"TD,TH"));if(rowspan>1)addRows(newTD,trElm,rowspan);}addRows(tdElm,trElm,rowspan);}tableElm=inst.dom.getParent(inst.selection.getNode(),"table");break;case"mceTableMergeCells":var rows=[];var sel=inst.selection.getSel();var grid=getTableGrid(tableElm);if(tinymce.isIE||sel.rangeCount==1){if(user_interface){var sp=getColRowSpan(tdElm);inst.windowManager.open({url:url+'/merge_cells.htm',width:240+parseInt(inst.getLang('table.merge_cells_delta_width',0)),height:110+parseInt(inst.getLang('table.merge_cells_delta_height',0)),inline:1},{action:"update",numcols:sp.colspan,numrows:sp.rowspan,plugin_url:url});return true;}else{var numRows=parseInt(value['numrows']);var numCols=parseInt(value['numcols']);var cpos=getCellPos(grid,tdElm);if((""+numRows)=="NaN")numRows=1;if((""+numCols)=="NaN")numCols=1;var tRows=tableElm.rows;for(var y=cpos.rowindex;y<grid.length;y++){var rowCells=[];for(var x=cpos.cellindex;x<grid[y].length;x++){var td=getCell(grid,y,x);if(td&&!inArray(rows,td)&&!inArray(rowCells,td)){var cp=getCellPos(grid,td);if(cp.cellindex<cpos.cellindex+numCols&&cp.rowindex<cpos.rowindex+numRows)rowCells[rowCells.length]=td;}}if(rowCells.length>0)rows[rows.length]=rowCells;var td=getCell(grid,cpos.rowindex,cpos.cellindex);each(ed.dom.select('br',td),function(e,i){if(i>0&&ed.dom.getAttrib('mce_bogus'))ed.dom.remove(e);});}}}else{var cells=[];var sel=inst.selection.getSel();var lastTR=null;var curRow=null;var x1=-1,y1=-1,x2,y2;if(sel.rangeCount<2)return true;for(var i=0;i<sel.rangeCount;i++){var rng=sel.getRangeAt(i);var tdElm=rng.startContainer.childNodes[rng.startOffset];if(!tdElm)break;if(tdElm.nodeName=="TD"||tdElm.nodeName=="TH")cells[cells.length]=tdElm;}var tRows=tableElm.rows;for(var y=0;y<tRows.length;y++){var rowCells=[];for(var x=0;x<tRows[y].cells.length;x++){var td=tRows[y].cells[x];for(var i=0;i<cells.length;i++){if(td==cells[i]){rowCells[rowCells.length]=td;}}}if(rowCells.length>0)rows[rows.length]=rowCells;}var curRow=[];var lastTR=null;for(var y=0;y<grid.length;y++){for(var x=0;x<grid[y].length;x++){grid[y][x]._selected=false;for(var i=0;i<cells.length;i++){if(grid[y][x]==cells[i]){if(x1==-1){x1=x;y1=y;}x2=x;y2=y;grid[y][x]._selected=true;}}}}for(var y=y1;y<=y2;y++){for(var x=x1;x<=x2;x++){if(!grid[y][x]._selected){alert("Invalid selection for merge.");return true;}}}}var rowSpan=1,colSpan=1;var lastRowSpan=-1;for(var y=0;y<rows.length;y++){var rowColSpan=0;for(var x=0;x<rows[y].length;x++){var sd=getColRowSpan(rows[y][x]);rowColSpan+=sd['colspan'];if(lastRowSpan!=-1&&sd['rowspan']!=lastRowSpan){alert("Invalid selection for merge.");return true;}lastRowSpan=sd['rowspan'];}if(rowColSpan>colSpan)colSpan=rowColSpan;lastRowSpan=-1;}var lastColSpan=-1;for(var x=0;x<rows[0].length;x++){var colRowSpan=0;for(var y=0;y<rows.length;y++){var sd=getColRowSpan(rows[y][x]);colRowSpan+=sd['rowspan'];if(lastColSpan!=-1&&sd['colspan']!=lastColSpan){alert("Invalid selection for merge.");return true;}lastColSpan=sd['colspan'];}if(colRowSpan>rowSpan)rowSpan=colRowSpan;lastColSpan=-1;}tdElm=rows[0][0];tdElm.rowSpan=rowSpan;tdElm.colSpan=colSpan;for(var y=0;y<rows.length;y++){for(var x=0;x<rows[y].length;x++){var html=rows[y][x].innerHTML;var chk=html.replace(/[ \t\r\n]/g,"");if(chk!="<br/>"&&chk!="<br>"&&chk!='<br mce_bogus="1"/>'&&(x+y>0))tdElm.innerHTML+=html;if(rows[y][x]!=tdElm&&!rows[y][x]._deleted){var cpos=getCellPos(grid,rows[y][x]);var tr=rows[y][x].parentNode;tr.removeChild(rows[y][x]);rows[y][x]._deleted=true;if(!tr.hasChildNodes()){tr.parentNode.removeChild(tr);var lastCell=null;for(var x=0;cellElm=getCell(grid,cpos.rowindex,x);x++){if(cellElm!=lastCell&&cellElm.rowSpan>1)cellElm.rowSpan--;lastCell=cellElm;}if(tdElm.rowSpan>1)tdElm.rowSpan--;}}}}each(ed.dom.select('br',tdElm),function(e,i){if(i>0&&ed.dom.getAttrib(e,'mce_bogus'))ed.dom.remove(e);});break;}tableElm=inst.dom.getParent(inst.selection.getNode(),"table");inst.addVisual(tableElm);inst.nodeChanged();}return true;}return false;}});tinymce.PluginManager.add('table',tinymce.plugins.TablePlugin);})();
|
mce/table/js/cell.js
CHANGED
@@ -1,259 +1,269 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
var ed;
|
4 |
-
|
5 |
-
function init() {
|
6 |
-
ed = tinyMCEPopup.editor;
|
7 |
-
tinyMCEPopup.resizeToInnerSize();
|
8 |
-
|
9 |
-
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
10 |
-
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
11 |
-
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
|
12 |
-
|
13 |
-
var inst = ed;
|
14 |
-
var tdElm = ed.dom.getParent(ed.selection.getNode(), "td,th");
|
15 |
-
var formObj = document.forms[0];
|
16 |
-
var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
|
17 |
-
|
18 |
-
// Get table cell data
|
19 |
-
var celltype = tdElm.nodeName.toLowerCase();
|
20 |
-
var align = ed.dom.getAttrib(tdElm, 'align');
|
21 |
-
var valign = ed.dom.getAttrib(tdElm, 'valign');
|
22 |
-
var width = trimSize(getStyle(tdElm, 'width', 'width'));
|
23 |
-
var height = trimSize(getStyle(tdElm, 'height', 'height'));
|
24 |
-
var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
|
25 |
-
var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
|
26 |
-
var className = ed.dom.getAttrib(tdElm, 'class');
|
27 |
-
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
|
28 |
-
var id = ed.dom.getAttrib(tdElm, 'id');
|
29 |
-
var lang = ed.dom.getAttrib(tdElm, 'lang');
|
30 |
-
var dir = ed.dom.getAttrib(tdElm, 'dir');
|
31 |
-
var scope = ed.dom.getAttrib(tdElm, 'scope');
|
32 |
-
|
33 |
-
// Setup form
|
34 |
-
addClassesToList('class', 'table_cell_styles');
|
35 |
-
TinyMCE_EditableSelects.init();
|
36 |
-
|
37 |
-
formObj.bordercolor.value = bordercolor;
|
38 |
-
formObj.bgcolor.value = bgcolor;
|
39 |
-
formObj.backgroundimage.value = backgroundimage;
|
40 |
-
formObj.width.value = width;
|
41 |
-
formObj.height.value = height;
|
42 |
-
formObj.id.value = id;
|
43 |
-
formObj.lang.value = lang;
|
44 |
-
formObj.style.value = ed.dom.serializeStyle(st);
|
45 |
-
selectByValue(formObj, 'align', align);
|
46 |
-
selectByValue(formObj, 'valign', valign);
|
47 |
-
selectByValue(formObj, 'class', className, true, true);
|
48 |
-
selectByValue(formObj, 'celltype', celltype);
|
49 |
-
selectByValue(formObj, 'dir', dir);
|
50 |
-
selectByValue(formObj, 'scope', scope);
|
51 |
-
|
52 |
-
// Resize some elements
|
53 |
-
if (isVisible('backgroundimagebrowser'))
|
54 |
-
document.getElementById('backgroundimage').style.width = '180px';
|
55 |
-
|
56 |
-
updateColor('bordercolor_pick', 'bordercolor');
|
57 |
-
updateColor('bgcolor_pick', 'bgcolor');
|
58 |
-
}
|
59 |
-
|
60 |
-
function updateAction() {
|
61 |
-
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
|
62 |
-
|
63 |
-
tinyMCEPopup.restoreSelection();
|
64 |
-
el = ed.selection.getNode();
|
65 |
-
tdElm = ed.dom.getParent(el, "td,th");
|
66 |
-
trElm = ed.dom.getParent(el, "tr");
|
67 |
-
tableElm = ed.dom.getParent(el, "table");
|
68 |
-
|
69 |
-
ed.execCommand('mceBeginUndoLevel');
|
70 |
-
|
71 |
-
switch (getSelectValue(formObj, 'action')) {
|
72 |
-
case "cell":
|
73 |
-
var celltype = getSelectValue(formObj, 'celltype');
|
74 |
-
var scope = getSelectValue(formObj, 'scope');
|
75 |
-
|
76 |
-
|
77 |
-
if (
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
}
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
td.
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
td.style.
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
var
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
var
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
formObj.style.value = ed.dom.serializeStyle(st);
|
231 |
-
}
|
232 |
-
|
233 |
-
function
|
234 |
-
var formObj = document.forms[0];
|
235 |
-
var st = ed.dom.parseStyle(formObj.style.value);
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
var ed;
|
4 |
+
|
5 |
+
function init() {
|
6 |
+
ed = tinyMCEPopup.editor;
|
7 |
+
tinyMCEPopup.resizeToInnerSize();
|
8 |
+
|
9 |
+
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
10 |
+
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
11 |
+
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
|
12 |
+
|
13 |
+
var inst = ed;
|
14 |
+
var tdElm = ed.dom.getParent(ed.selection.getNode(), "td,th");
|
15 |
+
var formObj = document.forms[0];
|
16 |
+
var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
|
17 |
+
|
18 |
+
// Get table cell data
|
19 |
+
var celltype = tdElm.nodeName.toLowerCase();
|
20 |
+
var align = ed.dom.getAttrib(tdElm, 'align');
|
21 |
+
var valign = ed.dom.getAttrib(tdElm, 'valign');
|
22 |
+
var width = trimSize(getStyle(tdElm, 'width', 'width'));
|
23 |
+
var height = trimSize(getStyle(tdElm, 'height', 'height'));
|
24 |
+
var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
|
25 |
+
var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
|
26 |
+
var className = ed.dom.getAttrib(tdElm, 'class');
|
27 |
+
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
|
28 |
+
var id = ed.dom.getAttrib(tdElm, 'id');
|
29 |
+
var lang = ed.dom.getAttrib(tdElm, 'lang');
|
30 |
+
var dir = ed.dom.getAttrib(tdElm, 'dir');
|
31 |
+
var scope = ed.dom.getAttrib(tdElm, 'scope');
|
32 |
+
|
33 |
+
// Setup form
|
34 |
+
addClassesToList('class', 'table_cell_styles');
|
35 |
+
TinyMCE_EditableSelects.init();
|
36 |
+
|
37 |
+
formObj.bordercolor.value = bordercolor;
|
38 |
+
formObj.bgcolor.value = bgcolor;
|
39 |
+
formObj.backgroundimage.value = backgroundimage;
|
40 |
+
formObj.width.value = width;
|
41 |
+
formObj.height.value = height;
|
42 |
+
formObj.id.value = id;
|
43 |
+
formObj.lang.value = lang;
|
44 |
+
formObj.style.value = ed.dom.serializeStyle(st);
|
45 |
+
selectByValue(formObj, 'align', align);
|
46 |
+
selectByValue(formObj, 'valign', valign);
|
47 |
+
selectByValue(formObj, 'class', className, true, true);
|
48 |
+
selectByValue(formObj, 'celltype', celltype);
|
49 |
+
selectByValue(formObj, 'dir', dir);
|
50 |
+
selectByValue(formObj, 'scope', scope);
|
51 |
+
|
52 |
+
// Resize some elements
|
53 |
+
if (isVisible('backgroundimagebrowser'))
|
54 |
+
document.getElementById('backgroundimage').style.width = '180px';
|
55 |
+
|
56 |
+
updateColor('bordercolor_pick', 'bordercolor');
|
57 |
+
updateColor('bgcolor_pick', 'bgcolor');
|
58 |
+
}
|
59 |
+
|
60 |
+
function updateAction() {
|
61 |
+
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
|
62 |
+
|
63 |
+
tinyMCEPopup.restoreSelection();
|
64 |
+
el = ed.selection.getNode();
|
65 |
+
tdElm = ed.dom.getParent(el, "td,th");
|
66 |
+
trElm = ed.dom.getParent(el, "tr");
|
67 |
+
tableElm = ed.dom.getParent(el, "table");
|
68 |
+
|
69 |
+
ed.execCommand('mceBeginUndoLevel');
|
70 |
+
|
71 |
+
switch (getSelectValue(formObj, 'action')) {
|
72 |
+
case "cell":
|
73 |
+
var celltype = getSelectValue(formObj, 'celltype');
|
74 |
+
var scope = getSelectValue(formObj, 'scope');
|
75 |
+
|
76 |
+
function doUpdate(s) {
|
77 |
+
if (s) {
|
78 |
+
updateCell(tdElm);
|
79 |
+
|
80 |
+
ed.addVisual();
|
81 |
+
ed.nodeChanged();
|
82 |
+
inst.execCommand('mceEndUndoLevel');
|
83 |
+
tinyMCEPopup.close();
|
84 |
+
}
|
85 |
+
};
|
86 |
+
|
87 |
+
if (ed.getParam("accessibility_warnings", 1)) {
|
88 |
+
if (celltype == "th" && scope == "")
|
89 |
+
tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate);
|
90 |
+
else
|
91 |
+
doUpdate(1);
|
92 |
+
|
93 |
+
return;
|
94 |
+
}
|
95 |
+
|
96 |
+
updateCell(tdElm);
|
97 |
+
break;
|
98 |
+
|
99 |
+
case "row":
|
100 |
+
var cell = trElm.firstChild;
|
101 |
+
|
102 |
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
103 |
+
cell = nextCell(cell);
|
104 |
+
|
105 |
+
do {
|
106 |
+
cell = updateCell(cell, true);
|
107 |
+
} while ((cell = nextCell(cell)) != null);
|
108 |
+
|
109 |
+
break;
|
110 |
+
|
111 |
+
case "all":
|
112 |
+
var rows = tableElm.getElementsByTagName("tr");
|
113 |
+
|
114 |
+
for (var i=0; i<rows.length; i++) {
|
115 |
+
var cell = rows[i].firstChild;
|
116 |
+
|
117 |
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
118 |
+
cell = nextCell(cell);
|
119 |
+
|
120 |
+
do {
|
121 |
+
cell = updateCell(cell, true);
|
122 |
+
} while ((cell = nextCell(cell)) != null);
|
123 |
+
}
|
124 |
+
|
125 |
+
break;
|
126 |
+
}
|
127 |
+
|
128 |
+
ed.addVisual();
|
129 |
+
ed.nodeChanged();
|
130 |
+
inst.execCommand('mceEndUndoLevel');
|
131 |
+
tinyMCEPopup.close();
|
132 |
+
}
|
133 |
+
|
134 |
+
function nextCell(elm) {
|
135 |
+
while ((elm = elm.nextSibling) != null) {
|
136 |
+
if (elm.nodeName == "TD" || elm.nodeName == "TH")
|
137 |
+
return elm;
|
138 |
+
}
|
139 |
+
|
140 |
+
return null;
|
141 |
+
}
|
142 |
+
|
143 |
+
function updateCell(td, skip_id) {
|
144 |
+
var inst = ed;
|
145 |
+
var formObj = document.forms[0];
|
146 |
+
var curCellType = td.nodeName.toLowerCase();
|
147 |
+
var celltype = getSelectValue(formObj, 'celltype');
|
148 |
+
var doc = inst.getDoc();
|
149 |
+
var dom = ed.dom;
|
150 |
+
|
151 |
+
if (!skip_id)
|
152 |
+
td.setAttribute('id', formObj.id.value);
|
153 |
+
|
154 |
+
td.setAttribute('align', formObj.align.value);
|
155 |
+
td.setAttribute('vAlign', formObj.valign.value);
|
156 |
+
td.setAttribute('lang', formObj.lang.value);
|
157 |
+
td.setAttribute('dir', getSelectValue(formObj, 'dir'));
|
158 |
+
td.setAttribute('style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
|
159 |
+
td.setAttribute('scope', formObj.scope.value);
|
160 |
+
ed.dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
|
161 |
+
|
162 |
+
// Clear deprecated attributes
|
163 |
+
ed.dom.setAttrib(td, 'width', '');
|
164 |
+
ed.dom.setAttrib(td, 'height', '');
|
165 |
+
ed.dom.setAttrib(td, 'bgColor', '');
|
166 |
+
ed.dom.setAttrib(td, 'borderColor', '');
|
167 |
+
ed.dom.setAttrib(td, 'background', '');
|
168 |
+
|
169 |
+
// Set styles
|
170 |
+
td.style.width = getCSSSize(formObj.width.value);
|
171 |
+
td.style.height = getCSSSize(formObj.height.value);
|
172 |
+
if (formObj.bordercolor.value != "") {
|
173 |
+
td.style.borderColor = formObj.bordercolor.value;
|
174 |
+
td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
|
175 |
+
td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
|
176 |
+
} else
|
177 |
+
td.style.borderColor = '';
|
178 |
+
|
179 |
+
td.style.backgroundColor = formObj.bgcolor.value;
|
180 |
+
|
181 |
+
if (formObj.backgroundimage.value != "")
|
182 |
+
td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
183 |
+
else
|
184 |
+
td.style.backgroundImage = '';
|
185 |
+
|
186 |
+
if (curCellType != celltype) {
|
187 |
+
// changing to a different node type
|
188 |
+
var newCell = doc.createElement(celltype);
|
189 |
+
|
190 |
+
for (var c=0; c<td.childNodes.length; c++)
|
191 |
+
newCell.appendChild(td.childNodes[c].cloneNode(1));
|
192 |
+
|
193 |
+
for (var a=0; a<td.attributes.length; a++)
|
194 |
+
ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
|
195 |
+
|
196 |
+
td.parentNode.replaceChild(newCell, td);
|
197 |
+
td = newCell;
|
198 |
+
}
|
199 |
+
|
200 |
+
dom.setAttrib(td, 'style', dom.serializeStyle(dom.parseStyle(td.style.cssText)));
|
201 |
+
|
202 |
+
return td;
|
203 |
+
}
|
204 |
+
|
205 |
+
function changedBackgroundImage() {
|
206 |
+
var formObj = document.forms[0];
|
207 |
+
var st = ed.dom.parseStyle(formObj.style.value);
|
208 |
+
|
209 |
+
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
210 |
+
|
211 |
+
formObj.style.value = ed.dom.serializeStyle(st);
|
212 |
+
}
|
213 |
+
|
214 |
+
function changedSize() {
|
215 |
+
var formObj = document.forms[0];
|
216 |
+
var st = ed.dom.parseStyle(formObj.style.value);
|
217 |
+
|
218 |
+
var width = formObj.width.value;
|
219 |
+
if (width != "")
|
220 |
+
st['width'] = getCSSSize(width);
|
221 |
+
else
|
222 |
+
st['width'] = "";
|
223 |
+
|
224 |
+
var height = formObj.height.value;
|
225 |
+
if (height != "")
|
226 |
+
st['height'] = getCSSSize(height);
|
227 |
+
else
|
228 |
+
st['height'] = "";
|
229 |
+
|
230 |
+
formObj.style.value = ed.dom.serializeStyle(st);
|
231 |
+
}
|
232 |
+
|
233 |
+
function changedColor() {
|
234 |
+
var formObj = document.forms[0];
|
235 |
+
var st = ed.dom.parseStyle(formObj.style.value);
|
236 |
+
|
237 |
+
st['background-color'] = formObj.bgcolor.value;
|
238 |
+
st['border-color'] = formObj.bordercolor.value;
|
239 |
+
|
240 |
+
formObj.style.value = ed.dom.serializeStyle(st);
|
241 |
+
}
|
242 |
+
|
243 |
+
function changedStyle() {
|
244 |
+
var formObj = document.forms[0];
|
245 |
+
var st = ed.dom.parseStyle(formObj.style.value);
|
246 |
+
|
247 |
+
if (st['background-image'])
|
248 |
+
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
249 |
+
else
|
250 |
+
formObj.backgroundimage.value = '';
|
251 |
+
|
252 |
+
if (st['width'])
|
253 |
+
formObj.width.value = trimSize(st['width']);
|
254 |
+
|
255 |
+
if (st['height'])
|
256 |
+
formObj.height.value = trimSize(st['height']);
|
257 |
+
|
258 |
+
if (st['background-color']) {
|
259 |
+
formObj.bgcolor.value = st['background-color'];
|
260 |
+
updateColor('bgcolor_pick','bgcolor');
|
261 |
+
}
|
262 |
+
|
263 |
+
if (st['border-color']) {
|
264 |
+
formObj.bordercolor.value = st['border-color'];
|
265 |
+
updateColor('bordercolor_pick','bordercolor');
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
tinyMCEPopup.onInit.add(init);
|
mce/table/js/merge_cells.js
CHANGED
@@ -1,29 +1,29 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
function init() {
|
4 |
-
var f = document.forms[0], v;
|
5 |
-
|
6 |
-
tinyMCEPopup.resizeToInnerSize();
|
7 |
-
|
8 |
-
f.numcols.value = tinyMCEPopup.getWindowArg('numcols', 1);
|
9 |
-
f.numrows.value = tinyMCEPopup.getWindowArg('numrows', 1);
|
10 |
-
}
|
11 |
-
|
12 |
-
function mergeCells() {
|
13 |
-
var args = [], f = document.forms[0];
|
14 |
-
|
15 |
-
tinyMCEPopup.restoreSelection();
|
16 |
-
|
17 |
-
if (!AutoValidator.validate(f)) {
|
18 |
-
alert(tinyMCEPopup.getLang('invalid_data'));
|
19 |
-
return false;
|
20 |
-
}
|
21 |
-
|
22 |
-
args["numcols"] = f.numcols.value;
|
23 |
-
args["numrows"] = f.numrows.value;
|
24 |
-
|
25 |
-
tinyMCEPopup.execCommand("mceTableMergeCells", false, args);
|
26 |
-
tinyMCEPopup.close();
|
27 |
-
}
|
28 |
-
|
29 |
-
tinyMCEPopup.onInit.add(init);
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
function init() {
|
4 |
+
var f = document.forms[0], v;
|
5 |
+
|
6 |
+
tinyMCEPopup.resizeToInnerSize();
|
7 |
+
|
8 |
+
f.numcols.value = tinyMCEPopup.getWindowArg('numcols', 1);
|
9 |
+
f.numrows.value = tinyMCEPopup.getWindowArg('numrows', 1);
|
10 |
+
}
|
11 |
+
|
12 |
+
function mergeCells() {
|
13 |
+
var args = [], f = document.forms[0];
|
14 |
+
|
15 |
+
tinyMCEPopup.restoreSelection();
|
16 |
+
|
17 |
+
if (!AutoValidator.validate(f)) {
|
18 |
+
tinyMCEPopup.alert(tinyMCEPopup.getLang('invalid_data'));
|
19 |
+
return false;
|
20 |
+
}
|
21 |
+
|
22 |
+
args["numcols"] = f.numcols.value;
|
23 |
+
args["numrows"] = f.numrows.value;
|
24 |
+
|
25 |
+
tinyMCEPopup.execCommand("mceTableMergeCells", false, args);
|
26 |
+
tinyMCEPopup.close();
|
27 |
+
}
|
28 |
+
|
29 |
+
tinyMCEPopup.onInit.add(init);
|
mce/table/js/row.js
CHANGED
@@ -1,212 +1,212 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
function init() {
|
4 |
-
tinyMCEPopup.resizeToInnerSize();
|
5 |
-
|
6 |
-
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
7 |
-
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
8 |
-
|
9 |
-
var inst = tinyMCEPopup.editor;
|
10 |
-
var dom = inst.dom;
|
11 |
-
var trElm = dom.getParent(inst.selection.getNode(), "tr");
|
12 |
-
var formObj = document.forms[0];
|
13 |
-
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
|
14 |
-
|
15 |
-
// Get table row data
|
16 |
-
var rowtype = trElm.parentNode.nodeName.toLowerCase();
|
17 |
-
var align = dom.getAttrib(trElm, 'align');
|
18 |
-
var valign = dom.getAttrib(trElm, 'valign');
|
19 |
-
var height = trimSize(getStyle(trElm, 'height', 'height'));
|
20 |
-
var className = dom.getAttrib(trElm, 'class');
|
21 |
-
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
|
22 |
-
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
|
23 |
-
var id = dom.getAttrib(trElm, 'id');
|
24 |
-
var lang = dom.getAttrib(trElm, 'lang');
|
25 |
-
var dir = dom.getAttrib(trElm, 'dir');
|
26 |
-
|
27 |
-
// Setup form
|
28 |
-
addClassesToList('class', 'table_row_styles');
|
29 |
-
TinyMCE_EditableSelects.init();
|
30 |
-
|
31 |
-
formObj.bgcolor.value = bgcolor;
|
32 |
-
formObj.backgroundimage.value = backgroundimage;
|
33 |
-
formObj.height.value = height;
|
34 |
-
formObj.id.value = id;
|
35 |
-
formObj.lang.value = lang;
|
36 |
-
formObj.style.value = dom.serializeStyle(st);
|
37 |
-
selectByValue(formObj, 'align', align);
|
38 |
-
selectByValue(formObj, 'valign', valign);
|
39 |
-
selectByValue(formObj, 'class', className, true, true);
|
40 |
-
selectByValue(formObj, 'rowtype', rowtype);
|
41 |
-
selectByValue(formObj, 'dir', dir);
|
42 |
-
|
43 |
-
// Resize some elements
|
44 |
-
if (isVisible('backgroundimagebrowser'))
|
45 |
-
document.getElementById('backgroundimage').style.width = '180px';
|
46 |
-
|
47 |
-
updateColor('bgcolor_pick', 'bgcolor');
|
48 |
-
}
|
49 |
-
|
50 |
-
function updateAction() {
|
51 |
-
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
|
52 |
-
var action = getSelectValue(formObj, 'action');
|
53 |
-
|
54 |
-
tinyMCEPopup.restoreSelection();
|
55 |
-
trElm = dom.getParent(inst.selection.getNode(), "tr");
|
56 |
-
tableElm = dom.getParent(inst.selection.getNode(), "table");
|
57 |
-
|
58 |
-
inst.execCommand('mceBeginUndoLevel');
|
59 |
-
|
60 |
-
switch (action) {
|
61 |
-
case "row":
|
62 |
-
updateRow(trElm);
|
63 |
-
break;
|
64 |
-
|
65 |
-
case "all":
|
66 |
-
var rows = tableElm.getElementsByTagName("tr");
|
67 |
-
|
68 |
-
for (var i=0; i<rows.length; i++)
|
69 |
-
updateRow(rows[i], true);
|
70 |
-
|
71 |
-
break;
|
72 |
-
|
73 |
-
case "odd":
|
74 |
-
case "even":
|
75 |
-
var rows = tableElm.getElementsByTagName("tr");
|
76 |
-
|
77 |
-
for (var i=0; i<rows.length; i++) {
|
78 |
-
if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
|
79 |
-
updateRow(rows[i], true, true);
|
80 |
-
}
|
81 |
-
|
82 |
-
break;
|
83 |
-
}
|
84 |
-
|
85 |
-
inst.addVisual();
|
86 |
-
inst.nodeChanged();
|
87 |
-
inst.execCommand('mceEndUndoLevel');
|
88 |
-
tinyMCEPopup.close();
|
89 |
-
}
|
90 |
-
|
91 |
-
function updateRow(tr_elm, skip_id, skip_parent) {
|
92 |
-
var inst = tinyMCEPopup.editor;
|
93 |
-
var formObj = document.forms[0];
|
94 |
-
var dom = inst.dom;
|
95 |
-
var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
|
96 |
-
var rowtype = getSelectValue(formObj, 'rowtype');
|
97 |
-
var doc = inst.getDoc();
|
98 |
-
|
99 |
-
// Update row element
|
100 |
-
if (!skip_id)
|
101 |
-
tr_elm.setAttribute('id', formObj.id.value);
|
102 |
-
|
103 |
-
tr_elm.setAttribute('align', getSelectValue(formObj, 'align'));
|
104 |
-
tr_elm.setAttribute('vAlign', getSelectValue(formObj, 'valign'));
|
105 |
-
tr_elm.setAttribute('lang', formObj.lang.value);
|
106 |
-
tr_elm.setAttribute('dir', getSelectValue(formObj, 'dir'));
|
107 |
-
tr_elm.setAttribute('style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
|
108 |
-
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
|
109 |
-
|
110 |
-
// Clear deprecated attributes
|
111 |
-
tr_elm.setAttribute('background', '');
|
112 |
-
tr_elm.setAttribute('bgColor', '');
|
113 |
-
tr_elm.setAttribute('height', '');
|
114 |
-
|
115 |
-
// Set styles
|
116 |
-
tr_elm.style.height = getCSSSize(formObj.height.value);
|
117 |
-
tr_elm.style.backgroundColor = formObj.bgcolor.value;
|
118 |
-
|
119 |
-
if (formObj.backgroundimage.value != "")
|
120 |
-
tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
121 |
-
else
|
122 |
-
tr_elm.style.backgroundImage = '';
|
123 |
-
|
124 |
-
// Setup new rowtype
|
125 |
-
if (curRowType != rowtype && !skip_parent) {
|
126 |
-
// first, clone the node we are working on
|
127 |
-
var newRow = tr_elm.cloneNode(1);
|
128 |
-
|
129 |
-
// next, find the parent of its new destination (creating it if necessary)
|
130 |
-
var theTable = dom.getParent(tr_elm, "table");
|
131 |
-
var dest = rowtype;
|
132 |
-
var newParent = null;
|
133 |
-
for (var i = 0; i < theTable.childNodes.length; i++) {
|
134 |
-
if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
|
135 |
-
newParent = theTable.childNodes[i];
|
136 |
-
}
|
137 |
-
|
138 |
-
if (newParent == null) {
|
139 |
-
newParent = doc.createElement(dest);
|
140 |
-
|
141 |
-
if (dest == "thead") {
|
142 |
-
if (theTable.firstChild.nodeName == 'CAPTION')
|
143 |
-
inst.dom.insertAfter(newParent, theTable.firstChild);
|
144 |
-
else
|
145 |
-
theTable.insertBefore(newParent, theTable.firstChild);
|
146 |
-
} else
|
147 |
-
theTable.appendChild(newParent);
|
148 |
-
}
|
149 |
-
|
150 |
-
// append the row to the new parent
|
151 |
-
newParent.appendChild(newRow);
|
152 |
-
|
153 |
-
// remove the original
|
154 |
-
tr_elm.parentNode.removeChild(tr_elm);
|
155 |
-
|
156 |
-
// set tr_elm to the new node
|
157 |
-
tr_elm = newRow;
|
158 |
-
}
|
159 |
-
|
160 |
-
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
|
161 |
-
}
|
162 |
-
|
163 |
-
function changedBackgroundImage() {
|
164 |
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
165 |
-
var st = dom.parseStyle(formObj.style.value);
|
166 |
-
|
167 |
-
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
168 |
-
|
169 |
-
formObj.style.value = dom.serializeStyle(st);
|
170 |
-
}
|
171 |
-
|
172 |
-
function changedStyle() {
|
173 |
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
174 |
-
var st = dom.parseStyle(formObj.style.value);
|
175 |
-
|
176 |
-
if (st['background-image'])
|
177 |
-
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
178 |
-
else
|
179 |
-
formObj.backgroundimage.value = '';
|
180 |
-
|
181 |
-
if (st['height'])
|
182 |
-
formObj.height.value = trimSize(st['height']);
|
183 |
-
|
184 |
-
if (st['background-color']) {
|
185 |
-
formObj.bgcolor.value = st['background-color'];
|
186 |
-
updateColor('bgcolor_pick','bgcolor');
|
187 |
-
}
|
188 |
-
}
|
189 |
-
|
190 |
-
function changedSize() {
|
191 |
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
192 |
-
var st = dom.parseStyle(formObj.style.value);
|
193 |
-
|
194 |
-
var height = formObj.height.value;
|
195 |
-
if (height != "")
|
196 |
-
st['height'] = getCSSSize(height);
|
197 |
-
else
|
198 |
-
st['height'] = "";
|
199 |
-
|
200 |
-
formObj.style.value = dom.serializeStyle(st);
|
201 |
-
}
|
202 |
-
|
203 |
-
function changedColor() {
|
204 |
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
205 |
-
var st = dom.parseStyle(formObj.style.value);
|
206 |
-
|
207 |
-
st['background-color'] = formObj.bgcolor.value;
|
208 |
-
|
209 |
-
formObj.style.value = dom.serializeStyle(st);
|
210 |
-
}
|
211 |
-
|
212 |
-
tinyMCEPopup.onInit.add(init);
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
function init() {
|
4 |
+
tinyMCEPopup.resizeToInnerSize();
|
5 |
+
|
6 |
+
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
7 |
+
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
8 |
+
|
9 |
+
var inst = tinyMCEPopup.editor;
|
10 |
+
var dom = inst.dom;
|
11 |
+
var trElm = dom.getParent(inst.selection.getNode(), "tr");
|
12 |
+
var formObj = document.forms[0];
|
13 |
+
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
|
14 |
+
|
15 |
+
// Get table row data
|
16 |
+
var rowtype = trElm.parentNode.nodeName.toLowerCase();
|
17 |
+
var align = dom.getAttrib(trElm, 'align');
|
18 |
+
var valign = dom.getAttrib(trElm, 'valign');
|
19 |
+
var height = trimSize(getStyle(trElm, 'height', 'height'));
|
20 |
+
var className = dom.getAttrib(trElm, 'class');
|
21 |
+
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
|
22 |
+
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
|
23 |
+
var id = dom.getAttrib(trElm, 'id');
|
24 |
+
var lang = dom.getAttrib(trElm, 'lang');
|
25 |
+
var dir = dom.getAttrib(trElm, 'dir');
|
26 |
+
|
27 |
+
// Setup form
|
28 |
+
addClassesToList('class', 'table_row_styles');
|
29 |
+
TinyMCE_EditableSelects.init();
|
30 |
+
|
31 |
+
formObj.bgcolor.value = bgcolor;
|
32 |
+
formObj.backgroundimage.value = backgroundimage;
|
33 |
+
formObj.height.value = height;
|
34 |
+
formObj.id.value = id;
|
35 |
+
formObj.lang.value = lang;
|
36 |
+
formObj.style.value = dom.serializeStyle(st);
|
37 |
+
selectByValue(formObj, 'align', align);
|
38 |
+
selectByValue(formObj, 'valign', valign);
|
39 |
+
selectByValue(formObj, 'class', className, true, true);
|
40 |
+
selectByValue(formObj, 'rowtype', rowtype);
|
41 |
+
selectByValue(formObj, 'dir', dir);
|
42 |
+
|
43 |
+
// Resize some elements
|
44 |
+
if (isVisible('backgroundimagebrowser'))
|
45 |
+
document.getElementById('backgroundimage').style.width = '180px';
|
46 |
+
|
47 |
+
updateColor('bgcolor_pick', 'bgcolor');
|
48 |
+
}
|
49 |
+
|
50 |
+
function updateAction() {
|
51 |
+
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
|
52 |
+
var action = getSelectValue(formObj, 'action');
|
53 |
+
|
54 |
+
tinyMCEPopup.restoreSelection();
|
55 |
+
trElm = dom.getParent(inst.selection.getNode(), "tr");
|
56 |
+
tableElm = dom.getParent(inst.selection.getNode(), "table");
|
57 |
+
|
58 |
+
inst.execCommand('mceBeginUndoLevel');
|
59 |
+
|
60 |
+
switch (action) {
|
61 |
+
case "row":
|
62 |
+
updateRow(trElm);
|
63 |
+
break;
|
64 |
+
|
65 |
+
case "all":
|
66 |
+
var rows = tableElm.getElementsByTagName("tr");
|
67 |
+
|
68 |
+
for (var i=0; i<rows.length; i++)
|
69 |
+
updateRow(rows[i], true);
|
70 |
+
|
71 |
+
break;
|
72 |
+
|
73 |
+
case "odd":
|
74 |
+
case "even":
|
75 |
+
var rows = tableElm.getElementsByTagName("tr");
|
76 |
+
|
77 |
+
for (var i=0; i<rows.length; i++) {
|
78 |
+
if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
|
79 |
+
updateRow(rows[i], true, true);
|
80 |
+
}
|
81 |
+
|
82 |
+
break;
|
83 |
+
}
|
84 |
+
|
85 |
+
inst.addVisual();
|
86 |
+
inst.nodeChanged();
|
87 |
+
inst.execCommand('mceEndUndoLevel');
|
88 |
+
tinyMCEPopup.close();
|
89 |
+
}
|
90 |
+
|
91 |
+
function updateRow(tr_elm, skip_id, skip_parent) {
|
92 |
+
var inst = tinyMCEPopup.editor;
|
93 |
+
var formObj = document.forms[0];
|
94 |
+
var dom = inst.dom;
|
95 |
+
var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
|
96 |
+
var rowtype = getSelectValue(formObj, 'rowtype');
|
97 |
+
var doc = inst.getDoc();
|
98 |
+
|
99 |
+
// Update row element
|
100 |
+
if (!skip_id)
|
101 |
+
tr_elm.setAttribute('id', formObj.id.value);
|
102 |
+
|
103 |
+
tr_elm.setAttribute('align', getSelectValue(formObj, 'align'));
|
104 |
+
tr_elm.setAttribute('vAlign', getSelectValue(formObj, 'valign'));
|
105 |
+
tr_elm.setAttribute('lang', formObj.lang.value);
|
106 |
+
tr_elm.setAttribute('dir', getSelectValue(formObj, 'dir'));
|
107 |
+
tr_elm.setAttribute('style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
|
108 |
+
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
|
109 |
+
|
110 |
+
// Clear deprecated attributes
|
111 |
+
tr_elm.setAttribute('background', '');
|
112 |
+
tr_elm.setAttribute('bgColor', '');
|
113 |
+
tr_elm.setAttribute('height', '');
|
114 |
+
|
115 |
+
// Set styles
|
116 |
+
tr_elm.style.height = getCSSSize(formObj.height.value);
|
117 |
+
tr_elm.style.backgroundColor = formObj.bgcolor.value;
|
118 |
+
|
119 |
+
if (formObj.backgroundimage.value != "")
|
120 |
+
tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
121 |
+
else
|
122 |
+
tr_elm.style.backgroundImage = '';
|
123 |
+
|
124 |
+
// Setup new rowtype
|
125 |
+
if (curRowType != rowtype && !skip_parent) {
|
126 |
+
// first, clone the node we are working on
|
127 |
+
var newRow = tr_elm.cloneNode(1);
|
128 |
+
|
129 |
+
// next, find the parent of its new destination (creating it if necessary)
|
130 |
+
var theTable = dom.getParent(tr_elm, "table");
|
131 |
+
var dest = rowtype;
|
132 |
+
var newParent = null;
|
133 |
+
for (var i = 0; i < theTable.childNodes.length; i++) {
|
134 |
+
if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
|
135 |
+
newParent = theTable.childNodes[i];
|
136 |
+
}
|
137 |
+
|
138 |
+
if (newParent == null) {
|
139 |
+
newParent = doc.createElement(dest);
|
140 |
+
|
141 |
+
if (dest == "thead") {
|
142 |
+
if (theTable.firstChild.nodeName == 'CAPTION')
|
143 |
+
inst.dom.insertAfter(newParent, theTable.firstChild);
|
144 |
+
else
|
145 |
+
theTable.insertBefore(newParent, theTable.firstChild);
|
146 |
+
} else
|
147 |
+
theTable.appendChild(newParent);
|
148 |
+
}
|
149 |
+
|
150 |
+
// append the row to the new parent
|
151 |
+
newParent.appendChild(newRow);
|
152 |
+
|
153 |
+
// remove the original
|
154 |
+
tr_elm.parentNode.removeChild(tr_elm);
|
155 |
+
|
156 |
+
// set tr_elm to the new node
|
157 |
+
tr_elm = newRow;
|
158 |
+
}
|
159 |
+
|
160 |
+
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
|
161 |
+
}
|
162 |
+
|
163 |
+
function changedBackgroundImage() {
|
164 |
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
165 |
+
var st = dom.parseStyle(formObj.style.value);
|
166 |
+
|
167 |
+
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
168 |
+
|
169 |
+
formObj.style.value = dom.serializeStyle(st);
|
170 |
+
}
|
171 |
+
|
172 |
+
function changedStyle() {
|
173 |
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
174 |
+
var st = dom.parseStyle(formObj.style.value);
|
175 |
+
|
176 |
+
if (st['background-image'])
|
177 |
+
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
178 |
+
else
|
179 |
+
formObj.backgroundimage.value = '';
|
180 |
+
|
181 |
+
if (st['height'])
|
182 |
+
formObj.height.value = trimSize(st['height']);
|
183 |
+
|
184 |
+
if (st['background-color']) {
|
185 |
+
formObj.bgcolor.value = st['background-color'];
|
186 |
+
updateColor('bgcolor_pick','bgcolor');
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
function changedSize() {
|
191 |
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
192 |
+
var st = dom.parseStyle(formObj.style.value);
|
193 |
+
|
194 |
+
var height = formObj.height.value;
|
195 |
+
if (height != "")
|
196 |
+
st['height'] = getCSSSize(height);
|
197 |
+
else
|
198 |
+
st['height'] = "";
|
199 |
+
|
200 |
+
formObj.style.value = dom.serializeStyle(st);
|
201 |
+
}
|
202 |
+
|
203 |
+
function changedColor() {
|
204 |
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
205 |
+
var st = dom.parseStyle(formObj.style.value);
|
206 |
+
|
207 |
+
st['background-color'] = formObj.bgcolor.value;
|
208 |
+
|
209 |
+
formObj.style.value = dom.serializeStyle(st);
|
210 |
+
}
|
211 |
+
|
212 |
+
tinyMCEPopup.onInit.add(init);
|
mce/table/js/table.js
CHANGED
@@ -1,410 +1,413 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;
|
4 |
-
|
5 |
-
function insertTable() {
|
6 |
-
var formObj = document.forms[0];
|
7 |
-
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
8 |
-
var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
|
9 |
-
var html = '', capEl, elm;
|
10 |
-
var cellLimit, rowLimit, colLimit;
|
11 |
-
|
12 |
-
tinyMCEPopup.restoreSelection();
|
13 |
-
|
14 |
-
if (!AutoValidator.validate(formObj)) {
|
15 |
-
alert(inst.getLang('invalid_data'));
|
16 |
-
return false;
|
17 |
-
}
|
18 |
-
|
19 |
-
elm = dom.getParent(inst.selection.getNode(), 'table');
|
20 |
-
|
21 |
-
// Get form data
|
22 |
-
cols = formObj.elements['cols'].value;
|
23 |
-
rows = formObj.elements['rows'].value;
|
24 |
-
border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
|
25 |
-
cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
|
26 |
-
cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
|
27 |
-
align = formObj.elements['align'].options[formObj.elements['align'].selectedIndex].value;
|
28 |
-
frame = formObj.elements['frame'].options[formObj.elements['frame'].selectedIndex].value;
|
29 |
-
rules = formObj.elements['rules'].options[formObj.elements['rules'].selectedIndex].value;
|
30 |
-
width = formObj.elements['width'].value;
|
31 |
-
height = formObj.elements['height'].value;
|
32 |
-
bordercolor = formObj.elements['bordercolor'].value;
|
33 |
-
bgcolor = formObj.elements['bgcolor'].value;
|
34 |
-
className = formObj.elements['class'].options[formObj.elements['class'].selectedIndex].value;
|
35 |
-
id = formObj.elements['id'].value;
|
36 |
-
summary = formObj.elements['summary'].value;
|
37 |
-
style = formObj.elements['style'].value;
|
38 |
-
dir = formObj.elements['dir'].value;
|
39 |
-
lang = formObj.elements['lang'].value;
|
40 |
-
background = formObj.elements['backgroundimage'].value;
|
41 |
-
caption = formObj.elements['caption'].checked;
|
42 |
-
|
43 |
-
cellLimit = tinyMCEPopup.getParam('table_cell_limit', false);
|
44 |
-
rowLimit = tinyMCEPopup.getParam('table_row_limit', false);
|
45 |
-
colLimit = tinyMCEPopup.getParam('table_col_limit', false);
|
46 |
-
|
47 |
-
// Validate table size
|
48 |
-
if (colLimit && cols > colLimit) {
|
49 |
-
|
50 |
-
return false;
|
51 |
-
} else if (rowLimit && rows > rowLimit) {
|
52 |
-
|
53 |
-
return false;
|
54 |
-
} else if (cellLimit && cols * rows > cellLimit) {
|
55 |
-
|
56 |
-
return false;
|
57 |
-
}
|
58 |
-
|
59 |
-
// Update table
|
60 |
-
if (action == "update") {
|
61 |
-
inst.execCommand('mceBeginUndoLevel');
|
62 |
-
|
63 |
-
dom.setAttrib(elm, 'cellPadding', cellpadding, true);
|
64 |
-
dom.setAttrib(elm, 'cellSpacing', cellspacing, true);
|
65 |
-
dom.setAttrib(elm, 'border', border);
|
66 |
-
dom.setAttrib(elm, 'align', align);
|
67 |
-
dom.setAttrib(elm, 'frame', frame);
|
68 |
-
dom.setAttrib(elm, 'rules', rules);
|
69 |
-
dom.setAttrib(elm, 'class', className);
|
70 |
-
dom.setAttrib(elm, 'style', style);
|
71 |
-
dom.setAttrib(elm, 'id', id);
|
72 |
-
dom.setAttrib(elm, 'summary', summary);
|
73 |
-
dom.setAttrib(elm, 'dir', dir);
|
74 |
-
dom.setAttrib(elm, 'lang', lang);
|
75 |
-
|
76 |
-
capEl = inst.dom.select('caption', elm)[0];
|
77 |
-
|
78 |
-
if (capEl && !caption)
|
79 |
-
capEl.parentNode.removeChild(capEl);
|
80 |
-
|
81 |
-
if (!capEl && caption) {
|
82 |
-
capEl = elm.ownerDocument.createElement('caption');
|
83 |
-
|
84 |
-
if (!tinymce.isIE)
|
85 |
-
capEl.innerHTML = '<br mce_bogus="1"/>';
|
86 |
-
|
87 |
-
elm.insertBefore(capEl, elm.firstChild);
|
88 |
-
}
|
89 |
-
|
90 |
-
if (width &&
|
91 |
-
dom.setStyle(elm, 'width', width);
|
92 |
-
dom.setAttrib(elm, 'width', '');
|
93 |
-
} else {
|
94 |
-
dom.setAttrib(elm, 'width', width, true);
|
95 |
-
dom.setStyle(elm, 'width', '');
|
96 |
-
}
|
97 |
-
|
98 |
-
// Remove these since they are not valid XHTML
|
99 |
-
dom.setAttrib(elm, 'borderColor', '');
|
100 |
-
dom.setAttrib(elm, 'bgColor', '');
|
101 |
-
dom.setAttrib(elm, 'background', '');
|
102 |
-
|
103 |
-
if (height) {
|
104 |
-
dom.setStyle(elm, 'height', height);
|
105 |
-
dom.setAttrib(elm, 'height', '');
|
106 |
-
}
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
elm.style.
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
html +=
|
149 |
-
|
150 |
-
html += makeAttrib('
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
style
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
style
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
html += makeAttrib('
|
171 |
-
html += makeAttrib('
|
172 |
-
html += makeAttrib('
|
173 |
-
html += makeAttrib('
|
174 |
-
html += makeAttrib('
|
175 |
-
html += makeAttrib('
|
176 |
-
html += makeAttrib('
|
177 |
-
html += makeAttrib('
|
178 |
-
html += '
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
inst.execCommand('
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
value = value.replace(
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
document.getElementById('
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
var
|
245 |
-
var
|
246 |
-
var
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
if (
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
selectByValue(formObj, '
|
298 |
-
formObj
|
299 |
-
formObj
|
300 |
-
formObj
|
301 |
-
formObj.
|
302 |
-
formObj.
|
303 |
-
formObj.
|
304 |
-
formObj.
|
305 |
-
formObj.
|
306 |
-
formObj.
|
307 |
-
formObj.
|
308 |
-
formObj.
|
309 |
-
formObj.
|
310 |
-
formObj.
|
311 |
-
formObj.
|
312 |
-
formObj.
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
formObj.
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
}
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
formObj.
|
395 |
-
|
396 |
-
if (st['
|
397 |
-
formObj.
|
398 |
-
|
399 |
-
if (st['
|
400 |
-
formObj.
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
Â
|
|
Â
|
|
Â
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;
|
4 |
+
|
5 |
+
function insertTable() {
|
6 |
+
var formObj = document.forms[0];
|
7 |
+
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
8 |
+
var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
|
9 |
+
var html = '', capEl, elm;
|
10 |
+
var cellLimit, rowLimit, colLimit;
|
11 |
+
|
12 |
+
tinyMCEPopup.restoreSelection();
|
13 |
+
|
14 |
+
if (!AutoValidator.validate(formObj)) {
|
15 |
+
tinyMCEPopup.alert(inst.getLang('invalid_data'));
|
16 |
+
return false;
|
17 |
+
}
|
18 |
+
|
19 |
+
elm = dom.getParent(inst.selection.getNode(), 'table');
|
20 |
+
|
21 |
+
// Get form data
|
22 |
+
cols = formObj.elements['cols'].value;
|
23 |
+
rows = formObj.elements['rows'].value;
|
24 |
+
border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
|
25 |
+
cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
|
26 |
+
cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
|
27 |
+
align = formObj.elements['align'].options[formObj.elements['align'].selectedIndex].value;
|
28 |
+
frame = formObj.elements['frame'].options[formObj.elements['frame'].selectedIndex].value;
|
29 |
+
rules = formObj.elements['rules'].options[formObj.elements['rules'].selectedIndex].value;
|
30 |
+
width = formObj.elements['width'].value;
|
31 |
+
height = formObj.elements['height'].value;
|
32 |
+
bordercolor = formObj.elements['bordercolor'].value;
|
33 |
+
bgcolor = formObj.elements['bgcolor'].value;
|
34 |
+
className = formObj.elements['class'].options[formObj.elements['class'].selectedIndex].value;
|
35 |
+
id = formObj.elements['id'].value;
|
36 |
+
summary = formObj.elements['summary'].value;
|
37 |
+
style = formObj.elements['style'].value;
|
38 |
+
dir = formObj.elements['dir'].value;
|
39 |
+
lang = formObj.elements['lang'].value;
|
40 |
+
background = formObj.elements['backgroundimage'].value;
|
41 |
+
caption = formObj.elements['caption'].checked;
|
42 |
+
|
43 |
+
cellLimit = tinyMCEPopup.getParam('table_cell_limit', false);
|
44 |
+
rowLimit = tinyMCEPopup.getParam('table_row_limit', false);
|
45 |
+
colLimit = tinyMCEPopup.getParam('table_col_limit', false);
|
46 |
+
|
47 |
+
// Validate table size
|
48 |
+
if (colLimit && cols > colLimit) {
|
49 |
+
tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit));
|
50 |
+
return false;
|
51 |
+
} else if (rowLimit && rows > rowLimit) {
|
52 |
+
tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit));
|
53 |
+
return false;
|
54 |
+
} else if (cellLimit && cols * rows > cellLimit) {
|
55 |
+
tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit));
|
56 |
+
return false;
|
57 |
+
}
|
58 |
+
|
59 |
+
// Update table
|
60 |
+
if (action == "update") {
|
61 |
+
inst.execCommand('mceBeginUndoLevel');
|
62 |
+
|
63 |
+
dom.setAttrib(elm, 'cellPadding', cellpadding, true);
|
64 |
+
dom.setAttrib(elm, 'cellSpacing', cellspacing, true);
|
65 |
+
dom.setAttrib(elm, 'border', border);
|
66 |
+
dom.setAttrib(elm, 'align', align);
|
67 |
+
dom.setAttrib(elm, 'frame', frame);
|
68 |
+
dom.setAttrib(elm, 'rules', rules);
|
69 |
+
dom.setAttrib(elm, 'class', className);
|
70 |
+
dom.setAttrib(elm, 'style', style);
|
71 |
+
dom.setAttrib(elm, 'id', id);
|
72 |
+
dom.setAttrib(elm, 'summary', summary);
|
73 |
+
dom.setAttrib(elm, 'dir', dir);
|
74 |
+
dom.setAttrib(elm, 'lang', lang);
|
75 |
+
|
76 |
+
capEl = inst.dom.select('caption', elm)[0];
|
77 |
+
|
78 |
+
if (capEl && !caption)
|
79 |
+
capEl.parentNode.removeChild(capEl);
|
80 |
+
|
81 |
+
if (!capEl && caption) {
|
82 |
+
capEl = elm.ownerDocument.createElement('caption');
|
83 |
+
|
84 |
+
if (!tinymce.isIE)
|
85 |
+
capEl.innerHTML = '<br mce_bogus="1"/>';
|
86 |
+
|
87 |
+
elm.insertBefore(capEl, elm.firstChild);
|
88 |
+
}
|
89 |
+
|
90 |
+
if (width && inst.settings.inline_styles) {
|
91 |
+
dom.setStyle(elm, 'width', width);
|
92 |
+
dom.setAttrib(elm, 'width', '');
|
93 |
+
} else {
|
94 |
+
dom.setAttrib(elm, 'width', width, true);
|
95 |
+
dom.setStyle(elm, 'width', '');
|
96 |
+
}
|
97 |
+
|
98 |
+
// Remove these since they are not valid XHTML
|
99 |
+
dom.setAttrib(elm, 'borderColor', '');
|
100 |
+
dom.setAttrib(elm, 'bgColor', '');
|
101 |
+
dom.setAttrib(elm, 'background', '');
|
102 |
+
|
103 |
+
if (height && inst.settings.inline_styles) {
|
104 |
+
dom.setStyle(elm, 'height', height);
|
105 |
+
dom.setAttrib(elm, 'height', '');
|
106 |
+
} else {
|
107 |
+
dom.setAttrib(elm, 'height', height, true);
|
108 |
+
dom.setStyle(elm, 'height', '');
|
109 |
+
}
|
110 |
+
|
111 |
+
if (background != '')
|
112 |
+
elm.style.backgroundImage = "url('" + background + "')";
|
113 |
+
else
|
114 |
+
elm.style.backgroundImage = '';
|
115 |
+
|
116 |
+
/* if (tinyMCEPopup.getParam("inline_styles")) {
|
117 |
+
if (width != '')
|
118 |
+
elm.style.width = getCSSSize(width);
|
119 |
+
}*/
|
120 |
+
|
121 |
+
if (bordercolor != "") {
|
122 |
+
elm.style.borderColor = bordercolor;
|
123 |
+
elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
|
124 |
+
elm.style.borderWidth = border == "" ? "1px" : border;
|
125 |
+
} else
|
126 |
+
elm.style.borderColor = '';
|
127 |
+
|
128 |
+
elm.style.backgroundColor = bgcolor;
|
129 |
+
elm.style.height = getCSSSize(height);
|
130 |
+
|
131 |
+
inst.addVisual();
|
132 |
+
|
133 |
+
// Fix for stange MSIE align bug
|
134 |
+
//elm.outerHTML = elm.outerHTML;
|
135 |
+
|
136 |
+
inst.nodeChanged();
|
137 |
+
inst.execCommand('mceEndUndoLevel');
|
138 |
+
|
139 |
+
// Repaint if dimensions changed
|
140 |
+
if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
|
141 |
+
inst.execCommand('mceRepaint');
|
142 |
+
|
143 |
+
tinyMCEPopup.close();
|
144 |
+
return true;
|
145 |
+
}
|
146 |
+
|
147 |
+
// Create new table
|
148 |
+
html += '<table';
|
149 |
+
|
150 |
+
html += makeAttrib('id', id);
|
151 |
+
html += makeAttrib('border', border);
|
152 |
+
html += makeAttrib('cellpadding', cellpadding);
|
153 |
+
html += makeAttrib('cellspacing', cellspacing);
|
154 |
+
|
155 |
+
if (width && inst.settings.inline_styles) {
|
156 |
+
if (style)
|
157 |
+
style += '; ';
|
158 |
+
|
159 |
+
style += 'width: ' + width;
|
160 |
+
} else
|
161 |
+
html += makeAttrib('width', width);
|
162 |
+
|
163 |
+
/* if (height) {
|
164 |
+
if (style)
|
165 |
+
style += '; ';
|
166 |
+
|
167 |
+
style += 'height: ' + height;
|
168 |
+
}*/
|
169 |
+
|
170 |
+
//html += makeAttrib('height', height);
|
171 |
+
//html += makeAttrib('bordercolor', bordercolor);
|
172 |
+
//html += makeAttrib('bgcolor', bgcolor);
|
173 |
+
html += makeAttrib('align', align);
|
174 |
+
html += makeAttrib('frame', frame);
|
175 |
+
html += makeAttrib('rules', rules);
|
176 |
+
html += makeAttrib('class', className);
|
177 |
+
html += makeAttrib('style', style);
|
178 |
+
html += makeAttrib('summary', summary);
|
179 |
+
html += makeAttrib('dir', dir);
|
180 |
+
html += makeAttrib('lang', lang);
|
181 |
+
html += '>';
|
182 |
+
|
183 |
+
if (caption) {
|
184 |
+
if (!tinymce.isIE)
|
185 |
+
html += '<caption><br mce_bogus="1"/></caption>';
|
186 |
+
else
|
187 |
+
html += '<caption></caption>';
|
188 |
+
}
|
189 |
+
|
190 |
+
for (var y=0; y<rows; y++) {
|
191 |
+
html += "<tr>";
|
192 |
+
|
193 |
+
for (var x=0; x<cols; x++) {
|
194 |
+
if (!tinymce.isIE)
|
195 |
+
html += '<td><br mce_bogus="1"/></td>';
|
196 |
+
else
|
197 |
+
html += '<td></td>';
|
198 |
+
}
|
199 |
+
|
200 |
+
html += "</tr>";
|
201 |
+
}
|
202 |
+
|
203 |
+
html += "</table>";
|
204 |
+
|
205 |
+
inst.execCommand('mceBeginUndoLevel');
|
206 |
+
inst.execCommand('mceInsertContent', false, html);
|
207 |
+
inst.addVisual();
|
208 |
+
inst.execCommand('mceEndUndoLevel');
|
209 |
+
|
210 |
+
tinyMCEPopup.close();
|
211 |
+
}
|
212 |
+
|
213 |
+
function makeAttrib(attrib, value) {
|
214 |
+
var formObj = document.forms[0];
|
215 |
+
var valueElm = formObj.elements[attrib];
|
216 |
+
|
217 |
+
if (typeof(value) == "undefined" || value == null) {
|
218 |
+
value = "";
|
219 |
+
|
220 |
+
if (valueElm)
|
221 |
+
value = valueElm.value;
|
222 |
+
}
|
223 |
+
|
224 |
+
if (value == "")
|
225 |
+
return "";
|
226 |
+
|
227 |
+
// XML encode it
|
228 |
+
value = value.replace(/&/g, '&');
|
229 |
+
value = value.replace(/\"/g, '"');
|
230 |
+
value = value.replace(/</g, '<');
|
231 |
+
value = value.replace(/>/g, '>');
|
232 |
+
|
233 |
+
return ' ' + attrib + '="' + value + '"';
|
234 |
+
}
|
235 |
+
|
236 |
+
function init() {
|
237 |
+
tinyMCEPopup.resizeToInnerSize();
|
238 |
+
|
239 |
+
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
240 |
+
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
241 |
+
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
242 |
+
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
243 |
+
|
244 |
+
var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', '');
|
245 |
+
var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
|
246 |
+
var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules, frame;
|
247 |
+
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
248 |
+
var formObj = document.forms[0];
|
249 |
+
var elm = dom.getParent(inst.selection.getNode(), "table");
|
250 |
+
|
251 |
+
action = tinyMCEPopup.getWindowArg('action');
|
252 |
+
|
253 |
+
if (!action)
|
254 |
+
action = elm ? "update" : "insert";
|
255 |
+
|
256 |
+
if (elm && action != "insert") {
|
257 |
+
var rowsAr = elm.rows;
|
258 |
+
var cols = 0;
|
259 |
+
for (var i=0; i<rowsAr.length; i++)
|
260 |
+
if (rowsAr[i].cells.length > cols)
|
261 |
+
cols = rowsAr[i].cells.length;
|
262 |
+
|
263 |
+
cols = cols;
|
264 |
+
rows = rowsAr.length;
|
265 |
+
|
266 |
+
st = dom.parseStyle(dom.getAttrib(elm, "style"));
|
267 |
+
border = trimSize(getStyle(elm, 'border', 'borderWidth'));
|
268 |
+
cellpadding = dom.getAttrib(elm, 'cellpadding', "");
|
269 |
+
cellspacing = dom.getAttrib(elm, 'cellspacing', "");
|
270 |
+
width = trimSize(getStyle(elm, 'width', 'width'));
|
271 |
+
height = trimSize(getStyle(elm, 'height', 'height'));
|
272 |
+
bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor'));
|
273 |
+
bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor'));
|
274 |
+
align = dom.getAttrib(elm, 'align', align);
|
275 |
+
frame = dom.getAttrib(elm, 'frame');
|
276 |
+
rules = dom.getAttrib(elm, 'rules');
|
277 |
+
className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, ''));
|
278 |
+
id = dom.getAttrib(elm, 'id');
|
279 |
+
summary = dom.getAttrib(elm, 'summary');
|
280 |
+
style = dom.serializeStyle(st);
|
281 |
+
dir = dom.getAttrib(elm, 'dir');
|
282 |
+
lang = dom.getAttrib(elm, 'lang');
|
283 |
+
background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
284 |
+
formObj.caption.checked = elm.getElementsByTagName('caption').length > 0;
|
285 |
+
|
286 |
+
orgTableWidth = width;
|
287 |
+
orgTableHeight = height;
|
288 |
+
|
289 |
+
action = "update";
|
290 |
+
formObj.insert.value = inst.getLang('update');
|
291 |
+
}
|
292 |
+
|
293 |
+
addClassesToList('class', "table_styles");
|
294 |
+
TinyMCE_EditableSelects.init();
|
295 |
+
|
296 |
+
// Update form
|
297 |
+
selectByValue(formObj, 'align', align);
|
298 |
+
selectByValue(formObj, 'frame', frame);
|
299 |
+
selectByValue(formObj, 'rules', rules);
|
300 |
+
selectByValue(formObj, 'class', className, true, true);
|
301 |
+
formObj.cols.value = cols;
|
302 |
+
formObj.rows.value = rows;
|
303 |
+
formObj.border.value = border;
|
304 |
+
formObj.cellpadding.value = cellpadding;
|
305 |
+
formObj.cellspacing.value = cellspacing;
|
306 |
+
formObj.width.value = width;
|
307 |
+
formObj.height.value = height;
|
308 |
+
formObj.bordercolor.value = bordercolor;
|
309 |
+
formObj.bgcolor.value = bgcolor;
|
310 |
+
formObj.id.value = id;
|
311 |
+
formObj.summary.value = summary;
|
312 |
+
formObj.style.value = style;
|
313 |
+
formObj.dir.value = dir;
|
314 |
+
formObj.lang.value = lang;
|
315 |
+
formObj.backgroundimage.value = background;
|
316 |
+
|
317 |
+
updateColor('bordercolor_pick', 'bordercolor');
|
318 |
+
updateColor('bgcolor_pick', 'bgcolor');
|
319 |
+
|
320 |
+
// Resize some elements
|
321 |
+
if (isVisible('backgroundimagebrowser'))
|
322 |
+
document.getElementById('backgroundimage').style.width = '180px';
|
323 |
+
|
324 |
+
// Disable some fields in update mode
|
325 |
+
if (action == "update") {
|
326 |
+
formObj.cols.disabled = true;
|
327 |
+
formObj.rows.disabled = true;
|
328 |
+
}
|
329 |
+
}
|
330 |
+
|
331 |
+
function changedSize() {
|
332 |
+
var formObj = document.forms[0];
|
333 |
+
var st = dom.parseStyle(formObj.style.value);
|
334 |
+
|
335 |
+
/* var width = formObj.width.value;
|
336 |
+
if (width != "")
|
337 |
+
st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : "";
|
338 |
+
else
|
339 |
+
st['width'] = "";*/
|
340 |
+
|
341 |
+
var height = formObj.height.value;
|
342 |
+
if (height != "")
|
343 |
+
st['height'] = getCSSSize(height);
|
344 |
+
else
|
345 |
+
st['height'] = "";
|
346 |
+
|
347 |
+
formObj.style.value = dom.serializeStyle(st);
|
348 |
+
}
|
349 |
+
|
350 |
+
function changedBackgroundImage() {
|
351 |
+
var formObj = document.forms[0];
|
352 |
+
var st = dom.parseStyle(formObj.style.value);
|
353 |
+
|
354 |
+
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
355 |
+
|
356 |
+
formObj.style.value = dom.serializeStyle(st);
|
357 |
+
}
|
358 |
+
|
359 |
+
function changedBorder() {
|
360 |
+
var formObj = document.forms[0];
|
361 |
+
var st = dom.parseStyle(formObj.style.value);
|
362 |
+
|
363 |
+
// Update border width if the element has a color
|
364 |
+
if (formObj.border.value != "" && formObj.bordercolor.value != "")
|
365 |
+
st['border-width'] = formObj.border.value + "px";
|
366 |
+
|
367 |
+
formObj.style.value = dom.serializeStyle(st);
|
368 |
+
}
|
369 |
+
|
370 |
+
function changedColor() {
|
371 |
+
var formObj = document.forms[0];
|
372 |
+
var st = dom.parseStyle(formObj.style.value);
|
373 |
+
|
374 |
+
st['background-color'] = formObj.bgcolor.value;
|
375 |
+
|
376 |
+
if (formObj.bordercolor.value != "") {
|
377 |
+
st['border-color'] = formObj.bordercolor.value;
|
378 |
+
|
379 |
+
// Add border-width if it's missing
|
380 |
+
if (!st['border-width'])
|
381 |
+
st['border-width'] = formObj.border.value == "" ? "1px" : formObj.border.value + "px";
|
382 |
+
}
|
383 |
+
|
384 |
+
formObj.style.value = dom.serializeStyle(st);
|
385 |
+
}
|
386 |
+
|
387 |
+
function changedStyle() {
|
388 |
+
var formObj = document.forms[0];
|
389 |
+
var st = dom.parseStyle(formObj.style.value);
|
390 |
+
|
391 |
+
if (st['background-image'])
|
392 |
+
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
393 |
+
else
|
394 |
+
formObj.backgroundimage.value = '';
|
395 |
+
|
396 |
+
if (st['width'])
|
397 |
+
formObj.width.value = trimSize(st['width']);
|
398 |
+
|
399 |
+
if (st['height'])
|
400 |
+
formObj.height.value = trimSize(st['height']);
|
401 |
+
|
402 |
+
if (st['background-color']) {
|
403 |
+
formObj.bgcolor.value = st['background-color'];
|
404 |
+
updateColor('bgcolor_pick','bgcolor');
|
405 |
+
}
|
406 |
+
|
407 |
+
if (st['border-color']) {
|
408 |
+
formObj.bordercolor.value = st['border-color'];
|
409 |
+
updateColor('bordercolor_pick','bordercolor');
|
410 |
+
}
|
411 |
+
}
|
412 |
+
|
413 |
+
tinyMCEPopup.onInit.add(init);
|
mce/table/langs/en_dlg.js
CHANGED
@@ -1,74 +1,74 @@
|
|
1 |
-
tinyMCE.addI18n('en.table_dlg',{
|
2 |
-
general_tab:"General",
|
3 |
-
advanced_tab:"Advanced",
|
4 |
-
general_props:"General properties",
|
5 |
-
advanced_props:"Advanced properties",
|
6 |
-
rowtype:"Row in table part",
|
7 |
-
title:"Insert/Modify table",
|
8 |
-
width:"Width",
|
9 |
-
height:"Height",
|
10 |
-
cols:"Cols",
|
11 |
-
rows:"Rows",
|
12 |
-
cellspacing:"Cellspacing",
|
13 |
-
cellpadding:"Cellpadding",
|
14 |
-
border:"Border",
|
15 |
-
align:"Alignment",
|
16 |
-
align_default:"Default",
|
17 |
-
align_left:"Left",
|
18 |
-
align_right:"Right",
|
19 |
-
align_middle:"Center",
|
20 |
-
row_title:"Table row properties",
|
21 |
-
cell_title:"Table cell properties",
|
22 |
-
cell_type:"Cell type",
|
23 |
-
valign:"Vertical alignment",
|
24 |
-
align_top:"Top",
|
25 |
-
align_bottom:"Bottom",
|
26 |
-
bordercolor:"Border color",
|
27 |
-
bgcolor:"Background color",
|
28 |
-
merge_cells_title:"Merge table cells",
|
29 |
-
id:"Id",
|
30 |
-
style:"Style",
|
31 |
-
langdir:"Language direction",
|
32 |
-
langcode:"Language code",
|
33 |
-
mime:"Target MIME type",
|
34 |
-
ltr:"Left to right",
|
35 |
-
rtl:"Right to left",
|
36 |
-
bgimage:"Background image",
|
37 |
-
summary:"Summary",
|
38 |
-
td:"Data",
|
39 |
-
th:"Header",
|
40 |
-
cell_cell:"Update current cell",
|
41 |
-
cell_row:"Update all cells in row",
|
42 |
-
cell_all:"Update all cells in table",
|
43 |
-
row_row:"Update current row",
|
44 |
-
row_odd:"Update odd rows in table",
|
45 |
-
row_even:"Update even rows in table",
|
46 |
-
row_all:"Update all rows in table",
|
47 |
-
thead:"Table Head",
|
48 |
-
tbody:"Table Body",
|
49 |
-
tfoot:"Table Foot",
|
50 |
-
scope:"Scope",
|
51 |
-
rowgroup:"Row Group",
|
52 |
-
colgroup:"Col Group",
|
53 |
-
col_limit:"You've exceeded the maximum number of columns of {$cols}.",
|
54 |
-
row_limit:"You've exceeded the maximum number of rows of {$rows}.",
|
55 |
-
cell_limit:"You've exceeded the maximum number of cells of {$cells}.",
|
56 |
-
missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.",
|
57 |
-
caption:"Table caption",
|
58 |
-
frame:"Frame",
|
59 |
-
frame_none:"none",
|
60 |
-
frame_groups:"groups",
|
61 |
-
frame_rows:"rows",
|
62 |
-
frame_cols:"cols",
|
63 |
-
frame_all:"all",
|
64 |
-
rules:"Rules",
|
65 |
-
rules_void:"void",
|
66 |
-
rules_above:"above",
|
67 |
-
rules_below:"below",
|
68 |
-
rules_hsides:"hsides",
|
69 |
-
rules_lhs:"lhs",
|
70 |
-
rules_rhs:"rhs",
|
71 |
-
rules_vsides:"vsides",
|
72 |
-
rules_box:"box",
|
73 |
-
rules_border:"border"
|
74 |
Â
});
|
1 |
+
tinyMCE.addI18n('en.table_dlg',{
|
2 |
+
general_tab:"General",
|
3 |
+
advanced_tab:"Advanced",
|
4 |
+
general_props:"General properties",
|
5 |
+
advanced_props:"Advanced properties",
|
6 |
+
rowtype:"Row in table part",
|
7 |
+
title:"Insert/Modify table",
|
8 |
+
width:"Width",
|
9 |
+
height:"Height",
|
10 |
+
cols:"Cols",
|
11 |
+
rows:"Rows",
|
12 |
+
cellspacing:"Cellspacing",
|
13 |
+
cellpadding:"Cellpadding",
|
14 |
+
border:"Border",
|
15 |
+
align:"Alignment",
|
16 |
+
align_default:"Default",
|
17 |
+
align_left:"Left",
|
18 |
+
align_right:"Right",
|
19 |
+
align_middle:"Center",
|
20 |
+
row_title:"Table row properties",
|
21 |
+
cell_title:"Table cell properties",
|
22 |
+
cell_type:"Cell type",
|
23 |
+
valign:"Vertical alignment",
|
24 |
+
align_top:"Top",
|
25 |
+
align_bottom:"Bottom",
|
26 |
+
bordercolor:"Border color",
|
27 |
+
bgcolor:"Background color",
|
28 |
+
merge_cells_title:"Merge table cells",
|
29 |
+
id:"Id",
|
30 |
+
style:"Style",
|
31 |
+
langdir:"Language direction",
|
32 |
+
langcode:"Language code",
|
33 |
+
mime:"Target MIME type",
|
34 |
+
ltr:"Left to right",
|
35 |
+
rtl:"Right to left",
|
36 |
+
bgimage:"Background image",
|
37 |
+
summary:"Summary",
|
38 |
+
td:"Data",
|
39 |
+
th:"Header",
|
40 |
+
cell_cell:"Update current cell",
|
41 |
+
cell_row:"Update all cells in row",
|
42 |
+
cell_all:"Update all cells in table",
|
43 |
+
row_row:"Update current row",
|
44 |
+
row_odd:"Update odd rows in table",
|
45 |
+
row_even:"Update even rows in table",
|
46 |
+
row_all:"Update all rows in table",
|
47 |
+
thead:"Table Head",
|
48 |
+
tbody:"Table Body",
|
49 |
+
tfoot:"Table Foot",
|
50 |
+
scope:"Scope",
|
51 |
+
rowgroup:"Row Group",
|
52 |
+
colgroup:"Col Group",
|
53 |
+
col_limit:"You've exceeded the maximum number of columns of {$cols}.",
|
54 |
+
row_limit:"You've exceeded the maximum number of rows of {$rows}.",
|
55 |
+
cell_limit:"You've exceeded the maximum number of cells of {$cells}.",
|
56 |
+
missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.",
|
57 |
+
caption:"Table caption",
|
58 |
+
frame:"Frame",
|
59 |
+
frame_none:"none",
|
60 |
+
frame_groups:"groups",
|
61 |
+
frame_rows:"rows",
|
62 |
+
frame_cols:"cols",
|
63 |
+
frame_all:"all",
|
64 |
+
rules:"Rules",
|
65 |
+
rules_void:"void",
|
66 |
+
rules_above:"above",
|
67 |
+
rules_below:"below",
|
68 |
+
rules_hsides:"hsides",
|
69 |
+
rules_lhs:"lhs",
|
70 |
+
rules_rhs:"rhs",
|
71 |
+
rules_vsides:"vsides",
|
72 |
+
rules_box:"box",
|
73 |
+
rules_border:"border"
|
74 |
Â
});
|
mce/table/langs/langs.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
-
$strings
|
6 |
-
else
|
7 |
-
|
Â
|
|
Â
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
+
$strings = tdav_get_file($lang_file);
|
6 |
+
else {
|
7 |
+
$strings = tdav_get_file(dirname(__FILE__) . '/en_dlg.js');
|
8 |
+
$strings = preg_replace( '/([\'"])en\./', '$1'.$mce_locale.'.', $strings, 1 );
|
9 |
+
}
|
mce/table/merge_cells.htm
CHANGED
@@ -1,38 +1,38 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#table_dlg.merge_cells_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/validate.js?ver=
|
8 |
-
<script type="text/javascript" src="js/merge_cells.js?ver=
|
9 |
-
<base target="_self" />
|
10 |
-
</head>
|
11 |
-
<body style="margin: 8px" style="display: none">
|
12 |
-
<form onsubmit="mergeCells();return false;" action="#">
|
13 |
-
<fieldset>
|
14 |
-
<legend>{#table_dlg.merge_cells_title}</legend>
|
15 |
-
<table border="0" cellpadding="0" cellspacing="3" width="100%">
|
16 |
-
<tr>
|
17 |
-
<td>{#table_dlg.cols}:</td>
|
18 |
-
<td align="right"><input type="text" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" /></td>
|
19 |
-
</tr>
|
20 |
-
<tr>
|
21 |
-
<td>{#table_dlg.rows}:</td>
|
22 |
-
<td align="right"><input type="text" name="numrows" value="" class="number min1" style="width: 30px" /></td>
|
23 |
-
</tr>
|
24 |
-
</table>
|
25 |
-
</fieldset>
|
26 |
-
|
27 |
-
<div class="mceActionPanel">
|
28 |
-
<div style="float: left">
|
29 |
-
<input type="submit" id="insert" name="insert" value="{#update}" />
|
30 |
-
</div>
|
31 |
-
|
32 |
-
<div style="float: right">
|
33 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
34 |
-
</div>
|
35 |
-
</div>
|
36 |
-
</form>
|
37 |
-
</body>
|
38 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#table_dlg.merge_cells_title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/validate.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="js/merge_cells.js?ver=3211"></script>
|
9 |
+
<base target="_self" />
|
10 |
+
</head>
|
11 |
+
<body style="margin: 8px" style="display: none">
|
12 |
+
<form onsubmit="mergeCells();return false;" action="#">
|
13 |
+
<fieldset>
|
14 |
+
<legend>{#table_dlg.merge_cells_title}</legend>
|
15 |
+
<table border="0" cellpadding="0" cellspacing="3" width="100%">
|
16 |
+
<tr>
|
17 |
+
<td>{#table_dlg.cols}:</td>
|
18 |
+
<td align="right"><input type="text" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" /></td>
|
19 |
+
</tr>
|
20 |
+
<tr>
|
21 |
+
<td>{#table_dlg.rows}:</td>
|
22 |
+
<td align="right"><input type="text" name="numrows" value="" class="number min1" style="width: 30px" /></td>
|
23 |
+
</tr>
|
24 |
+
</table>
|
25 |
+
</fieldset>
|
26 |
+
|
27 |
+
<div class="mceActionPanel">
|
28 |
+
<div style="float: left">
|
29 |
+
<input type="submit" id="insert" name="insert" value="{#update}" />
|
30 |
+
</div>
|
31 |
+
|
32 |
+
<div style="float: right">
|
33 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
+
</form>
|
37 |
+
</body>
|
38 |
+
</html>
|
mce/table/row.htm
CHANGED
@@ -1,161 +1,161 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#table_dlg.row_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/editable_selects.js?ver=
|
9 |
-
<script type="text/javascript" src="js/row.js?ver=
|
10 |
-
<link href="css/row.css?ver=
|
11 |
-
<base target="_self" />
|
12 |
-
</head>
|
13 |
-
<body id="tablerow" style="display: none">
|
14 |
-
<form onsubmit="updateAction();return false;">
|
15 |
-
<div class="tabs">
|
16 |
-
<ul>
|
17 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
18 |
-
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
19 |
-
</ul>
|
20 |
-
</div>
|
21 |
-
|
22 |
-
<div class="panel_wrapper">
|
23 |
-
<div id="general_panel" class="panel current">
|
24 |
-
<fieldset>
|
25 |
-
<legend>{#table_dlg.general_props}</legend>
|
26 |
-
|
27 |
-
<table border="0" cellpadding="4" cellspacing="0">
|
28 |
-
<tr>
|
29 |
-
<td><label for="rowtype">{#table_dlg.rowtype}</label></td>
|
30 |
-
<td class="col2">
|
31 |
-
<select id="rowtype" name="rowtype" class="mceFocus">
|
32 |
-
<option value="thead">{#table_dlg.thead}</option>
|
33 |
-
<option value="tbody">{#table_dlg.tbody}</option>
|
34 |
-
<option value="tfoot">{#table_dlg.tfoot}</option>
|
35 |
-
</select>
|
36 |
-
</td>
|
37 |
-
</tr>
|
38 |
-
|
39 |
-
<tr>
|
40 |
-
<td><label for="align">{#table_dlg.align}</label></td>
|
41 |
-
<td class="col2">
|
42 |
-
<select id="align" name="align">
|
43 |
-
<option value="">{#not_set}</option>
|
44 |
-
<option value="center">{#table_dlg.align_middle}</option>
|
45 |
-
<option value="left">{#table_dlg.align_left}</option>
|
46 |
-
<option value="right">{#table_dlg.align_right}</option>
|
47 |
-
</select>
|
48 |
-
</td>
|
49 |
-
</tr>
|
50 |
-
|
51 |
-
<tr>
|
52 |
-
<td><label for="valign">{#table_dlg.valign}</label></td>
|
53 |
-
<td class="col2">
|
54 |
-
<select id="valign" name="valign">
|
55 |
-
<option value="">{#not_set}</option>
|
56 |
-
<option value="top">{#table_dlg.align_top}</option>
|
57 |
-
<option value="middle">{#table_dlg.align_middle}</option>
|
58 |
-
<option value="bottom">{#table_dlg.align_bottom}</option>
|
59 |
-
</select>
|
60 |
-
</td>
|
61 |
-
</tr>
|
62 |
-
|
63 |
-
<tr id="styleSelectRow">
|
64 |
-
<td><label for="class">{#class_name}</label></td>
|
65 |
-
<td class="col2">
|
66 |
-
<select id="class" name="class" class="mceEditableSelect">
|
67 |
-
<option value="" selected="selected">{#not_set}</option>
|
68 |
-
</select>
|
69 |
-
</td>
|
70 |
-
</tr>
|
71 |
-
|
72 |
-
<tr>
|
73 |
-
<td><label for="height">{#table_dlg.height}</label></td>
|
74 |
-
<td class="col2"><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
75 |
-
</tr>
|
76 |
-
</table>
|
77 |
-
</fieldset>
|
78 |
-
</div>
|
79 |
-
|
80 |
-
<div id="advanced_panel" class="panel">
|
81 |
-
<fieldset>
|
82 |
-
<legend>{#table_dlg.advanced_props}</legend>
|
83 |
-
|
84 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
85 |
-
<tr>
|
86 |
-
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
87 |
-
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
88 |
-
</tr>
|
89 |
-
|
90 |
-
<tr>
|
91 |
-
<td><label for="style">{#table_dlg.style}</label></td>
|
92 |
-
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
93 |
-
</tr>
|
94 |
-
|
95 |
-
<tr>
|
96 |
-
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
97 |
-
<td>
|
98 |
-
<select id="dir" name="dir" style="width: 200px">
|
99 |
-
<option value="">{#not_set}</option>
|
100 |
-
<option value="ltr">{#table_dlg.ltr}</option>
|
101 |
-
<option value="rtl">{#table_dlg.rtl}</option>
|
102 |
-
</select>
|
103 |
-
</td>
|
104 |
-
</tr>
|
105 |
-
|
106 |
-
<tr>
|
107 |
-
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
108 |
-
<td>
|
109 |
-
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
110 |
-
</td>
|
111 |
-
</tr>
|
112 |
-
|
113 |
-
<tr>
|
114 |
-
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
115 |
-
<td>
|
116 |
-
<table border="0" cellpadding="0" cellspacing="0">
|
117 |
-
<tr>
|
118 |
-
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
119 |
-
<td id="backgroundimagebrowsercontainer"> </td>
|
120 |
-
</tr>
|
121 |
-
</table>
|
122 |
-
</td>
|
123 |
-
</tr>
|
124 |
-
|
125 |
-
<tr>
|
126 |
-
<td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
127 |
-
<td>
|
128 |
-
<table border="0" cellpadding="0" cellspacing="0">
|
129 |
-
<tr>
|
130 |
-
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
131 |
-
<td id="bgcolor_pickcontainer"> </td>
|
132 |
-
</tr>
|
133 |
-
</table>
|
134 |
-
</td>
|
135 |
-
</tr>
|
136 |
-
</table>
|
137 |
-
</fieldset>
|
138 |
-
</div>
|
139 |
-
</div>
|
140 |
-
|
141 |
-
<div class="mceActionPanel">
|
142 |
-
<div>
|
143 |
-
<select id="action" name="action">
|
144 |
-
<option value="row">{#table_dlg.row_row}</option>
|
145 |
-
<option value="odd">{#table_dlg.row_odd}</option>
|
146 |
-
<option value="even">{#table_dlg.row_even}</option>
|
147 |
-
<option value="all">{#table_dlg.row_all}</option>
|
148 |
-
</select>
|
149 |
-
</div>
|
150 |
-
|
151 |
-
<div style="float: left">
|
152 |
-
<div><input type="submit" id="insert" name="insert" value="{#update}" /></div>
|
153 |
-
</div>
|
154 |
-
|
155 |
-
<div style="float: right">
|
156 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
157 |
-
</div>
|
158 |
-
</div>
|
159 |
-
</form>
|
160 |
-
</body>
|
161 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#table_dlg.row_title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/editable_selects.js?ver=3211"></script>
|
9 |
+
<script type="text/javascript" src="js/row.js?ver=3211"></script>
|
10 |
+
<link href="css/row.css?ver=3211" rel="stylesheet" type="text/css" />
|
11 |
+
<base target="_self" />
|
12 |
+
</head>
|
13 |
+
<body id="tablerow" style="display: none">
|
14 |
+
<form onsubmit="updateAction();return false;">
|
15 |
+
<div class="tabs">
|
16 |
+
<ul>
|
17 |
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
18 |
+
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
19 |
+
</ul>
|
20 |
+
</div>
|
21 |
+
|
22 |
+
<div class="panel_wrapper">
|
23 |
+
<div id="general_panel" class="panel current">
|
24 |
+
<fieldset>
|
25 |
+
<legend>{#table_dlg.general_props}</legend>
|
26 |
+
|
27 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
28 |
+
<tr>
|
29 |
+
<td><label for="rowtype">{#table_dlg.rowtype}</label></td>
|
30 |
+
<td class="col2">
|
31 |
+
<select id="rowtype" name="rowtype" class="mceFocus">
|
32 |
+
<option value="thead">{#table_dlg.thead}</option>
|
33 |
+
<option value="tbody">{#table_dlg.tbody}</option>
|
34 |
+
<option value="tfoot">{#table_dlg.tfoot}</option>
|
35 |
+
</select>
|
36 |
+
</td>
|
37 |
+
</tr>
|
38 |
+
|
39 |
+
<tr>
|
40 |
+
<td><label for="align">{#table_dlg.align}</label></td>
|
41 |
+
<td class="col2">
|
42 |
+
<select id="align" name="align">
|
43 |
+
<option value="">{#not_set}</option>
|
44 |
+
<option value="center">{#table_dlg.align_middle}</option>
|
45 |
+
<option value="left">{#table_dlg.align_left}</option>
|
46 |
+
<option value="right">{#table_dlg.align_right}</option>
|
47 |
+
</select>
|
48 |
+
</td>
|
49 |
+
</tr>
|
50 |
+
|
51 |
+
<tr>
|
52 |
+
<td><label for="valign">{#table_dlg.valign}</label></td>
|
53 |
+
<td class="col2">
|
54 |
+
<select id="valign" name="valign">
|
55 |
+
<option value="">{#not_set}</option>
|
56 |
+
<option value="top">{#table_dlg.align_top}</option>
|
57 |
+
<option value="middle">{#table_dlg.align_middle}</option>
|
58 |
+
<option value="bottom">{#table_dlg.align_bottom}</option>
|
59 |
+
</select>
|
60 |
+
</td>
|
61 |
+
</tr>
|
62 |
+
|
63 |
+
<tr id="styleSelectRow">
|
64 |
+
<td><label for="class">{#class_name}</label></td>
|
65 |
+
<td class="col2">
|
66 |
+
<select id="class" name="class" class="mceEditableSelect">
|
67 |
+
<option value="" selected="selected">{#not_set}</option>
|
68 |
+
</select>
|
69 |
+
</td>
|
70 |
+
</tr>
|
71 |
+
|
72 |
+
<tr>
|
73 |
+
<td><label for="height">{#table_dlg.height}</label></td>
|
74 |
+
<td class="col2"><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
75 |
+
</tr>
|
76 |
+
</table>
|
77 |
+
</fieldset>
|
78 |
+
</div>
|
79 |
+
|
80 |
+
<div id="advanced_panel" class="panel">
|
81 |
+
<fieldset>
|
82 |
+
<legend>{#table_dlg.advanced_props}</legend>
|
83 |
+
|
84 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
85 |
+
<tr>
|
86 |
+
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
87 |
+
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
88 |
+
</tr>
|
89 |
+
|
90 |
+
<tr>
|
91 |
+
<td><label for="style">{#table_dlg.style}</label></td>
|
92 |
+
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
93 |
+
</tr>
|
94 |
+
|
95 |
+
<tr>
|
96 |
+
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
97 |
+
<td>
|
98 |
+
<select id="dir" name="dir" style="width: 200px">
|
99 |
+
<option value="">{#not_set}</option>
|
100 |
+
<option value="ltr">{#table_dlg.ltr}</option>
|
101 |
+
<option value="rtl">{#table_dlg.rtl}</option>
|
102 |
+
</select>
|
103 |
+
</td>
|
104 |
+
</tr>
|
105 |
+
|
106 |
+
<tr>
|
107 |
+
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
108 |
+
<td>
|
109 |
+
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
110 |
+
</td>
|
111 |
+
</tr>
|
112 |
+
|
113 |
+
<tr>
|
114 |
+
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
115 |
+
<td>
|
116 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
117 |
+
<tr>
|
118 |
+
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
119 |
+
<td id="backgroundimagebrowsercontainer"> </td>
|
120 |
+
</tr>
|
121 |
+
</table>
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
|
125 |
+
<tr>
|
126 |
+
<td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
127 |
+
<td>
|
128 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
129 |
+
<tr>
|
130 |
+
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
131 |
+
<td id="bgcolor_pickcontainer"> </td>
|
132 |
+
</tr>
|
133 |
+
</table>
|
134 |
+
</td>
|
135 |
+
</tr>
|
136 |
+
</table>
|
137 |
+
</fieldset>
|
138 |
+
</div>
|
139 |
+
</div>
|
140 |
+
|
141 |
+
<div class="mceActionPanel">
|
142 |
+
<div>
|
143 |
+
<select id="action" name="action">
|
144 |
+
<option value="row">{#table_dlg.row_row}</option>
|
145 |
+
<option value="odd">{#table_dlg.row_odd}</option>
|
146 |
+
<option value="even">{#table_dlg.row_even}</option>
|
147 |
+
<option value="all">{#table_dlg.row_all}</option>
|
148 |
+
</select>
|
149 |
+
</div>
|
150 |
+
|
151 |
+
<div style="float: left">
|
152 |
+
<div><input type="submit" id="insert" name="insert" value="{#update}" /></div>
|
153 |
+
</div>
|
154 |
+
|
155 |
+
<div style="float: right">
|
156 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
</form>
|
160 |
+
</body>
|
161 |
+
</html>
|
mce/table/table.htm
CHANGED
@@ -1,193 +1,193 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#table_dlg.title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/validate.js?ver=
|
9 |
-
<script type="text/javascript" src="../../utils/editable_selects.js?ver=
|
10 |
-
<script type="text/javascript" src="js/table.js?ver=
|
11 |
-
<link href="css/table.css?ver=
|
12 |
-
<base target="_self" />
|
13 |
-
</head>
|
14 |
-
<body id="table" style="display: none">
|
15 |
-
<form onsubmit="insertTable();return false;" action="#">
|
16 |
-
<div class="tabs">
|
17 |
-
<ul>
|
18 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
19 |
-
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
20 |
-
</ul>
|
21 |
-
</div>
|
22 |
-
|
23 |
-
<div class="panel_wrapper">
|
24 |
-
<div id="general_panel" class="panel current">
|
25 |
-
<fieldset>
|
26 |
-
<legend>{#table_dlg.general_props}</legend>
|
27 |
-
<table border="0" cellpadding="4" cellspacing="0" width="100%">
|
28 |
-
<tr>
|
29 |
-
<td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td>
|
30 |
-
<td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" /></td>
|
31 |
-
<td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td>
|
32 |
-
<td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" /></td>
|
33 |
-
</tr>
|
34 |
-
<tr>
|
35 |
-
<td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td>
|
36 |
-
<td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td>
|
37 |
-
<td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td>
|
38 |
-
<td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td>
|
39 |
-
</tr>
|
40 |
-
<tr>
|
41 |
-
<td><label id="alignlabel" for="align">{#table_dlg.align}</label></td>
|
42 |
-
<td><select id="align" name="align">
|
43 |
-
<option value="">{#not_set}</option>
|
44 |
-
<option value="center">{#table_dlg.align_middle}</option>
|
45 |
-
<option value="left">{#table_dlg.align_left}</option>
|
46 |
-
<option value="right">{#table_dlg.align_right}</option>
|
47 |
-
</select></td>
|
48 |
-
<td><label id="borderlabel" for="border">{#table_dlg.border}</label></td>
|
49 |
-
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changedBorder();" class="number" /></td>
|
50 |
-
</tr>
|
51 |
-
<tr id="width_row">
|
52 |
-
<td><label id="widthlabel" for="width">{#table_dlg.width}</label></td>
|
53 |
-
<td><input name="width" type="text" id="width" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td>
|
54 |
-
<td><label id="heightlabel" for="height">{#table_dlg.height}</label></td>
|
55 |
-
<td><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td>
|
56 |
-
</tr>
|
57 |
-
<tr id="styleSelectRow">
|
58 |
-
<td><label id="classlabel" for="class">{#class_name}</label></td>
|
59 |
-
<td colspan="3">
|
60 |
-
<select id="class" name="class" class="mceEditableSelect">
|
61 |
-
<option value="" selected>{#not_set}</option>
|
62 |
-
</select></td>
|
63 |
-
</tr>
|
64 |
-
<tr>
|
65 |
-
<td class="column1"><label for="caption">{#table_dlg.caption}</label></td>
|
66 |
-
<td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td>
|
67 |
-
</tr>
|
68 |
-
</table>
|
69 |
-
</fieldset>
|
70 |
-
</div>
|
71 |
-
|
72 |
-
<div id="advanced_panel" class="panel">
|
73 |
-
<fieldset>
|
74 |
-
<legend>{#table_dlg.advanced_props}</legend>
|
75 |
-
|
76 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
77 |
-
<tr>
|
78 |
-
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
79 |
-
<td><input id="id" name="id" type="text" value="" class="advfield" /></td>
|
80 |
-
</tr>
|
81 |
-
|
82 |
-
<tr>
|
83 |
-
<td class="column1"><label for="summary">{#table_dlg.summary}</label></td>
|
84 |
-
<td><input id="summary" name="summary" type="text" value="" class="advfield" /></td>
|
85 |
-
</tr>
|
86 |
-
|
87 |
-
<tr>
|
88 |
-
<td><label for="style">{#table_dlg.style}</label></td>
|
89 |
-
<td><input type="text" id="style" name="style" value="" class="advfield" onchange="changedStyle();" /></td>
|
90 |
-
</tr>
|
91 |
-
|
92 |
-
<tr>
|
93 |
-
<td class="column1"><label id="langlabel" for="lang">{#table_dlg.langcode}</label></td>
|
94 |
-
<td>
|
95 |
-
<input id="lang" name="lang" type="text" value="" class="advfield" />
|
96 |
-
</td>
|
97 |
-
</tr>
|
98 |
-
|
99 |
-
<tr>
|
100 |
-
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
101 |
-
<td>
|
102 |
-
<table border="0" cellpadding="0" cellspacing="0">
|
103 |
-
<tr>
|
104 |
-
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td>
|
105 |
-
<td id="backgroundimagebrowsercontainer"> </td>
|
106 |
-
</tr>
|
107 |
-
</table>
|
108 |
-
</td>
|
109 |
-
</tr>
|
110 |
-
|
111 |
-
<tr>
|
112 |
-
<td class="column1"><label for="frame">{#table_dlg.frame}</label></td>
|
113 |
-
<td>
|
114 |
-
<select id="frame" name="frame" class="advfield">
|
115 |
-
<option value="">{#not_set}</option>
|
116 |
-
<option value="void">{#table_dlg.rules_void}</option>
|
117 |
-
<option value="above">{#table_dlg.rules_above}</option>
|
118 |
-
<option value="below">{#table_dlg.rules_below}</option>
|
119 |
-
<option value="hsides">{#table_dlg.rules_hsides}</option>
|
120 |
-
<option value="lhs">{#table_dlg.rules_lhs}</option>
|
121 |
-
<option value="rhs">{#table_dlg.rules_rhs}</option>
|
122 |
-
<option value="vsides">{#table_dlg.rules_vsides}</option>
|
123 |
-
<option value="box">{#table_dlg.rules_box}</option>
|
124 |
-
<option value="border">{#table_dlg.rules_border}</option>
|
125 |
-
</select>
|
126 |
-
</td>
|
127 |
-
</tr>
|
128 |
-
|
129 |
-
<tr>
|
130 |
-
<td class="column1"><label for="rules">{#table_dlg.rules}</label></td>
|
131 |
-
<td>
|
132 |
-
<select id="rules" name="rules" class="advfield">
|
133 |
-
<option value="">{#not_set}</option>
|
134 |
-
<option value="none">{#table_dlg.frame_none}</option>
|
135 |
-
<option value="groups">{#table_dlg.frame_groups}</option>
|
136 |
-
<option value="rows">{#table_dlg.frame_rows}</option>
|
137 |
-
<option value="cols">{#table_dlg.frame_cols}</option>
|
138 |
-
<option value="all">{#table_dlg.frame_all}</option>
|
139 |
-
</select>
|
140 |
-
</td>
|
141 |
-
</tr>
|
142 |
-
|
143 |
-
<tr>
|
144 |
-
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
145 |
-
<td>
|
146 |
-
<select id="dir" name="dir" class="advfield">
|
147 |
-
<option value="">{#not_set}</option>
|
148 |
-
<option value="ltr">{#table_dlg.ltr}</option>
|
149 |
-
<option value="rtl">{#table_dlg.rtl}</option>
|
150 |
-
</select>
|
151 |
-
</td>
|
152 |
-
</tr>
|
153 |
-
|
154 |
-
<tr>
|
155 |
-
<td class="column1"><label for="bordercolor">{#table_dlg.bordercolor}</label></td>
|
156 |
-
<td>
|
157 |
-
<table border="0" cellpadding="0" cellspacing="0">
|
158 |
-
<tr>
|
159 |
-
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
|
160 |
-
<td id="bordercolor_pickcontainer"> </td>
|
161 |
-
</tr>
|
162 |
-
</table>
|
163 |
-
</td>
|
164 |
-
</tr>
|
165 |
-
|
166 |
-
<tr>
|
167 |
-
<td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
168 |
-
<td>
|
169 |
-
<table border="0" cellpadding="0" cellspacing="0">
|
170 |
-
<tr>
|
171 |
-
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
172 |
-
<td id="bgcolor_pickcontainer"> </td>
|
173 |
-
</tr>
|
174 |
-
</table>
|
175 |
-
</td>
|
176 |
-
</tr>
|
177 |
-
</table>
|
178 |
-
</fieldset>
|
179 |
-
</div>
|
180 |
-
</div>
|
181 |
-
|
182 |
-
<div class="mceActionPanel">
|
183 |
-
<div style="float: left">
|
184 |
-
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
185 |
-
</div>
|
186 |
-
|
187 |
-
<div style="float: right">
|
188 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
189 |
-
</div>
|
190 |
-
</div>
|
191 |
-
</form>
|
192 |
-
</body>
|
193 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#table_dlg.title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/validate.js?ver=3211"></script>
|
9 |
+
<script type="text/javascript" src="../../utils/editable_selects.js?ver=3211"></script>
|
10 |
+
<script type="text/javascript" src="js/table.js?ver=3211"></script>
|
11 |
+
<link href="css/table.css?ver=3211" rel="stylesheet" type="text/css" />
|
12 |
+
<base target="_self" />
|
13 |
+
</head>
|
14 |
+
<body id="table" style="display: none">
|
15 |
+
<form onsubmit="insertTable();return false;" action="#">
|
16 |
+
<div class="tabs">
|
17 |
+
<ul>
|
18 |
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
19 |
+
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
20 |
+
</ul>
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<div class="panel_wrapper">
|
24 |
+
<div id="general_panel" class="panel current">
|
25 |
+
<fieldset>
|
26 |
+
<legend>{#table_dlg.general_props}</legend>
|
27 |
+
<table border="0" cellpadding="4" cellspacing="0" width="100%">
|
28 |
+
<tr>
|
29 |
+
<td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td>
|
30 |
+
<td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" /></td>
|
31 |
+
<td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td>
|
32 |
+
<td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" /></td>
|
33 |
+
</tr>
|
34 |
+
<tr>
|
35 |
+
<td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td>
|
36 |
+
<td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td>
|
37 |
+
<td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td>
|
38 |
+
<td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td>
|
39 |
+
</tr>
|
40 |
+
<tr>
|
41 |
+
<td><label id="alignlabel" for="align">{#table_dlg.align}</label></td>
|
42 |
+
<td><select id="align" name="align">
|
43 |
+
<option value="">{#not_set}</option>
|
44 |
+
<option value="center">{#table_dlg.align_middle}</option>
|
45 |
+
<option value="left">{#table_dlg.align_left}</option>
|
46 |
+
<option value="right">{#table_dlg.align_right}</option>
|
47 |
+
</select></td>
|
48 |
+
<td><label id="borderlabel" for="border">{#table_dlg.border}</label></td>
|
49 |
+
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changedBorder();" class="number" /></td>
|
50 |
+
</tr>
|
51 |
+
<tr id="width_row">
|
52 |
+
<td><label id="widthlabel" for="width">{#table_dlg.width}</label></td>
|
53 |
+
<td><input name="width" type="text" id="width" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td>
|
54 |
+
<td><label id="heightlabel" for="height">{#table_dlg.height}</label></td>
|
55 |
+
<td><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td>
|
56 |
+
</tr>
|
57 |
+
<tr id="styleSelectRow">
|
58 |
+
<td><label id="classlabel" for="class">{#class_name}</label></td>
|
59 |
+
<td colspan="3">
|
60 |
+
<select id="class" name="class" class="mceEditableSelect">
|
61 |
+
<option value="" selected>{#not_set}</option>
|
62 |
+
</select></td>
|
63 |
+
</tr>
|
64 |
+
<tr>
|
65 |
+
<td class="column1"><label for="caption">{#table_dlg.caption}</label></td>
|
66 |
+
<td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td>
|
67 |
+
</tr>
|
68 |
+
</table>
|
69 |
+
</fieldset>
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<div id="advanced_panel" class="panel">
|
73 |
+
<fieldset>
|
74 |
+
<legend>{#table_dlg.advanced_props}</legend>
|
75 |
+
|
76 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
77 |
+
<tr>
|
78 |
+
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
79 |
+
<td><input id="id" name="id" type="text" value="" class="advfield" /></td>
|
80 |
+
</tr>
|
81 |
+
|
82 |
+
<tr>
|
83 |
+
<td class="column1"><label for="summary">{#table_dlg.summary}</label></td>
|
84 |
+
<td><input id="summary" name="summary" type="text" value="" class="advfield" /></td>
|
85 |
+
</tr>
|
86 |
+
|
87 |
+
<tr>
|
88 |
+
<td><label for="style">{#table_dlg.style}</label></td>
|
89 |
+
<td><input type="text" id="style" name="style" value="" class="advfield" onchange="changedStyle();" /></td>
|
90 |
+
</tr>
|
91 |
+
|
92 |
+
<tr>
|
93 |
+
<td class="column1"><label id="langlabel" for="lang">{#table_dlg.langcode}</label></td>
|
94 |
+
<td>
|
95 |
+
<input id="lang" name="lang" type="text" value="" class="advfield" />
|
96 |
+
</td>
|
97 |
+
</tr>
|
98 |
+
|
99 |
+
<tr>
|
100 |
+
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
101 |
+
<td>
|
102 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
103 |
+
<tr>
|
104 |
+
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td>
|
105 |
+
<td id="backgroundimagebrowsercontainer"> </td>
|
106 |
+
</tr>
|
107 |
+
</table>
|
108 |
+
</td>
|
109 |
+
</tr>
|
110 |
+
|
111 |
+
<tr>
|
112 |
+
<td class="column1"><label for="frame">{#table_dlg.frame}</label></td>
|
113 |
+
<td>
|
114 |
+
<select id="frame" name="frame" class="advfield">
|
115 |
+
<option value="">{#not_set}</option>
|
116 |
+
<option value="void">{#table_dlg.rules_void}</option>
|
117 |
+
<option value="above">{#table_dlg.rules_above}</option>
|
118 |
+
<option value="below">{#table_dlg.rules_below}</option>
|
119 |
+
<option value="hsides">{#table_dlg.rules_hsides}</option>
|
120 |
+
<option value="lhs">{#table_dlg.rules_lhs}</option>
|
121 |
+
<option value="rhs">{#table_dlg.rules_rhs}</option>
|
122 |
+
<option value="vsides">{#table_dlg.rules_vsides}</option>
|
123 |
+
<option value="box">{#table_dlg.rules_box}</option>
|
124 |
+
<option value="border">{#table_dlg.rules_border}</option>
|
125 |
+
</select>
|
126 |
+
</td>
|
127 |
+
</tr>
|
128 |
+
|
129 |
+
<tr>
|
130 |
+
<td class="column1"><label for="rules">{#table_dlg.rules}</label></td>
|
131 |
+
<td>
|
132 |
+
<select id="rules" name="rules" class="advfield">
|
133 |
+
<option value="">{#not_set}</option>
|
134 |
+
<option value="none">{#table_dlg.frame_none}</option>
|
135 |
+
<option value="groups">{#table_dlg.frame_groups}</option>
|
136 |
+
<option value="rows">{#table_dlg.frame_rows}</option>
|
137 |
+
<option value="cols">{#table_dlg.frame_cols}</option>
|
138 |
+
<option value="all">{#table_dlg.frame_all}</option>
|
139 |
+
</select>
|
140 |
+
</td>
|
141 |
+
</tr>
|
142 |
+
|
143 |
+
<tr>
|
144 |
+
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
145 |
+
<td>
|
146 |
+
<select id="dir" name="dir" class="advfield">
|
147 |
+
<option value="">{#not_set}</option>
|
148 |
+
<option value="ltr">{#table_dlg.ltr}</option>
|
149 |
+
<option value="rtl">{#table_dlg.rtl}</option>
|
150 |
+
</select>
|
151 |
+
</td>
|
152 |
+
</tr>
|
153 |
+
|
154 |
+
<tr>
|
155 |
+
<td class="column1"><label for="bordercolor">{#table_dlg.bordercolor}</label></td>
|
156 |
+
<td>
|
157 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
158 |
+
<tr>
|
159 |
+
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
|
160 |
+
<td id="bordercolor_pickcontainer"> </td>
|
161 |
+
</tr>
|
162 |
+
</table>
|
163 |
+
</td>
|
164 |
+
</tr>
|
165 |
+
|
166 |
+
<tr>
|
167 |
+
<td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
168 |
+
<td>
|
169 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
170 |
+
<tr>
|
171 |
+
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
172 |
+
<td id="bgcolor_pickcontainer"> </td>
|
173 |
+
</tr>
|
174 |
+
</table>
|
175 |
+
</td>
|
176 |
+
</tr>
|
177 |
+
</table>
|
178 |
+
</fieldset>
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
|
182 |
+
<div class="mceActionPanel">
|
183 |
+
<div style="float: left">
|
184 |
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
185 |
+
</div>
|
186 |
+
|
187 |
+
<div style="float: right">
|
188 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
189 |
+
</div>
|
190 |
+
</div>
|
191 |
+
</form>
|
192 |
+
</body>
|
193 |
+
</html>
|
mce/xhtmlxtras/abbr.htm
CHANGED
@@ -1,149 +1,149 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#xhtmlxtras_dlg.title_abbr_element}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/editable_selects.js?ver=
|
9 |
-
<script type="text/javascript" src="js/element_common.js?ver=
|
10 |
-
<script type="text/javascript" src="js/abbr.js?ver=
|
11 |
-
<link rel="stylesheet" type="text/css" href="css/popup.css?ver=
|
12 |
-
<base target="_self" />
|
13 |
-
</head>
|
14 |
-
<body style="display: none">
|
15 |
-
<form onsubmit="insertAbbr();return false;" action="#">
|
16 |
-
<div class="tabs">
|
17 |
-
<ul>
|
18 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
|
19 |
-
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
|
20 |
-
</ul>
|
21 |
-
</div>
|
22 |
-
|
23 |
-
<div class="panel_wrapper">
|
24 |
-
<div id="general_panel" class="panel current">
|
25 |
-
<fieldset>
|
26 |
-
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
|
27 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
28 |
-
<tr>
|
29 |
-
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
|
30 |
-
<td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
|
31 |
-
</tr>
|
32 |
-
<tr>
|
33 |
-
<td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
|
34 |
-
<td><input id="id" name="id" type="text" value="" class="field" /></td>
|
35 |
-
</tr>
|
36 |
-
<tr>
|
37 |
-
<td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
|
38 |
-
<td>
|
39 |
-
<select id="class" name="class" class="field mceEditableSelect">
|
40 |
-
<option value="">{#not_set}</option>
|
41 |
-
</select>
|
42 |
-
</td>
|
43 |
-
</tr>
|
44 |
-
<tr>
|
45 |
-
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
|
46 |
-
<td><input id="style" name="style" type="text" value="" class="field" /></td>
|
47 |
-
</tr>
|
48 |
-
<tr>
|
49 |
-
<td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
|
50 |
-
<td>
|
51 |
-
<select id="dir" name="dir" class="field">
|
52 |
-
<option value="">{#not_set}</option>
|
53 |
-
<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
|
54 |
-
<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
|
55 |
-
</select>
|
56 |
-
</td>
|
57 |
-
</tr>
|
58 |
-
<tr>
|
59 |
-
<td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
|
60 |
-
<td>
|
61 |
-
<input id="lang" name="lang" type="text" value="" class="field" />
|
62 |
-
</td>
|
63 |
-
</tr>
|
64 |
-
</table>
|
65 |
-
</fieldset>
|
66 |
-
</div>
|
67 |
-
<div id="events_panel" class="panel">
|
68 |
-
<fieldset>
|
69 |
-
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
|
70 |
-
|
71 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
72 |
-
<tr>
|
73 |
-
<td class="label"><label for="onfocus">onfocus</label>:</td>
|
74 |
-
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
|
75 |
-
</tr>
|
76 |
-
|
77 |
-
<tr>
|
78 |
-
<td class="label"><label for="onblur">onblur</label>:</td>
|
79 |
-
<td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
|
80 |
-
</tr>
|
81 |
-
|
82 |
-
<tr>
|
83 |
-
<td class="label"><label for="onclick">onclick</label>:</td>
|
84 |
-
<td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
|
85 |
-
</tr>
|
86 |
-
|
87 |
-
<tr>
|
88 |
-
<td class="label"><label for="ondblclick">ondblclick</label>:</td>
|
89 |
-
<td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
|
90 |
-
</tr>
|
91 |
-
|
92 |
-
<tr>
|
93 |
-
<td class="label"><label for="onmousedown">onmousedown</label>:</td>
|
94 |
-
<td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
|
95 |
-
</tr>
|
96 |
-
|
97 |
-
<tr>
|
98 |
-
<td class="label"><label for="onmouseup">onmouseup</label>:</td>
|
99 |
-
<td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
|
100 |
-
</tr>
|
101 |
-
|
102 |
-
<tr>
|
103 |
-
<td class="label"><label for="onmouseover">onmouseover</label>:</td>
|
104 |
-
<td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
|
105 |
-
</tr>
|
106 |
-
|
107 |
-
<tr>
|
108 |
-
<td class="label"><label for="onmousemove">onmousemove</label>:</td>
|
109 |
-
<td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
|
110 |
-
</tr>
|
111 |
-
|
112 |
-
<tr>
|
113 |
-
<td class="label"><label for="onmouseout">onmouseout</label>:</td>
|
114 |
-
<td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
|
115 |
-
</tr>
|
116 |
-
|
117 |
-
<tr>
|
118 |
-
<td class="label"><label for="onkeypress">onkeypress</label>:</td>
|
119 |
-
<td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
|
120 |
-
</tr>
|
121 |
-
|
122 |
-
<tr>
|
123 |
-
<td class="label"><label for="onkeydown">onkeydown</label>:</td>
|
124 |
-
<td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
|
125 |
-
</tr>
|
126 |
-
|
127 |
-
<tr>
|
128 |
-
<td class="label"><label for="onkeyup">onkeyup</label>:</td>
|
129 |
-
<td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
|
130 |
-
</tr>
|
131 |
-
</table>
|
132 |
-
</fieldset>
|
133 |
-
</div>
|
134 |
-
</div>
|
135 |
-
<div class="mceActionPanel">
|
136 |
-
<div style="float: left">
|
137 |
-
<input type="submit" id="insert" name="insert" value="{#update}" />
|
138 |
-
</div>
|
139 |
-
<div style="float: left">
|
140 |
-
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAbbr();" style="display: none;" />
|
141 |
-
</div>
|
142 |
-
<div style="float: right">
|
143 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
144 |
-
</div>
|
145 |
-
</div>
|
146 |
-
|
147 |
-
</form>
|
148 |
-
</body>
|
149 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#xhtmlxtras_dlg.title_abbr_element}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/editable_selects.js?ver=3211"></script>
|
9 |
+
<script type="text/javascript" src="js/element_common.js?ver=3211"></script>
|
10 |
+
<script type="text/javascript" src="js/abbr.js?ver=3211"></script>
|
11 |
+
<link rel="stylesheet" type="text/css" href="css/popup.css?ver=3211" />
|
12 |
+
<base target="_self" />
|
13 |
+
</head>
|
14 |
+
<body style="display: none">
|
15 |
+
<form onsubmit="insertAbbr();return false;" action="#">
|
16 |
+
<div class="tabs">
|
17 |
+
<ul>
|
18 |
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
|
19 |
+
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
|
20 |
+
</ul>
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<div class="panel_wrapper">
|
24 |
+
<div id="general_panel" class="panel current">
|
25 |
+
<fieldset>
|
26 |
+
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
|
27 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
28 |
+
<tr>
|
29 |
+
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
|
30 |
+
<td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
|
31 |
+
</tr>
|
32 |
+
<tr>
|
33 |
+
<td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
|
34 |
+
<td><input id="id" name="id" type="text" value="" class="field" /></td>
|
35 |
+
</tr>
|
36 |
+
<tr>
|
37 |
+
<td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
|
38 |
+
<td>
|
39 |
+
<select id="class" name="class" class="field mceEditableSelect">
|
40 |
+
<option value="">{#not_set}</option>
|
41 |
+
</select>
|
42 |
+
</td>
|
43 |
+
</tr>
|
44 |
+
<tr>
|
45 |
+
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
|
46 |
+
<td><input id="style" name="style" type="text" value="" class="field" /></td>
|
47 |
+
</tr>
|
48 |
+
<tr>
|
49 |
+
<td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
|
50 |
+
<td>
|
51 |
+
<select id="dir" name="dir" class="field">
|
52 |
+
<option value="">{#not_set}</option>
|
53 |
+
<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
|
54 |
+
<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
|
55 |
+
</select>
|
56 |
+
</td>
|
57 |
+
</tr>
|
58 |
+
<tr>
|
59 |
+
<td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
|
60 |
+
<td>
|
61 |
+
<input id="lang" name="lang" type="text" value="" class="field" />
|
62 |
+
</td>
|
63 |
+
</tr>
|
64 |
+
</table>
|
65 |
+
</fieldset>
|
66 |
+
</div>
|
67 |
+
<div id="events_panel" class="panel">
|
68 |
+
<fieldset>
|
69 |
+
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
|
70 |
+
|
71 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
72 |
+
<tr>
|
73 |
+
<td class="label"><label for="onfocus">onfocus</label>:</td>
|
74 |
+
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
|
75 |
+
</tr>
|
76 |
+
|
77 |
+
<tr>
|
78 |
+
<td class="label"><label for="onblur">onblur</label>:</td>
|
79 |
+
<td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
|
80 |
+
</tr>
|
81 |
+
|
82 |
+
<tr>
|
83 |
+
<td class="label"><label for="onclick">onclick</label>:</td>
|
84 |
+
<td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
|
85 |
+
</tr>
|
86 |
+
|
87 |
+
<tr>
|
88 |
+
<td class="label"><label for="ondblclick">ondblclick</label>:</td>
|
89 |
+
<td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
|
90 |
+
</tr>
|
91 |
+
|
92 |
+
<tr>
|
93 |
+
<td class="label"><label for="onmousedown">onmousedown</label>:</td>
|
94 |
+
<td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
|
95 |
+
</tr>
|
96 |
+
|
97 |
+
<tr>
|
98 |
+
<td class="label"><label for="onmouseup">onmouseup</label>:</td>
|
99 |
+
<td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
|
100 |
+
</tr>
|
101 |
+
|
102 |
+
<tr>
|
103 |
+
<td class="label"><label for="onmouseover">onmouseover</label>:</td>
|
104 |
+
<td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
|
105 |
+
</tr>
|
106 |
+
|
107 |
+
<tr>
|
108 |
+
<td class="label"><label for="onmousemove">onmousemove</label>:</td>
|
109 |
+
<td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
|
110 |
+
</tr>
|
111 |
+
|
112 |
+
<tr>
|
113 |
+
<td class="label"><label for="onmouseout">onmouseout</label>:</td>
|
114 |
+
<td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
|
115 |
+
</tr>
|
116 |
+
|
117 |
+
<tr>
|
118 |
+
<td class="label"><label for="onkeypress">onkeypress</label>:</td>
|
119 |
+
<td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
|
120 |
+
</tr>
|
121 |
+
|
122 |
+
<tr>
|
123 |
+
<td class="label"><label for="onkeydown">onkeydown</label>:</td>
|
124 |
+
<td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
|
125 |
+
</tr>
|
126 |
+
|
127 |
+
<tr>
|
128 |
+
<td class="label"><label for="onkeyup">onkeyup</label>:</td>
|
129 |
+
<td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
|
130 |
+
</tr>
|
131 |
+
</table>
|
132 |
+
</fieldset>
|
133 |
+
</div>
|
134 |
+
</div>
|
135 |
+
<div class="mceActionPanel">
|
136 |
+
<div style="float: left">
|
137 |
+
<input type="submit" id="insert" name="insert" value="{#update}" />
|
138 |
+
</div>
|
139 |
+
<div style="float: left">
|
140 |
+
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAbbr();" style="display: none;" />
|
141 |
+
</div>
|
142 |
+
<div style="float: right">
|
143 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
144 |
+
</div>
|
145 |
+
</div>
|
146 |
+
|
147 |
+
</form>
|
148 |
+
</body>
|
149 |
+
</html>
|
mce/xhtmlxtras/acronym.htm
CHANGED
@@ -1,149 +1,149 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#xhtmlxtras_dlg.title_acronym_element}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/editable_selects.js?ver=
|
9 |
-
<script type="text/javascript" src="js/element_common.js?ver=
|
10 |
-
<script type="text/javascript" src="js/acronym.js?ver=
|
11 |
-
<link rel="stylesheet" type="text/css" href="css/popup.css?ver=
|
12 |
-
<base target="_self" />
|
13 |
-
</head>
|
14 |
-
<body style="display: none">
|
15 |
-
<form onsubmit="insertAcronym();return false;" action="#">
|
16 |
-
<div class="tabs">
|
17 |
-
<ul>
|
18 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
|
19 |
-
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
|
20 |
-
</ul>
|
21 |
-
</div>
|
22 |
-
|
23 |
-
<div class="panel_wrapper">
|
24 |
-
<div id="general_panel" class="panel current">
|
25 |
-
<fieldset>
|
26 |
-
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
|
27 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
28 |
-
<tr>
|
29 |
-
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
|
30 |
-
<td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
|
31 |
-
</tr>
|
32 |
-
<tr>
|
33 |
-
<td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
|
34 |
-
<td><input id="id" name="id" type="text" value="" class="field" /></td>
|
35 |
-
</tr>
|
36 |
-
<tr>
|
37 |
-
<td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
|
38 |
-
<td>
|
39 |
-
<select id="class" name="class" class="field mceEditableSelect">
|
40 |
-
<option value="">{#not_set}</option>
|
41 |
-
</select>
|
42 |
-
</td>
|
43 |
-
</tr>
|
44 |
-
<tr>
|
45 |
-
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
|
46 |
-
<td><input id="style" name="style" type="text" value="" class="field" /></td>
|
47 |
-
</tr>
|
48 |
-
<tr>
|
49 |
-
<td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
|
50 |
-
<td>
|
51 |
-
<select id="dir" name="dir" class="field">
|
52 |
-
<option value="">{#not_set}</option>
|
53 |
-
<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
|
54 |
-
<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
|
55 |
-
</select>
|
56 |
-
</td>
|
57 |
-
</tr>
|
58 |
-
<tr>
|
59 |
-
<td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
|
60 |
-
<td>
|
61 |
-
<input id="lang" name="lang" type="text" value="" class="field" />
|
62 |
-
</td>
|
63 |
-
</tr>
|
64 |
-
</table>
|
65 |
-
</fieldset>
|
66 |
-
</div>
|
67 |
-
<div id="events_panel" class="panel">
|
68 |
-
<fieldset>
|
69 |
-
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
|
70 |
-
|
71 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
72 |
-
<tr>
|
73 |
-
<td class="label"><label for="onfocus">onfocus</label>:</td>
|
74 |
-
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
|
75 |
-
</tr>
|
76 |
-
|
77 |
-
<tr>
|
78 |
-
<td class="label"><label for="onblur">onblur</label>:</td>
|
79 |
-
<td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
|
80 |
-
</tr>
|
81 |
-
|
82 |
-
<tr>
|
83 |
-
<td class="label"><label for="onclick">onclick</label>:</td>
|
84 |
-
<td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
|
85 |
-
</tr>
|
86 |
-
|
87 |
-
<tr>
|
88 |
-
<td class="label"><label for="ondblclick">ondblclick</label>:</td>
|
89 |
-
<td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
|
90 |
-
</tr>
|
91 |
-
|
92 |
-
<tr>
|
93 |
-
<td class="label"><label for="onmousedown">onmousedown</label>:</td>
|
94 |
-
<td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
|
95 |
-
</tr>
|
96 |
-
|
97 |
-
<tr>
|
98 |
-
<td class="label"><label for="onmouseup">onmouseup</label>:</td>
|
99 |
-
<td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
|
100 |
-
</tr>
|
101 |
-
|
102 |
-
<tr>
|
103 |
-
<td class="label"><label for="onmouseover">onmouseover</label>:</td>
|
104 |
-
<td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
|
105 |
-
</tr>
|
106 |
-
|
107 |
-
<tr>
|
108 |
-
<td class="label"><label for="onmousemove">onmousemove</label>:</td>
|
109 |
-
<td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
|
110 |
-
</tr>
|
111 |
-
|
112 |
-
<tr>
|
113 |
-
<td class="label"><label for="onmouseout">onmouseout</label>:</td>
|
114 |
-
<td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
|
115 |
-
</tr>
|
116 |
-
|
117 |
-
<tr>
|
118 |
-
<td class="label"><label for="onkeypress">onkeypress</label>:</td>
|
119 |
-
<td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
|
120 |
-
</tr>
|
121 |
-
|
122 |
-
<tr>
|
123 |
-
<td class="label"><label for="onkeydown">onkeydown</label>:</td>
|
124 |
-
<td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
|
125 |
-
</tr>
|
126 |
-
|
127 |
-
<tr>
|
128 |
-
<td class="label"><label for="onkeyup">onkeyup</label>:</td>
|
129 |
-
<td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
|
130 |
-
</tr>
|
131 |
-
</table>
|
132 |
-
</fieldset>
|
133 |
-
</div>
|
134 |
-
</div>
|
135 |
-
<div class="mceActionPanel">
|
136 |
-
<div style="float: left">
|
137 |
-
<input type="submit" id="insert" name="insert" value="{#update}" />
|
138 |
-
</div>
|
139 |
-
<div style="float: left">
|
140 |
-
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAcronym();" style="display: none;" />
|
141 |
-
</div>
|
142 |
-
<div style="float: right">
|
143 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
144 |
-
</div>
|
145 |
-
</div>
|
146 |
-
|
147 |
-
</form>
|
148 |
-
</body>
|
149 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#xhtmlxtras_dlg.title_acronym_element}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/editable_selects.js?ver=3211"></script>
|
9 |
+
<script type="text/javascript" src="js/element_common.js?ver=3211"></script>
|
10 |
+
<script type="text/javascript" src="js/acronym.js?ver=3211"></script>
|
11 |
+
<link rel="stylesheet" type="text/css" href="css/popup.css?ver=3211" />
|
12 |
+
<base target="_self" />
|
13 |
+
</head>
|
14 |
+
<body style="display: none">
|
15 |
+
<form onsubmit="insertAcronym();return false;" action="#">
|
16 |
+
<div class="tabs">
|
17 |
+
<ul>
|
18 |
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
|
19 |
+
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
|
20 |
+
</ul>
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<div class="panel_wrapper">
|
24 |
+
<div id="general_panel" class="panel current">
|
25 |
+
<fieldset>
|
26 |
+
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
|
27 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
28 |
+
<tr>
|
29 |
+
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
|
30 |
+
<td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
|
31 |
+
</tr>
|
32 |
+
<tr>
|
33 |
+
<td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
|
34 |
+
<td><input id="id" name="id" type="text" value="" class="field" /></td>
|
35 |
+
</tr>
|
36 |
+
<tr>
|
37 |
+
<td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
|
38 |
+
<td>
|
39 |
+
<select id="class" name="class" class="field mceEditableSelect">
|
40 |
+
<option value="">{#not_set}</option>
|
41 |
+
</select>
|
42 |
+
</td>
|
43 |
+
</tr>
|
44 |
+
<tr>
|
45 |
+
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
|
46 |
+
<td><input id="style" name="style" type="text" value="" class="field" /></td>
|
47 |
+
</tr>
|
48 |
+
<tr>
|
49 |
+
<td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
|
50 |
+
<td>
|
51 |
+
<select id="dir" name="dir" class="field">
|
52 |
+
<option value="">{#not_set}</option>
|
53 |
+
<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
|
54 |
+
<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
|
55 |
+
</select>
|
56 |
+
</td>
|
57 |
+
</tr>
|
58 |
+
<tr>
|
59 |
+
<td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
|
60 |
+
<td>
|
61 |
+
<input id="lang" name="lang" type="text" value="" class="field" />
|
62 |
+
</td>
|
63 |
+
</tr>
|
64 |
+
</table>
|
65 |
+
</fieldset>
|
66 |
+
</div>
|
67 |
+
<div id="events_panel" class="panel">
|
68 |
+
<fieldset>
|
69 |
+
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
|
70 |
+
|
71 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
72 |
+
<tr>
|
73 |
+
<td class="label"><label for="onfocus">onfocus</label>:</td>
|
74 |
+
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
|
75 |
+
</tr>
|
76 |
+
|
77 |
+
<tr>
|
78 |
+
<td class="label"><label for="onblur">onblur</label>:</td>
|
79 |
+
<td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
|
80 |
+
</tr>
|
81 |
+
|
82 |
+
<tr>
|
83 |
+
<td class="label"><label for="onclick">onclick</label>:</td>
|
84 |
+
<td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
|
85 |
+
</tr>
|
86 |
+
|
87 |
+
<tr>
|
88 |
+
<td class="label"><label for="ondblclick">ondblclick</label>:</td>
|
89 |
+
<td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
|
90 |
+
</tr>
|
91 |
+
|
92 |
+
<tr>
|
93 |
+
<td class="label"><label for="onmousedown">onmousedown</label>:</td>
|
94 |
+
<td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
|
95 |
+
</tr>
|
96 |
+
|
97 |
+
<tr>
|
98 |
+
<td class="label"><label for="onmouseup">onmouseup</label>:</td>
|
99 |
+
<td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
|
100 |
+
</tr>
|
101 |
+
|
102 |
+
<tr>
|
103 |
+
<td class="label"><label for="onmouseover">onmouseover</label>:</td>
|
104 |
+
<td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
|
105 |
+
</tr>
|
106 |
+
|
107 |
+
<tr>
|
108 |
+
<td class="label"><label for="onmousemove">onmousemove</label>:</td>
|
109 |
+
<td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
|
110 |
+
</tr>
|
111 |
+
|
112 |
+
<tr>
|
113 |
+
<td class="label"><label for="onmouseout">onmouseout</label>:</td>
|
114 |
+
<td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
|
115 |
+
</tr>
|
116 |
+
|
117 |
+
<tr>
|
118 |
+
<td class="label"><label for="onkeypress">onkeypress</label>:</td>
|
119 |
+
<td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
|
120 |
+
</tr>
|
121 |
+
|
122 |
+
<tr>
|
123 |
+
<td class="label"><label for="onkeydown">onkeydown</label>:</td>
|
124 |
+
<td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
|
125 |
+
</tr>
|
126 |
+
|
127 |
+
<tr>
|
128 |
+
<td class="label"><label for="onkeyup">onkeyup</label>:</td>
|
129 |
+
<td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
|
130 |
+
</tr>
|
131 |
+
</table>
|
132 |
+
</fieldset>
|
133 |
+
</div>
|
134 |
+
</div>
|
135 |
+
<div class="mceActionPanel">
|
136 |
+
<div style="float: left">
|
137 |
+
<input type="submit" id="insert" name="insert" value="{#update}" />
|
138 |
+
</div>
|
139 |
+
<div style="float: left">
|
140 |
+
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAcronym();" style="display: none;" />
|
141 |
+
</div>
|
142 |
+
<div style="float: right">
|
143 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
144 |
+
</div>
|
145 |
+
</div>
|
146 |
+
|
147 |
+
</form>
|
148 |
+
</body>
|
149 |
+
</html>
|
mce/xhtmlxtras/attributes.htm
CHANGED
@@ -1,154 +1,154 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#xhtmlxtras_dlg.attribs_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/editable_selects.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
9 |
-
<script type="text/javascript" src="js/attributes.js?ver=
|
10 |
-
<link rel="stylesheet" type="text/css" href="css/attributes.css?ver=
|
11 |
-
<base target="_self" />
|
12 |
-
</head>
|
13 |
-
<body style="display: none">
|
14 |
-
<form onsubmit="insertAction();return false;" action="#">
|
15 |
-
<div class="tabs">
|
16 |
-
<ul>
|
17 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_attrib_tab}</a></span></li>
|
18 |
-
<li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_events_tab}</a></span></li>
|
19 |
-
</ul>
|
20 |
-
</div>
|
21 |
-
|
22 |
-
<div class="panel_wrapper">
|
23 |
-
<div id="general_panel" class="panel current">
|
24 |
-
<fieldset>
|
25 |
-
<legend>{#xhtmlxtras_dlg.attribute_attrib_tab}</legend>
|
26 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
27 |
-
<tr>
|
28 |
-
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
|
29 |
-
<td><input id="title" name="title" type="text" value="" class="mceFocus" /></td>
|
30 |
-
</tr>
|
31 |
-
<tr>
|
32 |
-
<td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
|
33 |
-
<td><input id="id" name="id" type="text" value="" /></td>
|
34 |
-
</tr>
|
35 |
-
<tr>
|
36 |
-
<td><label id="classlabel" for="classlist">{#class_name}</label></td>
|
37 |
-
<td>
|
38 |
-
<select id="classlist" name="classlist" class="mceEditableSelect">
|
39 |
-
<option value="" selected>{#not_set}</option>
|
40 |
-
</select>
|
41 |
-
</td>
|
42 |
-
</tr>
|
43 |
-
<tr>
|
44 |
-
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
|
45 |
-
<td><input id="style" name="style" type="text" value="" /></td>
|
46 |
-
</tr>
|
47 |
-
<tr>
|
48 |
-
<td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
|
49 |
-
<td>
|
50 |
-
<select id="dir" name="dir">
|
51 |
-
<option value="">{#not_set}</option>
|
52 |
-
<option value="ltr">{#xhtmlxtras_dlg.option_ltr}</option>
|
53 |
-
<option value="rtl">{#xhtmlxtras_dlg.option_rtl}</option>
|
54 |
-
</select>
|
55 |
-
</td>
|
56 |
-
</tr>
|
57 |
-
<tr>
|
58 |
-
<td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
|
59 |
-
<td>
|
60 |
-
<input id="lang" name="lang" type="text" value="" />
|
61 |
-
</td>
|
62 |
-
</tr>
|
63 |
-
<tr>
|
64 |
-
<td><label id="tabindexlabel" for="tabindex">{#xhtmlxtras_dlg.attribute_label_tabindex}</label></td>
|
65 |
-
<td><input type="text" id="tabindex" name="tabindex" value="" /></td>
|
66 |
-
</tr>
|
67 |
-
|
68 |
-
<tr>
|
69 |
-
<td><label id="accesskeylabel" for="accesskey">{#xhtmlxtras_dlg.attribute_label_accesskey}</label></td>
|
70 |
-
<td><input type="text" id="accesskey" name="accesskey" value="" /></td>
|
71 |
-
</tr>
|
72 |
-
</table>
|
73 |
-
</fieldset>
|
74 |
-
</div>
|
75 |
-
<div id="events_panel" class="panel">
|
76 |
-
<fieldset>
|
77 |
-
<legend>{#xhtmlxtras_dlg.attribute_events_tab}</legend>
|
78 |
-
|
79 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
80 |
-
<tr>
|
81 |
-
<td class="label"><label for="onfocus">onfocus</label>:</td>
|
82 |
-
<td><input id="onfocus" name="onfocus" type="text" value="" /></td>
|
83 |
-
</tr>
|
84 |
-
|
85 |
-
<tr>
|
86 |
-
<td class="label"><label for="onblur">onblur</label>:</td>
|
87 |
-
<td><input id="onblur" name="onblur" type="text" value="" /></td>
|
88 |
-
</tr>
|
89 |
-
|
90 |
-
<tr>
|
91 |
-
<td class="label"><label for="onclick">onclick</label>:</td>
|
92 |
-
<td><input id="onclick" name="onclick" type="text" value="" /></td>
|
93 |
-
</tr>
|
94 |
-
|
95 |
-
<tr>
|
96 |
-
<td class="label"><label for="ondblclick">ondblclick</label>:</td>
|
97 |
-
<td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
|
98 |
-
</tr>
|
99 |
-
|
100 |
-
<tr>
|
101 |
-
<td class="label"><label for="onmousedown">onmousedown</label>:</td>
|
102 |
-
<td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
|
103 |
-
</tr>
|
104 |
-
|
105 |
-
<tr>
|
106 |
-
<td class="label"><label for="onmouseup">onmouseup</label>:</td>
|
107 |
-
<td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
|
108 |
-
</tr>
|
109 |
-
|
110 |
-
<tr>
|
111 |
-
<td class="label"><label for="onmouseover">onmouseover</label>:</td>
|
112 |
-
<td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
|
113 |
-
</tr>
|
114 |
-
|
115 |
-
<tr>
|
116 |
-
<td class="label"><label for="onmousemove">onmousemove</label>:</td>
|
117 |
-
<td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
|
118 |
-
</tr>
|
119 |
-
|
120 |
-
<tr>
|
121 |
-
<td class="label"><label for="onmouseout">onmouseout</label>:</td>
|
122 |
-
<td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
|
123 |
-
</tr>
|
124 |
-
|
125 |
-
<tr>
|
126 |
-
<td class="label"><label for="onkeypress">onkeypress</label>:</td>
|
127 |
-
<td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
|
128 |
-
</tr>
|
129 |
-
|
130 |
-
<tr>
|
131 |
-
<td class="label"><label for="onkeydown">onkeydown</label>:</td>
|
132 |
-
<td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
|
133 |
-
</tr>
|
134 |
-
|
135 |
-
<tr>
|
136 |
-
<td class="label"><label for="onkeyup">onkeyup</label>:</td>
|
137 |
-
<td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
|
138 |
-
</tr>
|
139 |
-
</table>
|
140 |
-
</fieldset>
|
141 |
-
</div>
|
142 |
-
</div>
|
143 |
-
<div class="mceActionPanel">
|
144 |
-
<div style="float: left">
|
145 |
-
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
146 |
-
</div>
|
147 |
-
<div style="float: right">
|
148 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
149 |
-
</div>
|
150 |
-
</div>
|
151 |
-
|
152 |
-
</form>
|
153 |
-
</body>
|
154 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#xhtmlxtras_dlg.attribs_title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/editable_selects.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
9 |
+
<script type="text/javascript" src="js/attributes.js?ver=3211"></script>
|
10 |
+
<link rel="stylesheet" type="text/css" href="css/attributes.css?ver=3211" />
|
11 |
+
<base target="_self" />
|
12 |
+
</head>
|
13 |
+
<body style="display: none">
|
14 |
+
<form onsubmit="insertAction();return false;" action="#">
|
15 |
+
<div class="tabs">
|
16 |
+
<ul>
|
17 |
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_attrib_tab}</a></span></li>
|
18 |
+
<li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_events_tab}</a></span></li>
|
19 |
+
</ul>
|
20 |
+
</div>
|
21 |
+
|
22 |
+
<div class="panel_wrapper">
|
23 |
+
<div id="general_panel" class="panel current">
|
24 |
+
<fieldset>
|
25 |
+
<legend>{#xhtmlxtras_dlg.attribute_attrib_tab}</legend>
|
26 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
27 |
+
<tr>
|
28 |
+
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
|
29 |
+
<td><input id="title" name="title" type="text" value="" class="mceFocus" /></td>
|
30 |
+
</tr>
|
31 |
+
<tr>
|
32 |
+
<td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
|
33 |
+
<td><input id="id" name="id" type="text" value="" /></td>
|
34 |
+
</tr>
|
35 |
+
<tr>
|
36 |
+
<td><label id="classlabel" for="classlist">{#class_name}</label></td>
|
37 |
+
<td>
|
38 |
+
<select id="classlist" name="classlist" class="mceEditableSelect">
|
39 |
+
<option value="" selected>{#not_set}</option>
|
40 |
+
</select>
|
41 |
+
</td>
|
42 |
+
</tr>
|
43 |
+
<tr>
|
44 |
+
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
|
45 |
+
<td><input id="style" name="style" type="text" value="" /></td>
|
46 |
+
</tr>
|
47 |
+
<tr>
|
48 |
+
<td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
|
49 |
+
<td>
|
50 |
+
<select id="dir" name="dir">
|
51 |
+
<option value="">{#not_set}</option>
|
52 |
+
<option value="ltr">{#xhtmlxtras_dlg.option_ltr}</option>
|
53 |
+
<option value="rtl">{#xhtmlxtras_dlg.option_rtl}</option>
|
54 |
+
</select>
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
+
<tr>
|
58 |
+
<td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
|
59 |
+
<td>
|
60 |
+
<input id="lang" name="lang" type="text" value="" />
|
61 |
+
</td>
|
62 |
+
</tr>
|
63 |
+
<tr>
|
64 |
+
<td><label id="tabindexlabel" for="tabindex">{#xhtmlxtras_dlg.attribute_label_tabindex}</label></td>
|
65 |
+
<td><input type="text" id="tabindex" name="tabindex" value="" /></td>
|
66 |
+
</tr>
|
67 |
+
|
68 |
+
<tr>
|
69 |
+
<td><label id="accesskeylabel" for="accesskey">{#xhtmlxtras_dlg.attribute_label_accesskey}</label></td>
|
70 |
+
<td><input type="text" id="accesskey" name="accesskey" value="" /></td>
|
71 |
+
</tr>
|
72 |
+
</table>
|
73 |
+
</fieldset>
|
74 |
+
</div>
|
75 |
+
<div id="events_panel" class="panel">
|
76 |
+
<fieldset>
|
77 |
+
<legend>{#xhtmlxtras_dlg.attribute_events_tab}</legend>
|
78 |
+
|
79 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
80 |
+
<tr>
|
81 |
+
<td class="label"><label for="onfocus">onfocus</label>:</td>
|
82 |
+
<td><input id="onfocus" name="onfocus" type="text" value="" /></td>
|
83 |
+
</tr>
|
84 |
+
|
85 |
+
<tr>
|
86 |
+
<td class="label"><label for="onblur">onblur</label>:</td>
|
87 |
+
<td><input id="onblur" name="onblur" type="text" value="" /></td>
|
88 |
+
</tr>
|
89 |
+
|
90 |
+
<tr>
|
91 |
+
<td class="label"><label for="onclick">onclick</label>:</td>
|
92 |
+
<td><input id="onclick" name="onclick" type="text" value="" /></td>
|
93 |
+
</tr>
|
94 |
+
|
95 |
+
<tr>
|
96 |
+
<td class="label"><label for="ondblclick">ondblclick</label>:</td>
|
97 |
+
<td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
|
98 |
+
</tr>
|
99 |
+
|
100 |
+
<tr>
|
101 |
+
<td class="label"><label for="onmousedown">onmousedown</label>:</td>
|
102 |
+
<td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
|
103 |
+
</tr>
|
104 |
+
|
105 |
+
<tr>
|
106 |
+
<td class="label"><label for="onmouseup">onmouseup</label>:</td>
|
107 |
+
<td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
|
108 |
+
</tr>
|
109 |
+
|
110 |
+
<tr>
|
111 |
+
<td class="label"><label for="onmouseover">onmouseover</label>:</td>
|
112 |
+
<td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
|
113 |
+
</tr>
|
114 |
+
|
115 |
+
<tr>
|
116 |
+
<td class="label"><label for="onmousemove">onmousemove</label>:</td>
|
117 |
+
<td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
|
118 |
+
</tr>
|
119 |
+
|
120 |
+
<tr>
|
121 |
+
<td class="label"><label for="onmouseout">onmouseout</label>:</td>
|
122 |
+
<td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
|
123 |
+
</tr>
|
124 |
+
|
125 |
+
<tr>
|
126 |
+
<td class="label"><label for="onkeypress">onkeypress</label>:</td>
|
127 |
+
<td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
|
128 |
+
</tr>
|
129 |
+
|
130 |
+
<tr>
|
131 |
+
<td class="label"><label for="onkeydown">onkeydown</label>:</td>
|
132 |
+
<td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
|
133 |
+
</tr>
|
134 |
+
|
135 |
+
<tr>
|
136 |
+
<td class="label"><label for="onkeyup">onkeyup</label>:</td>
|
137 |
+
<td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
|
138 |
+
</tr>
|
139 |
+
</table>
|
140 |
+
</fieldset>
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
<div class="mceActionPanel">
|
144 |
+
<div style="float: left">
|
145 |
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
146 |
+
</div>
|
147 |
+
<div style="float: right">
|
148 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
149 |
+
</div>
|
150 |
+
</div>
|
151 |
+
|
152 |
+
</form>
|
153 |
+
</body>
|
154 |
+
</html>
|
mce/xhtmlxtras/cite.htm
CHANGED
@@ -1,149 +1,149 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#xhtmlxtras_dlg.title_cite_element}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/editable_selects.js?ver=
|
9 |
-
<script type="text/javascript" src="js/element_common.js?ver=
|
10 |
-
<script type="text/javascript" src="js/cite.js?ver=
|
11 |
-
<link rel="stylesheet" type="text/css" href="css/popup.css?ver=
|
12 |
-
<base target="_self" />
|
13 |
-
</head>
|
14 |
-
<body style="display: none">
|
15 |
-
<form onsubmit="insertCite();return false;" action="#">
|
16 |
-
<div class="tabs">
|
17 |
-
<ul>
|
18 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
|
19 |
-
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
|
20 |
-
</ul>
|
21 |
-
</div>
|
22 |
-
|
23 |
-
<div class="panel_wrapper">
|
24 |
-
<div id="general_panel" class="panel current">
|
25 |
-
<fieldset>
|
26 |
-
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
|
27 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
28 |
-
<tr>
|
29 |
-
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
|
30 |
-
<td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
|
31 |
-
</tr>
|
32 |
-
<tr>
|
33 |
-
<td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
|
34 |
-
<td><input id="id" name="id" type="text" value="" class="field" /></td>
|
35 |
-
</tr>
|
36 |
-
<tr>
|
37 |
-
<td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
|
38 |
-
<td>
|
39 |
-
<select id="class" name="class" class="field mceEditableSelect">
|
40 |
-
<option value="">{#not_set}</option>
|
41 |
-
</select>
|
42 |
-
</td>
|
43 |
-
</tr>
|
44 |
-
<tr>
|
45 |
-
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
|
46 |
-
<td><input id="style" name="style" type="text" value="" class="field" /></td>
|
47 |
-
</tr>
|
48 |
-
<tr>
|
49 |
-
<td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
|
50 |
-
<td>
|
51 |
-
<select id="dir" name="dir" class="field">
|
52 |
-
<option value="">{#not_set}</option>
|
53 |
-
<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
|
54 |
-
<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
|
55 |
-
</select>
|
56 |
-
</td>
|
57 |
-
</tr>
|
58 |
-
<tr>
|
59 |
-
<td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
|
60 |
-
<td>
|
61 |
-
<input id="lang" name="lang" type="text" value="" class="field" />
|
62 |
-
</td>
|
63 |
-
</tr>
|
64 |
-
</table>
|
65 |
-
</fieldset>
|
66 |
-
</div>
|
67 |
-
<div id="events_panel" class="panel">
|
68 |
-
<fieldset>
|
69 |
-
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
|
70 |
-
|
71 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
72 |
-
<tr>
|
73 |
-
<td class="label"><label for="onfocus">onfocus</label>:</td>
|
74 |
-
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
|
75 |
-
</tr>
|
76 |
-
|
77 |
-
<tr>
|
78 |
-
<td class="label"><label for="onblur">onblur</label>:</td>
|
79 |
-
<td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
|
80 |
-
</tr>
|
81 |
-
|
82 |
-
<tr>
|
83 |
-
<td class="label"><label for="onclick">onclick</label>:</td>
|
84 |
-
<td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
|
85 |
-
</tr>
|
86 |
-
|
87 |
-
<tr>
|
88 |
-
<td class="label"><label for="ondblclick">ondblclick</label>:</td>
|
89 |
-
<td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
|
90 |
-
</tr>
|
91 |
-
|
92 |
-
<tr>
|
93 |
-
<td class="label"><label for="onmousedown">onmousedown</label>:</td>
|
94 |
-
<td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
|
95 |
-
</tr>
|
96 |
-
|
97 |
-
<tr>
|
98 |
-
<td class="label"><label for="onmouseup">onmouseup</label>:</td>
|
99 |
-
<td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
|
100 |
-
</tr>
|
101 |
-
|
102 |
-
<tr>
|
103 |
-
<td class="label"><label for="onmouseover">onmouseover</label>:</td>
|
104 |
-
<td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
|
105 |
-
</tr>
|
106 |
-
|
107 |
-
<tr>
|
108 |
-
<td class="label"><label for="onmousemove">onmousemove</label>:</td>
|
109 |
-
<td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
|
110 |
-
</tr>
|
111 |
-
|
112 |
-
<tr>
|
113 |
-
<td class="label"><label for="onmouseout">onmouseout</label>:</td>
|
114 |
-
<td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
|
115 |
-
</tr>
|
116 |
-
|
117 |
-
<tr>
|
118 |
-
<td class="label"><label for="onkeypress">onkeypress</label>:</td>
|
119 |
-
<td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
|
120 |
-
</tr>
|
121 |
-
|
122 |
-
<tr>
|
123 |
-
<td class="label"><label for="onkeydown">onkeydown</label>:</td>
|
124 |
-
<td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
|
125 |
-
</tr>
|
126 |
-
|
127 |
-
<tr>
|
128 |
-
<td class="label"><label for="onkeyup">onkeyup</label>:</td>
|
129 |
-
<td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
|
130 |
-
</tr>
|
131 |
-
</table>
|
132 |
-
</fieldset>
|
133 |
-
</div>
|
134 |
-
</div>
|
135 |
-
<div class="mceActionPanel">
|
136 |
-
<div style="float: left">
|
137 |
-
<input type="submit" id="insert" name="insert" value="{#update}" />
|
138 |
-
</div>
|
139 |
-
<div style="float: left">
|
140 |
-
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeCite();" style="display: none;" />
|
141 |
-
</div>
|
142 |
-
<div style="float: right">
|
143 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
144 |
-
</div>
|
145 |
-
</div>
|
146 |
-
|
147 |
-
</form>
|
148 |
-
</body>
|
149 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#xhtmlxtras_dlg.title_cite_element}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/editable_selects.js?ver=3211"></script>
|
9 |
+
<script type="text/javascript" src="js/element_common.js?ver=3211"></script>
|
10 |
+
<script type="text/javascript" src="js/cite.js?ver=3211"></script>
|
11 |
+
<link rel="stylesheet" type="text/css" href="css/popup.css?ver=3211" />
|
12 |
+
<base target="_self" />
|
13 |
+
</head>
|
14 |
+
<body style="display: none">
|
15 |
+
<form onsubmit="insertCite();return false;" action="#">
|
16 |
+
<div class="tabs">
|
17 |
+
<ul>
|
18 |
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
|
19 |
+
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
|
20 |
+
</ul>
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<div class="panel_wrapper">
|
24 |
+
<div id="general_panel" class="panel current">
|
25 |
+
<fieldset>
|
26 |
+
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
|
27 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
28 |
+
<tr>
|
29 |
+
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
|
30 |
+
<td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
|
31 |
+
</tr>
|
32 |
+
<tr>
|
33 |
+
<td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
|
34 |
+
<td><input id="id" name="id" type="text" value="" class="field" /></td>
|
35 |
+
</tr>
|
36 |
+
<tr>
|
37 |
+
<td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
|
38 |
+
<td>
|
39 |
+
<select id="class" name="class" class="field mceEditableSelect">
|
40 |
+
<option value="">{#not_set}</option>
|
41 |
+
</select>
|
42 |
+
</td>
|
43 |
+
</tr>
|
44 |
+
<tr>
|
45 |
+
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
|
46 |
+
<td><input id="style" name="style" type="text" value="" class="field" /></td>
|
47 |
+
</tr>
|
48 |
+
<tr>
|
49 |
+
<td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
|
50 |
+
<td>
|
51 |
+
<select id="dir" name="dir" class="field">
|
52 |
+
<option value="">{#not_set}</option>
|
53 |
+
<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
|
54 |
+
<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
|
55 |
+
</select>
|
56 |
+
</td>
|
57 |
+
</tr>
|
58 |
+
<tr>
|
59 |
+
<td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
|
60 |
+
<td>
|
61 |
+
<input id="lang" name="lang" type="text" value="" class="field" />
|
62 |
+
</td>
|
63 |
+
</tr>
|
64 |
+
</table>
|
65 |
+
</fieldset>
|
66 |
+
</div>
|
67 |
+
<div id="events_panel" class="panel">
|
68 |
+
<fieldset>
|
69 |
+
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
|
70 |
+
|
71 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
72 |
+
<tr>
|
73 |
+
<td class="label"><label for="onfocus">onfocus</label>:</td>
|
74 |
+
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
|
75 |
+
</tr>
|
76 |
+
|
77 |
+
<tr>
|
78 |
+
<td class="label"><label for="onblur">onblur</label>:</td>
|
79 |
+
<td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
|
80 |
+
</tr>
|
81 |
+
|
82 |
+
<tr>
|
83 |
+
<td class="label"><label for="onclick">onclick</label>:</td>
|
84 |
+
<td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
|
85 |
+
</tr>
|
86 |
+
|
87 |
+
<tr>
|
88 |
+
<td class="label"><label for="ondblclick">ondblclick</label>:</td>
|
89 |
+
<td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
|
90 |
+
</tr>
|
91 |
+
|
92 |
+
<tr>
|
93 |
+
<td class="label"><label for="onmousedown">onmousedown</label>:</td>
|
94 |
+
<td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
|
95 |
+
</tr>
|
96 |
+
|
97 |
+
<tr>
|
98 |
+
<td class="label"><label for="onmouseup">onmouseup</label>:</td>
|
99 |
+
<td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
|
100 |
+
</tr>
|
101 |
+
|
102 |
+
<tr>
|
103 |
+
<td class="label"><label for="onmouseover">onmouseover</label>:</td>
|
104 |
+
<td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
|
105 |
+
</tr>
|
106 |
+
|
107 |
+
<tr>
|
108 |
+
<td class="label"><label for="onmousemove">onmousemove</label>:</td>
|
109 |
+
<td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
|
110 |
+
</tr>
|
111 |
+
|
112 |
+
<tr>
|
113 |
+
<td class="label"><label for="onmouseout">onmouseout</label>:</td>
|
114 |
+
<td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
|
115 |
+
</tr>
|
116 |
+
|
117 |
+
<tr>
|
118 |
+
<td class="label"><label for="onkeypress">onkeypress</label>:</td>
|
119 |
+
<td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
|
120 |
+
</tr>
|
121 |
+
|
122 |
+
<tr>
|
123 |
+
<td class="label"><label for="onkeydown">onkeydown</label>:</td>
|
124 |
+
<td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
|
125 |
+
</tr>
|
126 |
+
|
127 |
+
<tr>
|
128 |
+
<td class="label"><label for="onkeyup">onkeyup</label>:</td>
|
129 |
+
<td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
|
130 |
+
</tr>
|
131 |
+
</table>
|
132 |
+
</fieldset>
|
133 |
+
</div>
|
134 |
+
</div>
|
135 |
+
<div class="mceActionPanel">
|
136 |
+
<div style="float: left">
|
137 |
+
<input type="submit" id="insert" name="insert" value="{#update}" />
|
138 |
+
</div>
|
139 |
+
<div style="float: left">
|
140 |
+
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeCite();" style="display: none;" />
|
141 |
+
</div>
|
142 |
+
<div style="float: right">
|
143 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
144 |
+
</div>
|
145 |
+
</div>
|
146 |
+
|
147 |
+
</form>
|
148 |
+
</body>
|
149 |
+
</html>
|
mce/xhtmlxtras/css/attributes.css
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
.panel_wrapper div.current {
|
2 |
-
height: 290px;
|
3 |
-
}
|
4 |
-
|
5 |
-
#id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey {
|
6 |
-
width: 200px;
|
7 |
-
}
|
8 |
-
|
9 |
-
#events_panel input {
|
10 |
-
width: 200px;
|
11 |
-
}
|
1 |
+
.panel_wrapper div.current {
|
2 |
+
height: 290px;
|
3 |
+
}
|
4 |
+
|
5 |
+
#id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey {
|
6 |
+
width: 200px;
|
7 |
+
}
|
8 |
+
|
9 |
+
#events_panel input {
|
10 |
+
width: 200px;
|
11 |
+
}
|
mce/xhtmlxtras/css/popup.css
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
input.field, select.field {width:200px;}
|
2 |
-
input.picker {width:179px; margin-left: 5px;}
|
3 |
-
input.disabled {border-color:#F2F2F2;}
|
4 |
-
img.picker {vertical-align:text-bottom; cursor:pointer;}
|
5 |
-
h1 {padding: 0 0 5px 0;}
|
6 |
-
.panel_wrapper div.current {height:160px;}
|
7 |
-
#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;}
|
8 |
-
a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;}
|
9 |
-
#datetime {width:180px;}
|
1 |
+
input.field, select.field {width:200px;}
|
2 |
+
input.picker {width:179px; margin-left: 5px;}
|
3 |
+
input.disabled {border-color:#F2F2F2;}
|
4 |
+
img.picker {vertical-align:text-bottom; cursor:pointer;}
|
5 |
+
h1 {padding: 0 0 5px 0;}
|
6 |
+
.panel_wrapper div.current {height:160px;}
|
7 |
+
#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;}
|
8 |
+
a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;}
|
9 |
+
#datetime {width:180px;}
|
mce/xhtmlxtras/del.htm
CHANGED
@@ -1,170 +1,170 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#xhtmlxtras_dlg.title_del_element}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/editable_selects.js?ver=
|
9 |
-
<script type="text/javascript" src="js/element_common.js?ver=
|
10 |
-
<script type="text/javascript" src="js/del.js?ver=
|
11 |
-
<link rel="stylesheet" type="text/css" href="css/popup.css?ver=
|
12 |
-
<base target="_self" />
|
13 |
-
</head>
|
14 |
-
<body id="xhtmlxtrasins" style="display: none">
|
15 |
-
<form onsubmit="insertDel();return false;" action="#">
|
16 |
-
<div class="tabs">
|
17 |
-
<ul>
|
18 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
|
19 |
-
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
|
20 |
-
</ul>
|
21 |
-
</div>
|
22 |
-
|
23 |
-
<div class="panel_wrapper">
|
24 |
-
<div id="general_panel" class="panel current">
|
25 |
-
<fieldset>
|
26 |
-
<legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>
|
27 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
28 |
-
<tr>
|
29 |
-
<td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td>
|
30 |
-
<td>
|
31 |
-
<table border="0" cellspacing="0" cellpadding="0">
|
32 |
-
<tr>
|
33 |
-
<td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td>
|
34 |
-
<td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse"><span class="datetime" alt="{#xhtmlxtras_dlg.insert_date}" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
|
35 |
-
</tr>
|
36 |
-
</table>
|
37 |
-
</td>
|
38 |
-
</tr>
|
39 |
-
<tr>
|
40 |
-
<td class="label"><label id="citelabel" for="cite">{#xhtmlxtras_dlg.attribute_label_cite}</label>:</td>
|
41 |
-
<td><input id="cite" name="cite" type="text" value="" class="field" /></td>
|
42 |
-
</tr>
|
43 |
-
</table>
|
44 |
-
</fieldset>
|
45 |
-
<fieldset>
|
46 |
-
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
|
47 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
48 |
-
<tr>
|
49 |
-
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
|
50 |
-
<td><input id="title" name="title" type="text" value="" class="field" /></td>
|
51 |
-
</tr>
|
52 |
-
<tr>
|
53 |
-
<td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
|
54 |
-
<td><input id="id" name="id" type="text" value="" class="field" /></td>
|
55 |
-
</tr>
|
56 |
-
<tr>
|
57 |
-
<td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
|
58 |
-
<td>
|
59 |
-
<select id="class" name="class" class="field mceEditableSelect">
|
60 |
-
<option value="">{#not_set}</option>
|
61 |
-
</select>
|
62 |
-
</td>
|
63 |
-
</tr>
|
64 |
-
<tr>
|
65 |
-
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
|
66 |
-
<td><input id="style" name="style" type="text" value="" class="field" /></td>
|
67 |
-
</tr>
|
68 |
-
<tr>
|
69 |
-
<td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
|
70 |
-
<td>
|
71 |
-
<select id="dir" name="dir" class="field">
|
72 |
-
<option value="">{#not_set}</option>
|
73 |
-
<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
|
74 |
-
<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
|
75 |
-
</select>
|
76 |
-
</td>
|
77 |
-
</tr>
|
78 |
-
<tr>
|
79 |
-
<td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
|
80 |
-
<td>
|
81 |
-
<input id="lang" name="lang" type="text" value="" class="field" />
|
82 |
-
</td>
|
83 |
-
</tr>
|
84 |
-
</table>
|
85 |
-
</fieldset>
|
86 |
-
</div>
|
87 |
-
<div id="events_panel" class="panel">
|
88 |
-
<fieldset>
|
89 |
-
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
|
90 |
-
|
91 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
92 |
-
<tr>
|
93 |
-
<td class="label"><label for="onfocus">onfocus</label>:</td>
|
94 |
-
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
|
95 |
-
</tr>
|
96 |
-
|
97 |
-
<tr>
|
98 |
-
<td class="label"><label for="onblur">onblur</label>:</td>
|
99 |
-
<td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
|
100 |
-
</tr>
|
101 |
-
|
102 |
-
<tr>
|
103 |
-
<td class="label"><label for="onclick">onclick</label>:</td>
|
104 |
-
<td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
|
105 |
-
</tr>
|
106 |
-
|
107 |
-
<tr>
|
108 |
-
<td class="label"><label for="ondblclick">ondblclick</label>:</td>
|
109 |
-
<td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
|
110 |
-
</tr>
|
111 |
-
|
112 |
-
<tr>
|
113 |
-
<td class="label"><label for="onmousedown">onmousedown</label>:</td>
|
114 |
-
<td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
|
115 |
-
</tr>
|
116 |
-
|
117 |
-
<tr>
|
118 |
-
<td class="label"><label for="onmouseup">onmouseup</label>:</td>
|
119 |
-
<td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
|
120 |
-
</tr>
|
121 |
-
|
122 |
-
<tr>
|
123 |
-
<td class="label"><label for="onmouseover">onmouseover</label>:</td>
|
124 |
-
<td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
|
125 |
-
</tr>
|
126 |
-
|
127 |
-
<tr>
|
128 |
-
<td class="label"><label for="onmousemove">onmousemove</label>:</td>
|
129 |
-
<td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
|
130 |
-
</tr>
|
131 |
-
|
132 |
-
<tr>
|
133 |
-
<td class="label"><label for="onmouseout">onmouseout</label>:</td>
|
134 |
-
<td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
|
135 |
-
</tr>
|
136 |
-
|
137 |
-
<tr>
|
138 |
-
<td class="label"><label for="onkeypress">onkeypress</label>:</td>
|
139 |
-
<td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
|
140 |
-
</tr>
|
141 |
-
|
142 |
-
<tr>
|
143 |
-
<td class="label"><label for="onkeydown">onkeydown</label>:</td>
|
144 |
-
<td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
|
145 |
-
</tr>
|
146 |
-
|
147 |
-
<tr>
|
148 |
-
<td class="label"><label for="onkeyup">onkeyup</label>:</td>
|
149 |
-
<td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
|
150 |
-
</tr>
|
151 |
-
</table>
|
152 |
-
</fieldset>
|
153 |
-
</div>
|
154 |
-
</div>
|
155 |
-
<div class="mceActionPanel">
|
156 |
-
<div style="float: left">
|
157 |
-
<input type="submit" id="insert" name="insert" value="{#update}" />
|
158 |
-
</div>
|
159 |
-
<div style="float: left">
|
160 |
-
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeDel();" style="display: none;" />
|
161 |
-
</div>
|
162 |
-
<div style="float: right">
|
163 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
164 |
-
</div>
|
165 |
-
</div>
|
166 |
-
|
167 |
-
</form>
|
168 |
-
|
169 |
-
</body>
|
170 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#xhtmlxtras_dlg.title_del_element}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/editable_selects.js?ver=3211"></script>
|
9 |
+
<script type="text/javascript" src="js/element_common.js?ver=3211"></script>
|
10 |
+
<script type="text/javascript" src="js/del.js?ver=3211"></script>
|
11 |
+
<link rel="stylesheet" type="text/css" href="css/popup.css?ver=3211" />
|
12 |
+
<base target="_self" />
|
13 |
+
</head>
|
14 |
+
<body id="xhtmlxtrasins" style="display: none">
|
15 |
+
<form onsubmit="insertDel();return false;" action="#">
|
16 |
+
<div class="tabs">
|
17 |
+
<ul>
|
18 |
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
|
19 |
+
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
|
20 |
+
</ul>
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<div class="panel_wrapper">
|
24 |
+
<div id="general_panel" class="panel current">
|
25 |
+
<fieldset>
|
26 |
+
<legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>
|
27 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
28 |
+
<tr>
|
29 |
+
<td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td>
|
30 |
+
<td>
|
31 |
+
<table border="0" cellspacing="0" cellpadding="0">
|
32 |
+
<tr>
|
33 |
+
<td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td>
|
34 |
+
<td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse"><span class="datetime" alt="{#xhtmlxtras_dlg.insert_date}" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
|
35 |
+
</tr>
|
36 |
+
</table>
|
37 |
+
</td>
|
38 |
+
</tr>
|
39 |
+
<tr>
|
40 |
+
<td class="label"><label id="citelabel" for="cite">{#xhtmlxtras_dlg.attribute_label_cite}</label>:</td>
|
41 |
+
<td><input id="cite" name="cite" type="text" value="" class="field" /></td>
|
42 |
+
</tr>
|
43 |
+
</table>
|
44 |
+
</fieldset>
|
45 |
+
<fieldset>
|
46 |
+
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
|
47 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
48 |
+
<tr>
|
49 |
+
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
|
50 |
+
<td><input id="title" name="title" type="text" value="" class="field" /></td>
|
51 |
+
</tr>
|
52 |
+
<tr>
|
53 |
+
<td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
|
54 |
+
<td><input id="id" name="id" type="text" value="" class="field" /></td>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
|
58 |
+
<td>
|
59 |
+
<select id="class" name="class" class="field mceEditableSelect">
|
60 |
+
<option value="">{#not_set}</option>
|
61 |
+
</select>
|
62 |
+
</td>
|
63 |
+
</tr>
|
64 |
+
<tr>
|
65 |
+
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
|
66 |
+
<td><input id="style" name="style" type="text" value="" class="field" /></td>
|
67 |
+
</tr>
|
68 |
+
<tr>
|
69 |
+
<td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
|
70 |
+
<td>
|
71 |
+
<select id="dir" name="dir" class="field">
|
72 |
+
<option value="">{#not_set}</option>
|
73 |
+
<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
|
74 |
+
<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
|
75 |
+
</select>
|
76 |
+
</td>
|
77 |
+
</tr>
|
78 |
+
<tr>
|
79 |
+
<td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
|
80 |
+
<td>
|
81 |
+
<input id="lang" name="lang" type="text" value="" class="field" />
|
82 |
+
</td>
|
83 |
+
</tr>
|
84 |
+
</table>
|
85 |
+
</fieldset>
|
86 |
+
</div>
|
87 |
+
<div id="events_panel" class="panel">
|
88 |
+
<fieldset>
|
89 |
+
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
|
90 |
+
|
91 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
92 |
+
<tr>
|
93 |
+
<td class="label"><label for="onfocus">onfocus</label>:</td>
|
94 |
+
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
|
95 |
+
</tr>
|
96 |
+
|
97 |
+
<tr>
|
98 |
+
<td class="label"><label for="onblur">onblur</label>:</td>
|
99 |
+
<td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
|
100 |
+
</tr>
|
101 |
+
|
102 |
+
<tr>
|
103 |
+
<td class="label"><label for="onclick">onclick</label>:</td>
|
104 |
+
<td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
|
105 |
+
</tr>
|
106 |
+
|
107 |
+
<tr>
|
108 |
+
<td class="label"><label for="ondblclick">ondblclick</label>:</td>
|
109 |
+
<td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
|
110 |
+
</tr>
|
111 |
+
|
112 |
+
<tr>
|
113 |
+
<td class="label"><label for="onmousedown">onmousedown</label>:</td>
|
114 |
+
<td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
|
115 |
+
</tr>
|
116 |
+
|
117 |
+
<tr>
|
118 |
+
<td class="label"><label for="onmouseup">onmouseup</label>:</td>
|
119 |
+
<td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
|
120 |
+
</tr>
|
121 |
+
|
122 |
+
<tr>
|
123 |
+
<td class="label"><label for="onmouseover">onmouseover</label>:</td>
|
124 |
+
<td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
|
125 |
+
</tr>
|
126 |
+
|
127 |
+
<tr>
|
128 |
+
<td class="label"><label for="onmousemove">onmousemove</label>:</td>
|
129 |
+
<td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
|
130 |
+
</tr>
|
131 |
+
|
132 |
+
<tr>
|
133 |
+
<td class="label"><label for="onmouseout">onmouseout</label>:</td>
|
134 |
+
<td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
|
135 |
+
</tr>
|
136 |
+
|
137 |
+
<tr>
|
138 |
+
<td class="label"><label for="onkeypress">onkeypress</label>:</td>
|
139 |
+
<td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
|
140 |
+
</tr>
|
141 |
+
|
142 |
+
<tr>
|
143 |
+
<td class="label"><label for="onkeydown">onkeydown</label>:</td>
|
144 |
+
<td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
|
145 |
+
</tr>
|
146 |
+
|
147 |
+
<tr>
|
148 |
+
<td class="label"><label for="onkeyup">onkeyup</label>:</td>
|
149 |
+
<td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
|
150 |
+
</tr>
|
151 |
+
</table>
|
152 |
+
</fieldset>
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
<div class="mceActionPanel">
|
156 |
+
<div style="float: left">
|
157 |
+
<input type="submit" id="insert" name="insert" value="{#update}" />
|
158 |
+
</div>
|
159 |
+
<div style="float: left">
|
160 |
+
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeDel();" style="display: none;" />
|
161 |
+
</div>
|
162 |
+
<div style="float: right">
|
163 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
164 |
+
</div>
|
165 |
+
</div>
|
166 |
+
|
167 |
+
</form>
|
168 |
+
|
169 |
+
</body>
|
170 |
+
</html>
|
mce/xhtmlxtras/editor_plugin.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(){tinymce.create('tinymce.plugins.XHTMLXtrasPlugin',{init:function(ed,url){ed.addCommand('mceCite',function(){ed.windowManager.open({file:url+'/cite.htm',width:350+parseInt(ed.getLang('xhtmlxtras.cite_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.cite_delta_height',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAcronym',function(){ed.windowManager.open({file:url+'/acronym.htm',width:350+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAbbr',function(){ed.windowManager.open({file:url+'/abbr.htm',width:350+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceDel',function(){ed.windowManager.open({file:url+'/del.htm',width:340+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceIns',function(){ed.windowManager.open({file:url+'/ins.htm',width:340+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAttributes',function(){ed.windowManager.open({file:url+'/attributes.htm',width:380,height:370,inline:1},{plugin_url:url});});ed.addButton('cite',{title:'xhtmlxtras.cite_desc',cmd:'mceCite'});ed.addButton('acronym',{title:'xhtmlxtras.acronym_desc',cmd:'mceAcronym'});ed.addButton('abbr',{title:'xhtmlxtras.abbr_desc',cmd:'mceAbbr'});ed.addButton('del',{title:'xhtmlxtras.del_desc',cmd:'mceDel'});ed.addButton('ins',{title:'xhtmlxtras.ins_desc',cmd:'mceIns'});ed.addButton('attribs',{title:'xhtmlxtras.attribs_desc',cmd:'mceAttributes'});if(tinymce.isIE){function fix(ed,o){if(o.set){o.content=o.content.replace(/<abbr([^>]+)>/gi,'<html:abbr $1>');o.content=o.content.replace(/<\/abbr>/gi,'</html:abbr>');}};ed.onBeforeSetContent.add(fix);ed.onPostProcess.add(fix);}ed.onNodeChange.add(function(ed,cm,n,co){n=ed.dom.getParent(n,'CITE,ACRONYM,ABBR,DEL,INS');cm.setDisabled('cite',co);cm.setDisabled('acronym',co);cm.setDisabled('abbr',co);cm.setDisabled('del',co);cm.setDisabled('ins',co);cm.setDisabled('attribs',n&&n.nodeName=='BODY');
|
1 |
+
(function(){tinymce.create('tinymce.plugins.XHTMLXtrasPlugin',{init:function(ed,url){ed.addCommand('mceCite',function(){ed.windowManager.open({file:url+'/cite.htm',width:350+parseInt(ed.getLang('xhtmlxtras.cite_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.cite_delta_height',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAcronym',function(){ed.windowManager.open({file:url+'/acronym.htm',width:350+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAbbr',function(){ed.windowManager.open({file:url+'/abbr.htm',width:350+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceDel',function(){ed.windowManager.open({file:url+'/del.htm',width:340+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceIns',function(){ed.windowManager.open({file:url+'/ins.htm',width:340+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAttributes',function(){ed.windowManager.open({file:url+'/attributes.htm',width:380,height:370,inline:1},{plugin_url:url});});ed.addButton('cite',{title:'xhtmlxtras.cite_desc',cmd:'mceCite'});ed.addButton('acronym',{title:'xhtmlxtras.acronym_desc',cmd:'mceAcronym'});ed.addButton('abbr',{title:'xhtmlxtras.abbr_desc',cmd:'mceAbbr'});ed.addButton('del',{title:'xhtmlxtras.del_desc',cmd:'mceDel'});ed.addButton('ins',{title:'xhtmlxtras.ins_desc',cmd:'mceIns'});ed.addButton('attribs',{title:'xhtmlxtras.attribs_desc',cmd:'mceAttributes'});if(tinymce.isIE){function fix(ed,o){if(o.set){o.content=o.content.replace(/<abbr([^>]+)>/gi,'<html:abbr $1>');o.content=o.content.replace(/<\/abbr>/gi,'</html:abbr>');}};ed.onBeforeSetContent.add(fix);ed.onPostProcess.add(fix);}ed.onNodeChange.add(function(ed,cm,n,co){n=ed.dom.getParent(n,'CITE,ACRONYM,ABBR,DEL,INS');cm.setDisabled('cite',co);cm.setDisabled('acronym',co);cm.setDisabled('abbr',co);cm.setDisabled('del',co);cm.setDisabled('ins',co);cm.setDisabled('attribs',n&&n.nodeName=='BODY');cm.setActive('cite',0);cm.setActive('acronym',0);cm.setActive('abbr',0);cm.setActive('del',0);cm.setActive('ins',0);if(n){do{cm.setDisabled(n.nodeName.toLowerCase(),0);cm.setActive(n.nodeName.toLowerCase(),1);}while(n=n.parentNode);}});},getInfo:function(){return{longname:'XHTML Xtras Plugin',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('xhtmlxtras',tinymce.plugins.XHTMLXtrasPlugin);})();
|
mce/xhtmlxtras/ins.htm
CHANGED
@@ -1,170 +1,170 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#xhtmlxtras_dlg.title_ins_element}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js?ver=
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js?ver=
|
8 |
-
<script type="text/javascript" src="../../utils/editable_selects.js?ver=
|
9 |
-
<script type="text/javascript" src="js/element_common.js?ver=
|
10 |
-
<script type="text/javascript" src="js/ins.js?ver=
|
11 |
-
<link rel="stylesheet" type="text/css" href="css/popup.css?ver=
|
12 |
-
<base target="_self" />
|
13 |
-
</head>
|
14 |
-
<body id="xhtmlxtrasins" style="display: none">
|
15 |
-
<form onsubmit="insertIns();return false;" action="#">
|
16 |
-
<div class="tabs">
|
17 |
-
<ul>
|
18 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
|
19 |
-
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
|
20 |
-
</ul>
|
21 |
-
</div>
|
22 |
-
|
23 |
-
<div class="panel_wrapper">
|
24 |
-
<div id="general_panel" class="panel current">
|
25 |
-
<fieldset>
|
26 |
-
<legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>
|
27 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
28 |
-
<tr>
|
29 |
-
<td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td>
|
30 |
-
<td>
|
31 |
-
<table border="0" cellspacing="0" cellpadding="0">
|
32 |
-
<tr>
|
33 |
-
<td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td>
|
34 |
-
<td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse"><span class="datetime" alt="{#xhtmlxtras_dlg.insert_date}" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
|
35 |
-
</tr>
|
36 |
-
</table>
|
37 |
-
</td>
|
38 |
-
</tr>
|
39 |
-
<tr>
|
40 |
-
<td class="label"><label id="citelabel" for="cite">{#xhtmlxtras_dlg.attribute_label_cite}</label>:</td>
|
41 |
-
<td><input id="cite" name="cite" type="text" value="" class="field" /></td>
|
42 |
-
</tr>
|
43 |
-
</table>
|
44 |
-
</fieldset>
|
45 |
-
<fieldset>
|
46 |
-
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
|
47 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
48 |
-
<tr>
|
49 |
-
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
|
50 |
-
<td><input id="title" name="title" type="text" value="" class="field" /></td>
|
51 |
-
</tr>
|
52 |
-
<tr>
|
53 |
-
<td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
|
54 |
-
<td><input id="id" name="id" type="text" value="" class="field" /></td>
|
55 |
-
</tr>
|
56 |
-
<tr>
|
57 |
-
<td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
|
58 |
-
<td>
|
59 |
-
<select id="class" name="class" class="field mceEditableSelect">
|
60 |
-
<option value="">{#not_set}</option>
|
61 |
-
</select>
|
62 |
-
</td>
|
63 |
-
</tr>
|
64 |
-
<tr>
|
65 |
-
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
|
66 |
-
<td><input id="style" name="style" type="text" value="" class="field" /></td>
|
67 |
-
</tr>
|
68 |
-
<tr>
|
69 |
-
<td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
|
70 |
-
<td>
|
71 |
-
<select id="dir" name="dir" class="field">
|
72 |
-
<option value="">{#not_set}</option>
|
73 |
-
<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
|
74 |
-
<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
|
75 |
-
</select>
|
76 |
-
</td>
|
77 |
-
</tr>
|
78 |
-
<tr>
|
79 |
-
<td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
|
80 |
-
<td>
|
81 |
-
<input id="lang" name="lang" type="text" value="" class="field" />
|
82 |
-
</td>
|
83 |
-
</tr>
|
84 |
-
</table>
|
85 |
-
</fieldset>
|
86 |
-
</div>
|
87 |
-
<div id="events_panel" class="panel">
|
88 |
-
<fieldset>
|
89 |
-
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
|
90 |
-
|
91 |
-
<table border="0" cellpadding="0" cellspacing="4">
|
92 |
-
<tr>
|
93 |
-
<td class="label"><label for="onfocus">onfocus</label>:</td>
|
94 |
-
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
|
95 |
-
</tr>
|
96 |
-
|
97 |
-
<tr>
|
98 |
-
<td class="label"><label for="onblur">onblur</label>:</td>
|
99 |
-
<td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
|
100 |
-
</tr>
|
101 |
-
|
102 |
-
<tr>
|
103 |
-
<td class="label"><label for="onclick">onclick</label>:</td>
|
104 |
-
<td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
|
105 |
-
</tr>
|
106 |
-
|
107 |
-
<tr>
|
108 |
-
<td class="label"><label for="ondblclick">ondblclick</label>:</td>
|
109 |
-
<td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
|
110 |
-
</tr>
|
111 |
-
|
112 |
-
<tr>
|
113 |
-
<td class="label"><label for="onmousedown">onmousedown</label>:</td>
|
114 |
-
<td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
|
115 |
-
</tr>
|
116 |
-
|
117 |
-
<tr>
|
118 |
-
<td class="label"><label for="onmouseup">onmouseup</label>:</td>
|
119 |
-
<td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
|
120 |
-
</tr>
|
121 |
-
|
122 |
-
<tr>
|
123 |
-
<td class="label"><label for="onmouseover">onmouseover</label>:</td>
|
124 |
-
<td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
|
125 |
-
</tr>
|
126 |
-
|
127 |
-
<tr>
|
128 |
-
<td class="label"><label for="onmousemove">onmousemove</label>:</td>
|
129 |
-
<td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
|
130 |
-
</tr>
|
131 |
-
|
132 |
-
<tr>
|
133 |
-
<td class="label"><label for="onmouseout">onmouseout</label>:</td>
|
134 |
-
<td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
|
135 |
-
</tr>
|
136 |
-
|
137 |
-
<tr>
|
138 |
-
<td class="label"><label for="onkeypress">onkeypress</label>:</td>
|
139 |
-
<td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
|
140 |
-
</tr>
|
141 |
-
|
142 |
-
<tr>
|
143 |
-
<td class="label"><label for="onkeydown">onkeydown</label>:</td>
|
144 |
-
<td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
|
145 |
-
</tr>
|
146 |
-
|
147 |
-
<tr>
|
148 |
-
<td class="label"><label for="onkeyup">onkeyup</label>:</td>
|
149 |
-
<td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
|
150 |
-
</tr>
|
151 |
-
</table>
|
152 |
-
</fieldset>
|
153 |
-
</div>
|
154 |
-
</div>
|
155 |
-
<div class="mceActionPanel">
|
156 |
-
<div style="float: left">
|
157 |
-
<input type="submit" id="insert" name="insert" value="{#update}" />
|
158 |
-
</div>
|
159 |
-
<div style="float: left">
|
160 |
-
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeIns();" style="display: none;" />
|
161 |
-
</div>
|
162 |
-
<div style="float: right">
|
163 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
164 |
-
</div>
|
165 |
-
</div>
|
166 |
-
|
167 |
-
</form>
|
168 |
-
|
169 |
-
</body>
|
170 |
-
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#xhtmlxtras_dlg.title_ins_element}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=3211"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js?ver=3211"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js?ver=3211"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/editable_selects.js?ver=3211"></script>
|
9 |
+
<script type="text/javascript" src="js/element_common.js?ver=3211"></script>
|
10 |
+
<script type="text/javascript" src="js/ins.js?ver=3211"></script>
|
11 |
+
<link rel="stylesheet" type="text/css" href="css/popup.css?ver=3211" />
|
12 |
+
<base target="_self" />
|
13 |
+
</head>
|
14 |
+
<body id="xhtmlxtrasins" style="display: none">
|
15 |
+
<form onsubmit="insertIns();return false;" action="#">
|
16 |
+
<div class="tabs">
|
17 |
+
<ul>
|
18 |
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
|
19 |
+
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
|
20 |
+
</ul>
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<div class="panel_wrapper">
|
24 |
+
<div id="general_panel" class="panel current">
|
25 |
+
<fieldset>
|
26 |
+
<legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>
|
27 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
28 |
+
<tr>
|
29 |
+
<td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td>
|
30 |
+
<td>
|
31 |
+
<table border="0" cellspacing="0" cellpadding="0">
|
32 |
+
<tr>
|
33 |
+
<td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td>
|
34 |
+
<td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse"><span class="datetime" alt="{#xhtmlxtras_dlg.insert_date}" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
|
35 |
+
</tr>
|
36 |
+
</table>
|
37 |
+
</td>
|
38 |
+
</tr>
|
39 |
+
<tr>
|
40 |
+
<td class="label"><label id="citelabel" for="cite">{#xhtmlxtras_dlg.attribute_label_cite}</label>:</td>
|
41 |
+
<td><input id="cite" name="cite" type="text" value="" class="field" /></td>
|
42 |
+
</tr>
|
43 |
+
</table>
|
44 |
+
</fieldset>
|
45 |
+
<fieldset>
|
46 |
+
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
|
47 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
48 |
+
<tr>
|
49 |
+
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
|
50 |
+
<td><input id="title" name="title" type="text" value="" class="field" /></td>
|
51 |
+
</tr>
|
52 |
+
<tr>
|
53 |
+
<td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
|
54 |
+
<td><input id="id" name="id" type="text" value="" class="field" /></td>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
|
58 |
+
<td>
|
59 |
+
<select id="class" name="class" class="field mceEditableSelect">
|
60 |
+
<option value="">{#not_set}</option>
|
61 |
+
</select>
|
62 |
+
</td>
|
63 |
+
</tr>
|
64 |
+
<tr>
|
65 |
+
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
|
66 |
+
<td><input id="style" name="style" type="text" value="" class="field" /></td>
|
67 |
+
</tr>
|
68 |
+
<tr>
|
69 |
+
<td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
|
70 |
+
<td>
|
71 |
+
<select id="dir" name="dir" class="field">
|
72 |
+
<option value="">{#not_set}</option>
|
73 |
+
<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
|
74 |
+
<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
|
75 |
+
</select>
|
76 |
+
</td>
|
77 |
+
</tr>
|
78 |
+
<tr>
|
79 |
+
<td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
|
80 |
+
<td>
|
81 |
+
<input id="lang" name="lang" type="text" value="" class="field" />
|
82 |
+
</td>
|
83 |
+
</tr>
|
84 |
+
</table>
|
85 |
+
</fieldset>
|
86 |
+
</div>
|
87 |
+
<div id="events_panel" class="panel">
|
88 |
+
<fieldset>
|
89 |
+
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
|
90 |
+
|
91 |
+
<table border="0" cellpadding="0" cellspacing="4">
|
92 |
+
<tr>
|
93 |
+
<td class="label"><label for="onfocus">onfocus</label>:</td>
|
94 |
+
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
|
95 |
+
</tr>
|
96 |
+
|
97 |
+
<tr>
|
98 |
+
<td class="label"><label for="onblur">onblur</label>:</td>
|
99 |
+
<td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
|
100 |
+
</tr>
|
101 |
+
|
102 |
+
<tr>
|
103 |
+
<td class="label"><label for="onclick">onclick</label>:</td>
|
104 |
+
<td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
|
105 |
+
</tr>
|
106 |
+
|
107 |
+
<tr>
|
108 |
+
<td class="label"><label for="ondblclick">ondblclick</label>:</td>
|
109 |
+
<td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
|
110 |
+
</tr>
|
111 |
+
|
112 |
+
<tr>
|
113 |
+
<td class="label"><label for="onmousedown">onmousedown</label>:</td>
|
114 |
+
<td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
|
115 |
+
</tr>
|
116 |
+
|
117 |
+
<tr>
|
118 |
+
<td class="label"><label for="onmouseup">onmouseup</label>:</td>
|
119 |
+
<td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
|
120 |
+
</tr>
|
121 |
+
|
122 |
+
<tr>
|
123 |
+
<td class="label"><label for="onmouseover">onmouseover</label>:</td>
|
124 |
+
<td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
|
125 |
+
</tr>
|
126 |
+
|
127 |
+
<tr>
|
128 |
+
<td class="label"><label for="onmousemove">onmousemove</label>:</td>
|
129 |
+
<td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
|
130 |
+
</tr>
|
131 |
+
|
132 |
+
<tr>
|
133 |
+
<td class="label"><label for="onmouseout">onmouseout</label>:</td>
|
134 |
+
<td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
|
135 |
+
</tr>
|
136 |
+
|
137 |
+
<tr>
|
138 |
+
<td class="label"><label for="onkeypress">onkeypress</label>:</td>
|
139 |
+
<td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
|
140 |
+
</tr>
|
141 |
+
|
142 |
+
<tr>
|
143 |
+
<td class="label"><label for="onkeydown">onkeydown</label>:</td>
|
144 |
+
<td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
|
145 |
+
</tr>
|
146 |
+
|
147 |
+
<tr>
|
148 |
+
<td class="label"><label for="onkeyup">onkeyup</label>:</td>
|
149 |
+
<td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
|
150 |
+
</tr>
|
151 |
+
</table>
|
152 |
+
</fieldset>
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
<div class="mceActionPanel">
|
156 |
+
<div style="float: left">
|
157 |
+
<input type="submit" id="insert" name="insert" value="{#update}" />
|
158 |
+
</div>
|
159 |
+
<div style="float: left">
|
160 |
+
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeIns();" style="display: none;" />
|
161 |
+
</div>
|
162 |
+
<div style="float: right">
|
163 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
164 |
+
</div>
|
165 |
+
</div>
|
166 |
+
|
167 |
+
</form>
|
168 |
+
|
169 |
+
</body>
|
170 |
+
</html>
|
mce/xhtmlxtras/js/abbr.js
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
/**
|
2 |
-
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
-
*
|
4 |
-
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
-
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6 |
-
*/
|
7 |
-
|
8 |
-
function init() {
|
9 |
-
SXE.initElementDialog('abbr');
|
10 |
-
if (SXE.currentAction == "update") {
|
11 |
-
SXE.showRemoveButton();
|
12 |
-
}
|
13 |
-
}
|
14 |
-
|
15 |
-
function insertAbbr() {
|
16 |
-
SXE.insertElement(tinymce.isIE ? 'html:abbr' : 'abbr');
|
17 |
-
tinyMCEPopup.close();
|
18 |
-
}
|
19 |
-
|
20 |
-
function removeAbbr() {
|
21 |
-
SXE.removeElement('abbr');
|
22 |
-
tinyMCEPopup.close();
|
23 |
-
}
|
24 |
-
|
25 |
-
tinyMCEPopup.onInit.add(init);
|
1 |
+
/**
|
2 |
+
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
+
*
|
4 |
+
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6 |
+
*/
|
7 |
+
|
8 |
+
function init() {
|
9 |
+
SXE.initElementDialog('abbr');
|
10 |
+
if (SXE.currentAction == "update") {
|
11 |
+
SXE.showRemoveButton();
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
15 |
+
function insertAbbr() {
|
16 |
+
SXE.insertElement(tinymce.isIE ? 'html:abbr' : 'abbr');
|
17 |
+
tinyMCEPopup.close();
|
18 |
+
}
|
19 |
+
|
20 |
+
function removeAbbr() {
|
21 |
+
SXE.removeElement('abbr');
|
22 |
+
tinyMCEPopup.close();
|
23 |
+
}
|
24 |
+
|
25 |
+
tinyMCEPopup.onInit.add(init);
|
mce/xhtmlxtras/js/acronym.js
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
/**
|
2 |
-
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
-
*
|
4 |
-
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
-
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6 |
-
*/
|
7 |
-
|
8 |
-
function init() {
|
9 |
-
SXE.initElementDialog('acronym');
|
10 |
-
if (SXE.currentAction == "update") {
|
11 |
-
SXE.showRemoveButton();
|
12 |
-
}
|
13 |
-
}
|
14 |
-
|
15 |
-
function insertAcronym() {
|
16 |
-
SXE.insertElement('acronym');
|
17 |
-
tinyMCEPopup.close();
|
18 |
-
}
|
19 |
-
|
20 |
-
function removeAcronym() {
|
21 |
-
SXE.removeElement('acronym');
|
22 |
-
tinyMCEPopup.close();
|
23 |
-
}
|
24 |
-
|
25 |
-
tinyMCEPopup.onInit.add(init);
|
1 |
+
/**
|
2 |
+
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
+
*
|
4 |
+
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6 |
+
*/
|
7 |
+
|
8 |
+
function init() {
|
9 |
+
SXE.initElementDialog('acronym');
|
10 |
+
if (SXE.currentAction == "update") {
|
11 |
+
SXE.showRemoveButton();
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
15 |
+
function insertAcronym() {
|
16 |
+
SXE.insertElement('acronym');
|
17 |
+
tinyMCEPopup.close();
|
18 |
+
}
|
19 |
+
|
20 |
+
function removeAcronym() {
|
21 |
+
SXE.removeElement('acronym');
|
22 |
+
tinyMCEPopup.close();
|
23 |
+
}
|
24 |
+
|
25 |
+
tinyMCEPopup.onInit.add(init);
|
mce/xhtmlxtras/js/attributes.js
CHANGED
@@ -1,123 +1,123 @@
|
|
1 |
-
/**
|
2 |
-
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
-
*
|
4 |
-
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
-
* @copyright Copyright � 2004-2006, Moxiecode Systems AB, All rights reserved.
|
6 |
-
*/
|
7 |
-
|
8 |
-
function init() {
|
9 |
-
tinyMCEPopup.resizeToInnerSize();
|
10 |
-
var inst = tinyMCEPopup.editor;
|
11 |
-
var dom = inst.dom;
|
12 |
-
var elm = inst.selection.getNode();
|
13 |
-
var f = document.forms[0];
|
14 |
-
var onclick = dom.getAttrib(elm, 'onclick');
|
15 |
-
|
16 |
-
setFormValue('title', dom.getAttrib(elm, 'title'));
|
17 |
-
setFormValue('id', dom.getAttrib(elm, 'id'));
|
18 |
-
setFormValue('style', dom.getAttrib(elm, "style"));
|
19 |
-
setFormValue('dir', dom.getAttrib(elm, 'dir'));
|
20 |
-
setFormValue('lang', dom.getAttrib(elm, 'lang'));
|
21 |
-
setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
|
22 |
-
setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
|
23 |
-
setFormValue('onfocus', dom.getAttrib(elm, 'onfocus'));
|
24 |
-
setFormValue('onblur', dom.getAttrib(elm, 'onblur'));
|
25 |
-
setFormValue('onclick', onclick);
|
26 |
-
setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick'));
|
27 |
-
setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown'));
|
28 |
-
setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup'));
|
29 |
-
setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover'));
|
30 |
-
setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove'));
|
31 |
-
setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout'));
|
32 |
-
setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress'));
|
33 |
-
setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown'));
|
34 |
-
setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup'));
|
35 |
-
className = dom.getAttrib(elm, 'class');
|
36 |
-
|
37 |
-
addClassesToList('classlist', 'advlink_styles');
|
38 |
-
selectByValue(f, 'classlist', className, true);
|
39 |
-
|
40 |
-
TinyMCE_EditableSelects.init();
|
41 |
-
}
|
42 |
-
|
43 |
-
function setFormValue(name, value) {
|
44 |
-
if(value && document.forms[0].elements[name]){
|
45 |
-
document.forms[0].elements[name].value = value;
|
46 |
-
}
|
47 |
-
}
|
48 |
-
|
49 |
-
function insertAction() {
|
50 |
-
var inst = tinyMCEPopup.editor;
|
51 |
-
var elm = inst.selection.getNode();
|
52 |
-
|
53 |
-
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
54 |
-
setAllAttribs(elm);
|
55 |
-
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
56 |
-
tinyMCEPopup.close();
|
57 |
-
}
|
58 |
-
|
59 |
-
function setAttrib(elm, attrib, value) {
|
60 |
-
var formObj = document.forms[0];
|
61 |
-
var valueElm = formObj.elements[attrib.toLowerCase()];
|
62 |
-
var inst = tinyMCEPopup.editor;
|
63 |
-
var dom = inst.dom;
|
64 |
-
|
65 |
-
if (typeof(value) == "undefined" || value == null) {
|
66 |
-
value = "";
|
67 |
-
|
68 |
-
if (valueElm)
|
69 |
-
value = valueElm.value;
|
70 |
-
}
|
71 |
-
|
72 |
-
if (value != "") {
|
73 |
-
dom.setAttrib(elm, attrib.toLowerCase(), value);
|
74 |
-
|
75 |
-
if (attrib == "style")
|
76 |
-
attrib = "style.cssText";
|
77 |
-
|
78 |
-
if (attrib.substring(0, 2) == 'on')
|
79 |
-
value = 'return true;' + value;
|
80 |
-
|
81 |
-
if (attrib == "class")
|
82 |
-
attrib = "className";
|
83 |
-
|
84 |
-
elm[attrib]=value;
|
85 |
-
} else
|
86 |
-
elm.removeAttribute(attrib);
|
87 |
-
}
|
88 |
-
|
89 |
-
function setAllAttribs(elm) {
|
90 |
-
var f = document.forms[0];
|
91 |
-
|
92 |
-
setAttrib(elm, 'title');
|
93 |
-
setAttrib(elm, 'id');
|
94 |
-
setAttrib(elm, 'style');
|
95 |
-
setAttrib(elm, 'class', getSelectValue(f, 'classlist'));
|
96 |
-
setAttrib(elm, 'dir');
|
97 |
-
setAttrib(elm, 'lang');
|
98 |
-
setAttrib(elm, 'tabindex');
|
99 |
-
setAttrib(elm, 'accesskey');
|
100 |
-
setAttrib(elm, 'onfocus');
|
101 |
-
setAttrib(elm, 'onblur');
|
102 |
-
setAttrib(elm, 'onclick');
|
103 |
-
setAttrib(elm, 'ondblclick');
|
104 |
-
setAttrib(elm, 'onmousedown');
|
105 |
-
setAttrib(elm, 'onmouseup');
|
106 |
-
setAttrib(elm, 'onmouseover');
|
107 |
-
setAttrib(elm, 'onmousemove');
|
108 |
-
setAttrib(elm, 'onmouseout');
|
109 |
-
setAttrib(elm, 'onkeypress');
|
110 |
-
setAttrib(elm, 'onkeydown');
|
111 |
-
setAttrib(elm, 'onkeyup');
|
112 |
-
|
113 |
-
// Refresh in old MSIE
|
114 |
-
// if (tinyMCE.isMSIE5)
|
115 |
-
// elm.outerHTML = elm.outerHTML;
|
116 |
-
}
|
117 |
-
|
118 |
-
function insertAttribute() {
|
119 |
-
tinyMCEPopup.close();
|
120 |
-
}
|
121 |
-
|
122 |
-
tinyMCEPopup.onInit.add(init);
|
123 |
-
tinyMCEPopup.requireLangPack();
|
1 |
+
/**
|
2 |
+
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
+
*
|
4 |
+
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
+
* @copyright Copyright � 2004-2006, Moxiecode Systems AB, All rights reserved.
|
6 |
+
*/
|
7 |
+
|
8 |
+
function init() {
|
9 |
+
tinyMCEPopup.resizeToInnerSize();
|
10 |
+
var inst = tinyMCEPopup.editor;
|
11 |
+
var dom = inst.dom;
|
12 |
+
var elm = inst.selection.getNode();
|
13 |
+
var f = document.forms[0];
|
14 |
+
var onclick = dom.getAttrib(elm, 'onclick');
|
15 |
+
|
16 |
+
setFormValue('title', dom.getAttrib(elm, 'title'));
|
17 |
+
setFormValue('id', dom.getAttrib(elm, 'id'));
|
18 |
+
setFormValue('style', dom.getAttrib(elm, "style"));
|
19 |
+
setFormValue('dir', dom.getAttrib(elm, 'dir'));
|
20 |
+
setFormValue('lang', dom.getAttrib(elm, 'lang'));
|
21 |
+
setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
|
22 |
+
setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
|
23 |
+
setFormValue('onfocus', dom.getAttrib(elm, 'onfocus'));
|
24 |
+
setFormValue('onblur', dom.getAttrib(elm, 'onblur'));
|
25 |
+
setFormValue('onclick', onclick);
|
26 |
+
setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick'));
|
27 |
+
setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown'));
|
28 |
+
setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup'));
|
29 |
+
setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover'));
|
30 |
+
setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove'));
|
31 |
+
setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout'));
|
32 |
+
setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress'));
|
33 |
+
setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown'));
|
34 |
+
setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup'));
|
35 |
+
className = dom.getAttrib(elm, 'class');
|
36 |
+
|
37 |
+
addClassesToList('classlist', 'advlink_styles');
|
38 |
+
selectByValue(f, 'classlist', className, true);
|
39 |
+
|
40 |
+
TinyMCE_EditableSelects.init();
|
41 |
+
}
|
42 |
+
|
43 |
+
function setFormValue(name, value) {
|
44 |
+
if(value && document.forms[0].elements[name]){
|
45 |
+
document.forms[0].elements[name].value = value;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
function insertAction() {
|
50 |
+
var inst = tinyMCEPopup.editor;
|
51 |
+
var elm = inst.selection.getNode();
|
52 |
+
|
53 |
+
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
54 |
+
setAllAttribs(elm);
|
55 |
+
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
56 |
+
tinyMCEPopup.close();
|
57 |
+
}
|
58 |
+
|
59 |
+
function setAttrib(elm, attrib, value) {
|
60 |
+
var formObj = document.forms[0];
|
61 |
+
var valueElm = formObj.elements[attrib.toLowerCase()];
|
62 |
+
var inst = tinyMCEPopup.editor;
|
63 |
+
var dom = inst.dom;
|
64 |
+
|
65 |
+
if (typeof(value) == "undefined" || value == null) {
|
66 |
+
value = "";
|
67 |
+
|
68 |
+
if (valueElm)
|
69 |
+
value = valueElm.value;
|
70 |
+
}
|
71 |
+
|
72 |
+
if (value != "") {
|
73 |
+
dom.setAttrib(elm, attrib.toLowerCase(), value);
|
74 |
+
|
75 |
+
if (attrib == "style")
|
76 |
+
attrib = "style.cssText";
|
77 |
+
|
78 |
+
if (attrib.substring(0, 2) == 'on')
|
79 |
+
value = 'return true;' + value;
|
80 |
+
|
81 |
+
if (attrib == "class")
|
82 |
+
attrib = "className";
|
83 |
+
|
84 |
+
elm[attrib]=value;
|
85 |
+
} else
|
86 |
+
elm.removeAttribute(attrib);
|
87 |
+
}
|
88 |
+
|
89 |
+
function setAllAttribs(elm) {
|
90 |
+
var f = document.forms[0];
|
91 |
+
|
92 |
+
setAttrib(elm, 'title');
|
93 |
+
setAttrib(elm, 'id');
|
94 |
+
setAttrib(elm, 'style');
|
95 |
+
setAttrib(elm, 'class', getSelectValue(f, 'classlist'));
|
96 |
+
setAttrib(elm, 'dir');
|
97 |
+
setAttrib(elm, 'lang');
|
98 |
+
setAttrib(elm, 'tabindex');
|
99 |
+
setAttrib(elm, 'accesskey');
|
100 |
+
setAttrib(elm, 'onfocus');
|
101 |
+
setAttrib(elm, 'onblur');
|
102 |
+
setAttrib(elm, 'onclick');
|
103 |
+
setAttrib(elm, 'ondblclick');
|
104 |
+
setAttrib(elm, 'onmousedown');
|
105 |
+
setAttrib(elm, 'onmouseup');
|
106 |
+
setAttrib(elm, 'onmouseover');
|
107 |
+
setAttrib(elm, 'onmousemove');
|
108 |
+
setAttrib(elm, 'onmouseout');
|
109 |
+
setAttrib(elm, 'onkeypress');
|
110 |
+
setAttrib(elm, 'onkeydown');
|
111 |
+
setAttrib(elm, 'onkeyup');
|
112 |
+
|
113 |
+
// Refresh in old MSIE
|
114 |
+
// if (tinyMCE.isMSIE5)
|
115 |
+
// elm.outerHTML = elm.outerHTML;
|
116 |
+
}
|
117 |
+
|
118 |
+
function insertAttribute() {
|
119 |
+
tinyMCEPopup.close();
|
120 |
+
}
|
121 |
+
|
122 |
+
tinyMCEPopup.onInit.add(init);
|
123 |
+
tinyMCEPopup.requireLangPack();
|
mce/xhtmlxtras/js/cite.js
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
/**
|
2 |
-
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
-
*
|
4 |
-
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
-
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6 |
-
*/
|
7 |
-
|
8 |
-
function init() {
|
9 |
-
SXE.initElementDialog('cite');
|
10 |
-
if (SXE.currentAction == "update") {
|
11 |
-
SXE.showRemoveButton();
|
12 |
-
}
|
13 |
-
}
|
14 |
-
|
15 |
-
function insertCite() {
|
16 |
-
SXE.insertElement('cite');
|
17 |
-
tinyMCEPopup.close();
|
18 |
-
}
|
19 |
-
|
20 |
-
function removeCite() {
|
21 |
-
SXE.removeElement('cite');
|
22 |
-
tinyMCEPopup.close();
|
23 |
-
}
|
24 |
-
|
25 |
-
tinyMCEPopup.onInit.add(init);
|
1 |
+
/**
|
2 |
+
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
+
*
|
4 |
+
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6 |
+
*/
|
7 |
+
|
8 |
+
function init() {
|
9 |
+
SXE.initElementDialog('cite');
|
10 |
+
if (SXE.currentAction == "update") {
|
11 |
+
SXE.showRemoveButton();
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
15 |
+
function insertCite() {
|
16 |
+
SXE.insertElement('cite');
|
17 |
+
tinyMCEPopup.close();
|
18 |
+
}
|
19 |
+
|
20 |
+
function removeCite() {
|
21 |
+
SXE.removeElement('cite');
|
22 |
+
tinyMCEPopup.close();
|
23 |
+
}
|
24 |
+
|
25 |
+
tinyMCEPopup.onInit.add(init);
|
mce/xhtmlxtras/js/del.js
CHANGED
@@ -1,50 +1,60 @@
|
|
1 |
-
/**
|
2 |
-
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
-
*
|
4 |
-
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
-
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6 |
-
*/
|
7 |
-
|
8 |
-
function init() {
|
9 |
-
SXE.initElementDialog('del');
|
10 |
-
if (SXE.currentAction == "update") {
|
11 |
-
setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
|
12 |
-
setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
|
13 |
-
SXE.showRemoveButton();
|
14 |
-
}
|
15 |
-
}
|
16 |
-
|
17 |
-
function setElementAttribs(elm) {
|
18 |
-
setAllCommonAttribs(elm);
|
19 |
-
setAttrib(elm, 'datetime');
|
20 |
-
setAttrib(elm, 'cite');
|
21 |
-
}
|
22 |
-
|
23 |
-
function insertDel() {
|
24 |
-
var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL');
|
25 |
-
|
26 |
-
tinyMCEPopup.execCommand('mceBeginUndoLevel');
|
27 |
-
if (elm == null) {
|
28 |
-
var s = SXE.inst.selection.getContent();
|
29 |
-
if(s.length > 0) {
|
30 |
-
|
31 |
-
var elementArray = tinymce.grep(SXE.inst.dom.select('del'), function(n) {return n.id == '#sxe_temp_del#';});
|
32 |
-
for (var i=0; i<elementArray.length; i++) {
|
33 |
-
var elm = elementArray[i];
|
34 |
-
setElementAttribs(elm);
|
35 |
-
}
|
36 |
-
}
|
37 |
-
} else {
|
38 |
-
setElementAttribs(elm);
|
39 |
-
}
|
40 |
-
tinyMCEPopup.editor.nodeChanged();
|
41 |
-
tinyMCEPopup.execCommand('mceEndUndoLevel');
|
42 |
-
tinyMCEPopup.close();
|
43 |
-
}
|
44 |
-
|
45 |
-
function
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/**
|
2 |
+
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
+
*
|
4 |
+
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6 |
+
*/
|
7 |
+
|
8 |
+
function init() {
|
9 |
+
SXE.initElementDialog('del');
|
10 |
+
if (SXE.currentAction == "update") {
|
11 |
+
setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
|
12 |
+
setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
|
13 |
+
SXE.showRemoveButton();
|
14 |
+
}
|
15 |
+
}
|
16 |
+
|
17 |
+
function setElementAttribs(elm) {
|
18 |
+
setAllCommonAttribs(elm);
|
19 |
+
setAttrib(elm, 'datetime');
|
20 |
+
setAttrib(elm, 'cite');
|
21 |
+
}
|
22 |
+
|
23 |
+
function insertDel() {
|
24 |
+
var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL');
|
25 |
+
|
26 |
+
tinyMCEPopup.execCommand('mceBeginUndoLevel');
|
27 |
+
if (elm == null) {
|
28 |
+
var s = SXE.inst.selection.getContent();
|
29 |
+
if(s.length > 0) {
|
30 |
+
insertInlineElement('del');
|
31 |
+
var elementArray = tinymce.grep(SXE.inst.dom.select('del'), function(n) {return n.id == '#sxe_temp_del#';});
|
32 |
+
for (var i=0; i<elementArray.length; i++) {
|
33 |
+
var elm = elementArray[i];
|
34 |
+
setElementAttribs(elm);
|
35 |
+
}
|
36 |
+
}
|
37 |
+
} else {
|
38 |
+
setElementAttribs(elm);
|
39 |
+
}
|
40 |
+
tinyMCEPopup.editor.nodeChanged();
|
41 |
+
tinyMCEPopup.execCommand('mceEndUndoLevel');
|
42 |
+
tinyMCEPopup.close();
|
43 |
+
}
|
44 |
+
|
45 |
+
function insertInlineElement(en) {
|
46 |
+
var ed = tinyMCEPopup.editor, dom = ed.dom;
|
47 |
+
|
48 |
+
ed.getDoc().execCommand('FontName', false, 'mceinline');
|
49 |
+
tinymce.each(dom.select(tinymce.isWebKit ? 'span' : 'font'), function(n) {
|
50 |
+
if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline')
|
51 |
+
dom.replace(dom.create(en), n, 1);
|
52 |
+
});
|
53 |
+
}
|
54 |
+
|
55 |
+
function removeDel() {
|
56 |
+
SXE.removeElement('del');
|
57 |
+
tinyMCEPopup.close();
|
58 |
+
}
|
59 |
+
|
60 |
+
tinyMCEPopup.onInit.add(init);
|
mce/xhtmlxtras/js/element_common.js
CHANGED
@@ -1,221 +1,231 @@
|
|
1 |
-
/**
|
2 |
-
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
-
*
|
4 |
-
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
-
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6 |
-
*/
|
7 |
-
|
8 |
-
tinyMCEPopup.requireLangPack();
|
9 |
-
|
10 |
-
function initCommonAttributes(elm) {
|
11 |
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
12 |
-
|
13 |
-
// Setup form data for common element attributes
|
14 |
-
setFormValue('title', dom.getAttrib(elm, 'title'));
|
15 |
-
setFormValue('id', dom.getAttrib(elm, 'id'));
|
16 |
-
selectByValue(formObj, 'class', dom.getAttrib(elm, 'class'), true);
|
17 |
-
setFormValue('style', dom.getAttrib(elm, 'style'));
|
18 |
-
selectByValue(formObj, 'dir', dom.getAttrib(elm, 'dir'));
|
19 |
-
setFormValue('lang', dom.getAttrib(elm, 'lang'));
|
20 |
-
setFormValue('onfocus', dom.getAttrib(elm, 'onfocus'));
|
21 |
-
setFormValue('onblur', dom.getAttrib(elm, 'onblur'));
|
22 |
-
setFormValue('onclick', dom.getAttrib(elm, 'onclick'));
|
23 |
-
setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick'));
|
24 |
-
setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown'));
|
25 |
-
setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup'));
|
26 |
-
setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover'));
|
27 |
-
setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove'));
|
28 |
-
setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout'));
|
29 |
-
setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress'));
|
30 |
-
setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown'));
|
31 |
-
setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup'));
|
32 |
-
}
|
33 |
-
|
34 |
-
function setFormValue(name, value) {
|
35 |
-
if(document.forms[0].elements[name]) document.forms[0].elements[name].value = value;
|
36 |
-
}
|
37 |
-
|
38 |
-
function insertDateTime(id) {
|
39 |
-
document.getElementById(id).value = getDateTime(new Date(), "%Y-%m-%dT%H:%M:%S");
|
40 |
-
}
|
41 |
-
|
42 |
-
function getDateTime(d, fmt) {
|
43 |
-
fmt = fmt.replace("%D", "%m/%d/%y");
|
44 |
-
fmt = fmt.replace("%r", "%I:%M:%S %p");
|
45 |
-
fmt = fmt.replace("%Y", "" + d.getFullYear());
|
46 |
-
fmt = fmt.replace("%y", "" + d.getYear());
|
47 |
-
fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
|
48 |
-
fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
|
49 |
-
fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
|
50 |
-
fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
|
51 |
-
fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
|
52 |
-
fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
|
53 |
-
fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
|
54 |
-
fmt = fmt.replace("%%", "%");
|
55 |
-
|
56 |
-
return fmt;
|
57 |
-
}
|
58 |
-
|
59 |
-
function addZeros(value, len) {
|
60 |
-
var i;
|
61 |
-
|
62 |
-
value = "" + value;
|
63 |
-
|
64 |
-
if (value.length < len) {
|
65 |
-
for (i=0; i<(len-value.length); i++)
|
66 |
-
value = "0" + value;
|
67 |
-
}
|
68 |
-
|
69 |
-
return value;
|
70 |
-
}
|
71 |
-
|
72 |
-
function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
|
73 |
-
if (!form_obj || !form_obj.elements[field_name])
|
74 |
-
return;
|
75 |
-
|
76 |
-
var sel = form_obj.elements[field_name];
|
77 |
-
|
78 |
-
var found = false;
|
79 |
-
for (var i=0; i<sel.options.length; i++) {
|
80 |
-
var option = sel.options[i];
|
81 |
-
|
82 |
-
if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
|
83 |
-
option.selected = true;
|
84 |
-
found = true;
|
85 |
-
} else
|
86 |
-
option.selected = false;
|
87 |
-
}
|
88 |
-
|
89 |
-
if (!found && add_custom && value != '') {
|
90 |
-
var option = new Option('Value: ' + value, value);
|
91 |
-
option.selected = true;
|
92 |
-
sel.options[sel.options.length] = option;
|
93 |
-
}
|
94 |
-
|
95 |
-
return found;
|
96 |
-
}
|
97 |
-
|
98 |
-
function setAttrib(elm, attrib, value) {
|
99 |
-
var formObj = document.forms[0];
|
100 |
-
var valueElm = formObj.elements[attrib.toLowerCase()];
|
101 |
-
tinyMCEPopup.editor.dom.setAttrib(elm, attrib, value || valueElm.value);
|
102 |
-
}
|
103 |
-
|
104 |
-
function setAllCommonAttribs(elm) {
|
105 |
-
setAttrib(elm, 'title');
|
106 |
-
setAttrib(elm, 'id');
|
107 |
-
setAttrib(elm, 'class');
|
108 |
-
setAttrib(elm, 'style');
|
109 |
-
setAttrib(elm, 'dir');
|
110 |
-
setAttrib(elm, 'lang');
|
111 |
-
/*setAttrib(elm, 'onfocus');
|
112 |
-
setAttrib(elm, 'onblur');
|
113 |
-
setAttrib(elm, 'onclick');
|
114 |
-
setAttrib(elm, 'ondblclick');
|
115 |
-
setAttrib(elm, 'onmousedown');
|
116 |
-
setAttrib(elm, 'onmouseup');
|
117 |
-
setAttrib(elm, 'onmouseover');
|
118 |
-
setAttrib(elm, 'onmousemove');
|
119 |
-
setAttrib(elm, 'onmouseout');
|
120 |
-
setAttrib(elm, 'onkeypress');
|
121 |
-
setAttrib(elm, 'onkeydown');
|
122 |
-
setAttrib(elm, 'onkeyup');*/
|
123 |
-
}
|
124 |
-
|
125 |
-
SXE = {
|
126 |
-
currentAction : "insert",
|
127 |
-
inst : tinyMCEPopup.editor,
|
128 |
-
updateElement : null
|
129 |
-
}
|
130 |
-
|
131 |
-
SXE.focusElement = SXE.inst.selection.getNode();
|
132 |
-
|
133 |
-
SXE.initElementDialog = function(element_name) {
|
134 |
-
addClassesToList('class', 'xhtmlxtras_styles');
|
135 |
-
TinyMCE_EditableSelects.init();
|
136 |
-
|
137 |
-
element_name = element_name.toLowerCase();
|
138 |
-
var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
|
139 |
-
if (elm != null && elm.nodeName.toUpperCase() == element_name.toUpperCase()) {
|
140 |
-
SXE.currentAction = "update";
|
141 |
-
}
|
142 |
-
|
143 |
-
if (SXE.currentAction == "update") {
|
144 |
-
initCommonAttributes(elm);
|
145 |
-
SXE.updateElement = elm;
|
146 |
-
}
|
147 |
-
|
148 |
-
document.forms[0].insert.value = tinyMCEPopup.getLang(SXE.currentAction, 'Insert', true);
|
149 |
-
}
|
150 |
-
|
151 |
-
SXE.insertElement = function(element_name) {
|
152 |
-
var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase()), h, tagName;
|
153 |
-
|
154 |
-
tinyMCEPopup.execCommand('mceBeginUndoLevel');
|
155 |
-
if (elm == null) {
|
156 |
-
var s = SXE.inst.selection.getContent();
|
157 |
-
if(s.length > 0) {
|
158 |
-
tagName = element_name;
|
159 |
-
|
160 |
-
if (tinymce.isIE && element_name.indexOf('html:') == 0)
|
161 |
-
element_name = element_name.substring(5).toLowerCase();
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
}
|
177 |
-
}
|
178 |
-
} else {
|
179 |
-
setAllCommonAttribs(elm);
|
180 |
-
}
|
181 |
-
SXE.inst.nodeChanged();
|
182 |
-
tinyMCEPopup.execCommand('mceEndUndoLevel');
|
183 |
-
}
|
184 |
-
|
185 |
-
SXE.removeElement = function(element_name){
|
186 |
-
element_name = element_name.toLowerCase();
|
187 |
-
elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
|
188 |
-
if(elm && elm.nodeName.toUpperCase() == element_name.toUpperCase()){
|
189 |
-
tinyMCEPopup.execCommand('mceBeginUndoLevel');
|
190 |
-
tinyMCE.execCommand('mceRemoveNode', false, elm);
|
191 |
-
SXE.inst.nodeChanged();
|
192 |
-
tinyMCEPopup.execCommand('mceEndUndoLevel');
|
193 |
-
}
|
194 |
-
}
|
195 |
-
|
196 |
-
SXE.showRemoveButton = function() {
|
197 |
-
document.getElementById("remove").style.display = 'block';
|
198 |
-
}
|
199 |
-
|
200 |
-
SXE.containsClass = function(elm,cl) {
|
201 |
-
return (elm.className.indexOf(cl) > -1) ? true : false;
|
202 |
-
}
|
203 |
-
|
204 |
-
SXE.removeClass = function(elm,cl) {
|
205 |
-
if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) {
|
206 |
-
return true;
|
207 |
-
}
|
208 |
-
var classNames = elm.className.split(" ");
|
209 |
-
var newClassNames = "";
|
210 |
-
for (var x = 0, cnl = classNames.length; x < cnl; x++) {
|
211 |
-
if (classNames[x] != cl) {
|
212 |
-
newClassNames += (classNames[x] + " ");
|
213 |
-
}
|
214 |
-
}
|
215 |
-
elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end
|
216 |
-
}
|
217 |
-
|
218 |
-
SXE.addClass = function(elm,cl) {
|
219 |
-
if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl;
|
220 |
-
return true;
|
221 |
-
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/**
|
2 |
+
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
+
*
|
4 |
+
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6 |
+
*/
|
7 |
+
|
8 |
+
tinyMCEPopup.requireLangPack();
|
9 |
+
|
10 |
+
function initCommonAttributes(elm) {
|
11 |
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
12 |
+
|
13 |
+
// Setup form data for common element attributes
|
14 |
+
setFormValue('title', dom.getAttrib(elm, 'title'));
|
15 |
+
setFormValue('id', dom.getAttrib(elm, 'id'));
|
16 |
+
selectByValue(formObj, 'class', dom.getAttrib(elm, 'class'), true);
|
17 |
+
setFormValue('style', dom.getAttrib(elm, 'style'));
|
18 |
+
selectByValue(formObj, 'dir', dom.getAttrib(elm, 'dir'));
|
19 |
+
setFormValue('lang', dom.getAttrib(elm, 'lang'));
|
20 |
+
setFormValue('onfocus', dom.getAttrib(elm, 'onfocus'));
|
21 |
+
setFormValue('onblur', dom.getAttrib(elm, 'onblur'));
|
22 |
+
setFormValue('onclick', dom.getAttrib(elm, 'onclick'));
|
23 |
+
setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick'));
|
24 |
+
setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown'));
|
25 |
+
setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup'));
|
26 |
+
setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover'));
|
27 |
+
setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove'));
|
28 |
+
setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout'));
|
29 |
+
setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress'));
|
30 |
+
setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown'));
|
31 |
+
setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup'));
|
32 |
+
}
|
33 |
+
|
34 |
+
function setFormValue(name, value) {
|
35 |
+
if(document.forms[0].elements[name]) document.forms[0].elements[name].value = value;
|
36 |
+
}
|
37 |
+
|
38 |
+
function insertDateTime(id) {
|
39 |
+
document.getElementById(id).value = getDateTime(new Date(), "%Y-%m-%dT%H:%M:%S");
|
40 |
+
}
|
41 |
+
|
42 |
+
function getDateTime(d, fmt) {
|
43 |
+
fmt = fmt.replace("%D", "%m/%d/%y");
|
44 |
+
fmt = fmt.replace("%r", "%I:%M:%S %p");
|
45 |
+
fmt = fmt.replace("%Y", "" + d.getFullYear());
|
46 |
+
fmt = fmt.replace("%y", "" + d.getYear());
|
47 |
+
fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
|
48 |
+
fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
|
49 |
+
fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
|
50 |
+
fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
|
51 |
+
fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
|
52 |
+
fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
|
53 |
+
fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
|
54 |
+
fmt = fmt.replace("%%", "%");
|
55 |
+
|
56 |
+
return fmt;
|
57 |
+
}
|
58 |
+
|
59 |
+
function addZeros(value, len) {
|
60 |
+
var i;
|
61 |
+
|
62 |
+
value = "" + value;
|
63 |
+
|
64 |
+
if (value.length < len) {
|
65 |
+
for (i=0; i<(len-value.length); i++)
|
66 |
+
value = "0" + value;
|
67 |
+
}
|
68 |
+
|
69 |
+
return value;
|
70 |
+
}
|
71 |
+
|
72 |
+
function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
|
73 |
+
if (!form_obj || !form_obj.elements[field_name])
|
74 |
+
return;
|
75 |
+
|
76 |
+
var sel = form_obj.elements[field_name];
|
77 |
+
|
78 |
+
var found = false;
|
79 |
+
for (var i=0; i<sel.options.length; i++) {
|
80 |
+
var option = sel.options[i];
|
81 |
+
|
82 |
+
if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
|
83 |
+
option.selected = true;
|
84 |
+
found = true;
|
85 |
+
} else
|
86 |
+
option.selected = false;
|
87 |
+
}
|
88 |
+
|
89 |
+
if (!found && add_custom && value != '') {
|
90 |
+
var option = new Option('Value: ' + value, value);
|
91 |
+
option.selected = true;
|
92 |
+
sel.options[sel.options.length] = option;
|
93 |
+
}
|
94 |
+
|
95 |
+
return found;
|
96 |
+
}
|
97 |
+
|
98 |
+
function setAttrib(elm, attrib, value) {
|
99 |
+
var formObj = document.forms[0];
|
100 |
+
var valueElm = formObj.elements[attrib.toLowerCase()];
|
101 |
+
tinyMCEPopup.editor.dom.setAttrib(elm, attrib, value || valueElm.value);
|
102 |
+
}
|
103 |
+
|
104 |
+
function setAllCommonAttribs(elm) {
|
105 |
+
setAttrib(elm, 'title');
|
106 |
+
setAttrib(elm, 'id');
|
107 |
+
setAttrib(elm, 'class');
|
108 |
+
setAttrib(elm, 'style');
|
109 |
+
setAttrib(elm, 'dir');
|
110 |
+
setAttrib(elm, 'lang');
|
111 |
+
/*setAttrib(elm, 'onfocus');
|
112 |
+
setAttrib(elm, 'onblur');
|
113 |
+
setAttrib(elm, 'onclick');
|
114 |
+
setAttrib(elm, 'ondblclick');
|
115 |
+
setAttrib(elm, 'onmousedown');
|
116 |
+
setAttrib(elm, 'onmouseup');
|
117 |
+
setAttrib(elm, 'onmouseover');
|
118 |
+
setAttrib(elm, 'onmousemove');
|
119 |
+
setAttrib(elm, 'onmouseout');
|
120 |
+
setAttrib(elm, 'onkeypress');
|
121 |
+
setAttrib(elm, 'onkeydown');
|
122 |
+
setAttrib(elm, 'onkeyup');*/
|
123 |
+
}
|
124 |
+
|
125 |
+
SXE = {
|
126 |
+
currentAction : "insert",
|
127 |
+
inst : tinyMCEPopup.editor,
|
128 |
+
updateElement : null
|
129 |
+
}
|
130 |
+
|
131 |
+
SXE.focusElement = SXE.inst.selection.getNode();
|
132 |
+
|
133 |
+
SXE.initElementDialog = function(element_name) {
|
134 |
+
addClassesToList('class', 'xhtmlxtras_styles');
|
135 |
+
TinyMCE_EditableSelects.init();
|
136 |
+
|
137 |
+
element_name = element_name.toLowerCase();
|
138 |
+
var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
|
139 |
+
if (elm != null && elm.nodeName.toUpperCase() == element_name.toUpperCase()) {
|
140 |
+
SXE.currentAction = "update";
|
141 |
+
}
|
142 |
+
|
143 |
+
if (SXE.currentAction == "update") {
|
144 |
+
initCommonAttributes(elm);
|
145 |
+
SXE.updateElement = elm;
|
146 |
+
}
|
147 |
+
|
148 |
+
document.forms[0].insert.value = tinyMCEPopup.getLang(SXE.currentAction, 'Insert', true);
|
149 |
+
}
|
150 |
+
|
151 |
+
SXE.insertElement = function(element_name) {
|
152 |
+
var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase()), h, tagName;
|
153 |
+
|
154 |
+
tinyMCEPopup.execCommand('mceBeginUndoLevel');
|
155 |
+
if (elm == null) {
|
156 |
+
var s = SXE.inst.selection.getContent();
|
157 |
+
if(s.length > 0) {
|
158 |
+
tagName = element_name;
|
159 |
+
|
160 |
+
if (tinymce.isIE && element_name.indexOf('html:') == 0)
|
161 |
+
element_name = element_name.substring(5).toLowerCase();
|
162 |
+
|
163 |
+
insertInlineElement(element_name);
|
164 |
+
var elementArray = tinymce.grep(SXE.inst.dom.select(element_name));
|
165 |
+
for (var i=0; i<elementArray.length; i++) {
|
166 |
+
var elm = elementArray[i];
|
167 |
+
|
168 |
+
if (SXE.inst.dom.getAttrib(elm, '_mce_new')) {
|
169 |
+
elm.id = '';
|
170 |
+
elm.setAttribute('id', '');
|
171 |
+
elm.removeAttribute('id');
|
172 |
+
elm.removeAttribute('_mce_new');
|
173 |
+
|
174 |
+
setAllCommonAttribs(elm);
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
+
} else {
|
179 |
+
setAllCommonAttribs(elm);
|
180 |
+
}
|
181 |
+
SXE.inst.nodeChanged();
|
182 |
+
tinyMCEPopup.execCommand('mceEndUndoLevel');
|
183 |
+
}
|
184 |
+
|
185 |
+
SXE.removeElement = function(element_name){
|
186 |
+
element_name = element_name.toLowerCase();
|
187 |
+
elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
|
188 |
+
if(elm && elm.nodeName.toUpperCase() == element_name.toUpperCase()){
|
189 |
+
tinyMCEPopup.execCommand('mceBeginUndoLevel');
|
190 |
+
tinyMCE.execCommand('mceRemoveNode', false, elm);
|
191 |
+
SXE.inst.nodeChanged();
|
192 |
+
tinyMCEPopup.execCommand('mceEndUndoLevel');
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
SXE.showRemoveButton = function() {
|
197 |
+
document.getElementById("remove").style.display = 'block';
|
198 |
+
}
|
199 |
+
|
200 |
+
SXE.containsClass = function(elm,cl) {
|
201 |
+
return (elm.className.indexOf(cl) > -1) ? true : false;
|
202 |
+
}
|
203 |
+
|
204 |
+
SXE.removeClass = function(elm,cl) {
|
205 |
+
if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) {
|
206 |
+
return true;
|
207 |
+
}
|
208 |
+
var classNames = elm.className.split(" ");
|
209 |
+
var newClassNames = "";
|
210 |
+
for (var x = 0, cnl = classNames.length; x < cnl; x++) {
|
211 |
+
if (classNames[x] != cl) {
|
212 |
+
newClassNames += (classNames[x] + " ");
|
213 |
+
}
|
214 |
+
}
|
215 |
+
elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end
|
216 |
+
}
|
217 |
+
|
218 |
+
SXE.addClass = function(elm,cl) {
|
219 |
+
if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl;
|
220 |
+
return true;
|
221 |
+
}
|
222 |
+
|
223 |
+
function insertInlineElement(en) {
|
224 |
+
var ed = tinyMCEPopup.editor, dom = ed.dom;
|
225 |
+
|
226 |
+
ed.getDoc().execCommand('FontName', false, 'mceinline');
|
227 |
+
tinymce.each(dom.select(tinymce.isWebKit ? 'span' : 'font'), function(n) {
|
228 |
+
if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline')
|
229 |
+
dom.replace(dom.create(en, {_mce_new : 1}), n, 1);
|
230 |
+
});
|
231 |
+
}
|
mce/xhtmlxtras/js/ins.js
CHANGED
@@ -1,49 +1,59 @@
|
|
1 |
-
/**
|
2 |
-
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
-
*
|
4 |
-
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
-
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6 |
-
*/
|
7 |
-
|
8 |
-
function init() {
|
9 |
-
SXE.initElementDialog('ins');
|
10 |
-
if (SXE.currentAction == "update") {
|
11 |
-
setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
|
12 |
-
setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
|
13 |
-
SXE.showRemoveButton();
|
14 |
-
}
|
15 |
-
}
|
16 |
-
|
17 |
-
function setElementAttribs(elm) {
|
18 |
-
setAllCommonAttribs(elm);
|
19 |
-
setAttrib(elm, 'datetime');
|
20 |
-
setAttrib(elm, 'cite');
|
21 |
-
}
|
22 |
-
|
23 |
-
function insertIns() {
|
24 |
-
var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS');
|
25 |
-
tinyMCEPopup.execCommand('mceBeginUndoLevel');
|
26 |
-
if (elm == null) {
|
27 |
-
var s = SXE.inst.selection.getContent();
|
28 |
-
if(s.length > 0) {
|
29 |
-
|
30 |
-
var elementArray = tinymce.grep(SXE.inst.dom.select('ins'), function(n) {return n.id == '#sxe_temp_ins#';});
|
31 |
-
for (var i=0; i<elementArray.length; i++) {
|
32 |
-
var elm = elementArray[i];
|
33 |
-
setElementAttribs(elm);
|
34 |
-
}
|
35 |
-
}
|
36 |
-
} else {
|
37 |
-
setElementAttribs(elm);
|
38 |
-
}
|
39 |
-
tinyMCEPopup.editor.nodeChanged();
|
40 |
-
tinyMCEPopup.execCommand('mceEndUndoLevel');
|
41 |
-
tinyMCEPopup.close();
|
42 |
-
}
|
43 |
-
|
44 |
-
function removeIns() {
|
45 |
-
SXE.removeElement('ins');
|
46 |
-
tinyMCEPopup.close();
|
47 |
-
}
|
48 |
-
|
49 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/**
|
2 |
+
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
|
3 |
+
*
|
4 |
+
* @author Moxiecode - based on work by Andrew Tetlaw
|
5 |
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6 |
+
*/
|
7 |
+
|
8 |
+
function init() {
|
9 |
+
SXE.initElementDialog('ins');
|
10 |
+
if (SXE.currentAction == "update") {
|
11 |
+
setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
|
12 |
+
setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
|
13 |
+
SXE.showRemoveButton();
|
14 |
+
}
|
15 |
+
}
|
16 |
+
|
17 |
+
function setElementAttribs(elm) {
|
18 |
+
setAllCommonAttribs(elm);
|
19 |
+
setAttrib(elm, 'datetime');
|
20 |
+
setAttrib(elm, 'cite');
|
21 |
+
}
|
22 |
+
|
23 |
+
function insertIns() {
|
24 |
+
var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS');
|
25 |
+
tinyMCEPopup.execCommand('mceBeginUndoLevel');
|
26 |
+
if (elm == null) {
|
27 |
+
var s = SXE.inst.selection.getContent();
|
28 |
+
if(s.length > 0) {
|
29 |
+
insertInlineElement('INS');
|
30 |
+
var elementArray = tinymce.grep(SXE.inst.dom.select('ins'), function(n) {return n.id == '#sxe_temp_ins#';});
|
31 |
+
for (var i=0; i<elementArray.length; i++) {
|
32 |
+
var elm = elementArray[i];
|
33 |
+
setElementAttribs(elm);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
} else {
|
37 |
+
setElementAttribs(elm);
|
38 |
+
}
|
39 |
+
tinyMCEPopup.editor.nodeChanged();
|
40 |
+
tinyMCEPopup.execCommand('mceEndUndoLevel');
|
41 |
+
tinyMCEPopup.close();
|
42 |
+
}
|
43 |
+
|
44 |
+
function removeIns() {
|
45 |
+
SXE.removeElement('ins');
|
46 |
+
tinyMCEPopup.close();
|
47 |
+
}
|
48 |
+
|
49 |
+
function insertInlineElement(en) {
|
50 |
+
var ed = tinyMCEPopup.editor, dom = ed.dom;
|
51 |
+
|
52 |
+
ed.getDoc().execCommand('FontName', false, 'mceinline');
|
53 |
+
tinymce.each(dom.select(tinymce.isWebKit ? 'span' : 'font'), function(n) {
|
54 |
+
if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline')
|
55 |
+
dom.replace(dom.create(en), n, 1);
|
56 |
+
});
|
57 |
+
}
|
58 |
+
|
59 |
+
tinyMCEPopup.onInit.add(init);
|
mce/xhtmlxtras/langs/en_dlg.js
CHANGED
@@ -1,32 +1,32 @@
|
|
1 |
-
tinyMCE.addI18n('en.xhtmlxtras_dlg',{
|
2 |
-
attribute_label_title:"Title",
|
3 |
-
attribute_label_id:"ID",
|
4 |
-
attribute_label_class:"Class",
|
5 |
-
attribute_label_style:"Style",
|
6 |
-
attribute_label_cite:"Cite",
|
7 |
-
attribute_label_datetime:"Date/Time",
|
8 |
-
attribute_label_langdir:"Text Direction",
|
9 |
-
attribute_option_ltr:"Left to right",
|
10 |
-
attribute_option_rtl:"Right to left",
|
11 |
-
attribute_label_langcode:"Language",
|
12 |
-
attribute_label_tabindex:"TabIndex",
|
13 |
-
attribute_label_accesskey:"AccessKey",
|
14 |
-
attribute_events_tab:"Events",
|
15 |
-
attribute_attrib_tab:"Attributes",
|
16 |
-
general_tab:"General",
|
17 |
-
attrib_tab:"Attributes",
|
18 |
-
events_tab:"Events",
|
19 |
-
fieldset_general_tab:"General Settings",
|
20 |
-
fieldset_attrib_tab:"Element Attributes",
|
21 |
-
fieldset_events_tab:"Element Events",
|
22 |
-
title_ins_element:"Insertion Element",
|
23 |
-
title_del_element:"Deletion Element",
|
24 |
-
title_acronym_element:"Acronym Element",
|
25 |
-
title_abbr_element:"Abbreviation Element",
|
26 |
-
title_cite_element:"Citation Element",
|
27 |
-
remove:"Remove",
|
28 |
-
insert_date:"Insert current date/time",
|
29 |
-
option_ltr:"Left to right",
|
30 |
-
option_rtl:"Right to left",
|
31 |
-
attribs_title:"Insert/Edit Attributes"
|
32 |
Â
});
|
1 |
+
tinyMCE.addI18n('en.xhtmlxtras_dlg',{
|
2 |
+
attribute_label_title:"Title",
|
3 |
+
attribute_label_id:"ID",
|
4 |
+
attribute_label_class:"Class",
|
5 |
+
attribute_label_style:"Style",
|
6 |
+
attribute_label_cite:"Cite",
|
7 |
+
attribute_label_datetime:"Date/Time",
|
8 |
+
attribute_label_langdir:"Text Direction",
|
9 |
+
attribute_option_ltr:"Left to right",
|
10 |
+
attribute_option_rtl:"Right to left",
|
11 |
+
attribute_label_langcode:"Language",
|
12 |
+
attribute_label_tabindex:"TabIndex",
|
13 |
+
attribute_label_accesskey:"AccessKey",
|
14 |
+
attribute_events_tab:"Events",
|
15 |
+
attribute_attrib_tab:"Attributes",
|
16 |
+
general_tab:"General",
|
17 |
+
attrib_tab:"Attributes",
|
18 |
+
events_tab:"Events",
|
19 |
+
fieldset_general_tab:"General Settings",
|
20 |
+
fieldset_attrib_tab:"Element Attributes",
|
21 |
+
fieldset_events_tab:"Element Events",
|
22 |
+
title_ins_element:"Insertion Element",
|
23 |
+
title_del_element:"Deletion Element",
|
24 |
+
title_acronym_element:"Acronym Element",
|
25 |
+
title_abbr_element:"Abbreviation Element",
|
26 |
+
title_cite_element:"Citation Element",
|
27 |
+
remove:"Remove",
|
28 |
+
insert_date:"Insert current date/time",
|
29 |
+
option_ltr:"Left to right",
|
30 |
+
option_rtl:"Right to left",
|
31 |
+
attribs_title:"Insert/Edit Attributes"
|
32 |
Â
});
|
mce/xhtmlxtras/langs/langs.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
-
$strings
|
6 |
-
else
|
7 |
-
|
Â
|
|
Â
|
2 |
Â
$lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
|
3 |
Â
|
4 |
Â
if ( is_file($lang_file) && is_readable($lang_file) )
|
5 |
+
$strings = tdav_get_file($lang_file);
|
6 |
+
else {
|
7 |
+
$strings = tdav_get_file(dirname(__FILE__) . '/en_dlg.js');
|
8 |
+
$strings = preg_replace( '/([\'"])en\./', '$1'.$mce_locale.'.', $strings, 1 );
|
9 |
+
}
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Â
Contributors: Andrew Ozz
|
3 |
Â
Donate link:
|
4 |
Â
Tags: wysiwyg, formatting, tinymce, write, edit, post
|
5 |
-
Requires at least: 2.
|
6 |
-
Tested up to: 2.
|
7 |
-
Stable tag: 3.
|
8 |
Â
|
9 |
Â
Enables most of the advanced features of TinyMCE, the WordPress WYSIWYG editor.
|
10 |
Â
|
@@ -14,15 +14,17 @@ This plugin adds 15 plugins to [TinyMCE](http://tinymce.moxiecode.com/): Advance
|
|
14 |
Â
|
15 |
Â
Version 2.0 includes an admin page for arranging the TinyMCE toolbar buttons, easy installation, a lot of bugfixes, customized "Smilies" plugin that uses the built-in WordPress smilies, etc. The admin page uses Scriptaculous and Prototype.js (similar to the "Widgets" admin page) that lets you "drag and drop" the TinyMCE buttons to arrange your own toolbars and enables/disables the corresponding plugins depending on the used buttons.
|
16 |
Â
|
17 |
-
|
18 |
Â
|
19 |
-
|
20 |
Â
|
21 |
-
|
22 |
Â
|
23 |
-
|
24 |
Â
|
25 |
-
|
Â
|
|
Â
|
|
26 |
Â
|
27 |
Â
**Language Support:** The plugin interface in only in English, but the TinyMCE plugins include several translations: German, French, Italian, Spanish, Portuguese, Russian, Chinese and Japanese. More translations are available at the [TinyMCE web site](http://tinymce.moxiecode.com/download_i18n.php).
|
28 |
Â
|
2 |
Â
Contributors: Andrew Ozz
|
3 |
Â
Donate link:
|
4 |
Â
Tags: wysiwyg, formatting, tinymce, write, edit, post
|
5 |
+
Requires at least: 2.7
|
6 |
+
Tested up to: 2.7
|
7 |
+
Stable tag: 3.2
|
8 |
Â
|
9 |
Â
Enables most of the advanced features of TinyMCE, the WordPress WYSIWYG editor.
|
10 |
Â
|
14 |
Â
|
15 |
Â
Version 2.0 includes an admin page for arranging the TinyMCE toolbar buttons, easy installation, a lot of bugfixes, customized "Smilies" plugin that uses the built-in WordPress smilies, etc. The admin page uses Scriptaculous and Prototype.js (similar to the "Widgets" admin page) that lets you "drag and drop" the TinyMCE buttons to arrange your own toolbars and enables/disables the corresponding plugins depending on the used buttons.
|
16 |
Â
|
17 |
+
Version 2.1: Improved language selection, improved compatibility with WordPress 2.3 and TinyMCE 2.1.1.1, option to override some of the imported css classes and other small improvements and bugfixes.
|
18 |
Â
|
19 |
+
Version 2.2: Deactivate/Uninstall option page, font size drop-down menu and other small changes.
|
20 |
Â
|
21 |
+
Version 3.0: Support for WordPress 2.5 and TinyMCE 3.0.
|
22 |
Â
|
23 |
+
Version 3.0.1: Compatibility with WordPress 2.5.1 and TinyMCE 3.0.7, added option to disable the removal of P and BR tags when saving and in the HTML editor (autop), added two more buttons to the HTML editor: autop and undo, fixed the removal of non-default TinyMCE buttons.
|
24 |
Â
|
25 |
+
Version 3.1: Compatibility with WordPress 2.6 and TinyMCE 3.1, keeps empty paragrarhs when disabling the removal of P and BR tags, the buttons for MCImageManager and MCFileManager can be arranged (if installed).
|
26 |
+
|
27 |
+
Version 3.2: Compatibility with WordPress 2.7 and TinyMCE 3.2, minor bug fixes.
|
28 |
Â
|
29 |
Â
**Language Support:** The plugin interface in only in English, but the TinyMCE plugins include several translations: German, French, Italian, Spanish, Portuguese, Russian, Chinese and Japanese. More translations are available at the [TinyMCE web site](http://tinymce.moxiecode.com/download_i18n.php).
|
30 |
Â
|
tadv_admin.php
CHANGED
@@ -14,20 +14,17 @@ if ( isset( $_POST['tadv_uninstall'] ) ) {
|
|
14 |
Â
delete_option('tadv_btns3');
|
15 |
Â
delete_option('tadv_btns4');
|
16 |
Â
delete_option('tadv_allbtns');
|
17 |
-
|
18 |
-
|
19 |
-
|
Â
|
|
Â
|
|
Â
|
|
20 |
Â
}
|
21 |
Â
|
22 |
-
if ( ! isset($GLOBALS['wp_version']) || version_compare($GLOBALS['wp_version'], '2.
|
23 |
-
<div class="error" style="
|
24 |
-
<
|
25 |
-
<?php
|
26 |
-
wp_nonce_field( 'tadv-uninstall' );
|
27 |
-
echo '<p>'.__('This plugin requires WordPress version 2.6 or newer. Please upgrade your WordPress installation or download an', 'tadv').' <a href="http://wordpress.org/extend/plugins/tinymce-advanced/download/">'.__('older version of the plugin.', 'tadv').'</a></p>';
|
28 |
-
?>
|
29 |
-
<p><input class="button tadv_btn" type="submit" name="tadv_uninstall" value="<?php _e('Uninstall', 'tadv'); ?>" /></p>
|
30 |
-
</form>
|
31 |
Â
</div>
|
32 |
Â
<?php
|
33 |
Â
return;
|
@@ -48,7 +45,7 @@ if ( ! is_array($tadv_toolbars) ) {
|
|
48 |
Â
$tadv_toolbars['toolbar_4'] = isset($tadv_toolbars['toolbar_4']) ? (array) $tadv_toolbars['toolbar_4'] : array();
|
49 |
Â
}
|
50 |
Â
|
51 |
-
if ( isset( $_POST['tadv'] ) ) {
|
52 |
Â
check_admin_referer( 'tadv-save-buttons-order' );
|
53 |
Â
|
54 |
Â
$tb1 = $tb2 = $tb3 = $tb4 = $btns = array();
|
@@ -149,7 +146,7 @@ if ( get_option('tadv_allbtns') != $tadv_allbtns ) update_option( 'tadv_allbtns'
|
|
149 |
Â
for ( $i = 1; $i < 21; $i++ )
|
150 |
Â
$buttons["s$i"] = "separator$i";
|
151 |
Â
|
152 |
-
if ( isset($_POST['tadv
|
153 |
Â
<div class="updated" id="message"><p><?php _e('Options saved', 'tadv'); ?></p></div>
|
154 |
Â
<?php } ?>
|
155 |
Â
|
@@ -165,7 +162,7 @@ if ( isset($_POST['tadv']) && isset($_POST['save']) ) { ?>
|
|
165 |
Â
<input id="toolbar_2order" name="toolbar_2order" value="" type="hidden" />
|
166 |
Â
<input id="toolbar_3order" name="toolbar_3order" value="" type="hidden" />
|
167 |
Â
<input id="toolbar_4order" name="toolbar_4order" value="" type="hidden" />
|
168 |
-
<input name="tadv" value="1" type="hidden" />
|
169 |
Â
|
170 |
Â
<div class="tadvdropzone">
|
171 |
Â
<ul style="position: relative;" id="toolbar_1" class="container">
|
@@ -318,7 +315,7 @@ if ( is_array($buttons) ) {
|
|
318 |
Â
<p style="font-size:11px;"><?php _e('Custom CSS styles can be added in /wp-content/plugins/tinymce-advanced/css/tadv-mce.css. They will be imported and used in TinyMCE. The file has to be downloaded with FTP, edited and uploaded, overwriting the original. Only CSS classes can be added, also <strong>div.my-class</strong> would not work, but <strong>.my-class</strong> will.', 'tadv'); ?></p>
|
319 |
Â
<p><label for="fix_autop" class="tadv-box"><?php _e('Stop removing the <p> and <br /> tags when saving and show them in the HTML editor', 'tadv'); ?>
|
320 |
Â
<input type="checkbox" class="tadv-chk" name="fix_autop" id="fix_autop" <?php if ( $tadv_options['fix_autop'] == '1' ) echo ' checked="checked"'; ?> /></label></p>
|
321 |
-
<p style="font-size:11px;"><?php _e('This will make it possible to use more advanced HTML without the back-end filtering affecting it much. It also
|
322 |
Â
</td></tr>
|
323 |
Â
<?php
|
324 |
Â
$mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) );
|
@@ -335,8 +332,8 @@ if ( is_array($buttons) ) {
|
|
335 |
Â
|
336 |
Â
<p class="submit">
|
337 |
Â
<?php wp_nonce_field( 'tadv-save-buttons-order' ); ?>
|
338 |
-
<input type="button"
|
339 |
-
<input type="button"
|
340 |
Â
</p>
|
341 |
Â
</form>
|
342 |
Â
|
@@ -357,4 +354,3 @@ if ( is_array($buttons) ) {
|
|
357 |
Â
<?php
|
358 |
Â
if ( $update_tadv_options )
|
359 |
Â
update_option( 'tadv_options', $tadv_options );
|
360 |
-
?>
|
14 |
Â
delete_option('tadv_btns3');
|
15 |
Â
delete_option('tadv_btns4');
|
16 |
Â
delete_option('tadv_allbtns');
|
17 |
+
?>
|
18 |
+
<div class="updated" style="margin-top:30px;">
|
19 |
+
<p><?php _e('All options have been removed from the database. Please', 'tadv'); ?> <a href="plugins.php"><?php _e('disable TinyMCE Advanced.', 'tadv'); ?></a></p>
|
20 |
+
</div>
|
21 |
+
<?php
|
22 |
+
return;
|
23 |
Â
}
|
24 |
Â
|
25 |
+
if ( ! isset($GLOBALS['wp_version']) || version_compare($GLOBALS['wp_version'], '2.7', '<') ) { // if less than 2.7 ?>
|
26 |
+
<div class="error" style="margin-top:30px;">
|
27 |
+
<p><?php _e('This plugin requires WordPress version 2.7 or newer. Please upgrade your WordPress installation or download an', 'tadv'); ?> <a href="http://wordpress.org/extend/plugins/tinymce-advanced/download/"><?php _e('older version of the plugin.', 'tadv'); ?></a></p>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
28 |
Â
</div>
|
29 |
Â
<?php
|
30 |
Â
return;
|
45 |
Â
$tadv_toolbars['toolbar_4'] = isset($tadv_toolbars['toolbar_4']) ? (array) $tadv_toolbars['toolbar_4'] : array();
|
46 |
Â
}
|
47 |
Â
|
48 |
+
if ( isset( $_POST['tadv-save'] ) ) {
|
49 |
Â
check_admin_referer( 'tadv-save-buttons-order' );
|
50 |
Â
|
51 |
Â
$tb1 = $tb2 = $tb3 = $tb4 = $btns = array();
|
146 |
Â
for ( $i = 1; $i < 21; $i++ )
|
147 |
Â
$buttons["s$i"] = "separator$i";
|
148 |
Â
|
149 |
+
if ( isset($_POST['tadv-save']) ) { ?>
|
150 |
Â
<div class="updated" id="message"><p><?php _e('Options saved', 'tadv'); ?></p></div>
|
151 |
Â
<?php } ?>
|
152 |
Â
|
162 |
Â
<input id="toolbar_2order" name="toolbar_2order" value="" type="hidden" />
|
163 |
Â
<input id="toolbar_3order" name="toolbar_3order" value="" type="hidden" />
|
164 |
Â
<input id="toolbar_4order" name="toolbar_4order" value="" type="hidden" />
|
165 |
+
<input name="tadv-save" value="1" type="hidden" />
|
166 |
Â
|
167 |
Â
<div class="tadvdropzone">
|
168 |
Â
<ul style="position: relative;" id="toolbar_1" class="container">
|
315 |
Â
<p style="font-size:11px;"><?php _e('Custom CSS styles can be added in /wp-content/plugins/tinymce-advanced/css/tadv-mce.css. They will be imported and used in TinyMCE. The file has to be downloaded with FTP, edited and uploaded, overwriting the original. Only CSS classes can be added, also <strong>div.my-class</strong> would not work, but <strong>.my-class</strong> will.', 'tadv'); ?></p>
|
316 |
Â
<p><label for="fix_autop" class="tadv-box"><?php _e('Stop removing the <p> and <br /> tags when saving and show them in the HTML editor', 'tadv'); ?>
|
317 |
Â
<input type="checkbox" class="tadv-chk" name="fix_autop" id="fix_autop" <?php if ( $tadv_options['fix_autop'] == '1' ) echo ' checked="checked"'; ?> /></label></p>
|
318 |
+
<p style="font-size:11px;"><?php _e('This will make it possible to use more advanced HTML without the back-end filtering affecting it much. It also preserves empty new lines in the editor by padding them with <br /> tags.', 'tadv'); ?></p>
|
319 |
Â
</td></tr>
|
320 |
Â
<?php
|
321 |
Â
$mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) );
|
332 |
Â
|
333 |
Â
<p class="submit">
|
334 |
Â
<?php wp_nonce_field( 'tadv-save-buttons-order' ); ?>
|
335 |
+
<input type="button" value="<?php _e('Save Changes', 'tadv'); ?>" onclick="tadvSortable.serialize();" />
|
336 |
+
<input type="button" class="tadv_btn" value="<?php _e('Uninstall', 'tadv'); ?>" onclick="document.getElementById('tadv_uninst_div').style.display = 'block';" />
|
337 |
Â
</p>
|
338 |
Â
</form>
|
339 |
Â
|
354 |
Â
<?php
|
355 |
Â
if ( $update_tadv_options )
|
356 |
Â
update_option( 'tadv_options', $tadv_options );
|
Â
|
tiny_mce_popup.js
CHANGED
@@ -1,275 +1,294 @@
|
|
1 |
-
// Some global instances
|
2 |
-
var tinymce = null, tinyMCEPopup, tinyMCE;
|
3 |
-
|
4 |
-
tinyMCEPopup = {
|
5 |
-
init : function() {
|
6 |
-
var t = this, w, ti, li, q, i, it;
|
7 |
-
|
8 |
-
li = ('' + document.location.search).replace(/^\?/, '').split('&');
|
9 |
-
q = {};
|
10 |
-
for (i=0; i<li.length; i++) {
|
11 |
-
it = li[i].split('=');
|
12 |
-
q[unescape(it[0])] = unescape(it[1]);
|
13 |
-
}
|
14 |
-
|
15 |
-
if (q.mce_rdomain)
|
16 |
-
document.domain = q.mce_rdomain;
|
17 |
-
|
18 |
-
// Find window & API
|
19 |
-
w = t.getWin();
|
20 |
-
tinymce = w.tinymce;
|
21 |
-
tinyMCE = w.tinyMCE;
|
22 |
-
t.editor = tinymce.EditorManager.activeEditor;
|
23 |
-
t.params = t.editor.windowManager.params;
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
t.dom
|
28 |
-
|
29 |
-
//
|
30 |
-
t.
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
},
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
return
|
54 |
-
},
|
55 |
-
|
56 |
-
|
57 |
-
return this.editor.
|
58 |
-
},
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
},
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
document.
|
176 |
-
|
177 |
-
//
|
178 |
-
if (
|
179 |
-
document.
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
//
|
197 |
-
tinymce.
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
// Some global instances
|
2 |
+
var tinymce = null, tinyMCEPopup, tinyMCE;
|
3 |
+
|
4 |
+
tinyMCEPopup = {
|
5 |
+
init : function() {
|
6 |
+
var t = this, w, ti, li, q, i, it;
|
7 |
+
|
8 |
+
li = ('' + document.location.search).replace(/^\?/, '').split('&');
|
9 |
+
q = {};
|
10 |
+
for (i=0; i<li.length; i++) {
|
11 |
+
it = li[i].split('=');
|
12 |
+
q[unescape(it[0])] = unescape(it[1]);
|
13 |
+
}
|
14 |
+
|
15 |
+
if (q.mce_rdomain)
|
16 |
+
document.domain = q.mce_rdomain;
|
17 |
+
|
18 |
+
// Find window & API
|
19 |
+
w = t.getWin();
|
20 |
+
tinymce = w.tinymce;
|
21 |
+
tinyMCE = w.tinyMCE;
|
22 |
+
t.editor = tinymce.EditorManager.activeEditor;
|
23 |
+
t.params = t.editor.windowManager.params;
|
24 |
+
t.features = t.editor.windowManager.features;
|
25 |
+
|
26 |
+
// Setup local DOM
|
27 |
+
t.dom = t.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document);
|
28 |
+
|
29 |
+
// Enables you to skip loading the default css
|
30 |
+
if (t.features.popup_css !== false)
|
31 |
+
t.dom.loadCSS(t.features.popup_css || t.editor.settings.popup_css);
|
32 |
+
|
33 |
+
// Setup on init listeners
|
34 |
+
t.listeners = [];
|
35 |
+
t.onInit = {
|
36 |
+
add : function(f, s) {
|
37 |
+
t.listeners.push({func : f, scope : s});
|
38 |
+
}
|
39 |
+
};
|
40 |
+
|
41 |
+
t.isWindow = !t.getWindowArg('mce_inline');
|
42 |
+
t.id = t.getWindowArg('mce_window_id');
|
43 |
+
t.editor.windowManager.onOpen.dispatch(t.editor.windowManager, window);
|
44 |
+
},
|
45 |
+
|
46 |
+
getWin : function() {
|
47 |
+
return window.dialogArguments || opener || parent || top;
|
48 |
+
},
|
49 |
+
|
50 |
+
getWindowArg : function(n, dv) {
|
51 |
+
var v = this.params[n];
|
52 |
+
|
53 |
+
return tinymce.is(v) ? v : dv;
|
54 |
+
},
|
55 |
+
|
56 |
+
getParam : function(n, dv) {
|
57 |
+
return this.editor.getParam(n, dv);
|
58 |
+
},
|
59 |
+
|
60 |
+
getLang : function(n, dv) {
|
61 |
+
return this.editor.getLang(n, dv);
|
62 |
+
},
|
63 |
+
|
64 |
+
execCommand : function(cmd, ui, val, a) {
|
65 |
+
a = a || {};
|
66 |
+
a.skip_focus = 1;
|
67 |
+
|
68 |
+
this.restoreSelection();
|
69 |
+
return this.editor.execCommand(cmd, ui, val, a);
|
70 |
+
},
|
71 |
+
|
72 |
+
resizeToInnerSize : function() {
|
73 |
+
var t = this, n, b = document.body, vp = t.dom.getViewPort(window), dw, dh;
|
74 |
+
|
75 |
+
dw = t.getWindowArg('mce_width') - vp.w;
|
76 |
+
dh = t.getWindowArg('mce_height') - vp.h;
|
77 |
+
|
78 |
+
if (t.isWindow)
|
79 |
+
window.resizeBy(dw, dh);
|
80 |
+
else
|
81 |
+
t.editor.windowManager.resizeBy(dw, dh, t.id);
|
82 |
+
},
|
83 |
+
|
84 |
+
executeOnLoad : function(s) {
|
85 |
+
this.onInit.add(function() {
|
86 |
+
eval(s);
|
87 |
+
});
|
88 |
+
},
|
89 |
+
|
90 |
+
storeSelection : function() {
|
91 |
+
this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark('simple');
|
92 |
+
},
|
93 |
+
|
94 |
+
restoreSelection : function() {
|
95 |
+
var t = tinyMCEPopup;
|
96 |
+
|
97 |
+
if (!t.isWindow && tinymce.isIE)
|
98 |
+
t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark);
|
99 |
+
},
|
100 |
+
|
101 |
+
requireLangPack : function() {
|
102 |
+
var u = this.getWindowArg('plugin_url') || this.getWindowArg('theme_url');
|
103 |
+
|
104 |
+
if (u && this.editor.settings.language) {
|
105 |
+
u += '/langs/' + this.editor.settings.language + '_dlg.js';
|
106 |
+
|
107 |
+
if (!tinymce.ScriptLoader.isDone(u)) {
|
108 |
+
document.write('<script type="text/javascript" src="' + tinymce._addVer(u) + '"></script>');
|
109 |
+
tinymce.ScriptLoader.markDone(u);
|
110 |
+
}
|
111 |
+
}
|
112 |
+
},
|
113 |
+
|
114 |
+
pickColor : function(e, element_id) {
|
115 |
+
this.execCommand('mceColorPicker', true, {
|
116 |
+
color : document.getElementById(element_id).value,
|
117 |
+
func : function(c) {
|
118 |
+
document.getElementById(element_id).value = c;
|
119 |
+
|
120 |
+
try {
|
121 |
+
document.getElementById(element_id).onchange();
|
122 |
+
} catch (ex) {
|
123 |
+
// Try fire event, ignore errors
|
124 |
+
}
|
125 |
+
}
|
126 |
+
});
|
127 |
+
},
|
128 |
+
|
129 |
+
openBrowser : function(element_id, type, option) {
|
130 |
+
tinyMCEPopup.restoreSelection();
|
131 |
+
this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window);
|
132 |
+
},
|
133 |
+
|
134 |
+
confirm : function(t, cb, s) {
|
135 |
+
this.editor.windowManager.confirm(t, cb, s, window);
|
136 |
+
},
|
137 |
+
|
138 |
+
alert : function(tx, cb, s) {
|
139 |
+
this.editor.windowManager.alert(tx, cb, s, window);
|
140 |
+
},
|
141 |
+
|
142 |
+
close : function() {
|
143 |
+
var t = this;
|
144 |
+
|
145 |
+
// To avoid domain relaxing issue in Opera
|
146 |
+
function close() {
|
147 |
+
t.editor.windowManager.close(window);
|
148 |
+
tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup
|
149 |
+
};
|
150 |
+
|
151 |
+
if (tinymce.isOpera)
|
152 |
+
t.getWin().setTimeout(close, 0);
|
153 |
+
else
|
154 |
+
close();
|
155 |
+
},
|
156 |
+
|
157 |
+
// Internal functions
|
158 |
+
|
159 |
+
_restoreSelection : function() {
|
160 |
+
var e = window.event.srcElement;
|
161 |
+
|
162 |
+
if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button'))
|
163 |
+
tinyMCEPopup.restoreSelection();
|
164 |
+
},
|
165 |
+
|
166 |
+
/* _restoreSelection : function() {
|
167 |
+
var e = window.event.srcElement;
|
168 |
+
|
169 |
+
// If user focus a non text input or textarea
|
170 |
+
if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text')
|
171 |
+
tinyMCEPopup.restoreSelection();
|
172 |
+
},*/
|
173 |
+
|
174 |
+
_onDOMLoaded : function() {
|
175 |
+
var t = this, ti = document.title, bm, h, nv;
|
176 |
+
|
177 |
+
// Translate page
|
178 |
+
if (t.features.translate_i18n !== false) {
|
179 |
+
h = document.body.innerHTML;
|
180 |
+
|
181 |
+
// Replace a=x with a="x" in IE
|
182 |
+
if (tinymce.isIE)
|
183 |
+
h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"')
|
184 |
+
|
185 |
+
document.dir = t.editor.getParam('directionality','');
|
186 |
+
|
187 |
+
if ((nv = t.editor.translate(h)) && nv != h)
|
188 |
+
document.body.innerHTML = nv;
|
189 |
+
|
190 |
+
if ((nv = t.editor.translate(ti)) && nv != ti)
|
191 |
+
document.title = ti = nv;
|
192 |
+
}
|
193 |
+
|
194 |
+
document.body.style.display = '';
|
195 |
+
|
196 |
+
// Restore selection in IE when focus is placed on a non textarea or input element of the type text
|
197 |
+
if (tinymce.isIE)
|
198 |
+
document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection);
|
199 |
+
|
200 |
+
t.restoreSelection();
|
201 |
+
t.resizeToInnerSize();
|
202 |
+
|
203 |
+
// Set inline title
|
204 |
+
if (!t.isWindow)
|
205 |
+
t.editor.windowManager.setTitle(window, ti);
|
206 |
+
else
|
207 |
+
window.focus();
|
208 |
+
|
209 |
+
if (!tinymce.isIE && !t.isWindow) {
|
210 |
+
tinymce.dom.Event._add(document, 'focus', function() {
|
211 |
+
t.editor.windowManager.focus(t.id)
|
212 |
+
});
|
213 |
+
}
|
214 |
+
|
215 |
+
// Patch for accessibility
|
216 |
+
tinymce.each(t.dom.select('select'), function(e) {
|
217 |
+
e.onkeydown = tinyMCEPopup._accessHandler;
|
218 |
+
});
|
219 |
+
|
220 |
+
// Call onInit
|
221 |
+
// Init must be called before focus so the selection won't get lost by the focus call
|
222 |
+
tinymce.each(t.listeners, function(o) {
|
223 |
+
o.func.call(o.scope, t.editor);
|
224 |
+
});
|
225 |
+
|
226 |
+
// Move focus to window
|
227 |
+
if (t.getWindowArg('mce_auto_focus', true)) {
|
228 |
+
window.focus();
|
229 |
+
|
230 |
+
// Focus element with mceFocus class
|
231 |
+
tinymce.each(document.forms, function(f) {
|
232 |
+
tinymce.each(f.elements, function(e) {
|
233 |
+
if (t.dom.hasClass(e, 'mceFocus') && !e.disabled) {
|
234 |
+
e.focus();
|
235 |
+
return false; // Break loop
|
236 |
+
}
|
237 |
+
});
|
238 |
+
});
|
239 |
+
}
|
240 |
+
|
241 |
+
document.onkeyup = tinyMCEPopup._closeWinKeyHandler;
|
242 |
+
},
|
243 |
+
|
244 |
+
_accessHandler : function(e) {
|
245 |
+
e = e || window.event;
|
246 |
+
|
247 |
+
if (e.keyCode == 13 || e.keyCode == 32) {
|
248 |
+
e = e.target || e.srcElement;
|
249 |
+
|
250 |
+
if (e.onchange)
|
251 |
+
e.onchange();
|
252 |
+
|
253 |
+
return tinymce.dom.Event.cancel(e);
|
254 |
+
}
|
255 |
+
},
|
256 |
+
|
257 |
+
_closeWinKeyHandler : function(e) {
|
258 |
+
e = e || window.event;
|
259 |
+
|
260 |
+
if (e.keyCode == 27)
|
261 |
+
tinyMCEPopup.close();
|
262 |
+
},
|
263 |
+
|
264 |
+
_wait : function() {
|
265 |
+
var t = this, ti;
|
266 |
+
|
267 |
+
if (tinymce.isIE && document.location.protocol != 'https:') {
|
268 |
+
// Fake DOMContentLoaded on IE
|
269 |
+
document.write('<script id=__ie_onload defer src=\'javascript:""\';><\/script>');
|
270 |
+
document.getElementById("__ie_onload").onreadystatechange = function() {
|
271 |
+
if (this.readyState == "complete") {
|
272 |
+
t._onDOMLoaded();
|
273 |
+
document.getElementById("__ie_onload").onreadystatechange = null; // Prevent leak
|
274 |
+
}
|
275 |
+
};
|
276 |
+
} else {
|
277 |
+
if (tinymce.isIE || tinymce.isWebKit) {
|
278 |
+
ti = setInterval(function() {
|
279 |
+
if (/loaded|complete/.test(document.readyState)) {
|
280 |
+
clearInterval(ti);
|
281 |
+
t._onDOMLoaded();
|
282 |
+
}
|
283 |
+
}, 10);
|
284 |
+
} else {
|
285 |
+
window.addEventListener('DOMContentLoaded', function() {
|
286 |
+
t._onDOMLoaded();
|
287 |
+
}, false);
|
288 |
+
}
|
289 |
+
}
|
290 |
+
}
|
291 |
+
};
|
292 |
+
|
293 |
+
tinyMCEPopup.init();
|
294 |
+
tinyMCEPopup._wait(); // Wait for DOM Content Loaded
|
tinymce-advanced.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Â
Plugin Name: TinyMCE Advanced
|
4 |
Â
Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
|
5 |
Â
Description: Enables advanced features and plugins in TinyMCE.
|
6 |
-
Version: 3.
|
7 |
Â
Author: Andrew Ozz
|
8 |
Â
Author URI: http://www.laptoptips.ca/
|
9 |
Â
|
@@ -65,9 +65,45 @@ if ( ! function_exists('tdav_css') ) {
|
|
65 |
Â
}
|
66 |
Â
add_filter( 'mce_css', 'tdav_css' );
|
67 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
68 |
Â
$tadv_allbtns = array();
|
69 |
Â
$tadv_hidden_row = 0;
|
70 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
71 |
Â
if ( ! function_exists('tadv_mce_btns') ) {
|
72 |
Â
function tadv_mce_btns($orig) {
|
73 |
Â
global $tadv_allbtns, $tadv_hidden_row;
|
@@ -174,7 +210,7 @@ if ( ! function_exists('tmce_init') ) {
|
|
174 |
Â
|
175 |
Â
$queue = $wp_scripts->queue;
|
176 |
Â
if ( is_array($queue) && in_array( 'autosave', $queue ) )
|
177 |
-
wp_enqueue_script( 'tadv_replace', WP_PLUGIN_URL . '/tinymce-advanced/js/tadv_replace.js', array('
|
178 |
Â
}
|
179 |
Â
}
|
180 |
Â
add_action( 'admin_print_scripts', 'tmce_init' );
|
@@ -196,7 +232,7 @@ add_action( 'mce_external_plugins', 'tadv_load_plugins', 999 );
|
|
196 |
Â
if ( ! function_exists('tadv_load_langs') ) {
|
197 |
Â
function tadv_load_langs($langs) {
|
198 |
Â
$tadv_plugins = (array) get_option('tadv_plugins');
|
199 |
-
$langpath =
|
200 |
Â
$nolangs = array( 'bbcode', 'contextmenu', 'insertdatetime', 'layer', 'nonbreaking', 'print', 'visualchars', 'emotions', 'tadvreplace' );
|
201 |
Â
|
202 |
Â
$langs = (array) $langs;
|
@@ -217,8 +253,8 @@ if ( ! function_exists('tadv_page') ) {
|
|
217 |
Â
|
218 |
Â
if ( ! function_exists('tadv_menu') ) {
|
219 |
Â
function tadv_menu() {
|
220 |
-
if ( function_exists('
|
221 |
-
$page =
|
222 |
Â
add_action( "admin_print_scripts-$page", 'tadv_add_scripts' );
|
223 |
Â
add_action( "admin_head-$page", 'tadv_admin_head' );
|
224 |
Â
}
|
3 |
Â
Plugin Name: TinyMCE Advanced
|
4 |
Â
Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
|
5 |
Â
Description: Enables advanced features and plugins in TinyMCE.
|
6 |
+
Version: 3.2
|
7 |
Â
Author: Andrew Ozz
|
8 |
Â
Author URI: http://www.laptoptips.ca/
|
9 |
Â
|
65 |
Â
}
|
66 |
Â
add_filter( 'mce_css', 'tdav_css' );
|
67 |
Â
|
68 |
+
if ( ! function_exists('tdav_get_file') ) {
|
69 |
+
function tdav_get_file($path) {
|
70 |
+
|
71 |
+
if ( function_exists('realpath') )
|
72 |
+
$path = realpath($path);
|
73 |
+
|
74 |
+
if ( ! $path || ! @is_file($path) )
|
75 |
+
return '';
|
76 |
+
|
77 |
+
if ( function_exists('file_get_contents') )
|
78 |
+
return @file_get_contents($path);
|
79 |
+
|
80 |
+
$content = '';
|
81 |
+
$fp = @fopen($path, 'r');
|
82 |
+
if ( ! $fp )
|
83 |
+
return '';
|
84 |
+
|
85 |
+
while ( ! feof($fp) )
|
86 |
+
$content .= fgets($fp);
|
87 |
+
|
88 |
+
fclose($fp);
|
89 |
+
return $content;
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
Â
$tadv_allbtns = array();
|
94 |
Â
$tadv_hidden_row = 0;
|
95 |
Â
|
96 |
+
if ( is_admin() && ! defined('DOING_AJAX') ) {
|
97 |
+
get_option('tadv_options');
|
98 |
+
get_option('tadv_toolbars');
|
99 |
+
get_option('tadv_plugins');
|
100 |
+
get_option('tadv_btns1');
|
101 |
+
get_option('tadv_btns2');
|
102 |
+
get_option('tadv_btns3');
|
103 |
+
get_option('tadv_btns4');
|
104 |
+
get_option('tadv_allbtns');
|
105 |
+
}
|
106 |
+
|
107 |
Â
if ( ! function_exists('tadv_mce_btns') ) {
|
108 |
Â
function tadv_mce_btns($orig) {
|
109 |
Â
global $tadv_allbtns, $tadv_hidden_row;
|
210 |
Â
|
211 |
Â
$queue = $wp_scripts->queue;
|
212 |
Â
if ( is_array($queue) && in_array( 'autosave', $queue ) )
|
213 |
+
wp_enqueue_script( 'tadv_replace', WP_PLUGIN_URL . '/tinymce-advanced/js/tadv_replace.js', array('editor'), '20080425' );
|
214 |
Â
}
|
215 |
Â
}
|
216 |
Â
add_action( 'admin_print_scripts', 'tmce_init' );
|
232 |
Â
if ( ! function_exists('tadv_load_langs') ) {
|
233 |
Â
function tadv_load_langs($langs) {
|
234 |
Â
$tadv_plugins = (array) get_option('tadv_plugins');
|
235 |
+
$langpath = WP_PLUGIN_DIR . '/tinymce-advanced/mce/';
|
236 |
Â
$nolangs = array( 'bbcode', 'contextmenu', 'insertdatetime', 'layer', 'nonbreaking', 'print', 'visualchars', 'emotions', 'tadvreplace' );
|
237 |
Â
|
238 |
Â
$langs = (array) $langs;
|
253 |
Â
|
254 |
Â
if ( ! function_exists('tadv_menu') ) {
|
255 |
Â
function tadv_menu() {
|
256 |
+
if ( function_exists('add_options_page') ) {
|
257 |
+
$page = add_options_page( 'TinyMCE Advanced', 'TinyMCE Advanced', 9, 'tinymce-advanced', 'tadv_page' );
|
258 |
Â
add_action( "admin_print_scripts-$page", 'tadv_add_scripts' );
|
259 |
Â
add_action( "admin_head-$page", 'tadv_admin_head' );
|
260 |
Â
}
|
utils/editable_selects.js
CHANGED
@@ -1,69 +1,69 @@
|
|
1 |
-
/**
|
2 |
-
* $Id: editable_selects.js 867 2008-06-09 20:33:40Z spocke $
|
3 |
-
*
|
4 |
-
* Makes select boxes editable.
|
5 |
-
*
|
6 |
-
* @author Moxiecode
|
7 |
-
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8 |
-
*/
|
9 |
-
|
10 |
-
var TinyMCE_EditableSelects = {
|
11 |
-
editSelectElm : null,
|
12 |
-
|
13 |
-
init : function() {
|
14 |
-
var nl = document.getElementsByTagName("select"), i, d = document, o;
|
15 |
-
|
16 |
-
for (i=0; i<nl.length; i++) {
|
17 |
-
if (nl[i].className.indexOf('mceEditableSelect') != -1) {
|
18 |
-
o = new Option('(value)', '__mce_add_custom__');
|
19 |
-
|
20 |
-
o.className = 'mceAddSelectValue';
|
21 |
-
|
22 |
-
nl[i].options[nl[i].options.length] = o;
|
23 |
-
nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
|
24 |
-
}
|
25 |
-
}
|
26 |
-
},
|
27 |
-
|
28 |
-
onChangeEditableSelect : function(e) {
|
29 |
-
var d = document, ne, se = window.event ? window.event.srcElement : e.target;
|
30 |
-
|
31 |
-
if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
|
32 |
-
ne = d.createElement("input");
|
33 |
-
ne.id = se.id + "_custom";
|
34 |
-
ne.name = se.name + "_custom";
|
35 |
-
ne.type = "text";
|
36 |
-
|
37 |
-
ne.style.width = se.offsetWidth + 'px';
|
38 |
-
se.parentNode.insertBefore(ne, se);
|
39 |
-
se.style.display = 'none';
|
40 |
-
ne.focus();
|
41 |
-
ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
|
42 |
-
ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
|
43 |
-
TinyMCE_EditableSelects.editSelectElm = se;
|
44 |
-
}
|
45 |
-
},
|
46 |
-
|
47 |
-
onBlurEditableSelectInput : function() {
|
48 |
-
var se = TinyMCE_EditableSelects.editSelectElm;
|
49 |
-
|
50 |
-
if (se) {
|
51 |
-
if (se.previousSibling.value != '') {
|
52 |
-
addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
|
53 |
-
selectByValue(document.forms[0], se.id, se.previousSibling.value);
|
54 |
-
} else
|
55 |
-
selectByValue(document.forms[0], se.id, '');
|
56 |
-
|
57 |
-
se.style.display = 'inline';
|
58 |
-
se.parentNode.removeChild(se.previousSibling);
|
59 |
-
TinyMCE_EditableSelects.editSelectElm = null;
|
60 |
-
}
|
61 |
-
},
|
62 |
-
|
63 |
-
onKeyDown : function(e) {
|
64 |
-
e = e || window.event;
|
65 |
-
|
66 |
-
if (e.keyCode == 13)
|
67 |
-
TinyMCE_EditableSelects.onBlurEditableSelectInput();
|
68 |
-
}
|
69 |
-
};
|
1 |
+
/**
|
2 |
+
* $Id: editable_selects.js 867 2008-06-09 20:33:40Z spocke $
|
3 |
+
*
|
4 |
+
* Makes select boxes editable.
|
5 |
+
*
|
6 |
+
* @author Moxiecode
|
7 |
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8 |
+
*/
|
9 |
+
|
10 |
+
var TinyMCE_EditableSelects = {
|
11 |
+
editSelectElm : null,
|
12 |
+
|
13 |
+
init : function() {
|
14 |
+
var nl = document.getElementsByTagName("select"), i, d = document, o;
|
15 |
+
|
16 |
+
for (i=0; i<nl.length; i++) {
|
17 |
+
if (nl[i].className.indexOf('mceEditableSelect') != -1) {
|
18 |
+
o = new Option('(value)', '__mce_add_custom__');
|
19 |
+
|
20 |
+
o.className = 'mceAddSelectValue';
|
21 |
+
|
22 |
+
nl[i].options[nl[i].options.length] = o;
|
23 |
+
nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
|
24 |
+
}
|
25 |
+
}
|
26 |
+
},
|
27 |
+
|
28 |
+
onChangeEditableSelect : function(e) {
|
29 |
+
var d = document, ne, se = window.event ? window.event.srcElement : e.target;
|
30 |
+
|
31 |
+
if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
|
32 |
+
ne = d.createElement("input");
|
33 |
+
ne.id = se.id + "_custom";
|
34 |
+
ne.name = se.name + "_custom";
|
35 |
+
ne.type = "text";
|
36 |
+
|
37 |
+
ne.style.width = se.offsetWidth + 'px';
|
38 |
+
se.parentNode.insertBefore(ne, se);
|
39 |
+
se.style.display = 'none';
|
40 |
+
ne.focus();
|
41 |
+
ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
|
42 |
+
ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
|
43 |
+
TinyMCE_EditableSelects.editSelectElm = se;
|
44 |
+
}
|
45 |
+
},
|
46 |
+
|
47 |
+
onBlurEditableSelectInput : function() {
|
48 |
+
var se = TinyMCE_EditableSelects.editSelectElm;
|
49 |
+
|
50 |
+
if (se) {
|
51 |
+
if (se.previousSibling.value != '') {
|
52 |
+
addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
|
53 |
+
selectByValue(document.forms[0], se.id, se.previousSibling.value);
|
54 |
+
} else
|
55 |
+
selectByValue(document.forms[0], se.id, '');
|
56 |
+
|
57 |
+
se.style.display = 'inline';
|
58 |
+
se.parentNode.removeChild(se.previousSibling);
|
59 |
+
TinyMCE_EditableSelects.editSelectElm = null;
|
60 |
+
}
|
61 |
+
},
|
62 |
+
|
63 |
+
onKeyDown : function(e) {
|
64 |
+
e = e || window.event;
|
65 |
+
|
66 |
+
if (e.keyCode == 13)
|
67 |
+
TinyMCE_EditableSelects.onBlurEditableSelectInput();
|
68 |
+
}
|
69 |
+
};
|
utils/form_utils.js
CHANGED
@@ -1,199 +1,199 @@
|
|
1 |
-
/**
|
2 |
-
* $Id: form_utils.js 673 2008-03-06 13:26:20Z spocke $
|
3 |
-
*
|
4 |
-
* Various form utilitiy functions.
|
5 |
-
*
|
6 |
-
* @author Moxiecode
|
7 |
-
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8 |
-
*/
|
9 |
-
|
10 |
-
var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
|
11 |
-
|
12 |
-
function getColorPickerHTML(id, target_form_element) {
|
13 |
-
var h = "";
|
14 |
-
|
15 |
-
h += '<a id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
|
16 |
-
h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"></span></a>';
|
17 |
-
|
18 |
-
return h;
|
19 |
-
}
|
20 |
-
|
21 |
-
function updateColor(img_id, form_element_id) {
|
22 |
-
document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
|
23 |
-
}
|
24 |
-
|
25 |
-
function setBrowserDisabled(id, state) {
|
26 |
-
var img = document.getElementById(id);
|
27 |
-
var lnk = document.getElementById(id + "_link");
|
28 |
-
|
29 |
-
if (lnk) {
|
30 |
-
if (state) {
|
31 |
-
lnk.setAttribute("realhref", lnk.getAttribute("href"));
|
32 |
-
lnk.removeAttribute("href");
|
33 |
-
tinyMCEPopup.dom.addClass(img, 'disabled');
|
34 |
-
} else {
|
35 |
-
if (lnk.getAttribute("realhref"))
|
36 |
-
lnk.setAttribute("href", lnk.getAttribute("realhref"));
|
37 |
-
|
38 |
-
tinyMCEPopup.dom.removeClass(img, 'disabled');
|
39 |
-
}
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
function getBrowserHTML(id, target_form_element, type, prefix) {
|
44 |
-
var option = prefix + "_" + type + "_browser_callback", cb, html;
|
45 |
-
|
46 |
-
cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
|
47 |
-
|
48 |
-
if (!cb)
|
49 |
-
return "";
|
50 |
-
|
51 |
-
html = "";
|
52 |
-
html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
|
53 |
-
html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"></span></a>';
|
54 |
-
|
55 |
-
return html;
|
56 |
-
}
|
57 |
-
|
58 |
-
function openBrowser(img_id, target_form_element, type, option) {
|
59 |
-
var img = document.getElementById(img_id);
|
60 |
-
|
61 |
-
if (img.className != "mceButtonDisabled")
|
62 |
-
tinyMCEPopup.openBrowser(target_form_element, type, option);
|
63 |
-
}
|
64 |
-
|
65 |
-
function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
|
66 |
-
if (!form_obj || !form_obj.elements[field_name])
|
67 |
-
return;
|
68 |
-
|
69 |
-
var sel = form_obj.elements[field_name];
|
70 |
-
|
71 |
-
var found = false;
|
72 |
-
for (var i=0; i<sel.options.length; i++) {
|
73 |
-
var option = sel.options[i];
|
74 |
-
|
75 |
-
if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
|
76 |
-
option.selected = true;
|
77 |
-
found = true;
|
78 |
-
} else
|
79 |
-
option.selected = false;
|
80 |
-
}
|
81 |
-
|
82 |
-
if (!found && add_custom && value != '') {
|
83 |
-
var option = new Option(value, value);
|
84 |
-
option.selected = true;
|
85 |
-
sel.options[sel.options.length] = option;
|
86 |
-
sel.selectedIndex = sel.options.length - 1;
|
87 |
-
}
|
88 |
-
|
89 |
-
return found;
|
90 |
-
}
|
91 |
-
|
92 |
-
function getSelectValue(form_obj, field_name) {
|
93 |
-
var elm = form_obj.elements[field_name];
|
94 |
-
|
95 |
-
if (elm == null || elm.options == null)
|
96 |
-
return "";
|
97 |
-
|
98 |
-
return elm.options[elm.selectedIndex].value;
|
99 |
-
}
|
100 |
-
|
101 |
-
function addSelectValue(form_obj, field_name, name, value) {
|
102 |
-
var s = form_obj.elements[field_name];
|
103 |
-
var o = new Option(name, value);
|
104 |
-
s.options[s.options.length] = o;
|
105 |
-
}
|
106 |
-
|
107 |
-
function addClassesToList(list_id, specific_option) {
|
108 |
-
// Setup class droplist
|
109 |
-
var styleSelectElm = document.getElementById(list_id);
|
110 |
-
var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
|
111 |
-
styles = tinyMCEPopup.getParam(specific_option, styles);
|
112 |
-
|
113 |
-
if (styles) {
|
114 |
-
var stylesAr = styles.split(';');
|
115 |
-
|
116 |
-
for (var i=0; i<stylesAr.length; i++) {
|
117 |
-
if (stylesAr != "") {
|
118 |
-
var key, value;
|
119 |
-
|
120 |
-
key = stylesAr[i].split('=')[0];
|
121 |
-
value = stylesAr[i].split('=')[1];
|
122 |
-
|
123 |
-
styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
|
124 |
-
}
|
125 |
-
}
|
126 |
-
} else {
|
127 |
-
tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
|
128 |
-
styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
|
129 |
-
});
|
130 |
-
}
|
131 |
-
}
|
132 |
-
|
133 |
-
function isVisible(element_id) {
|
134 |
-
var elm = document.getElementById(element_id);
|
135 |
-
|
136 |
-
return elm && elm.style.display != "none";
|
137 |
-
}
|
138 |
-
|
139 |
-
function convertRGBToHex(col) {
|
140 |
-
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
|
141 |
-
|
142 |
-
var rgb = col.replace(re, "$1,$2,$3").split(',');
|
143 |
-
if (rgb.length == 3) {
|
144 |
-
r = parseInt(rgb[0]).toString(16);
|
145 |
-
g = parseInt(rgb[1]).toString(16);
|
146 |
-
b = parseInt(rgb[2]).toString(16);
|
147 |
-
|
148 |
-
r = r.length == 1 ? '0' + r : r;
|
149 |
-
g = g.length == 1 ? '0' + g : g;
|
150 |
-
b = b.length == 1 ? '0' + b : b;
|
151 |
-
|
152 |
-
return "#" + r + g + b;
|
153 |
-
}
|
154 |
-
|
155 |
-
return col;
|
156 |
-
}
|
157 |
-
|
158 |
-
function convertHexToRGB(col) {
|
159 |
-
if (col.indexOf('#') != -1) {
|
160 |
-
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
|
161 |
-
|
162 |
-
r = parseInt(col.substring(0, 2), 16);
|
163 |
-
g = parseInt(col.substring(2, 4), 16);
|
164 |
-
b = parseInt(col.substring(4, 6), 16);
|
165 |
-
|
166 |
-
return "rgb(" + r + "," + g + "," + b + ")";
|
167 |
-
}
|
168 |
-
|
169 |
-
return col;
|
170 |
-
}
|
171 |
-
|
172 |
-
function trimSize(size) {
|
173 |
-
return size.replace(/([0-9\.]+)px|(%|in|cm|mm|em|ex|pt|pc)/, '$1$2');
|
174 |
-
}
|
175 |
-
|
176 |
-
function getCSSSize(size) {
|
177 |
-
size = trimSize(size);
|
178 |
-
|
179 |
-
if (size == "")
|
180 |
-
return "";
|
181 |
-
|
182 |
-
// Add px
|
183 |
-
if (/^[0-9]+$/.test(size))
|
184 |
-
size += 'px';
|
185 |
-
|
186 |
-
return size;
|
187 |
-
}
|
188 |
-
|
189 |
-
function getStyle(elm, attrib, style) {
|
190 |
-
var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
|
191 |
-
|
192 |
-
if (val != '')
|
193 |
-
return '' + val;
|
194 |
-
|
195 |
-
if (typeof(style) == 'undefined')
|
196 |
-
style = attrib;
|
197 |
-
|
198 |
-
return tinyMCEPopup.dom.getStyle(elm, style);
|
199 |
-
}
|
1 |
+
/**
|
2 |
+
* $Id: form_utils.js 673 2008-03-06 13:26:20Z spocke $
|
3 |
+
*
|
4 |
+
* Various form utilitiy functions.
|
5 |
+
*
|
6 |
+
* @author Moxiecode
|
7 |
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8 |
+
*/
|
9 |
+
|
10 |
+
var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
|
11 |
+
|
12 |
+
function getColorPickerHTML(id, target_form_element) {
|
13 |
+
var h = "";
|
14 |
+
|
15 |
+
h += '<a id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
|
16 |
+
h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"></span></a>';
|
17 |
+
|
18 |
+
return h;
|
19 |
+
}
|
20 |
+
|
21 |
+
function updateColor(img_id, form_element_id) {
|
22 |
+
document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
|
23 |
+
}
|
24 |
+
|
25 |
+
function setBrowserDisabled(id, state) {
|
26 |
+
var img = document.getElementById(id);
|
27 |
+
var lnk = document.getElementById(id + "_link");
|
28 |
+
|
29 |
+
if (lnk) {
|
30 |
+
if (state) {
|
31 |
+
lnk.setAttribute("realhref", lnk.getAttribute("href"));
|
32 |
+
lnk.removeAttribute("href");
|
33 |
+
tinyMCEPopup.dom.addClass(img, 'disabled');
|
34 |
+
} else {
|
35 |
+
if (lnk.getAttribute("realhref"))
|
36 |
+
lnk.setAttribute("href", lnk.getAttribute("realhref"));
|
37 |
+
|
38 |
+
tinyMCEPopup.dom.removeClass(img, 'disabled');
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
function getBrowserHTML(id, target_form_element, type, prefix) {
|
44 |
+
var option = prefix + "_" + type + "_browser_callback", cb, html;
|
45 |
+
|
46 |
+
cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
|
47 |
+
|
48 |
+
if (!cb)
|
49 |
+
return "";
|
50 |
+
|
51 |
+
html = "";
|
52 |
+
html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
|
53 |
+
html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"></span></a>';
|
54 |
+
|
55 |
+
return html;
|
56 |
+
}
|
57 |
+
|
58 |
+
function openBrowser(img_id, target_form_element, type, option) {
|
59 |
+
var img = document.getElementById(img_id);
|
60 |
+
|
61 |
+
if (img.className != "mceButtonDisabled")
|
62 |
+
tinyMCEPopup.openBrowser(target_form_element, type, option);
|
63 |
+
}
|
64 |
+
|
65 |
+
function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
|
66 |
+
if (!form_obj || !form_obj.elements[field_name])
|
67 |
+
return;
|
68 |
+
|
69 |
+
var sel = form_obj.elements[field_name];
|
70 |
+
|
71 |
+
var found = false;
|
72 |
+
for (var i=0; i<sel.options.length; i++) {
|
73 |
+
var option = sel.options[i];
|
74 |
+
|
75 |
+
if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
|
76 |
+
option.selected = true;
|
77 |
+
found = true;
|
78 |
+
} else
|
79 |
+
option.selected = false;
|
80 |
+
}
|
81 |
+
|
82 |
+
if (!found && add_custom && value != '') {
|
83 |
+
var option = new Option(value, value);
|
84 |
+
option.selected = true;
|
85 |
+
sel.options[sel.options.length] = option;
|
86 |
+
sel.selectedIndex = sel.options.length - 1;
|
87 |
+
}
|
88 |
+
|
89 |
+
return found;
|
90 |
+
}
|
91 |
+
|
92 |
+
function getSelectValue(form_obj, field_name) {
|
93 |
+
var elm = form_obj.elements[field_name];
|
94 |
+
|
95 |
+
if (elm == null || elm.options == null)
|
96 |
+
return "";
|
97 |
+
|
98 |
+
return elm.options[elm.selectedIndex].value;
|
99 |
+
}
|
100 |
+
|
101 |
+
function addSelectValue(form_obj, field_name, name, value) {
|
102 |
+
var s = form_obj.elements[field_name];
|
103 |
+
var o = new Option(name, value);
|
104 |
+
s.options[s.options.length] = o;
|
105 |
+
}
|
106 |
+
|
107 |
+
function addClassesToList(list_id, specific_option) {
|
108 |
+
// Setup class droplist
|
109 |
+
var styleSelectElm = document.getElementById(list_id);
|
110 |
+
var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
|
111 |
+
styles = tinyMCEPopup.getParam(specific_option, styles);
|
112 |
+
|
113 |
+
if (styles) {
|
114 |
+
var stylesAr = styles.split(';');
|
115 |
+
|
116 |
+
for (var i=0; i<stylesAr.length; i++) {
|
117 |
+
if (stylesAr != "") {
|
118 |
+
var key, value;
|
119 |
+
|
120 |
+
key = stylesAr[i].split('=')[0];
|
121 |
+
value = stylesAr[i].split('=')[1];
|
122 |
+
|
123 |
+
styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
|
124 |
+
}
|
125 |
+
}
|
126 |
+
} else {
|
127 |
+
tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
|
128 |
+
styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
|
129 |
+
});
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
function isVisible(element_id) {
|
134 |
+
var elm = document.getElementById(element_id);
|
135 |
+
|
136 |
+
return elm && elm.style.display != "none";
|
137 |
+
}
|
138 |
+
|
139 |
+
function convertRGBToHex(col) {
|
140 |
+
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
|
141 |
+
|
142 |
+
var rgb = col.replace(re, "$1,$2,$3").split(',');
|
143 |
+
if (rgb.length == 3) {
|
144 |
+
r = parseInt(rgb[0]).toString(16);
|
145 |
+
g = parseInt(rgb[1]).toString(16);
|
146 |
+
b = parseInt(rgb[2]).toString(16);
|
147 |
+
|
148 |
+
r = r.length == 1 ? '0' + r : r;
|
149 |
+
g = g.length == 1 ? '0' + g : g;
|
150 |
+
b = b.length == 1 ? '0' + b : b;
|
151 |
+
|
152 |
+
return "#" + r + g + b;
|
153 |
+
}
|
154 |
+
|
155 |
+
return col;
|
156 |
+
}
|
157 |
+
|
158 |
+
function convertHexToRGB(col) {
|
159 |
+
if (col.indexOf('#') != -1) {
|
160 |
+
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
|
161 |
+
|
162 |
+
r = parseInt(col.substring(0, 2), 16);
|
163 |
+
g = parseInt(col.substring(2, 4), 16);
|
164 |
+
b = parseInt(col.substring(4, 6), 16);
|
165 |
+
|
166 |
+
return "rgb(" + r + "," + g + "," + b + ")";
|
167 |
+
}
|
168 |
+
|
169 |
+
return col;
|
170 |
+
}
|
171 |
+
|
172 |
+
function trimSize(size) {
|
173 |
+
return size.replace(/([0-9\.]+)px|(%|in|cm|mm|em|ex|pt|pc)/, '$1$2');
|
174 |
+
}
|
175 |
+
|
176 |
+
function getCSSSize(size) {
|
177 |
+
size = trimSize(size);
|
178 |
+
|
179 |
+
if (size == "")
|
180 |
+
return "";
|
181 |
+
|
182 |
+
// Add px
|
183 |
+
if (/^[0-9]+$/.test(size))
|
184 |
+
size += 'px';
|
185 |
+
|
186 |
+
return size;
|
187 |
+
}
|
188 |
+
|
189 |
+
function getStyle(elm, attrib, style) {
|
190 |
+
var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
|
191 |
+
|
192 |
+
if (val != '')
|
193 |
+
return '' + val;
|
194 |
+
|
195 |
+
if (typeof(style) == 'undefined')
|
196 |
+
style = attrib;
|
197 |
+
|
198 |
+
return tinyMCEPopup.dom.getStyle(elm, style);
|
199 |
+
}
|
utils/mclayer.js
DELETED
@@ -1,210 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* $Id: mclayer.js 520 2008-01-07 16:30:32Z spocke $
|
3 |
-
*
|
4 |
-
* Moxiecode floating layer script.
|
5 |
-
*
|
6 |
-
* @author Moxiecode
|
7 |
-
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8 |
-
*/
|
9 |
-
|
10 |
-
function MCLayer(id) {
|
11 |
-
this.id = id;
|
12 |
-
this.settings = new Array();
|
13 |
-
this.blockerElement = null;
|
14 |
-
this.isMSIE = navigator.appName == "Microsoft Internet Explorer";
|
15 |
-
this.events = false;
|
16 |
-
this.autoHideCallback = null;
|
17 |
-
}
|
18 |
-
|
19 |
-
MCLayer.prototype = {
|
20 |
-
moveRelativeTo : function(re, p, a) {
|
21 |
-
var rep = this.getAbsPosition(re);
|
22 |
-
var w = parseInt(re.offsetWidth);
|
23 |
-
var h = parseInt(re.offsetHeight);
|
24 |
-
var x, y;
|
25 |
-
|
26 |
-
switch (p) {
|
27 |
-
case "tl":
|
28 |
-
break;
|
29 |
-
|
30 |
-
case "tr":
|
31 |
-
x = rep.absLeft + w;
|
32 |
-
y = rep.absTop;
|
33 |
-
break;
|
34 |
-
|
35 |
-
case "bl":
|
36 |
-
break;
|
37 |
-
|
38 |
-
case "br":
|
39 |
-
break;
|
40 |
-
}
|
41 |
-
|
42 |
-
this.moveTo(x, y);
|
43 |
-
},
|
44 |
-
|
45 |
-
moveBy : function(dx, dy) {
|
46 |
-
var e = this.getElement();
|
47 |
-
var x = parseInt(e.style.left);
|
48 |
-
var y = parseInt(e.style.top);
|
49 |
-
|
50 |
-
e.style.left = (x + dx) + "px";
|
51 |
-
e.style.top = (y + dy) + "px";
|
52 |
-
|
53 |
-
this.updateBlocker();
|
54 |
-
},
|
55 |
-
|
56 |
-
moveTo : function(x, y) {
|
57 |
-
var e = this.getElement();
|
58 |
-
|
59 |
-
e.style.left = x + "px";
|
60 |
-
e.style.top = y + "px";
|
61 |
-
|
62 |
-
this.updateBlocker();
|
63 |
-
},
|
64 |
-
|
65 |
-
show : function() {
|
66 |
-
MCLayer.visibleLayer = this;
|
67 |
-
|
68 |
-
this.getElement().style.display = 'block';
|
69 |
-
this.updateBlocker();
|
70 |
-
},
|
71 |
-
|
72 |
-
hide : function() {
|
73 |
-
this.getElement().style.display = 'none';
|
74 |
-
this.updateBlocker();
|
75 |
-
},
|
76 |
-
|
77 |
-
setAutoHide : function(s, cb) {
|
78 |
-
this.autoHideCallback = cb;
|
79 |
-
this.registerEventHandlers();
|
80 |
-
},
|
81 |
-
|
82 |
-
getElement : function() {
|
83 |
-
return document.getElementById(this.id);
|
84 |
-
},
|
85 |
-
|
86 |
-
updateBlocker : function() {
|
87 |
-
if (!this.isMSIE)
|
88 |
-
return;
|
89 |
-
|
90 |
-
var e = this.getElement();
|
91 |
-
var b = this.getBlocker();
|
92 |
-
var x = this.parseInt(e.style.left);
|
93 |
-
var y = this.parseInt(e.style.top);
|
94 |
-
var w = this.parseInt(e.offsetWidth);
|
95 |
-
var h = this.parseInt(e.offsetHeight);
|
96 |
-
|
97 |
-
b.style.left = x + 'px';
|
98 |
-
b.style.top = y + 'px';
|
99 |
-
b.style.width = w + 'px';
|
100 |
-
b.style.height = h + 'px';
|
101 |
-
b.style.display = e.style.display;
|
102 |
-
},
|
103 |
-
|
104 |
-
getBlocker : function() {
|
105 |
-
if (!this.blockerElement) {
|
106 |
-
var d = document, b = d.createElement("iframe");
|
107 |
-
|
108 |
-
b.style.cssText = 'display: none; left: 0px; position: absolute; top: 0';
|
109 |
-
b.src = 'javascript:false;';
|
110 |
-
b.frameBorder = '0';
|
111 |
-
b.scrolling = 'no';
|
112 |
-
|
113 |
-
d.body.appendChild(b);
|
114 |
-
this.blockerElement = b;
|
115 |
-
}
|
116 |
-
|
117 |
-
return this.blockerElement;
|
118 |
-
},
|
119 |
-
|
120 |
-
getAbsPosition : function(n) {
|
121 |
-
var p = {absLeft : 0, absTop : 0};
|
122 |
-
|
123 |
-
while (n) {
|
124 |
-
p.absLeft += n.offsetLeft;
|
125 |
-
p.absTop += n.offsetTop;
|
126 |
-
n = n.offsetParent;
|
127 |
-
}
|
128 |
-
|
129 |
-
return p;
|
130 |
-
},
|
131 |
-
|
132 |
-
registerEventHandlers : function() {
|
133 |
-
if (!this.events) {
|
134 |
-
var d = document;
|
135 |
-
|
136 |
-
this.addEvent(d, 'mousedown', MCLayer.prototype.onMouseDown);
|
137 |
-
|
138 |
-
this.events = true;
|
139 |
-
}
|
140 |
-
},
|
141 |
-
|
142 |
-
addEvent : function(o, n, h) {
|
143 |
-
if (o.attachEvent)
|
144 |
-
o.attachEvent("on" + n, h);
|
145 |
-
else
|
146 |
-
o.addEventListener(n, h, false);
|
147 |
-
},
|
148 |
-
|
149 |
-
onMouseDown : function(e) {
|
150 |
-
e = typeof(e) == "undefined" ? window.event : e;
|
151 |
-
var b = document.body;
|
152 |
-
var l = MCLayer.visibleLayer;
|
153 |
-
|
154 |
-
if (l) {
|
155 |
-
var mx = l.isMSIE ? e.clientX + b.scrollLeft : e.pageX;
|
156 |
-
var my = l.isMSIE ? e.clientY + b.scrollTop : e.pageY;
|
157 |
-
var el = l.getElement();
|
158 |
-
var x = parseInt(el.style.left);
|
159 |
-
var y = parseInt(el.style.top);
|
160 |
-
var w = parseInt(el.offsetWidth);
|
161 |
-
var h = parseInt(el.offsetHeight);
|
162 |
-
|
163 |
-
if (!(mx > x && mx < x + w && my > y && my < y + h)) {
|
164 |
-
MCLayer.visibleLayer = null;
|
165 |
-
|
166 |
-
if (l.autoHideCallback && l.autoHideCallback(l, e, mx, my))
|
167 |
-
return true;
|
168 |
-
|
169 |
-
l.hide();
|
170 |
-
}
|
171 |
-
}
|
172 |
-
},
|
173 |
-
|
174 |
-
addCSSClass : function(e, c) {
|
175 |
-
this.removeCSSClass(e, c);
|
176 |
-
var a = this.explode(' ', e.className);
|
177 |
-
a[a.length] = c;
|
178 |
-
e.className = a.join(' ');
|
179 |
-
},
|
180 |
-
|
181 |
-
removeCSSClass : function(e, c) {
|
182 |
-
var a = this.explode(' ', e.className), i;
|
183 |
-
|
184 |
-
for (i=0; i<a.length; i++) {
|
185 |
-
if (a[i] == c)
|
186 |
-
a[i] = '';
|
187 |
-
}
|
188 |
-
|
189 |
-
e.className = a.join(' ');
|
190 |
-
},
|
191 |
-
|
192 |
-
explode : function(d, s) {
|
193 |
-
var ar = s.split(d);
|
194 |
-
var oar = new Array();
|
195 |
-
|
196 |
-
for (var i = 0; i<ar.length; i++) {
|
197 |
-
if (ar[i] != "")
|
198 |
-
oar[oar.length] = ar[i];
|
199 |
-
}
|
200 |
-
|
201 |
-
return oar;
|
202 |
-
},
|
203 |
-
|
204 |
-
parseInt : function(s) {
|
205 |
-
if (s == null || s == '')
|
206 |
-
return 0;
|
207 |
-
|
208 |
-
return parseInt(s);
|
209 |
-
}
|
210 |
-
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
utils/mctabs.js
CHANGED
@@ -1,76 +1,76 @@
|
|
1 |
-
/**
|
2 |
-
* $Id: mctabs.js 758 2008-03-30 13:53:29Z spocke $
|
3 |
-
*
|
4 |
-
* Moxiecode DHTML Tabs script.
|
5 |
-
*
|
6 |
-
* @author Moxiecode
|
7 |
-
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8 |
-
*/
|
9 |
-
|
10 |
-
function MCTabs() {
|
11 |
-
this.settings = [];
|
12 |
-
};
|
13 |
-
|
14 |
-
MCTabs.prototype.init = function(settings) {
|
15 |
-
this.settings = settings;
|
16 |
-
};
|
17 |
-
|
18 |
-
MCTabs.prototype.getParam = function(name, default_value) {
|
19 |
-
var value = null;
|
20 |
-
|
21 |
-
value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
|
22 |
-
|
23 |
-
// Fix bool values
|
24 |
-
if (value == "true" || value == "false")
|
25 |
-
return (value == "true");
|
26 |
-
|
27 |
-
return value;
|
28 |
-
};
|
29 |
-
|
30 |
-
MCTabs.prototype.displayTab = function(tab_id, panel_id) {
|
31 |
-
var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i;
|
32 |
-
|
33 |
-
panelElm= document.getElementById(panel_id);
|
34 |
-
panelContainerElm = panelElm ? panelElm.parentNode : null;
|
35 |
-
tabElm = document.getElementById(tab_id);
|
36 |
-
tabContainerElm = tabElm ? tabElm.parentNode : null;
|
37 |
-
selectionClass = this.getParam('selection_class', 'current');
|
38 |
-
|
39 |
-
if (tabElm && tabContainerElm) {
|
40 |
-
nodes = tabContainerElm.childNodes;
|
41 |
-
|
42 |
-
// Hide all other tabs
|
43 |
-
for (i = 0; i < nodes.length; i++) {
|
44 |
-
if (nodes[i].nodeName == "LI")
|
45 |
-
nodes[i].className = '';
|
46 |
-
}
|
47 |
-
|
48 |
-
// Show selected tab
|
49 |
-
tabElm.className = 'current';
|
50 |
-
}
|
51 |
-
|
52 |
-
if (panelElm && panelContainerElm) {
|
53 |
-
nodes = panelContainerElm.childNodes;
|
54 |
-
|
55 |
-
// Hide all other panels
|
56 |
-
for (i = 0; i < nodes.length; i++) {
|
57 |
-
if (nodes[i].nodeName == "DIV")
|
58 |
-
nodes[i].className = 'panel';
|
59 |
-
}
|
60 |
-
|
61 |
-
// Show selected panel
|
62 |
-
panelElm.className = 'current';
|
63 |
-
}
|
64 |
-
};
|
65 |
-
|
66 |
-
MCTabs.prototype.getAnchor = function() {
|
67 |
-
var pos, url = document.location.href;
|
68 |
-
|
69 |
-
if ((pos = url.lastIndexOf('#')) != -1)
|
70 |
-
return url.substring(pos + 1);
|
71 |
-
|
72 |
-
return "";
|
73 |
-
};
|
74 |
-
|
75 |
-
// Global instance
|
76 |
-
var mcTabs = new MCTabs();
|
1 |
+
/**
|
2 |
+
* $Id: mctabs.js 758 2008-03-30 13:53:29Z spocke $
|
3 |
+
*
|
4 |
+
* Moxiecode DHTML Tabs script.
|
5 |
+
*
|
6 |
+
* @author Moxiecode
|
7 |
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8 |
+
*/
|
9 |
+
|
10 |
+
function MCTabs() {
|
11 |
+
this.settings = [];
|
12 |
+
};
|
13 |
+
|
14 |
+
MCTabs.prototype.init = function(settings) {
|
15 |
+
this.settings = settings;
|
16 |
+
};
|
17 |
+
|
18 |
+
MCTabs.prototype.getParam = function(name, default_value) {
|
19 |
+
var value = null;
|
20 |
+
|
21 |
+
value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
|
22 |
+
|
23 |
+
// Fix bool values
|
24 |
+
if (value == "true" || value == "false")
|
25 |
+
return (value == "true");
|
26 |
+
|
27 |
+
return value;
|
28 |
+
};
|
29 |
+
|
30 |
+
MCTabs.prototype.displayTab = function(tab_id, panel_id) {
|
31 |
+
var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i;
|
32 |
+
|
33 |
+
panelElm= document.getElementById(panel_id);
|
34 |
+
panelContainerElm = panelElm ? panelElm.parentNode : null;
|
35 |
+
tabElm = document.getElementById(tab_id);
|
36 |
+
tabContainerElm = tabElm ? tabElm.parentNode : null;
|
37 |
+
selectionClass = this.getParam('selection_class', 'current');
|
38 |
+
|
39 |
+
if (tabElm && tabContainerElm) {
|
40 |
+
nodes = tabContainerElm.childNodes;
|
41 |
+
|
42 |
+
// Hide all other tabs
|
43 |
+
for (i = 0; i < nodes.length; i++) {
|
44 |
+
if (nodes[i].nodeName == "LI")
|
45 |
+
nodes[i].className = '';
|
46 |
+
}
|
47 |
+
|
48 |
+
// Show selected tab
|
49 |
+
tabElm.className = 'current';
|
50 |
+
}
|
51 |
+
|
52 |
+
if (panelElm && panelContainerElm) {
|
53 |
+
nodes = panelContainerElm.childNodes;
|
54 |
+
|
55 |
+
// Hide all other panels
|
56 |
+
for (i = 0; i < nodes.length; i++) {
|
57 |
+
if (nodes[i].nodeName == "DIV")
|
58 |
+
nodes[i].className = 'panel';
|
59 |
+
}
|
60 |
+
|
61 |
+
// Show selected panel
|
62 |
+
panelElm.className = 'current';
|
63 |
+
}
|
64 |
+
};
|
65 |
+
|
66 |
+
MCTabs.prototype.getAnchor = function() {
|
67 |
+
var pos, url = document.location.href;
|
68 |
+
|
69 |
+
if ((pos = url.lastIndexOf('#')) != -1)
|
70 |
+
return url.substring(pos + 1);
|
71 |
+
|
72 |
+
return "";
|
73 |
+
};
|
74 |
+
|
75 |
+
// Global instance
|
76 |
+
var mcTabs = new MCTabs();
|
utils/validate.js
CHANGED
@@ -1,219 +1,219 @@
|
|
1 |
-
/**
|
2 |
-
* $Id: validate.js 758 2008-03-30 13:53:29Z spocke $
|
3 |
-
*
|
4 |
-
* Various form validation methods.
|
5 |
-
*
|
6 |
-
* @author Moxiecode
|
7 |
-
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
// String validation:
|
12 |
-
|
13 |
-
if (!Validator.isEmail('myemail'))
|
14 |
-
alert('Invalid email.');
|
15 |
-
|
16 |
-
// Form validation:
|
17 |
-
|
18 |
-
var f = document.forms['myform'];
|
19 |
-
|
20 |
-
if (!Validator.isEmail(f.myemail))
|
21 |
-
alert('Invalid email.');
|
22 |
-
*/
|
23 |
-
|
24 |
-
var Validator = {
|
25 |
-
isEmail : function(s) {
|
26 |
-
return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
|
27 |
-
},
|
28 |
-
|
29 |
-
isAbsUrl : function(s) {
|
30 |
-
return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
|
31 |
-
},
|
32 |
-
|
33 |
-
isSize : function(s) {
|
34 |
-
return this.test(s, '^[0-9]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
|
35 |
-
},
|
36 |
-
|
37 |
-
isId : function(s) {
|
38 |
-
return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
|
39 |
-
},
|
40 |
-
|
41 |
-
isEmpty : function(s) {
|
42 |
-
var nl, i;
|
43 |
-
|
44 |
-
if (s.nodeName == 'SELECT' && s.selectedIndex < 1)
|
45 |
-
return true;
|
46 |
-
|
47 |
-
if (s.type == 'checkbox' && !s.checked)
|
48 |
-
return true;
|
49 |
-
|
50 |
-
if (s.type == 'radio') {
|
51 |
-
for (i=0, nl = s.form.elements; i<nl.length; i++) {
|
52 |
-
if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked)
|
53 |
-
return false;
|
54 |
-
}
|
55 |
-
|
56 |
-
return true;
|
57 |
-
}
|
58 |
-
|
59 |
-
return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
|
60 |
-
},
|
61 |
-
|
62 |
-
isNumber : function(s, d) {
|
63 |
-
return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
|
64 |
-
},
|
65 |
-
|
66 |
-
test : function(s, p) {
|
67 |
-
s = s.nodeType == 1 ? s.value : s;
|
68 |
-
|
69 |
-
return s == '' || new RegExp(p).test(s);
|
70 |
-
}
|
71 |
-
};
|
72 |
-
|
73 |
-
var AutoValidator = {
|
74 |
-
settings : {
|
75 |
-
id_cls : 'id',
|
76 |
-
int_cls : 'int',
|
77 |
-
url_cls : 'url',
|
78 |
-
number_cls : 'number',
|
79 |
-
email_cls : 'email',
|
80 |
-
size_cls : 'size',
|
81 |
-
required_cls : 'required',
|
82 |
-
invalid_cls : 'invalid',
|
83 |
-
min_cls : 'min',
|
84 |
-
max_cls : 'max'
|
85 |
-
},
|
86 |
-
|
87 |
-
init : function(s) {
|
88 |
-
var n;
|
89 |
-
|
90 |
-
for (n in s)
|
91 |
-
this.settings[n] = s[n];
|
92 |
-
},
|
93 |
-
|
94 |
-
validate : function(f) {
|
95 |
-
var i, nl, s = this.settings, c = 0;
|
96 |
-
|
97 |
-
nl = this.tags(f, 'label');
|
98 |
-
for (i=0; i<nl.length; i++)
|
99 |
-
this.removeClass(nl[i], s.invalid_cls);
|
100 |
-
|
101 |
-
c += this.validateElms(f, 'input');
|
102 |
-
c += this.validateElms(f, 'select');
|
103 |
-
c += this.validateElms(f, 'textarea');
|
104 |
-
|
105 |
-
return c == 3;
|
106 |
-
},
|
107 |
-
|
108 |
-
invalidate : function(n) {
|
109 |
-
this.mark(n.form, n);
|
110 |
-
},
|
111 |
-
|
112 |
-
reset : function(e) {
|
113 |
-
var t = ['label', 'input', 'select', 'textarea'];
|
114 |
-
var i, j, nl, s = this.settings;
|
115 |
-
|
116 |
-
if (e == null)
|
117 |
-
return;
|
118 |
-
|
119 |
-
for (i=0; i<t.length; i++) {
|
120 |
-
nl = this.tags(e.form ? e.form : e, t[i]);
|
121 |
-
for (j=0; j<nl.length; j++)
|
122 |
-
this.removeClass(nl[j], s.invalid_cls);
|
123 |
-
}
|
124 |
-
},
|
125 |
-
|
126 |
-
validateElms : function(f, e) {
|
127 |
-
var nl, i, n, s = this.settings, st = true, va = Validator, v;
|
128 |
-
|
129 |
-
nl = this.tags(f, e);
|
130 |
-
for (i=0; i<nl.length; i++) {
|
131 |
-
n = nl[i];
|
132 |
-
|
133 |
-
this.removeClass(n, s.invalid_cls);
|
134 |
-
|
135 |
-
if (this.hasClass(n, s.required_cls) && va.isEmpty(n))
|
136 |
-
st = this.mark(f, n);
|
137 |
-
|
138 |
-
if (this.hasClass(n, s.number_cls) && !va.isNumber(n))
|
139 |
-
st = this.mark(f, n);
|
140 |
-
|
141 |
-
if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))
|
142 |
-
st = this.mark(f, n);
|
143 |
-
|
144 |
-
if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))
|
145 |
-
st = this.mark(f, n);
|
146 |
-
|
147 |
-
if (this.hasClass(n, s.email_cls) && !va.isEmail(n))
|
148 |
-
st = this.mark(f, n);
|
149 |
-
|
150 |
-
if (this.hasClass(n, s.size_cls) && !va.isSize(n))
|
151 |
-
st = this.mark(f, n);
|
152 |
-
|
153 |
-
if (this.hasClass(n, s.id_cls) && !va.isId(n))
|
154 |
-
st = this.mark(f, n);
|
155 |
-
|
156 |
-
if (this.hasClass(n, s.min_cls, true)) {
|
157 |
-
v = this.getNum(n, s.min_cls);
|
158 |
-
|
159 |
-
if (isNaN(v) || parseInt(n.value) < parseInt(v))
|
160 |
-
st = this.mark(f, n);
|
161 |
-
}
|
162 |
-
|
163 |
-
if (this.hasClass(n, s.max_cls, true)) {
|
164 |
-
v = this.getNum(n, s.max_cls);
|
165 |
-
|
166 |
-
if (isNaN(v) || parseInt(n.value) > parseInt(v))
|
167 |
-
st = this.mark(f, n);
|
168 |
-
}
|
169 |
-
}
|
170 |
-
|
171 |
-
return st;
|
172 |
-
},
|
173 |
-
|
174 |
-
hasClass : function(n, c, d) {
|
175 |
-
return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
|
176 |
-
},
|
177 |
-
|
178 |
-
getNum : function(n, c) {
|
179 |
-
c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
|
180 |
-
c = c.replace(/[^0-9]/g, '');
|
181 |
-
|
182 |
-
return c;
|
183 |
-
},
|
184 |
-
|
185 |
-
addClass : function(n, c, b) {
|
186 |
-
var o = this.removeClass(n, c);
|
187 |
-
n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
|
188 |
-
},
|
189 |
-
|
190 |
-
removeClass : function(n, c) {
|
191 |
-
c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
|
192 |
-
return n.className = c != ' ' ? c : '';
|
193 |
-
},
|
194 |
-
|
195 |
-
tags : function(f, s) {
|
196 |
-
return f.getElementsByTagName(s);
|
197 |
-
},
|
198 |
-
|
199 |
-
mark : function(f, n) {
|
200 |
-
var s = this.settings;
|
201 |
-
|
202 |
-
this.addClass(n, s.invalid_cls);
|
203 |
-
this.markLabels(f, n, s.invalid_cls);
|
204 |
-
|
205 |
-
return false;
|
206 |
-
},
|
207 |
-
|
208 |
-
markLabels : function(f, n, ic) {
|
209 |
-
var nl, i;
|
210 |
-
|
211 |
-
nl = this.tags(f, "label");
|
212 |
-
for (i=0; i<nl.length; i++) {
|
213 |
-
if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id)
|
214 |
-
this.addClass(nl[i], ic);
|
215 |
-
}
|
216 |
-
|
217 |
-
return null;
|
218 |
-
}
|
219 |
-
};
|
1 |
+
/**
|
2 |
+
* $Id: validate.js 758 2008-03-30 13:53:29Z spocke $
|
3 |
+
*
|
4 |
+
* Various form validation methods.
|
5 |
+
*
|
6 |
+
* @author Moxiecode
|
7 |
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
// String validation:
|
12 |
+
|
13 |
+
if (!Validator.isEmail('myemail'))
|
14 |
+
alert('Invalid email.');
|
15 |
+
|
16 |
+
// Form validation:
|
17 |
+
|
18 |
+
var f = document.forms['myform'];
|
19 |
+
|
20 |
+
if (!Validator.isEmail(f.myemail))
|
21 |
+
alert('Invalid email.');
|
22 |
+
*/
|
23 |
+
|
24 |
+
var Validator = {
|
25 |
+
isEmail : function(s) {
|
26 |
+
return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
|
27 |
+
},
|
28 |
+
|
29 |
+
isAbsUrl : function(s) {
|
30 |
+
return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
|
31 |
+
},
|
32 |
+
|
33 |
+
isSize : function(s) {
|
34 |
+
return this.test(s, '^[0-9]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
|
35 |
+
},
|
36 |
+
|
37 |
+
isId : function(s) {
|
38 |
+
return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
|
39 |
+
},
|
40 |
+
|
41 |
+
isEmpty : function(s) {
|
42 |
+
var nl, i;
|
43 |
+
|
44 |
+
if (s.nodeName == 'SELECT' && s.selectedIndex < 1)
|
45 |
+
return true;
|
46 |
+
|
47 |
+
if (s.type == 'checkbox' && !s.checked)
|
48 |
+
return true;
|
49 |
+
|
50 |
+
if (s.type == 'radio') {
|
51 |
+
for (i=0, nl = s.form.elements; i<nl.length; i++) {
|
52 |
+
if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked)
|
53 |
+
return false;
|
54 |
+
}
|
55 |
+
|
56 |
+
return true;
|
57 |
+
}
|
58 |
+
|
59 |
+
return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
|
60 |
+
},
|
61 |
+
|
62 |
+
isNumber : function(s, d) {
|
63 |
+
return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
|
64 |
+
},
|
65 |
+
|
66 |
+
test : function(s, p) {
|
67 |
+
s = s.nodeType == 1 ? s.value : s;
|
68 |
+
|
69 |
+
return s == '' || new RegExp(p).test(s);
|
70 |
+
}
|
71 |
+
};
|
72 |
+
|
73 |
+
var AutoValidator = {
|
74 |
+
settings : {
|
75 |
+
id_cls : 'id',
|
76 |
+
int_cls : 'int',
|
77 |
+
url_cls : 'url',
|
78 |
+
number_cls : 'number',
|
79 |
+
email_cls : 'email',
|
80 |
+
size_cls : 'size',
|
81 |
+
required_cls : 'required',
|
82 |
+
invalid_cls : 'invalid',
|
83 |
+
min_cls : 'min',
|
84 |
+
max_cls : 'max'
|
85 |
+
},
|
86 |
+
|
87 |
+
init : function(s) {
|
88 |
+
var n;
|
89 |
+
|
90 |
+
for (n in s)
|
91 |
+
this.settings[n] = s[n];
|
92 |
+
},
|
93 |
+
|
94 |
+
validate : function(f) {
|
95 |
+
var i, nl, s = this.settings, c = 0;
|
96 |
+
|
97 |
+
nl = this.tags(f, 'label');
|
98 |
+
for (i=0; i<nl.length; i++)
|
99 |
+
this.removeClass(nl[i], s.invalid_cls);
|
100 |
+
|
101 |
+
c += this.validateElms(f, 'input');
|
102 |
+
c += this.validateElms(f, 'select');
|
103 |
+
c += this.validateElms(f, 'textarea');
|
104 |
+
|
105 |
+
return c == 3;
|
106 |
+
},
|
107 |
+
|
108 |
+
invalidate : function(n) {
|
109 |
+
this.mark(n.form, n);
|
110 |
+
},
|
111 |
+
|
112 |
+
reset : function(e) {
|
113 |
+
var t = ['label', 'input', 'select', 'textarea'];
|
114 |
+
var i, j, nl, s = this.settings;
|
115 |
+
|
116 |
+
if (e == null)
|
117 |
+
return;
|
118 |
+
|
119 |
+
for (i=0; i<t.length; i++) {
|
120 |
+
nl = this.tags(e.form ? e.form : e, t[i]);
|
121 |
+
for (j=0; j<nl.length; j++)
|
122 |
+
this.removeClass(nl[j], s.invalid_cls);
|
123 |
+
}
|
124 |
+
},
|
125 |
+
|
126 |
+
validateElms : function(f, e) {
|
127 |
+
var nl, i, n, s = this.settings, st = true, va = Validator, v;
|
128 |
+
|
129 |
+
nl = this.tags(f, e);
|
130 |
+
for (i=0; i<nl.length; i++) {
|
131 |
+
n = nl[i];
|
132 |
+
|
133 |
+
this.removeClass(n, s.invalid_cls);
|
134 |
+
|
135 |
+
if (this.hasClass(n, s.required_cls) && va.isEmpty(n))
|
136 |
+
st = this.mark(f, n);
|
137 |
+
|
138 |
+
if (this.hasClass(n, s.number_cls) && !va.isNumber(n))
|
139 |
+
st = this.mark(f, n);
|
140 |
+
|
141 |
+
if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))
|
142 |
+
st = this.mark(f, n);
|
143 |
+
|
144 |
+
if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))
|
145 |
+
st = this.mark(f, n);
|
146 |
+
|
147 |
+
if (this.hasClass(n, s.email_cls) && !va.isEmail(n))
|
148 |
+
st = this.mark(f, n);
|
149 |
+
|
150 |
+
if (this.hasClass(n, s.size_cls) && !va.isSize(n))
|
151 |
+
st = this.mark(f, n);
|
152 |
+
|
153 |
+
if (this.hasClass(n, s.id_cls) && !va.isId(n))
|
154 |
+
st = this.mark(f, n);
|
155 |
+
|
156 |
+
if (this.hasClass(n, s.min_cls, true)) {
|
157 |
+
v = this.getNum(n, s.min_cls);
|
158 |
+
|
159 |
+
if (isNaN(v) || parseInt(n.value) < parseInt(v))
|
160 |
+
st = this.mark(f, n);
|
161 |
+
}
|
162 |
+
|
163 |
+
if (this.hasClass(n, s.max_cls, true)) {
|
164 |
+
v = this.getNum(n, s.max_cls);
|
165 |
+
|
166 |
+
if (isNaN(v) || parseInt(n.value) > parseInt(v))
|
167 |
+
st = this.mark(f, n);
|
168 |
+
}
|
169 |
+
}
|
170 |
+
|
171 |
+
return st;
|
172 |
+
},
|
173 |
+
|
174 |
+
hasClass : function(n, c, d) {
|
175 |
+
return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
|
176 |
+
},
|
177 |
+
|
178 |
+
getNum : function(n, c) {
|
179 |
+
c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
|
180 |
+
c = c.replace(/[^0-9]/g, '');
|
181 |
+
|
182 |
+
return c;
|
183 |
+
},
|
184 |
+
|
185 |
+
addClass : function(n, c, b) {
|
186 |
+
var o = this.removeClass(n, c);
|
187 |
+
n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
|
188 |
+
},
|
189 |
+
|
190 |
+
removeClass : function(n, c) {
|
191 |
+
c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
|
192 |
+
return n.className = c != ' ' ? c : '';
|
193 |
+
},
|
194 |
+
|
195 |
+
tags : function(f, s) {
|
196 |
+
return f.getElementsByTagName(s);
|
197 |
+
},
|
198 |
+
|
199 |
+
mark : function(f, n) {
|
200 |
+
var s = this.settings;
|
201 |
+
|
202 |
+
this.addClass(n, s.invalid_cls);
|
203 |
+
this.markLabels(f, n, s.invalid_cls);
|
204 |
+
|
205 |
+
return false;
|
206 |
+
},
|
207 |
+
|
208 |
+
markLabels : function(f, n, ic) {
|
209 |
+
var nl, i;
|
210 |
+
|
211 |
+
nl = this.tags(f, "label");
|
212 |
+
for (i=0; i<nl.length; i++) {
|
213 |
+
if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id)
|
214 |
+
this.addClass(nl[i], ic);
|
215 |
+
}
|
216 |
+
|
217 |
+
return null;
|
218 |
+
}
|
219 |
+
};
|