$(document).ready(function(){ if(window.location.href.indexOf("home.php?m=ftp") != -1 ){ $('iframe').attr('id', 'ftp_iframe'); $('iframe').load(function() { $(this).contents().find("tr").removeAttr("onmouseover").removeAttr("onmouseout"); $(this).contents().find("body").addClass('ftp_iframe'); $(this).contents().find("div, input").removeAttr("style"); $(this).contents().find("table").removeAttr("style").removeAttr("colspan").addClass('table').addClass('table-sm').addClass('table-striped'); $(this).contents().find(".page > table > tbody > tr:nth-child(3)").remove(); $(this).contents().find('b[style="color:red;"]').removeAttr('style').addClass('alert').addClass('alert-danger'); $(this).contents().find('.table .table').addClass('inner-table'); $(this).contents().find('link').remove(); var ftp_module_css = ''; $(this).contents().find("head").append(ftp_module_css); var main_css = ''; var ftp_css = ''; var bs = ''; var bs_t = ''; var js = ''; $(this).contents().find("head").append(bs); //$(this).contents().find("head").append(bs_t); $(this).contents().find("head").append(js); $(this).contents().find("head").append(main_css); $(this).contents().find("head").append(ftp_css); $(this).contents().find('button, input[type=button], input[type=submit], input[type=reset], .swfuploadbtn').addClass('btn').addClass('btn-sm').addClass('btn-primary'); $(this).contents().find('textarea, select, input[type=text]').addClass('form-control').removeAttr('style'); $(this).contents().find('form').addClass('form-group'); $(this).contents().find('.browse_rows_heading a').removeAttr('style').addClass('btn').addClass('btn-xs').addClass('btn-primary'); $(this).contents().find('[href^="javascript:submitBrowseForm(\'%2F\'"]').addClass('btn').addClass('btn-xs').addClass('btn-primary').prepend(' '); $(this).contents().find('[href^="javascript:submitBrowseForm"]:not(.btn)').addClass('label').addClass('label-default'); $(this).contents().find('[onclick*="view"] > a').addClass('btn').addClass('btn-xs').addClass('btn-success').addClass('btn-block'); $(this).contents().find('[onclick*="edit"] > a').addClass('btn').addClass('btn-xs').addClass('btn-warning').addClass('btn-block'); $(this).contents().find('[href^="javascript:toggleElement(\'upload\')"]').addClass('btn').addClass('btn-xs').addClass('btn-danger'); $(this).contents().find('img[src$="folder.png"]').replaceWith(''); $(this).contents().find('img[src$="txt.png"]').replaceWith(''); $(this).contents().find('img[src$="mime.png"], img[src$="exec.png"]').replaceWith(''); $(this).contents().find('img[src$="bookmark.png"]').replaceWith(''); $(this).contents().find('img[src$="info.png"]').replaceWith(''); $(this).contents().find('img[src$="exit.png"]').replaceWith(''); $(this).contents().find('img[src$="view_tree.png"]').replaceWith(''); $(this).contents().find('img[src$="document.png"]').replaceWith(''); $(this).contents().find('img[src$="terminal.png"]').replaceWith(''); $(this).contents().find('img[src$="colors.png"]').replaceWith(''); //$(this).contents().find('img[src$="misc.png"]').replaceWith(''); $(this).contents().find('img[src$="misc.png"]').remove(); $(this).contents().find('img[src$="back.png"]').replaceWith(''); $(this).contents().find('[accesskey="h"]').addClass('btn').addClass('btn-warning'); $(this).contents().find('[accesskey="i"]:not(input)').addClass('btn').addClass('btn-info'); $(this).contents().find('[accesskey="l"]').addClass('btn').addClass('btn-danger'); $(this).contents().find('[accesskey="b"]').addClass('btn').addClass('btn-primary'); $('iframe').contents().find('table h1').each(function(){ $(this).parent('td').replaceWith('