mcms_blog 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/images/icons/download.jpeg +0 -0
- data/app/assets/javascripts/admin/blog/mcms-blog-submenu.js +61 -44
- data/app/assets/stylesheets/blog_global.css +26 -486
- data/app/assets/stylesheets/blog_home.css +60 -0
- data/app/assets/stylesheets/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/app/assets/stylesheets/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/app/controllers/admin/blog/categories_controller.rb +10 -7
- data/app/controllers/admin/blog/comments_controller.rb +9 -4
- data/app/controllers/admin/blog/posts_controller.rb +11 -7
- data/app/controllers/admin/blog/settings_controller.rb +9 -5
- data/app/controllers/blog/posts_controller.rb +1 -1
- data/app/models/ckeditor/asset.rb +1 -1
- data/app/models/setting.rb +1 -1
- data/app/views/admin/blog/_submenu.html.erb +104 -77
- data/app/views/admin/blog/categories/_category.html.erb +28 -18
- data/app/views/admin/blog/categories/_form.html.erb +1 -0
- data/app/views/admin/blog/categories/index.html.erb +4 -3
- data/app/views/admin/blog/comments/_comment.html.erb +23 -20
- data/app/views/admin/blog/comments/index.html.erb +9 -2
- data/app/views/admin/blog/comments/show.html.erb +72 -60
- data/app/views/admin/blog/posts/_form.html.erb +26 -7
- data/app/views/admin/blog/posts/_form.js.erb +1 -1
- data/app/views/admin/blog/posts/_post.html.erb +20 -17
- data/app/views/admin/blog/posts/index.html.erb +22 -20
- data/app/views/admin/blog/posts/index.js.erb +1 -0
- data/app/views/blog/posts/_post.html.erb +1 -1
- data/app/views/blog/shared/_post.html.erb +1 -1
- data/app/views/layouts/_javascript.html.erb +2 -0
- data/app/views/layouts/_stylesheets.html.erb +1 -1
- data/app/views/layouts/admin.html.erb +6 -4
- data/app/views/layouts/home.html.erb +15 -6
- data/app/views/shared/admin/_error_messages.html.erb +1 -1
- data/app/views/shared/admin/_form_actions.html.erb +12 -2
- data/app/views/shared/admin/_includes.html.erb +4 -0
- data/config/locales/en.yml +6 -6
- data/config/routes.rb +0 -5
- data/db/seeds.rb +33 -13
- metadata +7 -7
- data/app/assets/javascripts/posts.js +0 -3
- data/app/views/layouts/application.html.erb +0 -38
- data/app/views/shared/_javascripts.html.erb +0 -3
- data/app/views/shared/_stylesheets.html.erb +0 -6
- data/lib/tasks/mcms_blog_tasks.rake +0 -4
Binary file
|
@@ -1,50 +1,67 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
/*
|
2
|
+
@Name : admin/blog/mcms-blog-submenu.js
|
3
|
+
@Purpose : Added javascripts for submenus at admin side
|
4
|
+
@Created at : 16-07-2012
|
5
|
+
@Updated at : 16-07-2012
|
6
|
+
@Company : Mindfiresolutions
|
7
|
+
*/
|
8
|
+
$(function(){
|
9
|
+
|
10
|
+
/* parent-menu-link anchors css as font-weight , bold*/
|
11
|
+
$('a.parent-menu-link').css('font-weight', 'bold');
|
12
|
+
|
13
|
+
/* Hidding chlid ul lists for each submenu lists */
|
14
|
+
$('li.submenu').each(function() {
|
15
|
+
$(this).find('ul').hide();
|
16
|
+
});
|
17
|
+
|
18
|
+
|
19
|
+
/*Checking location paths for auto selecting submenu */
|
20
|
+
|
21
|
+
var pathname = window.location.pathname;
|
22
|
+
var section = pathname.split('/');
|
23
|
+
var sub_section = section[3];
|
24
|
+
|
25
|
+
|
26
|
+
if( sub_section == 'categories' ) {
|
27
|
+
|
28
|
+
$('#repo-listing li:nth-child(2)').addClass('selected');
|
29
|
+
$('li.selected').children('ul').slideToggle('slow');
|
15
30
|
|
16
|
-
|
17
|
-
(first_li = $(this).children('li:first')).after(div=$("<div></div>"));
|
31
|
+
} else if( sub_section == 'posts' ) {
|
18
32
|
|
19
|
-
|
33
|
+
$('#repo-listing li:nth-child(1)').addClass('selected');
|
34
|
+
$('li.selected').children('ul').slideToggle('slow');
|
20
35
|
|
21
|
-
if
|
22
|
-
|
23
|
-
|
36
|
+
} else if( sub_section == 'comments' ) {
|
37
|
+
|
38
|
+
$('#repo-listing li:nth-child(3)').addClass('selected');
|
39
|
+
$('li.selected').children('ul').slideToggle('slow');
|
24
40
|
}
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
41
|
+
|
42
|
+
/* Removing class selected for each child-menu link */
|
43
|
+
$('li.child-menu').each(function() {
|
44
|
+
$(this).removeClass('selected');
|
45
|
+
});
|
46
|
+
|
47
|
+
/* After each submenu clicking the ul lists should be opened and others should be closed */
|
48
|
+
$('li.submenu').click(function(e) {
|
49
|
+
if($(this).attr('class') == "submenu selected")
|
50
|
+
{
|
51
|
+
$('li.selected').removeClass('selected');
|
52
|
+
$(this).children('ul').slideToggle('slow');
|
53
|
+
|
54
|
+
}
|
55
|
+
else
|
56
|
+
{
|
57
|
+
$('li.selected').children('ul').slideToggle('slow');
|
58
|
+
$('li.selected').removeClass('selected');
|
59
|
+
$(this).addClass('selected');
|
60
|
+
$(this).children('ul').slideToggle('slow');
|
61
|
+
|
62
|
+
}
|
63
|
+
|
39
64
|
});
|
40
|
-
|
41
|
-
|
42
|
-
$('.success_icon, .failure_icon').bind('click', function(e) {
|
43
|
-
$.get($(this).attr('href'), $.proxy(function(data){
|
44
|
-
$(this).css('background-image', null)
|
45
|
-
.removeClass('failure-icon').removeClass('success-icon')
|
46
|
-
.addClass(data.enabled ? 'success-icon' : 'failure-icon');
|
47
|
-
}, $(this)));
|
48
|
-
e.preventDefault();
|
49
|
-
});
|
65
|
+
|
66
|
+
|
50
67
|
});
|