mkws-moved-to-github.git
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.

10 years agoRemove trailing whitespace.
Mike Taylor [Thu, 27 Mar 2014 13:19:21 +0000 (13:19 +0000)]
Remove trailing whitespace.

10 years agoInsert semicolons after all statements of the form
Mike Taylor [Thu, 27 Mar 2014 13:19:01 +0000 (13:19 +0000)]
Insert semicolons after all statements of the form
mkws.FN = function(args) { ... }

Missing them off is usually all right, but when it goes wrong (as when
I missed the semi-colon from the end of the recently-moved mkws.log
definition) it goes catastrophically wrong and is very hard to debug.

10 years agoInsert semicolons after all statements of the form
Mike Taylor [Thu, 27 Mar 2014 13:18:46 +0000 (13:18 +0000)]
Insert semicolons after all statements of the form
mkws.FN = function(args) { ... }

Missing them off is usually all right, but when it goes wrong (as when
I missed the semi-colon from the end of the recently-moved mkws.log
definition) it goes catastrophically wrong and is very hard to debug.

10 years agoInsert semicolons after all statements of the form
Mike Taylor [Thu, 27 Mar 2014 13:17:26 +0000 (13:17 +0000)]
Insert semicolons after all statements of the form
mkws.FN = function(args) { ... }

Missing them off is usually all right, but when it goes wrong (as when
I missed the semi-colon from the end of the recently-moved mkws.log
definition) it goes catastrophically wrong and is very hard to debug.

10 years agoReindent.
Mike Taylor [Thu, 27 Mar 2014 13:15:56 +0000 (13:15 +0000)]
Reindent.

10 years agoMove mkws.log out of immediate-execute wrapper.
Mike Taylor [Thu, 27 Mar 2014 13:15:43 +0000 (13:15 +0000)]
Move mkws.log out of immediate-execute wrapper.

10 years agoFix parameter name.
Mike Taylor [Thu, 27 Mar 2014 12:16:49 +0000 (12:16 +0000)]
Fix parameter name.

10 years agoRemove do-nothing invocation wrapper.
Mike Taylor [Thu, 27 Mar 2014 12:15:48 +0000 (12:15 +0000)]
Remove do-nothing invocation wrapper.

10 years agoWhitespace
Mike Taylor [Thu, 27 Mar 2014 12:03:46 +0000 (12:03 +0000)]
Whitespace

10 years agoWhitespace.
Mike Taylor [Thu, 27 Mar 2014 12:01:57 +0000 (12:01 +0000)]
Whitespace.

10 years agoWhitespace.
Mike Taylor [Thu, 27 Mar 2014 12:01:08 +0000 (12:01 +0000)]
Whitespace.

10 years agoChange logging message.
Mike Taylor [Thu, 27 Mar 2014 11:32:52 +0000 (11:32 +0000)]
Change logging message.

10 years agoWhitespace.
Mike Taylor [Thu, 27 Mar 2014 11:32:33 +0000 (11:32 +0000)]
Whitespace.

10 years agoGot rid of ALL promotion-function names.
Mike Taylor [Thu, 27 Mar 2014 11:31:58 +0000 (11:31 +0000)]
Got rid of ALL promotion-function names.
All is now done by passing anonymous functions to registerWidgetType.

10 years agoInclude mkws-widget-authname.js in COMPONENTS.
Mike Taylor [Wed, 26 Mar 2014 17:49:07 +0000 (17:49 +0000)]
Include mkws-widget-authname.js in COMPONENTS.

10 years agoNew file, and the first standalone widget:
Mike Taylor [Wed, 26 Mar 2014 17:48:50 +0000 (17:48 +0000)]
New file, and the first standalone widget:
mkws-widget-authname.js implements the Authname widget.
Fixes bug MKWS-145.

10 years agoAdd mkwsAuthname widget, and CSS styling.
Mike Taylor [Wed, 26 Mar 2014 17:48:11 +0000 (17:48 +0000)]
Add mkwsAuthname widget, and CSS styling.

10 years agoInstead of saving authName in the mkws structure, publish it to the
Mike Taylor [Wed, 26 Mar 2014 17:42:33 +0000 (17:42 +0000)]
Instead of saving authName in the mkws structure, publish it to the
"authenticated" queue of each team.

10 years agoRemove logging of authName
Mike Taylor [Wed, 26 Mar 2014 17:39:25 +0000 (17:39 +0000)]
Remove logging of authName

