Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: src/site/js/editor-version.js

Issue 117833003: flight school (Closed) Base URL: git@github.com:dart-lang/dartlang.org.git@master
Patch Set: show version and not revision Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/site/events/2013/flight-school/index.html ('k') | 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 $(document).ready(function() { 1 $(document).ready(function() {
2 var displayVersion = function() { 2 var displayVersion = function() {
3 fetchEditorVersion('stable'); 3 fetchEditorVersion('stable');
4 }; 4 };
5 5
6 var updatePlaceholders = function(channel, version) { 6 var updatePlaceholders = function(channel, version) {
7 $('.editor-build-rev-' + channel).each(function(index, elem) { 7 $('.editor-build-rev-' + channel).each(function(index, elem) {
8 elem.innerHTML = version; 8 elem.innerHTML = version;
9 }); 9 });
10 }; 10 };
11 11
12 var fetchEditorVersion = function(channel) { 12 var fetchEditorVersion = function(channel) {
13 $.ajax({ 13 $.ajax({
14 type: "GET", 14 type: "GET",
15 url: 'https://storage.googleapis.com/dart-archive/channels/' + channel + ' /release/latest/VERSION', 15 url: 'https://storage.googleapis.com/dart-archive/channels/' + channel + ' /release/latest/VERSION',
16 dataType: "json", 16 dataType: "json",
17 success: function(data) { 17 success: function(data) {
18 updatePlaceholders(channel, data['revision']); 18 updatePlaceholders(channel, data['version']);
19 }, 19 },
20 error: function(xhr, textStatus, errorThrown) { 20 error: function(xhr, textStatus, errorThrown) {
21 console.log(textStatus); 21 console.log(textStatus);
22 } 22 }
23 }) 23 })
24 }; 24 };
25 25
26 displayVersion(); 26 displayVersion();
27 }); 27 });
OLDNEW
« no previous file with comments | « src/site/events/2013/flight-school/index.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698