Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(197)

Unified Diff: app/store/charm.js

Issue 8171047: Add support for loading QA data into charm detail
Patch Set: Add support for loading QA data into charm detail Created 10 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « [revision details] ('k') | app/subapps/browser/templates/browser_charm.handlebars » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/store/charm.js
=== modified file 'app/store/charm.js'
--- app/store/charm.js 2013-03-29 14:31:31 +0000
+++ app/store/charm.js 2013-04-01 14:58:02 +0000
@@ -198,7 +198,7 @@
callbacks.failure = Y.bind(callbacks.failure, bindScope);
}
- var res = this._makeRequest(endpoint, callbacks);
+ this._makeRequest(endpoint, callbacks);
},
/**
@@ -237,6 +237,24 @@
},
/**
+ * Load the QA data for a specific charm.
+ *
+ * @method qa
+ * @param {String} charmID the charm to fetch qa data for.
+ * @param {Object} callbacks the success/failure callbacks to use.
+ * @param {Object} bindScope the scope for 'this' in the callbacks.
+ *
+ */
+ qa: function(charmID, callbacks, bindScope) {
+ var endpoint = 'charm/' + charmID + '/qa';
+ if (bindScope) {
+ callbacks.success = Y.bind(callbacks.success, bindScope);
+ callbacks.failure = Y.bind(callbacks.failure, bindScope);
+ }
+ this._makeRequest(endpoint, callbacks);
+ },
+
+ /**
* Given a result list, turn that into a BrowserCharmList object for the
* application to use.
*
@@ -278,7 +296,7 @@
callbacks.failure = Y.bind(callbacks.failure, bindScope);
}
- var res = this._makeRequest('sidebar_editorial', callbacks);
+ this._makeRequest('sidebar_editorial', callbacks);
}
}, {
ATTRS: {
« no previous file with comments | « [revision details] ('k') | app/subapps/browser/templates/browser_charm.handlebars » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b