<!-- BEGIN: MAIN -->
{FILE "{PHP.cfg.themes_dir}/admin/easyadmin/warnings.tpl"} 
<!-- BEGIN: TPL_EDIT -->
<link rel="stylesheet" type="text/css" href="{PHP.cfg.themes_dir}/admin/{PHP.cfg.admintheme}/scripts/codemirror/css/default.css">
<script type="text/javascript" src="{PHP.cfg.themes_dir}/admin/{PHP.cfg.admintheme}/scripts/jqueryFileTree.js"></script> 
<script type="text/javascript" src="{PHP.cfg.themes_dir}/admin/{PHP.cfg.admintheme}/scripts/codemirror/js/code.js"></script>
<div class="box">
  <div class="box-header">
    <div class="h_title">{PHP.L.Ea_tpl_edit}: <b class="green">{PHP.cfg.defaulttheme}</b></div>
  </div>
  <div class="box-content pad-10">
    <div class="row box-section">
      <div class="col-md-3">
        <div id="filetree" class="filetree"></div>
      </div>
      <div class="col-md-9">
        <div id="fileedit" style="border-left: solid 1px #BBB;min-height: 360px; padding:5px 0 5px 20px;"></div>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
function LoadingStart()
{
	$("#ea_load").css("background-color", "rgba(255,255,255,0.85)").removeClass("hide");
	$("#ea_load").fadeTo('slow', 1.0);
};
function LoadingEnd()
{
	$("#ea_load").fadeOut('slow');
};
$(document).ready( function() {

	$('#filetree').fileTree({ root: '/', script: 'index.php?e=eadmin&r=template&x={PHP.sys.xk}', folderEvent: 'click', expandSpeed: 750, collapseSpeed: 750, multiFolder: false }, function(file) { 
	
		LoadingStart('');		
		$.post('index.php?e=eadmin&r=template', { x: '{PHP.sys.xk}', action: "load", file: file }, function(data){
			
			LoadingEnd('');
			$('#fileedit').html(data);
			
		}, 'html');
	});

});
function savefile( file ){
	var content = editor.getValue();

	$.post('index.php?e=eadmin&r=template&x={PHP.sys.xk}', { action: "save", file: file, content: content }, function(data){

		if ( data == "ok" ) {
			$.growl.notice({ title: "{PHP.L.EA_notice}:", message: "{PHP.L.Ea_tpl_saved}" });
		} else {
			$.growl.error({ title: "{PHP.L.EA_error}:", message: "{PHP.L.EA_purge_cache_error}" });
		}

	});

};
</script> 
<!-- END: TPL_EDIT --> 
<!-- END: MAIN -->