Update image on front page
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 14 Dec 2015 15:54:38 +0000 (10:54 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 14 Dec 2015 15:54:38 +0000 (10:54 -0500)
Adding image map so we can add three links.
On the West and central suing jquery ui dialog for user confirmation of
going off site.

front-page.php
functions.php
js/app.js
js/custom/pageSetup.js

index bbd3bf1..c43fa0b 100644 (file)
@@ -8,15 +8,19 @@
                     <img src="<?php bloginfo('template_url');?>/assets/up-regions-map.png" usemap="#up-region-map">
                         <map name="up-region-map">
                         <area shape="poly" coords="178,1,143,6,120,25,98,52,59,76,43,75,0,99,16,111,25,127,75,145,114,170,144,172,181,76,153,63,132,80,131,47,154,20,180,2,176,5"
-                            onClick="return confirm( 'Disclaimer: You are now leaving our website and are going to a website that is not operated by Eastern Upper Peninsula Planning & Development Commission. . We are not responsible for the content or availability of linked sites. Before you go have you checked out our interactive map?' );"
+                            onClick="showDialogBox('http://www.paddlelakesuperior.org/'); return false;"
                             target="_blank" href="http://www.paddlelakesuperior.org/" />
                         <area shape="poly" coords="182,76,211,118,234,110,243,120,254,115,258,120,292,87,314,82,314,184,297,174,284,183,280,197,256,219,254,213,265,196,266,188,257,185,241,212,232,200,188,271,179,270,182,254,191,240,185,233,170,244,177,210,152,191,152,176,141,172,179,77,188,85"
-                            onClick="return confirm( 'Disclaimer: You are now leaving our website and are going to a website that is not operated by Eastern Upper Peninsula Planning & Development Commission. . We are not responsible for the content or availability of linked sites. Before you go have you checked out our interactive map?' );"
+                            onClick="showDialogBox('http://www.hiawathawatertrail.org/index.html'); return false;"
                             target="_blank" href="http://www.hiawathawatertrail.org/index.html" />
                         <area shape="poly" coords="315,83,347,81,365,72,389,73,382,93,381,112,401,118,413,111,421,118,433,109,443,110,453,105,454,122,459,139,452,149,467,158,469,167,477,173,492,175,498,163,505,166,510,174,514,179,512,190,501,183,492,187,478,177,464,183,445,182,418,175,410,178,411,198,403,198,383,185,363,170,345,169,338,179,328,189,311,184,313,83,325,88,326,88,322,88"
                             target="_blank" href="http://euprpdc.maps.arcgis.com/apps/MapTour/index.html?appid=f5865a5c46dd438c8cbf9c13158ef303" />
                         </map>
                 </div>
+                <div id="dialog-confirm" title="Disclaimer" style="display:none;">
+                    <p>You are now leaving our website and are going to a website that is not operated by Eastern Upper Peninsula Planning & Development Commission. We are not responsible for the content or availability of linked sites. Before you go have you checked out our interactive map?
+                    </p>
+                </div>
                 <div class="small-12 medium-6 text-center columns">
                     <?php if(have_posts()) : while(have_posts()): the_post();?>
                     <?php the_content();?>
index a2198d7..c638790 100644 (file)
@@ -63,6 +63,7 @@ function glm_site_scripts()
         get_template_directory_uri() . '/js/modernizr/modernizr.min.js'
     );
     wp_enqueue_script('jquery');
+    wp_enqueue_script('jquery-ui-dialog');
     wp_enqueue_script(
         'glm_foundation',
         get_template_directory_uri() . '/js/app.js',
@@ -70,6 +71,7 @@ function glm_site_scripts()
         '1.0',
         true
     );
+    wp_enqueue_style('jqueryui-style', '//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css');
     if(is_front_page()) {
     }
 
index 1481ce2..c2418ae 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -27,7 +27,24 @@ $(document).ready(function () {
             $(this).find('li.image-placeholder').parent('ul').addClass('no-image-subul');
             $(this).find('li.image-placeholder').remove();
         }
-        //console.log('ul = ' + menuImg);
-        //console.log('menu-id = ' + menuNum);
     });
 });
+function showDialogBox(url) {
+    $("#dialog-confirm").dialog({
+        resizable: false,
+        width: 600,
+        height: 280,
+        modal: true,
+        buttons: {
+            "Follow offsite link": function() {
+                $( this ).dialog( "close" );
+                window.open(url, '_blank');
+                return true;
+            },
+            Cancel: function() {
+                $( this ).dialog( "close" );
+                return false;
+            }
+        }
+    });
+}
index 7b76e81..6433d2a 100644 (file)
@@ -18,7 +18,24 @@ $(document).ready(function () {
             $(this).find('li.image-placeholder').parent('ul').addClass('no-image-subul');
             $(this).find('li.image-placeholder').remove();
         }
-        //console.log('ul = ' + menuImg);
-        //console.log('menu-id = ' + menuNum);
     });
 });
+function showDialogBox(url) {
+    $("#dialog-confirm").dialog({
+        resizable: false,
+        width: 600,
+        height: 280,
+        modal: true,
+        buttons: {
+            "Follow offsite link": function() {
+                $( this ).dialog( "close" );
+                window.open(url, '_blank');
+                return true;
+            },
+            Cancel: function() {
+                $( this ).dialog( "close" );
+                return false;
+            }
+        }
+    });
+}