yafowil.widget.array 1.6.1__tar.gz → 1.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/CHANGES.rst +16 -2
  2. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/LICENSE.rst +11 -13
  3. yafowil_widget_array-1.8/PKG-INFO +223 -0
  4. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/README.rst +1 -1
  5. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/buildout.cfg +3 -3
  6. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/setup.cfg +3 -0
  7. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/setup.py +21 -14
  8. yafowil_widget_array-1.8/src/yafowil/__init__.py +1 -0
  9. yafowil_widget_array-1.8/src/yafowil/widget/__init__.py +1 -0
  10. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/__init__.py +1 -1
  11. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/example.py +7 -1
  12. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/resources/widget.js +16 -9
  13. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/tests.py +23 -23
  14. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/widget.py +13 -13
  15. yafowil_widget_array-1.8/src/yafowil.widget.array.egg-info/PKG-INFO +223 -0
  16. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil.widget.array.egg-info/SOURCES.txt +1 -5
  17. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil.widget.array.egg-info/entry_points.txt +0 -1
  18. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil.widget.array.egg-info/requires.txt +1 -1
  19. yafowil.widget.array-1.6.1/PKG-INFO +0 -193
  20. yafowil.widget.array-1.6.1/src/yafowil/__init__.py +0 -1
  21. yafowil.widget.array-1.6.1/src/yafowil/__init__.pyc +0 -0
  22. yafowil.widget.array-1.6.1/src/yafowil/widget/__init__.py +0 -1
  23. yafowil.widget.array-1.6.1/src/yafowil/widget/__init__.pyc +0 -0
  24. yafowil.widget.array-1.6.1/src/yafowil/widget/array/__init__.pyc +0 -0
  25. yafowil.widget.array-1.6.1/src/yafowil/widget/array/example.pyc +0 -0
  26. yafowil.widget.array-1.6.1/src/yafowil/widget/array/widget.pyc +0 -0
  27. yafowil.widget.array-1.6.1/src/yafowil.widget.array.egg-info/PKG-INFO +0 -193
  28. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/.jshintrc +0 -0
  29. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/MANIFEST.in +0 -0
  30. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/bootstrap.py +0 -0
  31. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/resources/bootstrap/widget.css +0 -0
  32. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/resources/default/images/icon_add.png +0 -0
  33. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/resources/default/images/icon_down.png +0 -0
  34. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/resources/default/images/icon_down_disabled.png +0 -0
  35. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/resources/default/images/icon_remove.png +0 -0
  36. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/resources/default/images/icon_up.png +0 -0
  37. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/resources/default/images/icon_up_disabled.png +0 -0
  38. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/resources/default/widget.css +0 -0
  39. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil/widget/array/resources/plone5/widget.css +0 -0
  40. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil.widget.array.egg-info/dependency_links.txt +0 -0
  41. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil.widget.array.egg-info/namespace_packages.txt +0 -0
  42. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil.widget.array.egg-info/not-zip-safe +0 -0
  43. {yafowil.widget.array-1.6.1 → yafowil_widget_array-1.8}/src/yafowil.widget.array.egg-info/top_level.txt +0 -0
@@ -1,7 +1,21 @@
1
-
2
- History
1
+ Changes
3
2
  =======
4
3
 
4
+ 1.8 (2025-11-03)
5
+ ----------------
6
+
7
+ - Pin upper versions of dependencies.
8
+ [lenadax]
9
+
10
+
11
+ 1.7 (2022-10-06)
12
+ ----------------
13
+
14
+ - Introduce new method ``set_value_index`` to allow correct custom indexing
15
+ in index hooks.
16
+ [lenadax]
17
+
18
+
5
19
  1.6.1 (2019-11-20)
6
20
  ------------------
7
21
 
@@ -1,27 +1,25 @@
1
-
2
1
  License
3
2
  =======
4
3
 
5
- Copyright (c) 2011-2019, BlueDynamics Alliance, Austria, Germany, Switzerland
4
+ Copyright (c) 2011-2021, BlueDynamics Alliance, Austria, Germany, Switzerland
5
+ Copyright (c) 2021, Yafowil Contributors
6
6
  All rights reserved.
7
7
 
8
8
  Redistribution and use in source and binary forms, with or without
9
9
  modification, are permitted provided that the following conditions are met:
10
10
 
11
- * Redistributions of source code must retain the above copyright notice, this
11
+ * Redistributions of source code must retain the above copyright notice, this
12
12
  list of conditions and the following disclaimer.
13
- * Redistributions in binary form must reproduce the above copyright notice, this
14
- list of conditions and the following disclaimer in the documentation and/or
13
+
14
+ * Redistributions in binary form must reproduce the above copyright notice, this
15
+ list of conditions and the following disclaimer in the documentation and/or
15
16
  other materials provided with the distribution.
16
- * Neither the name of the BlueDynamics Alliance nor the names of its
17
- contributors may be used to endorse or promote products derived from this
18
- software without specific prior written permission.
19
-
20
- THIS SOFTWARE IS PROVIDED BY BlueDynamics Alliance ``AS IS`` AND ANY
21
- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
20
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
- DISCLAIMED. IN NO EVENT SHALL BlueDynamics Alliance BE LIABLE FOR ANY
24
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25
23
  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
24
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27
25
  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
@@ -0,0 +1,223 @@
1
+ Metadata-Version: 2.4
2
+ Name: yafowil.widget.array
3
+ Version: 1.8
4
+ Summary: Array Widget for YAFOWIL
5
+ Home-page: http://github.com/conestack/yafowil.widget.array
6
+ Author: Yafowil Contributors
7
+ Author-email: dev@conestack.org
8
+ License: Simplified BSD
9
+ Classifier: Environment :: Web Environment
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python
12
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
13
+ Classifier: License :: OSI Approved :: BSD License
14
+ Classifier: Programming Language :: Python :: 2.7
15
+ Classifier: Programming Language :: Python :: 3.5
16
+ Classifier: Programming Language :: Python :: 3.6
17
+ Classifier: Programming Language :: Python :: 3.7
18
+ License-File: LICENSE.rst
19
+ Requires-Dist: setuptools
20
+ Requires-Dist: yafowil<4.0.0,>2.1.99
21
+ Provides-Extra: test
22
+ Requires-Dist: yafowil[test]; extra == "test"
23
+ Dynamic: author
24
+ Dynamic: author-email
25
+ Dynamic: classifier
26
+ Dynamic: description
27
+ Dynamic: home-page
28
+ Dynamic: keywords
29
+ Dynamic: license
30
+ Dynamic: license-file
31
+ Dynamic: provides-extra
32
+ Dynamic: requires-dist
33
+ Dynamic: summary
34
+
35
+ This is an **array widget** for for `YAFOWIL
36
+ <http://pypi.python.org/pypi/yafowil>`_ .
37
+
38
+ - `Documentation <http://docs.yafowil.info/en/latest/blueprints.html#array>`_
39
+ - `DEMO - see it Live <http://demo.yafowil.info/++widget++yafowil.widget.array/index.html>`_
40
+
41
+ Source Code
42
+ ===========
43
+
44
+ The sources are in a GIT DVCS with its main branches at
45
+ `github <http://github.com/conestack/yafowil.widget.array>`_.
46
+
47
+ We'd be happy to see many forks and pull-requests to make YAFOWIL even better.
48
+
49
+
50
+ Contributors
51
+ ============
52
+
53
+ - Robert Niederreiter
54
+
55
+ - Georg Bernhard
56
+
57
+
58
+
59
+ Changes
60
+ =======
61
+
62
+ 1.8 (2025-11-03)
63
+ ----------------
64
+
65
+ - Pin upper versions of dependencies.
66
+ [lenadax]
67
+
68
+
69
+ 1.7 (2022-10-06)
70
+ ----------------
71
+
72
+ - Introduce new method ``set_value_index`` to allow correct custom indexing
73
+ in index hooks.
74
+ [lenadax]
75
+
76
+
77
+ 1.6.1 (2019-11-20)
78
+ ------------------
79
+
80
+ - Use ``bdajax.register`` for registering binder function.
81
+ [rnix]
82
+
83
+
84
+ 1.6 (2019-07-31)
85
+ ----------------
86
+
87
+ - Add additional JS hooks when array gets modified. Provided hooks are now
88
+ ``before_add``, ``add``, ``remove``, ``before_up``, ``up``, ``before_down``,
89
+ ``down`` and ``index``.
90
+ [rnix]
91
+
92
+ - Add ``array_display_renderer``.
93
+ [rnix]
94
+
95
+
96
+ 1.5 (2018-07-16)
97
+ ----------------
98
+
99
+ - Python 3 compatibility.
100
+ [rnix]
101
+
102
+ - Convert doctests to unittests.
103
+ [rnix]
104
+
105
+
106
+ 1.4 (2016-09-09)
107
+ ----------------
108
+
109
+ - Add dedicated CSS for ``plone5`` theme provided by ``yafowil.plone``.
110
+ [rnix, 2016-06-28]
111
+
112
+ - Use ``yafowil.utils.entry_point`` decorator.
113
+ [rnix, 2016-06-27]
114
+
115
+ - Minor bootstrap theme CSS changes.
116
+ [rnix, 2016-06-27]
117
+
118
+
119
+ 1.3.1 (2015-06-25)
120
+ ------------------
121
+
122
+ - Resolve JSHint errors and warnings.
123
+ [thet]
124
+
125
+ - Fix CSS for displaying icons in default theme.
126
+ [marfago]
127
+
128
+
129
+ 1.3 (2015-01-23)
130
+ ----------------
131
+
132
+ - Fix ``mark_disabled`` function.
133
+ [rnix]
134
+
135
+ - Adopt to ``yafowil.bootstrap`` 1.2.
136
+ [rnix]
137
+
138
+
139
+ 1.2.1
140
+ -----
141
+
142
+ - Do not hook ``array_display_proxy`` if ``display_proxy`` proerty set on
143
+ widget attributes.
144
+ [rnix, 2012-10-26]
145
+
146
+ - Use ``yafowil.utils.attr_value`` wherever possible.
147
+ [rnix, 2012-10-25]
148
+
149
+
150
+ 1.2
151
+ ---
152
+
153
+ - Add ``array`` CSS class to array wrapper DOM element if not present (may
154
+ happen if ``class`` property for array blueprint gets overwritten). Javascript
155
+ depends on this CSS class.
156
+ [rnix, 2012-07-25]
157
+
158
+ - Adopt resource providing.
159
+ [rnix, 2012-06-12]
160
+
161
+ - Remove example app.
162
+ [rnix, 2012-06-12]
163
+
164
+
165
+ 1.1
166
+ ---
167
+
168
+ - pass parent to array extractor explicit extract call (as compound extractor
169
+ does).
170
+ [jensens, 2012-05-20]
171
+
172
+ - Handle ``required`` property in ``array`` blueprint.
173
+ [rnix, 2012-04-19]
174
+
175
+ - Handle ``display`` mode and ``disabled`` property for leaf array children.
176
+ [rnix, 2012-04-17]
177
+
178
+ - Introduce ``add``, ``remove``, ``sort`` and ``static`` properties for
179
+ ``array`` blueprint.
180
+ [rnix, 2012-04-13]
181
+
182
+
183
+ 1.0
184
+ ---
185
+
186
+ - Implement yafowil 1.3 entry_point registration
187
+ [agitator, 2012-02-15]
188
+
189
+
190
+ 0.9
191
+ ---
192
+
193
+ - Make it work
194
+ [rnix]
195
+
196
+
197
+ License
198
+ =======
199
+
200
+ Copyright (c) 2011-2021, BlueDynamics Alliance, Austria, Germany, Switzerland
201
+ Copyright (c) 2021, Yafowil Contributors
202
+ All rights reserved.
203
+
204
+ Redistribution and use in source and binary forms, with or without
205
+ modification, are permitted provided that the following conditions are met:
206
+
207
+ * Redistributions of source code must retain the above copyright notice, this
208
+ list of conditions and the following disclaimer.
209
+
210
+ * Redistributions in binary form must reproduce the above copyright notice, this
211
+ list of conditions and the following disclaimer in the documentation and/or
212
+ other materials provided with the distribution.
213
+
214
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
215
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
216
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
217
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
218
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
219
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
220
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
221
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
222
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
223
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -8,7 +8,7 @@ Source Code
8
8
  ===========
