mkws-moved-to-github.git
10 years agoShould now correctly support auto-executing#'mkwsRecords.
Mike Taylor [Wed, 4 Dec 2013 12:42:49 +0000 (12:42 +0000)]
Should now correctly support auto-executing#'mkwsRecords.
Doesn't work correctly, though: clears all records on second my_onshow.

10 years agoCompletely changed mike.html. Doesn't work correctly for reasons I
Mike Taylor [Tue, 3 Dec 2013 14:51:52 +0000 (14:51 +0000)]
Completely changed mike.html. Doesn't work correctly for reasons I
don't yet properly understand: something the current MKWS JS is doing
seems to be breaking the CORS stuff. My attempts to figure that out
are being thwarted by my git checkout having got into a weird state
where it's ... ah, I can't even explain it. Anyway. I'm hoping that
checking in this intermediate state will at least placate git to the
point where I can go back to working on the actual problem. Sheesh.

10 years agoWhen a new search is submitted, reset and redraw the filters.
Mike Taylor [Mon, 2 Dec 2013 16:21:10 +0000 (16:21 +0000)]
When a new search is submitted, reset and redraw the filters.
Fixes MKWS-72 ("Facet selection persist across searches")

10 years agoLog the actual query when a search is submitted.
Mike Taylor [Mon, 2 Dec 2013 16:15:45 +0000 (16:15 +0000)]
Log the actual query when a search is submitted.

10 years agoTest resolved.
Mike Taylor [Fri, 29 Nov 2013 18:56:21 +0000 (18:56 +0000)]
Test resolved.

10 years agoInclude Handlebars in wkws-complete.js
Mike Taylor [Fri, 29 Nov 2013 18:55:36 +0000 (18:55 +0000)]
Include Handlebars in wkws-complete.js

10 years agoTesting ...
Mike Taylor [Fri, 29 Nov 2013 18:53:12 +0000 (18:53 +0000)]
Testing ...

10 years agoTypo.
Mike Taylor [Fri, 29 Nov 2013 18:52:27 +0000 (18:52 +0000)]
Typo.

10 years agoAdd link to templates.hmtl
Mike Taylor [Fri, 29 Nov 2013 18:51:36 +0000 (18:51 +0000)]
Add link to templates.hmtl

10 years agoNew file, templates.html
Mike Taylor [Fri, 29 Nov 2013 18:49:57 +0000 (18:49 +0000)]
New file, templates.html

10 years agoResolve
Mike Taylor [Fri, 29 Nov 2013 18:47:57 +0000 (18:47 +0000)]
Resolve

10 years agoRemove "mkwsTemplateSummary", since it's now in the MKWS code.
Mike Taylor [Fri, 29 Nov 2013 17:26:14 +0000 (17:26 +0000)]
Remove "mkwsTemplateSummary", since it's now in the MKWS code.

10 years agoProvide default "Summary" template, rending the same as the old
Mike Taylor [Fri, 29 Nov 2013 17:25:49 +0000 (17:25 +0000)]
Provide default "Summary" template, rending the same as the old
hardwired code.

10 years agoReplace mkwsTemplateRecord (which is now in the MKWS code) with mkwsTemplateSummary.
Mike Taylor [Fri, 29 Nov 2013 17:24:11 +0000 (17:24 +0000)]
Replace mkwsTemplateRecord (which is now in the MKWS code) with mkwsTemplateSummary.

10 years agorenderSummary() simplified by deletion of legacy code.
Mike Taylor [Fri, 29 Nov 2013 17:22:49 +0000 (17:22 +0000)]
renderSummary() simplified by deletion of legacy code.

10 years agoMove rendering of full record back up into my_onshow()
Mike Taylor [Fri, 29 Nov 2013 17:22:14 +0000 (17:22 +0000)]
Move rendering of full record back up into my_onshow()
renderSummary(hit) now uses Summary template if provided.

10 years agoSimplify string-building.
Mike Taylor [Fri, 29 Nov 2013 16:53:07 +0000 (16:53 +0000)]
Simplify string-building.

