source: trunk/plugins/Forms/popups/textarea.html @ 967

Last change on this file since 967 was 854, checked in by gocher, 13 years ago

change htmlarea to Xinha in plugin Forms and some formating

  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 3.4 KB
Line 
1<html>
2
3<head>
4  <title>Insert/Edit Form Element TEXTAREA</title>
5  <link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
6  <script type="text/javascript" src="../../../popups/popup.js"></script>
7
8<script type="text/javascript">
9
10var fields = ["f_name", "f_text", "f_cols", "f_rows", "f_wrap", "f_tabindex", "f_accesskey", "f_readOnly", "f_disabled"];
11
12function Init() {
13  __dlg_translate("Forms");
14  __dlg_init(null,{width:260, height:380});
15  var param = window.dialogArguments;
16  for (var i in fields) {
17    switch (fields[i]) {
18    case "f_readOnly":
19    case "f_disabled":
20      document.getElementById(fields[i]).checked = (param[fields[i]]==fields[i].substring(2,20)) || (param[fields[i]] == true);  break;
21    default:
22      document.getElementById(fields[i]).value = param[fields[i]]; break;
23    }
24  }
25  document.getElementById("f_name").focus();
26}
27
28function onOK() {
29  var el = document.getElementById("f_name");
30  if (!el.value) {
31    alert(Xinha._lc("You must enter a Name","Forms"));
32    el.focus();
33    return false;
34  }
35  // pass data back to the calling window
36  var param = new Object();
37  for (var i in fields) {
38    switch (fields[i]) {
39    case "f_readOnly":
40    case "f_disabled":
41      if(Xinha.is_ie)
42        param[fields[i]] = (document.getElementById(fields[i]).checked)?true:"";
43      else
44        param[fields[i]] = (document.getElementById(fields[i]).checked)?fields[i].substring(2,20):"";
45      break;
46    default:
47      param[fields[i]] = document.getElementById(fields[i]).value; break;
48    }
49  }
50  __dlg_close(param);
51  return false;
52}
53
54function onCancel() {
55  __dlg_close(null);
56  return false;
57}
58</script>
59</head>
60
61<body class="dialog" onload="Init()">
62<div id="f_type" class="title">Form Element: TEXTAREA</div>
63<form action="" method="get">
64  <div class="fr">Name/ID:</div>
65  <input type="text" name="name" id="f_name" title="name of the textarea" />
66  <p />
67  <fieldset>
68  <legend>Dimensions</legend>
69    <div class="fr">Columns:</div>
70    <input type="text" name="cols" id="f_cols" size="5" title="Width in number of characters" />
71    <p />
72    <div class="fr">Rows:</div>
73    <input type="text" name="rows" id="f_rows" size="5" title="Height in number of rows" />
74    <p />
75  </fieldset>
76  <div class="space"></div>
77  <div class="fr">Wrap Mode:</div>
78  <select name="wrap" id="f_wrap">
79    <option value=""></option>
80    <option value="off">Off</option>
81    <option value="soft">Soft</option>
82    <option value="hard">Hard</option>
83    <option value="physical">Physical</option>
84    <option value="virtual">Virtual</option>
85    <option value="normal">normal</option>
86    <option value="nowrap">nowrap</option>
87    <option value="pre">pre</option>
88  </select>
89  <p />
90  <div class="fr">Read Only</div>
91  <input type="checkbox" name="readOnly" id="f_readOnly" value="readOnly" />
92  <p />
93  <div class="fr">Disabled</div>
94  <input type="checkbox" name="disabled" id="f_disabled" value="disabled" />
95  <p />
96  <div class="fr">Tab Index:</div>
97  <input type="text" name="tabindex" id="f_tabindex" />
98  <p />
99  <div class="fr">Access Key:</div>
100  <input type="text" name="accesskey" id="f_accesskey" />
101  <p />
102
103  <div class="fr">Initial Text:</div>
104  <input type="text" name="text" id="f_text" title="Default text (optional)" />
105  <div id="buttons">
106    <button type="button" name="ok" onclick="return onOK();">OK</button>
107    <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
108  </div>
109</form>
110
111</body>
112</html>
Note: See TracBrowser for help on using the repository browser.