Santhosh has uploaded a new change for review.

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

Change subject: Source selector improvements
......................................................................

Source selector improvements

* Remove unwanted binding to cx column widgets - source selector
  is no longer shown in translation view
* Add a little bit of box shadow to the source selector dialog
* If the type is dialog, avoid a check for overlay shown or not. For
  dialoge overlay is always shown
* Update the hooks documentations size mw.cx.source.select is removed

Change-Id: I5ff598256813f0e22bfae826223b42b139a2dfec
---
M hooks.md
M modules/source/ext.cx.source.selector.js
M modules/source/styles/ext.cx.source.selector.less
3 files changed, 2 insertions(+), 14 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/29/174629/1

diff --git a/hooks.md b/hooks.md
index ad694fb..02b5a8e 100644
--- a/hooks.md
+++ b/hooks.md
@@ -70,10 +70,6 @@
 
 Fired when the source article content is ready from API, but not rendered at 
the source column.
 
-## mw.cx.source.select
-
-Fires when Special:CX is missing required parameters to start a translation, 
such as source language, source article title etc. Example subscriber is CX 
source selector module.
-
 ## mw.cx.tools.ready
 
 Fires when the tools system is ready.
diff --git a/modules/source/ext.cx.source.selector.js 
b/modules/source/ext.cx.source.selector.js
index 9ca4d30..f8e555e 100644
--- a/modules/source/ext.cx.source.selector.js
+++ b/modules/source/ext.cx.source.selector.js
@@ -530,10 +530,8 @@
                this.$targetTitleInput.val( '' );
                this.$translateFromButton.prop( 'disabled', true );
                this.$messageBar.hide();
-               if ( this.$overlay ) {
-                       this.$overlay.hide();
-               }
                if ( !this.options.container ) {
+                       this.$overlay.hide();
                        this.$dialog.hide();
                }
        };
@@ -718,11 +716,4 @@
                } );
        };
 
-       $( function () {
-               mw.hook( 'mw.cx.source.select' ).add( function () {
-                       var $container = $( '.cx-widget__columns' );
-
-                       $container.empty().cxSourceSelector().click();
-               } );
-       } );
 }( jQuery, mediaWiki ) );
diff --git a/modules/source/styles/ext.cx.source.selector.less 
b/modules/source/styles/ext.cx.source.selector.less
index ff9c83f..a7e6bb1 100644
--- a/modules/source/styles/ext.cx.source.selector.less
+++ b/modules/source/styles/ext.cx.source.selector.less
@@ -12,6 +12,7 @@
        border-bottom-width: 3px;
        border-radius: 3px;
        padding: 0;
+       box-shadow: 0 5px 10px rgba(0,0,0,0.2);
 }
 
 .cx-sourceselector-dialog__heading {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ff598256813f0e22bfae826223b42b139a2dfec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
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