Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: pages/jobs.tmpl

Issue 5119420292661248: Properly react to hash changes and navigation (Closed)
Patch Set: Created Jan. 9, 2014, 10:11 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 title=Working at Eyeo 1 title=Working at Eyeo
2 2
3 {% set openings = ("HR Manager", "C++ Developer", "Web Developer", "Android Deve loper", "DevOps Engineer", "PR Intern") %} 3 {% set openings = ("HR Manager", "C++ Developer", "Web Developer", "Android Deve loper", "DevOps Engineer", "PR Intern") %}
4 {% macro slugify(title) %}{{ title|lower|replace(" ", "-") }}{% endmacro %} 4 {% macro slugify(title) %}{{ title|lower|replace(" ", "-") }}{% endmacro %}
5 5
6 <script src="/js/jquery.ui.core.min.js"></script> 6 <script src="/js/jquery.ui.core.min.js"></script>
7 <script src="/js/jquery.ui.widget.min.js"></script> 7 <script src="/js/jquery.ui.widget.min.js"></script>
8 <script src="/js/jquery.ui.tabs.min.js"></script> 8 <script src="/js/jquery.ui.tabs.min.js"></script>
9 <script> 9 <script>
10 jQuery(function() 10 jQuery(function()
11 { 11 {
12 jQuery( 12 jQuery(
13 "ul:first", jQuery("#tabs-openings").tabs( 13 "ul:first", jQuery("#tabs-openings").tabs(
14 { 14 {
15 activate: function(event, ui) 15 activate: function(event, ui)
16 { 16 {
17 location.hash = ui.newTab.find("a")[0].hash; 17 var hash = ui.newTab.find("a")[0].hash;
18 if (hash != "#jobs-overview")
19 location.hash = hash;
18 } 20 }
19 }) 21 })
20 ).addClass("ui-tabs-nav-vertical"); 22 ).addClass("ui-tabs-nav-vertical");
21 23
22 jQuery("#tabs-details").tabs(); 24 jQuery("#tabs-details").tabs();
25
26 jQuery(window).on("hashchange", function()
27 {
28 var hash = location.hash != "" ? location.hash : "#jobs-overview";
29 var escapedHash = hash.replace(/\+/g, "\\+");
30 jQuery("[href=" + escapedHash + "]").click();
31 });
23 }); 32 });
24 </script> 33 </script>
25 34
26 35
27 <header class="page-title"> 36 <header class="page-title">
28 <h1>Working at Eyeo</h1> 37 <h1>Working at Eyeo</h1>
29 </header> 38 </header>
30 39
31 <div id="jobs-info" class="content-block"> 40 <div id="jobs-info" class="content-block">
32 <div id="tabs-openings" class="columns-container one-sidebar"> 41 <div id="tabs-openings" class="columns-container one-sidebar">
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 <div id="{{ slugify(title) }}"> 84 <div id="{{ slugify(title) }}">
76 <h2>{{ title }}</h2> 85 <h2>{{ title }}</h2>
77 <? include jobs/openings/{{ slugify(title) }} ?> 86 <? include jobs/openings/{{ slugify(title) }} ?>
78 <a href="mailto:jobs@eyeo.com"><button>apply now</button></a> 87 <a href="mailto:jobs@eyeo.com"><button>apply now</button></a>
79 </div> 88 </div>
80 {% endfor %} 89 {% endfor %}
81 </div> 90 </div>
82 </div> 91 </div>
83 </div> 92 </div>
84 </div> 93 </div>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld