src/pyams_skin/resources/js/myams.js
changeset 72 13f5fdd06484
parent 69 a361355b55c7
child 78 4cc2e7381e28
--- a/src/pyams_skin/resources/js/myams.js	Tue Jun 30 14:55:26 2015 +0200
+++ b/src/pyams_skin/resources/js/myams.js	Tue Jun 30 14:59:32 2015 +0200
@@ -862,7 +862,11 @@
 					if (result.window) {
 						window.open(url, result.window, result.options);
 					} else {
-						window.location.href = url;
+						if (window.location.href == url) {
+							window.location.reload(true);
+						} else {
+							window.location.href = url;
+						}
 					}
 					break;
 				default:
@@ -4206,7 +4210,7 @@
 										ams.root.removeClass('hidden-menu');
 										window.setTimeout(function () {
 											window.location.hash = href;
-										}, 150);
+										}, 50);
 									} else
 										window.location.hash = href;
 								}
@@ -4279,6 +4283,14 @@
 			}
 		});
 
+		// Notify reset to update Select2 widgets
+		$(document).on('reset', 'form', function(e) {
+			var form = $(this);
+			setTimeout(function() {
+				form.find('.select2').trigger('change');
+			}, 10);
+		});
+
 		// Initialize custom reset handlers
 		$(document).on('reset', '[data-ams-reset-handler]', function(e) {
 			var form = $(this);