- Timestamp:
- 06/28/05 10:24:29 (14 years ago)
- Location:
- trunk/plugins/FullPage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/FullPage/full-page.js
r152 r248 52 52 var style1 = ''; 53 53 var style2 = ''; 54 var keywords = ''; 55 var description = ''; 54 56 var charset = ''; 55 57 for (var i = links.length; --i >= 0;) { … … 68 70 r = /^text\/html; *charset=(.*)$/i.exec(meta.content); 69 71 charset = r[1]; 72 } else if (/keywords/i.test(meta.name)) { 73 keywords = meta.content; 74 } else if (/description/i.test(meta.name)) { 75 description = meta.content; 70 76 } 71 77 } … … 80 86 f_alt_style : style2, 81 87 f_charset : charset, 88 f_keywords : keywords, 89 f_description : description, 82 90 editor : editor 83 91 }; … … 99 107 var charset = null; 100 108 var charset_meta = null; 109 var keywords = null; 110 var description = null; 101 111 for (var i = links.length; --i >= 0;) { 102 112 var link = links[i]; … … 114 124 charset = r[1]; 115 125 charset_meta = meta; 126 } else if (/keywords/i.test(meta.name)) { 127 keywords = meta; 128 } else if (/description/i.test(meta.name)) { 129 description = meta; 116 130 } 117 131 } … … 122 136 return link; 123 137 }; 124 function createMeta( name, content) {138 function createMeta(httpEquiv, name, content) { 125 139 var meta = doc.createElement("meta"); 126 meta.httpEquiv = name; 140 if (httpEquiv!="") meta.httpEquiv = httpEquiv; 141 if (name!="") meta.name = name; 127 142 meta.content = content; 128 143 head.appendChild(meta); … … 149 164 } 150 165 if (!charset_meta && params.f_charset) 151 charset_meta = createMeta("Content-Type", "text/html; charset="+params.f_charset); 166 charset_meta = createMeta("Content-Type","", "text/html; charset="+params.f_charset); 167 168 if (!keywords && params.f_keywords) 169 keywords = createMeta("","keywords", params.f_keywords); 170 else if (params.f_keywords) 171 keywords.content = params.f_keywords; 172 else if (keywords) 173 head.removeChild(keywords); 174 175 if (!description && params.f_description) 176 description = createMeta("","description", params.f_description); 177 else if (params.f_description) 178 description.content = params.f_description; 179 else if (description) 180 head.removeChild(description); 152 181 153 182 for (var i in params) { -
trunk/plugins/FullPage/popups/docprop.html
r239 r248 10 10 11 11 FullPage = window.opener.FullPage; // load the FullPage plugin and lang file ;-) 12 window.resizeTo(400, 1 00);12 window.resizeTo(400, 130); 13 13 14 14 var accepted = { … … 19 19 f_base_style : true, 20 20 f_alt_style : true, 21 f_charset : true 21 f_charset : true, 22 f_keywords : true, 23 f_description : true 22 24 }; 23 25 … … 65 67 66 68 </script> 67 68 69 <style type="text/css"> 70 .fr { width: 11em; float: left; padding: 2px 5px; text-align: right; } 71 </style> 69 72 </head> 70 73 71 74 <body class="dialog" onload="Init()"> 72 75 73 <div class="title"><span>Document properties</span></div> 74 75 <table style="width: 100%"> 76 <tr> 77 <td class="label"><span>Document title:</span></td> 78 <td><input type="text" id="f_title" style="width: 100%" /></td> 79 </tr> 80 <tr> 81 <td class="label"><span>DOCTYPE:</span></td> 82 <td><input type="text" id="f_doctype" style="width: 100%" /></td> 83 </tr> 84 <tr> 85 <td class="label"><span>Primary style-sheet:</span></td> 86 <td><input type="text" id="f_base_style" style="width: 100%" /></td> 87 </tr> 88 <tr> 89 <td class="label"><span>Alternate style-sheet:</span></td> 90 <td><input type="text" id="f_alt_style" style="width: 100%" /></td> 91 </tr> 92 <tr> 93 <td class="label"><span>Background color:</span></td> 94 <td><input type="text" id="f_body_bgcolor" size="7" /></td> 95 </tr> 96 <tr> 97 <td class="label"><span>Text color:</span></td> 98 <td><input type="text" id="f_body_fgcolor" size="7" /></td> 99 </tr> 100 <tr> 101 <td class="label"><span>Character set:</span></td> 102 <td><select id="f_charset"> 76 <div class="title">Document properties</div> 77 78 <div class="fr">Document title:</div> 79 <input type="text" id="f_title" style="width: 200px" /> 80 <br /> 81 <div class="fr">DOCTYPE:</div> 82 <input type="text" id="f_doctype" style="width: 200px" /> 83 <br /> 84 <div class="fr">Keywords:</div> 85 <input type="text" id="f_keywords" style="width: 200px" /> 86 <br /> 87 <div class="fr">Description:</div> 88 <input type="text" id="f_description" style="width: 200px" /> 89 <br /> 90 <div class="fr">Primary style-sheet:</div> 91 <input type="text" id="f_base_style" style="width: 200px" /> 92 <br /> 93 <div class="fr">Alternate style-sheet:</div> 94 <input type="text" id="f_alt_style" style="width: 200px" /> 95 <br /> 96 <div class="fr">Background color:</div> 97 <input type="text" id="f_body_bgcolor" size="7" /> 98 <br /> 99 <div class="fr">Text color:</div> 100 <input type="text" id="f_body_fgcolor" size="7" /> 101 <br /> 102 <div class="fr">Character set:</div> 103 <select id="f_charset"> 103 104 <option value=""></option> 104 105 <option value="utf-8">UTF-8 (recommended)</option> … … 107 108 <option value="iso-8859-5">cyrillic (ISO-8859-5)</option> 108 109 <option value="iso-8859-1">western (ISO-8859-1)</option> 109 </select></td> 110 </tr> 111 </table> 112 110 </select> 111 <br /> 112 113 113 <div id="buttons"> 114 114 <button type="button" name="ok" onclick="return onOK();"><span>OK</span></button>
Note: See TracChangeset
for help on using the changeset viewer.