9
9
 
10
10
  The sources are in a GIT DVCS with its main branches at
11
- `github <http://github.com/bluedynamics/yafowil.widget.array>`_.
11
+ `github <http://github.com/conestack/yafowil.widget.array>`_.
12
12
 
13
13
  We'd be happy to see many forks and pull-requests to make YAFOWIL even better.
14
14
 
@@ -8,11 +8,11 @@ always-checkout = force
8
8
  auto-checkout = *
9
9
 
10
10
  [remotes]
11
- bda = git://github.com/bluedynamics
12
- bda_push = git@github.com:bluedynamics
11
+ cs = git://github.com/conestack
12
+ cs_push = git@github.com:conestack
13
13
 
14
14
  [sources]
15
- yafowil = git ${remotes:bda}/yafowil.git pushurl=${remotes:bda_push}/yafowil.git
15
+ yafowil = git ${remotes:cs}/yafowil.git pushurl=${remotes:cs_push}/yafowil.git
16
16
 
17
17
  [test]
18
18
  recipe = zc.recipe.testrunner
@@ -1,3 +1,6 @@
1
+ [zest.releaser]
2
+ create-wheel = yes
3
+
1
4
  [egg_info]
2
5
  tag_build =
3
6
  tag_date = 0
@@ -3,11 +3,18 @@ from setuptools import setup
3
3
  import os
