1
0
Fork 0
Commit Graph

756 Commits (d918d56a7eb6e553c319dca14ee613be32d38ee8)

Author SHA1 Message Date
Joseph Frazer 52285d0a6c [DEV-3866] checkboxes were not changing values when unchecked
If a single checkbox in a group is not checked, the value should be "0".
2018-11-07 11:04:05 -05:00
Joseph Frazer 85ac34ebbd [DEV-3866] allow checkboxes to be unchecked 2018-11-06 11:51:22 -05:00
Joseph Frazer 42a3432772 [DEV-3866] use correct default for checkboxes 2018-11-06 07:56:11 -05:00
Joseph Frazer a3b5dd286f [DEV-3866] handle checkbox default values properly
The "checkbox" questions belong to the group of questions that change
the "checked" attribute rather than the "value" attribute.
2018-11-05 16:26:11 -05:00
Joseph Frazer 7b3c56e4a3 [DEV-3866] changes related to new "checkbox" question type 2018-11-05 12:35:57 -05:00
Joseph Frazer a8d0b8c817 [DEV-3866] changes for new checkbox question type
The new checkbox question type is setup with an empty validator. When
checked, it was not unchecking because it was trying to behave like the
"noyes" questions. I updated the logic to not behave like that if there
is only one checkbox in a group.
2018-11-05 11:34:33 -05:00
Mike Gerwitz 2df1ecc426 ProgramQuoteCleaner: Clean non-linked groups 2018-10-23 15:48:18 -04:00
Mike Gerwitz 2bc1b96a15 ProgramQuoteCleaner: Clean all groups (not just linked)
* src/server/quote/ProgramQuoteCleaner.js (clean): Add docblock.
    Replace previous linked group cleaning with call to `_fixGroup'.
  (_fixGroup): New method.  Similar logic to previous linked group cleaning,
    except that fields are never truncated.
  (_fixLinkedGroups, _getLinkedIndexLength): Remove methods.
  (_getGroupLength): New method determining group size from leader length,
    which also accounts for linked groups.
* test/server/quote/ProgramQuoteCleanerTest.js: New test case.
2018-10-21 23:41:58 -04:00
Mike Gerwitz 27cc3d2c63 Program#cmatchCheck: Add more informative third argument
* src/program/Program.js (cmatchCheck)[cdata]: New argument to try to disambiguate
    empty indexes while maintaining BC with existing quirky behavior.
2018-10-16 10:28:19 -04:00
Joseph Frazer 0a01456a46 [DEV-3284] Remove references to "LoVullo" 2018-09-27 10:07:08 -04:00
Joseph Frazer aed5ddd1b7 Revert "[DEV-3011] Add validation and style for datalists"
This reverts commit 394dde7de7.
2018-09-24 11:03:30 -04:00
Joseph Frazer e17ace40ed Revert "[DEV-3011] Do not use "Number" validator for datalists."
This reverts commit e064378c99.
2018-09-24 11:03:27 -04:00
Joseph Frazer 5374345f1a [DEV-3011] Add validation and style for datalists 2018-09-14 08:57:33 -04:00
Joseph Frazer e064378c99 [DEV-3011] Do not use "Number" validator for datalists. 2018-09-12 13:50:52 -04:00
Joseph Frazer 394dde7de7 [DEV-3011] Add validation and style for datalists 2018-09-12 12:29:40 -04:00
Jeff Fisher d320ea704a Merge branch 'jira-3497' into 'master'
[DEV-3497] Updated tabbed block to use default selection

See merge request floss/liza!40
2018-08-30 15:21:26 -04:00
Jeffrey Fisher 0f9ae0d08e [DEV-3497] Updated selection if selection is disabled 2018-08-30 13:55:57 -04:00
Jeffrey Fisher ee5306a279 [DEV-3497] Updated variable name 2018-08-30 10:24:21 -04:00
Jeffrey Fisher 43596eeed7 [DEV-3497] Updated tabbed block to use default selection 2018-08-29 13:33:41 -04:00
Joseph Frazer cd71432e39 Force tags for the version 2018-08-20 17:07:59 -04:00
Joseph Frazer dc39c636a4 [DEV-3393] Merge branch 'jira-3393' of gitlab.lovullo.com:floss/liza into jira-3393 2018-08-16 10:01:20 -04:00
Joseph Frazer b4ecb5a14c [DEV-3393] Made sure the entity id is a number 2018-08-16 07:35:52 -04:00
Joseph Frazer 11a565422a [DEV-3393] Use the correct variable name 2018-08-15 16:13:35 -04:00
Mike Gerwitz d4948e2197 [bugfix] Daemon: Do not un-initialize controller no_result_url 2018-08-15 15:49:35 -04:00
Joseph Frazer c61c1196c4 [DEV-3393] Chnage property type to correct type 2018-08-15 15:14:10 -04:00
Joseph Frazer 52491c1ce0 [DEV-3393] The entity id should not be sent unless the request is
internal.
2018-08-15 15:10:13 -04:00
Joseph Frazer 4b1fda57b8 [DEV-3393] minor changes to improve code quality 2018-08-15 15:05:21 -04:00
Joseph Frazer eb980f4fb7 [DEV-3393] Replace UNIX with Unix 2018-08-15 14:48:48 -04:00
Mike Gerwitz 2b93a0bbe4 [bugfix] Daemon: Do not un-initialize controller no_result_url
* src/server/daemon/Daemon.js (getProgramController): Do not initialize
  `no_results_url' to an empty string if not provided; instead, keep any
  existing value.  Otherwise, later calls with no arguments will clear
  previously-set values.

