mkws-moved-to-github.git
10 years agoUse "target" attribute instead of "targetfilter"
Mike Taylor [Thu, 3 Apr 2014 16:16:31 +0000 (17:16 +0100)]
Use "target" attribute instead of "targetfilter"

10 years agoSupport "target" config element as a shortcut for UDB search using targetfilter.
Mike Taylor [Thu, 3 Apr 2014 16:16:16 +0000 (17:16 +0100)]
Support "target" config element as a shortcut for UDB search using targetfilter.

10 years agoNew
Mike Taylor [Thu, 3 Apr 2014 16:12:06 +0000 (17:12 +0100)]
New

10 years agoAdd mkws-widget-image.js to COMPONENTS
Mike Taylor [Thu, 3 Apr 2014 16:12:02 +0000 (17:12 +0100)]
Add mkws-widget-image.js to COMPONENTS

10 years agoUse new mkwsImage class.
Mike Taylor [Thu, 3 Apr 2014 16:11:50 +0000 (17:11 +0100)]
Use new mkwsImage class.

10 years agoSpecify template-name, referring to a now-hardwired default.
Mike Taylor [Thu, 3 Apr 2014 16:10:15 +0000 (17:10 +0100)]
Specify template-name, referring to a now-hardwired default.
Remove explicit template.

10 years agoAdd "Image" template to default list.
Mike Taylor [Thu, 3 Apr 2014 16:07:35 +0000 (17:07 +0100)]
Add "Image" template to default list.

10 years agoSummary template name is taken from that.config.template if provided
Mike Taylor [Thu, 3 Apr 2014 16:05:26 +0000 (17:05 +0100)]
Summary template name is taken from that.config.template if provided
(falling back to the old default of "Summary"). Allows multiple
records widgets to display different formats.

10 years agoSauropod version
Mike Taylor [Thu, 3 Apr 2014 16:03:04 +0000 (17:03 +0100)]
Sauropod version

10 years agoUse image-display template.
Mike Taylor [Thu, 3 Apr 2014 16:02:43 +0000 (17:02 +0100)]
Use image-display template.

10 years agoSet config.maxrecs only if it's not already set.
Mike Taylor [Thu, 3 Apr 2014 15:51:54 +0000 (16:51 +0100)]
Set config.maxrecs only if it's not already set.
This allows the default to be overridden by the application.

10 years agoSet config.maxrecs rather than config.perpage.
Mike Taylor [Thu, 3 Apr 2014 15:51:33 +0000 (16:51 +0100)]
Set config.maxrecs rather than config.perpage.

10 years agoVertical ws.
Mike Taylor [Thu, 3 Apr 2014 15:51:03 +0000 (16:51 +0100)]
Vertical ws.

10 years agoRename maybeAutosearch function to autosearch.
Mike Taylor [Thu, 3 Apr 2014 15:50:17 +0000 (16:50 +0100)]
Rename maybeAutosearch function to autosearch.

10 years agoExtract and use maxrecs setting in auto-searching.
Mike Taylor [Thu, 3 Apr 2014 15:49:26 +0000 (16:49 +0100)]
Extract and use maxrecs setting in auto-searching.

10 years agoBack to mkwsRecord (singular)
Mike Taylor [Thu, 3 Apr 2014 15:49:03 +0000 (16:49 +0100)]
Back to mkwsRecord (singular)

10 years agoAdd yet another parameter -- maxrecs -- to newSearch() and triggerSearch()
Mike Taylor [Thu, 3 Apr 2014 15:44:59 +0000 (16:44 +0100)]
Add yet another parameter -- maxrecs -- to newSearch() and triggerSearch()
I'm starting to worry about these function signatures.

10 years agoSet maxrecs=1
Mike Taylor [Thu, 3 Apr 2014 15:44:19 +0000 (16:44 +0100)]
Set maxrecs=1

10 years agoText within popup card is black, as it should always have been.
Mike Taylor [Thu, 3 Apr 2014 13:40:39 +0000 (14:40 +0100)]
Text within popup card is black, as it should always have been.

