Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo and readme #200

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ CKAN version | Compatibility
`ckanext.datagovtheme.js_recent_view = true`


This defaults to `false`. If displaying the recent view count slows down page loading, the optional parameter can be set to `true` to make the recent view count an AJAX call, improving page loading speed. If the recent view count information (package['tracking_summary']) is already present, the AJAX call is disabled to reduce overhead. Therefore, the built-in recent view count rendering must be disabled for this mechanism to take effect.
This defaults to `false`. If displaying the recent view count slows down page loading, the optional parameter can be set to `true` to make the recent view count an AJAX call, improving page loading speed. If the recent view count information (package['tracking_summary']) is already present, the AJAX call is disabled to reduce overhead. Therefore, the built-in recent view count rendering must be disabled for this mechanism to take effect. For catalog.data.gov, it means set setting `ckanext.datagovcatalog.add_packages_tracking_info` to false.

**TODO**: re-evaluate the need for this customization after ckan 2.11 release, as described in ticket https://github.com/GSA/data.gov/issues/4798.


## Development
Expand Down
4 changes: 2 additions & 2 deletions ckanext/datagovtheme/fanstatic_library/scripts/popular.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
jQuery(function ($) {

// This api takes a list of package ids from querystring and returns the view count for each package
var pupolar_api = "/datagovtheme/get-popular-count";
var popular_api = "/datagovtheme/get-popular-count";

// all ids in a string, comma separated
var pkgs = {'pkgs': collect_all_packages().join(',')};

$.getJSON(pupolar_api, pkgs, function(data) {
$.getJSON(popular_api, pkgs, function(data) {
$.each( data, function( key, val ) {
$("ul.dataset-list li.dataset-item h3.dataset-heading").each(function() {
if ($(this).attr('pkg_id') == key) {
Expand Down
3 changes: 3 additions & 0 deletions ckanext/datagovtheme/fanstatic_library/webassets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ popular-js:
output: datagovtheme/popular.js
contents:
- scripts/popular.js
extra:
preload:
- vendor/jquery
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="ckanext-datagovtheme",
version="0.2.25",
version="0.2.26",
description="CKAN Extension to manage data.gov theme",
long_description=long_description,
classifiers=[
Expand Down
Loading