10 years agoMove code out of my_onshow() into new function renderSummary().
Mike Taylor [Fri, 29 Nov 2013 16:51:55 +0000 (16:51 +0000)]
Move code out of my_onshow() into new function renderSummary().

10 years agoChange quoting style of handlebars template invocation, just to have a
Mike Taylor [Fri, 29 Nov 2013 12:50:16 +0000 (12:50 +0000)]
Change quoting style of handlebars template invocation, just to have a
character-for-character match with the template hardwired into
mkws.html

10 years agoRemove defaultRenderDetails() and renderField(), which are no longer used.
Mike Taylor [Fri, 29 Nov 2013 12:49:24 +0000 (12:49 +0000)]
Remove defaultRenderDetails() and renderField(), which are no longer used.

10 years agoRemove old code that called defaultRenderDetails(), since now there is
Mike Taylor [Fri, 29 Nov 2013 12:48:00 +0000 (12:48 +0000)]
Remove old code that called defaultRenderDetails(), since now there is
always a template.

10 years agofunction maybeLoadTemplate() renamed to loadTemplate()
Mike Taylor [Fri, 29 Nov 2013 12:43:04 +0000 (12:43 +0000)]
function maybeLoadTemplate() renamed to loadTemplate()

10 years agoProvide defaultTemplate() function (for "Record" only, so far).
Mike Taylor [Fri, 29 Nov 2013 12:42:29 +0000 (12:42 +0000)]
Provide defaultTemplate() function (for "Record" only, so far).
maybeLoadTemplate() now falls back to defaultTemplate() when no
template is provided in the HTML of an application.

10 years agoLocation names now listed with #commaList instead of #each.
Mike Taylor [Fri, 29 Nov 2013 11:30:03 +0000 (11:30 +0000)]
Location names now listed with #commaList instead of #each.

10 years agoAdd #commaList helper.
Mike Taylor [Fri, 29 Nov 2013 11:29:38 +0000 (11:29 +0000)]
Add #commaList helper.
Needed instead of #each to exactly emulate the old display.

10 years agoRemove now-unused Handlebars helper 'link'.
Mike Taylor [Fri, 29 Nov 2013 11:06:55 +0000 (11:06 +0000)]
Remove now-unused Handlebars helper 'link'.

10 years agoMake links for md-electronic-url by hand instead of relying on
Mike Taylor [Fri, 29 Nov 2013 11:06:27 +0000 (11:06 +0000)]
Make links for md-electronic-url by hand instead of relying on
too-clever {{link}} helper.

10 years agoFormatting.
Mike Taylor [Fri, 29 Nov 2013 11:04:15 +0000 (11:04 +0000)]
Formatting.

10 years agoJust list locations with a <br/> after each.
Mike Taylor [Thu, 28 Nov 2013 16:31:33 +0000 (16:31 +0000)]
Just list locations with a <br/> after each.
No need for <ul>

10 years agoProvide explicit leading '@' for {{attr '@name'}}
Mike Taylor [Thu, 28 Nov 2013 16:28:33 +0000 (16:28 +0000)]
Provide explicit leading '@' for {{attr '@name'}}

10 years agoThe 'attr' helper no longer inserts a leading '@'.
Mike Taylor [Thu, 28 Nov 2013 16:28:17 +0000 (16:28 +0000)]
The 'attr' helper no longer inserts a leading '@'.

10 years agoGuard location-name rendering with #if '@name'.
Mike Taylor [Thu, 28 Nov 2013 16:27:31 +0000 (16:27 +0000)]
Guard location-name rendering with #if '@name'.

10 years agoGuard Subject code with new #if-any instead of just #if location.
Mike Taylor [Thu, 28 Nov 2013 16:27:05 +0000 (16:27 +0000)]
Guard Subject code with new #if-any instead of just #if location.

10 years agoDocumentation for the #if-any helper.
Mike Taylor [Thu, 28 Nov 2013 16:25:33 +0000 (16:25 +0000)]
Documentation for the #if-any helper.

