Merge "Make script for superuser image variable"

This commit is contained in:
Jenkins 2015-02-14 09:39:37 +00:00 committed by Gerrit Code Review
commit 32abd0a953
2 changed files with 9 additions and 7 deletions

View File

@ -82,13 +82,6 @@ $('a').click(function(){
return false;
});
// Change character image on refresh
// Add file names and captions to doc-characters.json
$.getJSON('common/js/doc-characters.json', function(data) {
var item = data.images[Math.floor(Math.random()*data.images.length)];
$('<img src="common/images/docs/' + item.image + '">').appendTo('#superuser-img');
$('<p>' + item.caption + '<strong>OpenStack Operator</strong></p>').appendTo('#superuser-img');
});

View File

@ -14,3 +14,12 @@
<script type="text/javascript" src="{{ scriptdir }}webui-popover.js"></script>
<!-- Javascript for page -->
<script type="text/javascript">
// Change character image on refresh
// Add file names and captions to doc-characters.json
$.getJSON("{{ scriptdir }}/doc-characters.json", function(data) {
var item = data.images[Math.floor(Math.random()*data.images.length)];
$('<img src="{{ scriptdir }}../images/docs/' + item.image + '">').appendTo('#superuser-img');
$('<p>' + item.caption + '<strong>OpenStack Operator</strong></p>').appendTo('#superuser-img');
});
</script>