From: Wolfram Schneider Date: Wed, 5 Nov 2014 16:47:46 +0000 (+0000) Subject: Merge branch 'master' of ssh://git.indexdata.com:222/home/git/pub/mkws X-Git-Tag: 1.0.0~75^2 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=b178415088eba9e0921c098eb2cb531289a8b9f0;hp=4baf929258ef8ba7b4458e5e3ca0ae0cf6b1995c Merge branch 'master' of ssh://git.indexdata.com:222/home/git/pub/mkws --- diff --git a/Makefile b/Makefile index cb4d8f6..a105790 100644 --- a/Makefile +++ b/Makefile @@ -29,5 +29,5 @@ help: @echo "make [ all | setup | clean | distclean ]" @echo " [ check | check-js | phantomjs ]" @echo "" - @echo "If 'make check' timeout is too short, extend with: make check PHANTOMJS_TIMEOUT=40" + @echo "If 'make check' timeout is too short, extend with: make check PHANTOMJS_TIMEOUT=120" diff --git a/doc/mkws-manual.markdown b/doc/mkws-manual.markdown index 46f507c..13f51b4 100644 --- a/doc/mkws-manual.markdown +++ b/doc/mkws-manual.markdown @@ -213,7 +213,7 @@ the English), initially sorts search results by title rather than relevance (though as always this can be changed in the UI) and makes the search box a bit wider than the default. -The full set of supported configuration items is described in the +The full set of supported configuration settings is described in the reference guide below. Per-widget configuration @@ -221,7 +221,7 @@ Per-widget configuration In addition to the global configuration provided by the `mkws_config` object, individual widgets' behaviour can be configured by providing -configuration items as attributed on their HTML elements. For example, +configuration settings as attributes on their HTML elements. For example, a `records` widget might be restricted to displaying no more than three records by setting the `numrecs` parameter as follows: @@ -238,11 +238,11 @@ attributes prefixed with `data-mkws-`, so: For first form is more convenient; the second is more correct. -Because some configuration items take structured values rather than +Because some configuration settings take structured values rather than simple strings, they cannot be directly provided by inline attributes. To allow for this, the special attribute `data-mkws-config`, if provided, is parsed as JSON and its key-value -pairs set as configuration items for the widget in question. For +pairs used as configuration settings for the widget in question. For example, the value of `lang_options` is an array of strings specifying which of the supported UI languages should be made available. The following invocation will limit this list to only English and Danish @@ -267,7 +267,7 @@ etc., customised layouts may wish to treat each of these components separately. In this case, `mkws-results` can be omitted, and the following lower-level widgets provided instead: -* `mkws-termlists` -- provides the facets +* `mkws-facets` -- provides the facets * `mkws-ranking` -- provides the options for how records are sorted and how many are included on each page of results. @@ -561,7 +561,7 @@ its own User Access record. When credential-based authentication is in use (username and password), it's necessary to pass these credentials into the Service Proxy when establishing the session. This is done -by setting the `sp_auth_credentials` configuration item to a string +by providing the `sp_auth_credentials` configuration setting as a string containing the username and password separated by a slash: mkws_config = { sp_auth_credentials: "mike/swordfish" }; @@ -590,9 +590,10 @@ yourname.com`: Step 1: add a rewriting authentication alias to the configuration: RewriteEngine on - RewriteRule /spauth/ http://sp-mkws.indexdata.com/service-proxy/?command=auth&action=check,login&username=U&password=PW [P] + RewriteRule /spauth/ http://sp-mkws.indexdata.com/service-proxy/\ + ?command=auth&action=check,login&username=U&password=PW [P] -Step 2: set the MKWS configuration item `service_proxy_auth` to +Step 2: set the MKWS configuration setting `service_proxy_auth` to `http://yourname.com/spauth/`. Step 3: protect access to the local path `http://yourname.com/spauth/` @@ -659,156 +660,370 @@ Name Description widget be subclassed to store the generated widget definitions in more useful places. -`button` x +`button` The search button. Usually generated a `search` + widget. -`categories` x +`categories` Obtains from the Service Proxy a list of the target + categories associated with the library in use, and + displays them in a drop-down list. When a category + is selected, searches are limited to the targets + that are part of that category. -`config` x +`config` This widget has no functionality of its own, but its + configuration is copied up into its team, allowing + it to affect other widgets in the team. This is the + only way to set configuration settings at the team + level. `console-builder` Like the `builder` widget, but emits the generated HTML on the JavaScript console. This exists to provide an example of how to subclass the `builder` widget. -`cover-art` x - -`details` x - -`done` x +`cover-art` Displays cover art for a book by searching in + Amazon. Often used with an `autosearch` attribute to + indicate what book to display. For example, + `
` + displays cover art for _All Yesterdays: Unique and + Speculative Views of Dinosaurs and Other Prehistoric + Animals_. + For this widget to work, a library that includes the + AmazonBooks target must be used. For example, the + "DEMO AmazonBooks for MKWS" account, which can be + selected with `sp_auth_credentials="mkws-amazon/mkws"`. + +`details` This widget is generated by the toolkit itself to + hold the full details of records that are initially + listed in summary form. + +`done` Initially empty, this widget is set to display + "Search complete: found _n_ records" when all + targets have completed their work, either returning + a hit-count or an error. The message displayed can + be changed by overriding the `done` template using + `