Add icons in MobileMenuHook.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Thu, 2 Jan 2020 12:19:42 +0000 (12:19 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Thu, 2 Jan 2020 12:19:42 +0000 (12:19 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrreport/trunk@2903 7aebc617-e5e2-0310-91dc-80fb5f6d2477

extension.json
wrreport_body.php

index fe5a745f523a820904f0252169dc99987dfcface..806d7bbf0f4dcabb1862ede31897837e35ee2933 100644 (file)
                                "wrreport.css"
                        ],
                        "position": "top"
                                "wrreport.css"
                        ],
                        "position": "top"
+               },
+               "ext.wrreport.icons": {
+                       "class": "ResourceLoaderImageModule",
+                       "selector": ".mw-ui-icon-wr-{name}:before",
+                       "images": {
+                               "regions": "regions.svg",
+                               "new-reports": "newreports.svg"
+                       }
                }
        },
        "ResourceFileModulePaths": {
                }
        },
        "ResourceFileModulePaths": {
index cd3430971a5c1b8b6d0ac7ef1ec348d6f94b3ecb..0b3f2f958ad6b0b9a818b45a19a266a1647c785f 100644 (file)
@@ -1167,6 +1167,9 @@ class WrReport {
                        $icon = MobileUI::iconClass('', 'before', 'mw-ui-icon-wr-new-reports');
                        $title = Title::newFromText('Bahnberichte', NS_SPECIAL);
                        $menu->insert('wrreportnew')->addComponent('Neue Bahnberichte', $title->getLocalURL(), $icon);
                        $icon = MobileUI::iconClass('', 'before', 'mw-ui-icon-wr-new-reports');
                        $title = Title::newFromText('Bahnberichte', NS_SPECIAL);
                        $menu->insert('wrreportnew')->addComponent('Neue Bahnberichte', $title->getLocalURL(), $icon);
+
+                       global $wgOut;
+                       $wgOut->addModuleStyles(['ext.wrreport.icons']);
                }
        }
 
                }
        }