https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292011-06-06T10:53:28ZRedmineRedmine - Defect #8537: Error in copying projectshttps://www.redmine.org/issues/8537?journal_id=295922011-06-06T10:53:28ZLuis Serrano Aranda
<ul></ul><p>Addint a message like Loading... But typing Working...</p> Redmine - Defect #8537: Error in copying projectshttps://www.redmine.org/issues/8537?journal_id=296052011-06-06T13:29:19ZLuis Serrano Aranda
<ul></ul><p>A possible solution is to add this code at the end of prototype.js, disable the button until the task is completed.</p>
<p>var SubmitHelper = {<br /> disableFormsOfPage: function(){<br /> $$('form').each(function(form) {<br /> form.observe('submit', function() {<br /> form.getInputs('submit').each(function(submit) {<br /> if (!submit.readAttribute("no_disabled")){<br /> submit.disable();<br /> }<br /> });<br /> });<br /> });<br /> },<br /> init: function(){<br /> Event.observe(window, 'load', SubmitHelper.disableFormsOfPage.bindAsEventListener())<br /> }<br />}</p>
<p>SubmitHelper.init();</p> Redmine - Defect #8537: Error in copying projectshttps://www.redmine.org/issues/8537?journal_id=296062011-06-06T14:06:46ZLuis Serrano Aranda
<ul></ul><p>This a workaround, but not solve the concurrently, the backward...</p>
<p>I think it's better write a flag in the server (to not copy a project concurrently)</p> Redmine - Defect #8537: Error in copying projectshttps://www.redmine.org/issues/8537?journal_id=313102011-08-06T06:30:55ZMasamitsu Murase
<ul></ul><p>I think that this workaround does not work when an user select "Create and continue" button,<br />because "continue" parameter is not sent to the server if "Create and continue" is disabled.</p>
<p>Therefore, <br /><pre>
if (!submit.readAttribute("no_disabled")){
submit.disable();
}
</pre><br />should be<br /><pre>
if (!submit.readAttribute("no_disabled")){
setTimeout(function(){ submit.disable(); }, 0);
}
</pre></p>
<p>Please refer to <a href="https://github.com/masamitsu-murase/redmine_prevent_multiple_submission" class="external">my plugin</a>.<br />(This plugin works on only "Issue" page currently...)</p>
<p>Regards,<br />Murase</p> Redmine - Defect #8537: Error in copying projectshttps://www.redmine.org/issues/8537?journal_id=859912018-07-02T14:14:45ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/23630">Feature #23630</a>: Migrate to Rails 5.2</i> added</li></ul> Redmine - Defect #8537: Error in copying projectshttps://www.redmine.org/issues/8537?journal_id=859932018-07-02T14:16:20ZGo MAEDA
<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>It will be fixed in Redmine 4.0.0. Rails 5 automatically disables submit buttons while executing an action. See also: <a class="external" href="https://github.com/rails/rails/pull/21135">https://github.com/rails/rails/pull/21135</a></p>