Skip to content

Commit

Permalink
wip delete me
Browse files Browse the repository at this point in the history
  • Loading branch information
ChasNelson1990 committed Aug 4, 2023
1 parent 458dc60 commit ba0bffb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ this.ckan.module('autocomplete-without-creating-new-options', function (jQuery)
* Returns nothing.
*/
initialize: function () {
console.log("test");
jQuery.proxyAll(this, /_on/, /format/);
this.setupAutoComplete();
},
Expand Down Expand Up @@ -275,4 +276,4 @@ this.ckan.module('autocomplete-without-creating-new-options', function (jQuery)
}
}
};
});
});
2 changes: 2 additions & 0 deletions ckanext/unaids/assets/validation-badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ this.ckan.module('validation-badge', function (jQuery) {
url: null
},
initialize: function () {
console.log('validation-badge module initialized');
$.proxyAll(this, /_on/);
this._poll();
this.options.url = $(this.el).attr('href');
$(this.el).removeAttr('href');
},
_poll: function() {
console.log("Polling...")
var module = this;
$.ajax({
url: "/api/3/action/resource_validation_show?resource_id=" + this.options.resource,
Expand Down
2 changes: 2 additions & 0 deletions ckanext/unaids/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ def unaids_get_validation_badge(resource, in_listing=False):
toolkit.config.get('ckanext.validation.show_badges_in_listings', True)):
return ''

print("validation status is " + str(resource.get('validation_status')))

if not resource.get('validation_status'):
return ''

Expand Down

0 comments on commit ba0bffb

Please sign in to comment.