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

Unified Diff: src/site/js/editor-version.js

Issue 10832333: display current build on editor download button (Closed) Base URL: https://code.google.com/p/dartlang-site/@master
Patch Set: move rev outside of button Created 8 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/site/downloads.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/site/js/editor-version.js
diff --git a/src/site/js/editor-version.js b/src/site/js/editor-version.js
new file mode 100644
index 0000000000000000000000000000000000000000..328f79e3dfbe1ca39d80808f6aadb7913ab7472c
--- /dev/null
+++ b/src/site/js/editor-version.js
@@ -0,0 +1,27 @@
+$(document).ready(function() {
+ var displayIntegrationVersion = function() {
+ fetchEditorVersion('integration');
+ };
+
+ var updatePlaceholders = function(channel, version) {
+ $('.editor-build-rev-' + channel).each(function(index, elem) {
+ elem.innerHTML = version;
+ });
+ };
+
+ var fetchEditorVersion = function(buildType) {
+ $.ajax({
+ type: "GET",
+ url: 'http://dart-editor-archive-' + buildType + '.commondatastorage.googleapis.com/latest/VERSION',
+ dataType: "json",
+ success: function(data) {
+ updatePlaceholders(buildType, data['revision']);
+ },
+ error: function(xhr, textStatus, errorThrown) {
+ console.log(textStatus);
+ }
+ })
+ };
+
+ displayIntegrationVersion();
+});
« no previous file with comments | « src/site/downloads.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698