About dialog

Made cow centered on small viewport. Added resizable option to Modal module. The About dialog is no longer resizable.
This commit is contained in:
Chris Houseknecht
2014-08-11 10:55:00 -04:00
parent 04eeffe2a7
commit 299908bfe0
4 changed files with 10 additions and 5 deletions

View File

@@ -68,10 +68,12 @@ angular.module('AboutAnsibleHelpModal', ['RestServices', 'Utilities','ModalDialo
width: 700, width: 700,
height: 380, height: 380,
minWidth: 300, minWidth: 300,
resizable: false,
// title: , //'<img src="static/img/tower_login_logo.png">' ,//'About Ansible', // title: , //'<img src="static/img/tower_login_logo.png">' ,//'About Ansible',
callback: 'DialogReady', callback: 'DialogReady',
onOpen: function(){ onOpen: function(){
$('#dialog-ok-button').focus(); $('#dialog-ok-button').focus();
$('#about-modal-dialog').scrollTop(0);
} }
}); });
}); });

View File

@@ -133,7 +133,6 @@ a:focus {
max-width: 340px; max-width: 340px;
background-color: white; background-color: white;
border-style: none; border-style: none;
} }

View File

@@ -49,6 +49,7 @@ angular.module('ModalDialog', ['Utilities', 'ParseHelper'])
callback = params.callback, callback = params.callback,
beforeDestroy = params.beforeDestroy, beforeDestroy = params.beforeDestroy,
closeOnEscape = (params.closeOnEscape === undefined) ? false : params.closeOnEscape, closeOnEscape = (params.closeOnEscape === undefined) ? false : params.closeOnEscape,
resizable = (params.resizable === undefined) ? true : params.resizable,
buttons, buttons,
id = params.id, id = params.id,
x, y, wh, ww; x, y, wh, ww;
@@ -87,6 +88,7 @@ angular.module('ModalDialog', ['Utilities', 'ParseHelper'])
minWidth: minWidth, minWidth: minWidth,
title: title, title: title,
closeOnEscape: closeOnEscape, closeOnEscape: closeOnEscape,
resizable: resizable,
create: function () { create: function () {
// Fix the close button // Fix the close button
$('.ui-dialog[aria-describedby="' + id + '"]').find('.ui-dialog-titlebar button').empty().attr({'class': 'close'}).text('x'); $('.ui-dialog[aria-describedby="' + id + '"]').find('.ui-dialog-titlebar button').empty().attr({'class': 'close'}).text('x');

View File

@@ -1,8 +1,9 @@
<div id="about-dialog-body"> <div id="about-dialog-body">
<div class="row"> <div class="row">
<div class="col-sm-5 col-xs-12 text-center"> <div class="col-xs-12 col-sm-5">
<pre id='cowsay' style="text-align:left;"> <div style="width: 340px; margin: 0 auto;">
<pre id="cowsay">
________________ ________________
/ Tower Version \ / Tower Version \
\<span id='about-modal-version'></span>/ \<span id='about-modal-version'></span>/
@@ -12,9 +13,10 @@
(__)\ A)\/\ (__)\ A)\/\
||----w | ||----w |
|| || || ||
</pre> </pre>
</div>
</div> </div>
<div class="col-sm-7 col-xs-12 text-center"> <div class="col-xs-12 col-sm-7 text-center">
<img id="about-modal-titlelogo" src="static/img/ansible_tower_logo_minimalc.png"><br> <img id="about-modal-titlelogo" src="static/img/ansible_tower_logo_minimalc.png"><br>
<p>Copyright 2014. All rights reserved.</p> <p>Copyright 2014. All rights reserved.</p>
<p>Ansible is a registered trademark of Ansible, Inc.</p> <p>Ansible is a registered trademark of Ansible, Inc.</p>