10 years agoAll mkwsRecords-related styles now also apply to mkwsRecord.
Mike Taylor [Thu, 3 Apr 2014 13:36:00 +0000 (14:36 +0100)]
All mkwsRecords-related styles now also apply to mkwsRecord.

10 years agoUse mkwsRecord rather than mkwsRecords
Mike Taylor [Thu, 3 Apr 2014 13:30:37 +0000 (14:30 +0100)]
Use mkwsRecord rather than mkwsRecords

10 years agoBack to Google Images -- there's some problem with Flickr.
Mike Taylor [Thu, 3 Apr 2014 13:30:11 +0000 (14:30 +0100)]
Back to Google Images -- there's some problem with Flickr.

10 years agoLog hit-count.
Mike Taylor [Thu, 3 Apr 2014 13:29:49 +0000 (14:29 +0100)]
Log hit-count.

10 years agoUse Flickr rather then Google Images.
Mike Taylor [Thu, 3 Apr 2014 11:05:31 +0000 (12:05 +0100)]
Use Flickr rather then Google Images.
UDB is specified using == rather than =.

10 years agoFix target ID for lolcat demo -- stupidly, this has changed because
Mike Taylor [Wed, 2 Apr 2014 16:37:57 +0000 (17:37 +0100)]
Fix target ID for lolcat demo -- stupidly, this has changed because
the default CF server used by connectors exported from the Repo has
changed. Which is one more reason why we were dumb to use ZURLs and
ID.

10 years agoTrying to find images.
Mike Taylor [Wed, 2 Apr 2014 16:35:49 +0000 (17:35 +0100)]
Trying to find images.

10 years agoUse an mkwsRecord element.
Mike Taylor [Wed, 2 Apr 2014 16:30:02 +0000 (17:30 +0100)]
Use an mkwsRecord element.

10 years agoAdd mkws-widget-record.js to COMPONENTS.
Mike Taylor [Wed, 2 Apr 2014 16:17:41 +0000 (17:17 +0100)]
Add mkws-widget-record.js to COMPONENTS.

10 years agoNew widget, "Record" (singular)
Mike Taylor [Wed, 2 Apr 2014 16:16:50 +0000 (17:16 +0100)]
New widget, "Record" (singular)

10 years agoAutosearch works again for mkwsTermlists.
Mike Taylor [Wed, 2 Apr 2014 16:07:59 +0000 (17:07 +0100)]
Autosearch works again for mkwsTermlists.

10 years agoMove the maybeAutosearch widget from the mkws namespace into the widget namespace.
Mike Taylor [Wed, 2 Apr 2014 16:06:29 +0000 (17:06 +0100)]
Move the maybeAutosearch widget from the mkws namespace into the widget namespace.

10 years agoReorder.
Mike Taylor [Wed, 2 Apr 2014 16:05:21 +0000 (17:05 +0100)]
Reorder.

10 years agoRename local variable.
Mike Taylor [Wed, 2 Apr 2014 16:03:23 +0000 (17:03 +0100)]
Rename local variable.

10 years agoMove auto-searching code out of Records widget into
Mike Taylor [Wed, 2 Apr 2014 16:02:15 +0000 (17:02 +0100)]
Move auto-searching code out of Records widget into
mkws.maybeAutosearch utility function.

10 years agoOops, reinstate accidentally deleted line.
Mike Taylor [Wed, 2 Apr 2014 15:46:44 +0000 (16:46 +0100)]
Oops, reinstate accidentally deleted line.

10 years agoRecognise targetfilter attribute instead of torusquery
Mike Taylor [Wed, 2 Apr 2014 15:42:56 +0000 (16:42 +0100)]
Recognise targetfilter attribute instead of torusquery

10 years agoUse targetfilter attribute instead of torusquery
Mike Taylor [Wed, 2 Apr 2014 15:42:43 +0000 (16:42 +0100)]
Use targetfilter attribute instead of torusquery

