source: trunk/plugins/HorizontalRule/popups/edit_horizontal_rule.html @ 677

Last change on this file since 677 was 677, checked in by ray, 13 years ago

set svn:keywords property for the new files & all plugins

  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 4.9 KB
Line 
1<html>
2<head>
3  <title>Insert/Edit Horizontal Rule</title>
4  <link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
5  <script type="text/javascript" src="../../../popups/popup.js"></script>
6
7<script type="text/javascript">
8editor = window.opener.editor;
9
10function Init() {
11        __dlg_translate("HorizontalRule");
12        __dlg_init();
13        window.resizeTo(300,320);
14        var params = window.dialogArguments;
15        if(params) {
16                document.getElementById("f_size").value = params.f_size;
17                document.getElementById("f_width").value = params.f_width;
18                document.getElementById("f_widthUnit").value = params.f_widthUnit;
19                document.getElementById("f_align").value = params.f_align;
20                document.getElementById("f_color").value = params.f_color;
21                document.getElementById("hrpv").style.backgroundColor = params.f_color;
22                document.getElementById("f_noshade").checked = params.f_noshade;
23        }
24        document.getElementById("f_width").focus();
25}
26
27function onOK() {
28  var fields = ["f_size", "f_width", "f_widthUnit", "f_align", "f_color", "f_noshade"];
29  var param = new Object();
30  for (var i in fields) {
31    var id = fields[i];
32        var el = document.getElementById(id);
33    param[id] = (el.type == "checkbox") ? el.checked : el.value;
34  }
35  __dlg_close(param);
36  return false;
37}
38
39function onCancel() {
40  __dlg_close(null);
41  return false;
42}
43
44function selectColor(id1,id2,color) {
45        Dialog(editor.popupURL("select_color.html"), function(color){
46                if (color) {
47                        document.getElementById(id1).style.backgroundColor="#"+color;
48                        document.getElementById(id2).value="#"+color;
49                }
50        }, color);
51}
52function Dialog(url, action, init) {
53        Dialog.openModal(url, action, init);
54}
55Dialog.openModal = function(url, action, init) {
56        var dlg2 = window.open(url, "hadialog2",
57                  "toolbar=no,menubar=no,personalbar=no,width=10,height=10," +
58                  "scrollbars=no,resizable=yes,modal=yes,dependable=yes");
59        Dialog._modal = dlg2;
60        Dialog._arguments = init;
61        Dialog._return = function (val) {
62                if (val && action) {
63                        action(val);
64                }
65                Dialog._modal = null;
66        };
67};
68
69</script>
70
71<style type="text/css">
72.buttonColor {
73  padding: 1px;
74  cursor: default;
75  border: 1px solid;
76  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
77}
78
79.buttonColor-hilite {
80  border-color: #000;
81}
82
83.buttonColor .chooser {
84  height: 0.6em;
85  border: 1px solid;
86  padding: 0px 1em;
87  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
88}
89
90.buttonColor .nocolor {
91  padding: 0px;
92  height: 0.6em;
93  border: 1px solid;
94  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
95}
96.buttonColor .nocolor-hilite { background-color: #fff; color: #f00; }
97</style>
98<style type="text/css">
99@import url(../../../popups/popupstyle.css);
100</style>
101
102</head>
103
104<body class="dialog" onload="Init()">
105<div class="title">Horizontal Rule</div>
106<form action="" method="get">
107  <fieldset>
108  <legend>Layout</legend>
109    <div class="fr">Width:</div>
110    <input style="margin-right: 0.5em;" name="f_width" id="f_width" size="5" type="text">
111    <select style="margin-right: 0.5em;" name="f_widthUnit" id="f_widthUnit">
112      <option value="%">percent</option>
113      <option value="px">pixels</option>
114    </select>
115    <p />
116    <div class="fr">Height:</div>
117    <input style="margin-right: 0.5em;" name="f_size" id="f_size" size="5" type="text"> <span>pixels</span>
118    <p />
119    <div class="fr">Alignment:</div>
120    <select name="f_align" id="f_align">
121      <option value="left">Left</option>
122      <option value="center">Center</option>
123      <option value="right">Right</option>
124    </select>
125    <p />
126  </fieldset>
127  <fieldset>
128  <legend>Style</legend>
129    <div class="fr">Color:</div>
130    <table cellpadding="2" cellspacing="0" id="hrbtn" class="buttonColor">
131    <tr>
132      <td class="chooser" id="hrpv"
133          onMouseOver="document.getElementById('hrbtn').style.borderColor='black'"
134          onMouseOut="document.getElementById('hrbtn').style.borderColor='ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight'"
135          onClick="selectColor('hrpv','f_color',document.getElementById('f_color').value)">&nbsp;</td>
136      <td class="nocolor" id="hrclr"
137          onMouseOver="document.getElementById('hrclr').style.color='#f00'"
138          onMouseOut="document.getElementById('hrclr').style.color='#000'"
139          onClick="document.getElementById('f_color').value=''; document.getElementById('hrpv').style.backgroundColor=''">&#x00d7;</td>
140    </tr>
141    </table>
142    <p />
143    <div class="fr"> </div>
144    <input type="hidden" name="f_color" id="f_color">
145    <input type="checkbox" name="f_noshade" id="f_noshade" value="noshade">
146    <span>No shading</span>
147    <p />
148  </fieldset>
149  <fieldset>
150          <legend>Note:</legend>
151    <span>To select an existing horizontal rule, a double-click may be needed.</span>
152  </fieldset>
153<div id="buttons">
154  <button type="submit" name="ok" onclick="return onOK();">OK</button>
155  <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
156</div>
157</form>
158</body>
159</html>
Note: See TracBrowser for help on using the repository browser.