aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/acp_forums.html8
-rw-r--r--phpBB/adm/style/admin.css4
-rw-r--r--phpBB/adm/style/ajax.js39
-rw-r--r--phpBB/styles/prosilver/theme/common.css4
4 files changed, 47 insertions, 8 deletions
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index b2b3ad6d40..048a24a328 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -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/admin.css b/phpBB/adm/style/admin.css
index 01af071766..a162d44f9d 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;
diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js
index b4385b2740..0c00efee1b 100644
--- a/phpBB/adm/style/ajax.js
+++ b/phpBB/adm/style/ajax.js
@@ -2,6 +2,13 @@
"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
@@ -14,18 +21,26 @@ phpbb.add_ajax_callback('forum_down', function() {
if (tr.is(':first-child'))
{
- el.parents('span').siblings('.up').html('<a href="' + tr.attr('data-up') + '"><img src="./images/icon_up.gif" alt="Move up" title="Move up" /></a>');
- tr.next().find('.up').html('<img src="./images/icon_up_disabled.gif" alt="Move up" title="Move up" />');
+ 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.html('<img src="./images/icon_down_disabled.gif" alt="Move down" title="Move down" />');
- tr.prev().find('.down').html('<a href="' + tr.attr('data-down') + '"><img src="./images/icon_down.gif" alt="Move down" title="Move down" /></a>');
+ 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'
@@ -39,18 +54,26 @@ phpbb.add_ajax_callback('forum_up', function() {
if (tr.is(':last-child'))
{
- el.parents('span').siblings('.down').html('<a href="' + tr.attr('data-down') + '"><img src="./images/icon_down.gif" alt="Move down" title="Move down" /></a>');
- tr.prev().find('.down').html('<img src="./images/icon_down_disabled.gif" alt="Move down" title="Move down" />');
+ 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.html('<img src="./images/icon_up_disabled.gif" alt="Move up" title="Move up" />');
- tr.next().find('.up').html('<a href="' + tr.attr('data-up') + '"><img src="./images/icon_up.gif" alt="Move up" title="Move up" /></a>');
+ 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'
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index d1fc1fa3e3..3b0e7899cb 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -702,3 +702,7 @@ p.rules a {
line-height: 1px;
background: transparent;
}
+
+.hidden {
+ display: none;
+}