10 years agoSave displayName of authenticated library, if any, as mkws.authName.
Mike Taylor [Wed, 26 Mar 2014 17:33:31 +0000 (17:33 +0000)]
Save displayName of authenticated library, if any, as mkws.authName.
Part of MKWS-145 (Make a library-name widget).

10 years agoSingle version with low-level components.
Mike Taylor [Wed, 26 Mar 2014 17:32:22 +0000 (17:32 +0000)]
Single version with low-level components.

10 years agoThe Perpage widget's promotion-function is now anonymous.
Mike Taylor [Wed, 26 Mar 2014 17:19:45 +0000 (17:19 +0000)]
The Perpage widget's promotion-function is now anonymous.

This feels strangely daring. It's very neat and concise, but may be
wandering dangerously close to the line where elegance is bought at
the price of incomprehensibility.

10 years agoFix Sort and Perpage widgets by yet more that=this.
Mike Taylor [Wed, 26 Mar 2014 17:18:18 +0000 (17:18 +0000)]
Fix Sort and Perpage widgets by yet more that=this.

10 years agoMove comment.
Mike Taylor [Wed, 26 Mar 2014 17:16:36 +0000 (17:16 +0000)]
Move comment.

10 years agoEach registerWidgetType invocation directly follows the function it
Mike Taylor [Wed, 26 Mar 2014 17:14:32 +0000 (17:14 +0000)]
Each registerWidgetType invocation directly follows the function it
invokes. Makes each widget's source a standalone piece of text.

10 years agoComment up to date.
Mike Taylor [Wed, 26 Mar 2014 17:12:34 +0000 (17:12 +0000)]
Comment up to date.

10 years agoRename all promote<TYPE> functions to promoteTo<TYPE>
Mike Taylor [Wed, 26 Mar 2014 17:12:05 +0000 (17:12 +0000)]
Rename all promote<TYPE> functions to promoteTo<TYPE>

10 years agoRename variable.
Mike Taylor [Wed, 26 Mar 2014 17:11:06 +0000 (17:11 +0000)]
Rename variable.

10 years agoRemove extraneous duplicate line.
Mike Taylor [Wed, 26 Mar 2014 17:09:17 +0000 (17:09 +0000)]
Remove extraneous duplicate line.

10 years agoFix comment.
Mike Taylor [Wed, 26 Mar 2014 17:08:21 +0000 (17:08 +0000)]
Fix comment.

10 years agoReindent.
Mike Taylor [Wed, 26 Mar 2014 17:07:18 +0000 (17:07 +0000)]
Reindent.

10 years agoRegister widget-types only once, at the end.
Mike Taylor [Wed, 26 Mar 2014 17:07:01 +0000 (17:07 +0000)]
Register widget-types only once, at the end.

10 years agoMove that various specific-widget-type functions outside the scope of
Mike Taylor [Wed, 26 Mar 2014 17:06:16 +0000 (17:06 +0000)]
Move that various specific-widget-type functions outside the scope of
the generic widget object. Involves a lot of tedious mucking about with
var that=this, but it's worth it because it makes each individual
widget type its own thing, ready to moved out into a separate file.

10 years agoOverride toString method for team objects.
Mike Taylor [Wed, 26 Mar 2014 16:55:20 +0000 (16:55 +0000)]
Override toString method for team objects.

10 years agoUse registerWidgetType from MKWS code.
Mike Taylor [Wed, 26 Mar 2014 14:55:11 +0000 (14:55 +0000)]
Use registerWidgetType from MKWS code.
Look up promotion functions using API, not direct access.

10 years agoNew API functions registerWidgetType and promotionFunction
Mike Taylor [Wed, 26 Mar 2014 14:51:59 +0000 (14:51 +0000)]
New API functions registerWidgetType and promotionFunction

10 years agoCreate mkws.type2fn hash dynamically.
Mike Taylor [Wed, 26 Mar 2014 14:28:54 +0000 (14:28 +0000)]
Create mkws.type2fn hash dynamically.
New function mkws.registerWidget is used to do this.

10 years agoAdd commented-out logging to findnode.
Mike Taylor [Wed, 26 Mar 2014 12:07:02 +0000 (12:07 +0000)]
Add commented-out logging to findnode.

