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

Delta Between Two Patch Sets: pages/jobs.tmpl

Issue 6034776070815744: Used history API and prevent scrolling to anchor when opening a job link (Closed)
Left Patch Set: Created Jan. 10, 2014, 8:59 a.m.
Right Patch Set: Don't use history API for compatibility with ancient browsers ;P Created Jan. 10, 2014, 10:02 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 title=Working at Eyeo 1 title=Working at Eyeo
2 2
3 {% set openings = ("Web Developer", "C++ Developer", "Android Developer", "DevOp s Engineer", "HR Manager", "PR Intern", "Business Development Manager") %} 3 {% set openings = ("Web Developer", "C++ Developer", "Android Developer", "DevOp s Engineer", "HR Manager", "PR Intern", "Business Development Manager") %}
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 var hash = ui.newTab.find("a")[0].hash; 17 var hash = ui.newTab.find("a")[0].hash;
18 if ((hash != "#jobs-overview" ? hash : "") != document.location.hash) 18 if (hash != "#jobs-overview")
19 history.pushState(null, null, hash); 19 {
20 location.hash = hash;
21 window.scrollTo(0, 0);
22 }
20 } 23 }
21 }) 24 })
22 ).addClass("ui-tabs-nav-vertical"); 25 ).addClass("ui-tabs-nav-vertical");
23 26
24 jQuery("#tabs-details").tabs(); 27 jQuery("#tabs-details").tabs();
25 28
26 jQuery(window).on("hashchange", function() 29 jQuery(window).on("hashchange", function()
27 { 30 {
28 var hash = location.hash != "" ? location.hash : "#jobs-overview"; 31 var hash = location.hash != "" ? location.hash : "#jobs-overview";
29 var escapedHash = hash.replace(/\+/g, "\\+"); 32 var escapedHash = hash.replace(/\+/g, "\\+");
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 <div id="{{ slugify(title) }}"> 89 <div id="{{ slugify(title) }}">
87 <h2>{{ title }}</h2> 90 <h2>{{ title }}</h2>
88 <? include jobs/openings/{{ slugify(title) }} ?> 91 <? include jobs/openings/{{ slugify(title) }} ?>
89 <a href="mailto:jobs@eyeo.com"><button>apply now</button></a> 92 <a href="mailto:jobs@eyeo.com"><button>apply now</button></a>
90 </div> 93 </div>
91 {% endfor %} 94 {% endfor %}
92 </div> 95 </div>
93 </div> 96 </div>
94 </div> 97 </div>
95 </div> 98 </div>
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld