source: trunk/plugins/Abbreviation/popups/abbreviation.html @ 893

Last change on this file since 893 was 858, checked in by ray, 12 years ago
  • fixed some HTML errors in various files
  • add setValues() to Xinha.PanelDialog?.prototype.show()
  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 2.8 KB
Line 
1<html>
2<head>
3  <title>Abbreviation</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">
8var Abbreviation = window.opener.Abbreviation; // load the Abbreviation plugin and lang file ;-)
9
10function fillSelect(text) {
11  var abbr = window.location.href;
12  abbr = abbr.replace(/popups\/abbreviation.html/g, "abbr\/" + window.opener._editor_lang + ".js");
13  var abbrData = Xinha._geturlcontent(abbr);
14  if (abbrData) {
15    eval('abbrObj = ' + abbrData);
16    if (abbrObj != "") {
17      dest = document.getElementById("select");
18      for (var i in abbrObj) {
19        same = (i==text);
20        dest.options[dest.options.length] = new Option(i + "=" + abbrObj[i], abbrObj[i], false, same);
21        if (same)
22        document.getElementById("title").value = abbrObj[i];
23      }
24    }
25  }
26}
27
28function Init() {
29  __dlg_translate("Abbreviation");
30  __dlg_init(null,{width: 260, height: 160});
31  var param = window.dialogArguments;
32  var text = null;
33  if (param) {
34    text = param["text"];
35    document.getElementById("title").value = param["title"];
36  }
37  fillSelect(text);
38  document.getElementById("title").focus();
39};
40
41function onOK() {
42  var param = new Object();
43  param["title"] = document.getElementById("title").value;
44  __dlg_close(param);
45  return false;
46}
47
48
49function onDelete() {
50  // pass data back to the calling window
51  var param = new Object();
52  param["title"] = "";
53  __dlg_close(param);
54  return false;
55};
56
57function onCancel() {
58  __dlg_close(null);
59  return false;
60};
61</script>
62
63</head>
64<body class="dialog" onload="Init()">
65<div class="title">Abbreviation</div>
66<form name="form" action="">
67<table border="0" style="width: 100%;">
68  <tr>
69    <td class="lable">Expansion:</td>
70    <td>
71    <select id="select" name="select"
72            onChange="document.form.title.value=document.form.select.options[document.form.select.selectedIndex].value"
73            style="position:absolute; top:35px; left:100px; width:118px; clip:rect(0 120 22 100)">
74      <option value=""></option>
75
76    </select>
77    <input type="text" id="title" name="title"
78           onChange="document.form.select.selectedIndex=-1"
79           style="position:absolute; top:35px; left:100px; width:100px; border-right:0">
80    <!--<input type="text" id="title" name="title" value="" size="30">-->
81    </td>
82  </tr>
83</table>
84
85<div id="buttons">
86   <button type="submit" name="ok" onclick="return onOK();">OK</button>
87   <button type="button" name="delete" onclick="return onDelete();">Delete</button>
88   <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
89</div>
90</form>
91</body>
92</html>
Note: See TracBrowser for help on using the repository browser.