From: Steve Sutton Date: Mon, 14 Dec 2015 15:54:38 +0000 (-0500) Subject: Update image on front page X-Git-Tag: v1.0.0^2~22 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=54799a8229a4d10108b52617e4fdbb778ba57168;p=WP-Themes%2Fupwatertrails.git 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. --- 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; + } + } + }); +}