diff options
Diffstat (limited to 'modules/gallery/views')
| -rw-r--r-- | modules/gallery/views/admin_modules.html.php | 2 | ||||
| -rw-r--r-- | modules/gallery/views/admin_theme_options.html.php | 34 | ||||
| -rw-r--r-- | modules/gallery/views/admin_themes_preview.html.php | 1 | ||||
| -rw-r--r-- | modules/gallery/views/error_404.html.php | 7 | ||||
| -rw-r--r-- | modules/gallery/views/error_admin.html.php | 272 | ||||
| -rw-r--r-- | modules/gallery/views/error_cli.txt.php | 3 | ||||
| -rw-r--r-- | modules/gallery/views/error_user.html.php | 42 | ||||
| -rw-r--r-- | modules/gallery/views/form_uploadify.html.php | 2 | ||||
| -rw-r--r-- | modules/gallery/views/kohana/error.php | 310 | ||||
| -rw-r--r-- | modules/gallery/views/login_ajax.html.php | 7 |
10 files changed, 401 insertions, 279 deletions
diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index c5015e68..4d6fe5f0 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -52,7 +52,7 @@ <table> <tr> <th> <?= t("Installed") ?> </th> - <th> <?= t("Name") ?> </th> + <th style="width: 8em"> <?= t("Name") ?> </th> <th> <?= t("Version") ?> </th> <th> <?= t("Description") ?> </th> </tr> diff --git a/modules/gallery/views/admin_theme_options.html.php b/modules/gallery/views/admin_theme_options.html.php index a4bf1c4e..b4a90682 100644 --- a/modules/gallery/views/admin_theme_options.html.php +++ b/modules/gallery/views/admin_theme_options.html.php @@ -1,7 +1,37 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div class="g-block"> - <h1> <?= t("Theme Options") ?> </h1> +<script type="text/javascript"> + $("#g-theme-options-form").ready(function() { + var contents = $("#g-theme-options-form fieldset:not(:last-child)"); + if (contents.length > 1) { + $("<div id='g-theme-options-form-tabs'>" + + " <ul class='tabnav'></ul>" + + "</div>").insertBefore("#g-theme-options-form fieldset:last-child"); + $(contents).each(function(index) { + var text = $("legend", this).text(); + var tabId = "tab_" + index; + var tabContentId = "tab_content_" + index; + if (text == "") { + text = <?= t("Tab_")->for_js() ?> + index; + } + $(".tabnav").append( + "<li><a id='" + tabId + "' href='#" + tabContentId + "'>" + text + "</a></li>"); + $("#g-theme-options-form-tabs").append( + "<div id='" + tabContentId + "' class='tabdiv'></div>"); + if ($("li.g-error", this).length > 0) { + $("#" + tabId).addClass("g-error"); + } + $("#" + tabContentId).append($("ul", this)); + $(this).remove(); + }); + $("#g-theme-options-form-tabs").tabs({}); + } else { + $("#g-theme-options-form fieldset:first legend").hide(); + } + }); +</script> +<div class="g-block"> + <h1> <?= t("Theme options") ?> </h1> <div class="g-block-content"> <?= $form ?> </div> diff --git a/modules/gallery/views/admin_themes_preview.html.php b/modules/gallery/views/admin_themes_preview.html.php index a7aea172..80a6158b 100644 --- a/modules/gallery/views/admin_themes_preview.html.php +++ b/modules/gallery/views/admin_themes_preview.html.php @@ -1,4 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> +<h1><?= t("Preview of the %theme_name theme", array("theme_name" => $info->name)) ?></h1> <p> <a href="<?= url::site("admin/themes/choose/$type/$theme_name?csrf=$csrf") ?>"> <?= t("Activate <strong>%theme_name</strong>", array("theme_name" => $info->name)) ?> diff --git a/modules/gallery/views/error_404.html.php b/modules/gallery/views/error_404.html.php index 4b037a79..42f62b6c 100644 --- a/modules/gallery/views/error_404.html.php +++ b/modules/gallery/views/error_404.html.php @@ -12,10 +12,15 @@ <?= t("Please sign in to find out.") ?> </p> <?= $login_form ?> + <script type="text/javascript"> + $(document).ready(function() { + $("#g-username").focus(); + }); + </script> <? else: ?> <p> <?= t("Maybe the page exists, but is only visible to authorized users.") ?> <?= t("If you think this is an error, talk to your Gallery administrator!") ?> </p> <? endif; ?> -</div>
\ No newline at end of file +</div> diff --git a/modules/gallery/views/error_admin.html.php b/modules/gallery/views/error_admin.html.php new file mode 100644 index 00000000..40eb7374 --- /dev/null +++ b/modules/gallery/views/error_admin.html.php @@ -0,0 +1,272 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<? $error_id = uniqid("error") ?> +<? if (!function_exists("t")) { function t($msg) { return $msg; } } ?> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <style type="text/css"> + body { + background: #fff; + font-size: 14px; + line-height: 130%; + } + + div.big_box { + padding: 10px; + background: #eee; + border: solid 1px #ccc; + font-family: sans-serif; + color: #111; + width: 60em; + margin: 20px auto; + } + + div#framework_error { + text-align: center; + } + + div#error_details { + text-align: left; + } + + code { + font-family: monospace; + font-size: 12px; + margin: 20px 20px 20px 0px; + color: #333; + white-space: pre-wrap; + white-space: -moz-pre-wrap; + word-wrap: break-word; + } + + code .line { + padding-left: 10px; + } + + h3 { + font-family: sans-serif; + margin: 2px 0px 0px 0px; + padding: 8px 0px 0px 0px; + border-top: 1px solid #ddd; + } + + p { + padding: 0px; + margin: 0px 0px 10px 0px; + } + + li, pre { + padding: 0px; + margin: 0px; + } + + .collapsed { + display: none; + } + + .highlight { + font-weight: bold; + color: darkred; + } + + #kohana_error .message { + display: block; + padding-bottom: 10px; + } + + .source { + border: solid 1px #ccc; + background: #efe; + margin-bottom: 5px; + } + + table { + width: 100%; + display: block; + margin: 0 0 0.4em; + padding: 0; + border-collapse: collapse; + background: #efe; + } + + table td { + border: solid 1px #ddd; + text-align: left; + vertical-align: top; + padding: 0.4em; + } + + .args table td.key { + width: 200px; + } + + .number { + padding-right: 1em; + } + </style> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> + <title><?= t("Something went wrong!") ?></title> + + <script type="text/javascript"> + function koggle(elem) { + elem = document.getElementById(elem); + if (elem.style && elem.style["display"]) { + // Only works with the "style" attr + var disp = elem.style["display"]; + } else { + if (elem.currentStyle) { + // For MSIE, naturally + var disp = elem.currentStyle["display"]; + } else { + if (window.getComputedStyle) { + // For most other browsers + var disp = document.defaultView.getComputedStyle(elem, null).getPropertyValue('display'); + } + } + } + + // Toggle the state of the "display" style + elem.style.display = disp == 'block' ? 'none' : 'block'; + return false; + } + </script> + </head> + <body> + <? try { $user = identity::active_user(); } catch (Exception $e) { } ?> + <div class="big_box" id="framework_error"> + <h1> + <?= t("Dang... Something went wrong!") ?> + </h1> + <h2> + <?= t("We tried really hard, but it's broken.") ?> + </h2> + </div> + <div class="big_box" id="error_details"> + <h2> + <?= t("Hey wait, you're an admin! We can tell you stuff.") ?> + </h2> + <div id="kohana_error"> + <h3> + <span class="type"> + <?= $type?> [ <?= $code ?> ]: + </span> + <span class="message"> + <?= $message?> + </span> + </h3> + <div id="<?= $error_id ?>" class="content"> + <ol class="trace"> + <li class="snippet"> + <p> + <span class="file"> + <?= Kohana_Exception::debug_path($file)?>[ <?= $line?> ] + </span> + </p> + + <div class="source"> + <? if (Kohana_Exception::$source_output and $source_code = Kohana_Exception::debug_source($file, $line)): ?><code><? foreach ($source_code as $num => $row): ?><span class="line <?= ($num == $line) ? "highlight" : ""?>"><span class="number"><?= $num ?></span><?= htmlspecialchars($row, ENT_NOQUOTES, Kohana::CHARSET) ?></span><? endforeach ?></code> + <? endif ?> + </div> + </li> + + <? if (Kohana_Exception::$trace_output): ?> + <? foreach (Kohana_Exception::trace($trace) as $i => $step): ?> + <li class="snippet"> + <p> + <span class="file"> + <? if ($step["file"]): $source_id = "$error_id.source.$i" ?> + <? if (Kohana_Exception::$source_output and $step["source"]): ?> + <a href="#<?= $source_id ?>" onclick="return koggle('<?= $source_id ?>')"><?= Kohana_Exception::debug_path($step["file"])?>[ <?= $step["line"]?> ]</a> + <? else: ?> + <span class="file"><?= Kohana_Exception::debug_path($step["file"])?>[ <?= $step["line"]?> ]</span> + <? endif ?> + <? else: ?> + {<?= t("PHP internal call")?>} + <? endif?> + </span> + » + <?= $step["function"]?>(<? if ($step["args"]): $args_id = "$error_id.args.$i" ?> + <a href="#<?= $args_id ?>" onclick="return koggle('<?= $args_id ?>')"><?= t("arguments")?></a> + <? endif?>) + </p> + <? if (isset($args_id)): ?> + <div id="<?= $args_id ?>" class="args collapsed"> + <table cellspacing="0"> + <? foreach ($step["args"] as $name => $arg): ?> + <tr> + <td class="key"> + <pre><?= $name?></pre> + </td> + <td class="value"> + <pre><?= Kohana_Exception::safe_dump($arg, $name) ?></pre> + </td> + </tr> + <? endforeach?> + </table> + </div> + <? endif?> + <? if (Kohana_Exception::$source_output and $step["source"] and isset($source_id)): ?> + <pre id="<?= $source_id ?>" class="source collapsed"><code><? foreach ($step["source"] as $num => $row): ?><span class="line <?= ($num == $step["line"]) ? "highlight" : "" ?>"><span class="number"><?= $num ?></span><?= htmlspecialchars($row, ENT_NOQUOTES, Kohana::CHARSET) ?></span><? endforeach ?></code></pre> + <? endif?> + </li> + <? unset($args_id, $source_id) ?> + <? endforeach?> + </ol> + <? endif ?> + + </div> + <h2> + <a href="#<?= $env_id = $error_id."environment" ?>" onclick="return koggle('<?= $env_id ?>')"><?= t("Environment")?></a> + </h2> + <div id="<?= $env_id ?>" class="content collapsed"> + <? $included = get_included_files()?> + <h3><a href="#<?= $env_id = $error_id."environment_included" ?>" onclick="return koggle('<?= $env_id ?>')"><?= t("Included files")?></a>(<?= count($included)?>)</h3> + <div id="<?= $env_id ?>" class="collapsed"> + <table cellspacing="0"> + <? foreach ($included as $file): ?> + <tr> + <td> + <pre><?= Kohana_Exception::debug_path($file)?></pre> + </td> + </tr> + <? endforeach?> + </table> + </div> + <? $included = get_loaded_extensions()?> + <h3><a href="#<?= $env_id = $error_id."environment_loaded" ?>" onclick="return koggle('<?= $env_id ?>')"><?= t("Loaded extensions")?></a>(<?= count($included)?>)</h3> + <div id="<?= $env_id ?>" class="collapsed"> + <table cellspacing="0"> + <? foreach ($included as $file): ?> + <tr> + <td> + <pre><?= Kohana_Exception::debug_path($file)?></pre> + </td> + </tr> + <? endforeach?> + </table> + </div> + <? foreach (array("_SESSION", "_GET", "_POST", "_FILES", "_COOKIE", "_SERVER") as $var): ?> + <? if ( empty($GLOBALS[$var]) OR ! is_array($GLOBALS[$var])) continue ?> + <h3><a href="#<?= $env_id = "$error_id.environment" . strtolower($var) ?>" + onclick="return koggle('<?= $env_id ?>')">$<?= $var?></a></h3> + <div id="<?= $env_id ?>" class="collapsed"> + <table cellspacing="0"> + <? foreach ($GLOBALS[$var] as $key => $value): ?> + <tr> + <td class="key"> + <code> + <?= $key?> + </code> + </td> + <td class="value"> + <pre><?= Kohana_Exception::safe_dump($value, $key) ?></pre> + </td> + </tr> + <? endforeach?> + </table> + </div> + <? endforeach?> + </div> + </div> + </div> + </body> +</html> diff --git a/modules/gallery/views/error_cli.txt.php b/modules/gallery/views/error_cli.txt.php new file mode 100644 index 00000000..9f476f54 --- /dev/null +++ b/modules/gallery/views/error_cli.txt.php @@ -0,0 +1,3 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<? echo Kohana_Exception::text($e), "\n"; + diff --git a/modules/gallery/views/error_user.html.php b/modules/gallery/views/error_user.html.php new file mode 100644 index 00000000..74c6a8fb --- /dev/null +++ b/modules/gallery/views/error_user.html.php @@ -0,0 +1,42 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<? if (!function_exists("t")) { function t($msg) { return $msg; } } ?> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <style type="text/css"> + body { + background: #fff; + font-size: 14px; + line-height: 130%; + } + + div.big_box { + padding: 10px; + background: #eee; + border: solid 1px #ccc; + font-family: sans-serif; + color: #111; + width: 60em; + margin: 20px auto; + } + + div#framework_error { + text-align: center; + } + </style> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> + <title><?= t("Something went wrong!") ?></title> + </head> + <body> + <div class="big_box" id="framework_error"> + <h1> + <?= t("Dang... Something went wrong!") ?> + </h1> + <h2> + <?= t("We tried really hard, but it's broken.") ?> + </h2> + <p> + <?= t("Talk to your Gallery administrator for help fixing this!") ?> + </p> + </div> + </body> +</html> diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php index d811f913..588fa16d 100644 --- a/modules/gallery/views/form_uploadify.html.php +++ b/modules/gallery/views/form_uploadify.html.php @@ -7,7 +7,7 @@ width: 150, height: 33, uploader: "<?= url::file("lib/uploadify/uploadify.swf") ?>", - script: "<?= url::site("simple_uploader/add_photo/{$album->id}") ?>", + script: "<?= url::site("flash_uploader/add_photo/{$album->id}") ?>", scriptData: <?= json_encode($script_data) ?>, fileExt: "*.gif;*.jpg;*.jpeg;*.png;*.flv;*.mp4;*.GIF;*.JPG;*.JPEG;*.PNG;*.FLV;*.MP4", fileDesc: <?= t("Photos and movies")->for_js() ?>, diff --git a/modules/gallery/views/kohana/error.php b/modules/gallery/views/kohana/error.php index d55105a0..cc9d2e84 100644 --- a/modules/gallery/views/kohana/error.php +++ b/modules/gallery/views/kohana/error.php @@ -1,280 +1,42 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<? $error_id = uniqid("error") ?> -<? if (!function_exists("t")) { function t($msg) { return $msg; } } ?> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <style type="text/css"> - body { - background: #fff; - font-size: 14px; - line-height: 130%; - } +<? +// This is the template for all HTML errors. If you're throwing an exception and you want your +// error to appear differently, extend Kohana_Exception and specify a different template. - div.big_box { - padding: 10px; - background: #eee; - border: solid 1px #ccc; - font-family: sans-serif; - color: #111; - width: 60em; - margin: 20px auto; - } +// Log validation exceptions to ease debugging +if ($e instanceof ORM_Validation_Exception) { + Kohana_Log::add("error", "Validation errors: " . print_r($e->validation->errors(), 1)); +} - div#framework_error { - text-align: center; - } +if (php_sapi_name() == "cli") { + include Kohana::find_file("views", "error_cli.txt"); + return; +} - div#error_details { - text-align: left; - } +try { + // Admins get a special error page + $user = identity::active_user(); + if ($user && $user->admin) { + include Kohana::find_file("views", "error_admin.html"); + return; + } +} catch (Exception $ignored) { +} - code { - font-family: monospace; - font-size: 12px; - margin: 20px 20px 20px 0px; - color: #333; - white-space: pre-wrap; - white-space: -moz-pre-wrap; - word-wrap: break-word; - } +// Try to show a themed error page for 404 errors +if ($e instanceof Kohana_404_Exception) { + $view = new Theme_View("page.html", "other", "error"); + $view->page_title = t("Dang... Page not found!"); + $view->content = new View("error_404.html"); + $user = identity::active_user(); + $view->content->is_guest = $user && $user->guest; + if ($view->content->is_guest) { + $view->content->login_form = new View("login_ajax.html"); + $view->content->login_form->form = auth::get_login_form("login/auth_html"); + } + print $view; + return; +} - code .line { - padding-left: 10px; - } - - h3 { - font-family: sans-serif; - margin: 2px 0px 0px 0px; - padding: 8px 0px 0px 0px; - border-top: 1px solid #ddd; - } - - p { - padding: 0px; - margin: 0px 0px 10px 0px; - } - - li, pre { - padding: 0px; - margin: 0px; - } - - .collapsed { - display: none; - } - - .highlight { - font-weight: bold; - color: darkred; - } - - #kohana_error .message { - display: block; - padding-bottom: 10px; - } - - .source { - border: solid 1px #ccc; - background: #efe; - margin-bottom: 5px; - } - - table { - width: 100%; - display: block; - margin: 0 0 0.4em; - padding: 0; - border-collapse: collapse; - background: #efe; - } - - table td { - border: solid 1px #ddd; - text-align: left; - vertical-align: top; - padding: 0.4em; - } - - .args table td.key { - width: 200px; - } - - .number { - padding-right: 1em; - } - </style> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> - <title><?= t("Something went wrong!") ?></title> - - <script type="text/javascript"> - function koggle(elem) { - elem = document.getElementById(elem); - if (elem.style && elem.style["display"]) { - // Only works with the "style" attr - var disp = elem.style["display"]; - } else { - if (elem.currentStyle) { - // For MSIE, naturally - var disp = elem.currentStyle["display"]; - } else { - if (window.getComputedStyle) { - // For most other browsers - var disp = document.defaultView.getComputedStyle(elem, null).getPropertyValue('display'); - } - } - } - - // Toggle the state of the "display" style - elem.style.display = disp == 'block' ? 'none' : 'block'; - return false; - } - </script> - </head> - <body> - <? try { $user = identity::active_user(); } catch (Exception $e) { } ?> - <? $admin = php_sapi_name() == "cli" || (class_exists("User_Model") && isset($user) && $user->admin) ?> - <div class="big_box" id="framework_error"> - <h1> - <?= t("Dang... Something went wrong!") ?> - </h1> - <h2> - <?= t("We tried really hard, but it's broken.") ?> - </h2> - <? if (!$admin): ?> - <p> - <?= t("Talk to your Gallery administrator for help fixing this!") ?> - </p> - <? endif ?> - </div> - <? if ($admin): ?> - <div class="big_box" id="error_details"> - <h2> - <?= t("Hey wait, you're an admin! We can tell you stuff.") ?> - </h2> - <div id="kohana_error"> - <h3> - <span class="type"> - <?= $type?> [ <?= $code ?> ]: - </span> - <span class="message"> - <?= $message?> - </span> - </h3> - <div id="<?= $error_id ?>" class="content"> - <ol class="trace"> - <li class="snippet"> - <p> - <span class="file"> - <?= Kohana_Exception::debug_path($file)?>[ <?= $line?> ] - </span> - </p> - - <div class="source"> - <? if (Kohana_Exception::$source_output and $source_code = Kohana_Exception::debug_source($file, $line)): ?><code><? foreach ($source_code as $num => $row): ?><span class="line <?= ($num == $line) ? "highlight" : ""?>"><span class="number"><?= $num ?></span><?= htmlspecialchars($row, ENT_NOQUOTES, Kohana::CHARSET) ?></span><? endforeach ?></code> - <? endif ?> - </div> - </li> - - <? if (Kohana_Exception::$trace_output): ?> - <? foreach (Kohana_Exception::trace($trace) as $i => $step): ?> - <li class="snippet"> - <p> - <span class="file"> - <? if ($step["file"]): $source_id = "$error_id.source.$i" ?> - <? if (Kohana_Exception::$source_output and $step["source"]): ?> - <a href="#<?= $source_id ?>" onclick="return koggle('<?= $source_id ?>')"><?= Kohana_Exception::debug_path($step["file"])?>[ <?= $step["line"]?> ]</a> - <? else: ?> - <span class="file"><?= Kohana_Exception::debug_path($step["file"])?>[ <?= $step["line"]?> ]</span> - <? endif ?> - <? else: ?> - {<?= t("PHP internal call")?>} - <? endif?> - </span> - » - <?= $step["function"]?>(<? if ($step["args"]): $args_id = "$error_id.args.$i" ?> - <a href="#<?= $args_id ?>" onclick="return koggle('<?= $args_id ?>')"><?= t("arguments")?></a> - <? endif?>) - </p> - <? if (isset($args_id)): ?> - <div id="<?= $args_id ?>" class="args collapsed"> - <table cellspacing="0"> - <? foreach ($step["args"] as $name => $arg): ?> - <tr> - <td class="key"> - <pre><?= $name?></pre> - </td> - <td class="value"> - <pre><?= Kohana_Exception::safe_dump($arg, $name) ?></pre> - </td> - </tr> - <? endforeach?> - </table> - </div> - <? endif?> - <? if (Kohana_Exception::$source_output and $step["source"] and isset($source_id)): ?> - <pre id="<?= $source_id ?>" class="source collapsed"><code><? foreach ($step["source"] as $num => $row): ?><span class="line <?= ($num == $step["line"]) ? "highlight" : "" ?>"><span class="number"><?= $num ?></span><?= htmlspecialchars($row, ENT_NOQUOTES, Kohana::CHARSET) ?></span><? endforeach ?></code></pre> - <? endif?> - </li> - <? unset($args_id, $source_id) ?> - <? endforeach?> - </ol> - <? endif ?> - - </div> - <h2> - <a href="#<?= $env_id = $error_id."environment" ?>" onclick="return koggle('<?= $env_id ?>')"><?= t("Environment")?></a> - </h2> - <div id="<?= $env_id ?>" class="content collapsed"> - <? $included = get_included_files()?> - <h3><a href="#<?= $env_id = $error_id."environment_included" ?>" onclick="return koggle('<?= $env_id ?>')"><?= t("Included files")?></a>(<?= count($included)?>)</h3> - <div id="<?= $env_id ?>" class="collapsed"> - <table cellspacing="0"> - <? foreach ($included as $file): ?> - <tr> - <td> - <pre><?= Kohana_Exception::debug_path($file)?></pre> - </td> - </tr> - <? endforeach?> - </table> - </div> - <? $included = get_loaded_extensions()?> - <h3><a href="#<?= $env_id = $error_id."environment_loaded" ?>" onclick="return koggle('<?= $env_id ?>')"><?= t("Loaded extensions")?></a>(<?= count($included)?>)</h3> - <div id="<?= $env_id ?>" class="collapsed"> - <table cellspacing="0"> - <? foreach ($included as $file): ?> - <tr> - <td> - <pre><?= Kohana_Exception::debug_path($file)?></pre> - </td> - </tr> - <? endforeach?> - </table> - </div> - <? foreach (array("_SESSION", "_GET", "_POST", "_FILES", "_COOKIE", "_SERVER") as $var): ?> - <? if ( empty($GLOBALS[$var]) OR ! is_array($GLOBALS[$var])) continue ?> - <h3><a href="#<?= $env_id = "$error_id.environment" . strtolower($var) ?>" - onclick="return koggle('<?= $env_id ?>')">$<?= $var?></a></h3> - <div id="<?= $env_id ?>" class="collapsed"> - <table cellspacing="0"> - <? foreach ($GLOBALS[$var] as $key => $value): ?> - <tr> - <td class="key"> - <code> - <?= $key?> - </code> - </td> - <td class="value"> - <pre><?= Kohana_Exception::safe_dump($value, $key) ?></pre> - </td> - </tr> - <? endforeach?> - </table> - </div> - <? endforeach?> - </div> - </div> - </div> - <? endif ?> - </body> -</html> +header("HTTP/1.1 500 Internal Server Error"); +include Kohana::find_file("views", "error_user.html"); diff --git a/modules/gallery/views/login_ajax.html.php b/modules/gallery/views/login_ajax.html.php index 36647f9d..88fe2389 100644 --- a/modules/gallery/views/login_ajax.html.php +++ b/modules/gallery/views/login_ajax.html.php @@ -10,9 +10,16 @@ $(".submit").addClass("g-button ui-state-default ui-corner-all"); $(".submit").gallery_hover_init(); ajaxify_login_reset_form(); + + // See comment about IE7 below + setTimeout('$("#g-name").focus()', 100); } }); }); + + // Setting the focus here doesn't work on IE7, perhaps because the field is + // not ready yet? So set a timeout and do it the next time we're idle + setTimeout('$("#g-username").focus()', 100); }); function ajaxify_login_reset_form() { |
