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

"Clicking on row" ... does not work for me ... #1

Open
Atastor opened this issue Oct 13, 2016 · 5 comments
Open

"Clicking on row" ... does not work for me ... #1

Atastor opened this issue Oct 13, 2016 · 5 comments

Comments

@Atastor
Copy link

Atastor commented Oct 13, 2016

Displaying differently on phone and desktop is no problem, but the following does not work for me:

When row is clicked, some other columns for the row will be displayed vertically and actions at bottom. Use @extended_columns@ to define them.

My config: ruby 2.3.1, rails 5.0.0.1, active_scaffold 3.4.41.1 fdd479d, active_scaffold_mobile 0.1.0 75952d3

Any suggestions?

@scambra
Copy link
Member

scambra commented Oct 14, 2016

This gem is WIP, I don't remember but I think I didn't finish extended_columns feature. Controller code is there, it should display extended columns if request has extended and id params, but there is no code to make request with extended param.

@Atastor
Copy link
Author

Atastor commented Oct 14, 2016

Something like this crossed my mind, yes; there was so few code :-)

@Atastor Atastor closed this as completed Oct 14, 2016
@scambra
Copy link
Member

scambra commented Oct 14, 2016

I rather keep open until it's done

@scambra scambra reopened this Oct 14, 2016
@scambra
Copy link
Member

scambra commented Oct 14, 2016

I don't remember how I was thinking to do this, probably overriding as_main_div_class to add as_phone or as_tablet class:

    def as_main_div_class
        classes = super
        classes << ' as_phone' if is_mobile_device?
        classes << ' as_tablet' if is_tablet_device?
        classes
      end

Then, adding a js file to bind click event on row and make js request with extendend and id params.

If you're interested you could try it and send pull request

@scambra
Copy link
Member

scambra commented Oct 14, 2016

Oh, row.js.erb should be added to this gem to do something different if extended param is present

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

No branches or pull requests

2 participants