Jforrester has uploaded a new change for review.

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

Change subject: Update OOjs UI to v0.1.0-pre (7705a94df5)
......................................................................

Update OOjs UI to v0.1.0-pre (7705a94df5)

New changes:
c486e35 Add info icon and alert indicator
5928259 Add a 'ready' event to the window open sequence
d2f1933 Improve info and alert icons/indicators
6d78021 Defer window 'ready' event to let rendering happen
7705a94 Add focus method to SearchWidget

Change-Id: I58ae4c8154d45b34e2dcd404a5d8c3c9bbffd32f
---
A lib/oojs-ui/images/icons/info.png
A lib/oojs-ui/images/icons/info.svg
A lib/oojs-ui/images/indicators/alert.png
A lib/oojs-ui/images/indicators/alert.svg
M lib/oojs-ui/oojs-ui.js
M lib/oojs-ui/oojs-ui.svg.css
6 files changed, 50 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/87/130487/1

diff --git a/lib/oojs-ui/images/icons/info.png 
b/lib/oojs-ui/images/icons/info.png
new file mode 100644
index 0000000..f43804d
--- /dev/null
+++ b/lib/oojs-ui/images/icons/info.png
Binary files differ
diff --git a/lib/oojs-ui/images/icons/info.svg 
b/lib/oojs-ui/images/icons/info.svg
new file mode 100644
index 0000000..8c5672a
--- /dev/null
+++ b/lib/oojs-ui/images/icons/info.svg
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" width="24" 
height="24" viewBox="0, 0, 24, 24">
+  <g id="help" opacity="0.75">
+    <path d="M11.499,17 C8.463,17 6,14.536 6,11.5 C6,8.463 8.462,6 11.499,6 
C14.536,6 17,8.462 17,11.5 C17,14.536 14.536,17 11.499,17 z M11.501,5 C7.91,5 
5,7.91 5,11.5 C5,15.09 7.91,18 11.501,18 C15.089,18 18,15.089 18,11.5 C18,7.911 
15.089,5 11.501,5 z" fill="#000000"/>
+    <path d="M12,10 L12,14 L13,14 L13,15 L10,15 L10,14 L11,14 L11,11 L10,11 
L10,10 z" fill="#000000"/>
+    <path d="M11,8 L12,8 L12,9 L11,9 z" fill="#000000"/>
+  </g>
+  <defs/>
+</svg>
diff --git a/lib/oojs-ui/images/indicators/alert.png 
b/lib/oojs-ui/images/indicators/alert.png
new file mode 100644
index 0000000..8d97d1a
--- /dev/null
+++ b/lib/oojs-ui/images/indicators/alert.png
Binary files differ
diff --git a/lib/oojs-ui/images/indicators/alert.svg 
b/lib/oojs-ui/images/indicators/alert.svg
new file mode 100644
index 0000000..0cb76dc
--- /dev/null
+++ b/lib/oojs-ui/images/indicators/alert.svg
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" width="12" 
height="12" viewBox="0, 0, 12, 12">
+  <g id="deprecated" opacity="0.75">
+    <path d="M5,9 L7,9 L7,11 L5,11 z" fill="#000000"/>
+    <path d="M7,1 L7,8 L5,8 L5,1 z" fill="#000000"/>
+  </g>
+  <defs/>
+</svg>
diff --git a/lib/oojs-ui/oojs-ui.js b/lib/oojs-ui/oojs-ui.js
index 1318ed7..e5ba6ef 100644
--- a/lib/oojs-ui/oojs-ui.js
+++ b/lib/oojs-ui/oojs-ui.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (b91660e612)
+ * OOjs UI v0.1.0-pre (7705a94df5)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: Mon Apr 28 2014 12:56:19 GMT-0700 (PDT)
+ * Date: Tue Apr 29 2014 14:06:06 GMT-0700 (PDT)
  */
 ( function ( OO ) {
 
@@ -1297,7 +1297,9 @@
  * Do not override this method. See #setup for a way to make changes each time 
the window opens.
  *
  * @param {Object} [data] Window opening data
+ * @fires opening
  * @fires open
+ * @fires ready
  * @chainable
  */
 OO.ui.Window.prototype.open = function ( data ) {
@@ -1308,13 +1310,16 @@
                        this.visible = true;
                        this.emit( 'opening', data );
                        this.setup( data );
-                       // Focus the content div (which has a tabIndex) to 
inactivate
-                       // (but not clear) selections in the parent frame.
-                       // Must happen after setup runs (otherwise focusing it 
doesn't work)
-                       // but before 'open' is emitted (so subclasses can give 
focus to something else)
-                       this.frame.$content.focus();
                        this.emit( 'open', data );
-                       this.opening = false;
+                       setTimeout( OO.ui.bind( function () {
+                               // Focus the content div (which has a tabIndex) 
to inactivate
+                               // (but not clear) selections in the parent 
frame.
+                               // Must happen after 'open' is emitted (to 
ensure it is visible)
+                               // but before 'ready' is emitted (so subclasses 
can give focus to something else)
+                               this.frame.$content.focus();
+                               this.emit( 'ready', data );
+                               this.opening = false;
+                       }, this ) );
                }, this ) );
        }
 
@@ -1327,6 +1332,7 @@
  * See #teardown for a way to do something each time the window closes.
  *
  * @param {Object} [data] Window closing data
+ * @fires closing
  * @fires close
  * @chainable
  */
@@ -7789,6 +7795,13 @@
 };
 
 /**
+ * Focus the query input.
+ */
+OO.ui.SearchWidget.prototype.focus = function () {
+       this.query.$input[0].focus();
+};
+
+/**
  * Get the results list.
  *
  * @return {OO.ui.SelectWidget} Select list
diff --git a/lib/oojs-ui/oojs-ui.svg.css b/lib/oojs-ui/oojs-ui.svg.css
index 33da854..9649521 100644
--- a/lib/oojs-ui/oojs-ui.svg.css
+++ b/lib/oojs-ui/oojs-ui.svg.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (b91660e612)
+ * OOjs UI v0.1.0-pre (7705a94df5)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: Mon Apr 28 2014 12:56:19 GMT-0700 (PDT)
+ * Date: Tue Apr 29 2014 14:06:06 GMT-0700 (PDT)
  */
 
 /* Textures */
@@ -1172,6 +1172,10 @@
   background-image: /* @embed */ url(images/icons/help.svg);
 }
 
+.oo-ui-icon-info {
+  background-image: /* @embed */ url(images/icons/info.svg);
+}
+
 .oo-ui-icon-link {
   background-image: /* @embed */ url(images/icons/link.svg);
 }
@@ -1222,6 +1226,10 @@
 
 /* Indicators */
 
+.oo-ui-indicator-alert {
+  background-image: /* @embed */ url(images/indicators/alert.svg);
+}
+
 .oo-ui-indicator-down {
   background-image: /* @embed */ url(images/indicators/down.svg);
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58ae4c8154d45b34e2dcd404a5d8c3c9bbffd32f
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>

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

Reply via email to