We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14218
    • 1 Posts
    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);
    }
      • 10487 MODX Staff
      • 1,535 Posts
      Nice plugin, jivaeric! This will come in handy ... oh, and welcome to the MODx community smiley

      Cheers,
      Garry

        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Create a new snippet called ’SaveMe’ and paste the code below in. The System Event to use is ’OnDocFormRender’.

        I imagine that should be "Create a new plugin".
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 18397
          • 3,250 Posts
          Fixed
            • 33337
            • 3,975 Posts
            Warm welcome to the community jivaeric!

            Thanks for sharing nice plugin and it is for sure handy!

            best regards,

            zi
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              (in the repository, too...sorry to be a nudnikit wink )
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 6726
                • 7,075 Posts
                A nice improvement to the manger’s interface !
                I like it already but now I’ll go testin’ !!
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l&#39;outil id
                  • 36451
                  • 264 Posts
                  Nice. Since I’m in front of a Mac: Is this plugin workin with IE/Win ("position: fixed;") ??