# HG changeset patch # User Nicholas Jillings # Date 1463411202 -3600 # Node ID c296a817dff8dbb074ff86b6ef018f47ca5a0b3d # Parent 971acb7e3fab4d0bf6c2849434eb4ff543baffd4 New lightbox for #55 diff -r 971acb7e3fab -r c296a817dff8 css/core.css --- a/css/core.css Mon May 16 15:26:56 2016 +0100 +++ b/css/core.css Mon May 16 16:06:42 2016 +0100 @@ -133,6 +133,46 @@ top: 0px; } +div#lightbox-root { + visibility: hidden; + z-index: 20; + top: 25px; + min-height: 50px; + max-height: 250px; +} + +div.lightbox-error { + margin: 25px; + margin-bottom: 50px; + padding: 5px; + border-radius: 5px; + background-color: rgb(255,220,220); + border: 2px rgb(200,0,0) solid; +} + +div.lightbox-warning { + margin: 25px; + margin-bottom: 50px; + padding: 5px; + border-radius: 5px; + background-color: rgb(255,255,220); + border: 2px rgb(255,250,0) solid; +} + +div.lightbox-message { + margin: 25px; + margin-bottom: 50px; + padding: 5px; + border-radius: 5px; + background-color: rgb(200,220,255); + border: 2px rgb(50,100,250) solid; +} + +div#lightbox-blanker { + visibility: hidden; + z-index: 19; +} + button.outside-reference { width:120px; height:20px; diff -r 971acb7e3fab -r c296a817dff8 js/core.js --- a/js/core.js Mon May 16 15:26:56 2016 +0100 +++ b/js/core.js Mon May 16 16:06:42 2016 +0100 @@ -171,6 +171,7 @@ return "Please only leave this page once you have completed the tests. Are you sure you have completed all testing?"; }; } + interfaceContext.lightbox.resize(); }; function loadProjectSpec(url) { @@ -834,7 +835,8 @@ // Must extract the question data var textArea = $(popup.popupContent).find('textarea')[0]; if (node.specification.mandatory == true && textArea.value.length == 0) { - alert('This question is mandatory'); + interfaceContext.lightbox.post("Error","This Question is mandatory"); + //alert('This question is mandatory'); return; } else { // Save the text content @@ -1985,6 +1987,7 @@ { popup.resize(event); this.volume.resize(); + this.lightbox.resize(); for(var i=0; i