Catrope has submitted this change and it was merged.
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, 6 insertions(+), 5 deletions(-)
Approvals:
Catrope: Verified; Looks good to me, approved
diff --git a/modules/flow-initialize.js b/modules/flow-initialize.js
index e6c8fab..fabeb60 100644
--- a/modules/flow-initialize.js
+++ b/modules/flow-initialize.js
@@ -110,11 +110,6 @@
} );
$( '.flow-board-navigation' ).append( navWidget.$element );
- // Board description widget
- descriptionWidget = new mw.flow.ui.BoardDescriptionWidget(
dmBoard, {
- $existing: $( '.flow-ui-boardDescriptionWidget-content'
).contents()
- } );
- $( '.flow-ui-boardDescriptionWidget' ).replaceWith(
descriptionWidget.$element );
// HACK: These event handlers should be in the prospective
widgets
// they will move once we have Board UI and Topic UI widgets
@@ -432,6 +427,12 @@
mw.flow.system.populateBoardFromApi();
}
+ // Board description widget
+ descriptionWidget = new mw.flow.ui.BoardDescriptionWidget(
dmBoard, {
+ $existing: $( '.flow-ui-boardDescriptionWidget-content'
).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/246079
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id71a6451a5700c8b17730d514f5582502e965048
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.27.0-wmf.2
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits