https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-03-05T12:35:28ZRedmineRedmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=78242009-03-05T12:35:28ZPaul Rivier
<ul></ul><p>Hi,</p>
<p>both proposals seem reasonable to me.</p>
<p>For drafts, some models could act_as_draftable (issue, wikipage, ...?). This would allow to set a draft flag to true. Models set as "Draft" would not be accessible to other users. However, they could be listed and accessed by the author, maybe via the author "my page".</p>
<p>For JS, it is quiet common to see this type of alert on web applications, I think this can also do the job and is simpler. My vote goes for this one because it does the job and is not too intrusive into redmine existing code.</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=98932009-06-24T16:40:40ZMathias Fischer
<ul><li><strong>File</strong> <a href="/attachments/2240">textsave.js</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2240/textsave.js">textsave.js</a> added</li></ul><p>I wrote a small piece of javascript like in <a class="issue tracker-2 status-5 priority-5 priority-high2 closed" title="Feature: Prevent from leaving the page when in edit mode for issue, wiki or other (Closed)" href="https://www.redmine.org/issues/2981">#2981</a> proposed, because some people urgently needed it in our company ;-)</p>
<p>Added the following line to the header of app/views/layouts/base.rhtml:</p>
<p><code><%= javascript_include_tag 'textsave' %></code></p>
<p>and the .js-file to public/javascripts/textsave.js</p>
<p>Perhaps anybody likes to test it?</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=99002009-06-25T08:41:50ZKaspars Sprogis
<ul></ul><p>Added textsave.js to our redmine. So far it seems working fine. Thanks a lot! :)<br />Will let you know if there will be any problems in the future.</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=99012009-06-25T09:07:33ZKaspars Sprogis
<ul></ul><p>Mathias Fischer wrote:</p>
<blockquote>
<p>I wrote a small piece of javascript like in <a class="issue tracker-2 status-5 priority-5 priority-high2 closed" title="Feature: Prevent from leaving the page when in edit mode for issue, wiki or other (Closed)" href="https://www.redmine.org/issues/2981">#2981</a> proposed, because some people urgently needed it in our company ;-)</p>
</blockquote>
There is one bug actually. Try following action sequence:
<ol>
<li>Choose "New Issue" </li>
<li>Change Tracker to "Feature" or any other (which is not default)</li>
<li>Input subject and descriprion.</li>
<li>Push "Submit" <br />And after pushing SUBMIT warning alert shows, which shouldn't happen.</li>
</ol> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=99252009-06-26T08:00:55ZMathias Fischer
<ul></ul><p>Yes, I can reproduce this bug. Guess there is an event triggered when changing the tracker. Other forms with onsubmit/onchange-Events have problems too, like the stuff_to_do-Plugin. Perhaps I can find a workaround...</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=99262009-06-26T12:06:03ZMathias Fischer
<ul></ul><p>The problem is the AJAX-Request on the site, so you would have to register the events again. But it is easier to put the following line in the initialize-function:</p>
<p><code>document.observe('submit',this.setUnchanged.bind(this));</code></p>
<p>But it does not work in IE6 :-(</p>
<p>And I would restrict the observedElements to textareas, because the selects have onchange-Events by themself.</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=112722009-10-05T18:09:58ZRandy Syring
<ul></ul><p>FWIW, I would like to see the draft option as well as a well implemented JS warning option. I would also like to see the draft option auto-save à la Gmail. That way, if your browser crashes, you hopefully have some of your work.</p>
<p>Personally, I think Gmail is a really good model for this type of thing.</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=129622009-12-14T23:56:00ZMischa The Evil
<ul><li><strong>Category</strong> changed from <i>Issues</i> to <i>UI</i></li></ul> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=129912009-12-15T23:54:37ZShane Pearlman
<ul></ul><p>+1 for getting the javascript alert pushed into the core. It has been a common tragedy,</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=144122010-02-16T09:32:05ZNico van Dalen
<ul></ul><p>I would like to second the option to have a (good) javascript alert.</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=146142010-02-23T15:03:09ZPaulo Santos
<ul></ul><p>+1<br />This issue should be addressed as soon as possible, is not admissible users can loose all their work just this easy. Every week I get someone complaining about loosing their changes, and the only solution I can give them is... write everything outside Redmine first! This is extremely unproductive.</p>
<p>Also related, <ins>every Submit should request a confirmation</ins>... every now and then, everyone presses the wrong option by mistake, and there's way to correct it.</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=146162010-02-23T15:51:14ZJean-Baptiste Barth
<ul></ul><p>Paulo Santos wrote:</p>
<blockquote>
<p>+1<br />This issue should be addressed as soon as possible, is not admissible users can loose all their work just this easy. Every week I get someone complaining about loosing their changes, and the only solution I can give them is... write everything outside Redmine first! This is extremely unproductive.</p>
</blockquote>
<p>I also used to say that to my users before I found this post. There is a script attached right here on this issue which prevents losing data, maybe you should try it. I admit it has side-effects, sometimes it is triggered while it should not (on Issues page when you have a filter for instance). But I'm nearly 100% happy with it for 6 months, and my users too ;-)</p>
<blockquote>
<p>Also related, <ins>every Submit should request a confirmation</ins>... every now and then, everyone presses the wrong option by mistake, and there's way to correct it.</p>
</blockquote>
I disagree, there IS a way to correct it :
<ol>
<li>it's not too complicated modifying your message after it has been published. OK the notifications were already sent, but you can edit it with "more" button or with the pen on the side of each comment</li>
<li>I think it would be complicated to implement something "a-la-gmail" to allow people to stop sending an issue/comment X seconds after they pressed Enter key or pushed the button...</li>
</ol>
<p>Anyway, I totally agree Randy's comment : I think Gmail is a really good model for this problem. I started implementing an autosave functionality as a plugin. I don't consider it as stable, but you can find it <a href="http://github.com/jbbarth/redmine_drafts" class="external">at github</a> and try it if you want. I would be happy to have feedback or contributions on it. As I really need this functionality before may 2010, it will be released as stable before this date, maybe with the 2 functionalities (autosave + javascript).</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=146172010-02-23T16:11:21ZPaulo Santos
<ul></ul><p>The "Request confirmation on Submit" feature, is more like a simple popup message requesting "Are you sure you want to submit this?"... for flexibility, this feature could be an option in Project/Redmine settings, not a mandatory behavior.</p>
<p>As for the <em>hack</em>, I'll may give it a try... but I'm not comfortable making surgical changes to a SW installation, I would rather have a Redmine release with a final solution... otherwise I may end up needing a personalized Redmine repository to manage this <em>small improvements</em> B-)</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=172112010-06-08T10:12:54ZDaniel N
<ul></ul><p>I prefer the idea of a lightweigt JS solution over the heavier drafts implementation. I think this feature would add a lot of usability for many users and increase the acceptance of web-based software.</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=235332010-12-29T21:06:43ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Target version</strong> set to <i>1.2.0</i></li></ul> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=235352010-12-29T21:08:30ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Subject</strong> changed from <i>Warning on leaving edited issue page without saving or save issue as draft</i> to <i>Warning on leaving edited issue/wiki page without saving</i></li></ul> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=241802011-01-17T18:20:22ZFernando Hartmann
<ul></ul><p>+1 The two options are very useful.</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=241822011-01-17T18:22:02ZFernando Hartmann
<ul></ul><p>I believe that <a class="issue tracker-2 status-1 priority-4 priority-default" title="Feature: Develop wiki save and continue feature (New)" href="https://www.redmine.org/issues/7066">#7066</a> can be a good implementation too.</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=241852011-01-17T18:29:03ZFernando Hartmann
<ul></ul><p>I just realized that <a class="issue tracker-2 status-1 priority-4 priority-default" title="Feature: Wiki Auto-Save currently editing page (New)" href="https://www.redmine.org/issues/2698">#2698</a> suggest auto save being minor-revisions, can be one option too IMHO.</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=253842011-02-21T09:55:15ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Feature added in <a class="changeset" title="Warning on leaving a page with unsaved content in textarea (#2910). The warning can be turned of..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4900">r4900</a> base on Mathias' javascript implementation.<br />Only textareas are monitored and the warning can be turned off in user's preference.</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=696402016-03-13T04:05:59Zsalman mp
<ul></ul><p>This feature does not work when using CKEditor text formatter.</p> Redmine - Feature #2910: Warning on leaving edited issue/wiki page without savinghttps://www.redmine.org/issues/2910?journal_id=696562016-03-14T09:31:09ZMathias Fischer
<ul></ul><p>salman mp wrote:</p>
<blockquote>
<p>This feature does not work when using CKEditor text formatter.</p>
</blockquote>
<p>The CKEditor is a plugin to redmine, afaik. I believe, the CKEditor changes the textarea and would have to implement the feature by itself. I would suggest to look here for an answer: <a class="external" href="https://github.com/a-ono/redmine_ckeditor/issues">https://github.com/a-ono/redmine_ckeditor/issues</a></p>