source: branches/ray/plugins/Abbreviation/popups/abbreviation.html @ 761

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

updated branch

  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 2.7 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 = HTMLArea._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  window.resizeTo(260, 160);
30  __dlg_translate("Abbreviation");
31  __dlg_init();
32  var param = window.dialogArguments;
33  var text = null;
34  if (param) {
35    text = param["text"];
36    document.getElementById("title").value = param["title"];
37  }
38  fillSelect(text);
39  document.getElementById("title").focus();
40};
41
42function onOK() {
43  var param = new Object();
44  param["title"] = document.getElementById("title").value;
45  __dlg_close(param);
46  return false;
47}
48
49
50function onDelete() {
51  // pass data back to the calling window
52  var param = new Object();
53  param["title"] = "";
54  __dlg_close(param);
55  return false;
56};
57
58function onCancel() {
59  __dlg_close(null);
60  return false;
61};
62</script>
63
64</head>
65<body class="dialog" onload="Init()">
66<div class="title">Abbreviation</div>
67<form name="form" action="">
68<table border="0" style="width: 100%;">
69  <tr>
70    <td class="lable">Expansion:</td>
71    <td>
72    <select id="select" name="select"
73                onChange="document.form.title.value=document.form.select.options[document.form.select.selectedIndex].value"
74                style="position:absolute; top:35px; left:100px; width:118px; clip:rect(0 120 22 100)">
75          <option value=""></option>
76
77        </select>
78        <input type="title" id="title" name="text"
79               onChange="document.form.select.selectedIndex=-1"
80           style="position:absolute; top:35px; left:100px; width:100px; border-right:0">
81    <!--<input type="text" id="title" name="title" value="" size="30">-->
82    </td>
83  </tr>
84</table>
85
86<div id="buttons">
87   <button type="submit" name="ok" onclick="return onOK();">OK</button>
88   <button type="button" name="delete" onclick="return onDelete();">Delete</button>
89   <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
90</div>
91</form>
92</body>
93</html>
Note: See TracBrowser for help on using the repository browser.