sfeast / SelectableRepeaters

Repeater controls for Enyo 2 that allows for selectable rows.
3 stars 0 forks source link

background instead of background-color #1

Open nicodel opened 12 years ago

nicodel commented 12 years ago

Hi,

I use your SelectableRepeaters for my app, and I modified it, replacing both lines #71 & #74 in SelectableRepeaters.js with the folowing line :

this.controlAtIndex(0).applyStyle("background", this.selected ? this.selectedColor : null);

What it does , it is allowing me to change the selectColor to someting like that:

selectColor: "#226B9A url(assets/gradient-invert.png) repeat-x"

So that It has the same selectable style than the Lists in my app.

Maybe you should include it in both your scripts.

Regards

sfeast commented 12 years ago

Hi - great to hear this has been of use to you & that's a cool change, thanks for sharing it. As I've been working deeper with Enyo lately I've been thinking about updating this kind's implementation to be a bit simpler & more standard. For instance I wasn't aware of the enyo/source/ui/Selection kind which already handles list row selection state, for both single & multiselect lists! So I'll probably integrate that into this & remove some of the custom logic + I might use addRemoveClass to be able to apply more complex selection styles.

Pretty busy lately though so might not happen for a bit.

Thanks again. Steven

On Thu, Jul 26, 2012 at 3:37 AM, nicodel < reply@reply.github.com

wrote:

Hi,

I use your SelectableRepeaters for my app, and I modified it, replacing both lines #71 & #74 in SelectableRepeaters.js with the folowing line :

this.controlAtIndex(0).applyStyle("background", this.selected ?
this.selectedColor : null);

What it does , it is allowing me to change the selectColor to someting like that:

selectColor: "#226B9A url(assets/gradient-invert.png) repeat-x"

So that It has the same selectable style than the Lists in my app.

Maybe you should include it in both your scripts.

Regards


Reply to this email directly or view it on GitHub: https://github.com/sfeast/SelectableRepeaters/issues/1