source: releases/0.9beta/plugins/FullPage/popups/docprop.html @ 646

Last change on this file since 646 was 646, checked in by ray, 12 years ago

And the compressed version in the /releases dir

File size: 4.3 KB
Line 
1<html>
2<head>
3<title>Document properties</title>
4<script type="text/javascript" src="../../../popups/popup.js"></script>
5<script type="text/javascript" src="../../../popups/color_picker.js"></script>
6<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
7<script type="text/javascript">
8FullPage = window.opener.FullPage; // load the FullPage plugin and lang file ;-)
9window.resizeTo(400, 130);
10var accepted = {
11  f_doctype       : true,
12  f_title         : true,
13  f_body_bgcolor  : true,
14  f_body_fgcolor  : true,
15  f_base_style    : true,
16  f_alt_style     : true,
17  f_charset       : true,
18  f_keywords      : true,
19  f_description   : true
20};
21
22var editor = null;
23function Init() {
24  __dlg_translate('FullPage');
25  __dlg_init();
26  var params = window.dialogArguments;
27  for (var i in params) {
28    if (i in accepted) {
29      var el = document.getElementById(i);
30      el.value = params[i];
31    }
32  }
33  editor = params.editor;
34
35  var bgCol_pick = document.getElementById('bgCol_pick');
36  var f_body_bgcolor = document.getElementById('f_body_bgcolor');
37  var bgColPicker = new colorPicker({cellsize:'5px',callback:function(color){f_body_bgcolor.value=color;}});
38  bgCol_pick.onclick = function() { bgColPicker.open('top,right', f_body_bgcolor ); }
39
40  var fgCol_pick = document.getElementById('fgCol_pick');
41  var f_body_fgcolor = document.getElementById('f_body_fgcolor');
42  var fgColPicker = new colorPicker({cellsize:'5px',callback:function(color){f_body_fgcolor.value=color;}});
43  fgCol_pick.onclick = function() { fgColPicker.open('top,right', f_body_fgcolor ); }
44
45  document.getElementById("f_title").focus();
46  document.getElementById("f_title").select();
47}
48
49function onOK() {
50  var required = {
51  };
52  for (var i in required) {
53    var el = document.getElementById(i);
54    if (!el.value) {
55      alert(required[i]);
56      el.focus();
57      return false;
58    }
59  }
60
61  var param = {};
62  for (var i in accepted) {
63    var el = document.getElementById(i);
64    param[i] = el.value;
65  }
66  __dlg_close(param);
67  return false;
68}
69
70function onCancel() {
71  __dlg_close(null);
72  return false;
73}
74</script>
75<style type="text/css">
76.fr { width: 11em; float: left; padding: 2px 5px; text-align: right; }
77.txt { width:200px; }
78div { clear:both; }
79.picker { width:30px; }
80</style>
81</head>
82
83<body class="dialog" onload="Init()">
84
85<div class="title">Document properties</div>
86
87<div>
88  <label class="fr" for="f_title">Document title:</label>
89  <input type="text" id="f_title" class="txt" />
90</div>
91<div>
92  <label class="fr" for="f_doctype">DOCTYPE:</label>
93  <input type="text" id="f_doctype" class="txt" />
94</div>
95<div>
96  <label class="fr" for="f_keywords">Keywords:</label>
97
98  <input type="text" id="f_keywords" class="txt" />
99</div>
100<div>
101  <label class="fr" for="f_description">Description:</label>
102  <input type="text" id="f_description" class="txt" />
103</div>
104<div>
105  <label class="fr" for="f_charset">Character set:</label>
106  <select id="f_charset" class="txt">
107    <option value=""></option>
108    <option value="utf-8">UTF-8 (recommended)</option>
109    <option value="windows-1251">cyrillic (WINDOWS-1251)</option>
110
111    <option value="koi8-r">cyrillic (KOI8-R)</option>
112    <option value="iso-8859-5">cyrillic (ISO-8859-5)</option>
113    <option value="iso-8859-1">western (ISO-8859-1)</option>
114  </select>
115</div>
116<div>
117  <label class="fr" for="f_base_style">Primary style-sheet:</label>
118  <input type="text" id="f_base_style" class="txt" />
119</div>
120<div>
121  <label class="fr" for="f_alt_style">Alternate style-sheet:</label>
122  <input type="text" id="f_alt_style" class="txt" />
123</div>
124<div>
125  <label class="fr" for="f_body_bgcolor">Background color:</label>
126  <input name="f_body_bgcolor" type="text" id="f_body_bgcolor" size="7" />
127  <button type="button" id="bgCol_pick" class="picker">...</button>
128</div>
129<div>
130  <label class="fr" for="f_body_fgcolor">Text color:</label>
131  <input name="f_body_fgcolor" type="text" id="f_body_fgcolor" size="7" />
132  <button type="button" id="fgCol_pick" class="picker">...</button>
133</div>
134
135<div id="buttons">
136  <button type="button" name="ok" onclick="return onOK();"><span>OK</span></button>
137
138  <button type="button" name="cancel" onclick="return onCancel();"><span>Cancel</span></button>
139</div>
140
141</body>
142</html>
Note: See TracBrowser for help on using the repository browser.