Giter Club home page Giter Club logo

archetypes.referencebrowserwidget's Issues

Accessibility error

The click on "Add" opens a popup that doesn't hold an exclusive focus, so you go out and you risk losing control of what appears on the screen. Also in the popup, the focus on "View" isn't visible.

allowed_types are not considered

if allowed_types are defined, only selectable items should be displayed!

self.request.form['portal_type'] = []

imho ^ removes the portal_type query parameter and disables allowed_types

removing that line solves the problem in "real life" but it seems this feature is not taken into account within the tests

Failure in test test_popup_items (archetypes.referencebrowserwidget.tests.test_product.IntegrationTestCase)
Traceback (most recent call last):
  File "/Users/peter/workspace/python/parts/opt/lib/python2.7/unittest/case.py", line 327, in run
    testMethod()
  File "/Users/peter/workspace/buildout.coredev/src/archetypes.referencebrowserwidget/src/archetypes/referencebrowserwidget/tests/test_product.py", line 665, in test_popup_items
    self.assertEqual(len(ROWS.findall(body)), wanted_rows)
  File "/Users/peter/workspace/python/parts/opt/lib/python2.7/unittest/case.py", line 509, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/Users/peter/workspace/python/parts/opt/lib/python2.7/unittest/case.py", line 502, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: 3 != 7

48af4e8?diff=unified

Wild card search for ZCTextIndexes?

Hi,

I think searching using a ZCTextIndex (like default SearchableText is) should be searched as wildcard (so "word", should be searched like "word*"). This make more sense to any users, we systematically overrides the search view to do this...

I would like to propose a Pull request where a widget.wild_card_search parameter could ne set to True if we want the widget to behave like that. I would even remove this as a parameter but add a checkbox in the popup that would show when a ZCTextIndex index is searched.

What about this?

Thank you!

Gauthier

Plone 5.2 AttributeError: 'ReferenceBrowserPopup' object has no attribute '__of__'

http://localhost:8080/Plone2/refbrowser_popup
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 359, in publish_module
  Module ZPublisher.WSGIPublisher, line 262, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module archetypes.referencebrowserwidget.browser.view, line 212, in __call__
  Module archetypes.referencebrowserwidget.utils, line 217, in __call__
AttributeError: 'ReferenceBrowserPopup' object has no attribute '__of__'

This is in a customer project that I want to update from 4.3 to 5.2. I think I have customised a bit. But I get the above error when I try to use the popup on an edit form.

I'm not sure if we will keep Archetypes for this project, as stepping stone before we move to dexterity and Python 3. Might be double work: first get it to work with Archetypes, and then do the work to go to dexterity.

Fix the global namespace polution thing

Somewhere between 2.4 and 2.5, the helper methods have been made private. In several locations were references to the global functions. This broke the functionality and a Felix Schwarz provided a quickfix to solve the problem quickly.
On the long run, these methods should not be global. Instead the code should be reviewed to avoid the requirement for lots of global methods.

Missing semicolon in template

In referencebrowser.pt:

<tal:block condition="python: (can_view or not hide_inaccessible)"
define="obj python:refs[0];
obj_path python: '/'.join(obj.getPhysicalPath());
obj_interface_info nocall:obj/@@plone_interface_info
can_view python: helper.canView(obj)">

fails with

Not a valid path-expression. - String: "nocall:obj/@@plone_interface_info can_view python: helper.canView(obj)"

Plone 5.2: No module named set

On Plone 5.2.1 I get:

PTRuntimeError: Page Template referencebrowser has errors: ['Compilation failed', 'exceptions.ImportError: No module named set'

This goes away when I edit referencebrowser.pt and replace tal:repeat="set refs" by tal:repeat="myset refs", plus changing the other occurrences. I guess set is no longer a good variable name.

No time now to fix, just quickly reporting this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.