[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Replace $( document ).ready( ... ) by $( ... )

2017-05-24 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/355489 )

Change subject: Replace $( document ).ready( ... ) by $( ... )
..


Replace $( document ).ready( ... ) by $( ... )

In jQuery 3 $( document ).ready( ... ) is deprecated.
https://jquery.com/upgrade-guide/3.0/#deprecated-document-ready-handlers-other-than-jquery-function

Change-Id: I14662d1c07ce383708113e23ac9e445fca949cc3
---
M modules/contributions/base.js
M modules/engine/components/flow-undo-page.js
M modules/engine/misc/flow-handlebars.js
M modules/engine/misc/mw-ui.enhance.js
M modules/flow-initialize.js
5 files changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/contributions/base.js b/modules/contributions/base.js
index 646464d..b56f7c0 100644
--- a/modules/contributions/base.js
+++ b/modules/contributions/base.js
@@ -25,7 +25,7 @@
);
}
 
-   $( document ).ready( function () {
+   $( function () {
$( '#bodyContent' ).one( 'click', '.flow-click-interactive', 
clickedFlowLink );
} );
 }( jQuery, mediaWiki ) );
diff --git a/modules/engine/components/flow-undo-page.js 
b/modules/engine/components/flow-undo-page.js
index c5be7e7..6e7da90 100644
--- a/modules/engine/components/flow-undo-page.js
+++ b/modules/engine/components/flow-undo-page.js
@@ -1,6 +1,6 @@
 ( function ( $, mw ) {
 
-   $( document ).ready( function () {
+   $( function () {
 
$( 'form[method=POST]' ).each( function ( index, form ) {
$( form ).submit( function () {
diff --git a/modules/engine/misc/flow-handlebars.js 
b/modules/engine/misc/flow-handlebars.js
index 623179b..4cc5d67 100644
--- a/modules/engine/misc/flow-handlebars.js
+++ b/modules/engine/misc/flow-handlebars.js
@@ -328,7 +328,7 @@
setTimeout( timestampAutoUpdate, 100 );
}
 
-   $( document ).ready( timestampAutoUpdate );
+   $( timestampAutoUpdate );
 
/**
 * Do not escape HTML string. Used as a Handlebars helper.
diff --git a/modules/engine/misc/mw-ui.enhance.js 
b/modules/engine/misc/mw-ui.enhance.js
index 7f86833..4bd603c 100644
--- a/modules/engine/misc/mw-ui.enhance.js
+++ b/modules/engine/misc/mw-ui.enhance.js
@@ -12,7 +12,7 @@
* This will make unhovered and unfocused sibling buttons become faded 
and blurred
* Usage: Buttons must be in a form, or in a parent with 
mw-ui-button-container, or they must be siblings
*/
-   $( document ).ready( function () {
+   $( function () {
function onMwUiButtonFocus( event ) {
var $el, $form, $siblings;
 
@@ -122,7 +122,7 @@
 * Disable / enable submit buttons without/with text in field.
 * Usage: field needs required attribute
 */
-   $( document ).ready( function () {
+   $( function () {
// We should probably not use this change detection method for 
VE
//
// Also, consider using the input event (which I think can 
replace all of these
@@ -147,7 +147,7 @@
 * mw-ui-tooltip
 * Renders tooltips on over, and also via mw.tooltip.
 */
-   $( document ).ready( function () {
+   $( function () {
var _$tooltip = $(
'' +
'' +
diff --git a/modules/flow-initialize.js b/modules/flow-initialize.js
index 70ec772..7a83b5b 100644
--- a/modules/flow-initialize.js
+++ b/modules/flow-initialize.js
@@ -7,7 +7,7 @@
 * Now do stuff
 * @todo not like this
 */
-   $( document ).ready( function () {
+   $( function () {
var flowBoard,
$component = $( '.flow-component' ),
$board = $( '.flow-board' ),

-- 
To view, visit https://gerrit.wikimedia.org/r/355489
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I14662d1c07ce383708113e23ac9e445fca949cc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Replace $( document ).ready( ... ) by $( ... )

2017-05-24 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355489 )

Change subject: Replace $( document ).ready( ... ) by $( ... )
..

Replace $( document ).ready( ... ) by $( ... )

In jQuery 3 $( document ).ready( ... ) is deprecated.
https://jquery.com/upgrade-guide/3.0/#deprecated-document-ready-handlers-other-than-jquery-function

Change-Id: I14662d1c07ce383708113e23ac9e445fca949cc3
---
M modules/contributions/base.js
M modules/engine/components/flow-undo-page.js
M modules/engine/misc/flow-handlebars.js
M modules/engine/misc/mw-ui.enhance.js
M modules/flow-initialize.js
5 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/89/355489/1

diff --git a/modules/contributions/base.js b/modules/contributions/base.js
index 646464d..b56f7c0 100644
--- a/modules/contributions/base.js
+++ b/modules/contributions/base.js
@@ -25,7 +25,7 @@
);
}
 
-   $( document ).ready( function () {
+   $( function () {
$( '#bodyContent' ).one( 'click', '.flow-click-interactive', 
clickedFlowLink );
} );
 }( jQuery, mediaWiki ) );
diff --git a/modules/engine/components/flow-undo-page.js 
b/modules/engine/components/flow-undo-page.js
index c5be7e7..6e7da90 100644
--- a/modules/engine/components/flow-undo-page.js
+++ b/modules/engine/components/flow-undo-page.js
@@ -1,6 +1,6 @@
 ( function ( $, mw ) {
 
-   $( document ).ready( function () {
+   $( function () {
 
$( 'form[method=POST]' ).each( function ( index, form ) {
$( form ).submit( function () {
diff --git a/modules/engine/misc/flow-handlebars.js 
b/modules/engine/misc/flow-handlebars.js
index 623179b..4cc5d67 100644
--- a/modules/engine/misc/flow-handlebars.js
+++ b/modules/engine/misc/flow-handlebars.js
@@ -328,7 +328,7 @@
setTimeout( timestampAutoUpdate, 100 );
}
 
-   $( document ).ready( timestampAutoUpdate );
+   $( timestampAutoUpdate );
 
/**
 * Do not escape HTML string. Used as a Handlebars helper.
diff --git a/modules/engine/misc/mw-ui.enhance.js 
b/modules/engine/misc/mw-ui.enhance.js
index 7f86833..4bd603c 100644
--- a/modules/engine/misc/mw-ui.enhance.js
+++ b/modules/engine/misc/mw-ui.enhance.js
@@ -12,7 +12,7 @@
* This will make unhovered and unfocused sibling buttons become faded 
and blurred
* Usage: Buttons must be in a form, or in a parent with 
mw-ui-button-container, or they must be siblings
*/
-   $( document ).ready( function () {
+   $( function () {
function onMwUiButtonFocus( event ) {
var $el, $form, $siblings;
 
@@ -122,7 +122,7 @@
 * Disable / enable submit buttons without/with text in field.
 * Usage: field needs required attribute
 */
-   $( document ).ready( function () {
+   $( function () {
// We should probably not use this change detection method for 
VE
//
// Also, consider using the input event (which I think can 
replace all of these
@@ -147,7 +147,7 @@
 * mw-ui-tooltip
 * Renders tooltips on over, and also via mw.tooltip.
 */
-   $( document ).ready( function () {
+   $( function () {
var _$tooltip = $(
'' +
'' +
diff --git a/modules/flow-initialize.js b/modules/flow-initialize.js
index 70ec772..7a83b5b 100644
--- a/modules/flow-initialize.js
+++ b/modules/flow-initialize.js
@@ -7,7 +7,7 @@
 * Now do stuff
 * @todo not like this
 */
-   $( document ).ready( function () {
+   $( function () {
var flowBoard,
$component = $( '.flow-component' ),
$board = $( '.flow-board' ),

-- 
To view, visit https://gerrit.wikimedia.org/r/355489
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14662d1c07ce383708113e23ac9e445fca949cc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits