Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Move all the apps javascript into the r.apps namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
Logan Hanks committed Aug 22, 2012
1 parent 53d0d40 commit f87053e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
16 changes: 9 additions & 7 deletions r2/r2/public/static/js/apps.js
@@ -1,4 +1,5 @@
$(function() {
r.apps = {
init: function() {
$("#developed-apps")
.delegate(".edit-app-button", "click",
function() {
Expand All @@ -20,12 +21,13 @@ $(function() {
$(this).hide();
$("#create-app").fadeIn();
});
});
},

function app_revoked(elem, op) {
$(elem).closest(".authorized-app").fadeOut();
}
revoked: function (elem, op) {
$(elem).closest(".authorized-app").fadeOut();
},

function app_deleted(elem, op) {
$(elem).closest(".developed-app").fadeOut();
deleted: function (elem, op) {
$(elem).closest(".developed-app").fadeOut();
}
}
1 change: 1 addition & 0 deletions r2/r2/public/static/js/base.js
Expand Up @@ -14,4 +14,5 @@ $(function() {
r.analytics.init()
r.ui.HelpBubble.init()
r.interestbar.init()
r.apps.init()
})
2 changes: 1 addition & 1 deletion r2/r2/templates/prefapps.html
Expand Up @@ -149,7 +149,7 @@ <h3>${app._id}</h3>
${ynbutton(_("delete app"),
"deleted",
"deleteapp",
callback="app_deleted",
callback="r.apps.deleted",
hidden_data=dict(client_id=app._id))}
</div>
</div>
Expand Down

0 comments on commit f87053e

Please sign in to comment.