Skip to content

Commit

Permalink
Allow to specify related tracking system entry
Browse files Browse the repository at this point in the history
  • Loading branch information
agordillo committed Jan 22, 2015
1 parent dc45c1f commit 4ec2697
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions configuration/configuration_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ var getOptions = function(){
// Tracking System
// configuration["TrackingSystemAPIKEY"] = "TrackingSystemAPIKEY";
// configuration["TrackingSystemAPIURL"] = "http://localhost:3000/tracking_system_entries";
// options["TrackingSystemRelatedEntryId"] = "1"

// Evaluation System
//LOEP configuration (For evaluations)
Expand Down
8 changes: 8 additions & 0 deletions js/VISH.TrackingSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ VISH.TrackingSystem = (function(V,$,undefined){
var _chronology;
//Stores specific information about the RecommenderSystem (RS)
var _rs;
//Related Tracking System Entry (if any)
var _rTrse;

//Tracking API Key
var _app_id;
Expand All @@ -30,6 +32,8 @@ VISH.TrackingSystem = (function(V,$,undefined){
_apiKey = V.Configuration.getConfiguration().TrackingSystemAPIKEY;
_apiUrl = V.Configuration.getConfiguration().TrackingSystemAPIURL;

_rTrse = V.Utils.getOptions().TrackingSystemRelatedEntryId;

if((typeof _apiKey == "undefined")||(typeof _apiUrl == "undefined")||(V.Status.getIsPreview())){
_enabled = false;
return;
Expand Down Expand Up @@ -202,6 +206,10 @@ VISH.TrackingSystem = (function(V,$,undefined){
data["authenticity_token"] = V.User.getToken();
}

if(typeof _rTrse != "undefined"){
data["tracking_system_entry_id"] = _rTrse;
}

$.ajax({
type : 'POST',
url : _apiUrl,
Expand Down

0 comments on commit 4ec2697

Please sign in to comment.