aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm
diff options
context:
space:
mode:
authorVjacheslav Trushkin <arty@phpbb.com>2012-03-31 10:43:06 +0300
committerVjacheslav Trushkin <arty@phpbb.com>2012-03-31 10:43:06 +0300
commit398a6c8045113f14900bdea8c70ba032f75b45f6 (patch)
tree1a9ff30f5eeca6faf0adbd314b60caf1869079c5 /phpBB/adm
parent506951e8aff98582ebc56fcda9ed0626497ade77 (diff)
parent013a8649a5164b90310e76d99fae2186b831a5f0 (diff)
downloadforums-398a6c8045113f14900bdea8c70ba032f75b45f6.tar
forums-398a6c8045113f14900bdea8c70ba032f75b45f6.tar.gz
forums-398a6c8045113f14900bdea8c70ba032f75b45f6.tar.bz2
forums-398a6c8045113f14900bdea8c70ba032f75b45f6.tar.xz
forums-398a6c8045113f14900bdea8c70ba032f75b45f6.zip
Merge branch 'develop' into feature/merging-style-components
* develop: (175 commits) [feature/ajax] Remove strange non-breaking spaces from approve button [feature/ajax] Add entirely unrelated but nice newlines [feature/ajax] Unify phpbb_json_response instantiation [feature/ajax] Fix acp_styles activate_deactivate ajax callback name [feature/ajax] Send correct activate/deactivate JSON response in acp_profile [ticket/10270] Alter background colors for posts [feature/ajax] Remove not working module enable/disable ajax code [feature/ajax] Replace static call to phpbb_request with OO [feature/ajax] Remove quick-reply AJAX handling until we have something good [ticket/10270] Changing close button for ajax popups [ticket/10270] Disabling links in disappearing content [ticket/10291] Fixed an AJAX bug on quick reply form submit. [ticket/10273] Fixed accepting / denying posts AJAX. [ticket/10272] Removed code that was prevent event propogation in AJAX. [ticket/10291] Fixed a bug in the quick reply AJAX. [feature/ajax] Handle acp_modules error cases with JSON response [feature/ajax] Fix filter check, quick mod tools data-attribute [feature/ajax] Use the error handler [feature/ajax] Generic error handling with a phpbb.alert box [feature/ajax] Change filter semantics, some minor adjustments ... Conflicts: phpBB/adm/style/acp_styles.html phpBB/includes/acp/acp_styles.php
Diffstat (limited to 'phpBB/adm')
-rw-r--r--phpBB/adm/images/alert_close.pngbin0 -> 2097 bytes
-rw-r--r--phpBB/adm/style/acp_attachments.html2
-rw-r--r--phpBB/adm/style/acp_bbcodes.html2
-rw-r--r--phpBB/adm/style/acp_bots.html4
-rw-r--r--phpBB/adm/style/acp_forums.html26
-rw-r--r--phpBB/adm/style/acp_groups.html2
-rw-r--r--phpBB/adm/style/acp_icons.html2
-rw-r--r--phpBB/adm/style/acp_main.html17
-rw-r--r--phpBB/adm/style/acp_modules.html2
-rw-r--r--phpBB/adm/style/acp_permission_roles.html2
-rw-r--r--phpBB/adm/style/acp_profile.html4
-rw-r--r--phpBB/adm/style/acp_ranks.html2
-rw-r--r--phpBB/adm/style/acp_reasons.html2
-rw-r--r--phpBB/adm/style/acp_words.html2
-rw-r--r--phpBB/adm/style/admin.css54
-rw-r--r--phpBB/adm/style/ajax.js135
-rw-r--r--phpBB/adm/style/overall_footer.html18
17 files changed, 246 insertions, 30 deletions
diff --git a/phpBB/adm/images/alert_close.png b/phpBB/adm/images/alert_close.png
new file mode 100644
index 0000000000..79750a013c
--- /dev/null
+++ b/phpBB/adm/images/alert_close.png
Binary files differ
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html
index 33ef8062a6..c2f8b34792 100644
--- a/phpBB/adm/style/acp_attachments.html
+++ b/phpBB/adm/style/acp_attachments.html
@@ -248,7 +248,7 @@
<!-- ELSE --><br /><span>&raquo; {L_ALLOWED_IN_PM_POST}</span><!-- ENDIF -->
</td>
<td>{groups.CATEGORY}</td>
- <td align="center" valign="middle" style="white-space: nowrap;">&nbsp;<a href="{groups.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{groups.U_DELETE}">{ICON_DELETE}</a>&nbsp;</td>
+ <td align="center" valign="middle" style="white-space: nowrap;">&nbsp;<a href="{groups.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{groups.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>&nbsp;</td>
</tr>
<!-- END groups -->
</tbody>
diff --git a/phpBB/adm/style/acp_bbcodes.html b/phpBB/adm/style/acp_bbcodes.html
index b85e8eca81..5939af24ae 100644
--- a/phpBB/adm/style/acp_bbcodes.html
+++ b/phpBB/adm/style/acp_bbcodes.html
@@ -101,7 +101,7 @@
<!-- BEGIN bbcodes -->
<!-- IF bbcodes.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="text-align: center;">{bbcodes.BBCODE_TAG}</td>
- <td style="text-align: right; width: 40px;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}">{ICON_DELETE}</a></td>
+ <td style="text-align: right; width: 40px;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a></td>
</tr>
<!-- BEGINELSE -->
<tr class="row3">
diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html
index 886005caa3..87679fc33a 100644
--- a/phpBB/adm/style/acp_bots.html
+++ b/phpBB/adm/style/acp_bots.html
@@ -76,9 +76,9 @@
<!-- IF bots.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="width: 50%;">{bots.BOT_NAME}</td>
<td style="width: 15%; white-space: nowrap;" align="center">&nbsp;{bots.LAST_VISIT}&nbsp;</td>
- <td style="text-align: center;">&nbsp;<a href="{bots.U_ACTIVATE_DEACTIVATE}">{bots.L_ACTIVATE_DEACTIVATE}</a>&nbsp;</td>
+ <td style="text-align: center;">&nbsp;<a href="{bots.U_ACTIVATE_DEACTIVATE}" data-ajax="activate_deactivate">{bots.L_ACTIVATE_DEACTIVATE}</a>&nbsp;</td>
<td style="text-align: center;">&nbsp;<a href="{bots.U_EDIT}">{L_EDIT}</a>&nbsp;</td>
- <td style="text-align: center;">&nbsp;<a href="{bots.U_DELETE}">{L_DELETE}</a>&nbsp;</td>
+ <td style="text-align: center;">&nbsp;<a href="{bots.U_DELETE}" data-ajax="row_delete">{L_DELETE}</a>&nbsp;</td>
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{bots.BOT_ID}" /></td>
</tr>
<!-- END bots -->
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index 447c0ce466..048a24a328 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -443,7 +443,7 @@
<col class="row1" /><col class="row1" /><col class="row2" />
<tbody>
<!-- BEGIN forums -->
- <tr>
+ <tr data-down="{forums.U_MOVE_DOWN}" data-up="{forums.U_MOVE_UP}">
<td style="width: 5%; text-align: center;">{forums.FOLDER_IMAGE}</td>
<td>
<!-- IF forums.FORUM_IMAGE --><div style="float: {S_CONTENT_FLOW_BEGIN}; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF -->
@@ -453,17 +453,17 @@
</td>
<td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;">
<!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
- {ICON_MOVE_UP_DISABLED}
- <a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
+ <span class="up">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="down"><a href="{forums.U_MOVE_DOWN}" data-ajax="forum_down">{ICON_MOVE_DOWN}</a></span>
<!-- ELSEIF not forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
- <a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- <a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
+ <span class="up"><a href="{forums.U_MOVE_UP}" data-ajax="forum_up">{ICON_MOVE_UP}</a></span>
+ <span class="down"><a href="{forums.U_MOVE_DOWN}" data-ajax="forum_down">{ICON_MOVE_DOWN}</a></span>
<!-- ELSEIF forums.S_LAST_ROW && not forums.S_FIRST_ROW -->
- <a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- {ICON_MOVE_DOWN_DISABLED}
+ <span class="up"><a href="{forums.U_MOVE_UP}" data-ajax="forum_up">{ICON_MOVE_UP}</a></span>
+ <span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
<!-- ELSE -->
- {ICON_MOVE_UP_DISABLED}
- {ICON_MOVE_DOWN_DISABLED}
+ <span class="up">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
<!-- ENDIF -->
<a href="{forums.U_EDIT}">{ICON_EDIT}</a>
<!-- IF not forums.S_FORUM_LINK -->
@@ -500,6 +500,14 @@
</fieldset>
</form>
+ <div class="hidden">
+ <a class="template-up-img" href="#">{ICON_MOVE_UP}</a>
+ <span class="template-up-img-disabled">{ICON_MOVE_UP_DISABLED}</span>
+
+ <a class="template-down-img" href="#">{ICON_MOVE_DOWN}</a>
+ <span class="template-down-img-disabled">{ICON_MOVE_DOWN_DISABLED}</span>
+ </div>
+
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html
index 158751623a..ed94fa985e 100644
--- a/phpBB/adm/style/acp_groups.html
+++ b/phpBB/adm/style/acp_groups.html
@@ -350,7 +350,7 @@
<td style="text-align: center;">{groups.TOTAL_MEMBERS}</td>
<td style="text-align: center;"><a href="{groups.U_EDIT}">{L_SETTINGS}</a></td>
<td style="text-align: center;"><a href="{groups.U_LIST}">{L_MEMBERS}</a></td>
- <td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL and groups.U_DELETE --><a href="{groups.U_DELETE}">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td>
+ <td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL and groups.U_DELETE --><a href="{groups.U_DELETE}" data-ajax="row_delete">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td>
</tr>
<!-- ENDIF -->
<!-- END groups -->
diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html
index 85b5343666..a8864d42f7 100644
--- a/phpBB/adm/style/acp_icons.html
+++ b/phpBB/adm/style/acp_icons.html
@@ -245,7 +245,7 @@
<td style="text-align: right; white-space: nowrap;">
<!-- IF items.S_FIRST_ROW and not PREVIOUS_PAGE -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF -->&nbsp;
<!-- IF items.S_LAST_ROW and not NEXT_PAGE -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF -->
- &nbsp;<a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}">{ICON_DELETE}</a>
+ &nbsp;<a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
</td>
</tr>
<!-- BEGINELSE -->
diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html
index 11f7fedd38..d9f833d878 100644
--- a/phpBB/adm/style/acp_main.html
+++ b/phpBB/adm/style/acp_main.html
@@ -152,35 +152,35 @@
<fieldset>
<legend>{L_STATISTIC_RESYNC_OPTIONS}</legend>
- <form id="action_online_form" method="post" action="{U_ACTION}">
+ <form id="action_online_form" method="post" action="{U_ACTION}" data-ajax="true">
<dl>
<dt><label for="action_online">{L_RESET_ONLINE}</label><br /><span>&nbsp;</span></dt>
<dd><input type="hidden" name="action" value="online" /><input class="button2" type="submit" id="action_online" name="action_online" value="{L_RUN}" /></dd>
</dl>
</form>
- <form id="action_date_form" method="post" action="{U_ACTION}">
+ <form id="action_date_form" method="post" action="{U_ACTION}" data-ajax="true">
<dl>
<dt><label for="action_date">{L_RESET_DATE}</label><br /><span>&nbsp;</span></dt>
<dd><input type="hidden" name="action" value="date" /><input class="button2" type="submit" id="action_date" name="action_date" value="{L_RUN}" /></dd>
</dl>
</form>
- <form id="action_stats_form" method="post" action="{U_ACTION}">
+ <form id="action_stats_form" method="post" action="{U_ACTION}" data-ajax="true">
<dl>
<dt><label for="action_stats">{L_RESYNC_STATS}</label><br /><span>{L_RESYNC_STATS_EXPLAIN}</span></dt>
<dd><input type="hidden" name="action" value="stats" /><input class="button2" type="submit" id="action_stats" name="action_stats" value="{L_RUN}" /></dd>
</dl>
</form>
- <form id="action_user_form" method="post" action="{U_ACTION}">
+ <form id="action_user_form" method="post" action="{U_ACTION}" data-ajax="true">
<dl>
<dt><label for="action_user">{L_RESYNC_POSTCOUNTS}</label><br /><span>{L_RESYNC_POSTCOUNTS_EXPLAIN}</span></dt>
<dd><input type="hidden" name="action" value="user" /><input class="button2" type="submit" id="action_user" name="action_user" value="{L_RUN}" /></dd>
</dl>
</form>
- <form id="action_db_track_form" method="post" action="{U_ACTION}">
+ <form id="action_db_track_form" method="post" action="{U_ACTION}" data-ajax="true">
<dl>
<dt><label for="action_db_track">{L_RESYNC_POST_MARKING}</label><br /><span>{L_RESYNC_POST_MARKING_EXPLAIN}</span></dt>
<dd><input type="hidden" name="action" value="db_track" /><input class="button2" type="submit" id="action_db_track" name="action_db_track" value="{L_RUN}" /></dd>
@@ -188,19 +188,20 @@
</form>
<!-- IF S_FOUNDER -->
- <form id="action_purge_sessions_form" method="post" action="{U_ACTION}">
+ <form id="action_purge_sessions_form" method="post" action="{U_ACTION}" data-ajax="true">
<dl>
<dt><label for="action_purge_sessions">{L_PURGE_SESSIONS}</label><br /><span>{L_PURGE_SESSIONS_EXPLAIN}</span></dt>
<dd><input type="hidden" name="action" value="purge_sessions" /><input class="button2" type="submit" id="action_purge_sessions" name="action_purge_sessions" value="{L_RUN}" /></dd>
</dl>
</form>
- <form id="action_purge_cache_form" method="post" action="{U_ACTION}">
+ <!-- ENDIF -->
+
+ <form id="action_purge_cache_form" method="post" action="{U_ACTION}" data-ajax="true">
<dl>
<dt><label for="action_purge_cache">{L_PURGE_CACHE}</label><br /><span>{L_PURGE_CACHE_EXPLAIN}</span></dt>
<dd><input type="hidden" name="action" value="purge_cache" /><input class="button2" type="submit" id="action_purge_cache" name="action_purge_cache" value="{L_RUN}" /></dd>
</dl>
</form>
- <!-- ENDIF -->
</fieldset>
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html
index 3f1c0bf50b..6c4645e80c 100644
--- a/phpBB/adm/style/acp_modules.html
+++ b/phpBB/adm/style/acp_modules.html
@@ -164,7 +164,7 @@
{ICON_MOVE_DOWN_DISABLED}
<!-- ENDIF -->
<a href="{modules.U_EDIT}">{ICON_EDIT}</a>
- <a href="{modules.U_DELETE}">{ICON_DELETE}</a>
+ <a href="{modules.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
</td>
</tr>
<!-- END modules -->
diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html
index 658d8dd0c8..2ac77af25d 100644
--- a/phpBB/adm/style/acp_permission_roles.html
+++ b/phpBB/adm/style/acp_permission_roles.html
@@ -174,7 +174,7 @@
{ICON_MOVE_DOWN_DISABLED}
<!-- ENDIF -->
<a href="{roles.U_EDIT}" title="{L_EDIT_ROLE}">{ICON_EDIT}</a>
- <a href="{roles.U_REMOVE}" title="{L_REMOVE_ROLE}">{ICON_DELETE}</a>
+ <a href="{roles.U_REMOVE}" title="{L_REMOVE_ROLE}" data-ajax="row_delete">{ICON_DELETE}</a>
</td>
</tr>
<!-- END roles -->
diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html
index 0ac0d78a64..4a6df768a8 100644
--- a/phpBB/adm/style/acp_profile.html
+++ b/phpBB/adm/style/acp_profile.html
@@ -195,7 +195,7 @@
<td>{fields.FIELD_IDENT}</td>
<td>{fields.FIELD_TYPE}</td>
- <td style="text-align: center;"><a href="{fields.U_ACTIVATE_DEACTIVATE}">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_TRANSLATE}" style="color: red;">{L_TRANSLATE}</a><!-- ENDIF --></td>
+ <td style="text-align: center;"><a href="{fields.U_ACTIVATE_DEACTIVATE}" data-ajax="activate_deactivate">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_TRANSLATE}" style="color: red;">{L_TRANSLATE}</a><!-- ENDIF --></td>
<td style="width: 80px; text-align: right; white-space: nowrap;">
<!-- IF fields.S_FIRST_ROW && not fields.S_LAST_ROW -->
@@ -213,7 +213,7 @@
<!-- ELSE -->
{ICON_EDIT_DISABLED}
<!-- ENDIF -->
- <a href="{fields.U_DELETE}">{ICON_DELETE}</a>
+ <a href="{fields.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
</td>
</tr>
diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html
index 2f77a256b1..7fb7da7095 100644
--- a/phpBB/adm/style/acp_ranks.html
+++ b/phpBB/adm/style/acp_ranks.html
@@ -80,7 +80,7 @@
<td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" /><!-- ELSE -->&nbsp; - &nbsp;<!-- ENDIF --></td>
<td style="text-align: center;">{ranks.RANK_TITLE}</td>
<td style="text-align: center;"><!-- IF ranks.S_SPECIAL_RANK -->&nbsp; - &nbsp;<!-- ELSE -->{ranks.MIN_POSTS}<!-- ENDIF --></td>
- <td style="text-align: center;"><a href="{ranks.U_EDIT}">{ICON_EDIT}</a> <a href="{ranks.U_DELETE}">{ICON_DELETE}</a></td>
+ <td style="text-align: center;"><a href="{ranks.U_EDIT}">{ICON_EDIT}</a> <a href="{ranks.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a></td>
</tr>
<!-- END ranks -->
</tbody>
diff --git a/phpBB/adm/style/acp_reasons.html b/phpBB/adm/style/acp_reasons.html
index 522aec5930..7cf2cce4c9 100644
--- a/phpBB/adm/style/acp_reasons.html
+++ b/phpBB/adm/style/acp_reasons.html
@@ -99,7 +99,7 @@
<!-- ENDIF -->
<a href="{reasons.U_EDIT}">{ICON_EDIT}</a>
<!-- IF reasons.U_DELETE -->
- <a href="{reasons.U_DELETE}">{ICON_DELETE}</a>
+ <a href="{reasons.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
<!-- ELSE -->
{ICON_DELETE_DISABLED}
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_words.html b/phpBB/adm/style/acp_words.html
index 113f58ef92..4acd75f933 100644
--- a/phpBB/adm/style/acp_words.html
+++ b/phpBB/adm/style/acp_words.html
@@ -60,7 +60,7 @@
<!-- IF words.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="text-align: center;">{words.WORD}</td>
<td style="text-align: center;">{words.REPLACEMENT}</td>
- <td>&nbsp;<a href="{words.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{words.U_DELETE}">{ICON_DELETE}</a>&nbsp;</td>
+ <td>&nbsp;<a href="{words.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{words.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>&nbsp;</td>
</tr>
<!-- BEGINELSE -->
<tr class="row3">
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index 14a2b6dded..7afcc3d23b 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -101,6 +101,10 @@ hr {
font-size: 0.85em;
}
+.hidden {
+ display: none;
+}
+
/* General links */
a:link, a:visited {
color: #105289;
@@ -1087,6 +1091,56 @@ input.disabled {
color: #666666;
}
+/* jQuery popups
+---------------------------------------- */
+.phpbb_alert {
+ background-color: #FFFFFF;
+ border: 1px solid #999999;
+ position: fixed;
+ display: none;
+ top: 100px;
+ left: 35%;
+ width: 30%;
+ z-index: 50;
+ padding: 25px;
+ padding: 0 25px 20px 25px;
+}
+
+.phpbb_alert .alert_close {
+ display: block;
+ float: right;
+ width: 16px;
+ height: 16px;
+ overflow: hidden;
+ text-decoration: none !important;
+ background: transparent url("../images/alert_close.png") 0 0 no-repeat;
+ margin-top: -7px;
+ margin-right: -31px;
+}
+.phpbb_alert .alert_close:hover {
+ background-position: 0 -16px;
+}
+
+
+.phpbb_alert p {
+ margin: 8px 0;
+ padding-bottom: 8px;
+}
+
+#darkenwrapper {
+ display: none;
+}
+
+#darken {
+ position: fixed;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ background-color: #000000;
+ opacity: 0.5;
+}
+
/* Pagination
---------------------------------------- */
.pagination {
diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js
new file mode 100644
index 0000000000..fd2f7a2122
--- /dev/null
+++ b/phpBB/adm/style/ajax.js
@@ -0,0 +1,135 @@
+(function($) { // Avoid conflicts with other libraries
+
+"use strict";
+
+var img_templates = {
+ up: $('.template-up-img'),
+ up_disabled: $('.template-up-img-disabled'),
+ down: $('.template-down-img'),
+ down_disabled: $('.template-down-img-disabled')
+};
+
+/**
+ * The following callbacks are for reording forums in acp_forums. forum_down
+ * is triggered when a forum is moved down, and forum_up is triggered when
+ * a forum is moved up. It moves the row up or down, and deactivates /
+ * activates any up / down icons that require it (the ones at the top or bottom).
+ */
+phpbb.add_ajax_callback('forum_down', function() {
+ var el = $(this),
+ tr = el.parents('tr');
+
+ if (tr.is(':first-child'))
+ {
+ var up_img = img_templates.up.clone().attr('href', tr.attr('data-up'));
+ el.parents('span').siblings('.up').html(up_img);
+
+ tr.next().find('.up').html(img_templates.up_disabled);
+
+ phpbb.ajaxify({
+ selector: el.parents('span').siblings('.up').children('a'),
+ callback: 'forum_up'
+ });
+ }
+
+ tr.insertAfter(tr.next());
+
+ if (tr.is(':last-child'))
+ {
+ el.replaceWith(img_templates.down_disabled);
+
+ var down_img = img_templates.down.clone().attr('href', tr.attr('data-down'));
+ tr.prev().find('.down').html(down_img);
+
+ phpbb.ajaxify({
+ selector: tr.prev().find('.down').children('a'),
+ callback: 'forum_down'
+ });
+ }
+});
+
+phpbb.add_ajax_callback('forum_up', function() {
+ var el = $(this),
+ tr = el.parents('tr');
+
+ if (tr.is(':last-child'))
+ {
+ var down_img = img_templates.down.clone().attr('href', tr.attr('data-down'));
+ el.parents('span').siblings('.down').html(down_img);
+
+ tr.prev().find('.down').html(img_templates.down_disabled);
+
+ phpbb.ajaxify({
+ selector: el.parents('span').siblings('.down').children('a'),
+ callback: 'forum_down'
+ });
+ }
+
+ tr.insertBefore(tr.prev());
+
+ if (tr.is(':first-child'))
+ {
+ el.replaceWith(img_templates.up_disabled);
+
+ var up_img = img_templates.up.clone().attr('href', tr.attr('data-up'));
+ tr.next().find('.up').html(up_img);
+
+ phpbb.ajaxify({
+ selector: tr.next().find('.up').children('a'),
+ callback: 'forum_up'
+ });
+ }
+});
+
+/**
+ * This callback replaces activate links with deactivate links and vice versa.
+ * It does this by replacing the text, and replacing all instances of "activate"
+ * in the href with "deactivate", and vice versa.
+ */
+phpbb.add_ajax_callback('activate_deactivate', function(res) {
+ var el = $(this),
+ new_href = el.attr('href');
+
+ el.text(res.text);
+
+ if (new_href.indexOf('deactivate') !== -1)
+ {
+ new_href = new_href.replace('deactivate', 'activate')
+ }
+ else
+ {
+ new_href = new_href.replace('activate', 'deactivate')
+ }
+
+ el.attr('href', new_href);
+});
+
+/**
+ * The removes the parent row of the link or form that triggered the callback,
+ * and is good for stuff like the removal of forums.
+ */
+phpbb.add_ajax_callback('row_delete', function() {
+ $(this).parents('tr').remove();
+});
+
+
+
+$('[data-ajax]').each(function() {
+ var $this = $(this),
+ ajax = $this.attr('data-ajax'),
+ fn;
+
+ if (ajax !== 'false')
+ {
+ fn = (ajax !== 'true') ? ajax : null;
+ phpbb.ajaxify({
+ selector: this,
+ refresh: $this.attr('data-refresh') !== undefined,
+ callback: fn
+ });
+ }
+});
+
+
+
+})(jQuery); // Avoid conflicts with other libraries
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html
index f05e9c56c5..0337080f3d 100644
--- a/phpBB/adm/style/overall_footer.html
+++ b/phpBB/adm/style/overall_footer.html
@@ -17,11 +17,29 @@
<!-- IF S_COPYRIGHT_HTML --><br /><!-- ENDIF -->
{DEBUG_OUTPUT}
<!-- ENDIF -->
+
+ <div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}">
+ <div id="darken">&nbsp;</div>
+ <div class="jalert" id="loadingalert"><h3>{L_LOADING}</h3><p>{L_PLEASE_WAIT}</p></div>
+ </div>
+
+ <div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
+ <a href="#" class="alert_close"></a>
+ <h3 class="alert_title"></h3><p class="alert_text"></p>
+ </div>
+ <div id="phpbb_confirm" class="phpbb_alert">
+ <a href="#" class="alert_close"></a>
+ <p class="alert_text"></p>
+ <input type="button" class="button1" value="{L_YES}" />&nbsp;
+ <input type="button" class="button2" value="{L_NO}" />
+ </div>
</div>
</div>
<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" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js"></script>
+<script type="text/javascript" src="style/ajax.js"></script>
</body>
</html>