10 years agoAccept and pass through "limit" argument from auto-widgets.
Mike Taylor [Wed, 2 Apr 2014 15:40:04 +0000 (16:40 +0100)]
Accept and pass through "limit" argument from auto-widgets.

10 years agonewSearch and triggerSearch functions now accept 'limit' argument.
Mike Taylor [Wed, 2 Apr 2014 15:39:41 +0000 (16:39 +0100)]
newSearch and triggerSearch functions now accept 'limit' argument.

This is a stateless one-shot passed into each invocation as needed,
separate from (and joined with) the prevailing set of limits that have
been set by navigation.

10 years agoAdd limit.
Mike Taylor [Wed, 2 Apr 2014 15:38:44 +0000 (16:38 +0100)]
Add limit.
Change perpage and sort.

10 years agotorusquery selects targets by category.
Mike Taylor [Wed, 2 Apr 2014 13:55:21 +0000 (14:55 +0100)]
torusquery selects targets by category.

10 years agoMerge branch 'master' of ssh://git.indexdata.com/home/git/private/mkws
Mike Taylor [Wed, 2 Apr 2014 13:10:50 +0000 (14:10 +0100)]
Merge branch 'master' of ssh://git.indexdata.com/home/git/private/mkws

10 years agoTargets are now specified by torusquery.
Mike Taylor [Wed, 2 Apr 2014 12:32:00 +0000 (13:32 +0100)]
Targets are now specified by torusquery.

10 years agoAutosearching submits torusquery parameter from widget.
Mike Taylor [Wed, 2 Apr 2014 12:31:37 +0000 (13:31 +0100)]
Autosearching submits torusquery parameter from widget.
This can be used to say:
<div class='mkwsRecords' autosearch='dinosaur' torusquery='udb=brown'/>

10 years agonewSearch() and triggerSearch() now accept new torusquery paremeter.
Mike Taylor [Wed, 2 Apr 2014 12:30:46 +0000 (13:30 +0100)]
newSearch() and triggerSearch() now accept new torusquery paremeter.

10 years agoWhitespace.
Mike Taylor [Wed, 2 Apr 2014 10:53:08 +0000 (11:53 +0100)]
Whitespace.

10 years agoWhitespace
Mike Taylor [Wed, 2 Apr 2014 10:51:43 +0000 (11:51 +0100)]
Whitespace

10 years agoRemoval of old full-record div now honours teamname.
Mike Taylor [Wed, 2 Apr 2014 10:48:25 +0000 (11:48 +0100)]
Removal of old full-record div now honours teamname.

10 years agochmod 444 for read-only generated files instead of -w.
Mike Taylor [Wed, 2 Apr 2014 06:58:46 +0000 (07:58 +0100)]
chmod 444 for read-only generated files instead of -w.
That's because chmod -w on the file in a directory with g+s fails with:
$ chmod -w jquery.json-2.4.js
chmod: jquery.json-2.4.js: new permissions are r--rw-r--, not r--r--r--
and this impedes the Jenkins testing.

10 years agoSet perpage parameter in auto-searcher.
Mike Taylor [Tue, 1 Apr 2014 15:15:39 +0000 (16:15 +0100)]
Set perpage parameter in auto-searcher.

10 years agoAuto-search uses perpage configuration item.
Mike Taylor [Tue, 1 Apr 2014 15:12:38 +0000 (16:12 +0100)]
Auto-search uses perpage configuration item.

10 years agonewSearch and triggerSearch accept a perpage argument.
Mike Taylor [Tue, 1 Apr 2014 15:12:10 +0000 (16:12 +0100)]
newSearch and triggerSearch accept a perpage argument.

10 years agoQuote the property-name "class" in an object constant.
Mike Taylor [Tue, 1 Apr 2014 12:53:57 +0000 (13:53 +0100)]
Quote the property-name "class" in an object constant.

