/*saveMe
modification of the original Save Me by daniel K
4steps.ru
case "OnDocFormRender": $e->output($html);break;
case "OnChunkFormRender":$e->output($html);break;
case "OnPluginFormRender":$e->output($html);break;
case "OnModFormRender":$e->output($html);break;
case "OnSnipFormRender":$e->output($html);break;
case "OnTVFormRender":$e->output($html);break;
produce a nice set of buttons on the left bottom of page
which are sticked to a fixed place
*/
$html = '<ol style="bottom:0; left:3em; padding:1em; z-index:30; position:fixed;background:red;">
<li id="Button1" onclick="documentDirty=false; document.mutate.save.click();"><img src="media/style/MODxLight/images/icons/save.gif" align="absmiddle"> Save</li>
<li id="Button2" onclick="deletedocument();"><img src="media/style/MODxLight/images/icons/delete.gif" align="absmiddle"> Delete<li>
<li id="Button5" onclick="'."document.location.href='index.php?a=3&id=79'".';"><img src="media/style/MODxLight/images/icons/cancel.gif" align="absmiddle"> Cancel</li>
<script>createButton(document.getElementById("Button5"));</script>
</ol>';
$html='
<style>
.save_but {
background: #bee860 url(\'media/style/MODxLight/images/misc/greenfade.gif\') repeat-x;
position:relative;
border:1px solid black;
padding:1em;
margin:0;
cursor:pointer;
}
div.save_but {
filter: alpha(opacity=40);
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=40);
-moz-opacity: 0.40; opacity:0.5;}
div.out .save_but:active, div.out .save_but:hover, div.out .save_but:focus, .out:active {
filter: alpha(opacity=100);
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
-moz-opacity: 1.00; opacity:2;
}
.save_but:active,.save_but:hover , .out:hover , .out:active {
background-position: 0 0;}
.save_but p{
font:bold 3em arial;
vertical-align:middle;
color:black; }
.save_but p:before {
content: "Save";
display: block;
margin: 0 0 -1.2em 0.1em;
color:#e7f8c3; }
.out {
display:block;
background:;
border:1px solid #fff;
position:fixed;
z-index:30;
margin:1em 0;
padding:0;
width:10em;
left:4em;
bottom:15em;
}
/**/<!--[if IE]>
* html,
* html body {
height: 100%;
margin: 0;
padding: 0;
}
* html #iefix {
height: 100%;
position: relative;
}
* html .out{
position: absolute;
}
<![endif]-->
</style>
<div id="iefix"></div>
<div class="out"><div class="save_but" onclick="documentDirty=false; document.mutate.save.click();"><p>Save</p></div></div>';
$e = & $modx->Event;
switch ($e->name) {
case "OnDocFormRender": $e->output($html);break;
case "OnChunkFormRender":$e->output($html);break;
case "OnPluginFormRender":$e->output($html);break;
case "OnModFormRender":$e->output($html);break;
case "OnSnipFormRender":$e->output($html);break;
case "OnTVFormRender":$e->output($html);break;
}