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
This commit is contained in:
Joshua Hesketh 2014-04-30 19:51:22 +10:00 committed by Joshua Hesketh
parent 4db99cb63b
commit d50eb58736
3 changed files with 7 additions and 5 deletions

View File

@ -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.

View File

@ -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

View File

@ -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;