Skip to content

Commit

Permalink
Merge pull request #56 from MicroPyramid/media_fixes
Browse files Browse the repository at this point in the history
changed the settings and fixed the checkbox issue in blog list
  • Loading branch information
chaitu210 committed May 27, 2016
2 parents d303bdf + 67221b2 commit 668e01d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,25 @@ <h2 align="center"> There are no blog-posts here !</h2>

<script type="text/javascript">
$("#selectAll").change(function() {
$(".bulk_button").toggle();
$(".bulk_actions:checkbox").attr('checked', this.checked);
// $(".bulk_button").toggle();
$(".bulk_actions:checkbox").prop('checked', $(this).prop("checked"));
if($(this).prop("checked")){
$(".bulk_button").show();
}else{
$(".bulk_button").hide();
}
});

$(".bulk_actions:checkbox").change(function() {
if ($(this).attr("id") != "selectAll"){
if($(".bulk_actions:checkbox:checked").length > 0){
$(".bulk_button").show();
}
else{
$("#selectAll").prop('checked', false);
$(".bulk_button").hide();
}
}
});

$('#published').click(function(){
Expand Down
8 changes: 2 additions & 6 deletions django_blog_it/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

AWS_ENABLED = getattr(settings, 'AWS_ENABLED', False)
BASE_DIR = getattr(settings, 'BASE_DIR')

# settings.MEDIA_URL if settings.MEDIA_URL else '/media/'
MEDIA_URL = settings.MEDIA_URL if settings.MEDIA_URL else '/media/'

# settings.MEDIA_ROOT if settings.MEDIA_ROOT else os.path.join(BASE_DIR + '/media/')
MEDIA_ROOT = settings.MEDIA_ROOT if settings.MEDIA_ROOT else os.path.join(BASE_DIR + '/media/')
MEDIA_URL = settings.MEDIA_URL if settings.MEDIA_URL else '/media/' # settings.MEDIA_URL if settings.MEDIA_URL else '/media/'
MEDIA_ROOT = settings.MEDIA_ROOT if settings.MEDIA_ROOT else os.path.join(BASE_DIR + '/media/') # settings.MEDIA_ROOT if settings.MEDIA_ROOT else os.path.join(BASE_DIR + '/media/')

DISQUS_SHORTNAME = getattr(settings, 'DISQUS_SHORTNAME', '')

0 comments on commit 668e01d

Please sign in to comment.