4
4
 
5
5
 
6
- version = '1.6.1'
6
+ def read_file(name):
7
+ with open(os.path.join(os.path.dirname(__file__), name)) as f:
8
+ return f.read()
9
+
10
+
11
+ version = '1.8'
7
12
  shortdesc = 'Array Widget for YAFOWIL'
8
- longdesc = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
9
- longdesc += open(os.path.join(os.path.dirname(__file__), 'CHANGES.rst')).read()
10
- longdesc += open(os.path.join(os.path.dirname(__file__), 'LICENSE.rst')).read()
13
+ longdesc = '\n\n'.join([read_file(name) for name in [
14
+ 'README.rst',
15
+ 'CHANGES.rst',
16
+ 'LICENSE.rst'
17
+ ]])
11
18
  tests_require = ['yafowil[test]']
12
19
 
13
20
 
@@ -28,9 +35,9 @@ setup(
28
35
  'Programming Language :: Python :: 3.7',
29
36
  ],
30
37
  keywords='',
31
- author='BlueDynamics Alliance',
32
- author_email='dev@bluedynamics.com',
33
- url=u'http://pypi.python.org/pypi/yafowil.widget.array',
38
+ author='Yafowil Contributors',
39
+ author_email='dev@conestack.org',
40
+ url=u'http://github.com/conestack/yafowil.widget.array',
34
41
  license='Simplified BSD',
35
42
  packages=find_packages('src'),
36
43
  package_dir={'': 'src'},
@@ -39,16 +46,16 @@ setup(
39
46
  zip_safe=False,
40
47
  install_requires=[
41
48
  'setuptools',
42
- 'yafowil>2.1.99',
49
+ 'yafowil>2.1.99,<4.0.0',
43
50
  ],
44
51
  tests_require=tests_require,
45
52
  extras_require=dict(
46
53
  test=tests_require,
47
54
  ),
48
55
  test_suite="yafowil.widget.array.tests",
49
- entry_points={
50
- 'yafowil.plugin': [
51
- 'register = yafowil.widget.array:register',
52
- 'example = yafowil.widget.array.example:get_example'
53
- ],
54
- })
56
+ entry_points="""
57
+ [yafowil.plugin]
58
+ register = yafowil.widget.array:register
59
+ example = yafowil.widget.array.example:get_example
60
+ """
61
+ )
@@ -0,0 +1 @@
1
+ __import__('pkg_resources').declare_namespace(__name__)
@@ -0,0 +1 @@
1
+ __import__('pkg_resources').declare_namespace(__name__)
@@ -28,7 +28,7 @@ plone5_css = [{
28
28
 
29
29
  @entry_point(order=10)
30
30
  def register():
31
- from yafowil.widget.array import widget
31
+ from yafowil.widget.array import widget # noqa
32
32
  factory.register_theme('default', 'yafowil.widget.array',
33
33
  resourcedir, js=js, css=default_css)
34
34
  factory.register_theme('bootstrap', 'yafowil.widget.array',
@@ -22,6 +22,7 @@ Array containing single field entries. Preset value is expected as list.
22
22
  })
23
23
  """
24
24
 
25
+
25
26
  def array_with_leafs():
26
27
  form = factory('fieldset',
27
28
  name='yafowil.widget.array.array_with_leafs')
@@ -70,6 +71,7 @@ dictionaries addressing array child compound fields by key.
70
71
  })
71
72
  """
72
73
 
74
+
73
75
  def array_with_compounds():
74
76
  form = factory('fieldset',
75
77
  name='yafowil.widget.array.array_with_compounds')
@@ -120,6 +122,7 @@ list
120
122
  })
