diff options
Diffstat (limited to 'phpBB/styles/prosilver/template')
8 files changed, 33 insertions, 63 deletions
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 19fe5ca4d2..ef6b7de418 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -3,6 +3,14 @@ */ /** +* Find a member +*/ +function find_username(url) { + popup(url, 760, 570, '_usersearch'); + return false; +} + +/** * Window popup */ function popup(url, width, height, name) { @@ -20,7 +28,7 @@ function popup(url, width, height, name) { function jumpto() { var page = prompt(jump_page, on_page); - if (page !== null && !isNaN(page) && page === Math.floor(page) && page > 0) { + if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) { if (base_url.indexOf('?') === -1) { document.location.href = base_url + '?start=' + ((page - 1) * per_page); } else { @@ -356,41 +364,24 @@ function submit_default_button(event, selector, class_name) { * The non-jQuery code is a mimick of the jQuery code ;) */ function apply_onkeypress_event() { - // jQuery code in case jQuery is used - if (jquery_present) { - jQuery('form input[type=text], form input[type=password]').live('keypress', function (e) { - var default_button = jQuery(this).parents('form').find('input[type=submit].default-submit-action'); - - if (!default_button || default_button.length <= 0) { - return true; - } - - if (phpbb_check_key(e)) { - return true; - } - - if ((e.which && e.which === 13) || (e.keyCode && e.keyCode === 13)) { - default_button.click(); - return false; - } + jQuery('form input[type=text], form input[type=password]').live('keypress', function (e) { + var default_button = jQuery(this).parents('form').find('input[type=submit].default-submit-action'); + if (!default_button || default_button.length <= 0) { return true; - }); - - return; - } + } - var input_tags = document.getElementsByTagName('input'); + if (phpbb_check_key(e)) { + return true; + } - for (var i = 0, element = input_tags[0]; i < input_tags.length ; element = input_tags[++i]) { - if (element.type === 'text' || element.type === 'password') { - // onkeydown is possible too - element.onkeypress = function (evt) { submit_default_button((evt || window.event), this, 'default-submit-action'); }; + if ((e.which && e.which === 13) || (e.keyCode && e.keyCode === 13)) { + default_button.click(); + return false; } - } + + return true; + }); } -/** -* Detect JQuery existance. We currently do not deliver it, but some styles do, so why not benefit from it. ;) -*/ -var jquery_present = typeof jQuery === 'function'; +jQuery(document).ready(apply_onkeypress_event); diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index bf5ce30f37..f2113b73ef 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -53,6 +53,7 @@ <script type="text/javascript" src="{T_JQUERY_LINK}"></script> <!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js?assets_version={T_ASSETS_VERSION}"></script> <script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> <!-- INCLUDEJS template/ajax.js --> {SCRIPTS} diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index a53e0f8d60..e68ce4dd51 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -41,15 +41,6 @@ <!-- ENDIF --> /** - * Find a member - */ - function find_username(url) - { - popup(url, 760, 570, '_usersearch'); - return false; - } - - /** * New function for handling multiple calls to window.onload and window.unload by pentapenguin */ window.onload = function() @@ -70,7 +61,6 @@ // ]]> </script> -<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js?assets_version={T_ASSETS_VERSION}"></script> <link href="{T_THEME_PATH}/print.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="print" title="printonly" /> <link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" /> diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html index 8156968098..83dc6111dd 100644 --- a/phpBB/styles/prosilver/template/posting_editor.html +++ b/phpBB/styles/prosilver/template/posting_editor.html @@ -1,9 +1,3 @@ -<script type="text/javascript"> -// <![CDATA[ - onload_functions.push(apply_onkeypress_event); -// ]]> -</script> - <fieldset class="fields1"> <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html index ec189304fc..144ae8e462 100644 --- a/phpBB/styles/prosilver/template/simple_footer.html +++ b/phpBB/styles/prosilver/template/simple_footer.html @@ -8,6 +8,7 @@ <script type="text/javascript" src="{T_JQUERY_LINK}"></script> <!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js?assets_version={T_ASSETS_VERSION}"></script> {SCRIPTS} <!-- EVENT simple_footer_after --> diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index 88b2c0c025..667698c371 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -40,7 +40,6 @@ // ]]> </script> -<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js?assets_version={T_ASSETS_VERSION}"></script> <link href="{T_THEME_PATH}/print.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="print" title="printonly" /> <link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" /> diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html index 0ef6faf25d..74cb9f4579 100644 --- a/phpBB/styles/prosilver/template/ucp_groups_manage.html +++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html @@ -6,19 +6,18 @@ <div class="panel"> <div class="inner"> - + + <!-- IF S_ERROR --> + <fieldset> + <p class="error">{ERROR_MSG}</p> + </fieldset> + <!-- ENDIF --> + <p>{L_GROUPS_EXPLAIN}</p> <!-- IF S_EDIT --> <h3>{L_GROUP_DETAILS}</h3> - - <!-- IF S_ERROR --> - <div class="errorbox"> - <h3>{L_WARNING}</h3> - <p>{ERROR_MSG}</p> - </div> - <!-- ENDIF --> - + <fieldset> <dl> <dt><label for="group_name">{L_GROUP_NAME}{L_COLON}</label></dt> diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html index db95e5ba13..779c1fc2a3 100644 --- a/phpBB/styles/prosilver/template/ucp_register.html +++ b/phpBB/styles/prosilver/template/ucp_register.html @@ -10,11 +10,6 @@ document.forms['register'].change_lang.value = lang_iso; document.forms['register'].submit.click(); } - - <!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_REFRESH --> - onload_functions.push(apply_onkeypress_event); - <!-- ENDIF --> - // ]]> </script> |