<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[123] sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp: jobs.wordpress.net: Properly implement mobile menus.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://meta.trac.wordpress.org/changeset/123">123</a></dd>
<dt>Author</dt> <dd>coffee2code</dd>
<dt>Date</dt> <dd>2013-11-19 08:30:45 +0000 (Tue, 19 Nov 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>jobs.wordpress.net: Properly implement mobile menus. props mercime. see <a href="http://meta.trac.wordpress.org/ticket/84">#84</a>
* style.css:
* Add mobile styles
* Fix color and padding of main navigation menu-toggle element
* Add icons to the two mobile menus
* Fix padding for job category row without any entry
* sidebar.php: Add hooks to enable mobile menu set up of Position Type categories
* navigation.js: Replace navigation.js which handled one menu with jQuery to handle both mobile menus (Position Type and Main Navigation menus)
* functions.php: Move other enqueued stylesheets above the theme's main stylesheet and add jQuery dependency for revised navigation.js</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkjobswordpressnetpublic_htmlwpcontentthemesjobswpfunctionsphp">sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/functions.php</a></li>
<li><a href="#sitestrunkjobswordpressnetpublic_htmlwpcontentthemesjobswpjsnavigationjs">sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/js/navigation.js</a></li>
<li><a href="#sitestrunkjobswordpressnetpublic_htmlwpcontentthemesjobswpsidebarphp">sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/sidebar.php</a></li>
<li><a href="#sitestrunkjobswordpressnetpublic_htmlwpcontentthemesjobswpstylecss">sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/style.css</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkjobswordpressnetpublic_htmlwpcontentthemesjobswpfunctionsphp"></a>
<div class="modfile"><h4>Modified: sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/functions.php (122 => 123)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/functions.php 2013-11-19 08:19:49 UTC (rev 122)
+++ sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/functions.php 2013-11-19 08:30:45 UTC (rev 123)
</span><span class="lines">@@ -103,10 +103,15 @@
</span><span class="cx"> * Enqueue scripts and styles
</span><span class="cx"> */
</span><span class="cx"> function jobswp_scripts() {
</span><ins>+ wp_enqueue_style( '996-normalize', get_template_directory_uri() . '/css/996/normalize.css' );
+ wp_enqueue_style( '996-base', get_template_directory_uri() . '/css/996/base.css' );
+ wp_enqueue_style( '996-grid', get_template_directory_uri() . '/css/996/grid.css' );
+ wp_enqueue_style( '996-style', get_template_directory_uri() . '/css/996/style.css' );
+ wp_enqueue_style( 'dashicons' );
+ wp_enqueue_style( 'open-sans' );
</ins><span class="cx"> wp_enqueue_style( 'jobswp-style', get_stylesheet_uri() );
</span><span class="cx">
</span><del>- wp_enqueue_script( 'jobswp-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
-
</del><ins>+ wp_enqueue_script( 'jobswp-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery'), '20131107', true );
</ins><span class="cx"> wp_enqueue_script( 'jobswp-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
</span><span class="cx">
</span><span class="cx"> if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
</span><span class="lines">@@ -117,13 +122,6 @@
</span><span class="cx"> wp_enqueue_script( 'jobswp-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- wp_enqueue_style( '996-normalize', get_template_directory_uri() . '/css/996/normalize.css' );
- wp_enqueue_style( '996-base', get_template_directory_uri() . '/css/996/base.css' );
- wp_enqueue_style( '996-grid', get_template_directory_uri() . '/css/996/grid.css' );
- wp_enqueue_style( '996-style', get_template_directory_uri() . '/css/996/style.css' );
- wp_enqueue_style( 'dashicons' );
- wp_enqueue_style( 'open-sans' );
-
</del><span class="cx"> /* Modernizr disbabled because it causes Safari to whitescreen */
</span><span class="cx"> // wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/996/modernizr-2.6.2.min.js' );
</span><span class="cx"> // wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/996/modernizr-2.6.2.js' );
</span></span></pre></div>
<a id="sitestrunkjobswordpressnetpublic_htmlwpcontentthemesjobswpjsnavigationjs"></a>
<div class="modfile"><h4>Modified: sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/js/navigation.js (122 => 123)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/js/navigation.js 2013-11-19 08:19:49 UTC (rev 122)
+++ sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/js/navigation.js 2013-11-19 08:30:45 UTC (rev 123)
</span><span class="lines">@@ -1,34 +1,21 @@
</span><span class="cx"> /**
</span><span class="cx"> * navigation.js
</span><span class="cx"> *
</span><del>- * Handles toggling the navigation menu for small screens.
</del><ins>+ * Handles toggling the two navigation menus for small screens.
+ *
</ins><span class="cx"> */
</span><del>-( function() {
- var container, button, menu;
</del><ins>+jQuery(document).ready(function(){
</ins><span class="cx">
</span><del>- container = document.getElementById( 'site-navigation' );
- if ( ! container )
- return;
</del><ins>+ jQuery('.menu-toggle').click(function () {
+ jQuery('.menu').slideToggle(400, function () {
+ jQuery('.menu').toggleClass('mobile-pop').css('display', '');
+ });
+ });
</ins><span class="cx">
</span><del>- button = container.getElementsByTagName( 'h1' )[0];
- if ( 'undefined' === typeof button )
- return;
</del><ins>+ jQuery('.menu-jobs-toggle').click(function () {
+ jQuery('.menu-jobs').slideToggle(400, function () {
+ jQuery('.menu-jobs').toggleClass('mobile-pop').css('display', '');
+ });
+ });
</ins><span class="cx">
</span><del>- menu = container.getElementsByTagName( 'ul' )[0];
-
- // Hide menu toggle button if menu is empty and return early.
- if ( 'undefined' === typeof menu ) {
- button.style.display = 'none';
- return;
- }
-
- if ( -1 === menu.className.indexOf( 'nav-menu' ) )
- menu.className += ' nav-menu';
-
- button.onclick = function() {
- if ( -1 !== container.className.indexOf( 'toggled' ) )
- container.className = container.className.replace( ' toggled', '' );
- else
- container.className += ' toggled';
- };
-} )();
</del><ins>+});
</ins></span></pre></div>
<a id="sitestrunkjobswordpressnetpublic_htmlwpcontentthemesjobswpsidebarphp"></a>
<div class="modfile"><h4>Modified: sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/sidebar.php (122 => 123)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/sidebar.php 2013-11-19 08:19:49 UTC (rev 122)
+++ sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/sidebar.php 2013-11-19 08:30:45 UTC (rev 123)
</span><span class="lines">@@ -10,7 +10,8 @@
</span><span class="cx">
</span><span class="cx"> <aside id="cats" class="widget">
</span><span class="cx"> <h3 class="widget-title"><?php _e( 'Position Types', 'jobswp' ); ?></h3>
</span><del>- <ul>
</del><ins>+ <a href="#" class="menu-jobs-toggle"></a>
+ <ul class="menu-jobs">
</ins><span class="cx"> <li class="job-cat-item job-cat-item-all"><a href="/" title="<?php esc_attr_e( 'View all job openings', 'jobswp' ); ?>"><?php _e( 'All Openings', 'jobswp' ) ?></a></li>
</span><span class="cx"> <?php Jobs_Dot_WP::list_job_categories(); ?>
</span><span class="cx"> </ul>
</span></span></pre></div>
<a id="sitestrunkjobswordpressnetpublic_htmlwpcontentthemesjobswpstylecss"></a>
<div class="modfile"><h4>Modified: sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/style.css (122 => 123)</h4>
<pre class="diff"><span>
<span class="info">--- sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/style.css 2013-11-19 08:19:49 UTC (rev 122)
+++ sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/style.css 2013-11-19 08:30:45 UTC (rev 123)
</span><span class="lines">@@ -455,6 +455,9 @@
</span><span class="cx"> cursor: pointer;
</span><span class="cx"> display: none;
</span><span class="cx"> }
</span><ins>+.menu {
+ display: block;
+}
</ins><span class="cx">
</span><span class="cx"> @media screen and (max-width: 600px) {
</span><span class="cx"> .menu-toggle,
</span><span class="lines">@@ -758,6 +761,15 @@
</span><span class="cx"> text-decoration: none;
</span><span class="cx"> color: #21759b;
</span><span class="cx"> }
</span><ins>+
+/* Small menu */
+.menu-jobs-toggle {
+ display: none;
+}
+.menu-jobs {
+ display: block;
+}
+
</ins><span class="cx"> .all-job-categories a:hover, .jobs-group a:hover, #secondary #cats li a:hover {
</span><span class="cx"> color: #2EA2CC;
</span><span class="cx"> }
</span><span class="lines">@@ -1245,13 +1257,15 @@
</span><span class="cx"> .container .jobs-group .grid_2,
</span><span class="cx"> .container .jobs-group .grid_4,
</span><span class="cx"> .container .jobs-group .grid_7,
</span><del>- .post-job-job-info {
</del><ins>+ .post-job-job-info,
+ .container .no-job.grid_9 {
</ins><span class="cx"> width: 100%;
</span><span class="cx"> }
</span><span class="cx"> .container .jobs-group .grid_1,
</span><span class="cx"> .container .jobs-group .grid_2,
</span><span class="cx"> .container .jobs-group .grid_4,
</span><del>- .container .hentry .grid_3 {
</del><ins>+ .container .hentry .grid_3,
+ .container .no-job.grid_9 {
</ins><span class="cx"> padding-left: 20px;
</span><span class="cx"> padding-right: 20px;
</span><span class="cx"> }
</span><span class="lines">@@ -1300,7 +1314,58 @@
</span><span class="cx"> margin-bottom: 0.5em;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ #cats {
+ position: relative;
+ }
+ #cats h3 {
+ color: #2ea2cc;
+ margin: 0;
+ padding-bottom: 10px;
+ }
+ #cats h3:after {
+ content: '\f228';
+ font: 16px 'dashicons';
+ float: right;
+ vertical-align: top;
+ }
+ .menu-jobs {
+ display: none;
+ margin-top: 10px;
+ }
+ .menu-jobs.mobile-pop {
+ display: block;
+ }
+ .menu-jobs-toggle {
+ background: transparent;
+ display: block;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 50px;
+ }
</ins><span class="cx"> #wporg-footer {
</span><span class="cx"> min-width: inherit;
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+@media only screen and (max-width: 600px) {
+ .menu {
+ display: none;
+ }
+ .menu.mobile-pop {
+ display: block;
+ }
+ .menu-toggle {
+ color: #ddd;
+ display: block;
+ font-size: 18px;
+ padding-bottom: 20px;
+ text-align: center;
+ }
+ .menu-toggle:after {
+ content: '\f228';
+ font: 16px 'dashicons';
+ margin-left: 15px;
+ vertical-align: middle;
+ }
+}
</ins></span></pre>
</div>
</div>
</body>
</html>