121
123
  """
122
124
 
125
+
123
126
  def array_with_array_with_leafs():
124
127
  form = factory('fieldset',
125
128
  name='yafowil.widget.array_with_array_with_leafs')
@@ -147,7 +150,7 @@ DOC_ARRAY_WITH_ARRAY_WITH_COMPOUNDS = """\
147
150
  Array in array with compounds as array entries
148
151
  ----------------------------------------------
149
152
 
150
- Array in array containing compound entries. Preset value is lists in list
153
+ Array in array containing compound entries. Preset value is lists in list
151
154
  containing dictionaries addressing inner array child compound fields by key.
152
155
 
153
156
  .. code-block:: python
@@ -183,6 +186,7 @@ containing dictionaries addressing inner array child compound fields by key.
183
186
  })
184
187
  """
185
188
 
189
+
186
190
  def array_with_array_with_compounds():
187
191
  form = factory('fieldset',
188
192
  name='yafowil.widget.array_with_array_with_compounds')
@@ -254,6 +258,7 @@ DOC_ARRAY_WITH_ARRAY_WITH_ARRAY_WITH_LEAFS = """\
254
258
  })
255
259
  """
256
260
 
261
+
257
262
  def array_with_array_with_array_with_leafs():
258
263
  form = factory(
259
264
  'fieldset',
@@ -324,6 +329,7 @@ compound fields by key.
324
329
  })
325
330
  """
326
331
 
332
+
327
333
  def array_with_array_with_array_with_compounds():
