diff --git a/ckan/ckanext-odata_org_il/ckanext/odata_org_il/fanstatic/rtl.css b/ckan/ckanext-odata_org_il/ckanext/odata_org_il/fanstatic/rtl.css index 82b35c3..ebe6f3d 100644 --- a/ckan/ckanext-odata_org_il/ckanext/odata_org_il/fanstatic/rtl.css +++ b/ckan/ckanext-odata_org_il/ckanext/odata_org_il/fanstatic/rtl.css @@ -1,7 +1,7 @@ .heading, .module-heading, a, p, .dataset-list, .search-form, h1, #dataset-resources, .additional-info, .tags, td.dataset-details, th.dataset-label, .context-info, .flash-messages, .page_primary_action, .breadcrumb, -.media-item +.media-item, .nav-item { direction: rtl; text-align: right; @@ -33,3 +33,7 @@ .homepage .module-search .tags h3, .homepage .module-search .tags .tag { float: right; } + +.nav-facet .nav-item a span { + padding-right: 15px; +} diff --git a/ckan/ckanext-odata_org_il/ckanext/odata_org_il/fanstatic/rtl.js b/ckan/ckanext-odata_org_il/ckanext/odata_org_il/fanstatic/rtl.js new file mode 100644 index 0000000..d592ab9 --- /dev/null +++ b/ckan/ckanext-odata_org_il/ckanext/odata_org_il/fanstatic/rtl.js @@ -0,0 +1,13 @@ +$(function() { + $('.nav-facet .nav-item a span').each(function(i, elt) { + var $elt = $(elt); + var txt = $elt.text(); + var tmp = txt.split(" "); + if (tmp.length > 1 && tmp[tmp.length-1].length > 1 && tmp[tmp.length-1][0] == "(") { + txt = tmp.slice(0, tmp.length-1).join(" "); + var mark = (CKAN_LANG=="he") ? " ‏" : " ‎"; + txt += mark + tmp[tmp.length-1]; + $elt.html(txt); + } + }); +}); diff --git a/ckan/ckanext-odata_org_il/ckanext/odata_org_il/templates/base.html b/ckan/ckanext-odata_org_il/ckanext/odata_org_il/templates/base.html index bfede15..bc11ffb 100644 --- a/ckan/ckanext-odata_org_il/ckanext/odata_org_il/templates/base.html +++ b/ckan/ckanext-odata_org_il/ckanext/odata_org_il/templates/base.html @@ -7,3 +7,9 @@ {% resource 'odata_org_il/rtl.css' %} {% endif %} {% endblock %} + +{% block scripts %} + {{ super() }} + + {% resource 'odata_org_il/rtl.js' %} +{% endblock -%}