mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/10155] Add jQuery, introduce global assets path
Add the jQuery JavaScript library to all pages, giving modifications instant access and allowing for any future core JavaScript to take advantage of it. Also introduce a global /assets directory for assets that are shared between styles. PHPBB3-10155
This commit is contained in:
parent
09e0460e5b
commit
c945fc9355
13 changed files with 28 additions and 0 deletions
|
@ -53,6 +53,7 @@ $mode = request_var('mode', '');
|
|||
|
||||
// Set custom template for admin area
|
||||
$template->set_custom_template($phpbb_admin_path . 'style', 'admin');
|
||||
$template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets');
|
||||
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
|
||||
|
||||
// the acp template is never stored in the database
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var jump_page = '{LA_JUMP_PAGE}:';
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var jump_page = '{LA_JUMP_PAGE}:';
|
||||
|
|
16
phpBB/assets/javascript/jquery.js
vendored
Normal file
16
phpBB/assets/javascript/jquery.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -269,6 +269,7 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c
|
|||
<p>Path locations for the following template variables are affected by this too:</p>
|
||||
|
||||
<ul>
|
||||
<li>{T_ASSETS_PATH} - assets</li>
|
||||
<li>{T_THEME_PATH} - styles/xxx/theme</li>
|
||||
<li>{T_TEMPLATE_PATH} - styles/xxx/template</li>
|
||||
<li>{T_SUPER_TEMPLATE_PATH} - styles/xxx/template</li>
|
||||
|
|
|
@ -402,6 +402,7 @@ PHPBB_USE_BOARD_URL_PATH (use generate_board_url() for image paths instead of $p
|
|||
<p>Path locations for the following template variables are affected by this too:</p>
|
||||
|
||||
<ul>
|
||||
<li>{T_ASSETS_PATH} - assets</li>
|
||||
<li>{T_THEME_PATH} - styles/xxx/theme</li>
|
||||
<li>{T_TEMPLATE_PATH} - styles/xxx/template</li>
|
||||
<li>{T_SUPER_TEMPLATE_PATH} - styles/xxx/template</li>
|
||||
|
|
|
@ -4487,6 +4487,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
|||
|
||||
'S_SEARCH_HIDDEN_FIELDS' => build_hidden_fields($s_search_hidden_fields),
|
||||
|
||||
'T_ASSETS_PATH' => "{$web_path}assets",
|
||||
'T_THEME_PATH' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme',
|
||||
'T_TEMPLATE_PATH' => "{$web_path}styles/" . $user->theme['template_path'] . '/template',
|
||||
'T_SUPER_TEMPLATE_PATH' => (isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path']) ? "{$web_path}styles/" . $user->theme['template_inherit_path'] . '/template' : "{$web_path}styles/" . $user->theme['template_path'] . '/template',
|
||||
|
|
|
@ -203,6 +203,7 @@ $config = new phpbb_config(array(
|
|||
));
|
||||
|
||||
$template->set_custom_template('../adm/style', 'admin');
|
||||
$template->assign_var('T_ASSETS_PATH', '../assets');
|
||||
$template->assign_var('T_TEMPLATE_PATH', '../adm/style');
|
||||
|
||||
// the acp template is never stored in the database
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
about phpBB please visit http://www.phpbb.com
|
||||
-->
|
||||
|
||||
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var jump_page = '{LA_JUMP_PAGE}:';
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
{META}
|
||||
<title>{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE}</title>
|
||||
|
||||
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />
|
||||
|
||||
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
<!-- IF S_USER_PM_POPUP and S_NEW_PM -->
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<title>{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE}</title>
|
||||
|
||||
<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />
|
||||
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
|
||||
</head>
|
||||
|
||||
<body class="{S_CONTENT_DIRECTION}">
|
||||
|
|
Loading…
Add table
Reference in a new issue