Skip to content

Conversation

@matej21
Copy link
Contributor

@matej21 matej21 commented Apr 15, 2015

CheckBoxList item label prototype:

SelectBox and MultiselectBox item prototype

@dg
Copy link
Member

dg commented Apr 18, 2015

I'm not sure whether it is good idea to store SelectBox item prototype as Html object. Only attributes are used, more precisely, it is not HTML attributes, it is special attributes like data-foo: (with colon).

@matej21
Copy link
Contributor Author

matej21 commented Apr 21, 2015

I know it is not ideal. But Utils\Html api is well known and I didn't want to introduce a new api.
But I'm open to your suggestions. Maybe just use an array and setItemAttributes (or addItemAttributes)?

@dg
Copy link
Member

dg commented Apr 22, 2015

Maybe setItemLabelAttribute or Attributes? Yes, it is long name, but it will be used rarely.

Probably for consistency the same method should be added to RadioList.

@matej21
Copy link
Contributor Author

matej21 commented Apr 22, 2015

I thought we were talking about selectbox items, not about checkboxlist (and radiolist) labels.

@dg
Copy link
Member

dg commented Apr 23, 2015

SelectBox::setItemAttribute and CheckboxList::setItemLabelAttribute (or attributes).

@dg dg force-pushed the master branch 2 times, most recently from 131f7d2 to 532059a Compare May 21, 2015 11:49
@dg dg force-pushed the master branch 2 times, most recently from a57a557 to 55d0eb8 Compare June 19, 2015 12:05
@matej21 matej21 force-pushed the feature/controls_prototypes branch 2 times, most recently from 4ae1393 to a9acfae Compare July 24, 2015 20:59
@matej21
Copy link
Contributor Author

matej21 commented Jul 24, 2015

I've updated SelectBox and MultiSelectBox, but I think CheckboxList should have getItemLabelPrototype since the label is fully featured html element (it could have class, style...).

@dg
Copy link
Member

dg commented Oct 9, 2015

  • CheckboxList::$itemLabelPrototype is OK, it is consistent with RadioList.
  • MultiSelectBox::setItemAttributes() is not actually set, but add. I don't know if it is better to set or add, but name must correspond with its functionality.
  • what about 'option' instead of 'item'? Will be 'item' attributes used for optgroups?

@dg
Copy link
Member

dg commented Oct 12, 2015

CheckboxList::$itemLabelPrototype was added here #92

@matej21 matej21 force-pushed the feature/controls_prototypes branch 2 times, most recently from a37e424 to 6e200c4 Compare November 17, 2015 16:44
@matej21
Copy link
Contributor Author

matej21 commented Nov 17, 2015

Updated, failing tests are related to the nette/latte@b3b6a1d

@milo milo added this to the v2.4 milestone Mar 29, 2016
@matej21 matej21 force-pushed the feature/controls_prototypes branch from 6e200c4 to 6b5c921 Compare March 30, 2016 10:36
@matej21 matej21 force-pushed the feature/controls_prototypes branch from 6b5c921 to 1356039 Compare March 30, 2016 10:39
@matej21
Copy link
Contributor Author

matej21 commented Mar 30, 2016

rebased

@dg
Copy link
Member

dg commented Mar 30, 2016

Merged e9849ef

@dg dg closed this Mar 30, 2016
@matej21
Copy link
Contributor Author

matej21 commented Mar 30, 2016

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants