Skip to content

Commit 47e28f7

Browse files
committed
Fix more JSDoc comments
1 parent 569878b commit 47e28f7

File tree

3 files changed

+90
-21
lines changed

3 files changed

+90
-21
lines changed

assets/contao/js/core-uncompressed.js

+32
Original file line numberDiff line numberDiff line change
@@ -701,9 +701,28 @@ var AjaxRequest =
701701
*/
702702
var Backend =
703703
{
704+
/**
705+
* The current ID
706+
* @member {string}
707+
*/
704708
currentId: null,
709+
710+
/**
711+
* The x mouse position
712+
* @member {integer}
713+
*/
705714
xMousePosition: 0,
715+
716+
/**
717+
* The Y mouse position
718+
* @member {integer}
719+
*/
706720
yMousePosition: 0,
721+
722+
/**
723+
* The popup window
724+
* @member {object}
725+
*/
707726
popupWindow: null,
708727

709728
/**
@@ -1994,12 +2013,25 @@ if (Browser.Features.Touch) (function() {
19942013
*/
19952014
var TinyCallback =
19962015
{
2016+
/**
2017+
* Set the scroll offset upon focus
2018+
*
2019+
* @param {object} el The DOM element
2020+
*/
19972021
getScrollOffset: function(ed) {
19982022
tinymce.dom.Event.add((tinymce.isGecko ? ed.getDoc() : ed.getWin()), 'focus', function() {
19992023
Backend.getScrollOffset();
20002024
});
20012025
},
20022026

2027+
/**
2028+
* Add a custom file browser
2029+
*
2030+
* @param {string} field_name The field name
2031+
* @param {object} url An URI object
2032+
* @param {string} type The picker type
2033+
* @param {object} win The window object
2034+
*/
20032035
fileBrowser: function(field_name, url, type, win) {
20042036
var M = new SimpleModal({
20052037
'width': 765,

assets/mootools/stylect/js/stylect-uncompressed.js

+22-6
Original file line numberDiff line numberDiff line change
@@ -21,40 +21,52 @@ var Stylect =
2121
{
2222
/**
2323
* Check for WebKit
24-
*/
24+
* @member {boolean}
25+
*/
2526
isWebkit: (Browser.chrome || Browser.safari || navigator.userAgent.match(/(?:webkit|khtml)/i)),
2627

2728
/**
2829
* Create the div template
29-
*/
30+
* @member {string}
31+
*/
3032
template: new Element('div', {
3133
'class': 'styled_select',
3234
'html': '<span></span><b><i></i></b>'
3335
}),
3436

3537
/**
36-
* Change event
38+
* Respond to the change event
39+
*
40+
* @param {object} div The DOM element
41+
* @param {object} el The DOM element
3742
*/
3843
change: function(div, el) {
3944
div.getElement('span').set('text', el.getElement('option[value=' + el.value + ']').get('text'));
4045
},
4146

4247
/**
43-
* Keydown event
48+
* Respond to the keydown event
49+
*
50+
* @param {object} div The DOM element
51+
* @param {object} el The DOM element
4452
*/
4553
keydown: function(div, el) {
4654
setTimeout(function() { Stylect.change(div, el); }, 100);
4755
},
4856

4957
/**
50-
* Focus event
58+
* Respond to the focus event
59+
*
60+
* @param {object} div The DOM element
5161
*/
5262
focus: function(div) {
5363
div.addClass('focused');
5464
},
5565

5666
/**
57-
* Blur event
67+
* Respond to the blur event
68+
*
69+
* @param {object} div The DOM element
5870
*/
5971
blur: function(div) {
6072
div.removeClass('focused');
@@ -128,9 +140,13 @@ var Stylect =
128140
}
129141
};
130142

143+
144+
// Convert selects upon domready
131145
window.addEvent('domready', function() {
132146
Stylect.convertSelects();
133147
});
148+
149+
// Convert selects upon Ajax changes
134150
window.addEvent('ajax_change', function() {
135151
Stylect.convertSelects();
136152
});

assets/mootools/tablesort/js/tablesort-uncompressed.js

+36-15
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,23 @@
1010

1111

1212
/**
13-
* Current index
13+
* The current sort index
14+
* @var {integer}
1415
*/
1516
var SORT_INDEX;
17+
18+
19+
/**
20+
* The default thousands separator
21+
* @var {string}
22+
*/
1623
var THOUSANDS_SEPARATOR = ',';
24+
25+
26+
/**
27+
* The default decimal separator
28+
* @var {string}
29+
*/
1730
var DECIMAL_SEPARATOR = '.';
1831

1932

@@ -28,9 +41,10 @@ var TableSort = new Class(
2841
{
2942
/**
3043
* Initialize the object
31-
* @param object
32-
* @param string
33-
* @param string
44+
*
45+
* @param {object} table The DOM element
46+
* @param {string} thousandsSeparator The thousands separator
47+
* @param {string} decimalSeparator The decimal separator
3448
*/
3549
initialize: function(table, thousandsSeparator, decimalSeparator) {
3650
if (thousandsSeparator) {
@@ -83,8 +97,9 @@ var TableSort = new Class(
8397

8498
/**
8599
* Resort the table
86-
* @param integer
87-
* @param object
100+
*
101+
* @param {integer} index The current index
102+
* @param {object} el The DOM element
88103
*/
89104
resort: function(index, el) {
90105
var col = $(el);
@@ -209,9 +224,11 @@ var TableSort = new Class(
209224

210225
/**
211226
* Compare two dates
212-
* @param string
213-
* @param string
214-
* @return integer
227+
*
228+
* @param {string} a The first date
229+
* @param {string} b The second date
230+
*
231+
* @returns {integer}
215232
*/
216233
sortDate: function(a, b) {
217234
aa = a.cells[SORT_INDEX].innerHTML.replace(/<[^>]+>/g, '').clean();
@@ -243,9 +260,11 @@ var TableSort = new Class(
243260

244261
/**
245262
* Compare two numbers
246-
* @param string
247-
* @param string
248-
* @return integer
263+
*
264+
* @param {string} a The first number
265+
* @param {string} b The second number
266+
*
267+
* @returns {integer}
249268
*/
250269
sortNumeric: function(a, b) {
251270
var rgxp = new RegExp('\\' + THOUSANDS_SEPARATOR, 'g');
@@ -278,9 +297,11 @@ var TableSort = new Class(
278297

279298
/**
280299
* Compare two strings
281-
* @param string
282-
* @param string
283-
* @return integer
300+
*
301+
* @param {string} a The first string
302+
* @param {string} b The second string
303+
*
304+
* @returns {integer}
284305
*/
285306
sortCaseInsensitive: function(a, b) {
286307
aa = a.cells[SORT_INDEX].innerHTML.replace(/<[^>]+>/g, '').clean().toLowerCase();

0 commit comments

Comments
 (0)