Get rid of the service_proxy_url configuration item: now we always used pazpar2_url
<link rel="stylesheet" type="text/css" href="http://mkws-origin/mkwsStyle.css" />
<script type="text/javascript">
var mkws_config = {
- service_proxy_url: "http://mkws-origin/service-proxy/",
+ pazpar2_url: "http://mkws-origin/service-proxy/",
service_proxy_auth: "http://mkws-origin/service-proxy-auth/"
};
</script>
<script type="text/javascript">
var mkws_config = {
/*
- service_proxy_url : "/service-proxy/",
+ pazpar2_url : "/service-proxy/",
service_proxy_auth : "/service-proxy-auth/",
*/
};
<link rel="stylesheet" type="text/css" href="http://x.mkws.indexdata.com/mkwsStyle.css" />
<script type="text/javascript">
var mkws_config = {
+ responsive_design_width: 600,
//service_proxy_auth: "/service-proxy-auth-mike"
};
</script>
lang_options: ["da", "en"],
sort_default: "relevance",
query_width: 50,
- responsive_design: true,
facets: ["authors", "sources", "subjects"],
responsive_design_width: 990,
perpage_default: 20
<script type="text/javascript">
var mkws_config = {
/*
- service_proxy_url : "/service-proxy/",
+ pazpar2_url : "/service-proxy/",
service_proxy_auth : "/service-proxy-auth/",
*/
};
expect(mkws_config).not.toBe(undefined);
});
- it("mkws_config service proxy config", function () {
- expect(mkws_config.service_proxy_url).toBe(undefined);
+ it("mkws_config pazpar2 config", function () {
+ expect(mkws_config.pazpar2_url).toBe(undefined);
});
it("mkws_config locale check German", function () {
lang: "en", /* "en", "de", "da" */
debug: 0, /* debug level for development: 0..2 */
- responsive_design: false /* true, false: resize for smaller mobile devices */
- pazpar2_url: "/pazpar2/search.pz2", /* URL */
- service_proxy_url: "/service-proxy/", /* URL */
+ responsive_design_wodth: 600, /* page reflows for devices < 600 pixels wide */
+ pazpar2_url: "/service-proxy/", /* URL */
service_proxy_auth: "/service-proxy-auth", /* URL */
- // TODO: language_*, perpage_options, responsive_design_width, sort_options
+ // TODO: language_*, perpage_options, sort_options
};
</script>
~~~
if (typeof mkws_config.use_service_proxy === 'undefined')
mkws_config.use_service_proxy = true;
-var pazpar2_url = mkws_config.pazpar2_url ? mkws_config.pazpar2_url : "/pazpar2/search.pz2";
-var service_proxy_url = mkws_config.service_proxy_url ? mkws_config.service_proxy_url : "http://mkws.indexdata.com/service-proxy/";
+var pazpar2_url = mkws_config.pazpar2_url ? mkws_config.pazpar2_url : "http://mkws.indexdata.com/service-proxy/";
-mkws.pazpar2path = mkws_config.use_service_proxy ? service_proxy_url : pazpar2_url;
+mkws.pazpar2path = pazpar2_url;
mkws.usesessions = mkws_config.use_service_proxy ? false : true;
mkws.locale_lang = {
/* default mkws config */
/* ### No defaults given for:
- * lang, responsive_design, service_proxy_auth, use_service_proxy
+ * lang, service_proxy_auth, use_service_proxy
* and of course the optional language_* entries.
*/
var mkws_config_default = {
show_perpage: true, /* show/hide perpage menu */
lang_options: [], /* display languages links for given languages, [] for all */
facets: ["sources", "subjects", "authors"], /* display facets, in this order, [] for none */
- responsive_design_width: 980, /* a page with less pixel width considered as narrow */
+ responsive_design_width: undefined, /* a page with less pixel width considered as narrow */
debug: 1, /* debug level for development: 0..2 */
dummy: "dummy"
if (mkws_config.use_service_proxy)
mkws_service_proxy_auth(config.service_proxy_auth);
- if (mkws_config.responsive_design) {
+ if (mkws_config.responsive_design_width) {
// Responsive web design - change layout on the fly based on
// current screen width. Required for mobile devices.
$(window).resize( function(e) { mkws_resize_page() });
function mkws_resize_page () {
var list = ["mkwsSwitch"];
- var width = mkws_config.responsive_design_width || 980;
+ var width = mkws_config.responsive_design_width;
var parentId = $("#mkwsTermlists").parent().attr('id');
if ($(window).width() <= width &&
this, MKWS supports responsive design which will move the termlists to
the bottom on narrow screens and to the sidebar on wide screens.
-To turn on this behaviour, set the `responsive_design` configuration
-element to `true`, and `responsive_design_width` to the desired
+To turn on this behaviour, set the `responsive_design_width` to the desired
threshhold width in pixels. For example:
<script type="text/javascript">
var mkws_config = {
- responsive_design: true,
responsive_design_width: 990
};
</script>
`language_` followed by the code of the language. See the separate section below for
details.
-pazpar2_url string *Note 2* The URL used to access the metasearch middleware if `use_service_proxy` is false. ###
- It's silly that you have to provide a different setting depending on whether
- `use_service_proxy` is set. Should just use pazpar2_url in all cases.
+pazpar2_url string *Note 2* The URL used to access the metasearch middleware. This service must be configured to
+ provide search results, facets, etc. It may be either unmediated or Pazpar2 the
+ MasterKey Service Proxy, which mediates access to an underlying Pazpar2 instance. In
+ the latter case, `service_proxy_auth` must be provided.
perpage_options array *Note 3* A list of candidate page sizes. Users can choose between these to determine how many
records are displayed on each page of results.
query_width int 50 The width of the query box, in characters.
-responsive_design bool false If true, then the facets display moves between two locations as the screen-width
- varies, as described above. ### This entry should not exist: the design should be
- responsive whenever `responsive_design_width` has a defined value.
-
-responsive_design_width int 980 If `responsive_design` is true, this is the threshhold width, in pixels, at which the
- facets move between their two locations.
+responsive_design_width int If defined, then the facets display moves between two locations as the screen-width
+ varies, as described above. The specified number is the threshhold width, in pixels,
+ at which the facets move between their two locations.
service_proxy_auth url *Note 4* A URL which, when `use_service_proxy` is true, is fetched once at the beginning of each
session to authenticate the user and establish a session that encompasses a defined set
of targets to search in.
-service_proxy_url string *Note 5* The URL on which the service proxy is accessed if `use_service_proxy` is true. This
- service must be configured to provide search results, facets, etc.
-
sort_options array *Note 6* List of supported sort criteria. Each element of the list is itself a two-element list:
the first element of each sublist is a pazpar2 sort-expression such as `data:0` and
the second is a human-readable label such as `newest`.