Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 85 commits
  • 44 files changed
  • 0 comments
  • 2 contributors
Dec 23, 2011
Callum Macrae callumacrae [ticket/10270] Added JavaScript popups and basic AJAX functionality t…
…o PHP.

This commit adds the phpbb object (JavaScript), and alert and confirm box
methods. It also adds the first basic AJAX functionality, to deleting posts
in viewtopic.

PHPBB3-10270
6252756
Callum Macrae callumacrae [ticket/10271] Added phpbb.confirm_box (JavaScript).
As well as adding the method, this commit also changes the previous commit
so that deleting a post from viewtopic uses this method, too. This commit
has also made some improvements to phpbb.alert and phpbb.confirm.

PHPBB3-10271
cea33ed
Callum Macrae callumacrae [ticket/10272] AJAXified most links.
This commit makes some significant changes to the phpbb.confirm_box function
(namely, removing some duplicate code), and also manually adds most link
to the phpBB AJAX functions.

PHPBB3-10272
b0619b5
Callum Macrae callumacrae [feature/ajax] Cleaned up AJAX-related JavaScript.
Mostly just added comments, but has cleaned up some actual code too.
02ba514
Callum Macrae callumacrae [ticket/10273] AJAXified approve / disapprove posts (in viewtopic).
This commit AJAXifies the moderator approval functionality, and adds it to
viewtopic instead of the MCP. This commit has involved some language changes,
which may affect fallbacks.

PHPBB3-10273
a2852a3
Callum Macrae callumacrae [ticket/10270] Cleaned up code and made popups fade.
This commit cleans up some code - mostly, replacing all instances of __self
with "that", and also replacing the parse_hidden function with jQuerys built
in .serialize. It also adds animations to the popups.

PHPBB3-10270
c4f0c3a
Callum Macrae callumacrae [ticket/10273] Added phpbb.ajaxify_form and converted accept / deny t…
…o it.

Also made a few minor improvements to other JavaScript.

PHPBB3-10273
76258cd
Callum Macrae callumacrae [feature/ajax] Reduced duplicate code by merging all AJAX function in…
…to one.

This commit merges phpbb.confirm_box, phpbb.ajaxify and phpbb.ajaxify_form into
one function which automatically detects what is happening and calls the
correct code accordingly. This has removed a lot of duplicate code and
generally made the code cleaner.
2468756
Callum Macrae callumacrae [ticket/10270] Changed function names of jQuery modifications.
The code was modifying the jQuery code before, now the functions have been
renamed to unused function names.

PHPBB3-10270
8abd102
Callum Macrae callumacrae [ticket/10272] Made some jQuery selectors more specific to avoid conf…
…licts.

Before, a link to any URL with, say, "mode=bump" in the title would have been
prevented from acting normally.

PHPBB3-10272
16edb77
Callum Macrae callumacrae [ticket/10271] Added ability for exceptions to phpbb.ajaxify.
Also made it easy for additional options to be added in the future.

PHPBB3-10271
8247e10
Callum Macrae callumacrae [ticket/10270] Removed the js anim functions.
This commit removes the hide_anim, show_anim and remove_anim functions and
replaces them with built in jQuery function that do exactly the same thing.

PHPBB3-10270
303975f
Callum Macrae callumacrae [feature/ajax] Replaced jQuery selectors with data attributes.
Due to problems that could have been caused by selecting the element using
jQuery selectors, they have been replaced by HTML5 data attributes.
68d2e21
Callum Macrae callumacrae [ticket/10271] AJAXified Quick-mod tools.
Also made some improvements to the exceptions.

PHPBB3-10271
51ceba8
Callum Macrae callumacrae [ticket/10291] AJAXified quick reply form.
Also changed the show quick reply button to a button, not a submit - it was
affecting the behaviour of phpbb.ajaxify.

PHPBB3-10291
4d375cc
Callum Macrae callumacrae [ticket/10270] Makes page fade to dark on popup, and added $.querystr…
…ing.

PHPBB3-10270
9cdfeec
Callum Macrae callumacrae [feature/ajax] Added code to avoid conflicts with other libraries usi…
…ng $
10b1966
Callum Macrae callumacrae [ticket/10270] Fixed a bug where fadedark wouldn't go.
If the confirm box was submitted as yes, then the fadedark would stay until it
was clicked. This commit fixes that.

