Skip to content

Commit

Permalink
JS edits
Browse files Browse the repository at this point in the history
  • Loading branch information
kkellydesign committed Jul 15, 2015
1 parent d8ea04a commit 9a4662a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
24 changes: 10 additions & 14 deletions servee/frontendadmin/static/servee/js/frontendadmin-expanded.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ $(document).ready(function(){
url: this.href,
success: function(data, text){
$par.html(data);
$('.file-upload a').not("[href*='.pdf'], [href*='.doc'], [href*='.mp3']").each(function(){
var thumbURL = $(this).attr('href');
if (thumbURL){
$(this).prepend('<img src="' + thumbURL + '" style="max-width:180px;max-height:100px;margin-bottom:10px;display:block;">');
}
});
// hide galleries, because they make the form crazy long
$('#images-group').before("<a href='#' id='gallery_dropdown'>Edit the image gallery for this page <span>›</span></a>");
$('#images-group').hide();

function labelTables(){
$('#servee_container .module table').each(function(){
// I changed the django "module" table into a vertical form display using some
Expand Down Expand Up @@ -101,9 +111,6 @@ $(document).ready(function(){
$("td:nth-of-type(10)").attr('data-content', head9 );
$("td:nth-of-type(11)").attr('data-content', head10 );
$("thead").hide();

e.preventDefault();
return false;
});

};
Expand All @@ -112,17 +119,6 @@ $(document).ready(function(){
labelTables();
});
labelTables();

//debugging, so moving this around
$('.file-upload a').not("[href*='.pdf'], [href*='.doc'], [href*='.mp3']").each(function(){
var thumbURL = $(this).attr('href');
if (thumbURL){
$(this).prepend('<img src="' + thumbURL + '" style="max-width:180px;max-height:100px;margin-bottom:10px;display:block;">');
}
});
// hide galleries, because they make the form crazy long
$('#images-group').before("<a href='#' id='gallery_dropdown'>Edit the image gallery for this page <span>›</span></a>");
$('#images-group').hide();
}
});

Expand Down
2 changes: 1 addition & 1 deletion servee/frontendadmin/static/servee/js/frontendadmin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9a4662a

Please sign in to comment.