This is in some sense reasonable to require, since "class" is for some
reason a keyword in JavaScript even though it's not used by the
language which doesn't even have classes. Douglas Crockford's book
"JavaScript: The Good Parts" lists 59 reserved words of which maybe
half are actually used in the language. The others include such
tantalising morsels as "interface" and "implements", "package",
"protected" and even "debugger".

In the absence of this quoting, our JavaScript minifier yui-compressor
responds with
Exception in thread "main" java.lang.reflect.InvocationTargetException
then forty levels of completely uninformative stack-trace before
giving up and rather lamely saying "... 5 more".

Is it really too much to ask that a JavaScript parser should respond
to a syntax error with "syntax error: unquoted keyword 'class'"?

Sheesh.

10 years agoRemove unused utility function objectWithParent.
Mike Taylor [Tue, 1 Apr 2014 12:22:43 +0000 (13:22 +0100)]
Remove unused utility function objectWithParent.
We use Object.create instead: not as good, but good enough.

10 years agoUse mkws.getParameterByName
Mike Taylor [Tue, 1 Apr 2014 12:20:55 +0000 (13:20 +0100)]
Use mkws.getParameterByName

10 years agoUse mkws.getParameterByName instead of same-named local function.
Mike Taylor [Tue, 1 Apr 2014 12:20:39 +0000 (13:20 +0100)]
Use mkws.getParameterByName instead of same-named local function.

10 years agoMv team-local getParameterByName function to mkws.getParameterByName
Mike Taylor [Tue, 1 Apr 2014 12:20:13 +0000 (13:20 +0100)]
Mv team-local getParameterByName function to mkws.getParameterByName
So it can be accessed from both the team and individual widgets.

10 years agoRemove unused temporary
Mike Taylor [Tue, 1 Apr 2014 12:16:17 +0000 (13:16 +0100)]
Remove unused temporary

10 years agoRemove extraneous logging
Mike Taylor [Tue, 1 Apr 2014 12:15:51 +0000 (13:15 +0100)]
Remove extraneous logging

10 years agoAuto-search parameters are taken from widget config, not node.
Mike Taylor [Tue, 1 Apr 2014 12:14:25 +0000 (13:14 +0100)]
Auto-search parameters are taken from widget config, not node.

10 years agoMove much of the "ready" callback code outside.
Mike Taylor [Tue, 1 Apr 2014 12:01:58 +0000 (13:01 +0100)]
Move much of the "ready" callback code outside.
It's static analysis of the auto-search query.

10 years agoOnly establish the "ready" subscriber if there's an autosearch attribute.
Mike Taylor [Tue, 1 Apr 2014 11:49:24 +0000 (12:49 +0100)]
Only establish the "ready" subscriber if there's an autosearch attribute.

10 years agoAuto-searching code is now part of the Records widget.
Mike Taylor [Tue, 1 Apr 2014 11:26:29 +0000 (12:26 +0100)]
Auto-searching code is now part of the Records widget.

10 years agoRemove runAutoSearch. Relevant code is now in the Records widget.
Mike Taylor [Tue, 1 Apr 2014 11:26:12 +0000 (12:26 +0100)]
Remove runAutoSearch. Relevant code is now in the Records widget.

10 years agonewSearch is now made available a that.newSearch.
Mike Taylor [Tue, 1 Apr 2014 11:24:12 +0000 (12:24 +0100)]
newSearch is now made available a that.newSearch.
It's needed by the auto-searching code in individual widgets.

10 years agoTeam does not subscribe to "ready" event (but "Records" widget does)
Mike Taylor [Tue, 1 Apr 2014 11:19:39 +0000 (12:19 +0100)]
Team does not subscribe to "ready" event (but "Records" widget does)

10 years agoRemove unnecessary logging.
Mike Taylor [Tue, 1 Apr 2014 10:07:32 +0000 (11:07 +0100)]
Remove unnecessary logging.

