source: trunk/plugins/FullPage/popups/docprop.html @ 419

Last change on this file since 419 was 419, checked in by mokhet, 14 years ago

more ; fixed (a few were missing, a lot were used with no reason) for ticket #385

  • Property svn:eol-style set to native
  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 4.2 KB
RevLine 
[1]1<html>
2<head>
[276]3<title>Document properties</title>
[1]4<script type="text/javascript" src="../../../popups/popup.js"></script>
[305]5<script type="text/javascript" src="../../../popups/color_picker.js"></script>
[109]6<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
[1]7<script type="text/javascript">
8FullPage = window.opener.FullPage; // load the FullPage plugin and lang file ;-)
[248]9window.resizeTo(400, 130);
[276]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};
[1]21
22var editor = null;
23function Init() {
[60]24  __dlg_translate('FullPage');
[1]25  __dlg_init();
26  var params = window.dialogArguments;
27  for (var i in params) {
[276]28    if (i in accepted) {
29      var el = document.getElementById(i);
30      el.value = params[i];
31    }
[1]32  }
33  editor = params.editor;
[305]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
[1]45  document.getElementById("f_title").focus();
46  document.getElementById("f_title").select();
[419]47}
[1]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;
[419]68}
[1]69
70function onCancel() {
71  __dlg_close(null);
72  return false;
[419]73}
[1]74</script>
[248]75<style type="text/css">
76.fr { width: 11em; float: left; padding: 2px 5px; text-align: right; }
[251]77.txt { width:200px; }
78div { clear:both; }
[305]79.picker { width:30px; }
[248]80</style>
[251]81</head>
[1]82
[251]83<body class="dialog" onload="Init()">
[1]84
[251]85<div class="title">Document properties</div>
[276]86
[251]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>
[276]97
[251]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>
[305]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>
[251]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>
[305]126  <input name="f_body_bgcolor" type="text" id="f_body_bgcolor" size="7" />
127  <button type="button" id="bgCol_pick" class="picker">...</button>
[251]128</div>
129<div>
130  <label class="fr" for="f_body_fgcolor">Text color:</label>
[305]131  <input name="f_body_fgcolor" type="text" id="f_body_fgcolor" size="7" />
132  <button type="button" id="fgCol_pick" class="picker">...</button>
[251]133</div>
[276]134
[251]135<div id="buttons">
136  <button type="button" name="ok" onclick="return onOK();"><span>OK</span></button>
[276]137
[251]138  <button type="button" name="cancel" onclick="return onCancel();"><span>Cancel</span></button>
139</div>
[1]140
[251]141</body>
142</html>
Note: See TracBrowser for help on using the repository browser.