10 years agoonRecord uses findnode rather than getElementById.
Mike Taylor [Wed, 26 Mar 2014 12:06:43 +0000 (12:06 +0000)]
onRecord uses findnode rather than getElementById.
That means its finding of the details element is team-specific.

10 years agoLess vertical ws.
Mike Taylor [Wed, 26 Mar 2014 12:01:19 +0000 (12:01 +0000)]
Less vertical ws.

10 years agoRemove pointless immediate-execute wrapper.
Mike Taylor [Wed, 26 Mar 2014 11:48:42 +0000 (11:48 +0000)]
Remove pointless immediate-execute wrapper.

10 years agoRemove vacuous try/catch that merely sets mkws_config.error, a member
Mike Taylor [Wed, 26 Mar 2014 11:48:29 +0000 (11:48 +0000)]
Remove vacuous try/catch that merely sets mkws_config.error, a member
that is never checked elsewhere in the code. In fact, this idiot-code
may be the reason that some mkwsHtmlAll errors earlier in development
never seemed to get reported. D'oh!

10 years agoRemove another misleading comment.
Mike Taylor [Wed, 26 Mar 2014 11:46:45 +0000 (11:46 +0000)]
Remove another misleading comment.

10 years agoRemove extraneous comments.
Mike Taylor [Wed, 26 Mar 2014 11:45:59 +0000 (11:45 +0000)]
Remove extraneous comments.

10 years agoEliminate function onFormSubmitEventHandler, use closure instead.
Mike Taylor [Wed, 26 Mar 2014 11:45:34 +0000 (11:45 +0000)]
Eliminate function onFormSubmitEventHandler, use closure instead.

10 years agoReorder functions.
Mike Taylor [Wed, 26 Mar 2014 11:43:10 +0000 (11:43 +0000)]
Reorder functions.

10 years agoRemove extraneous comment.
Mike Taylor [Wed, 26 Mar 2014 11:41:14 +0000 (11:41 +0000)]
Remove extraneous comment.

10 years agoBlank line
Mike Taylor [Wed, 26 Mar 2014 11:40:57 +0000 (11:40 +0000)]
Blank line

10 years agolog is declared as a function.
Mike Taylor [Wed, 26 Mar 2014 11:38:57 +0000 (11:38 +0000)]
log is declared as a function.

10 years agoMore comments
Mike Taylor [Wed, 26 Mar 2014 11:38:23 +0000 (11:38 +0000)]
More comments

10 years agoComment formatting.
Mike Taylor [Wed, 26 Mar 2014 11:37:31 +0000 (11:37 +0000)]
Comment formatting.

10 years agoReorder function-list in comment.
Mike Taylor [Wed, 26 Mar 2014 11:36:39 +0000 (11:36 +0000)]
Reorder function-list in comment.

10 years agoComment typo.
Mike Taylor [Wed, 26 Mar 2014 11:36:00 +0000 (11:36 +0000)]
Comment typo.

10 years agoMore comment.
Mike Taylor [Wed, 26 Mar 2014 11:28:15 +0000 (11:28 +0000)]
More comment.

10 years agoComment typo.
Mike Taylor [Wed, 26 Mar 2014 11:27:39 +0000 (11:27 +0000)]
Comment typo.

10 years agoRemove misleading logging.
Mike Taylor [Wed, 26 Mar 2014 11:25:15 +0000 (11:25 +0000)]
Remove misleading logging.

10 years agoTypo in error message.
Mike Taylor [Wed, 26 Mar 2014 11:24:28 +0000 (11:24 +0000)]
Typo in error message.

10 years agoAdd comment
Mike Taylor [Wed, 26 Mar 2014 11:22:38 +0000 (11:22 +0000)]
Add comment

10 years agomkws.log now assigned from existing function rather than vice versa.
Mike Taylor [Wed, 26 Mar 2014 11:21:39 +0000 (11:21 +0000)]
mkws.log now assigned from existing function rather than vice versa.

10 years agohandleNodeWithTeam is now a local function, not a member.
Mike Taylor [Wed, 26 Mar 2014 11:20:18 +0000 (11:20 +0000)]
handleNodeWithTeam is now a local function, not a member.

10 years agoSimplify creation of search-form by eliminating unnecessary
Mike Taylor [Wed, 26 Mar 2014 11:18:01 +0000 (11:18 +0000)]
Simplify creation of search-form by eliminating unnecessary
mkws.handleNodeWithTeam invocation.