anchor.diff:                      // Build custom request
                       var parms = "";
                       if (sort != null) {
  -                        parms += sort;
  +                        parms += "sort=" + sort;
                       }
                       return  parms +
                               "&order=" + dir +
  
positive.code:                 var activitySource= $('#sources').val()
  
                  var element = '<Activity name=\"' + activityName +'\" code=\"' + activityCode +'\" description=\"'
                          + activityName +'\" type=\"'+activityTypeName+'\" type-id=\"' + activityTypeId +'\" source=\"'
                          + activitySource + '\"/>'
  
                  clearErrorMessage();
                  $.ajax({
  
negative.code:                     var select = $('<select id="sourceTypes'+activityId+'">')
  
                      for (var i =0; i < activityTypes.length; i++) {
                          var activityTypeName = activityTypes[i].activity_type_name
  
                          var row;
                          if (activityType == activityTypeName) {
                              row = $('<option value="'+ activityTypeName +'" selected="selected"/>').text(activityTypeName);
                          } else {
                              row = $('<option value="'+ activityTypeName +'"/>').text(activityTypeName);
                          }
                          select.append(row);
                      }
  