Skip to content

Commit

Permalink
impprove select environments #42
Browse files Browse the repository at this point in the history
  • Loading branch information
evlach committed Aug 8, 2014
1 parent 55dea39 commit b4d4162
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion js/testing-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ window.accessdb.Models.testingSession = Backbone.Model.extend({
this.on('change:testProfileId', function (o) {
console.log("change:testProfileId");
console.log("testProfileId: " + this.get("testProfileId"));

self.save();
});
this.on('change:testResultList', function (o) {
console.log("change:testResultList");
Expand Down Expand Up @@ -278,6 +278,7 @@ window.accessdb.Models.testingSession = Backbone.Model.extend({
if(status===403){ // not auth
// accessdb.session.set("sessionId", data.sessionId);
//self.saveLocalSession();
accessdb.session.attributes = data;
console.log("unauth session: " + accessdb.sessionId);
}
else if(status>=200){ // auth session
Expand Down
9 changes: 5 additions & 4 deletions js/testingprofile.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,12 @@ UserTestingProfile.showTestingProfiles = function () {
$(".userProfilesDiv").find("#"+selected).attr("checked", true);
selected = undefined;
}
$('.environments tr').on('click', function(event) {
$(this).find('input').prop('checked', 'checked');
accessdb.session.set("testProfileId",$(this).find('input').val());
});

}
$(document).on("click", ".environments tr td", function (event) {
$(this).find('input').prop('checked', 'checked');
accessdb.session.set("testProfileId",$(this).find('input').val());
});
}
return userTestingProfiles.length;
};
Expand Down

0 comments on commit b4d4162

Please sign in to comment.