mcms_pages 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/views/mcms_pages/admin/pages/_form.js.erb +26 -26
- data/app/views/mcms_pages/admin/pages/_page_part_form.html.erb +1 -1
- data/app/views/mcms_pages/layouts/mcms_layout.html.erb +1 -1
- data/app/views/mcms_pages/pages/_two_column_layout.html.erb +8 -8
- data/app/views/mcms_pages/pages/home.html.erb +7 -7
- data/lib/mcms_pages/engine.rb +1 -0
- metadata +18 -2
@@ -12,45 +12,45 @@
|
|
12
12
|
|
13
13
|
<script type="text/javascript">
|
14
14
|
|
15
|
-
|
15
|
+
$(document).ready(function(){
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
// on click of preview button
|
18
|
+
$("#preview-submit").live('click', function(e) {
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
// Assigning the form elt in a variable
|
21
|
+
var formElt = $(this).parents('form');
|
22
22
|
|
23
|
-
|
24
|
-
|
23
|
+
// Assigning the form action in a variable
|
24
|
+
var formAction = formElt.attr('action');
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
// Assigning the form target in a variable
|
27
|
+
var formTarget = formElt.attr('target');
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
// setting the new action and target for form element
|
30
|
+
formElt.attr({
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
'action': '<%= @page.persisted? ? preview_page_path(@page.nested_url) : preview_pages_path %>',
|
33
|
+
'target': '_blank'
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
//submit the form
|
38
|
-
formElt.submit();
|
39
|
-
|
40
|
-
// reset the action for form element
|
41
|
-
formElt.attr({
|
35
|
+
});
|
42
36
|
|
43
|
-
|
44
|
-
|
37
|
+
//submit the form
|
38
|
+
formElt.submit();
|
45
39
|
|
46
|
-
|
40
|
+
// reset the action for form element
|
41
|
+
formElt.attr({
|
47
42
|
|
48
|
-
|
49
|
-
|
43
|
+
'action': formAction,
|
44
|
+
'target': ""
|
50
45
|
|
51
46
|
});
|
52
47
|
|
48
|
+
//prevent the defaault action for the click event
|
49
|
+
e.preventDefault();
|
50
|
+
|
53
51
|
});
|
54
52
|
|
55
|
-
|
53
|
+
});
|
54
|
+
|
55
|
+
</script>
|
56
56
|
|
@@ -27,7 +27,7 @@
|
|
27
27
|
<!-- creating an empty hash to store page_parts_pages value -->
|
28
28
|
<% y = Hash.new %>
|
29
29
|
|
30
|
-
<!-- declaring some local variables to be used as hash index in loop
|
30
|
+
<!-- declaring some local variables to be used as hash index in loop -->
|
31
31
|
<% i = 0 %>
|
32
32
|
<% j = 0 %>
|
33
33
|
|
@@ -11,12 +11,12 @@
|
|
11
11
|
|
12
12
|
<% unless page["left body"].nil? %>
|
13
13
|
|
14
|
-
<div id="two-column-left-body" class="page-left-body">
|
14
|
+
<div id="two-column-left-body" class="page-left-body">
|
15
15
|
|
16
|
-
|
17
|
-
|
16
|
+
<!-- render partial _left_side_body.html.erb -->
|
17
|
+
<%= render "mcms_pages/pages/left_side_body", :p => page["left body"] %>
|
18
18
|
|
19
|
-
</div>
|
19
|
+
</div>
|
20
20
|
|
21
21
|
<% end %>
|
22
22
|
|
@@ -28,12 +28,12 @@
|
|
28
28
|
|
29
29
|
<% unless page["right body"].nil? %>
|
30
30
|
|
31
|
-
<div id="two-column-right-body" class="page-right-body">
|
31
|
+
<div id="two-column-right-body" class="page-right-body">
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
<!-- render partial _left_side_body.html.erb -->
|
34
|
+
<%= render "mcms_pages/pages/right_side_body", :p => page["right body"] %>
|
35
35
|
|
36
|
-
</div>
|
36
|
+
</div>
|
37
37
|
|
38
38
|
<% end %>
|
39
39
|
|
@@ -15,14 +15,14 @@
|
|
15
15
|
<p><%= flash[:notice] || flash[:error] %></p>
|
16
16
|
|
17
17
|
<!-- render partial for header -->
|
18
|
-
|
18
|
+
<%= render :partial => 'mcms_pages/layouts/header', :locals => {:p => page["header"]} %>
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
<!-- render menu page -->
|
21
|
+
<%= render :partial => 'mcms_pages/pages/menu' if not @page.link_url == '\404' %>
|
22
22
|
|
23
|
-
|
24
|
-
|
23
|
+
<!-- render partial on the basis of layout name which is based on column count -->
|
24
|
+
<%= render :partial => "mcms_pages/pages/"+layout_name(@page.layout.column_count), :locals => {:page => page, :p => @page} %>
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
<!-- render partial for footer -->
|
27
|
+
<%= render :partial => 'mcms_pages/layouts/footer', :locals => {:p => page["footer"]} %>
|
28
28
|
|
data/lib/mcms_pages/engine.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mcms_pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -107,6 +107,22 @@ dependencies:
|
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: mcms_authentication
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
110
126
|
description: Integrates a page module in an application which helps in page creation.
|
111
127
|
email:
|
112
128
|
- mishra.vikramkumar2@gmail.com
|