I’ve just been testing out Modx 1.0.5 and the current QM.
I have another suggestion for you Mikko ;-)
When modifiying the resource content as a richtext field (TinyMCE) and then cancelling it brings up a ’Are you sure you want to navigate away...’ message from the TinyMCE autosave feature. But this is too late as the window is already closing. Also a modified standard text field change is not trapped due to the documentDirty=false statement in the cancel button.
I worked around these issues by checking the TinyMCE dirty status in the onclick javascript. Thus the save and cancel buttons at around line 700ish of qm.inc.php could become:
// Add action buttons --- uxello fix nav away messages
$mc->addLine('var controls = "<div style=\"padding:4px 0;position:fixed;top:10px;right:-10px;z-index:1000\" id=\"qmcontrols\" class=\"actionButtons\"><ul><li><a href=\"#\" onclick=\"documentDirty=false;document.mutate.save.click();return false;\"><img src=\"media/style/'.$qm_theme.'/images/icons/save.png\" />'.$_lang['save'].'</a></li><li><a href=\"#\" onclick=\" alertcancel=documentDirty; if (typeof(tinyMCE)!==\'undefined\') {var i, t = tinyMCE.editors;for (i in t){ if (t.hasOwnProperty(i)){ if (t[i].isDirty() ) alertcancel =true; }}} continuecancel=true; if (alertcancel) {continuecancel = confirm(\'Document has been modified. Continue cancel (changes will be lost)?\');} if (continuecancel) { documentDirty=false; if (typeof(tinyMCE)!==\'undefined\') { var i, t = tinyMCE.editors;for (i in t){ if (t.hasOwnProperty(i)){ t[i].isNotDirty=true }} } parent.'.$jq_mode.'.fn.colorbox.close();} return false;\"><img src=\"media/style/'.$qm_theme.'/images/icons/stop.png\"/>'.$_lang['cancel'].'</a></li></ul></div>";');
The code is a bit of a mess at the moment but it works ok for one TinyMCE editor in the resource. I have not figured out how to account for having a richtext TV. If you change the text in another TinyMCE instance then switch to one that has not been altered and cancel then it does not work... also no language config for the confirm so only 90% there.
Of course if you are not using TinyMCE as the rich text editor it does not help!
UPDATE: Now got it working for multiple TinyMCE instances.