| Current Path : /home/jeromecohp/www/aesecure/premium/template/ |
| Current File : /home/jeromecohp/www/aesecure/premium/template/form_49_joomlaredirect.default.aec |
<div data-aesecure="premium">
<form id="form%ID%" role="form">
<input type="hidden" name="w" value="%ID%" size="4"/>
<input type="hidden" name="a" value="1" size="1"/>
<input type="hidden" name="%AESECURETOKEN%" value="%TOKEN%"/>
</form>
<div id="aeSecureSortTableToolbar">
<span id="aeSecureSortTableToolbarRemove" class="btn-remove text-danger glyphicon glyphicon-remove" title="%MSGREMOVESELECTED%"></span>
<span id="aeSecureSortTableToolbarRemoveAll" class="btn-remove text-danger glyphicon glyphicon-remove-sign" title="%MSGREMOVEALL%"></span>
</div>
<div id="" style="display:none;">'.
<span id="aeSecureSortTableToolbarRemoveConfirm">%MSGCONFIRMDELETE%</span>
<span id="aeSecureSortTableToolbarRemoveAllConfirm">%MSGCONFIRMTRUNCATE%</span>
</div>
<table id="aeSecureSortTable" class="tablesorter tablesorter-ice">
<thead>
<tr>
<th id="aeSecureSortTableID" class="chk"></th>
<th id="aeSecureSortTableID" class="id">id</th>
<th class="oldurl" title="%TITLEOLDURL%">url</th>
<th class="hits" title="%TITLEHITS%">hits</th>
<th class="createddate">created_date</th>
<th class="nbr">#</th>
</tr>
</thead>
<tfoot>
<tr>
<th id="aeSecureSortTableID" class="chk"></th>
<th id="aeSecureSortTableID" class="id">id</th>
<th class="oldurl" title="%TITLEOLDURL%">url</th>
<th class="hits" title="%TITLEHITS%">hits</th>
<th class="createddate">created_date</th>
<th class="nbr">#</th>
</tr>
</tfoot>
<tbody>
%TABLE%
</tbody>
</table>
<div>
<span class="label label-info">%MSGINFORMATION%</span>
<span class="text-info">%MSGRECORDS%</span>
</div>
</div>
<div id="div%ID%" class="ajaxResult"/>
<script type="text/javascript">
function tableSort() {
// The table is now filled in with every monitored sites; add the table sorting functionnalities and widget
$("#aeSecureSortTable").tablesorter({
theme: 'bootstrap',
widthFixed: false,
showProcessing: true,
sortMultiSortKey: "shiftKey",
sortResetKey: 'ctrlKey',
widgets: [ 'uitheme', 'stickyHeaders', 'filter' ],
widgetOptions: {
uitheme: 'jui', //'ice',
filter_childRows: false,
filter_columnFilters: true,
filter_cssFilter: 'tablesorter-filter',
filter_functions: null,
filter_hideFilters: false,
filter_ignoreCase: true,
filter_reset: '.reset',
filter_searchDelay: 300,
filter_startsWith: false,
filter_useParsedData: false,
stickyHeaders : '',
stickyHeaders_offset : $('#topnav').height(), // Because of the top horizontal menu
cssStickyHeaders_addCaption : true,
cssStickyHeaders_attachTo : null,
cssStickyHeaders_filteredToTop : true,
cssStickyHeaders_zIndex : 10,
zebra : ["ui-widget-content even", "ui-state-default odd"]
},
sortMultiSortKey: "shiftKey",
sortResetKey: 'ctrlKey',
headers: {
0: {sorter: "false", filter:"false"}, // checkbox
1: {sorter: "digit", filter:"false"}, // id
2: {sorter: "url", filter:"true"}, // url
3: {sorter: "digit"}, // hits
4: {sorter: "date"}, // created_date
5: {sorter: "text"}, // #
},
ignoreCase: true,
headerTemplate: '{content} {icon}',
initWidgets: true,
sortList: [[3,1]] // Sort by default on the Hits column
});
return;
} // function tableSort()
tableSort();
// Activate ("set the focus") on the tab where the result of the task 49 is displayed
$(window).scrollTop($('#tab49Result').offset().top-150);
// --------------------------------------
// Option 4.9 - Joomla Redirect component
$("#aeSecureSortTableID").click(function(){
$('#aeSecureSortTable').find('input[type=checkbox]').each(function () { this.checked=!this.checked; });
});
$("#aeSecureSortTableToolbarRemoveAll").click(function(){
var json="{'ids':[{'id':'all'}]}";
var msg=$('#aeSecureSortTableToolbarRemoveAllConfirm').text();
alertify.set({ buttonFocus: "cancel", buttonReverse: true });
alertify.confirm(msg, function (e) {
if (e) {
SetupTask(49,'','w=49&i='+json,'','','SetupTask(49, "tab49Result","t=3")','','POST');
}
});
}); // $("#aeSecureSortTableToolbarRemoveAll").click(function()
$("#aeSecureSortTableToolbarRemove").click(function(){
var json="{'ids':[";
var count=0;
$('#aeSecureSortTable').find('input[type=checkbox]').each(function () {
if (this.checked) {
// this.id is, for instance, chkOldUrl_21 i.e. "chkOldUrl_" followed by an ID. Keep only the ID
var ID=this.id.substr(10);
json+="{'id':'"+ID+"'},";
count+=1;
}
}); // $('#aeSecureSortTable').find('input[type=checkbox]').each(function ()
json=JSON.stringify(json.substr(0, json.length-1)+"]}");
// Run the cleaning code and refresh the tab by re-running task 43, t=3 (result) in the tab49Result area
if (count>0) {
var msg=$('#aeSecureSortTableToolbarRemoveConfirm').text();
alertify.set({ buttonFocus: "cancel", buttonReverse: true });
alertify.confirm(msg, function (e) {
if (e) {
SetupTask(49,'','w=49&i='+json,'','','SetupTask(49, "tab49Result","t=3")','','POST');
}
}); // alertify.confirm
} else {
// At least one option should be selected
alertify.error(getLanguageText('main.pleaseselectatleastone'));
}
}); // $("#aeSecureSortTableToolbarRemove").click(function()
</script>