328
334
  form = factory(
329
335
  'fieldset',
@@ -108,7 +108,7 @@ if (window.yafowil === undefined) {
108
108
 
109
109
  set_row_index: function(node, base_id, index) {
110
110
  var base_name = base_id.replace(/\-/g, '.');
111
- var set_index = this.set_attr_index;
111
+ var set_index = this.set_attr_index.bind(this);
112
112
  var that = this;
113
113
  var child;
114
114
  node.children().each(function() {
@@ -123,15 +123,22 @@ if (window.yafowil === undefined) {
123
123
  set_attr_index: function(node, attr, base, index, delim) {
124
124
  var value = node.attr(attr);
125
125
  if (value && value.indexOf(base) > -1) {
126
- var idx_0 = value.indexOf(base) + base.length + 1;
127
- var idx_1 = value.indexOf(delim, idx_0);
128
- var pre = value.substring(0, idx_0);
129
- var post = '';
130
- if (idx_1 > -1) {
131
- post = value.substring(idx_1, value.length);
132
- }
133
- node.attr(attr, pre + index + post);
126
+ node.attr(
127
+ attr,
128
+ this.set_value_index(value, base, index, delim)
129
+ );
130
+ }
131
+ },
132
+
133
+ set_value_index: function(value, base, index, delim) {
134
+ var idx_0 = value.indexOf(base) + base.length + 1;
135
+ var idx_1 = value.indexOf(delim, idx_0);
136
+ var pre = value.substring(0, idx_0);
137
+ var post = '';
138
+ if (idx_1 > -1) {
139
+ post = value.substring(idx_1, value.length);
134
140
  }
141
+ return pre + index + post;
135
142
  },
136
143
 
137
144
  mark_disabled: function(context) {
@@ -6,7 +6,7 @@ from yafowil.compat import IS_PY2
6
6
  from yafowil.tests import fxml
7
7
  from yafowil.tests import YafowilTestCase
8
8
  import unittest
9
- import yafowil.loader
9
+ import yafowil.loader # noqa
10
10
 
11
11
 
12
12
  if not IS_PY2:
@@ -1008,12 +1008,12 @@ class TestArrayWidget(YafowilTestCase):
1008
1008
 
1009
1009
  # default values as dict
1010
1010
  form['myarray'] = factory(
1011
- 'array',
1012
- value={
1013
- '0': {'0': '1', '1': '2'},
1014
- '1': {'0': '4', '1': '5'},
1015
- },
1016
- props={'label': 'My Array Array'})
1011
+ 'array',
1012
+ value={
1013
+ '0': {'0': '1', '1': '2'},
1014
+ '1': {'0': '4', '1': '5'},
1015
+ },
1016
+ props={'label': 'My Array Array'})
1017
1017
  form['myarray']['subarray'] = factory(
1018
1018
  'array',
1019
1019
  props={'label': 'Subrray'})
@@ -1304,22 +1304,22 @@ class TestArrayWidget(YafowilTestCase):
1304
1304
  arrd0 = data['myarray']['0']
1305
1305
  self.assertEqual(
1306
1306
  [arrd0.name, arrd0.value, arrd0.extracted, arrd0.errors],
1307
- [ '0', UNSET, '1', []]
1307
+ ['0', UNSET, '1', []]
1308
1308
  )
1309
1309
  arrd1 = data['myarray']['1']
1310
1310
  self.assertEqual(
1311
1311
  [arrd1.name, arrd1.value, arrd1.extracted, arrd1.errors],
1312
- [ '1', UNSET, '2', []]
1312
+ ['1', UNSET, '2', []]
1313
1313
  )
1314
1314
  arrd2 = data['myarray']['2']
1315
1315
  self.assertEqual(
1316
1316
  [arrd2.name, arrd2.value, arrd2.extracted, arrd2.errors],
1317
- [ '2', UNSET, '3', []]
1317
+ ['2', UNSET, '3', []]
1318
1318
  )
1319
1319
  arrd3 = data['myarray']['3']
1320
1320
  self.assertEqual(
1321
1321
  [arrd3.name, arrd3.value, arrd3.extracted, arrd3.errors],
1322
- [ '3', UNSET, '4', []]
1322
+ ['3', UNSET, '4', []]
1323
1323
  )
1324
1324
 
1325
1325
  # with preset values
@@ -1350,22 +1350,22 @@ class TestArrayWidget(YafowilTestCase):
1350
1350
  arrd0 = data['myarray']['0']
1351
1351
  self.assertEqual(
1352
1352
  [arrd0.name, arrd0.value, arrd0.extracted, arrd0.errors],
1353
- [ '0', UNSET, '41', []]
1353
+ ['0', UNSET, '41', []]
1354
1354
  )
1355
1355
  arrd1 = data['myarray']['1']
1356
1356
  self.assertEqual(
1357
1357
  [arrd1.name, arrd1.value, arrd1.extracted, arrd1.errors],
1358
- [ '1', UNSET, '31', []]
1358
+ ['1', UNSET, '31', []]
1359
1359
  )
1360
1360
  arrd2 = data['myarray']['2']
1361
1361
  self.assertEqual(
1362
1362
  [arrd2.name, arrd2.value, arrd2.extracted, arrd2.errors],
1363
- [ '2', UNSET, '21', []]
1363
+ ['2', UNSET, '21', []]
1364
1364
  )
1365
1365
  arrd3 = data['myarray']['3']
1366
1366
  self.assertEqual(
1367
1367
  [arrd3.name, arrd3.value, arrd3.extracted, arrd3.errors],
1368
- [ '3', UNSET, '11', []]
1368
+ ['3', UNSET, '11', []]
1369
1369
  )
1370
1370
 
1371
1371
  # entries increased in UI
@@ -1390,27 +1390,27 @@ class TestArrayWidget(YafowilTestCase):
1390
1390
  arrd0 = data['myarray']['0']
1391
1391
  self.assertEqual(
1392
1392
  [arrd0.name, arrd0.value, arrd0.extracted, arrd0.errors],
1393
- [ '0', UNSET, 'a', []]
1393
+ ['0', UNSET, 'a', []]
1394
1394
  )
1395
1395
  arrd1 = data['myarray']['1']
1396
1396
  self.assertEqual(
1397
1397
  [arrd1.name, arrd1.value, arrd1.extracted, arrd1.errors],
1398
- [ '1', UNSET, 'b', []]
1398
+ ['1', UNSET, 'b', []]
1399
1399
  )
1400
1400
  arrd2 = data['myarray']['2']
1401
1401
  self.assertEqual(
1402
1402
  [arrd2.name, arrd2.value, arrd2.extracted, arrd2.errors],
1403
- [ '2', UNSET, 'c', []]
1403
+ ['2', UNSET, 'c', []]
1404
1404
  )
1405
1405
  arrd3 = data['myarray']['3']
1406
1406
  self.assertEqual(
1407
1407
  [arrd3.name, arrd3.value, arrd3.extracted, arrd3.errors],
1408
- [ '3', UNSET, 'd', []]
1408
+ ['3', UNSET, 'd', []]
1409
1409
  )
1410
1410
  arrd4 = data['myarray']['4']
1411
1411
  self.assertEqual(
1412
1412
  [arrd4.name, arrd4.value, arrd4.extracted, arrd4.errors],
1413
- [ '4', UNSET, 'e', []]
1413
+ ['4', UNSET, 'e', []]
1414
1414
  )
1415
1415
 
1416
1416
  # entries decreased in UI
@@ -1433,17 +1433,17 @@ class TestArrayWidget(YafowilTestCase):
1433
1433
  arrd0 = data['myarray']['0']
1434
1434
  self.assertEqual(
1435
1435
  [arrd0.name, arrd0.value, arrd0.extracted, arrd0.errors],
1436
- [ '0', UNSET, 'x', []]
1436
+ ['0', UNSET, 'x', []]
1437
1437
  )
1438
1438
  arrd1 = data['myarray']['1']
1439
1439
  self.assertEqual(
1440
1440
  [arrd1.name, arrd1.value, arrd1.extracted, arrd1.errors],
1441
- [ '1', UNSET, 'y', []]
1441
+ ['1', UNSET, 'y', []]
1442
1442
  )
1443
1443
  arrd2 = data['myarray']['2']
1444
1444
  self.assertEqual(
1445
1445
  [arrd2.name, arrd2.value, arrd2.extracted, arrd2.errors],
1446
- [ '2', UNSET, 'z', []]
1446
+ ['2', UNSET, 'z', []]
1447
1447
  )
1448
1448
 
1449
1449
  def test_array_required_extraction(self):
@@ -282,9 +282,9 @@ factory.register(
282
282
  display_renderers=[array_display_renderer, compound_renderer],
283
283
  builders=[array_builder])
284
284
 
285
- factory.doc['blueprint']['array'] = \
286
- """Add-on widget `yafowil.widget.array
287
- <http://github.com/bluedynamics/yafowil.widget.array/>`_.
285
+ factory.doc['blueprint']['array'] = """\
286
+ Add-on widget `yafowil.widget.array
287
+ <http://github.com/conestack/yafowil.widget.array/>`_.
288
288
  """
289
289
 
290
290
  factory.defaults['array.class'] = 'array'
@@ -296,27 +296,27 @@ factory.defaults['array.error_class'] = 'error'
296
296
  factory.defaults['array.message_class'] = 'errormessage'
297
297
 
298
298
  factory.defaults['array.table_class'] = None
299
- factory.doc['props']['array.table_class'] = \
300
- """CSS classes rendered on array table.
299
+ factory.doc['props']['array.table_class'] = """\
300
+ CSS classes rendered on array table.
301
301
  """
302
302
 
303
303
  factory.defaults['array.static'] = False
304
- factory.doc['props']['array.static'] = \
305
- """Array is immutable. No Array actions are rendered. If True, ``add``,
304
+ factory.doc['props']['array.static'] = """\
305
+ Array is immutable. No Array actions are rendered. If True, ``add``,
306
306
  ``remove`` and ``sort`` properties are ignored.
307
307
  """
308
308
 
309
309
  factory.defaults['array.add'] = True
310
- factory.doc['props']['array.add'] = \
311
- """Render ``add`` action.
310
+ factory.doc['props']['array.add'] = """\
311
+ Render ``add`` action.
312
312
  """
313
313
 
314
314
  factory.defaults['array.remove'] = True
315
- factory.doc['props']['array.remove'] = \
316
- """Render ``remove`` action.
315
+ factory.doc['props']['array.remove'] = """\
316
+ Render ``remove`` action.
317
317
  """
318
318
 
319
319
  factory.defaults['array.sort'] = True
320
- factory.doc['props']['array.sort'] = \
321
- """Render ``move up`` and ``move down`` actions.
320
+ factory.doc['props']['array.sort'] = """\
321
+ Render ``move up`` and ``move down`` actions.
322
322
  """