DEV-3254
2018-08-15 14:22:01 -04:00
Joseph Frazer 2c0bf764d1 [DEV-3393] Add more metadata to the init endpoint 2018-08-15 14:06:07 -04:00
Mike Gerwitz 003a58dbbb npm-shrinkwrap.json: Update 2018-08-15 10:33:18 -04:00
Mike Gerwitz d147d389d6 yarn.lock: Remove file
At least until we have time to test with it.
2018-08-15 10:28:52 -04:00
Mike Gerwitz cd56bae358 DataApiMediator: Do not check bucket value until after stack clears
This further highlights that we probably should not be handling this
here.  We want to ensure that we check the state of the bucket right before
we're about to do option setting, otherwise we could be in an inconsistent
state (looking at old data).

* src/client/dapi/DataApiMediator.js (_updateFieldData): Check bucket after
  stack clears (along with all other operations).
2018-08-13 12:29:35 -04:00
Mike Gerwitz f6c5862168 [bugfix] DataApiMediator: Wait for stack to clear before updating options 2018-08-10 15:38:07 -04:00
Mike Gerwitz e24038503b [bugfix] DapiMediator: Wait for stack to clear before updating options
This allows the UI to update before we add elements.  This really isn't the
best place to do this, but it will do for now.

DEV-3257
2018-08-10 15:25:29 -04:00
Mike Gerwitz 2e88e9795c [bugfix] Mitigate hook recursion problems by recent dapi changes 2018-08-10 14:25:09 -04:00
Mike Gerwitz b47deedf9c [DEV-3257] DataApiMediator: Set bucket data after stack clear
Allowing the stack to clear ensures that (in practice) DelayedStagingBucket
is given a chance to do necessary processing before data are requested from
it by bucket hooks as a result of _this_ invocation, which in turn
results (in some cases) in infinite recursion.

* src/client/dapi/DataApiMediator.js (_updateFieldData): Allow stack to
    clear before invoking `quote.setData'.
* test/client/dapi/DataApiMediatorTest.js: Test respectively.

DEV-3257
2018-08-10 13:33:54 -04:00
Mike Gerwitz 9243eeb8bc [DEV-3257] DelayedStagingBucket: Preempt infinite recursion on #processValues
* src/bucket/DelayedRecursionError.js: New class.
* src/bucket/DelayedStagingBucket.js: Update copyright and docblock.
  (_processing): New field.
  (getDataByName): Check against undefined before invoking
    `#processValues'.
  (processValues): Increment lock (_withProcessLock).
  (_withProcessLock): Error on recursion >= 5.

DEV-3257
2018-08-10 11:17:13 -04:00
Mike Gerwitz 9f944bb7ec DelayedStagingBucket: Remove this.__super workaround
This was fixed in GNU ease.js 0.2.0 (which was released years ago).
2018-08-02 14:47:26 -04:00
Mike Gerwitz 7fd07f00e9 Client: Default dapimap to empty object
Without this, we have a BC break.

