source: trunk/modules/InsertImage/insert_image.html @ 697

Last change on this file since 697 was 694, checked in by gogo, 13 years ago

Merge from branches/688-fixup to complete the fix of changeset:688 to
have history. See ticket:10 for info.

For reference, this is how I fixed it...

  1. Checkout
  2. Rolled back the bad revision (svn merge -c -688) in the WC
  3. Copied that WC to a branch to work on (branches/688-fixup)
  4. Checkout copy of the branch
  5. In branch, use svn mv and svn cp to shift the files properly
  6. Checkout a copy of the trunk
  7. Apply any remaining differences from the trunk to the branch (manually, just copy the files across)
  8. Checkin the branch
  9. Checkout 2nd copy of trunk as merge_WC
  10. svn merge trunk_WC@688 branch_WC@HEAD merge_WC
  11. Verify that there are no differences in the files between the

three working copies (the only difference now should be history)

  1. checkin the merge_WC (this commit)

As you can see, it's a complete pain to fixup these, so please everybody
be careful to use the correct subversion commands when you move (rename)
and copy files.

  • Property svn:eol-style set to native
  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 4.7 KB
RevLine 
[20]1<html>
2
3<head>
4  <title>Insert Image</title>
5
[693]6<script type="text/javascript" src="../../popups/popup.js"></script>
7<link rel="stylesheet" type="text/css" href="../../popups/popup.css" />
[20]8
9<script type="text/javascript">
10
11window.resizeTo(400, 100);
12
[649]13Xinha = window.opener.Xinha;
[246]14function i18n(str) {
[649]15  return (Xinha._lc(str, 'Xinha'));
[419]16}
[246]17
[20]18function Init() {
[649]19  __dlg_translate('Xinha');
[20]20  __dlg_init();
[246]21  // Make sure the translated string appears in the drop down. (for gecko)
22  document.getElementById("f_align").selectedIndex = 1;
23  document.getElementById("f_align").selectedIndex = 5;
[20]24  var param = window.dialogArguments;
25  if (param) {
26      document.getElementById("f_url").value = param["f_url"];
27      document.getElementById("f_alt").value = param["f_alt"];
28      document.getElementById("f_border").value = param["f_border"];
29      document.getElementById("f_align").value = param["f_align"];
30      document.getElementById("f_vert").value = param["f_vert"];
31      document.getElementById("f_horiz").value = param["f_horiz"];
32      window.ipreview.location.replace(param.f_url);
33  }
34  document.getElementById("f_url").focus();
[419]35}
[20]36
37function onOK() {
38  var required = {
[246]39    "f_url": i18n("You must enter the URL")
[20]40  };
41  for (var i in required) {
42    var el = document.getElementById(i);
43    if (!el.value) {
44      alert(required[i]);
45      el.focus();
46      return false;
47    }
48  }
49  // pass data back to the calling window
50  var fields = ["f_url", "f_alt", "f_align", "f_border",
51                "f_horiz", "f_vert"];
52  var param = new Object();
53  for (var i in fields) {
54    var id = fields[i];
55    var el = document.getElementById(id);
56    param[id] = el.value;
57  }
58  __dlg_close(param);
59  return false;
[419]60}
[20]61
62function onCancel() {
63  __dlg_close(null);
64  return false;
[419]65}
[20]66
67function onPreview() {
68  var f_url = document.getElementById("f_url");
69  var url = f_url.value;
70  if (!url) {
[246]71    alert(i18n("You must enter the URL"));
[20]72    f_url.focus();
73    return false;
74  }
75  window.ipreview.location.replace(url);
76  return false;
[419]77}
[20]78</script>
79
80</head>
81
[239]82<body class="dialog" onload="Init()">
[20]83
84<div class="title">Insert Image</div>
85<!--- new stuff --->
86<form action="" method="get">
87<table border="0" width="100%" style="padding: 0px; margin: 0px">
88  <tbody>
89
90  <tr>
91    <td style="width: 7em; text-align: right">Image URL:</td>
92    <td><input type="text" name="url" id="f_url" style="width:75%"
93      title="Enter the image URL here" />
94      <button name="preview" onclick="return onPreview();"
95      title="Preview the image in a new window">Preview</button>
96    </td>
97  </tr>
98  <tr>
99    <td style="width: 7em; text-align: right">Alternate text:</td>
100    <td><input type="text" name="alt" id="f_alt" style="width:100%"
101      title="For browsers that don't support images" /></td>
102  </tr>
103
104  </tbody>
105</table>
106
107<p />
108
109<fieldset style="float: left; margin-left: 5px;">
110<legend>Layout</legend>
111
112<div class="space"></div>
113
114<div class="fl">Alignment:</div>
115<select size="1" name="align" id="f_align"
116  title="Positioning of this image">
117  <option value=""                             >Not set</option>
118  <option value="left"                         >Left</option>
119  <option value="right"                        >Right</option>
120  <option value="texttop"                      >Texttop</option>
121  <option value="absmiddle"                    >Absmiddle</option>
122  <option value="baseline" selected="1"        >Baseline</option>
123  <option value="absbottom"                    >Absbottom</option>
124  <option value="bottom"                       >Bottom</option>
125  <option value="middle"                       >Middle</option>
126  <option value="top"                          >Top</option>
127</select>
128
129<p />
130
131<div class="fl">Border thickness:</div>
132<input type="text" name="border" id="f_border" size="5"
133title="Leave empty for no border" />
134
135<div class="space"></div>
136
137</fieldset>
138
139<fieldset style="float:right; margin-right: 5px;">
140<legend>Spacing</legend>
141
142<div class="space"></div>
143
144<div class="fr">Horizontal:</div>
145<input type="text" name="horiz" id="f_horiz" size="5"
146title="Horizontal padding" />
147
148<p />
149
150<div class="fr">Vertical:</div>
151<input type="text" name="vert" id="f_vert" size="5"
152title="Vertical padding" />
153
154<div class="space"></div>
155
156</fieldset>
157<br clear="all" />
158<table width="100%" style="margin-bottom: 0.2em">
159 <tr>
160  <td valign="bottom">
[246]161    <div class="fr">Image Preview:</div>
[553]162    <iframe name="ipreview" id="ipreview" frameborder="0" style="border : 1px solid gray;"
[693]163        height="200" width="300" src="../../popups/blank.html"></iframe>
[20]164  </td>
165  <td valign="bottom" style="text-align: right">
166    <button type="button" name="ok" onclick="return onOK();">OK</button><br>
167    <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
168  </td>
169 </tr>
170</table>
171</form>
172</body>
[246]173</html>
Note: See TracBrowser for help on using the repository browser.