10 years agoSubscriber for "ready" event now invokes runAutoSearch.
Mike Taylor [Tue, 1 Apr 2014 10:06:41 +0000 (11:06 +0100)]
Subscriber for "ready" event now invokes runAutoSearch.

10 years agorunAutoSearches now merely publishes a "ready" event.
Mike Taylor [Tue, 1 Apr 2014 10:06:22 +0000 (11:06 +0100)]
runAutoSearches now merely publishes a "ready" event.

10 years agoAuto-executing body.
Mike Taylor [Tue, 1 Apr 2014 10:05:59 +0000 (11:05 +0100)]
Auto-executing body.

10 years agoBlind attempt to fix Jenkins error.
Mike Taylor [Tue, 1 Apr 2014 08:38:22 +0000 (09:38 +0100)]
Blind attempt to fix Jenkins error.

10 years agoAdd a logging div.
Mike Taylor [Mon, 31 Mar 2014 16:23:39 +0000 (17:23 +0100)]
Add a logging div.

10 years agoMove queue function to the top of the team-factory function.
Mike Taylor [Mon, 31 Mar 2014 16:21:51 +0000 (17:21 +0100)]
Move queue function to the top of the team-factory function.
log publishes on the "log" queue for the benefit of the Log widget.

10 years agoAdd mkws-widget-log.js to COMPONENTS.
Mike Taylor [Mon, 31 Mar 2014 16:20:15 +0000 (17:20 +0100)]
Add mkws-widget-log.js to COMPONENTS.

10 years agoNew file, mkws-widget-log.js
Mike Taylor [Mon, 31 Mar 2014 16:19:46 +0000 (17:19 +0100)]
New file, mkws-widget-log.js

10 years agoRe-order COMPONENTS
Mike Taylor [Mon, 31 Mar 2014 15:53:22 +0000 (16:53 +0100)]
Re-order COMPONENTS

10 years agoJSON parsing of data-mkws-config attribute now protected by try/catch
Mike Taylor [Mon, 31 Mar 2014 15:35:41 +0000 (16:35 +0100)]
JSON parsing of data-mkws-config attribute now protected by try/catch
block, complains loudly on failure.

10 years agoAdd attribute-parsing code to widget constructor.
Mike Taylor [Mon, 31 Mar 2014 15:26:51 +0000 (16:26 +0100)]
Add attribute-parsing code to widget constructor.

Handles three cases:

1. data-mkws-config -- argument is a JSON fragment containing any
number of key=value pairs to be added to the configuration
2. Any other data-mkws-NAME -- argument is a string, and is set as the
value of the configuration item NAME.
3. Any other attribute NAME that is not one of a hardwired set that are
recognised and discarded -- argument is a string, and is set
as the value of the attribute name.

Case 1 is the industrial-strength one that can be used when setting a
complex value, such as a list of facets:
data-mkws-config='{ "facets": ["xtargets", "author", "subject"] }'
Case 2 is the general-purpose way of setting any string value simply:
data-mkws-perpage="50"
Case 3 is a simplifying short-cut for case 2:
perpage="20"

10 years agoSweet, sweet use of data-mkws-config to change facet order.
Mike Taylor [Mon, 31 Mar 2014 15:15:52 +0000 (16:15 +0100)]
Sweet, sweet use of data-mkws-config to change facet order.

10 years agoEach widget now has its own config object, inheriting from the team
Mike Taylor [Fri, 28 Mar 2014 17:01:54 +0000 (17:01 +0000)]
Each widget now has its own config object, inheriting from the team
confirm, which inherits from the MKWS config, which inherits from the
default config. W00t!

10 years agoAdd config() accessor function. Used only by widget factory.
Mike Taylor [Fri, 28 Mar 2014 17:01:19 +0000 (17:01 +0000)]
Add config() accessor function. Used only by widget factory.

10 years agoEach team now has its own config object, m_config, which inherits from
Mike Taylor [Fri, 28 Mar 2014 16:28:35 +0000 (16:28 +0000)]
Each team now has its own config object, m_config, which inherits from
the global mkws.config (which of course in turn inherits from the
default set of parameters).

