From 162f9b738aaa74684ea42e3ce4d6a911a183a996 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 18 Feb 2012 16:35:43 +0200 Subject: [feature/purge-cache] Allow all admins to purge cache Allow all administrators to purge cache PHPBB3-10659 --- phpBB/adm/style/acp_main.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index 11f7fedd38..63ca3a1c79 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -194,13 +194,14 @@
+ +

{L_PURGE_CACHE_EXPLAIN}
- -- cgit v1.2.1 From bb7a03f738c97dc225873691c459f2bf9e612ef6 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Wed, 27 Jul 2011 12:57:58 +0100 Subject: [ticket/10281] AJAXified reordering forums in the ACP. PHPBB3-10281 --- phpBB/adm/style/acp_forums.html | 18 +++++++++--------- phpBB/adm/style/overall_footer.html | 4 ++++ 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index 447c0ce466..b2b3ad6d40 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -443,7 +443,7 @@ - + {forums.FOLDER_IMAGE}
{forums.FORUM_IMAGE}
@@ -453,17 +453,17 @@ - {ICON_MOVE_UP_DISABLED} - {ICON_MOVE_DOWN} + {ICON_MOVE_UP_DISABLED} + {ICON_MOVE_DOWN} - {ICON_MOVE_UP} - {ICON_MOVE_DOWN} + {ICON_MOVE_UP} + {ICON_MOVE_DOWN} - {ICON_MOVE_UP} - {ICON_MOVE_DOWN_DISABLED} + {ICON_MOVE_UP} + {ICON_MOVE_DOWN_DISABLED} - {ICON_MOVE_UP_DISABLED} - {ICON_MOVE_DOWN_DISABLED} + {ICON_MOVE_UP_DISABLED} + {ICON_MOVE_DOWN_DISABLED} {ICON_EDIT} diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index f05e9c56c5..3740122d9b 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -17,6 +17,10 @@
{DEBUG_OUTPUT} + + + + -- cgit v1.2.1 From 6efb9dd0b6e0119009d5b10d198722ba2b19f0e2 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Wed, 24 Aug 2011 11:34:41 +0100 Subject: [ticket/10270] Added jQuery popup CSS to the ACP. It was missing previously, meaning that it displayed wrong and in the footer. PHPBB3-10270 --- phpBB/adm/style/admin.css | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index ceda824e5a..70c06f2d62 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1070,6 +1070,40 @@ input.disabled { color: #666666; } +/* jQuery popups +---------------------------------------- */ +.jalert { + 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; +} + +.jalert 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 { -- cgit v1.2.1 From 420de9c9a0a638135da147a498436dbe7abfd4bd Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Wed, 24 Aug 2011 11:42:39 +0100 Subject: [ticket/10270] Moved some HTML from the JavaScript to overall_footer. PHPBB3-10270 --- phpBB/adm/style/overall_footer.html | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 3740122d9b..625121f1bd 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -18,6 +18,11 @@ {DEBUG_OUTPUT} +
+
 
+

{L_LOADING}

{L_PLEASE_WAIT}

+
+ -- cgit v1.2.1 From 11112314f757f4a6c65852817fba0f1a2f4526d2 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Wed, 24 Aug 2011 12:46:33 +0100 Subject: [ticket/10271] AJAXified various deletions in the ACP. The following places have had deletion AJAXified: * Smilies and icons * Word censors * BBCodes * Attachment groups * Groups * Admin / User / Moderator / Forum roles * Report / denial reasons * Module management * Custom profile fields PHPBB3-10271 --- phpBB/adm/style/acp_attachments.html | 2 +- phpBB/adm/style/acp_bbcodes.html | 2 +- phpBB/adm/style/acp_groups.html | 2 +- phpBB/adm/style/acp_icons.html | 2 +- phpBB/adm/style/acp_modules.html | 2 +- phpBB/adm/style/acp_permission_roles.html | 2 +- phpBB/adm/style/acp_profile.html | 4 ++-- phpBB/adm/style/acp_ranks.html | 2 +- phpBB/adm/style/acp_reasons.html | 2 +- phpBB/adm/style/acp_words.html | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) (limited to 'phpBB/adm') 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 @@
» {L_ALLOWED_IN_PM_POST} {groups.CATEGORY} -  {ICON_EDIT}  {ICON_DELETE}  +  {ICON_EDIT}  {ICON_DELETE}  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 @@ {bbcodes.BBCODE_TAG} - {ICON_EDIT} {ICON_DELETE} + {ICON_EDIT} {ICON_DELETE} 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 @@ {groups.TOTAL_MEMBERS} {L_SETTINGS} {L_MEMBERS} - {L_DELETE}{L_DELETE} + {L_DELETE}{L_DELETE} 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 @@ {ICON_MOVE_UP_DISABLED}{ICON_MOVE_UP}  {ICON_MOVE_DOWN_DISABLED}{ICON_MOVE_DOWN} -  {ICON_EDIT} {ICON_DELETE} +  {ICON_EDIT} {ICON_DELETE} 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} {ICON_EDIT} - {ICON_DELETE} + {ICON_DELETE} 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} {ICON_EDIT} - {ICON_DELETE} + {ICON_DELETE} diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index 0ac0d78a64..7804533d1a 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -195,7 +195,7 @@ {fields.FIELD_IDENT} {fields.FIELD_TYPE} - {fields.L_ACTIVATE_DEACTIVATE} | {L_TRANSLATE} + {fields.L_ACTIVATE_DEACTIVATE} | {L_TRANSLATE} @@ -213,7 +213,7 @@ {ICON_EDIT_DISABLED} - {ICON_DELETE} + {ICON_DELETE} 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 @@ {ranks.RANK_TITLE}  -   {ranks.RANK_TITLE}   -  {ranks.MIN_POSTS} - {ICON_EDIT} {ICON_DELETE} + {ICON_EDIT} {ICON_DELETE} 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 @@ {ICON_EDIT} - {ICON_DELETE} + {ICON_DELETE} {ICON_DELETE_DISABLED} 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 @@ {words.WORD} {words.REPLACEMENT} -  {ICON_EDIT}  {ICON_DELETE}  +  {ICON_EDIT}  {ICON_DELETE}  -- cgit v1.2.1 From 1cb3b595ec70730429a9c8654b248fc6d50cf1b3 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Wed, 24 Aug 2011 15:45:51 +0100 Subject: [ticket/10271] AJAXified the styles tab in the ACP. PHPBB3-10271 --- phpBB/adm/style/acp_styles.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index dc89aa247a..dfc8def646 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -288,7 +288,7 @@ - {installed.L_STYLE_ACT_DEACT} | + {installed.L_STYLE_ACT_DEACT} | {installed.S_ACTIONS} -- cgit v1.2.1 From 4ae74cd4b450ae4cca956f6f3e2371429f67deec Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Wed, 24 Aug 2011 16:06:06 +0100 Subject: [ticket/10271] AJAXified buttons on acp_main. PHPBB3-10271 --- phpBB/adm/style/acp_main.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index 63ca3a1c79..d9f833d878 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -152,35 +152,35 @@
{L_STATISTIC_RESYNC_OPTIONS} -
+

 
-
+

 
-
+

{L_RESYNC_STATS_EXPLAIN}
-
+

{L_RESYNC_POSTCOUNTS_EXPLAIN}
-
+

{L_RESYNC_POST_MARKING_EXPLAIN}
@@ -188,7 +188,7 @@ -
+

{L_PURGE_SESSIONS_EXPLAIN}
@@ -196,7 +196,7 @@ -
+

{L_PURGE_CACHE_EXPLAIN}
-- cgit v1.2.1 From e7e09f8da26abf0d4e625653d14d68774050a244 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Wed, 24 Aug 2011 16:39:25 +0100 Subject: [ticket/10272] AJAXified the bots page in the ACP. PHPBB3-10272 --- phpBB/adm/style/acp_bots.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html index 886005caa3..e0e9588364 100644 --- a/phpBB/adm/style/acp_bots.html +++ b/phpBB/adm/style/acp_bots.html @@ -76,9 +76,9 @@ {bots.BOT_NAME}  {bots.LAST_VISIT}  -  {bots.L_ACTIVATE_DEACTIVATE}  +  {bots.L_ACTIVATE_DEACTIVATE}   {L_EDIT}  -  {L_DELETE}  +  {L_DELETE}  -- cgit v1.2.1 From bcb824a9f2407523c84501ac1d4260bb27661ff1 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Wed, 24 Aug 2011 16:59:05 +0100 Subject: [ticket/10272] Renamed AJAX callback "style_act_deact" to "act_deact". PHPBB3-10272 --- phpBB/adm/style/acp_bots.html | 2 +- phpBB/adm/style/acp_modules.html | 2 +- phpBB/adm/style/acp_profile.html | 2 +- phpBB/adm/style/acp_styles.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html index e0e9588364..3a5ef72acd 100644 --- a/phpBB/adm/style/acp_bots.html +++ b/phpBB/adm/style/acp_bots.html @@ -76,7 +76,7 @@ {bots.BOT_NAME}  {bots.LAST_VISIT}  -  {bots.L_ACTIVATE_DEACTIVATE}  +  {bots.L_ACTIVATE_DEACTIVATE}   {L_EDIT}   {L_DELETE}  diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html index 6c4645e80c..380a037977 100644 --- a/phpBB/adm/style/acp_modules.html +++ b/phpBB/adm/style/acp_modules.html @@ -148,7 +148,7 @@ {modules.MODULE_IMAGE} {modules.MODULE_TITLE} [{L_HIDDEN_MODULE}] -  {L_DISABLE}{L_ENABLE}  +  {L_DISABLE}{L_ENABLE}  {ICON_MOVE_UP_DISABLED} diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index 7804533d1a..d0920774f1 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -195,7 +195,7 @@ {fields.FIELD_IDENT} {fields.FIELD_TYPE} - {fields.L_ACTIVATE_DEACTIVATE} | {L_TRANSLATE} + {fields.L_ACTIVATE_DEACTIVATE} | {L_TRANSLATE} diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index dfc8def646..0b98dea603 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -288,7 +288,7 @@ - {installed.L_STYLE_ACT_DEACT} | + {installed.L_STYLE_ACT_DEACT} | {installed.S_ACTIONS} -- cgit v1.2.1 From 431a78f34696707973f1c67f4417d6ee85713ee6 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Sun, 11 Sep 2011 15:42:00 +0100 Subject: [ticket/10270] Got rid of the temporary jQuery for the AJAX changes. The jQuery library wasn't included before, so a temporary one was included. Now that igorws jQuery patch has been merged, the temporary library can be removed. PHPBB3-10270 --- phpBB/adm/style/overall_footer.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 625121f1bd..ec3e6a30d3 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -22,15 +22,12 @@
 

{L_LOADING}

{L_PLEASE_WAIT}

- - - - + -- cgit v1.2.1 From 818d98916873945d7e0e7bf2855e982496c7fe35 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Sat, 24 Sep 2011 17:41:58 +0100 Subject: [feature/ajax] Moved script.js into a few different files. Seperated it into: assets/javascript/core.js, styles/prosilver/template/ajax.js and adm/style/ajax.js. PHPBB3-10270 --- phpBB/adm/style/ajax.js | 61 +++++++++++++++++++++++++++++++++++++ phpBB/adm/style/overall_footer.html | 3 +- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 phpBB/adm/style/ajax.js (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js new file mode 100644 index 0000000000..407ef92110 --- /dev/null +++ b/phpBB/adm/style/ajax.js @@ -0,0 +1,61 @@ +(function($) { // Avoid conflicts with other libraries + + + +phpbb.add_ajax_callback('forum_down', function(el) { + var tr = $(el).parents('tr'); + if (tr.is(':first-child')) + { + $(el).parents('span').siblings('.up').html('Move up'); + tr.next().find('.up').html('Move up'); + phpbb.ajaxify({selector: $(el).parents('span').siblings('.up').children('a')}, false, 'forum_up'); + } + tr.insertAfter(tr.next()); + if (tr.is(':last-child')) + { + $(el).html('Move down'); + tr.prev().find('.down').html('Move down'); + phpbb.ajaxify({selector: tr.prev().find('.down').children('a')}, false, 'forum_down'); + } +}).add_ajax_callback('forum_up', function(el) { + var tr = $(el).parents('tr'); + if (tr.is(':last-child')) + { + $(el).parents('span').siblings('.down').html('Move down'); + tr.prev().find('.down').html('Move down'); + phpbb.ajaxify({selector: $(el).parents('span').siblings('.down').children('a')}, false, 'forum_down'); + } + tr.insertBefore(tr.prev()); + if (tr.is(':first-child')) + { + $(el).html('Move up'); + tr.next().find('.up').html('Move up'); + phpbb.ajaxify({selector: tr.next().find('.up').children('a')}, false, 'forum_up'); + } +}).add_ajax_callback('act_deact', function(el, res) { + $(el).text(res.text); + var new_href = $(el).attr('href'); + 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); +}).add_ajax_callback('row_delete', function(el) { + var tr = $(el).parents('tr'); + tr.remove(); +}); + + + +$('[data-ajax]').each(function() { + var fn = ($(this).data('ajax') !== 'true') ? $(this).data('ajax') : null; + phpbb.ajaxify({selector: this}, $(this).data('refresh') !== undefined, fn); +}); + + + +})(jQuery); // Avoid conflicts with other libraries diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index ec3e6a30d3..b57f8261a3 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -27,7 +27,8 @@ - + + -- cgit v1.2.1 From 5b2352613ef8e2bdc4e418b74ea650df825b829c Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Wed, 28 Sep 2011 18:48:46 +0100 Subject: [ticket/10270] Added the alerts to the ACP footer. I had forgotten to do it previously. PHPBB3-10270 --- phpBB/adm/style/overall_footer.html | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index b57f8261a3..e54f75a813 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -22,6 +22,17 @@
 

{L_LOADING}

{L_PLEASE_WAIT}

+ +
+ +

+
+
+ +

+   + +
-- cgit v1.2.1 From 3166cbb33d5ce44fff380d53c4c51ba5f6a2224a Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Sat, 15 Oct 2011 16:21:40 +0100 Subject: [ticket/10270] Replaced find by tag names with class names in the js. What it was before (selecting by tag name) could have caused some problems for style authors. PHPBB3-10270 --- phpBB/adm/style/overall_footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index e54f75a813..d58ac06aaa 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -25,11 +25,11 @@
-

+

-

+

 
-- cgit v1.2.1 From 1c5b1ede1c35d57e9abfb62bdee145828011b1b0 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Sat, 22 Oct 2011 16:16:15 +0100 Subject: [ticket/10271] Added comments to AJAX callbacks. PHPBB3-10271 --- phpBB/adm/style/ajax.js | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index 407ef92110..1c315eeeff 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -1,7 +1,12 @@ (function($) { // Avoid conflicts with other libraries - +/** + * 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(el) { var tr = $(el).parents('tr'); if (tr.is(':first-child')) @@ -32,7 +37,14 @@ phpbb.add_ajax_callback('forum_down', function(el) { tr.next().find('.up').html('Move up'); phpbb.ajaxify({selector: tr.next().find('.up').children('a')}, false, 'forum_up'); } -}).add_ajax_callback('act_deact', function(el, res) { +}); + +/** + * 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('act_deact', function(el, res) { $(el).text(res.text); var new_href = $(el).attr('href'); if (new_href.indexOf('deactivate') !== -1) @@ -44,7 +56,13 @@ phpbb.add_ajax_callback('forum_down', function(el) { new_href = new_href.replace('activate', 'deactivate') } $(el).attr('href', new_href); -}).add_ajax_callback('row_delete', function(el) { +}); + +/** + * 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(el) { var tr = $(el).parents('tr'); tr.remove(); }); -- cgit v1.2.1 From 95659ba92c01a3cf4c654568e9a59ba554558a7e Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Sat, 22 Oct 2011 16:31:52 +0100 Subject: [ticket/10271] Reduced calls to $ in the AJAX JavaScript. PHPBB3-10271 --- phpBB/adm/style/ajax.js | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index 1c315eeeff..2fdabd2a80 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -8,32 +8,34 @@ * activates any up / down icons that require it (the ones at the top or bottom). */ phpbb.add_ajax_callback('forum_down', function(el) { - var tr = $(el).parents('tr'); + el = $(el); + var tr = el.parents('tr'); if (tr.is(':first-child')) { - $(el).parents('span').siblings('.up').html('Move up'); + el.parents('span').siblings('.up').html('Move up'); tr.next().find('.up').html('Move up'); - phpbb.ajaxify({selector: $(el).parents('span').siblings('.up').children('a')}, false, 'forum_up'); + phpbb.ajaxify({selector: el.parents('span').siblings('.up').children('a')}, false, 'forum_up'); } tr.insertAfter(tr.next()); if (tr.is(':last-child')) { - $(el).html('Move down'); + el.html('Move down'); tr.prev().find('.down').html('Move down'); phpbb.ajaxify({selector: tr.prev().find('.down').children('a')}, false, 'forum_down'); } }).add_ajax_callback('forum_up', function(el) { - var tr = $(el).parents('tr'); + el = $(el); + var tr = el.parents('tr'); if (tr.is(':last-child')) { - $(el).parents('span').siblings('.down').html('Move down'); + el.parents('span').siblings('.down').html('Move down'); tr.prev().find('.down').html('Move down'); - phpbb.ajaxify({selector: $(el).parents('span').siblings('.down').children('a')}, false, 'forum_down'); + phpbb.ajaxify({selector: el.parents('span').siblings('.down').children('a')}, false, 'forum_down'); } tr.insertBefore(tr.prev()); if (tr.is(':first-child')) { - $(el).html('Move up'); + el.html('Move up'); tr.next().find('.up').html('Move up'); phpbb.ajaxify({selector: tr.next().find('.up').children('a')}, false, 'forum_up'); } @@ -45,8 +47,9 @@ phpbb.add_ajax_callback('forum_down', function(el) { * in the href with "deactivate", and vice versa. */ phpbb.add_ajax_callback('act_deact', function(el, res) { - $(el).text(res.text); - var new_href = $(el).attr('href'); + el = $(el); + el.text(res.text); + var new_href = el.attr('href'); if (new_href.indexOf('deactivate') !== -1) { new_href = new_href.replace('deactivate', 'activate') @@ -55,7 +58,7 @@ phpbb.add_ajax_callback('act_deact', function(el, res) { { new_href = new_href.replace('activate', 'deactivate') } - $(el).attr('href', new_href); + el.attr('href', new_href); }); /** @@ -70,8 +73,9 @@ phpbb.add_ajax_callback('row_delete', function(el) { $('[data-ajax]').each(function() { - var fn = ($(this).data('ajax') !== 'true') ? $(this).data('ajax') : null; - phpbb.ajaxify({selector: this}, $(this).data('refresh') !== undefined, fn); + var $this = $(this); + var fn = ($this.data('ajax') !== 'true') ? $this.data('ajax') : null; + phpbb.ajaxify({selector: this}, $this.data('refresh') !== undefined, fn); }); -- cgit v1.2.1 From 81200236052333f88bbf6ecf0c2198080481c07a Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Sat, 22 Oct 2011 16:37:35 +0100 Subject: [ticket/10271] data-ajax="false" is now ignored. PHPBB3-10271 --- phpBB/adm/style/ajax.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index 2fdabd2a80..cb3289b936 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -74,8 +74,11 @@ phpbb.add_ajax_callback('row_delete', function(el) { $('[data-ajax]').each(function() { var $this = $(this); - var fn = ($this.data('ajax') !== 'true') ? $this.data('ajax') : null; - phpbb.ajaxify({selector: this}, $this.data('refresh') !== undefined, fn); + if ($this.data('ajax') !== 'false') + { + var fn = ($this.data('ajax') !== 'true') ? $this.data('ajax') : null; + phpbb.ajaxify({selector: this}, $this.data('refresh') !== undefined, fn); + } }); -- cgit v1.2.1 From 03d4ae20d1fc98b43edfdf26ae2a2379e52b3182 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Sat, 22 Oct 2011 17:18:09 +0100 Subject: [ticket/10271] Started using .call for javascript callbacks. Previously, they were just being called by appending parentheses and functions. Now, they're being called and the element is being set as the context instead of a parameter. It's a lot cleaner. PHPBB3-10271 --- phpBB/adm/style/ajax.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index cb3289b936..869126ab76 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -7,8 +7,8 @@ * 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(el) { - el = $(el); +phpbb.add_ajax_callback('forum_down', function() { + el = $(this); var tr = el.parents('tr'); if (tr.is(':first-child')) { @@ -23,8 +23,8 @@ phpbb.add_ajax_callback('forum_down', function(el) { tr.prev().find('.down').html('Move down'); phpbb.ajaxify({selector: tr.prev().find('.down').children('a')}, false, 'forum_down'); } -}).add_ajax_callback('forum_up', function(el) { - el = $(el); +}).add_ajax_callback('forum_up', function() { + el = $(this); var tr = el.parents('tr'); if (tr.is(':last-child')) { @@ -46,8 +46,8 @@ phpbb.add_ajax_callback('forum_down', function(el) { * 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('act_deact', function(el, res) { - el = $(el); +phpbb.add_ajax_callback('act_deact', function(res) { + el = $(this); el.text(res.text); var new_href = el.attr('href'); if (new_href.indexOf('deactivate') !== -1) @@ -65,9 +65,8 @@ phpbb.add_ajax_callback('act_deact', function(el, res) { * 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(el) { - var tr = $(el).parents('tr'); - tr.remove(); +phpbb.add_ajax_callback('row_delete', function() { + $(this).parents('tr').remove(); }); -- cgit v1.2.1 From 885c2914db51f0ed8157d9e43333d89dcfdb0153 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Sat, 22 Oct 2011 22:48:05 +0100 Subject: [ticket/10270] Fixed JavaScript alerts in the ACP. PHPBB3-10270 --- phpBB/adm/images/alert_close.png | Bin 0 -> 669 bytes phpBB/adm/style/admin.css | 10 ++++++++-- phpBB/adm/style/overall_footer.html | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 phpBB/adm/images/alert_close.png (limited to 'phpBB/adm') diff --git a/phpBB/adm/images/alert_close.png b/phpBB/adm/images/alert_close.png new file mode 100644 index 0000000000..123ac4ac90 Binary files /dev/null and b/phpBB/adm/images/alert_close.png differ diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 70c06f2d62..01af071766 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1072,7 +1072,7 @@ input.disabled { /* jQuery popups ---------------------------------------- */ -.jalert { +.phpbb_alert { background-color: #FFFFFF; border: 1px solid #999999; position: fixed; @@ -1085,7 +1085,13 @@ input.disabled { padding: 0 25px 20px 25px; } -.jalert p { +.phpbb_alert img.alert_close { + float: right; + margin-top: -7px; + margin-right: -30px; +} + +.phpbb_alert p { margin: 8px 0; padding-bottom: 8px; } diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index d58ac06aaa..5daaa4c6db 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -24,11 +24,11 @@
- +

- +

  -- cgit v1.2.1 From 05a88966d4d7156417c151d657989dca4ae01b87 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Thu, 17 Nov 2011 17:37:51 +0000 Subject: [ticket/10272] Renamed AJAX callback act_deact to activate_deactivate. PHPBB3-10272 --- phpBB/adm/style/acp_bots.html | 2 +- phpBB/adm/style/acp_profile.html | 2 +- phpBB/adm/style/acp_styles.html | 2 +- phpBB/adm/style/ajax.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html index 3a5ef72acd..87679fc33a 100644 --- a/phpBB/adm/style/acp_bots.html +++ b/phpBB/adm/style/acp_bots.html @@ -76,7 +76,7 @@ {bots.BOT_NAME}  {bots.LAST_VISIT}  -  {bots.L_ACTIVATE_DEACTIVATE}  +  {bots.L_ACTIVATE_DEACTIVATE}   {L_EDIT}   {L_DELETE}  diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index d0920774f1..4a6df768a8 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -195,7 +195,7 @@ {fields.FIELD_IDENT} {fields.FIELD_TYPE} - {fields.L_ACTIVATE_DEACTIVATE} | {L_TRANSLATE} + {fields.L_ACTIVATE_DEACTIVATE} | {L_TRANSLATE} diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index 0b98dea603..a166623f89 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -288,7 +288,7 @@ - {installed.L_STYLE_ACT_DEACT} | + {installed.L_STYLE_ACT_DEACT} | {installed.S_ACTIONS} diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index 869126ab76..88c28fe071 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -46,7 +46,7 @@ phpbb.add_ajax_callback('forum_down', function() { * 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('act_deact', function(res) { +phpbb.add_ajax_callback('activate_deactivate', function(res) { el = $(this); el.text(res.text); var new_href = el.attr('href'); -- cgit v1.2.1 From 2189efadc624deb515df1ba04c232724a2f8eae3 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Fri, 18 Nov 2011 17:31:10 +0000 Subject: [ticket/10270] Moved the AJAX error langyage entries to the footer. PHPBB3-10270 --- phpBB/adm/style/overall_footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 5daaa4c6db..549b6995af 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -23,7 +23,7 @@

{L_LOADING}

{L_PLEASE_WAIT}

-
+

-- cgit v1.2.1 From 81e357beef9e1e82607e59d59deba1cf54af4257 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Fri, 18 Nov 2011 17:33:22 +0000 Subject: [ticket/10272] Removed some duplication calls to $.fn.data. PHPBB3-10272 --- phpBB/adm/style/ajax.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index 88c28fe071..902e072dda 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -72,10 +72,10 @@ phpbb.add_ajax_callback('row_delete', function() { $('[data-ajax]').each(function() { - var $this = $(this); - if ($this.data('ajax') !== 'false') + var $this = $(this), ajax = $this.data('ajax'); + if (ajax !== 'false') { - var fn = ($this.data('ajax') !== 'true') ? $this.data('ajax') : null; + var fn = (ajax !== 'true') ? ajax : null; phpbb.ajaxify({selector: this}, $this.data('refresh') !== undefined, fn); } }); -- cgit v1.2.1 From 30888ff2a009fe5a001046484d5df4b6e2c67ac8 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Wed, 8 Feb 2012 18:42:21 +0100 Subject: [feature/ajax] Use attr('data-foo') instead of data('foo') data() is slower and does additional unwanted things like caching and type conversion. Just reading the value is safer. PHPBB3-10270 --- phpBB/adm/style/ajax.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index 902e072dda..50477eef90 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -12,7 +12,7 @@ phpbb.add_ajax_callback('forum_down', function() { var tr = el.parents('tr'); if (tr.is(':first-child')) { - el.parents('span').siblings('.up').html('Move up'); + el.parents('span').siblings('.up').html('Move up'); tr.next().find('.up').html('Move up'); phpbb.ajaxify({selector: el.parents('span').siblings('.up').children('a')}, false, 'forum_up'); } @@ -20,7 +20,7 @@ phpbb.add_ajax_callback('forum_down', function() { if (tr.is(':last-child')) { el.html('Move down'); - tr.prev().find('.down').html('Move down'); + tr.prev().find('.down').html('Move down'); phpbb.ajaxify({selector: tr.prev().find('.down').children('a')}, false, 'forum_down'); } }).add_ajax_callback('forum_up', function() { @@ -28,7 +28,7 @@ phpbb.add_ajax_callback('forum_down', function() { var tr = el.parents('tr'); if (tr.is(':last-child')) { - el.parents('span').siblings('.down').html('Move down'); + el.parents('span').siblings('.down').html('Move down'); tr.prev().find('.down').html('Move down'); phpbb.ajaxify({selector: el.parents('span').siblings('.down').children('a')}, false, 'forum_down'); } @@ -36,7 +36,7 @@ phpbb.add_ajax_callback('forum_down', function() { if (tr.is(':first-child')) { el.html('Move up'); - tr.next().find('.up').html('Move up'); + tr.next().find('.up').html('Move up'); phpbb.ajaxify({selector: tr.next().find('.up').children('a')}, false, 'forum_up'); } }); @@ -72,11 +72,11 @@ phpbb.add_ajax_callback('row_delete', function() { $('[data-ajax]').each(function() { - var $this = $(this), ajax = $this.data('ajax'); + var $this = $(this), ajax = $this.attr('data-ajax'); if (ajax !== 'false') { var fn = (ajax !== 'true') ? ajax : null; - phpbb.ajaxify({selector: this}, $this.data('refresh') !== undefined, fn); + phpbb.ajaxify({selector: this}, $this.attr('data-refresh') !== undefined, fn); } }); -- cgit v1.2.1 From 628074bf7057ad5f9aff929d7c8cd85171ce60b8 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Wed, 8 Feb 2012 19:02:16 +0100 Subject: [feature/ajax] Stylistic JavaScript adjustments PHPBB3-10270 --- phpBB/adm/style/ajax.js | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index 50477eef90..2725d9fa0a 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -8,8 +8,9 @@ * activates any up / down icons that require it (the ones at the top or bottom). */ phpbb.add_ajax_callback('forum_down', function() { - el = $(this); - var tr = el.parents('tr'); + var el = $(this), + tr = el.parents('tr'); + if (tr.is(':first-child')) { el.parents('span').siblings('.up').html('Move up'); @@ -23,9 +24,12 @@ phpbb.add_ajax_callback('forum_down', function() { tr.prev().find('.down').html('Move down'); phpbb.ajaxify({selector: tr.prev().find('.down').children('a')}, false, 'forum_down'); } -}).add_ajax_callback('forum_up', function() { - el = $(this); - var tr = el.parents('tr'); +}); + +phpbb.add_ajax_callback('forum_up', function() { + var el = $(this), + tr = el.parents('tr'); + if (tr.is(':last-child')) { el.parents('span').siblings('.down').html('Move down'); @@ -47,9 +51,9 @@ phpbb.add_ajax_callback('forum_down', function() { * in the href with "deactivate", and vice versa. */ phpbb.add_ajax_callback('activate_deactivate', function(res) { - el = $(this); + var el = $(this), + new_href = el.attr('href'); el.text(res.text); - var new_href = el.attr('href'); if (new_href.indexOf('deactivate') !== -1) { new_href = new_href.replace('deactivate', 'activate') @@ -72,10 +76,13 @@ phpbb.add_ajax_callback('row_delete', function() { $('[data-ajax]').each(function() { - var $this = $(this), ajax = $this.attr('data-ajax'); + var $this = $(this), + ajax = $this.attr('data-ajax'), + fn; + if (ajax !== 'false') { - var fn = (ajax !== 'true') ? ajax : null; + fn = (ajax !== 'true') ? ajax : null; phpbb.ajaxify({selector: this}, $this.attr('data-refresh') !== undefined, fn); } }); -- cgit v1.2.1 From d53c36684db5ee592b871f518364ae9de03d3e8b Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Wed, 8 Feb 2012 19:03:30 +0100 Subject: [feature/ajax] JavaScript strict mode PHPBB3-10270 --- phpBB/adm/style/ajax.js | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index 2725d9fa0a..9b73b618d6 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -1,5 +1,6 @@ (function($) { // Avoid conflicts with other libraries +"use strict"; /** * The following callbacks are for reording forums in acp_forums. forum_down -- cgit v1.2.1 From 7ed2cbef75e2e3e561dec00cad26870684968a3a Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Wed, 8 Feb 2012 19:56:25 +0100 Subject: [feature/ajax] Make phpbb.ajaxify signature use single object (more explicit) PHPBB3-10270 --- phpBB/adm/style/ajax.js | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index 9b73b618d6..b4385b2740 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -16,14 +16,20 @@ phpbb.add_ajax_callback('forum_down', function() { { el.parents('span').siblings('.up').html('Move up'); tr.next().find('.up').html('Move up'); - phpbb.ajaxify({selector: el.parents('span').siblings('.up').children('a')}, false, 'forum_up'); + phpbb.ajaxify({ + selector: el.parents('span').siblings('.up').children('a'), + callback: 'forum_up' + }); } tr.insertAfter(tr.next()); if (tr.is(':last-child')) { el.html('Move down'); tr.prev().find('.down').html('Move down'); - phpbb.ajaxify({selector: tr.prev().find('.down').children('a')}, false, 'forum_down'); + phpbb.ajaxify({ + selector: tr.prev().find('.down').children('a'), + callback: 'forum_down' + }); } }); @@ -35,14 +41,20 @@ phpbb.add_ajax_callback('forum_up', function() { { el.parents('span').siblings('.down').html('Move down'); tr.prev().find('.down').html('Move down'); - phpbb.ajaxify({selector: el.parents('span').siblings('.down').children('a')}, false, 'forum_down'); + phpbb.ajaxify({ + selector: el.parents('span').siblings('.down').children('a'), + callback: 'forum_down' + }); } tr.insertBefore(tr.prev()); if (tr.is(':first-child')) { el.html('Move up'); tr.next().find('.up').html('Move up'); - phpbb.ajaxify({selector: tr.next().find('.up').children('a')}, false, 'forum_up'); + phpbb.ajaxify({ + selector: tr.next().find('.up').children('a'), + callback: 'forum_up' + }); } }); @@ -84,7 +96,11 @@ $('[data-ajax]').each(function() { if (ajax !== 'false') { fn = (ajax !== 'true') ? ajax : null; - phpbb.ajaxify({selector: this}, $this.attr('data-refresh') !== undefined, fn); + phpbb.ajaxify({ + selector: this, + refresh: $this.attr('data-refresh') !== undefined, + callback: fn + }); } }); -- cgit v1.2.1 From 8a0d8c0a84e119121bc9bd69c757aa4776d42acb Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Wed, 8 Feb 2012 20:38:23 +0100 Subject: [feature/ajax] Do not hard-code sorting images of acp_forums ordering PHPBB3-10270 --- phpBB/adm/style/acp_forums.html | 8 ++++++++ phpBB/adm/style/admin.css | 4 ++++ phpBB/adm/style/ajax.js | 39 +++++++++++++++++++++++++++++++-------- 3 files changed, 43 insertions(+), 8 deletions(-) (limited to 'phpBB/adm') 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 @@
+ + 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('Move up'); - tr.next().find('.up').html('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('Move down'); - tr.prev().find('.down').html('Move down'); + 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('Move down'); - tr.prev().find('.down').html('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('Move up'); - tr.next().find('.up').html('Move up'); + 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' -- cgit v1.2.1 From 27199bb50954e22416e64154032e08801d0fbb6d Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Wed, 15 Feb 2012 20:58:00 +0100 Subject: [feature/ajax] Generic error handling with a phpbb.alert box PHPBB3-10270 --- phpBB/adm/style/overall_footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 549b6995af..dfe161fd76 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -18,7 +18,7 @@ {DEBUG_OUTPUT} -
+
 

{L_LOADING}

{L_PLEASE_WAIT}

-- cgit v1.2.1 From 6145e0ba65978e11249f6eb13d40391f348200ed Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Wed, 22 Feb 2012 14:42:19 +0200 Subject: [ticket/10270] Changing close button for ajax popups Changed close button for popups to match prosilver style and from img to css, moved color values to colours.css PHPBB3-10270 --- phpBB/adm/images/alert_close.png | Bin 669 -> 2097 bytes phpBB/adm/style/admin.css | 14 ++++++++++++-- phpBB/adm/style/overall_footer.html | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/images/alert_close.png b/phpBB/adm/images/alert_close.png index 123ac4ac90..79750a013c 100644 Binary files a/phpBB/adm/images/alert_close.png and b/phpBB/adm/images/alert_close.png differ diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index a162d44f9d..d5dc957ac5 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1089,11 +1089,21 @@ input.disabled { padding: 0 25px 20px 25px; } -.phpbb_alert img.alert_close { +.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: -30px; + margin-right: -31px; } +.phpbb_alert .alert_close:hover { + background-position: 0 -16px; +} + .phpbb_alert p { margin: 8px 0; diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index dfe161fd76..0337080f3d 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -24,11 +24,11 @@
- +

- +

  -- cgit v1.2.1 From d3e7744dd6968b941fb3216ee2a989ed6a0c2ba1 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sat, 31 Mar 2012 00:59:49 +0200 Subject: [feature/ajax] Remove not working module enable/disable ajax code PHPBB3-10270 --- phpBB/adm/style/acp_modules.html | 2 +- phpBB/adm/style/ajax.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html index 380a037977..6c4645e80c 100644 --- a/phpBB/adm/style/acp_modules.html +++ b/phpBB/adm/style/acp_modules.html @@ -148,7 +148,7 @@ {modules.MODULE_IMAGE} {modules.MODULE_TITLE} [{L_HIDDEN_MODULE}] -  {L_DISABLE}{L_ENABLE}  +  {L_DISABLE}{L_ENABLE}  {ICON_MOVE_UP_DISABLED} diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index 0c00efee1b..fd2f7a2122 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -89,7 +89,9 @@ phpbb.add_ajax_callback('forum_up', function() { 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') @@ -98,6 +100,7 @@ phpbb.add_ajax_callback('activate_deactivate', function(res) { { new_href = new_href.replace('activate', 'deactivate') } + el.attr('href', new_href); }); -- cgit v1.2.1 From ef03f8d0536033d1ef4739c5884d1a1f919618bd Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sat, 31 Mar 2012 01:15:13 +0200 Subject: [feature/ajax] Fix acp_styles activate_deactivate ajax callback name PHPBB3-10270 --- phpBB/adm/style/acp_styles.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/adm') diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index a166623f89..3532e8c7d9 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -288,7 +288,7 @@ - {installed.L_STYLE_ACT_DEACT} | + {installed.L_STYLE_ACT_DEACT} | {installed.S_ACTIONS} -- cgit v1.2.1