* Build a CSS 'url()' value for the given URL, quoting parentheses (and other funny characters)
* and escaping quotes as necessary.
*
+ * See http://www.w3.org/TR/css-syntax-3/#consume-a-url-token
+ *
* @param string $url URL to process
* @return string 'url()' value, usually just `"url($url)"`, quoted/escaped if necessary
*/
wfProfileOut( __METHOD__ );
return $this->checkResult( false, $result );
}
-
-
- /* NOTE: there is no cas() method here because it is currently not supported
- * by the BagOStuff interface and other BagOStuff subclasses, such as
- * SqlBagOStuff.
- */
}
# Copy files
# - Exclude the default non-svg stylesheet
-rsync --recursive --delete --force --exclude 'oojs-ui.css' ./dist/ $TARGET_REPO/$TARGET_DIR || exit 1
+rsync --recursive --delete --force --exclude 'oojs-ui.css' --exclude 'oojs-ui*.rtl.css' ./dist/ $TARGET_REPO/$TARGET_DIR || exit 1
# Read the new version
NEWVERSION=$(oojsuiversion)
* @chainable
*/
$.fn.arrowSteps = function () {
- var $steps, width, arrowWidth,
+ var $steps, width, arrowWidth, $stepDiv,
+ $el = this,
paddingSide = $( 'body' ).hasClass( 'rtl' ) ? 'padding-left' : 'padding-right';
- this.addClass( 'arrowSteps' );
- $steps = this.find( 'li' );
+ $el.addClass( 'arrowSteps' );
+ $steps = $el.find( 'li' );
width = parseInt( 100 / $steps.length, 10 );
$steps.css( 'width', width + '%' );
// Every step except the last one has an arrow pointing forward:
// at the right hand side in LTR languages, and at the left hand side in RTL.
// Also add in the padding for the calculated arrow width.
- arrowWidth = parseInt( this.outerHeight(), 10 );
- $steps.filter( ':not(:last-child)' ).addClass( 'arrow' )
- .find( 'div' ).css( paddingSide, arrowWidth.toString() + 'px' );
+ $stepDiv = $steps.filter( ':not(:last-child)' ).addClass( 'arrow' ).find( 'div' );
+
+ // Execute when complete page is fully loaded, including all frames, objects and images
+ $( window ).load( function () {
+ arrowWidth = parseInt( $el.outerHeight(), 10 );
+ $stepDiv.css( paddingSide, arrowWidth.toString() + 'px' );
+ } );
+
+ $el.data( 'arrowSteps', $steps );
- this.data( 'arrowSteps', $steps );
return this;
};
+++ /dev/null
-<?php
-
-require_once __DIR__ . "/../../../maintenance/getSlaveServer.php";
-
-/**
- * Tests for getSlaveServer
- *
- * @group Database
- * @covers GetSlaveServer
- */
-class GetSlaveServerTest extends MediaWikiTestCase {
-
- /**
- * Yields a regular expression that matches a good DB server name
- *
- * It matches IPs or hostnames, both optionally followed by a
- * port specification
- *
- * @return string The regular expression
- */
- private function getServerRE() {
- if ( $this->db->getType() === 'sqlite' ) {
- // for SQLite, only the empty string is a good server name
- return '';
- }
-
- $octet = '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])';
- $ip = "(($octet\.){3}$octet)";
-
- $label = '([a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)';
- $hostname = "($label(\.$label)*)";
-
- return "($ip|$hostname)(:[0-9]{1,5})?";
- }
-
- function testPlain() {
- $gss = new GetSlaveServer();
- $gss->execute();
-
- $this->expectOutputRegex( "/^" . self::getServerRE() . "\n$/D" );
- }
-
- function testXmlDumpsBackupUseCase() {
- global $wgDBprefix;
-
- global $argv;
- $argv = array( null, "--globals" );
-
- $gss = new GetSlaveServer();
- $gss->loadParamsAndArgs();
- $gss->execute();
- $gss->globals();
-
- // The main answer
- $output = $this->getActualOutput();
- $firstLineEndPos = strpos( $output, "\n" );
- if ( $firstLineEndPos === false ) {
- $this->fail( "Could not find end of first line of output" );
- }
- $firstLine = substr( $output, 0, $firstLineEndPos );
- $this->assertRegExp( "/^" . self::getServerRE() . "$/D",
- $firstLine, "DB Server" );
-
- // xmldumps-backup relies on the wgDBprefix in the output.
- $this->expectOutputRegex( "/^[[:space:]]*\[wgDBprefix\][[:space:]]*=> "
- . $wgDBprefix . "$/m" );
- }
-}
// still suppressed by the end of the test.
restoreWarnings();
- // Check for (and clean up, if possible) incomplete animations/requests/etc.
+ // Check for incomplete animations/requests/etc and throw
+ // error if there are any.
if ( $.timers && $.timers.length !== 0 ) {
// Test may need to use fake timers, wait for animations or
// call $.fx.stop().