-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
added visible option for CButtonColumn #1346
added visible option for CButtonColumn #1346
Conversation
Where is the code to hide buttons that have visible=false? also your code has to be tab indented, by not spaces. |
I fixed the intendation. My editor was playing with me. |
@@ -18,6 +18,7 @@ Version 1.1.13 work in progress | |||
- Enh: Fixed the check for ajaxUpdate false value in jquery.yiilistview.js as that never happens (mdomba) | |||
- Enh: Requirements checker: added check for Oracle database (pdo_oci extension) and MSSQL (pdo_dblib, pdo_sqlsrv and pdo_mssql extensions) (resurtm) | |||
- Enh: Added CChainedLogFilter class to allow adding multiple filters to a logroute (cebe) | |||
- Enh: #1345 CButtonColumn's default buttons(view, update, delete) has visible option now (gregmolnar) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enh #1345
+ it should be ordered properly.
Aside from the changelog line everything looks fine. |
I fixed it. |
@@ -15,6 +15,7 @@ Version 1.1.13 work in progress | |||
- Enh #486: CHttpSession::$gCProbability and CDbHttpSession::$gCProbability are floats now. Minimal possible $gCProbability value has been changed to the ≈0.00000005% (1/2147483647), was integer 1% before, default value left unchanged (1%) (resurtm) | |||
- Enh #556: CDbColumnSchema::$comment property has been added. It stores comment for the table column, comment retrieving is working for MySQL, PgSQL and Oracle (resurtm) | |||
- Enh #1289: Added support for column comments for MSSQL (CDbColumnSchema::$comment property) (resurtm) | |||
- Enh #1345 CButtonColumn's default buttons(view, update, delete) has visible option now (gregmolnar) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing :
;)
@@ -15,6 +15,7 @@ Version 1.1.13 work in progress | |||
- Enh #486: CHttpSession::$gCProbability and CDbHttpSession::$gCProbability are floats now. Minimal possible $gCProbability value has been changed to the ≈0.00000005% (1/2147483647), was integer 1% before, default value left unchanged (1%) (resurtm) | |||
- Enh #556: CDbColumnSchema::$comment property has been added. It stores comment for the table column, comment retrieving is working for MySQL, PgSQL and Oracle (resurtm) | |||
- Enh #1289: Added support for column comments for MSSQL (CDbColumnSchema::$comment property) (resurtm) | |||
- Enh #1345: CButtonColumn's default buttons(view, update, delete) has visible option now (gregmolnar) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has → have
The rest is OK. Ready to merge after spelling error corrected. |
added visible option for CButtonColumn
Thank you for working on this one. |
No worries. Thanks for merging. |
@mdomba I'm aware that one can use |
But at the same time it's adding 3 new options that are just "shortcuts", and this way adding a bit of complexity... the other "existing" options cannot be done by the developer with "buttons" as they are setting the functionality of the default buttons. |
@mdomba Easy can be done. Fresh project code for example:
|
you did not understand my point. in your example you are setting a custom icon... but if you dont CButtonColumn has to set a default one for you... and thats why there is a separate property so that it can be more easily overwritten... but visible does not have an default values so I dont see the point in having 3 more properties for that. |
@mdomba you are right. I haven't tried to set the visible like that. Would it be possible to document that feature somehow? Also I guess this PR can be reverted. |
Reverted. |
Any thoughts on adding this to the docs? |
I think it's already there http://www.yiiframework.com/doc/api/1.1/CButtonColumn#buttons-detail |
Since it states additional buttons I wouldn't think I can use these options for the update, view, delete buttons. |
We could add a new paragraph to that section after the last sentence "Note that in order..." Something like: Note that if the buttonID is 'view', 'update' or 'delete' the options will be applied to the default buttons. |
@mdomba sounds good to me. |
I agree with @gregmolnar that the "additional" is better left out. It doesn't make sense to first say that this option is for additional buttons, and then further down say "oh, but it's also for the default buttons". Better to just say that it is for "the buttons", cuz that's what it is. It's for all buttons, both default and additional ones. It's not weirder than that. |
Fixed 73a4003 |
@samdark should we mention the above line ? Some users on the forum wanted to create a custom button and tried to use "view" or "update" and then was wondering why it does not work as a custom button... |
No. I've removed mentioning of "additional" so now it applies to all buttons. |
yes for that part... but is it clear enough that the buttonID's 'view', 'update' and 'delete' refers to the corresponding default buttons? |
@mdomba On 12 September 2012 12:27, Maurizio Domba notifications@github.com wrote:
|
pull request for issue #1345