Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TbEditableDetailView::init() set up htmlOptions #684

Closed
iConn opened this issue Sep 26, 2013 · 4 comments
Closed

TbEditableDetailView::init() set up htmlOptions #684

iConn opened this issue Sep 26, 2013 · 4 comments
Labels
Milestone

Comments

@iConn
Copy link

iConn commented Sep 26, 2013

change TbEditableDetailView(51)to:

$this->htmlOptions = !isset($this->htmlOptions) 
    ? array('class' => 'table table-bordered table-striped table-hover') 
    : $this->htmlOptions;

Now we can change htmlOptions from $config

@iConn
Copy link
Author

iConn commented Sep 26, 2013

Booster 1.1.0

@hijarian
Copy link
Contributor

hijarian commented Oct 3, 2013

Hmm, thanks. I'll look whether it's implemented in master or not.

@hijarian
Copy link
Contributor

hijarian commented Oct 4, 2013

In master it's line 33, not 51.

Care should be taken about whether to:

  • force the four CSS classes listed anyway (so even if you set custom htmlOptions you won't have to remember what classes to put back)
  • or use your proposal and overwrite htmlOptions completely with the ones user set (this way any custom property set in htmlOptions, even not related to CSS class, will destroy the predefined styling).

Thank you for finding this line of code, such an attempts to blindly set public properties inside the widget initialization should be avoided.

digitalcrab pushed a commit that referenced this issue Dec 11, 2013
@digitalcrab
Copy link
Contributor

Hello @iConn thank you for your issue, now it is fixed and committed into the master branch and will be included to the next release.

http://yii-demo.yukki.name/bootstrap/issue684
Here you can find TbEditableDetailView in action and if you will see "issue684-class" css class inside it is mean that everything is OK ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants