[0] | 1 | <?php |
---|
| 2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
| 3 | # |
---|
| 4 | # This file is part of Dotclear 2. |
---|
| 5 | # |
---|
[1179] | 6 | # Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear |
---|
[0] | 7 | # Licensed under the GPL version 2.0 license. |
---|
| 8 | # See LICENSE file or |
---|
| 9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
| 10 | # |
---|
| 11 | # -- END LICENSE BLOCK ----------------------------------------- |
---|
| 12 | if (!defined('DC_RC_PATH')) { return; } |
---|
| 13 | |
---|
| 14 | define('DC_AUTH_PAGE','auth.php'); |
---|
| 15 | |
---|
| 16 | class dcPage |
---|
| 17 | { |
---|
[342] | 18 | private static $loaded_js=array(); |
---|
| 19 | |
---|
[0] | 20 | # Auth check |
---|
| 21 | public static function check($permissions) |
---|
| 22 | { |
---|
| 23 | global $core; |
---|
[1187] | 24 | |
---|
[0] | 25 | if ($core->blog && $core->auth->check($permissions,$core->blog->id)) |
---|
| 26 | { |
---|
| 27 | return; |
---|
| 28 | } |
---|
[1187] | 29 | |
---|
[0] | 30 | if (session_id()) { |
---|
| 31 | $core->session->destroy(); |
---|
| 32 | } |
---|
| 33 | http::redirect(DC_AUTH_PAGE); |
---|
| 34 | } |
---|
[1187] | 35 | |
---|
[0] | 36 | # Check super admin |
---|
| 37 | public static function checkSuper() |
---|
| 38 | { |
---|
| 39 | global $core; |
---|
[1187] | 40 | |
---|
[0] | 41 | if (!$core->auth->isSuperAdmin()) |
---|
| 42 | { |
---|
| 43 | if (session_id()) { |
---|
| 44 | $core->session->destroy(); |
---|
| 45 | } |
---|
| 46 | http::redirect(DC_AUTH_PAGE); |
---|
| 47 | } |
---|
| 48 | } |
---|
[1187] | 49 | |
---|
[0] | 50 | # Top of admin page |
---|
| 51 | public static function open($title='', $head='') |
---|
| 52 | { |
---|
| 53 | global $core; |
---|
[1144] | 54 | |
---|
[0] | 55 | # List of user's blogs |
---|
| 56 | if ($core->auth->blog_count == 1 || $core->auth->blog_count > 20) |
---|
| 57 | { |
---|
| 58 | $blog_box = |
---|
[999] | 59 | '<p>'.__('Blog:').' <strong title="'.html::escapeHTML($core->blog->url).'">'. |
---|
[0] | 60 | html::escapeHTML($core->blog->name).'</strong>'; |
---|
[1187] | 61 | |
---|
[0] | 62 | if ($core->auth->blog_count > 20) { |
---|
| 63 | $blog_box .= ' - <a href="blogs.php">'.__('Change blog').'</a>'; |
---|
| 64 | } |
---|
[999] | 65 | $blog_box .= '</p>'; |
---|
[0] | 66 | } |
---|
| 67 | else |
---|
| 68 | { |
---|
| 69 | $rs_blogs = $core->getBlogs(array('order'=>'LOWER(blog_name)','limit'=>20)); |
---|
| 70 | $blogs = array(); |
---|
| 71 | while ($rs_blogs->fetch()) { |
---|
| 72 | $blogs[html::escapeHTML($rs_blogs->blog_name.' - '.$rs_blogs->blog_url)] = $rs_blogs->blog_id; |
---|
| 73 | } |
---|
| 74 | $blog_box = |
---|
[999] | 75 | '<p><label for="switchblog" class="classic">'. |
---|
[0] | 76 | __('Blogs:').' '. |
---|
| 77 | $core->formNonce(). |
---|
[454] | 78 | form::combo('switchblog',$blogs,$core->blog->id). |
---|
[999] | 79 | '</label></p>'. |
---|
| 80 | '<noscript><p><input type="submit" value="'.__('ok').'" /></p></noscript>'; |
---|
[0] | 81 | } |
---|
[1187] | 82 | |
---|
[36] | 83 | $safe_mode = isset($_SESSION['sess_safe_mode']) && $_SESSION['sess_safe_mode']; |
---|
[1187] | 84 | |
---|
[0] | 85 | # Display |
---|
| 86 | header('Content-Type: text/html; charset=UTF-8'); |
---|
| 87 | echo |
---|
| 88 | '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '. |
---|
| 89 | ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n". |
---|
| 90 | '<html xmlns="http://www.w3.org/1999/xhtml" '. |
---|
| 91 | 'xml:lang="'.$core->auth->getInfo('user_lang').'" '. |
---|
| 92 | 'lang="'.$core->auth->getInfo('user_lang').'">'."\n". |
---|
| 93 | "<head>\n". |
---|
| 94 | ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'."\n". |
---|
| 95 | ' <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />'."\n". |
---|
| 96 | ' <meta name="GOOGLEBOT" content="NOSNIPPET" />'."\n". |
---|
[1307] | 97 | ' <meta name="viewport" content="initial-scale=1.0" />'."\n". |
---|
[1308] | 98 | ' <title>'.$title.' - '.html::escapeHTML($core->blog->name).' - '.html::escapeHTML(DC_VENDOR_NAME).' - '.DC_VERSION.'</title>'."\n". |
---|
| 99 | |
---|
[1187] | 100 | |
---|
[0] | 101 | self::jsLoadIE7(). |
---|
[1187] | 102 | ' <link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n"; |
---|
[0] | 103 | if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') { |
---|
[473] | 104 | echo |
---|
[1187] | 105 | ' <link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n"; |
---|
[0] | 106 | } |
---|
[237] | 107 | |
---|
[244] | 108 | $core->auth->user_prefs->addWorkspace('interface'); |
---|
| 109 | $user_ui_hide_std_favicon = $core->auth->user_prefs->interface->hide_std_favicon; |
---|
| 110 | if (!$user_ui_hide_std_favicon) { |
---|
| 111 | echo '<link rel="icon" type="image/png" href="images/favicon.png" />'; |
---|
| 112 | } |
---|
[1187] | 113 | |
---|
[0] | 114 | echo |
---|
| 115 | self::jsCommon(). |
---|
| 116 | $head; |
---|
[1187] | 117 | |
---|
[0] | 118 | # --BEHAVIOR-- adminPageHTMLHead |
---|
| 119 | $core->callBehavior('adminPageHTMLHead'); |
---|
[1187] | 120 | |
---|
[0] | 121 | echo |
---|
| 122 | "</head>\n". |
---|
[36] | 123 | '<body id="dotclear-admin'. |
---|
| 124 | ($safe_mode ? ' safe-mode' : ''). |
---|
| 125 | '">'."\n". |
---|
[1187] | 126 | |
---|
[647] | 127 | '<div id="header">'. |
---|
[812] | 128 | '<ul id="prelude"><li><a href="#content">'.__('Go to the content').'</a></li><li><a href="#main-menu">'.__('Go to the menu').'</a></li></ul>'."\n". |
---|
[1187] | 129 | '<div id="top"><h1><a href="index.php">'.DC_VENDOR_NAME.'</a></h1></div>'."\n"; |
---|
| 130 | |
---|
[0] | 131 | echo |
---|
[489] | 132 | '<div id="info-boxes">'. |
---|
| 133 | '<div id="info-box1">'. |
---|
| 134 | '<form action="index.php" method="post">'. |
---|
[0] | 135 | $blog_box. |
---|
[999] | 136 | '<p><a href="'.$core->blog->url.'" onclick="window.open(this.href);return false;" title="'.__('Go to site').' ('.__('new window').')'.'">'.__('Go to site').' <img src="images/outgoing.png" alt="" /></a>'. |
---|
| 137 | '</p></form>'. |
---|
[3] | 138 | '</div>'. |
---|
[489] | 139 | '<div id="info-box2">'. |
---|
[1307] | 140 | '<a class=" nomobile"'.(preg_match('/index.php$/',$_SERVER['REQUEST_URI']) ? ' class="active"' : '').' href="index.php">'.__('My dashboard').'</a>'. |
---|
| 141 | '<span class="nomobile"> | </span><a class=" nomobile"'.(preg_match('/preferences.php(\?.*)?$/',$_SERVER['REQUEST_URI']) ? ' class="active nomobile"' : '').' href="preferences.php">'.__('My preferences').'</a>'. |
---|
| 142 | '<span class="nomobile"> | </span><a href="index.php?logout=1" class="logout">'.sprintf(__('Logout %s'),$core->auth->userID()).' <img src="images/logout.png" alt="" /></a>'. |
---|
[489] | 143 | '</div>'. |
---|
[118] | 144 | '</div>'. |
---|
[0] | 145 | '</div>'; |
---|
[1187] | 146 | |
---|
[0] | 147 | echo |
---|
| 148 | '<div id="wrapper">'."\n". |
---|
| 149 | '<div id="main">'."\n". |
---|
| 150 | '<div id="content">'."\n"; |
---|
[1187] | 151 | |
---|
[36] | 152 | # Safe mode |
---|
| 153 | if ($safe_mode) |
---|
[0] | 154 | { |
---|
| 155 | echo |
---|
[36] | 156 | '<div class="error"><h3>'.__('Safe mode').'</h3>'. |
---|
[37] | 157 | '<p>'.__('You are in safe mode. All plugins have been temporarily disabled. Remind to log out then log in again normally to get back all functionalities').'</p>'. |
---|
[0] | 158 | '</div>'; |
---|
| 159 | } |
---|
[1187] | 160 | |
---|
[0] | 161 | if ($core->error->flag()) { |
---|
| 162 | echo |
---|
[973] | 163 | '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</p></strong>'. |
---|
[0] | 164 | $core->error->toHTML(). |
---|
| 165 | '</div>'; |
---|
| 166 | } |
---|
| 167 | } |
---|
[1187] | 168 | |
---|
[0] | 169 | public static function close() |
---|
| 170 | { |
---|
[942] | 171 | global $core; |
---|
| 172 | |
---|
[0] | 173 | $menu =& $GLOBALS['_menu']; |
---|
[1187] | 174 | |
---|
[0] | 175 | echo |
---|
| 176 | "</div>\n". // End of #content |
---|
| 177 | "</div>\n". // End of #main |
---|
[1187] | 178 | |
---|
[0] | 179 | '<div id="main-menu">'."\n"; |
---|
[1187] | 180 | |
---|
[0] | 181 | foreach ($menu as $k => $v) { |
---|
| 182 | echo $menu[$k]->draw(); |
---|
| 183 | } |
---|
[1187] | 184 | |
---|
[1140] | 185 | $text = sprintf(__('Thank you for using %s.'),'Dotclear '.DC_VERSION); |
---|
[942] | 186 | |
---|
| 187 | # --BEHAVIOR-- adminPageFooter |
---|
[946] | 188 | $textAlt = $core->callBehavior('adminPageFooter',$core,$text); |
---|
[1140] | 189 | if ($textAlt != '') { |
---|
| 190 | $text = $textAlt; |
---|
| 191 | } |
---|
[1142] | 192 | $text = html::escapeHTML($text); |
---|
[942] | 193 | |
---|
[0] | 194 | echo |
---|
| 195 | '</div>'."\n". // End of #main-menu |
---|
[1140] | 196 | '<div id="footer"><a href="http://dotclear.org/" title="'.$text.'"><img src="style/dc_logo_footer.png" alt="'.$text.'" /></a></div>'."\n". |
---|
[0] | 197 | "</div>\n"; // End of #wrapper |
---|
[1187] | 198 | |
---|
[0] | 199 | if (defined('DC_DEV') && DC_DEV === true) { |
---|
| 200 | echo self::debugInfo(); |
---|
| 201 | } |
---|
[1187] | 202 | |
---|
[0] | 203 | echo |
---|
| 204 | '</body></html>'; |
---|
| 205 | } |
---|
[1187] | 206 | |
---|
[0] | 207 | public static function openPopup($title='', $head='') |
---|
| 208 | { |
---|
| 209 | global $core; |
---|
[1187] | 210 | |
---|
[0] | 211 | # Display |
---|
| 212 | header('Content-Type: text/html; charset=UTF-8'); |
---|
| 213 | echo |
---|
| 214 | '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '. |
---|
| 215 | ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n". |
---|
| 216 | '<html xmlns="http://www.w3.org/1999/xhtml" '. |
---|
| 217 | 'xml:lang="'.$core->auth->getInfo('user_lang').'" '. |
---|
| 218 | 'lang="'.$core->auth->getInfo('user_lang').'">'."\n". |
---|
| 219 | "<head>\n". |
---|
| 220 | ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'."\n". |
---|
| 221 | ' <title>'.$title.' - '.html::escapeHTML($core->blog->name).' - '.html::escapeHTML(DC_VENDOR_NAME).' - '.DC_VERSION.'</title>'."\n". |
---|
[1187] | 222 | |
---|
[0] | 223 | ' <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />'."\n". |
---|
| 224 | ' <meta name="GOOGLEBOT" content="NOSNIPPET" />'."\n". |
---|
[1187] | 225 | |
---|
[0] | 226 | self::jsLoadIE7(). |
---|
[1187] | 227 | ' <link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n"; |
---|
[0] | 228 | if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') { |
---|
[473] | 229 | echo |
---|
[1187] | 230 | ' <link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n"; |
---|
[0] | 231 | } |
---|
[1187] | 232 | |
---|
[0] | 233 | echo |
---|
| 234 | self::jsCommon(). |
---|
| 235 | $head; |
---|
[1187] | 236 | |
---|
[0] | 237 | # --BEHAVIOR-- adminPageHTMLHead |
---|
| 238 | $core->callBehavior('adminPageHTMLHead'); |
---|
[1187] | 239 | |
---|
[0] | 240 | echo |
---|
| 241 | "</head>\n". |
---|
| 242 | '<body id="dotclear-admin" class="popup">'."\n". |
---|
[1187] | 243 | |
---|
[0] | 244 | '<div id="top"><h1>'.DC_VENDOR_NAME.'</h1></div>'."\n"; |
---|
[1187] | 245 | |
---|
[0] | 246 | echo |
---|
| 247 | '<div id="wrapper">'."\n". |
---|
| 248 | '<div id="main">'."\n". |
---|
| 249 | '<div id="content">'."\n"; |
---|
[1187] | 250 | |
---|
[0] | 251 | if ($core->error->flag()) { |
---|
| 252 | echo |
---|
| 253 | '<div class="error"><strong>'.__('Errors:').'</strong>'. |
---|
| 254 | $core->error->toHTML(). |
---|
| 255 | '</div>'; |
---|
| 256 | } |
---|
| 257 | } |
---|
[1187] | 258 | |
---|
[0] | 259 | public static function closePopup() |
---|
| 260 | { |
---|
| 261 | echo |
---|
| 262 | "</div>\n". // End of #content |
---|
| 263 | "</div>\n". // End of #main |
---|
| 264 | '<div id="footer"><p> </p></div>'."\n". |
---|
| 265 | "</div>\n". // End of #wrapper |
---|
| 266 | '</body></html>'; |
---|
| 267 | } |
---|
[907] | 268 | |
---|
| 269 | public static function message($msg,$timestamp=true,$div=false,$echo=true) |
---|
| 270 | { |
---|
[910] | 271 | global $core; |
---|
[1187] | 272 | |
---|
[907] | 273 | $res = ''; |
---|
| 274 | if ($msg != '') { |
---|
| 275 | $res = ($div ? '<div class="message">' : '').'<p'.($div ? '' : ' class="message"').'>'. |
---|
[1161] | 276 | ($timestamp ? dt::str(__('%H:%M:%S:'),null,$core->auth->getInfo('user_tz')).' ' : '').$msg. |
---|
| 277 | '</p>'.($div ? '</div>' : ''); |
---|
[907] | 278 | if ($echo) { |
---|
| 279 | echo $res; |
---|
| 280 | } |
---|
| 281 | } |
---|
| 282 | return $res; |
---|
| 283 | } |
---|
[1187] | 284 | |
---|
[0] | 285 | private static function debugInfo() |
---|
| 286 | { |
---|
| 287 | $global_vars = implode(', ',array_keys($GLOBALS)); |
---|
[1187] | 288 | |
---|
[0] | 289 | $res = |
---|
| 290 | '<div id="debug"><div>'. |
---|
| 291 | '<p>memory usage: '.memory_get_usage().' ('.files::size(memory_get_usage()).')</p>'; |
---|
[1187] | 292 | |
---|
[0] | 293 | if (function_exists('xdebug_get_profiler_filename')) |
---|
| 294 | { |
---|
| 295 | $res .= '<p>Elapsed time: '.xdebug_time_index().' seconds</p>'; |
---|
[1187] | 296 | |
---|
[0] | 297 | $prof_file = xdebug_get_profiler_filename(); |
---|
| 298 | if ($prof_file) { |
---|
| 299 | $res .= '<p>Profiler file : '.xdebug_get_profiler_filename().'</p>'; |
---|
| 300 | } else { |
---|
| 301 | $prof_url = http::getSelfURI(); |
---|
[321] | 302 | $prof_url .= (strpos($prof_url,'?') === false) ? '?' : '&'; |
---|
[0] | 303 | $prof_url .= 'XDEBUG_PROFILE'; |
---|
[321] | 304 | $res .= '<p><a href="'.html::escapeURL($prof_url).'">Trigger profiler</a></p>'; |
---|
[0] | 305 | } |
---|
[1187] | 306 | |
---|
[0] | 307 | /* xdebug configuration: |
---|
| 308 | zend_extension = /.../xdebug.so |
---|
| 309 | xdebug.auto_trace = On |
---|
| 310 | xdebug.trace_format = 0 |
---|
| 311 | xdebug.trace_options = 1 |
---|
| 312 | xdebug.show_mem_delta = On |
---|
| 313 | xdebug.profiler_enable = 0 |
---|
| 314 | xdebug.profiler_enable_trigger = 1 |
---|
| 315 | xdebug.profiler_output_dir = /tmp |
---|
| 316 | xdebug.profiler_append = 0 |
---|
| 317 | xdebug.profiler_output_name = timestamp |
---|
| 318 | */ |
---|
| 319 | } |
---|
[1187] | 320 | |
---|
[0] | 321 | $res .= |
---|
| 322 | '<p>Global vars: '.$global_vars.'</p>'. |
---|
| 323 | '</div></div>'; |
---|
[1187] | 324 | |
---|
[0] | 325 | return $res; |
---|
| 326 | } |
---|
[1187] | 327 | |
---|
[0] | 328 | public static function help($page,$index='') |
---|
| 329 | { |
---|
| 330 | # Deprecated but we keep this for plugins. |
---|
| 331 | } |
---|
[1187] | 332 | |
---|
[0] | 333 | public static function helpBlock() |
---|
| 334 | { |
---|
| 335 | $args = func_get_args(); |
---|
| 336 | if (empty($args)) { |
---|
| 337 | return; |
---|
| 338 | }; |
---|
[1187] | 339 | |
---|
[0] | 340 | global $__resources; |
---|
| 341 | if (empty($__resources['help'])) { |
---|
| 342 | return; |
---|
| 343 | } |
---|
[1187] | 344 | |
---|
[0] | 345 | $content = ''; |
---|
| 346 | foreach ($args as $v) |
---|
| 347 | { |
---|
| 348 | if (is_object($v) && isset($v->content)) { |
---|
| 349 | $content .= $v->content; |
---|
| 350 | continue; |
---|
| 351 | } |
---|
[1187] | 352 | |
---|
[0] | 353 | if (!isset($__resources['help'][$v])) { |
---|
| 354 | continue; |
---|
| 355 | } |
---|
| 356 | $f = $__resources['help'][$v]; |
---|
| 357 | if (!file_exists($f) || !is_readable($f)) { |
---|
| 358 | continue; |
---|
| 359 | } |
---|
[1187] | 360 | |
---|
[0] | 361 | $fc = file_get_contents($f); |
---|
| 362 | if (preg_match('|<body[^>]*?>(.*?)</body>|ms',$fc,$matches)) { |
---|
| 363 | $content .= $matches[1]; |
---|
| 364 | } else { |
---|
| 365 | $content .= $fc; |
---|
| 366 | } |
---|
| 367 | } |
---|
[1187] | 368 | |
---|
[0] | 369 | if (trim($content) == '') { |
---|
| 370 | return; |
---|
| 371 | } |
---|
[1187] | 372 | |
---|
[0] | 373 | echo |
---|
[3] | 374 | '<div id="help"><hr /><div class="help-content clear"><h2>'.__('Help').'</h2>'. |
---|
[0] | 375 | $content. |
---|
| 376 | '</div></div>'; |
---|
| 377 | } |
---|
[1187] | 378 | |
---|
[0] | 379 | public static function jsLoad($src) |
---|
| 380 | { |
---|
[342] | 381 | $escaped_src = html::escapeHTML($src); |
---|
| 382 | if (!isset(self::$loaded_js[$escaped_src])) { |
---|
| 383 | self::$loaded_js[$escaped_src]=true; |
---|
| 384 | return '<script type="text/javascript" src="'.$escaped_src.'"></script>'."\n"; |
---|
| 385 | } |
---|
[0] | 386 | } |
---|
[1187] | 387 | |
---|
[0] | 388 | public static function jsVar($n,$v) |
---|
| 389 | { |
---|
| 390 | return $n." = '".html::escapeJS($v)."';\n"; |
---|
| 391 | } |
---|
[1187] | 392 | |
---|
[0] | 393 | public static function jsCommon() |
---|
| 394 | { |
---|
| 395 | return |
---|
| 396 | self::jsLoad('js/jquery/jquery.js'). |
---|
| 397 | self::jsLoad('js/jquery/jquery.biscuit.js'). |
---|
| 398 | self::jsLoad('js/jquery/jquery.bgFade.js'). |
---|
| 399 | self::jsLoad('js/common.js'). |
---|
[447] | 400 | self::jsLoad('js/prelude.js'). |
---|
[1187] | 401 | |
---|
[0] | 402 | '<script type="text/javascript">'."\n". |
---|
| 403 | "//<![CDATA[\n". |
---|
| 404 | self::jsVar('dotclear.nonce',$GLOBALS['core']->getNonce()). |
---|
[1187] | 405 | |
---|
[1019] | 406 | self::jsVar('dotclear.img_plus_src','images/expand.png'). |
---|
[0] | 407 | self::jsVar('dotclear.img_plus_alt',__('uncover')). |
---|
[1019] | 408 | self::jsVar('dotclear.img_minus_src','images/hide.png'). |
---|
[0] | 409 | self::jsVar('dotclear.img_minus_alt',__('hide')). |
---|
| 410 | self::jsVar('dotclear.img_menu_on','images/menu_on.png'). |
---|
| 411 | self::jsVar('dotclear.img_menu_off','images/menu_off.png'). |
---|
[1187] | 412 | |
---|
[0] | 413 | self::jsVar('dotclear.msg.help', |
---|
[1302] | 414 | __('Help about this page')). |
---|
| 415 | self::jsVar('dotclear.msg.help_hide', |
---|
| 416 | __('Hide')). |
---|
[0] | 417 | self::jsVar('dotclear.msg.no_selection', |
---|
| 418 | __('no selection')). |
---|
| 419 | self::jsVar('dotclear.msg.select_all', |
---|
| 420 | __('select all')). |
---|
| 421 | self::jsVar('dotclear.msg.invert_sel', |
---|
| 422 | __('invert selection')). |
---|
| 423 | self::jsVar('dotclear.msg.website', |
---|
| 424 | __('Web site:')). |
---|
| 425 | self::jsVar('dotclear.msg.email', |
---|
| 426 | __('Email:')). |
---|
| 427 | self::jsVar('dotclear.msg.ip_address', |
---|
| 428 | __('IP address:')). |
---|
| 429 | self::jsVar('dotclear.msg.error', |
---|
| 430 | __('Error:')). |
---|
| 431 | self::jsVar('dotclear.msg.entry_created', |
---|
| 432 | __('Entry has been successfully created.')). |
---|
| 433 | self::jsVar('dotclear.msg.edit_entry', |
---|
| 434 | __('Edit entry')). |
---|
| 435 | self::jsVar('dotclear.msg.view_entry', |
---|
| 436 | __('view entry')). |
---|
| 437 | self::jsVar('dotclear.msg.confirm_delete_posts', |
---|
| 438 | __("Are you sure you want to delete selected entries (%s)?")). |
---|
| 439 | self::jsVar('dotclear.msg.confirm_delete_post', |
---|
| 440 | __("Are you sure you want to delete this entry?")). |
---|
[1049] | 441 | self::jsVar('dotclear.msg.confirm_spam_delete', |
---|
| 442 | __('Are you sure you want to delete all spams?')). |
---|
[0] | 443 | self::jsVar('dotclear.msg.confirm_delete_comments', |
---|
| 444 | __('Are you sure you want to delete selected comments (%s)?')). |
---|
| 445 | self::jsVar('dotclear.msg.confirm_delete_comment', |
---|
| 446 | __('Are you sure you want to delete this comment?')). |
---|
| 447 | self::jsVar('dotclear.msg.cannot_delete_users', |
---|
| 448 | __('Users with posts cannot be deleted.')). |
---|
| 449 | self::jsVar('dotclear.msg.confirm_delete_user', |
---|
| 450 | __('Are you sure you want to delete selected users (%s)?')). |
---|
| 451 | self::jsVar('dotclear.msg.confirm_delete_category', |
---|
| 452 | __('Are you sure you want to delete category "%s"?')). |
---|
| 453 | self::jsVar('dotclear.msg.confirm_reorder_categories', |
---|
| 454 | __('Are you sure you want to reorder all categories?')). |
---|
| 455 | self::jsVar('dotclear.msg.confirm_delete_media', |
---|
| 456 | __('Are you sure you want to remove media "%s"?')). |
---|
| 457 | self::jsVar('dotclear.msg.confirm_extract_current', |
---|
| 458 | __('Are you sure you want to extract archive in current directory?')). |
---|
| 459 | self::jsVar('dotclear.msg.confirm_remove_attachment', |
---|
| 460 | __('Are you sure you want to remove attachment "%s"?')). |
---|
| 461 | self::jsVar('dotclear.msg.confirm_delete_lang', |
---|
| 462 | __('Are you sure you want to delete "%s" language?')). |
---|
| 463 | self::jsVar('dotclear.msg.confirm_delete_plugin', |
---|
| 464 | __('Are you sure you want to delete "%s" plugin?')). |
---|
| 465 | self::jsVar('dotclear.msg.use_this_theme', |
---|
| 466 | __('Use this theme')). |
---|
| 467 | self::jsVar('dotclear.msg.remove_this_theme', |
---|
| 468 | __('Remove this theme')). |
---|
| 469 | self::jsVar('dotclear.msg.confirm_delete_theme', |
---|
| 470 | __('Are you sure you want to delete "%s" theme?')). |
---|
| 471 | self::jsVar('dotclear.msg.zip_file_content', |
---|
| 472 | __('Zip file content')). |
---|
| 473 | self::jsVar('dotclear.msg.xhtml_validator', |
---|
| 474 | __('XHTML markup validator')). |
---|
| 475 | self::jsVar('dotclear.msg.xhtml_valid', |
---|
| 476 | __('XHTML content is valid.')). |
---|
| 477 | self::jsVar('dotclear.msg.xhtml_not_valid', |
---|
| 478 | __('There are XHTML markup errors.')). |
---|
| 479 | self::jsVar('dotclear.msg.confirm_change_post_format', |
---|
| 480 | __('You have unsaved changes. Switch post format will loose these changes. Proceed anyway?')). |
---|
[224] | 481 | self::jsVar('dotclear.msg.load_enhanced_uploader', |
---|
| 482 | __('Loading enhanced uploader, please wait.')). |
---|
[0] | 483 | "\n//]]>\n". |
---|
| 484 | "</script>\n"; |
---|
| 485 | } |
---|
[1187] | 486 | |
---|
[0] | 487 | public static function jsLoadIE7() |
---|
| 488 | { |
---|
| 489 | return |
---|
| 490 | '<!--[if lt IE 8]>'."\n". |
---|
| 491 | self::jsLoad('js/ie7/IE8.js'). |
---|
| 492 | '<link rel="stylesheet" type="text/css" href="style/iesucks.css" />'."\n". |
---|
| 493 | '<![endif]-->'."\n"; |
---|
| 494 | } |
---|
[1187] | 495 | |
---|
[0] | 496 | public static function jsConfirmClose() |
---|
| 497 | { |
---|
| 498 | $args = func_get_args(); |
---|
| 499 | if (count($args) > 0) { |
---|
| 500 | foreach ($args as $k => $v) { |
---|
| 501 | $args[$k] = "'".html::escapeJS($v)."'"; |
---|
| 502 | } |
---|
| 503 | $args = implode(',',$args); |
---|
| 504 | } else { |
---|
| 505 | $args = ''; |
---|
| 506 | } |
---|
[1187] | 507 | |
---|
[0] | 508 | return |
---|
| 509 | self::jsLoad('js/confirm-close.js'). |
---|
| 510 | '<script type="text/javascript">'."\n". |
---|
| 511 | "//<![CDATA[\n". |
---|
| 512 | "confirmClosePage = new confirmClose(".$args."); ". |
---|
| 513 | "confirmClose.prototype.prompt = '".html::escapeJS(__('You have unsaved changes.'))."'; ". |
---|
| 514 | "\n//]]>\n". |
---|
| 515 | "</script>\n"; |
---|
| 516 | } |
---|
[1187] | 517 | |
---|
[0] | 518 | public static function jsPageTabs($default=null) |
---|
| 519 | { |
---|
| 520 | if ($default) { |
---|
| 521 | $default = "'".html::escapeJS($default)."'"; |
---|
| 522 | } |
---|
[1187] | 523 | |
---|
[0] | 524 | return |
---|
| 525 | self::jsLoad('js/jquery/jquery.pageTabs.js'). |
---|
| 526 | '<script type="text/javascript">'."\n". |
---|
| 527 | "//<![CDATA[\n". |
---|
| 528 | "\$(function() {\n". |
---|
[1161] | 529 | " \$.pageTabs(".$default.");\n". |
---|
| 530 | "});\n". |
---|
| 531 | "\n//]]>\n". |
---|
| 532 | "</script>\n"; |
---|
| 533 | } |
---|
| 534 | |
---|
| 535 | public static function jsModal() |
---|
| 536 | { |
---|
| 537 | return |
---|
| 538 | '<link rel="stylesheet" type="text/css" href="style/modal/modal.css" />'."\n". |
---|
| 539 | self::jsLoad('js/jquery/jquery.modal.js'). |
---|
| 540 | '<script type="text/javascript">'."\n". |
---|
| 541 | "//<![CDATA[\n". |
---|
| 542 | self::jsVar('$.modal.prototype.params.loader_img','style/modal/loader.gif'). |
---|
| 543 | self::jsVar('$.modal.prototype.params.close_img','style/modal/close.png'). |
---|
| 544 | "\n//]]>\n". |
---|
| 545 | "</script>\n"; |
---|
| 546 | } |
---|
| 547 | |
---|
| 548 | public static function jsColorPicker() |
---|
| 549 | { |
---|
| 550 | return |
---|
| 551 | '<link rel="stylesheet" type="text/css" href="style/farbtastic/farbtastic.css" />'."\n". |
---|
| 552 | self::jsLoad('js/jquery/jquery.farbtastic.js'). |
---|
| 553 | self::jsLoad('js/color-picker.js'); |
---|
| 554 | } |
---|
| 555 | |
---|
| 556 | public static function jsDatePicker() |
---|
| 557 | { |
---|
| 558 | return |
---|
| 559 | '<link rel="stylesheet" type="text/css" href="style/date-picker.css" />'."\n". |
---|
| 560 | self::jsLoad('js/date-picker.js'). |
---|
| 561 | '<script type="text/javascript">'."\n". |
---|
| 562 | "//<![CDATA[\n". |
---|
[1187] | 563 | |
---|
[1161] | 564 | "datePicker.prototype.months[0] = '".html::escapeJS(__('January'))."'; ". |
---|
| 565 | "datePicker.prototype.months[1] = '".html::escapeJS(__('February'))."'; ". |
---|
| 566 | "datePicker.prototype.months[2] = '".html::escapeJS(__('March'))."'; ". |
---|
| 567 | "datePicker.prototype.months[3] = '".html::escapeJS(__('April'))."'; ". |
---|
| 568 | "datePicker.prototype.months[4] = '".html::escapeJS(__('May'))."'; ". |
---|
| 569 | "datePicker.prototype.months[5] = '".html::escapeJS(__('June'))."'; ". |
---|
| 570 | "datePicker.prototype.months[6] = '".html::escapeJS(__('July'))."'; ". |
---|
| 571 | "datePicker.prototype.months[7] = '".html::escapeJS(__('August'))."'; ". |
---|
| 572 | "datePicker.prototype.months[8] = '".html::escapeJS(__('September'))."'; ". |
---|
| 573 | "datePicker.prototype.months[9] = '".html::escapeJS(__('October'))."'; ". |
---|
| 574 | "datePicker.prototype.months[10] = '".html::escapeJS(__('November'))."'; ". |
---|
| 575 | "datePicker.prototype.months[11] = '".html::escapeJS(__('December'))."'; ". |
---|
[1187] | 576 | |
---|
[1161] | 577 | "datePicker.prototype.days[0] = '".html::escapeJS(__('Monday'))."'; ". |
---|
| 578 | "datePicker.prototype.days[1] = '".html::escapeJS(__('Tuesday'))."'; ". |
---|
| 579 | "datePicker.prototype.days[2] = '".html::escapeJS(__('Wednesday'))."'; ". |
---|
| 580 | "datePicker.prototype.days[3] = '".html::escapeJS(__('Thursday'))."'; ". |
---|
| 581 | "datePicker.prototype.days[4] = '".html::escapeJS(__('Friday'))."'; ". |
---|
| 582 | "datePicker.prototype.days[5] = '".html::escapeJS(__('Saturday'))."'; ". |
---|
| 583 | "datePicker.prototype.days[6] = '".html::escapeJS(__('Sunday'))."'; ". |
---|
[1187] | 584 | |
---|
[1161] | 585 | "datePicker.prototype.img_src = 'images/date-picker.png'; ". |
---|
[1187] | 586 | |
---|
[1161] | 587 | "datePicker.prototype.close_msg = '".html::escapeJS(__('close'))."'; ". |
---|
| 588 | "datePicker.prototype.now_msg = '".html::escapeJS(__('now'))."'; ". |
---|
[1187] | 589 | |
---|
[1161] | 590 | "\n//]]>\n". |
---|
| 591 | "</script>\n"; |
---|
| 592 | } |
---|
| 593 | |
---|
| 594 | public static function jsToolBar() |
---|
| 595 | { |
---|
| 596 | $res = |
---|
| 597 | '<link rel="stylesheet" type="text/css" href="style/jsToolBar/jsToolBar.css" />'. |
---|
| 598 | '<script type="text/javascript" src="js/jsToolBar/jsToolBar.js"></script>'; |
---|
[1187] | 599 | |
---|
[1161] | 600 | if (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('enable_wysiwyg')) { |
---|
| 601 | $res .= '<script type="text/javascript" src="js/jsToolBar/jsToolBar.wysiwyg.js"></script>'; |
---|
[0] | 602 | } |
---|
[1187] | 603 | |
---|
[1161] | 604 | $res .= |
---|
| 605 | '<script type="text/javascript" src="js/jsToolBar/jsToolBar.dotclear.js"></script>'. |
---|
| 606 | '<script type="text/javascript">'."\n". |
---|
| 607 | "//<![CDATA[\n". |
---|
| 608 | "jsToolBar.prototype.dialog_url = 'popup.php'; ". |
---|
| 609 | "jsToolBar.prototype.iframe_css = '". |
---|
| 610 | 'body{'. |
---|
| 611 | 'font: 12px "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;'. |
---|
| 612 | 'color : #000;'. |
---|
| 613 | 'background: #f9f9f9;'. |
---|
| 614 | 'margin: 0;'. |
---|
| 615 | 'padding : 2px;'. |
---|
| 616 | 'border: none;'. |
---|
| 617 | (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl' ? 'direction:rtl;' : ''). |
---|
| 618 | '}'. |
---|
| 619 | 'pre, code, kbd, samp {'. |
---|
| 620 | 'font-family:"Courier New",Courier,monospace;'. |
---|
| 621 | 'font-size : 1.1em;'. |
---|
| 622 | '}'. |
---|
| 623 | 'code {'. |
---|
| 624 | 'color : #666;'. |
---|
| 625 | 'font-weight : bold;'. |
---|
| 626 | '}'. |
---|
| 627 | 'body > p:first-child {'. |
---|
| 628 | 'margin-top: 0;'. |
---|
| 629 | '}'. |
---|
| 630 | "'; ". |
---|
| 631 | "jsToolBar.prototype.base_url = '".html::escapeJS($GLOBALS['core']->blog->host)."'; ". |
---|
| 632 | "jsToolBar.prototype.switcher_visual_title = '".html::escapeJS(__('visual'))."'; ". |
---|
| 633 | "jsToolBar.prototype.switcher_source_title = '".html::escapeJS(__('source'))."'; ". |
---|
| 634 | "jsToolBar.prototype.legend_msg = '". |
---|
| 635 | html::escapeJS(__('You can use the following shortcuts to format your text.'))."'; ". |
---|
| 636 | "jsToolBar.prototype.elements.blocks.options.none = '".html::escapeJS(__('-- none --'))."'; ". |
---|
| 637 | "jsToolBar.prototype.elements.blocks.options.nonebis = '".html::escapeJS(__('-- block format --'))."'; ". |
---|
| 638 | "jsToolBar.prototype.elements.blocks.options.p = '".html::escapeJS(__('Paragraph'))."'; ". |
---|
| 639 | "jsToolBar.prototype.elements.blocks.options.h1 = '".html::escapeJS(__('Level 1 header'))."'; ". |
---|
| 640 | "jsToolBar.prototype.elements.blocks.options.h2 = '".html::escapeJS(__('Level 2 header'))."'; ". |
---|
| 641 | "jsToolBar.prototype.elements.blocks.options.h3 = '".html::escapeJS(__('Level 3 header'))."'; ". |
---|
| 642 | "jsToolBar.prototype.elements.blocks.options.h4 = '".html::escapeJS(__('Level 4 header'))."'; ". |
---|
| 643 | "jsToolBar.prototype.elements.blocks.options.h5 = '".html::escapeJS(__('Level 5 header'))."'; ". |
---|
| 644 | "jsToolBar.prototype.elements.blocks.options.h6 = '".html::escapeJS(__('Level 6 header'))."'; ". |
---|
| 645 | "jsToolBar.prototype.elements.strong.title = '".html::escapeJS(__('Strong emphasis'))."'; ". |
---|
| 646 | "jsToolBar.prototype.elements.em.title = '".html::escapeJS(__('Emphasis'))."'; ". |
---|
| 647 | "jsToolBar.prototype.elements.ins.title = '".html::escapeJS(__('Inserted'))."'; ". |
---|
| 648 | "jsToolBar.prototype.elements.del.title = '".html::escapeJS(__('Deleted'))."'; ". |
---|
| 649 | "jsToolBar.prototype.elements.quote.title = '".html::escapeJS(__('Inline quote'))."'; ". |
---|
| 650 | "jsToolBar.prototype.elements.code.title = '".html::escapeJS(__('Code'))."'; ". |
---|
| 651 | "jsToolBar.prototype.elements.br.title = '".html::escapeJS(__('Line break'))."'; ". |
---|
| 652 | "jsToolBar.prototype.elements.blockquote.title = '".html::escapeJS(__('Blockquote'))."'; ". |
---|
| 653 | "jsToolBar.prototype.elements.pre.title = '".html::escapeJS(__('Preformated text'))."'; ". |
---|
| 654 | "jsToolBar.prototype.elements.ul.title = '".html::escapeJS(__('Unordered list'))."'; ". |
---|
| 655 | "jsToolBar.prototype.elements.ol.title = '".html::escapeJS(__('Ordered list'))."'; ". |
---|
[1187] | 656 | |
---|
[1161] | 657 | "jsToolBar.prototype.elements.link.title = '".html::escapeJS(__('Link'))."'; ". |
---|
| 658 | "jsToolBar.prototype.elements.link.href_prompt = '".html::escapeJS(__('URL?'))."'; ". |
---|
| 659 | "jsToolBar.prototype.elements.link.hreflang_prompt = '".html::escapeJS(__('Language?'))."'; ". |
---|
[1187] | 660 | |
---|
[1161] | 661 | "jsToolBar.prototype.elements.img.title = '".html::escapeJS(__('External image'))."'; ". |
---|
| 662 | "jsToolBar.prototype.elements.img.src_prompt = '".html::escapeJS(__('URL?'))."'; ". |
---|
[1187] | 663 | |
---|
[1161] | 664 | "jsToolBar.prototype.elements.img_select.title = '".html::escapeJS(__('Media chooser'))."'; ". |
---|
| 665 | "jsToolBar.prototype.elements.post_link.title = '".html::escapeJS(__('Link to an entry'))."'; "; |
---|
[1187] | 666 | |
---|
[1161] | 667 | if (!$GLOBALS['core']->auth->check('media,media_admin',$GLOBALS['core']->blog->id)) { |
---|
| 668 | $res .= "jsToolBar.prototype.elements.img_select.disabled = true;\n"; |
---|
[0] | 669 | } |
---|
[1187] | 670 | |
---|
[1161] | 671 | $res .= |
---|
| 672 | "\n//]]>\n". |
---|
| 673 | "</script>\n"; |
---|
[1187] | 674 | |
---|
[1161] | 675 | return $res; |
---|
| 676 | } |
---|
| 677 | |
---|
| 678 | public static function jsUpload($params=array(),$base_url=null) |
---|
| 679 | { |
---|
| 680 | if (!$base_url) { |
---|
| 681 | $base_url = path::clean(dirname(preg_replace('/(\?.*$)?/','',$_SERVER['REQUEST_URI']))).'/'; |
---|
[0] | 682 | } |
---|
[1187] | 683 | |
---|
[1161] | 684 | $params = array_merge($params,array( |
---|
| 685 | 'sess_id='.session_id(), |
---|
| 686 | 'sess_uid='.$_SESSION['sess_browser_uid'], |
---|
| 687 | 'xd_check='.$GLOBALS['core']->getNonce() |
---|
| 688 | )); |
---|
[1187] | 689 | |
---|
[1161] | 690 | return |
---|
| 691 | '<link rel="stylesheet" type="text/css" href="style/jsUpload/style.css" />'."\n". |
---|
| 692 | |
---|
| 693 | '<script id="template-upload" type="text/x-tmpl"> |
---|
| 694 | {% for (var i=0, file; file=o.files[i]; i++) { %} |
---|
[1162] | 695 | <div class="template-upload fade"> |
---|
| 696 | <div class="upload-file"> |
---|
| 697 | <div class="upload-fileinfo"> |
---|
| 698 | <span class="upload-filename">{%=file.name%}</span> |
---|
| 699 | <span class="upload-filesize">({%=o.formatFileSize(file.size)%})</span> |
---|
| 700 | <span class="upload-filecancel cancel">'.__('Cancel').'</span> |
---|
| 701 | {% if (!o.files.error && !i && !o.options.autoUpload) { %} |
---|
[1188] | 702 | <input type="submit" class="button start" value="'.__('Send').'"/> |
---|
[1162] | 703 | {% } %} |
---|
| 704 | <span class="upload-filemsg"></span> |
---|
| 705 | </div> |
---|
| 706 | {% if (!o.files.error) { %} |
---|
| 707 | <div class="upload-progress progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div> |
---|
[1161] | 708 | {% } %} |
---|
[1162] | 709 | </div> |
---|
[1161] | 710 | {% } %} |
---|
| 711 | </script> |
---|
| 712 | <!-- The template to display files available for download --> |
---|
| 713 | <script id="template-download" type="text/x-tmpl"> |
---|
| 714 | {% for (var i=0, file; file=o.files[i]; i++) { %} |
---|
[1162] | 715 | <div class="template-download fade"> |
---|
| 716 | <div class="upload-file"> |
---|
| 717 | <div class="upload-fileinfo"> |
---|
| 718 | <span class="upload-filename">{%=file.name%}</span> |
---|
| 719 | <span class="upload-filesize">({%=o.formatFileSize(file.size)%})</span> |
---|
| 720 | <span class="upload-filemsg{% if (file.error) { %} upload-error{% } %}"> |
---|
| 721 | {% if (file.error) { %} |
---|
[1175] | 722 | '.__('Error:').' {%=file.error%} |
---|
[1162] | 723 | {% } else { %} |
---|
| 724 | '.__('File successfully uploaded.').' |
---|
| 725 | {% } %} |
---|
| 726 | </span> |
---|
| 727 | </div> |
---|
| 728 | <div class="upload-progress"> |
---|
| 729 | {% if (!file.error) { %} |
---|
| 730 | <div class="bar" style="width:100%;">100%</div> |
---|
| 731 | {% } %} |
---|
| 732 | </div> |
---|
| 733 | </div> |
---|
[1161] | 734 | {% } %} |
---|
| 735 | </script>'. |
---|
| 736 | |
---|
| 737 | self::jsLoad('js/jsUpload/vendor/jquery.ui.widget.js'). |
---|
| 738 | self::jsLoad('js/jsUpload/tmpl.js'). |
---|
| 739 | self::jsLoad('js/jsUpload/load-image.js'). |
---|
| 740 | self::jsLoad('js/jsUpload/jquery.iframe-transport.js'). |
---|
| 741 | self::jsLoad('js/jsUpload/jquery.fileupload.js'). |
---|
| 742 | self::jsLoad('js/jsUpload/jquery.fileupload-process.js'). |
---|
| 743 | self::jsLoad('js/jsUpload/jquery.fileupload-resize.js'). |
---|
| 744 | self::jsLoad('js/jsUpload/jquery.fileupload-ui.js'). |
---|
[1187] | 745 | |
---|
[1161] | 746 | '<script type="text/javascript">'."\n". |
---|
| 747 | "//<![CDATA[\n". |
---|
| 748 | "dotclear.jsUpload = {};\n". |
---|
| 749 | "dotclear.jsUpload.msg = {};\n". |
---|
| 750 | self::jsVar('dotclear.msg.enhanced_uploader_activate',__('Temporarily activate enhanced uploader')). |
---|
| 751 | self::jsVar('dotclear.msg.enhanced_uploader_disable',__('Temporarily disable enhanced uploader')). |
---|
| 752 | self::jsVar('dotclear.jsUpload.msg.limit_exceeded',__('Limit exceeded.')). |
---|
| 753 | self::jsVar('dotclear.jsUpload.msg.size_limit_exceeded',__('File size exceeds allowed limit.')). |
---|
| 754 | self::jsVar('dotclear.jsUpload.msg.canceled',__('Canceled.')). |
---|
| 755 | self::jsVar('dotclear.jsUpload.msg.http_error',__('HTTP Error:')). |
---|
| 756 | self::jsVar('dotclear.jsUpload.msg.error',__('Error:')). |
---|
| 757 | self::jsVar('dotclear.jsUpload.msg.choose_file',__('Choose file')). |
---|
| 758 | self::jsVar('dotclear.jsUpload.msg.choose_files',__('Choose files')). |
---|
| 759 | self::jsVar('dotclear.jsUpload.msg.cancel',__('Cancel')). |
---|
| 760 | self::jsVar('dotclear.jsUpload.msg.clean',__('Clean')). |
---|
| 761 | self::jsVar('dotclear.jsUpload.msg.upload',__('Upload')). |
---|
| 762 | self::jsVar('dotclear.jsUpload.msg.no_file_in_queue',__('No file in queue.')). |
---|
| 763 | self::jsVar('dotclear.jsUpload.msg.file_in_queue',__('1 file in queue.')). |
---|
| 764 | self::jsVar('dotclear.jsUpload.msg.files_in_queue',__('%d files in queue.')). |
---|
| 765 | self::jsVar('dotclear.jsUpload.msg.queue_error',__('Queue error:')). |
---|
| 766 | self::jsVar('dotclear.jsUpload.base_url',$base_url). |
---|
| 767 | "\n//]]>\n". |
---|
| 768 | "</script>\n"; |
---|
| 769 | } |
---|
[1144] | 770 | |
---|
[1161] | 771 | public static function jsToolMan() |
---|
| 772 | { |
---|
| 773 | return |
---|
| 774 | '<script type="text/javascript" src="js/tool-man/core.js"></script>'. |
---|
| 775 | '<script type="text/javascript" src="js/tool-man/events.js"></script>'. |
---|
| 776 | '<script type="text/javascript" src="js/tool-man/css.js"></script>'. |
---|
| 777 | '<script type="text/javascript" src="js/tool-man/coordinates.js"></script>'. |
---|
| 778 | '<script type="text/javascript" src="js/tool-man/drag.js"></script>'. |
---|
| 779 | '<script type="text/javascript" src="js/tool-man/dragsort.js"></script>'. |
---|
| 780 | '<script type="text/javascript" src="js/dragsort-tablerows.js"></script>'; |
---|
| 781 | } |
---|
[1144] | 782 | |
---|
[1161] | 783 | public static function jsMetaEditor() |
---|
| 784 | { |
---|
| 785 | return |
---|
| 786 | '<script type="text/javascript" src="js/meta-editor.js"></script>'; |
---|
| 787 | } |
---|
[0] | 788 | } |
---|
[1187] | 789 | ?> |
---|