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

Documentation needed for layout files regarding #surveyor_gui_mount_point #38

Closed
archonic opened this issue Dec 23, 2014 · 0 comments
Closed

Comments

@archonic
Copy link

As per the customization documentation, I created my own surveyor_controller.rb to specify use of the application layout. This broke the surveyor_gui js file on line 15.

surveyor_gui_mount_point = $("#surveyor_gui_mount_point").data("surveyor_gui_mount_point");
if (surveyor_gui_mount_point.length==0){
  surveyor_gui_mount_point="/";
} else {
  surveyor_gui_mount_point= surveyor_gui_mount_point.replace(/surveyforms/i, ""); 
}

It should be mentioned under Views in the readme, that when building your own layout, there needs to be an anchor point (#surveyor_gui_mount_point) for the js file.

Updated: Also the data-attribute having underscores is non-standard. The default for HAML 4.0+ is dashes. To get the underscores, I had to put Haml::Template.options[:hyphenate_data_attrs] = false into a config initializer.

@kjayma kjayma closed this as completed in 7a99657 Jan 24, 2015
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

1 participant