registered-sites/app/views/admin/customization_logs/index.html.erb

89 lines
1.9 KiB
Plaintext
Raw Normal View History

<%= render_filter @filter_fields, "index_table" %>
<span id="index_table">
<%= render 'index'%>
</span>
2014-12-05 10:08:10 +00:00
<style type="text/css">
#logModal{
width: 80%;
height: 80%;
margin-left: -40%;
}
#logModal .modal-header {
height: 71px;
}
#logModal .modal-body{
max-height: none;
position: absolute;
top: 90px;
right: 0;
bottom: 60px;
left: 0;
}
#logModal .modal-footer {
height: 30px;
position: absolute;
right: 0;
bottom: 0;
left: 0;
}
#logModal .custom-log-item {
padding: 10px;
}
#logModal .custom-log-row {
line-height: 2em;
}
#logModal .custom-log-row:after {
content: "";
clear: both;
display: table;
height: 0;
}
#logModal .custom-log-row-column-label {
min-width: 12%;
float: left;
text-align: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#logModal .custom-log-row-column {
float: left;
width: 86%;
padding-left: 2%;
}
#logModal .custom-log-row-column ul {
margin-left: 10px;
}
#logModal .custom-log-row-column li {
line-height: 2em;
}
#logModal .custom-log-edit {
margin-top: 1em;
padding-left: 14%
}
</style>
<%= render "log_modal" %>
<script type="text/javascript">
2014-12-05 10:08:10 +00:00
var clicked_button = null;
$(".view_log_btn").on("click",function(){
clicked_button = $(this);
})
$("#logModal").on("shown",function(){
$("#domain_title").html(clicked_button.parent().parent().find("td.domain_title_block").html());
$(".archive-btn").on("click",function(){
if(confirm("Archive this log?")){
var el = $(this);
$.ajax({
"url" : el.attr("href"),
"type" : "post",
"dataType" : "json"
}).done(function(d){
$("#log_" + el.data("id")).slideUp(function(){
$(this).remove();
})
})
}
return false;
})
})
</script>