mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 16:05:00 +02:00
[feature/ajax] Changed JavaScript comments to follow coding guidelines.
Also replaced a couple instances of "@return" with "@returns". PHPBB3-10270
This commit is contained in:
parent
420de9c9a0
commit
c92b30d66c
@ -1,6 +1,6 @@
|
|||||||
var phpbb = {};
|
var phpbb = {};
|
||||||
|
|
||||||
(function($) { //avoid conflicts with other libraries
|
(function($) { // Avoid conflicts with other libraries
|
||||||
|
|
||||||
|
|
||||||
var dark = $('#darkenwrapper'),
|
var dark = $('#darkenwrapper'),
|
||||||
@ -9,6 +9,8 @@ var dark = $('#darkenwrapper'),
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a loading screen.
|
* Display a loading screen.
|
||||||
|
*
|
||||||
|
* @returns object Returns loading_alert.
|
||||||
*/
|
*/
|
||||||
phpbb.loading_alert = function() {
|
phpbb.loading_alert = function() {
|
||||||
if (dark.is(':visible'))
|
if (dark.is(':visible'))
|
||||||
@ -39,7 +41,7 @@ phpbb.loading_alert = function() {
|
|||||||
* @param bool fadedark Remove the dark background when done? Defaults
|
* @param bool fadedark Remove the dark background when done? Defaults
|
||||||
* to yes.
|
* to yes.
|
||||||
*
|
*
|
||||||
* @return Returns the div created.
|
* @returns object Returns the div created.
|
||||||
*/
|
*/
|
||||||
phpbb.alert = function(title, msg, fadedark) {
|
phpbb.alert = function(title, msg, fadedark) {
|
||||||
var div = $('<div class="jalert"><h3>' + title + '</h3><p>' + msg + '</p></div>');
|
var div = $('<div class="jalert"><h3>' + title + '</h3><p>' + msg + '</p></div>');
|
||||||
@ -95,7 +97,7 @@ phpbb.alert = function(title, msg, fadedark) {
|
|||||||
* @param bool fadedark Remove the dark background when done? Defaults
|
* @param bool fadedark Remove the dark background when done? Defaults
|
||||||
* to yes.
|
* to yes.
|
||||||
*
|
*
|
||||||
* @return Returns the div created.
|
* @returns object Returns the div created.
|
||||||
*/
|
*/
|
||||||
phpbb.confirm = function(msg, callback, fadedark) {
|
phpbb.confirm = function(msg, callback, fadedark) {
|
||||||
var div = $('<div class="jalert"><p>' + msg + '</p>\
|
var div = $('<div class="jalert"><p>' + msg + '</p>\
|
||||||
@ -173,7 +175,7 @@ phpbb.parse_querystring = function(string) {
|
|||||||
*/
|
*/
|
||||||
phpbb.ajaxify = function(options, refresh, callback) {
|
phpbb.ajaxify = function(options, refresh, callback) {
|
||||||
|
|
||||||
//private function to handle refreshes
|
// Private function to handle refreshes
|
||||||
function handle_refresh(data, refresh, div)
|
function handle_refresh(data, refresh, div)
|
||||||
{
|
{
|
||||||
if (!data)
|
if (!data)
|
||||||
@ -221,9 +223,7 @@ phpbb.ajaxify = function(options, refresh, callback) {
|
|||||||
{
|
{
|
||||||
if (typeof res.S_CONFIRM_ACTION === 'undefined')
|
if (typeof res.S_CONFIRM_ACTION === 'undefined')
|
||||||
{
|
{
|
||||||
/**
|
// It is a standard link, no confirm_box required.
|
||||||
* It is a standard link, no confirm_box required.
|
|
||||||
*/
|
|
||||||
var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
|
var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
|
||||||
callback = phpbb.ajax_callbacks[callback];
|
callback = phpbb.ajax_callbacks[callback];
|
||||||
if (typeof callback === 'function')
|
if (typeof callback === 'function')
|
||||||
@ -234,9 +234,7 @@ phpbb.ajaxify = function(options, refresh, callback) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/**
|
// confirm_box - confirm with the user and send back
|
||||||
* confirm_box - confirm with the user and send back
|
|
||||||
*/
|
|
||||||
phpbb.confirm(res.MESSAGE_TEXT, function(del) {
|
phpbb.confirm(res.MESSAGE_TEXT, function(del) {
|
||||||
if (del)
|
if (del)
|
||||||
{
|
{
|
||||||
@ -394,4 +392,4 @@ phpbb.ajaxify({
|
|||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
|
||||||
})(jQuery); //avoid conflicts with other libraries
|
})(jQuery); // Avoid conflicts with other libraries
|
||||||
|
Loading…
x
Reference in New Issue
Block a user