diff --git a/css/jsprove.css b/css/jsprove.css index 042dd41..b74a228 100644 --- a/css/jsprove.css +++ b/css/jsprove.css @@ -1,16 +1,6 @@ -body { - font:normal 0.8em Arial,sans-serif; - margin:0; -} - -section, header { - display:block; -} - -#tabs { - margin:60px 5px 5px 5px; - z-index:0; - overflow:hidden; +h1 { + line-height: 1; + float:none; } #input { @@ -42,9 +32,8 @@ section, header { font-weight:bold; } -textarea, input[type=text] { - border:1px solid #aaa; - margin: 0 2px; +input, select, button { + width: auto; } abbr { @@ -60,23 +49,6 @@ textarea { font-size:12px; } -h1 { - margin:0; - padding:10px; - background:#111; - color:#fff; - position:fixed; - width:100%; - text-align: center; - top:0; - z-index:2; -} - -h2 { - margin:0; - padding:10px 0 5px 0; -} - #popup { border:2px solid #090; border-radius:5px; @@ -89,15 +61,10 @@ h2 { padding:4px; } -#warning { - display:none; - border-radius:5px; - border:2px solid #900; - background-color:pink; - position:fixed; - padding:4px; - width:50%; - left:25%; - top:2%; - z-index:3; +.alert { + display: none; + position: fixed; + z-index: 3; + width: 50%; + left: 25%; } diff --git a/index.html b/index.html index 5b51d81..c9a6372 100644 --- a/index.html +++ b/index.html @@ -4,24 +4,42 @@ JSProve - - + + + + + + -
-

JSProve

-
+
+ +
+
+ + + + +
-
-
-

- -
-

-
-
-

Oops...

- + + diff --git a/js/frontend.js b/js/frontend.js index 2047b44..bde2a85 100644 --- a/js/frontend.js +++ b/js/frontend.js @@ -20,7 +20,12 @@ $(document).ready(function() { checkLiveProve(); // Enable the tabs - $("#tabs").tabs(); + //$("#tabs").tabs(); + $('#tabs a').click(function (e) { + e.preventDefault(); + $(this).tab('show'); + }); + $('#tabs a:first').tab('show'); }); /******************************************************************************* @@ -50,7 +55,7 @@ $("#prove").click(prove); // Display a warning when you try to use half lead calls (not implemented yet) $('.callLocation').change(function() { - displayWarning('Half-lead bobs are not implemented yet'); + displayWarning('Half-lead calls are not implemented yet'); }); // generate the composition from the shorthand @@ -87,7 +92,7 @@ function setup() { // function to add a new input box into the method list section function insertMethodBox(code, pn) { - $('#methodList').append('
'); + $('#methodList').append('
'); numberOfMethods++; } @@ -228,16 +233,20 @@ function loadMethods(file) { /** * Display a warning */ -function displayWarning(warning, timeout) { - if(timeout === undefined) { - timeout = 2000; +function displayWarning(message, level, timeout) { + if (level === undefined) { + level = 'error'; } - $('#warning div').html(warning); - $('#warning').fadeIn('slow').delay(timeout).fadeOut('slow'); + if (timeout === undefined) { + timeout = 4000; + } + $('.alert').addClass('alert-' + level); + $('.alert div').html(message); + $('.alert').fadeIn('slow').delay(timeout).fadeOut('slow'); } function hideWarning() { - $('#warning').fadeOut('slow'); + $('.alert').fadeOut('slow'); } function closePopup() {