* src/client/Client.js (_init): Default program.dapimap to DataApiMediator
  instance to an empty object to maintain BC.
2018-07-18 16:52:04 -04:00
Mike Gerwitz 8888749059 Expand appropriate option when DataAPI results return 2018-07-18 13:10:50 -04:00
Mike Gerwitz abc2564d9c DataApiMediator: Do not auto-expand into populated fields
* src/client/dapi/DataApiMediator.js (_populateWithMap): Update
    docblock.  Ignore field during expansion if it would overwrite an
    existing value.
* test/client/dapi/DataApiMediatorTest.js: Update tests data to include
    values for all bucket fields, not just `name'.  Add test for new
    condition.

DEV-3257
2018-07-17 15:44:37 -04:00
Mike Gerwitz 839952a56d [DEV-3257] DataApiMediator: Auto-expand into fields on reply [*]
[*] You should not use this commit directly since this may wipe out data in
fields the user has changed.  See future commit where this situation is
properly handled.

* src/client/Client (_init): Provide dapimap to DataApiMediator instance.
* src/client/dapi/DataApiMediator.js
  (_dapi_map): New field.
  (constructor): Accept dapimap.  BC break (which is okay, since this is
    still part of a topic branch).  Assing to _dapi_map.  Update docblock.
  (monitor): Bind `dapi_manager' to first argument of handlers.
  (_updateFieldData): Accept `dapi_manager' as first argument.  Use
    `_populateWithMap' to generate additional update data.
  (_populateWithMap): New method.
  (_clearFieldFailures): Accept `dapi_manager' as first argument.
* src/dapi/DataApiManager.js: Update copyright year.
  (getDataExpansion): Return empty object (consistent with interface) rather
    than `undefined' when field value is undefined.  Use
    {Error=>MissingDataError} when field data are missing.  Throw instead of
    emit.  Fix missing comma in var declarations.
* src/dapi/MissingDataError.js: New class.
* test/client/dapi/DataApiMediatorTest.js: Update test data to test field
    expansion.  New test against ignoring field expansion when data are not
    available.  Update Sut constructors of other tests for new dapimap
    parameter.

DEV-3257
2018-07-17 15:44:37 -04:00
Mike Gerwitz 160ab01f9a DataApiMediator: setData{ByName=>} to prepare for multi-field set
See following commit.

* src/client/dapi/DataApiMediator.js (_updateFieldData):
  `setData{ByName=>}'.
* test/client/dapi/DataApiMediatorTest.js: Update respective tests.

DEV-3257
2018-07-17 15:44:37 -04:00
Mike Gerwitz e25bec5ac0 DataApiMediator: New class
This extracts existing code from Client and adds tests.  The glue code is
far from ideal and highlights the amount of work needed to decouple Client
from so many parts of the system.

* src/client/Client.js (_dapiManager): New field.
  (_init): Use DataApiMediator.
  (_createProgram): Assign `_dapiManager' (this is not at all
  ideal).  Remove hooks from it: fieldLoading, updateFieldData,
  clearFieldData.
* src/client/ClientDependencyFactory.js (createDataApiMediator): New alias
  to DataApiMediator constructor.
* src/client/dapi/DataApiMediator.js: New class.
* test/client/dapi/DataApiMediatorTest.js: New test case.

DEV-3257
2018-07-17 15:44:33 -04:00
Mike Gerwitz 3261fbd7ec controller: Fix progdata route error reporting
* src/server/daemon/controller.js (doRoute): response.{error=>internalError}.
2018-06-20 10:48:23 -04:00
Jeffrey Fisher dd90c3c9f1 StackedGroupUi header visibility and bucket default init 2018-06-19 10:29:42 -04:00
Jeffrey Fisher 8600c3beb7 [DEV-3192] Renamed variables and added test case 2018-06-19 10:28:48 -04:00
Jeffrey Fisher e079a5eb0a [DEV-3192] Simplified logic and corrected issue with bucket data 2018-06-19 10:28:48 -04:00
Jeffrey Fisher b72fb4b2c7 [DEV-3192] Added check for no doc_data 2018-06-19 10:28:48 -04:00