From 54799a8229a4d10108b52617e4fdbb778ba57168 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 14 Dec 2015 10:54:38 -0500 Subject: [PATCH] Update image on front page 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 | 8 ++++++-- functions.php | 2 ++ js/app.js | 21 +++++++++++++++++++-- js/custom/pageSetup.js | 21 +++++++++++++++++++-- 4 files changed, 46 insertions(+), 6 deletions(-) diff --git a/front-page.php b/front-page.php index bbd3bf1..c43fa0b 100644 --- a/front-page.php +++ b/front-page.php @@ -8,15 +8,19 @@ +
diff --git a/functions.php b/functions.php index a2198d7..c638790 100644 --- a/functions.php +++ b/functions.php @@ -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()) { } diff --git a/js/app.js b/js/app.js index 1481ce2..c2418ae 100644 --- 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; + } + } + }); +} diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 7b76e81..6433d2a 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -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; + } + } + }); +} -- 2.17.1