2amigos / yii2-grid-view-library

Highly enhanced GridView widget and grid components for Yii2
https://2amigos.us
Other
57 stars 16 forks source link

More dynamic EditableColumns #2

Closed sycdan closed 9 years ago

sycdan commented 10 years ago
tonydspaniard commented 10 years ago

@sycdan thank you very much for your pull request, nevertheless, I have to say that to me there are too many ...Options type of properties. I would like to minimize these and find another way to apply your idea.

Currently on vacation, will have a closer look when I am back and try to provide the functionality you propose on a different way.

sycdan commented 10 years ago

Hah, no problem, I know exactly what you mean; I felt the same way while doing it, but that was the way that seemed to make sense to get the functionality I was looking for, and given that they are private, I concluded that there wouldn't really be any added complexity for an end-user. In any case, I look forward to seeing any changes you make in the same vein. Hope you're having a good vacation :)

On Tue, Jul 8, 2014 at 6:30 PM, Antonio Ramirez notifications@github.com wrote:

@sycdan https://github.com/sycdan thank you very much for your pull request, nevertheless, I have to say that to me there are too many ...Options type of properties. I would like to minimize these and find another way to apply your idea.

Currently on vacation, will have a closer look when I am back and try to provide the functionality you propose on a different way.

— Reply to this email directly or view it on GitHub https://github.com/2amigos/yii2-grid-view-library/pull/2#issuecomment-48407744 .

disem commented 10 years ago

Can you add at least clientOptions as in dosamigos\editable\Editable class ? For now EditableColumn is unusable with extensions that use additional options like "source" in select2.

tonydspaniard commented 10 years ago

@disem do you mean this? https://github.com/2amigos/yii2-grid-view-library/blob/master/EditableColumn.php#L38

disem commented 10 years ago

@tonydspaniard no, i mean options that can be passed to editable call

$js[] = ";jQuery('$selector').editable();";

You have them in similar class here https://github.com/2amigos/yii2-editable-widget/blob/master/Editable.php#L171

$options = Json::encode($this->clientOptions);
$js = "jQuery('$id').editable($options);";
tonydspaniard commented 10 years ago

@disem you meant for global settings of the editable plugin. Didn't include them because I thought that would be something of common sense to do it using the data- attributes of the column element: https://github.com/2amigos/yii2-grid-view-library/blob/master/EditableColumn.php#L81

Please, provide me an example where that would be required

tonydspaniard commented 10 years ago

bump

disem commented 9 years ago

Sorry, remembered about this issue when encountered another one. Yes, data-* attributes works fine, thank you. But event handlers can't be declared in that way. And again dosamigos\editable\Editable use clientEvents property to resolve this.