mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 01:12:08 +01:00 
			
		
		
		
	JQuery is unable to cancel Turbolinks
This commit is contained in:
		@@ -65,7 +65,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 | 
				
			|||||||
                    <input class="form-control mx-auto" type="text" id="source_note" placeholder="{% trans "Name or alias..." %}" />
 | 
					                    <input class="form-control mx-auto" type="text" id="source_note" placeholder="{% trans "Name or alias..." %}" />
 | 
				
			||||||
                    <div id="source_me_div">
 | 
					                    <div id="source_me_div">
 | 
				
			||||||
                        <hr>
 | 
					                        <hr>
 | 
				
			||||||
                        <a class="btn-block btn btn-secondary" href="#" id="source_me">
 | 
					                        <a class="btn-block btn btn-secondary" href="#" id="source_me" data-turbolinks="false">
 | 
				
			||||||
                            {% trans "I am the emitter" %}
 | 
					                            {% trans "I am the emitter" %}
 | 
				
			||||||
                        </a>
 | 
					                        </a>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -183,10 +183,7 @@ $(document).ready(function () {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (location.hash) { $('#type_' + location.hash.substr(1)).click() } else { type_transfer.click() }
 | 
					  if (location.hash) { $('#type_' + location.hash.substr(1)).click() } else { type_transfer.click() }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $('#source_me').click(function (event) {
 | 
					  $('#source_me').click(function () {
 | 
				
			||||||
    // Prevent TurboLinks
 | 
					 | 
				
			||||||
    event.preventDefault();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (LOCK) { return }
 | 
					    if (LOCK) { return }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Shortcut to set the current user as the only emitter
 | 
					    // Shortcut to set the current user as the only emitter
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user