Skip to content

Controls: element prototypes - #79

Closed
matej21 wants to merge 2 commits into
nette:masterfrom
matej21:feature/controls_prototypes
Closed

Controls: element prototypes#79
matej21 wants to merge 2 commits into
nette:masterfrom
matej21:feature/controls_prototypes

Conversation

@matej21

@matej21 matej21 commented Apr 15, 2015

Copy link
Copy Markdown
Contributor

CheckBoxList item label prototype:

SelectBox and MultiselectBox item prototype

@dg

dg commented Apr 18, 2015

Copy link
Copy Markdown
Member

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

matej21 commented Apr 21, 2015

Copy link
Copy Markdown
Contributor Author

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

dg commented Apr 22, 2015

Copy link
Copy Markdown
Member

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

matej21 commented Apr 22, 2015

Copy link
Copy Markdown
Contributor Author

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

@dg

dg commented Apr 23, 2015

Copy link
Copy Markdown
Member

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

matej21 commented Jul 24, 2015

Copy link
Copy Markdown
Contributor Author

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

dg commented Oct 9, 2015

Copy link
Copy Markdown
Member
  • 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

dg commented Oct 12, 2015

Copy link
Copy Markdown
Member

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

matej21 commented Nov 17, 2015

Copy link
Copy Markdown
Contributor Author

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

matej21 commented Mar 30, 2016

Copy link
Copy Markdown
Contributor Author

rebased

@dg

dg commented Mar 30, 2016

Copy link
Copy Markdown
Member

Merged e9849ef

@dg dg closed this Mar 30, 2016
@matej21

matej21 commented Mar 30, 2016

Copy link
Copy Markdown
Contributor Author

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