This repository has been archived on 2021-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
gallery3-debian/modules/comment/views/admin_manage_comments.html.php

47 lines
1.3 KiB
PHP
Raw Normal View History

2013-04-04 09:26:00 +00:00
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
var set_state_url =
<?= html::js_string(url::site("admin/manage_comments/set_state/__ID__/__STATE__?csrf=$csrf")) ?>;
2013-04-04 09:26:02 +00:00
var set_state = function(state, id) {
$("#g-comment-" + id).fadeOut("fast", function() {
$.get(set_state_url.replace("__STATE__", state).replace("__ID__", id),
2013-04-04 09:26:00 +00:00
{},
2013-04-04 09:26:02 +00:00
update_menu);
});
2013-04-04 09:26:00 +00:00
}
2013-04-04 09:26:02 +00:00
var update_menu = function() {
2013-04-04 09:26:00 +00:00
$.get(<?= html::js_string(url::site("admin/manage_comments/menu_labels")) ?>, {},
function(data) {
for (var i = 0; i < data.length; i++) {
2013-04-04 09:26:02 +00:00
$("#g-admin-comments ul li:eq(" + i + ") a").html(data[i]);
2013-04-04 09:26:00 +00:00
}
},
"json");
}
2013-04-04 09:26:02 +00:00
// Paginator clicks load their href in the active tab panel
var fix_links = function() {
$(".g-paginator a, a#g-delete-all-spam").click(function(event) {
event.stopPropagation();
$.scrollTo(0, 800, { easing: "swing" });
$(this).parents(".ui-tabs-panel").load(
$(this).attr("href"),
function() {
fix_links();
});
return false;
});
}
2013-04-04 09:26:00 +00:00
2013-04-04 09:26:02 +00:00
$(document).ready(function() {
$("#g-admin-comments").tabs({
show: fix_links,
});
});
</script>
2013-04-04 09:26:00 +00:00
2013-04-04 09:26:02 +00:00
<div id="g-admin-comments" class="g-block">
<?= $menu->render() ?>
2013-04-04 09:26:00 +00:00
</div>