source: trunk/popups/about.html @ 162

Last change on this file since 162 was 162, checked in by gogo, 14 years ago

Add proper version information (the version of htmlarea.js, not of
about.html) to about dialog.

Related to #48

Yermo took a different approach in the unified_backend branch by doinga
special replacement prior/post commit, however I felt that introduced
a) too much reliance on pre/post-commit stuff, b) too many spurious
changes, c) too much cruft. Seeing as this is all Javascript anyway I
think my solution is fine.

  • Property svn:eol-style set to native
  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 9.1 KB
Line 
1<!--
2
3(c) dynarch.com, 2003-2004
4Author: Mihai Bazon, http://dynarch.com/mishoo
5Distributed as part of HTMLArea 3.0
6
7"You are not expected to understand this...  I don't neither."
8
9                      (from The Linux Kernel Source Code,
10                            ./arch/x86_64/ia32/ptrace.c:90)
11
12;-)
13
14-->
15
16<html style="height: 100%">
17<head>
18<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
19<title>About Xinha</title>
20<script type="text/javascript" src="popup.js"></script>
21<script type="text/javascript">
22window.resizeTo(450, 250);
23var TABS = [];
24var CURRENT_TAB = 0;
25var CONTENT_HEIGHT_DIFF = 0;
26var CONTENT_WIDTH_DIFF = 0;
27function selectTab(idx) {
28  var ct = TABS[CURRENT_TAB];
29  ct.className = ct.className.replace(/\s*tab-current\s*/, ' ');
30  ct = TABS[CURRENT_TAB = idx];
31  ct.className += ' tab-current';
32  for (var i = TABS.length; --i >= 0;) {
33    var area = document.getElementById("tab-area-" + i);
34    if (CURRENT_TAB == i) {
35      area.style.display = "block";
36    } else {
37      area.style.display = "none";
38    }
39  }
40  document.body.style.visibility = "hidden";
41  document.body.style.visibility = "visible";
42  document.cookie = "HTMLAREA-ABOUT-TAB=" + idx;
43}
44var editor = null;
45function initDocument() {
46  editor = window.dialogArguments;
47  HTMLArea = window.opener.HTMLArea;
48
49  var plugins = document.getElementById("plugins");
50  var j = 0;
51  var html = "<table width='99%' cellpadding='2' cellspacing=2 style='margin-top: 1em; collapse-borders: collapse; border: 1px solid black;'>" +
52    "<thead><tr>" +
53    "<td>Name</td>" +
54    "<td>Developer</td>" +
55    "<td>Sponsored by</td>" +
56    "<td>License</td>" +
57    "</tr></thead><tbody>";
58  for (var i in editor.plugins) {
59    var info = editor.plugins[i];
60    html += "<tr><td>" + info.name + " v" + info.version + "</td>" +
61            "<td><a href='" + info.developer_url + "' target='_blank' title='Visit developer website'>" +
62      info.developer + "</a></td>" +
63      "<td><a href='" + info.sponsor_url + "' target='_blank' title='Visit sponsor website'>" +
64      info.sponsor + "</a></td>" +
65      "<td>" + info.license + "</td></tr>";
66    ++j;
67  }
68
69  if (j) {
70          html += "</tbody></table>" +
71      "<p>License \"htmlArea\" means that the plugin is distributed under the same terms " +
72      "as Xinha itself.</p>";
73    plugins.innerHTML = "<p>The following plugins have been loaded.</p>" + html;
74  } else {
75    plugins.innerHTML = "<p>No plugins have been loaded</p>";
76  }
77
78  plugins.innerHTML += "<p>User agent reports:<br/>" + navigator.userAgent + "</p>";
79
80  var content = document.getElementById("content");
81  if (window.innerHeight) {
82    CONTENT_HEIGHT_DIFF = window.innerHeight - 250;
83    CONTENT_WIDTH_DIFF = window.innerWidth - content.offsetWidth;
84  } else {
85    CONTENT_HEIGHT_DIFF = document.body.offsetHeight - 250;
86    CONTENT_WIDTH_DIFF = document.body.offsetWidth - 400;
87  }
88  window.onresize();
89  var bar = document.getElementById("tabbar");
90  j = 0;
91  for (var i = bar.firstChild; i; i = i.nextSibling) {
92    TABS.push(i);
93    i.__msh_tab = j;
94    i.onmousedown = function(ev) { selectTab(this.__msh_tab); HTMLArea._stopEvent(ev || window.event); };
95    var area = document.getElementById("tab-area-" + j);
96    if (/tab-current/.test(i.className)) {
97      CURRENT_TAB = j;
98      area.style.display = "block";
99    } else {
100      area.style.display = "none";
101    }
102    ++j;
103  }
104  if (document.cookie.match(/HTMLAREA-ABOUT-TAB=([0-9]+)/))
105    selectTab(RegExp.$1);
106}
107window.onresize = function() {
108  var content = document.getElementById("content");
109  if (window.innerHeight) {
110    content.style.height = (window.innerHeight - CONTENT_HEIGHT_DIFF) + "px";
111    content.style.width = (window.innerWidth - CONTENT_WIDTH_DIFF) + "px";
112  } else {
113    content.style.height = (document.body.offsetHeight - CONTENT_HEIGHT_DIFF) + "px";
114    //content.style.width = (document.body.offsetWidth - CONTENT_WIDTH_DIFF) + "px";
115  }
116}
117</script>
118<style>
119  html,body,textarea,table
120  { font-family: helvetica,arial,sans-serif;
121    font-size: 11px; padding: 0px; margin: 0px;
122  }
123
124  body { padding: 0px; background: #f5f6f6; color: black; }
125  a:link, a:visited { color: #00f; }
126  a:hover           { color: #f00; }
127  a:active          { color: #f80; }
128  button            { font: 11px; border-width: 1px; background-color:#f5f6f6; color:black; }
129
130  p { margin: 0.5em 0px; }
131
132  #tdheader h1
133  { font: bold 40px "Staccato222 BT", cursive; margin: 0px; padding-left:4px; border-bottom: 1px solid #6a6; }
134  h1 { font: bold 20px; margin: 0px; border-bottom: 1px solid #6a6; }
135  h2 { font: bold 110%; margin: 0.7em 0px; }
136
137  thead {
138    font-weight: bold;
139    background-color: #CCC;
140  }
141
142  thead td { padding-left:4px; }
143
144  .buttons {
145    text-align: right; padding: 3px;
146    background-color: white;
147    border-top: 1px solid #555;
148  }
149
150  #tabbar {
151    position: relative;
152    left: 10px;
153  }
154  .tab {
155    color: #OOO;
156    cursor: pointer;
157    margin-left: -5px;
158    float: left; position: relative;
159    border: 1px solid #555;
160    top: -3px; left: -2px;
161    padding: 2px 10px 3px 10px;
162    border-top: none; background-color: #CCC;
163    -moz-border-radius: 0px 0px 4px 4px;
164    z-index: 0;
165  }
166  .tab-current
167  {
168    color: #000;
169    top: -4px;
170    background-color: #f5f6f6;
171    padding: 3px 10px 4px 10px;
172    z-index: 10;
173  }
174
175  li, ol, ul { margin-top: 0px; margin-bottom: 0px; }
176</style></head>
177<body onload="__dlg_init(); initDocument();"
178><table cellspacing="0" cellpadding="0" style="border-collapse: collapse;
179      width: 100%; height: 100%;">
180
181<tr style="height: 1em"><td id="tdheader">
182
183<h1>Xinha</h1>
184
185</td></tr>
186<tr><td id="tdcontent" style="padding: 0.5em;">
187
188<div style="overflow: auto; height: 250px;" id="content">
189<div id="tab-areas">
190
191<div id="tab-area-0">
192
193  <p>A free WYSIWYG editor replacement for <tt>&lt;textarea&gt;</tt> fields.</p>
194  <p>Visit the <a href="http://xinha.gogo.co.nz/">Xinha Website</a> for more information.</p>
195
196  <p>
197   Use of Xinha is granted by the terms of the htmlArea License (based on BSD license)
198  </p>
199  <p>
200    Xinha was originally based on work by Mihai Bazon which is:
201  </p>
202  <blockquote><pre>Copyright (c) 2003-2004 dynarch.com.
203    Copyright (c) 2002-2003 interactivetools.com, inc.
204    This copyright notice MUST stay intact for use.</pre></blockquote>
205
206</div>
207
208<div id="tab-area-1">
209
210  <p>
211   The development of Xinha would not have been possible without the original work of <a href="http://dynarch.com/">Mihai Bazon</a>, <a href="http://interactivetools.com" target="_blank">InteractiveTools.com</a>, and the many sponsors and contributors from around the world.
212  </p>
213
214</div>
215
216<div id="tab-area-2">
217<pre>htmlArea License (based on BSD license)
218Copyright (c) 2002-2004, interactivetools.com, inc.
219Copyright (c) 2003-2004 dynarch.com
220All rights reserved.
221
222Redistribution and use in source and binary forms, with or without
223modification, are permitted provided that the following conditions are met:
224
2251) Redistributions of source code must retain the above copyright notice,
226   this list of conditions and the following disclaimer.
227
2282) Redistributions in binary form must reproduce the above copyright notice,
229   this list of conditions and the following disclaimer in the documentation
230   and/or other materials provided with the distribution.
231
2323) Neither the name of interactivetools.com, inc. nor the names of its
233   contributors may be used to endorse or promote products derived from this
234   software without specific prior written permission.
235
236THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
237AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
238IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
239ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
240LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
241CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
242SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
243INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
244CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
245ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
246POSSIBILITY OF SUCH DAMAGE.</pre>
247</div>
248
249<div id="tab-area-3">
250<div id="plugins">
251</div>
252</div>
253
254
255<div id="tab-area-4">
256  <script type="text/javascript">
257    if(window.opener && window.opener.HTMLArea)
258    {
259      var ver = window.opener.HTMLArea.version;
260      document.write('<pre>'
261                      + '\nRelease: ' + ver.Release + ' (' + ver.Date + ')'
262                      + '\nHead: ' + ver.Head
263                      + '\nRevision: ' + ver.Revision
264                      + '\nLast Changed By: ' + ver.RevisionBy
265                      + '\n' +
266                      '</pre>');
267    }
268    else
269    {
270      document.write('<pre>Version information unavailable.</pre>');
271    }
272  </script>
273</div>
274
275</div></div>
276
277
278</td></tr>
279<tr style="height: 1em"><td id="tdfooter">
280
281
282<div class="buttons">
283<div id="tabbar"
284><div class="tab tab-current"
285>About</div><div class="tab"
286>Thanks</div><div class="tab"
287>License</div><div class="tab"
288>Plugins</div><div class="tab"
289>Version</div></div>
290<button type="button" onclick="__dlg_close(null);">Close</button>
291</div>
292
293</td></tr></table>
294
295</body></html>
Note: See TracBrowser for help on using the repository browser.