Sbisson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/245918
Change subject: Fix edit board description
......................................................................
Fix edit board description
Create the board description widget after the model
has been populated so it can check the model to
know if the description can be edited.
This is a hack. I am proposing this as a fix because
it's an Unbreak Now. We should probably check why
the Description widget doesn't follow the same
architecture (populate itself becased on events)
mentioned here: I23252ef30d079ba5361702a34b8d93af882fcde0
Bug: T115339
Change-Id: Id71a6451a5700c8b17730d514f5582502e965048
---
M modules/flow-initialize.js
1 file changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/18/245918/1
diff --git a/modules/flow-initialize.js b/modules/flow-initialize.js
index e1ba8e0..1c9ccaa 100644
--- a/modules/flow-initialize.js
+++ b/modules/flow-initialize.js
@@ -119,12 +119,6 @@
} );
$( '.flow-board-navigation' ).append( navWidget.$element );
- // Board description widget
- descriptionWidget = new mw.flow.ui.BoardDescriptionWidget(
dmBoard, {
- $existing: $( '.flow-ui-boardDescriptionWidget-content'
).contents(),
- $categories: $( '.flow-board-header-category-view-nojs'
).contents()
- } );
- $( '.flow-ui-boardDescriptionWidget' ).replaceWith(
descriptionWidget.$element );
// The category widget is inside the board description widget.
// Remove it here
$( '.flow-board-header-category-view-nojs' ).detach();
@@ -569,6 +563,13 @@
mw.flow.system.populateBoardFromApi();
}
+ // Board description widget
+ descriptionWidget = new mw.flow.ui.BoardDescriptionWidget(
dmBoard, {
+ $existing: $( '.flow-ui-boardDescriptionWidget-content'
).contents(),
+ $categories: $( '.flow-board-header-category-view-nojs'
).contents()
+ } );
+ $( '.flow-ui-boardDescriptionWidget' ).replaceWith(
descriptionWidget.$element );
+
preloadTopic = OO.getProp( dataBlob, 'blocks', 'topiclist',
'submitted', 'topic' );
preloadContent = OO.getProp( dataBlob, 'blocks', 'topiclist',
'submitted', 'content' );
preloadFormat = OO.getProp( dataBlob, 'blocks', 'topiclist',
'submitted', 'format' );
--
To view, visit https://gerrit.wikimedia.org/r/245918
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id71a6451a5700c8b17730d514f5582502e965048
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits