Skip to content
Snippets Groups Projects
Commit 1246b63e authored by Brett Bieber's avatar Brett Bieber
Browse files

Allow alternating between views for the prototypes.

parent 507b536c
No related branches found
No related tags found
No related merge requests found
...@@ -8,10 +8,19 @@ if (!$display) { ...@@ -8,10 +8,19 @@ if (!$display) {
<div id="prototype1" style="background-image:url('prototype_server.php?id=1&amp;format=full');background-position:top center;height:1369px;background-repeat:no-repeat;"></div> <div id="prototype1" style="background-image:url('prototype_server.php?id=1&amp;format=full');background-position:top center;height:1369px;background-repeat:no-repeat;"></div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var p1_height = 1369;
var p1_format = 'full';
function altView1() function altView1()
{ {
var proto = document.getElementById('prototype1'); var proto = document.getElementById('prototype1');
proto.style.backgroundImage = 'url("prototype_server.php?id=1&format=alt")'; var new_height = p1_height;
proto.style.height = '1200px'; if (p1_format == 'full') {
p1_format = 'alt';
new_height = 1368;
} else {
p1_format = 'full';
}
proto.style.backgroundImage = 'url("prototype_server.php?id=1&format='+p1_format+'")';
proto.style.height = new_height+'px';
} }
</script> </script>
...@@ -8,10 +8,19 @@ if (!$display) { ...@@ -8,10 +8,19 @@ if (!$display) {
<div id="prototype2" style="background-image:url('prototype_server.php?id=2&amp;format=full');background-position:top center;height:962px;background-repeat:no-repeat;"></div> <div id="prototype2" style="background-image:url('prototype_server.php?id=2&amp;format=full');background-position:top center;height:962px;background-repeat:no-repeat;"></div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var p2_height = 962;
var p2_format = 'full';
function altView2() function altView2()
{ {
var proto = document.getElementById('prototype2'); var proto = document.getElementById('prototype2');
proto.style.backgroundImage = 'url("prototype_server.php?id=2&format=alt")'; var new_height = p2_height;
proto.style.height = '1200px'; if (p2_format == 'full') {
p2_format = 'alt';
new_height = 1244;
} else {
p2_format = 'full';
}
proto.style.backgroundImage = 'url("prototype_server.php?id=2&format='+p2_format+'")';
proto.style.height = new_height+'px';
} }
</script> </script>
\ No newline at end of file
...@@ -8,10 +8,19 @@ if (!$display) { ...@@ -8,10 +8,19 @@ if (!$display) {
<div id="prototype3" style="background-image:url('prototype_server.php?id=3&amp;format=full');background-position:top center;height:1296px;background-repeat:no-repeat;"></div> <div id="prototype3" style="background-image:url('prototype_server.php?id=3&amp;format=full');background-position:top center;height:1296px;background-repeat:no-repeat;"></div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var p3_height = 1296;
var p3_format = 'full';
function altView3() function altView3()
{ {
var proto = document.getElementById('prototype3'); var proto = document.getElementById('prototype3');
proto.style.backgroundImage = 'url("prototype_server.php?id=3&format=alt")'; var new_height = p3_height;
proto.style.height = '1200px'; if (p3_format == 'full') {
p3_format = 'alt';
new_height = 1492;
} else {
p3_format = 'full';
}
proto.style.backgroundImage = 'url("prototype_server.php?id=3&format='+p3_format+'")';
proto.style.height = new_height+'px';
} }
</script> </script>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment