Browse Source

Fix up fetching jquery.visibility

At some point the fetch-dependencies stopped working as the
visibility URL changed. Fix this up and also fix up adding the
danger class to ajax error messages

Closes-Bug: #1325076
Change-Id: I35af2fa08044f479c8f1200ba543cca908173aa8
changes/16/91316/6
Joshua Hesketh 7 years ago
committed by Joshua Hesketh
parent
commit
d50eb58736
  1. 4
      etc/status/README.rst
  2. 2
      etc/status/fetch-dependencies.sh
  3. 6
      etc/status/public_html/jquery.zuul.js

4
etc/status/README.rst

@ -19,8 +19,8 @@ The script depends on jQuery (tested with version 1.8 and 1.9).
The script optimises updates by stopping when the page is not visible.
This is done by listerning to ``show`` and ``hide`` events emitted by the
Page Visibility plugin for jQuery. If you don't want to load this plugin you
can undo undo this optimisation by removing the 9 lines using this on the
bottom of ``app.js``
can undo undo this optimisation by removing the code at the bottom of
``index.html``
To automatically fetch the latest versions of jQuery, the Page Visibility
plugin and Twitter Boostrap, run the ``fetch-dependencies.sh`` script.

2
etc/status/fetch-dependencies.sh

@ -6,7 +6,7 @@ echo "Fetching jquery.min.js..."
curl --silent http://code.jquery.com/jquery.min.js > $BASE_DIR/public_html/jquery.min.js
echo "Fetching jquery-visibility.min.js..."
curl --silent https://raw.github.com/mathiasbynens/jquery-visibility/master/jquery-visibility.min.js > $BASE_DIR/public_html/jquery-visibility.min.js
curl --silent https://raw.githubusercontent.com/mathiasbynens/jquery-visibility/master/jquery-visibility.js > $BASE_DIR/public_html/jquery-visibility.min.js
echo "Fetching jquery.graphite.js..."
curl -L --silent https://github.com/prestontimmons/graphitejs/archive/master.zip > jquery-graphite.zip

6
etc/status/public_html/jquery.zuul.js

@ -663,8 +663,10 @@
);
})
.fail(function (err, jqXHR, errMsg) {
$msg.text(source + ': ' + errMsg).show();
$msg.removeClass('zuul-msg-wrap-off');
$msg.text(options.source + ': ' + errMsg)
.addClass('alert-danger')
.removeClass('zuul-msg-wrap-off')
.show();
})
.complete(function () {
xhr = undefined;

Loading…
Cancel
Save