Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/287567

Change subject: Update jquery.uls to 60668c60
......................................................................

Update jquery.uls to 60668c60

* Call onCancel from hide
* Remove compact mode

Change-Id: I149b9e66649c9367d6c1404e739d3cbd2d01e0ac
---
D lib/jquery.uls/css/jquery.uls.compact.css
M lib/jquery.uls/css/jquery.uls.css
M lib/jquery.uls/css/jquery.uls.lcd.css
M lib/jquery.uls/i18n/en.json
M lib/jquery.uls/i18n/qqq.json
D lib/jquery.uls/images/close.png
D lib/jquery.uls/images/close.svg
M lib/jquery.uls/src/jquery.uls.core.js
M resources/js/ext.uls.compactlinks.js
9 files changed, 16 insertions(+), 122 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/67/287567/1

diff --git a/lib/jquery.uls/css/jquery.uls.compact.css 
b/lib/jquery.uls/css/jquery.uls.compact.css
deleted file mode 100644
index c53bf92..0000000
--- a/lib/jquery.uls/css/jquery.uls.compact.css
+++ /dev/null
@@ -1,61 +0,0 @@
-.uls-compact .uls-icon-close,
-.uls-compact .uls-title-region {
-       display: none !important;
-}
-
-.uls-compact.uls-menu {
-       border-radius: 0;
-}
-
-.uls-compact .uls-search {
-       background: white;
-       border-top: none;
-       padding: 5px;
-       border-bottom-width: 1px;
-       border-bottom-style: solid;
-       border-bottom-color: #DDD;
-}
-
-.uls-compact .uls-filterinput,
-.uls-compact .uls-filterinput:focus {
-       background-color: transparent;
-       border: none;
-       box-shadow: none;
-       outline: none;
-       font-size: 18px;
-       left: 0;
-}
-
-.uls-compact .uls-language-list {
-       background: #FCFCFC;
-       height: 20em;
-}
-
-.uls-compact .uls-title-region a {
-       color: #777;
-       display: inline-block;
-       margin: 15px 0 5px 19px;
-       cursor: pointer;
-       padding: 6px;
-       text-decoration: none;
-       font-size: 14px;
-       border: 1px solid transparent;
-}
-
-.uls-compact .uls-title-region a:hover {
-       color: #252525;
-       background: #F0F0F0;
-       border: 1px solid #DDD;
-       border-radius: 3px;
-}
-
-.uls-compact .uls-title-region a:before {
-       display: inline-block;
-       width: 0;
-       height: 0;
-       border-right: 4px solid #777;
-       border-top: 4px solid transparent;
-       border-bottom: 4px solid transparent;
-       content: "";
-       margin: 0 6px 0 0;
-}
diff --git a/lib/jquery.uls/css/jquery.uls.css 
b/lib/jquery.uls/css/jquery.uls.css
index c1d6450..3f78ddf 100644
--- a/lib/jquery.uls/css/jquery.uls.css
+++ b/lib/jquery.uls/css/jquery.uls.css
@@ -1,3 +1,4 @@
+
 .uls-trigger {
        /* @embed */
        background: transparent url('../images/icon-language.png') no-repeat 
scroll left center;
@@ -7,6 +8,7 @@
        background-image: linear-gradient(transparent, transparent), 
url('../images/icon-language.svg');
        padding-left: 30px;
 }
+
 .uls-menu {
        position: absolute;
        z-index: 1000;
@@ -16,7 +18,6 @@
        background-color: #ffffff;
        border: 1px solid #ccc;
        border: 1px solid rgba(0, 0, 0, 0.2);
-       border-radius: 5px;
        -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
@@ -24,6 +25,7 @@
        -moz-background-clip: padding;
        background-clip: padding-box;
 }
+
 .uls-wide {
        min-width: 715px;
        width: 45%;
@@ -104,30 +106,9 @@
        width: 99%;
 }
 
