[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Color selection dialog for CollaborationHubContent theming.
jenkins-bot has submitted this change and it was merged. Change subject: Color selection dialog for CollaborationHubContent theming. .. Color selection dialog for CollaborationHubContent theming. Same basic idea as the icon selector, but for colors. Bug: T141220 Change-Id: I3114b3e8d607a9808252561730269b52b8a27988 --- M extension.json M i18n/en.json M i18n/qqq.json M includes/SpecialCreateCollaborationHub.php A modules/ext.CollaborationKit.colour.js A modules/ext.CollaborationKit.colourbrowser.styles.less 6 files changed, 312 insertions(+), 0 deletions(-) Approvals: Brian Wolff: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 58e13d4..af89b31 100644 --- a/extension.json +++ b/extension.json @@ -84,6 +84,9 @@ "ext.CollaborationKit.iconbrowser.styles": { "styles": "ext.CollaborationKit.iconbrowser.styles.less" }, + "ext.CollaborationKit.colourbrowser.styles": { + "styles": "ext.CollaborationKit.colourbrowser.styles.less" + }, "ext.CollaborationKit.iconbrowser": { "scripts": "ext.CollaborationKit.icon.js", "dependencies": [ @@ -100,6 +103,44 @@ "cancel" ] }, + "ext.CollaborationKit.colour": { + "scripts": "ext.CollaborationKit.colour.js", + "dependencies": [ + "oojs-ui", + "oojs-ui.styles.icons-movement", + "mediawiki.widgets", + "mediawiki.widgets.UserInputWidget" + ], + "messages": [ + "collaborationkit-colour-browser", + "collaborationkit-colour-select", + "collaborationkit-colour-launchbutton", + "cancel", + "collaborationkit-red1", + "collaborationkit-red2", + "collaborationkit-grey1", + "collaborationkit-grey2", + "collaborationkit-blue1", + "collaborationkit-blue2", + "collaborationkit-blue3", + "collaborationkit-blue4", + "collaborationkit-blue5", + "collaborationkit-blue6", + "collaborationkit-purple1", + "collaborationkit-purple2", + "collaborationkit-purple3", + "collaborationkit-purple4", + "collaborationkit-purple5", + "collaborationkit-yellow1", + "collaborationkit-yellow2", + "collaborationkit-yellow3", + "collaborationkit-yellow4", + "collaborationkit-green1", + "collaborationkit-green2", + "collaborationkit-green3", + "collaborationkit-black" + ] + }, "ext.CollaborationKit.list.edit": { "scripts": "ext.CollaborationKit.list.edit.js", "dependencies": [ diff --git a/i18n/en.json b/i18n/en.json index 5e71cf6..e08f2c1 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -82,6 +82,9 @@ "collaborationkit-icon-launchbutton": "Browse icons", "collaborationkit-icon-browser": "Icon browser", "collaborationkit-icon-select": "Select", + "collaborationkit-colour-launchbutton": "Browse colors", + "collaborationkit-colour-browser": "Color browser", + "collaborationkit-colour-select": "Select", "collaborationkit-subpage-toc-label": "Part of a project:", "collaborationkit-red1": "Dark red", "collaborationkit-red2": "Red", diff --git a/i18n/qqq.json b/i18n/qqq.json index 7c27489..16067e0 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -82,6 +82,9 @@ "collaborationkit-icon-launchbutton": "Button label for button that launches the feature icon browser", "collaborationkit-icon-browser": "Header label for the icon browser", "collaborationkit-icon-select": "Button for selecting an icon in the icon browser", + "collaborationkit-colour-launchbutton": "Button label for button that launches the hub colour browser", + "collaborationkit-colour-browser": "Header label for the hub colour browser", + "collaborationkit-colour-select": "But
[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Color selection dialog for CollaborationHubContent theming.
Harej has uploaded a new change for review. https://gerrit.wikimedia.org/r/316719 Change subject: Color selection dialog for CollaborationHubContent theming. .. Color selection dialog for CollaborationHubContent theming. Same basic idea as the icon selector, but for colors. Bug: T141220 Change-Id: I3114b3e8d607a9808252561730269b52b8a27988 --- M extension.json M i18n/en.json M i18n/qqq.json M includes/CollaborationHubContentEditor.php M includes/SpecialCreateCollaborationHub.php A modules/ext.CollaborationKit.colour.js A modules/ext.CollaborationKit.colourbrowser.styles.less 7 files changed, 226 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit refs/changes/19/316719/1 diff --git a/extension.json b/extension.json index cfe4e81..3df3477 100755 --- a/extension.json +++ b/extension.json @@ -86,6 +86,9 @@ "ext.CollaborationKit.iconbrowser.styles": { "styles": "ext.CollaborationKit.iconbrowser.styles.less" }, + "ext.CollaborationKit.colourbrowser.styles": { + "styles": "ext.CollaborationKit.colourbrowser.styles.less" + }, "ext.CollaborationKit.icon": { "scripts": "ext.CollaborationKit.icon.js", "dependencies": [ @@ -101,6 +104,21 @@ "cancel" ] }, + "ext.CollaborationKit.colour": { + "scripts": "ext.CollaborationKit.colour.js", + "dependencies": [ + "oojs-ui", + "oojs-ui.styles.icons-movement", + "mediawiki.widgets", + "mediawiki.widgets.UserInputWidget" + ], + "messages": [ + "collaborationkit-colour-browser", + "collaborationkit-colour-select", + "collaborationkit-colour-launchbutton", + "cancel" + ] + }, "ext.CollaborationKit.list.edit": { "scripts": "ext.CollaborationKit.list.edit.js", "dependencies": [ diff --git a/i18n/en.json b/i18n/en.json index 263604a..c31858e 100755 --- a/i18n/en.json +++ b/i18n/en.json @@ -88,6 +88,9 @@ "collaborationkit-icon-launchbutton": "Browse icons", "collaborationkit-icon-browser": "Icon browser", "collaborationkit-icon-select": "Select", + "collaborationkit-colour-launchbutton": "Browse colors", + "collaborationkit-colour-browser": "Color browser", + "collaborationkit-colour-select": "Select", "collaborationkit-subpage-toc-label": "Part of a project:", "collaborationkit-red1": "Dark red", "collaborationkit-red2": "Red", diff --git a/i18n/qqq.json b/i18n/qqq.json index 716d9ca..47b1a34 100755 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -88,6 +88,9 @@ "collaborationkit-icon-launchbutton": "Button label for button that launches the feature icon browser", "collaborationkit-icon-browser": "Header label for the icon browser", "collaborationkit-icon-select": "Button for selecting an icon in the icon browser", + "collaborationkit-colour-launchbutton": "Button label for button that launches the hub colour browser", + "collaborationkit-colour-browser": "Header label for the hub colour browser", + "collaborationkit-colour-select": "Button for selecting a colour in the hub colour browser", "collaborationkit-subpage-toc-label": "Label for the toc on a Collaboration Hub subpage", "collaborationkit-red1": "Color label", "collaborationkit-red2": "Color label", diff --git a/includes/CollaborationHubContentEditor.php b/includes/CollaborationHubContentEditor.php index 64dffb4..1e4e659 100755 --- a/includes/CollaborationHubContentEditor.php +++ b/includes/CollaborationHubContentEditor.php @@ -153,6 +153,9 @@ $htmlForm = new OOUI\FieldsetLayout( [ 'items' => $formFields ] ); $out->enableOOUI(); + $out->addModules( 'ext.CollaborationKit.colour' ); + $out->addModuleStyles( 'ext.CollaborationKit.colourbrowser.styles' ); + $out->addJsConfigVars( 'wgCollaborationKitColourList', CollaborationHubContent::getThemeColours() ); $out->addHtml( $htmlForm ); } diff --git a/includes/SpecialCreateCollaborationHub.php b/includes/SpecialCreateCollaborationHub.php index e073ebf..26c761b 100755 --- a/includes/SpecialCreateCollaborationHub.php +++ b/includes/SpecialCreateCollaborationHub.php @@ -17,6 +17,10 @@ * @param $par string */ public