PHPBB3-10270
cf79e6f
Callum Macrae callumacrae [feature/ajax] Fixed a small bug in the JavaScript.
The bug meant that code outside of the function that ran on document ready would
not be able to access the phpbb object.
c3b590e
Callum Macrae callumacrae [ticket/10281] AJAXified reordering forums in the ACP.
PHPBB3-10281
e66e379
Callum Macrae callumacrae [ticket/10272] AJAXified the add / remove friend / foe links.
PHPBB3-10272
7778d11
Callum Macrae callumacrae [ticket/10270] Added keyboard shortcuts to confirm and alert boxes.
PHPBB3-10270
2325a06
Callum Macrae callumacrae [ticket/10271] Changed AJAX functions to $request->is_ajax().
PHPBB3-10271
954a086
Callum Macrae callumacrae [ticket/10328] Added a JSON class.
The JSON class adds a consistent way to send JSON to the client, making
it perfect for AJAX (jQuery automatically parses it).

PHPBB3-10328
91bb230
Callum Macrae callumacrae [ticket/10270] Lengthened the timeout on the AJAX request error.
It was at 3 seconds before, now it is at 5 seconds from when the popup
has faded in.

PHPBB3-10270
4acb454
Callum Macrae callumacrae [ticket/10272] Zebra operations using AJAX are now less hacky.
Before, they were splitting stuff by the <br />, and now JSON::add() is
being used.

PHPBB3-10272
d019398
Callum Macrae callumacrae [ticket/10271] Moved $.querystring to phpbb.parse_querystring.
PHPBB3-10271
b8aa0ab
Callum Macrae callumacrae [ticket/10270] Added jQuery popup CSS to the ACP.
It was missing previously, meaning that it displayed wrong and in the
footer.

PHPBB3-10270
bd83a4e
Callum Macrae callumacrae [ticket/10270] Moved some HTML from the JavaScript to overall_footer.
PHPBB3-10270
478d1e0
Callum Macrae callumacrae [feature/ajax] Changed JavaScript comments to follow coding guidelines.
Also replaced a couple instances of "@return" with "@returns".
7df1c88
Callum Macrae callumacrae [ticket/10328] Renamed the JSON class, also now using autoloading.
It is no longer static, and uses autoloading. It has also been renamed
from JSON to phpbb_json_response.

PHPBB3-10328
ca7e2ab
Callum Macrae callumacrae [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
682563e
Callum Macrae callumacrae [ticket/10271] AJAXified the styles tab in the ACP.
PHPBB3-10271
6ecc7fa
Callum Macrae callumacrae [ticket/10271] AJAXified buttons on acp_main.
PHPBB3-10271
89176e9
Callum Macrae callumacrae [ticket/10270] Made the alert after an AJAX operation optional.
PHPBB3-10270
1d69007
Callum Macrae callumacrae [ticket/10272] AJAXified the bots page in the ACP.
PHPBB3-10272
7c87e78
Callum Macrae callumacrae [ticket/10272] Renamed AJAX callback "style_act_deact" to "act_deact".
PHPBB3-10272
104f33a
Callum Macrae callumacrae [ticket/10271] Cleaned up phpbb.ajaxify.
Reduced a lot of duplicate code and made it more efficient.

PHPBB3-10271
7d77e0b
Callum Macrae callumacrae [ticket/10270] Increased the speed of the animations.
PHPBB3-10270
f481480
Callum Macrae callumacrae [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
05c58f4
Callum Macrae callumacrae [ticket/10270] Sped up animations of popups.
They were too slow and were hampering the user experience on boards with
a fast connection such as local boards.

PHPBB3-10270
033ccdb
Callum Macrae callumacrae [ticket/10328] Added capital to "Content-type" in phpbb_json_response.
It was originally Content-type, but has been replaced with Content-Type,
which is correct.

PHPBB3-10328
6733bf6
Callum Macrae callumacrae [ticket/10270] Removed some unnecessary calls to $() in script.js.
Sometimes, jQuery objects were being sent through the jQuery function
again, wasting resources.

PHPBB3-10270
06e249b
Callum Macrae callumacrae [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.
c64de0c
Callum Macrae callumacrae [ticket/10270] Removed all the inline language and HTML from the JS.
PHPBB3-10270
3e0607a
Callum Macrae callumacrae [ticket/10270] Added close buttons to phpbb.alert and phpbb.confirm.
PHPBB3-10270
053124c
Callum Macrae callumacrae [ticket/10270] Renamed the CSS class "jalert" to "phpbb_alert".
PHPBB3-10270
786d682
Callum Macrae callumacrae [ticket/10271] Removed excess whitespace from core.js.
PHPBB3-10271
8759b98
Callum Macrae callumacrae [ticket/10270] Replaced keydown numbers with named constants.
PHPBB3-10270
3dcec43
Callum Macrae callumacrae [ticket/10270] Added the alerts to the ACP footer.
I had forgotten to do it previously.

PHPBB3-10270
9bc8b44
Callum Macrae callumacrae [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
11b8cf2
Callum Macrae callumacrae [ticket/10271] Added comments to the JavaScript ajax functions.
PHPBB3-10271
ac0bb79
Callum Macrae callumacrae [ticket/10272] Fixed a bug in the ajax exceptions callback handler.
It was using code copied from a few lines above, which was designed for
forms and doesn't work with links.

PHPBB3-10272
1cc2676
Callum Macrae callumacrae [ticket/10270] DRYed alert fades in core.js.
PHPBB3-10270
acd0e71
Callum Macrae callumacrae [ticket/10270] Made a comment clearer for phpbb.confirm.
PHPBB3-10270
9cc563b
Callum Macrae callumacrae [ticket/10270] Added a comment to phpbb.loading_alert.
PHPBB3-10270
66558fa
Callum Macrae callumacrae [ticket/10270] Added a new line to constant declarations in JS.
PHPBB3-10270
c8b820b
Callum Macrae callumacrae [ticket/10270] Fixed comments for phpbb.alert and phpbb.confirm.
PHPBB3-10270
1a7a487
Callum Macrae callumacrae [ticket/10270] Reduced calls to split in phpbb.parse_querystring.
PHPBB3-10270
4a193d6
Callum Macrae callumacrae [ticket/10270] Renamed a variable in phpbb.parse_querystring.
It was originally "end", but was renamed to "params" to be more
descriptive.

PHPBB3-10270
d27b48f
Callum Macrae callumacrae [ticket/10271] Added comments to AJAX callbacks.
PHPBB3-10271
ff33a6a
Callum Macrae callumacrae [ticket/10271] Reduced calls to $ in the AJAX JavaScript.
PHPBB3-10271
4629d3c
Callum Macrae callumacrae [ticket/10271] data-ajax="false" is now ignored.
PHPBB3-10271
f79edb6
Callum Macrae callumacrae [ticket/10271] Improved the comments on return_handler.
PHPBB3-10271
06826e8
Callum Macrae callumacrae [ticket/10271] Renamed the "act" js variable to "action".
PHPBB3-10271
14ae4c7
Callum Macrae callumacrae [ticket/10271] Reduced calls to $ in phpbb.ajaxify. 3256185
Callum Macrae callumacrae [ticket/10273] Changed variable names in the quickmodform AJAX.
They're now more descriptive.

PHPBB3-10273
27d206f
Callum Macrae callumacrae [ticket/10271] Fixed the comment for phpbb.parse_querystring.
PHPBB3-10271
a1b2f0d
Callum Macrae callumacrae [ticket/10270] Fixed a bug with the close button in phpbb.confirm.
PHPBB3-10270
8341a61
Callum Macrae callumacrae [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
fcd3d0a
Callum Macrae callumacrae [ticket/10270] Fixed JavaScript alerts in the ACP.
PHPBB3-10270
db0a699
Callum Macrae callumacrae [ticket/10270] Recoded some potentially buggy code in phpbb.confirm.
The code before could have removed event handlers defined by other code.

PHPBB3-10270
662b0a3
Callum Macrae callumacrae [ticket/10328] Fixed the header of json_response.php.
PHPBB3-10328
7d96d0d
Callum Macrae callumacrae [ticket/10271] Added a comment to the AJAXification of quick-mod tools.
The comment clarifies which make_ functions use AJAX.

PHPBB3-10271
9aaea08
Callum Macrae callumacrae [ticket/10272] Renamed a JavaScript variable.
PHPBB3-10272
3932937
Callum Macrae callumacrae [ticket/10272] Added a space to the beginning of a comment.
PHPBB3-10272
7f031cb
Callum Macrae callumacrae [ticket/10272] Renamed l-err-processing-req to l-timeout-processing-req.
PHPBB3-10272
22740c5
Callum Macrae callumacrae [ticket/10272] Renamed AJAX callback act_deact to activate_deactivate.
PHPBB3-10272
2371f7c
Callum Macrae callumacrae [ticket/10272] Made a JS selector less specific.
Now, style authors can change the posts to not be divs without the code
breaking!

PHPBB3-10272
99386fa
Callum Macrae callumacrae [ticket/10270] Moved the AJAX error langyage entries to the footer.
PHPBB3-10270
4e8436f
Callum Macrae callumacrae [ticket/10272] Removed some duplication calls to $.fn.data.
PHPBB3-10272
bfac81d
Callum Macrae callumacrae [ticket/10271] Improved the AJAXification of the quick-mod tools.
Instead of passing the querystring, now gets the value properly.

PHPBB3-10271
95935c6
Callum Macrae callumacrae [ticket/10271] Renamed an unhelpful variable name in core.js.
PHPBB3-10271
be3df90
Callum Macrae callumacrae [ticket/10271] Added some documentation to phpbb.ajaxify.
PHPBB3-10271
4350234
Oleg Pudeyev [ticket/10270] Whitespace.
PHPBB3-10270
3e327f6