-.uls-icon-close {
-       /* @embed */
-       background: transparent url('../images/close.png') no-repeat scroll 
center center;
-       /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), 
url('../images/close.svg');
-       /* @embed */
-       background-image: linear-gradient(transparent, transparent), 
url('../images/close.svg');
-       float: right;
-       padding: 15px;
-       cursor: pointer;
-}
-
 .uls-search {
-       filter: 
progid:DXImageTransform.Microsoft.gradient(startColorstr='#F0F0F0', 
endColorstr='#FBFBFB');
-       background: #f8f8f8;
-       background: -webkit-gradient(linear, left top, left bottom, 
from(#F0F0F0), to(#FBFBFB));
-       background: -webkit-linear-gradient(top, #F0F0F0, #FBFBFB);
-       background: -moz-linear-gradient(top, #F0F0F0, #FBFBFB);
-       background: -o-linear-gradient(top, #F0F0F0, #FBFBFB);
-       background: linear-gradient(#F0F0F0, #FBFBFB);
-       border-top-color: #AAA;
-       border-top-style: solid;
-       border-top-width: 1px;
-       padding: 0.8em 0;
+       background-color: white;
+       padding: 5px;
        border-bottom-width: 1px;
        border-bottom-style: solid;
        border-bottom-color: #DDD;
@@ -161,12 +142,14 @@
 
 /* There are two input boxes. This class applies to both of them */
 .uls-filterinput {
-       font-size: 14px;
+       font-size: 18px;
        height: 32px;
        width: 100%;
        /* For the custom clear (X) icon */
        padding: 6px 25px 6px 6px;
-       border-width: 1px;
+
+       outline: none;
+       border: none;
 
        display: block;
        position: absolute;
@@ -177,26 +160,14 @@
 /* This is the actual input */
 .uls-languagefilter {
        background-color: transparent;
-       border: 1px solid #c9c9c9;
-       border-radius: 2px 2px 2px 2px;
-       box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
+       border: none;
        color: #333;
-       -moz-transition: border 0.15s linear 0s;
-       -o-transition: border 0.15s linear 0s;
-       -webkit-transition: border 0.15s linear 0s;
-       transition: border 0.15s linear 0s;
-}
-
-.uls-languagefilter:focus {
-       border: 1px solid #3366bb;
 }
 
 /* This is the shadow input box showing completion suggestions */
 .uls-filtersuggestion {
        background-color: white;
        color: #888;
-       border-radius: 2px 2px 2px 2px;
-       box-shadow: 0 1px 2px transparent inset;
 }
 
 .uls-languagefilter-clear {
diff --git a/lib/jquery.uls/css/jquery.uls.lcd.css 
b/lib/jquery.uls/css/jquery.uls.lcd.css
index becfb6d..2a46526 100644
--- a/lib/jquery.uls/css/jquery.uls.lcd.css
+++ b/lib/jquery.uls/css/jquery.uls.lcd.css
@@ -8,9 +8,10 @@
 
 /* Language list */
 .uls-language-list {
-       height: 17em;
+       height: 20em;
        overflow: auto;
        width: auto;
+       background: #FCFCFC;
 }
 
 .uls-language-block ul {
diff --git a/lib/jquery.uls/i18n/en.json b/lib/jquery.uls/i18n/en.json
index 53a50ad..936a0cb 100644
--- a/lib/jquery.uls/i18n/en.json
+++ b/lib/jquery.uls/i18n/en.json
@@ -5,7 +5,6 @@
                "locale": "en",
                "message-documentation": "qqq"
        },
-       "uls-select-language": "Select language",
        "uls-region-WW": "Worldwide",
        "uls-region-SP": "Special",
        "uls-region-AM": "America",
diff --git a/lib/jquery.uls/i18n/qqq.json b/lib/jquery.uls/i18n/qqq.json
index c108c1c..a9efc00 100644
--- a/lib/jquery.uls/i18n/qqq.json
+++ b/lib/jquery.uls/i18n/qqq.json
@@ -6,7 +6,6 @@
                        "Shirayuki"
                ]
        },
-       "uls-select-language": "Language Selector Title.\n{{Identical|Select 
language}}",
        "uls-region-WW": "Label for worldwide languages. They are languages 
spoken in multiple countries. Eg: English, French, Spanish etc. This label is 
used in the map region of ULS and as the title of section showing worldwide 
languages. Translation should not be descriptive.",
        "uls-region-SP": "Label for the special languages section. This section 
may include special custom languages that can be added in run time. It's shown 
after the Worldwide section.\n\nThe special language is everything that isn't a 
real language. Like code qqq or qqx.\n{{Identical|Special}}",
        "uls-region-AM": "Label for America",
diff --git a/lib/jquery.uls/images/close.png b/lib/jquery.uls/images/close.png
deleted file mode 100644
index 84631c3..0000000
--- a/lib/jquery.uls/images/close.png
+++ /dev/null
Binary files differ
diff --git a/lib/jquery.uls/images/close.svg b/lib/jquery.uls/images/close.svg
deleted file mode 100644
index b39a0ff..0000000
--- a/lib/jquery.uls/images/close.svg
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg"; 
width="13.592" height="13.592"><g transform="translate(-578.659 -309.301)" 
fill="#555"><rect width="3.204" height="16.018" x="188.862" y="629.484" 
transform="rotate(-45)"/><rect width="3.204" height="16.018" x="-639.095" 
y="182.455" transform="matrix(-.707 -.707 .707 -.707 0 0)"/></g></svg>
\ No newline at end of file
diff --git a/lib/jquery.uls/src/jquery.uls.core.js 
b/lib/jquery.uls/src/jquery.uls.core.js
index f1d7354..a43b1a0 100644
--- a/lib/jquery.uls/src/jquery.uls.core.js
+++ b/lib/jquery.uls/src/jquery.uls.core.js
@@ -26,12 +26,6 @@
        // Region numbers in id attributes also appear in the langdb.
        /*jshint multistr:true */
        template = '<div class="grid uls-menu"> \
-                       <div class="row"> \
-                               <span id="uls-close" 
class="uls-icon-close"></span> \
-                               <div class="uls-title-region seven columns">\
-                                       <h1 data-i18n="uls-select-language" 
class="uls-title">Select Language</h1>\
-                               </div>\
-                       </div>\
                        <div id="search" class="row uls-search"> \
                                <div class="uls-search-wrapper"> \
                                        <label class="uls-search-label" 
for="uls-languagefilter"></label>\
@@ -165,10 +159,6 @@
                        this.$menu.addClass( widthClasses[this.getMenuWidth()] 
);
                        this.$menu.css( this.position() );
 
-                       if ( this.options.compact ) {
-                               this.$menu.addClass( 'uls-compact' );
-                       }
-
                        if ( !this.initialized ) {
                                $( 'body' ).prepend( this.$menu );
                                this.i18n();
@@ -199,6 +189,10 @@
                hide: function () {
                        this.$menu.hide();
                        this.shown = false;
+
+                       if ( this.options.onCancel ) {
+                               this.options.onCancel.call( this );
+                       }
                },
 
                /**
@@ -239,8 +233,6 @@
                        // Register all event listeners to the ULS here.
                        this.$element.on( 'click', $.proxy( this.click, this ) 
);
 
-                       // Close when clicking on the close button
-                       this.$menu.find( '#uls-close' ).on( 'click', $.proxy( 
this.cancel, this ) );
                        // Don't do anything if pressing on empty space in the 
ULS
                        this.$menu.on( 'click', function ( e ) {
                                e.stopPropagation();
@@ -322,10 +314,6 @@
                        }
 
                        this.hide();
-
-                       if ( this.options.onCancel ) {
-                               this.options.onCancel.call( this );
-                       }
                },
 
                keyup: function ( e ) {
@@ -424,7 +412,6 @@
                searchAPI: null, // Language search API
                languages: $.uls.data.getAutonyms(), // Languages to be used 
for ULS, default is all languages
                quickList: null, // Array of language codes or function that 
returns such
-               compact: false, // Show ULS in compact mode
                // The options are wide (4 columns), medium (2 columns), and 
narrow (1 column).
                // If not specified, it will be set automatically.
                menuWidth: null,
diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
index 9146946..0a61248 100644
--- a/resources/js/ext.uls.compactlinks.js
+++ b/resources/js/ext.uls.compactlinks.js
@@ -171,7 +171,6 @@
                                onCancel: function () {
                                        $trigger.removeClass( 'selector-open' );
                                },
-                               // Use compact version of ULS
                                compact: true,
                                languages: ulsLanguageList,
                                // Show common languages

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I149b9e66649c9367d6c1404e739d3cbd2d01e0ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to