infopark_cloud_connector 6.8.3.2.153416031 → 6.8.3.67.110847540

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,26 @@
1
+ module RailsConnector
2
+
3
+ module EditingHelper
4
+
5
+ def include_editing_stylesheet
6
+ if inline_editing_allowed?
7
+ stylesheet_link_tag :infopark_editing
8
+ end
9
+ end
10
+
11
+ def include_editing_javascript
12
+ if inline_editing_allowed?
13
+ raw <<-EOF
14
+ #{javascript_include_tag(:infopark_editing)}
15
+ #{javascript_tag('$(function() { infopark.editing.initialize(); });')}
16
+ EOF
17
+ end
18
+ end
19
+
20
+ def inline_editing_allowed?
21
+ Configuration.editing_auth_callback.call(request.env)
22
+ end
23
+
24
+ end
25
+
26
+ end