diff --git a/js/testing-session.js b/js/testing-session.js index d212c38..561c318 100644 --- a/js/testing-session.js +++ b/js/testing-session.js @@ -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; diff --git a/js/utils.js b/js/utils.js index 7ba6d50..f9d5b65 100644 --- a/js/utils.js +++ b/js/utils.js @@ -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('.')); @@ -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 ""; + }