This Plugin takes the header of the edit screen and floats it and locks it to the top of the screen. So, regardless of how many template variables, or how long the edit screen, the save button will remain locked at the top for easy access.
Hopefully this will make it easier for people to edit their documents.
Create a new plugin called ’SaveMe’ and paste the code below in. The System Event to use is ’OnDocFormRender’.
This is my first PlugIn, and I hope it is helpful to someone else.
$e = & $modx->Event;
switch ($e->name) {
case "OnDocFormRender":
$html = '<div class="subTitle" style="position:absolute; top:0px; left:0px; width:100%; z-index:30; position:fixed;">
<span class="right"><img src="media/images/_tx_.gif" width="1" height="5"><br />Create/ edit document</span>
<table cellpadding="0" cellspacing="0">
<tr>
<td id="Button1" onclick="documentDirty=false; document.mutate.save.click();"><img src="media/images/icons/save.gif" align="absmiddle"> Save</td>
<script>createButton(document.getElementById("Button1"));</script>
<td id="Button2" onclick="deletedocument();"><img src="media/images/icons/delete.gif" align="absmiddle"> Delete</span></td>
<script>createButton(document.getElementById("Button2"));</script>
<td id="Button5" onclick="'."document.location.href='index.php?a=3&id=79'".';"><img src="media/images/icons/cancel.gif" align="absmiddle"> Cancel</td>
<script>createButton(document.getElementById("Button5"));</script>
</tr>
</table>
<div class="subTitle">
<table border="0" cellspacing="1" cellpadding="1">
<tr>
<td><span class="comment"> After saving:</span></td>
<td><input name="stay" type="radio" class="inputBox" value="1" /></td><td><span class="comment">Add another</span></td>
<td><input name="stay" type="radio" class="inputBox" value="2" /></td><td><span class="comment">Continue editing</span></td>
<td><input name="stay" type="radio" class="inputBox" value="" checked='."'checked'".' /></td><td><span class="comment">Close</span></td>
</tr>
</table>
</div>
</div>';
$e->output($html);
}