Llbraughler has submitted this change and it was merged.

Change subject: cleanup
......................................................................


cleanup

Change-Id: I8650b7e084e61cf086bc9286fd191ed4a3e44370
---
M Tempo.php
M Tempo.skin.php
2 files changed, 10 insertions(+), 46 deletions(-)

Approvals:
  Llbraughler: Verified; Looks good to me, approved



diff --git a/Tempo.php b/Tempo.php
index 4b3db3c..35a0b96 100755
--- a/Tempo.php
+++ b/Tempo.php
@@ -47,22 +47,11 @@
                'skins/Tempo/resources/tempo.css' => array( 'media' => 'screen' 
),
                'skins/Tempo/resources/printable.css' => array( 'media' => 
'print' )
        ),
-       'scripts' => array(
-               'skins/Tempo/resources/js/tempo.js' => array( 'media' => 
'screen' )
-       ),
-       'dependencies' => array(
-               'jquery.ui.core'
-       ),
        'position' => 'top'
 );
 
-$wgHooks['BeforePageDisplay'][] = function( OutputPage &$out, &$skin ) {
-
-       if ( get_class( $skin ) !== 'SkinTempo' ) {
-               return true;
-       }
-
-       $out->addMeta( 'http:content-type', 'text/html; charset=UTF-8' );
-
-       return true;
-};
\ No newline at end of file
+$wgResourceModules['skins.tempo.js'] = array(
+       'scripts' => array(
+               'skins/Tempo/resources/js/tempo.js'
+       )
+);
diff --git a/Tempo.skin.php b/Tempo.skin.php
index 7cbcd8c..96c99bb 100755
--- a/Tempo.skin.php
+++ b/Tempo.skin.php
@@ -18,28 +18,17 @@
 
        public function initPage( OutputPage $out ) {
                parent::initPage( $out );
-               $this->loadSidebarSections();
        }
 
        public function setupSkinUserCss( OutputPage $out ) {
 
                parent::setupSkinUserCss( $out );
-               $baseModules = array( 'skins.tempo' );
 
-               $out->addModuleStyles( $baseModules );
-               $out->addModuleScripts( $baseModules );
+               $cssModules = array( 'skins.tempo' );
+               $jsModules = array( 'skins.tempo.js' );
 
-       }
-
-       public function loadSidebarSections() {
-               wfRunHooks( 'LoadSidebarSectionsBefore' );
-               $this->addDefaultSidebarItems();
-               wfRunHooks( 'LoadSidebarSectionsAfter' );
-       }
-
-
-       public function getNotifications() {
-               return '<li><p>' . $this->msg( 'tempo-nonotifications' ) . 
'</p></li>';
+               $out->addModuleStyles( $cssModules );
+               $out->addModuleStyles( $jsModules );
        }
 
        public function getHeadNavigation() {
@@ -91,18 +80,6 @@
                } else {
                        return $actions;
                }
-       }
-
-       public function addDefaultSidebarItems() {
-
-       }
-       public function addSidebarItem($title, $editable = false, $editlink = 
'', $content) {
-               array_push( $this->mSidebarSections, 
-                                               array(
-                                                       'title' => $title,
-                                                       'content' => $content 
-                                               )
-                               );
        }
 
        public function getSearchForm() {
@@ -263,6 +240,4 @@
 <?php
 
        }
-}
-
-
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8650b7e084e61cf086bc9286fd191ed4a3e44370
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Tempo
Gerrit-Branch: master
Gerrit-Owner: Llbraughler <[email protected]>
Gerrit-Reviewer: Llbraughler <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to