10 years agoAdd if-any helper.
Mike Taylor [Thu, 28 Nov 2013 16:23:49 +0000 (16:23 +0000)]
Add if-any helper.

10 years agoRemove debugging output from #first Handlebars helper.
Mike Taylor [Thu, 28 Nov 2013 15:09:08 +0000 (15:09 +0000)]
Remove debugging output from #first Handlebars helper.

10 years agoList only the @name element of each location.
Mike Taylor [Thu, 28 Nov 2013 15:07:49 +0000 (15:07 +0000)]
List only the @name element of each location.
(We could improve on this by displaying holdings, when present.)

10 years agoAdd 'attr' Handlebars helper.
Mike Taylor [Thu, 28 Nov 2013 15:06:36 +0000 (15:06 +0000)]
Add 'attr' Handlebars helper.
We need {{attr name}} because Handlebars can't parse {{@@name}}

10 years agoInvoke "link" helper the simple way, not as an empty block.
Mike Taylor [Thu, 28 Nov 2013 14:19:37 +0000 (14:19 +0000)]
Invoke "link" helper the simple way, not as an empty block.

10 years agoInvoke "json" helper the simple way, not as an empty block.
Mike Taylor [Thu, 28 Nov 2013 14:18:25 +0000 (14:18 +0000)]
Invoke "json" helper the simple way, not as an empty block.

10 years agoList JSON of each location separately within a <ul>
Mike Taylor [Thu, 28 Nov 2013 14:17:08 +0000 (14:17 +0000)]
List JSON of each location separately within a <ul>

10 years agoDon't accept an empty subject from the first location if a subsequent
Mike Taylor [Thu, 28 Nov 2013 13:35:50 +0000 (13:35 +0000)]
Don't accept an empty subject from the first location if a subsequent
once has a non-empty subject -- thanks to the wonder of the new
"having" argument to the #first Handlebars helper:
{{#first location having="md-subject"}}

10 years agoExtend #first Handlebars helper with optional 'having' attribute.
Mike Taylor [Thu, 28 Nov 2013 13:34:46 +0000 (13:34 +0000)]
Extend #first Handlebars helper with optional 'having' attribute.

10 years agoList only the first location's subjects.
Mike Taylor [Thu, 28 Nov 2013 13:11:07 +0000 (13:11 +0000)]
List only the first location's subjects.

10 years agoAdd #first Handlebars helper.
Mike Taylor [Thu, 28 Nov 2013 13:10:49 +0000 (13:10 +0000)]
Add #first Handlebars helper.

10 years agoRender location array in full records as JSON (for now).
Mike Taylor [Thu, 28 Nov 2013 11:25:20 +0000 (11:25 +0000)]
Render location array in full records as JSON (for now).

10 years agoAdd #json helper for Handlebars.
Mike Taylor [Thu, 28 Nov 2013 11:25:03 +0000 (11:25 +0000)]
Add #json helper for Handlebars.
Useful for debugging.

10 years agoSome kind of subject display. Not very good.
Mike Taylor [Thu, 28 Nov 2013 11:10:17 +0000 (11:10 +0000)]
Some kind of subject display. Not very good.

10 years agoWrap various field templates in {{##if}} guards.
Mike Taylor [Wed, 27 Nov 2013 16:39:31 +0000 (16:39 +0000)]
Wrap various field templates in {{##if}} guards.
Use {{#link}} helper for md-electronic-url.

10 years agoCorrected version of 'link' helper that accepts arrays of links.
Mike Taylor [Wed, 27 Nov 2013 16:36:36 +0000 (16:36 +0000)]
Corrected version of 'link' helper that accepts arrays of links.

10 years agoMove registration of 'link' helper down so it can use debug()
Mike Taylor [Wed, 27 Nov 2013 16:26:24 +0000 (16:26 +0000)]
Move registration of 'link' helper down so it can use debug()

10 years agoAdd Handlebars helper for #link.
Mike Taylor [Wed, 27 Nov 2013 16:20:37 +0000 (16:20 +0000)]
Add Handlebars helper for #link.
Initial version straight from documentation at
http://handlebarsjs.com/#block-expressions

Doesn't work correctly with arrays. To be fixed in next delta.

10 years agoTowards representing the default record display using Handlebars.
Mike Taylor [Wed, 27 Nov 2013 15:56:57 +0000 (15:56 +0000)]
Towards representing the default record display using Handlebars.

10 years agoReorder functions.
Mike Taylor [Wed, 27 Nov 2013 11:51:45 +0000 (11:51 +0000)]
Reorder functions.

10 years agoSimpler text generation.
Mike Taylor [Wed, 27 Nov 2013 11:51:21 +0000 (11:51 +0000)]
Simpler text generation.

10 years agoSimplify order of text accumulation.
Mike Taylor [Wed, 27 Nov 2013 11:49:59 +0000 (11:49 +0000)]
Simplify order of text accumulation.

10 years agoRename method.
Mike Taylor [Wed, 27 Nov 2013 11:48:14 +0000 (11:48 +0000)]
Rename method.

10 years agoRecord details generated by a Handlebars template now correctly appear
Mike Taylor [Wed, 27 Nov 2013 11:47:56 +0000 (11:47 +0000)]
Record details generated by a Handlebars template now correctly appear
within <div class="details"> with proper ID. As a result, they share
cosmetics with the default case and respond properly to clicks
elsewhere.

10 years agoCleaner logging for record template.
Mike Taylor [Tue, 26 Nov 2013 13:53:27 +0000 (13:53 +0000)]
Cleaner logging for record template.

10 years agoFull-record display uses Handlebars template #mkwsTemplateRecor if
Mike Taylor [Tue, 26 Nov 2013 13:50:06 +0000 (13:50 +0000)]
Full-record display uses Handlebars template #mkwsTemplateRecor if
provided. Otherwise falls back to old hardwired behaviour.  Fixes part
of MKWS-68 ("Use a well-established and simple third-party templating
library").

10 years agoRemove Handlebars code, replying on Widget Set.
Mike Taylor [Tue, 26 Nov 2013 13:45:33 +0000 (13:45 +0000)]
Remove Handlebars code, replying on Widget Set.
Provide <script id="mkwsTemplateRecord">

10 years agoUse Handlebars to generate MOTD.
Mike Taylor [Tue, 26 Nov 2013 13:12:59 +0000 (13:12 +0000)]
Use Handlebars to generate MOTD.

10 years agoDo not version-control locally downloaded copy of handlebars-v1.1.2.js
Mike Taylor [Tue, 26 Nov 2013 12:50:26 +0000 (12:50 +0000)]
Do not version-control locally downloaded copy of handlebars-v1.1.2.js

10 years agoUse locally downloaded copy of handlebars-v1.1.2.js rather than the
Mike Taylor [Tue, 26 Nov 2013 12:49:57 +0000 (12:49 +0000)]
Use locally downloaded copy of handlebars-v1.1.2.js rather than the
master copy from
http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.1.2.js
since that one generates a warning in Chrome:
"Resource interpreted as Script but transferred with MIME type binary/octet-stream"

10 years agoAdd rule to download handlebars-v1.1.2.js
Mike Taylor [Tue, 26 Nov 2013 12:47:52 +0000 (12:47 +0000)]
Add rule to download handlebars-v1.1.2.js
(For some reason, it can't be run from its own location.)

10 years agoNew script, simple test of Handlebars.
Mike Taylor [Tue, 26 Nov 2013 10:31:32 +0000 (10:31 +0000)]
New script, simple test of Handlebars.

10 years agoA whole bunch of changes to do facets properly:
Mike Taylor [Fri, 22 Nov 2013 17:30:23 +0000 (17:30 +0000)]
A whole bunch of changes to do facets properly:

* We no longer keep mkws.pp2filter state-variable around
* limitTarget() and unlimitTarge() no longer mess around with Pazpar2
  filter syntax
* limitQuery() no longer messes with the actual query
* triggerSearch () now calculates pp2filter (for targets) and pp2limit
  (for field values) on the fly from mkws.filters.
* Limits as well as filters are passed into my_paz.search()
* limitQuery() calls resetPage() etc. by hand, as its sibling
  functions do, instead of delegating to onFormSubmitEventHandler()
* Pass pazpar2 fieldnames rather than CCL indexes into
  add_single_facet()

All of this fixes bug MKWS-63 ("Reimplement facets to use Pazpar2
filtering rather than query manipulation")

10 years agoUse installed pz2api.1.js from http://mkws.indexdata.com/libjs-pz2/
Mike Taylor [Fri, 22 Nov 2013 15:19:48 +0000 (15:19 +0000)]
Use installed pz2api.1.js from mkws.indexdata.com/libjs-pz2/
for now, since the most recent version seems to have broken. See
MKII-1850 ("Looks like newest pz2api.1.js breaks MKWS").

10 years agoNew function delimitQuery().
Mike Taylor [Fri, 22 Nov 2013 13:28:09 +0000 (13:28 +0000)]
New function delimitQuery().
New function redraw_navi() handles drawing all selected facets,
whether based on field values or source.
This is now used by limitQuery(), limitTarget(), delimitQuery() and
delimitTarget().
(These methods have too much shared code at the moment -- I'll fix
that shortly, but want to check in the first working version.)

10 years agoAdd to mkws.filters array as facets are selected.
Mike Taylor [Fri, 22 Nov 2013 12:15:13 +0000 (12:15 +0000)]
Add to mkws.filters array as facets are selected.
Pass target ID into delimitTarget().
delimitTarget() now removes selected target from filters.

10 years agoRename curFilter
Mike Taylor [Fri, 22 Nov 2013 11:50:40 +0000 (11:50 +0000)]
Rename curFilter

10 years agoMove curFilter global into mkws hash.
Mike Taylor [Fri, 22 Nov 2013 11:39:37 +0000 (11:39 +0000)]
Move curFilter global into mkws hash.

10 years agoAdd debugging
Mike Taylor [Thu, 21 Nov 2013 17:07:43 +0000 (17:07 +0000)]
Add debugging

10 years agoReinstate pager.
Mike Taylor [Thu, 21 Nov 2013 15:33:31 +0000 (15:33 +0000)]
Reinstate pager.

10 years agoComment out mkwsPager
Mike Taylor [Thu, 21 Nov 2013 15:03:14 +0000 (15:03 +0000)]
Comment out mkwsPager

10 years agoBreak out mkwsResults into components.
Mike Taylor [Thu, 21 Nov 2013 15:03:06 +0000 (15:03 +0000)]
Break out mkwsResults into components.

10 years agoMerge branch 'master' of ssh://git.indexdata.com/home/git/private/mkws
Mike Taylor [Thu, 21 Nov 2013 13:47:52 +0000 (13:47 +0000)]
Merge branch 'master' of ssh://git.indexdata.com/home/git/private/mkws

10 years agoDon't attempt to draw the pager in #mkwsPager is missing.
Mike Taylor [Thu, 21 Nov 2013 13:47:47 +0000 (13:47 +0000)]
Don't attempt to draw the pager in #mkwsPager is missing.

10 years agoConfig option to specify cookie domain for auth
Jakub Skoczen [Thu, 21 Nov 2013 13:14:30 +0000 (14:14 +0100)]
Config option to specify cookie domain for auth

This enforces the manually stored cookie to apply to for the given domain,
no matter where the auth call is sent.

10 years agoSimplify plural code.
Mike Taylor [Wed, 20 Nov 2013 16:50:37 +0000 (16:50 +0000)]
Simplify plural code.

10 years agoRename variable.
Mike Taylor [Wed, 20 Nov 2013 16:49:29 +0000 (16:49 +0000)]
Rename variable.

10 years agoMove new sources display down to replace old single-location display
Mike Taylor [Wed, 20 Nov 2013 16:48:49 +0000 (16:48 +0000)]
Move new sources display down to replace old single-location display

10 years agoChange code to always explicitly handle arrays.
Mike Taylor [Wed, 20 Nov 2013 16:47:24 +0000 (16:47 +0000)]
Change code to always explicitly handle arrays.

10 years agoEliminate unnecessary temporary variable
Mike Taylor [Wed, 20 Nov 2013 16:30:48 +0000 (16:30 +0000)]
Eliminate unnecessary temporary variable
Fix misleading formatting

10 years agoRename variable.
Mike Taylor [Wed, 20 Nov 2013 16:29:25 +0000 (16:29 +0000)]
Rename variable.

10 years agoIf `marker' argument is passed to renderDetails(), the column it's
Mike Taylor [Wed, 20 Nov 2013 16:24:23 +0000 (16:24 +0000)]
If `marker' argument is passed to renderDetails(), the column it's
rendered in now spans both columns.

10 years agorenderDetails() now includes a line of the sources of the merged records.
Mike Taylor [Wed, 20 Nov 2013 16:23:59 +0000 (16:23 +0000)]
renderDetails() now includes a line of the sources of the merged records.

10 years agoTItle
Mike Taylor [Fri, 15 Nov 2013 15:57:14 +0000 (15:57 +0000)]
TItle

10 years agoRender each individual element of the repeated field "URL" as its own
Mike Taylor [Fri, 15 Nov 2013 15:56:35 +0000 (15:56 +0000)]
Render each individual element of the repeated field "URL" as its own
link, rather than simply gluing them together as is the default.
Allows links to work. Fixes bug MKWS-55.

10 years agoRemove entire config, since we don't need it for current development.
Mike Taylor [Fri, 15 Nov 2013 15:55:42 +0000 (15:55 +0000)]
Remove entire config, since we don't need it for current development.

10 years agoRemove unnecessary elements from config.
Mike Taylor [Fri, 15 Nov 2013 15:55:20 +0000 (15:55 +0000)]
Remove unnecessary elements from config.

10 years agoBackport revised Arabic translation to master version.
Mike Taylor [Thu, 14 Nov 2013 17:46:07 +0000 (17:46 +0000)]
Backport revised Arabic translation to master version.

10 years agoReorder translations and insert informative headings.
Mike Taylor [Thu, 14 Nov 2013 17:45:22 +0000 (17:45 +0000)]
Reorder translations and insert informative headings.

10 years agoAdd translations for Status info captions and Target info table headings
Mike Taylor [Thu, 14 Nov 2013 17:21:18 +0000 (17:21 +0000)]
Add translations for Status info captions and Target info table headings

10 years agoTranslate captions of Targets table.
Mike Taylor [Thu, 14 Nov 2013 17:20:54 +0000 (17:20 +0000)]
Translate captions of Targets table.

10 years agoTranslate textual parts of status-info area.
Mike Taylor [Thu, 14 Nov 2013 17:07:15 +0000 (17:07 +0000)]
Translate textual parts of status-info area.

10 years agoMove 'Active clients' and 'Retrieved records' from CSS to code, so they can be transl...
Mike Taylor [Thu, 14 Nov 2013 16:59:16 +0000 (16:59 +0000)]
Move 'Active clients' and 'Retrieved records' from CSS to code, so they can be translated in the mkws_config object

10 years agoTranslate sort criteria
Mike Taylor [Thu, 14 Nov 2013 16:54:08 +0000 (16:54 +0000)]
Translate sort criteria

10 years agoAdd translations for sorting criteria.
Mike Taylor [Thu, 14 Nov 2013 16:50:57 +0000 (16:50 +0000)]
Add translations for sorting criteria.

10 years agoAdditional logging.
Mike Taylor [Thu, 14 Nov 2013 12:34:41 +0000 (12:34 +0000)]
Additional logging.