Skip to content

Commit

Permalink
login confirmation #3
Browse files Browse the repository at this point in the history
  • Loading branch information
evlach committed Aug 11, 2014
1 parent 524048b commit cd606e6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions js/testing-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ window.accessdb.Models.testingSession = Backbone.Model.extend({
self.load(function(error){
UserTestingProfile.loadUserProfilesByUserId(function(error, data1){
accessdb.session.set("userTestingProfiles", data1);
Utils.msg2user("Logged in successfully!");
window.accessdb.appRouter.loadPage("home");
});
callback(true);
return;
Expand Down
17 changes: 14 additions & 3 deletions js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ Utils.getUniqCol = function (matrix, col) {
};

Utils.msg2user = function (msg) {
window.alert(msg);
//$("#msg2user").html(msg);
//$("#msg2user" ).dialog();
//window.alert(msg);
$("#msg2user").html(msg);
$("#msg2user" ).dialog();
};
Utils.getFileNameWithNoExt = function (x) {
return x.substr(0, x.lastIndexOf('.'));
Expand Down Expand Up @@ -217,4 +217,15 @@ Utils.sortResultsTable = function (table, targetTable) {
}
$(targetTable).append(tbody);

};

Utils.stripTestID = function (id){
if(id){
var newID = id.split('_');
var first = newID[0];
return first + "_" + newID[1].replace(/(^|,)0+/g, '$1');
}
else
return "";

}

0 comments on commit cd606e6

Please sign in to comment.