JGirault has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/338305 )

Change subject: Open the sidebar "More details" by default at high resolutions
......................................................................

Open the sidebar "More details" by default at high resolutions

Bug: T155352
Change-Id: I5a06b4a6e2d2d7090ebbdf27e9f200bcd972a92b
---
M modules/dialog/dialog.js
1 file changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/05/338305/1

diff --git a/modules/dialog/dialog.js b/modules/dialog/dialog.js
index 05d64e1..76cda29 100644
--- a/modules/dialog/dialog.js
+++ b/modules/dialog/dialog.js
@@ -15,9 +15,11 @@
         * @type {Kartographer.Dialog.DialogClass}
         */
        var MapDialog = function () {
-               // Parent method
-               MapDialog.super.apply( this, arguments );
-       };
+                       // Parent method
+                       MapDialog.super.apply( this, arguments );
+               },
+               // Opens the sidebar when the screen is wide enough (greater 
than 1024px)
+               isWideScreen = $( document ).width() > 1024;
 
        /* Inheritance */
 
@@ -72,6 +74,10 @@
                                dialog.$foot.append( $inlineContainer );
 
                                button.on( 'change', dialog.toggleSideBar, 
null, dialog );
+
+                               if ( isWideScreen ) {
+                                       dialog.toggleSideBar( true );
+                               }
                        } );
                } );
        };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a06b4a6e2d2d7090ebbdf27e9f200bcd972a92b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault <[email protected]>

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

Reply via email to