All configuration information is now taken from the per-team config.

10 years agoDo the copy-into-htdocs operations all on a single line.
Mike Taylor [Fri, 28 Mar 2014 16:16:55 +0000 (16:16 +0000)]
Do the copy-into-htdocs operations all on a single line.

10 years agomkws.defaultMkwsConfig replaced with mkws.setMkwsConfig.
Mike Taylor [Fri, 28 Mar 2014 16:16:25 +0000 (16:16 +0000)]
mkws.defaultMkwsConfig replaced with mkws.setMkwsConfig.
This makes a hash that inherits from an immutable set of defaults.

10 years agoSimplify.
Mike Taylor [Fri, 28 Mar 2014 11:32:12 +0000 (11:32 +0000)]
Simplify.

10 years agoMove default empty-hash assignment of mkws_config inside defaultMkwsConfig
Mike Taylor [Fri, 28 Mar 2014 11:05:03 +0000 (11:05 +0000)]
Move default empty-hash assignment of mkws_config inside defaultMkwsConfig

10 years agoTests inspect mkws.config rather than old mkws_config
Mike Taylor [Fri, 28 Mar 2014 11:04:28 +0000 (11:04 +0000)]
Tests inspect mkws.config rather than old mkws_config

10 years agoFix blindly-copied comment.
Mike Taylor [Fri, 28 Mar 2014 11:02:22 +0000 (11:02 +0000)]
Fix blindly-copied comment.

10 years agoSwitch around code order so a local alias can be used more.
Mike Taylor [Fri, 28 Mar 2014 11:00:53 +0000 (11:00 +0000)]
Switch around code order so a local alias can be used more.

10 years agoCopy mkws_config into mkws.config, and thereafter use that
Mike Taylor [Fri, 28 Mar 2014 11:00:12 +0000 (11:00 +0000)]
Copy mkws_config into mkws.config, and thereafter use that

10 years agoAdd mkws.objectWithParent function -- not yet used.
Mike Taylor [Fri, 28 Mar 2014 10:48:22 +0000 (10:48 +0000)]
Add mkws.objectWithParent function -- not yet used.

10 years agoBreak some long lines.
Mike Taylor [Thu, 27 Mar 2014 17:08:08 +0000 (17:08 +0000)]
Break some long lines.

10 years agoFactor common code out of delimitTarget and delimitQuery into new
Mike Taylor [Thu, 27 Mar 2014 17:03:55 +0000 (17:03 +0000)]
Factor common code out of delimitTarget and delimitQuery into new
utility function removeMatchingFilters.

10 years agoReorder
Mike Taylor [Thu, 27 Mar 2014 16:28:27 +0000 (16:28 +0000)]
Reorder

10 years agoReorder.
Mike Taylor [Thu, 27 Mar 2014 16:28:18 +0000 (16:28 +0000)]
Reorder.

10 years agoMove dispatcher functions outside self-executor.
Mike Taylor [Thu, 27 Mar 2014 16:26:31 +0000 (16:26 +0000)]
Move dispatcher functions outside self-executor.

10 years agoMove defaultMkwsConfig out of auto-executer.
Mike Taylor [Thu, 27 Mar 2014 15:56:08 +0000 (15:56 +0000)]
Move defaultMkwsConfig out of auto-executer.

10 years agoRemove unnecessary duplicate test.
Mike Taylor [Thu, 27 Mar 2014 15:48:30 +0000 (15:48 +0000)]
Remove unnecessary duplicate test.

10 years agoRemove extraneous prefix.
Mike Taylor [Thu, 27 Mar 2014 15:44:42 +0000 (15:44 +0000)]
Remove extraneous prefix.

10 years agoMove registerWidgetType and promotionFunction outside the
Mike Taylor [Thu, 27 Mar 2014 15:43:57 +0000 (15:43 +0000)]
Move registerWidgetType and promotionFunction outside the
self-executing function.