From 6046419e2d6f00f951dc0748e7e15facbd43f17f Mon Sep 17 00:00:00 2001 From: Joe Fiorini Date: Mon, 26 Jan 2015 13:08:55 -0500 Subject: [PATCH] Kill eager unbind on window resize event This severly breaks any window resize bindings in directives. That is double plus bad. I made the executive decision to remove them because they exist for cleanup that should be done already, assuming we are following good practices. We aren't yet, so it _could_ cause some problems, but not likely. I've already pinged @jlaska to keep an eye on resizing behavior & memory usage in his testing. --- awx/ui/static/lib/ansible/Utilities.js | 3 +-- awx/ui/static/lib/ansible/form-generator.js | 4 +--- awx/ui/static/lib/ansible/list-generator.js | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/awx/ui/static/lib/ansible/Utilities.js b/awx/ui/static/lib/ansible/Utilities.js index 7af00374ba..4d8765aa35 100644 --- a/awx/ui/static/lib/ansible/Utilities.js +++ b/awx/ui/static/lib/ansible/Utilities.js @@ -49,7 +49,6 @@ angular.module('Utilities', ['RestServices', 'Utilities']) } catch (e) { // ignore } - $(window).unbind('resize'); }; }]) @@ -859,4 +858,4 @@ angular.module('Utilities', ['RestServices', 'Utilities']) }; } -]); \ No newline at end of file +]); diff --git a/awx/ui/static/lib/ansible/form-generator.js b/awx/ui/static/lib/ansible/form-generator.js index 7089ec804f..66f164a385 100644 --- a/awx/ui/static/lib/ansible/form-generator.js +++ b/awx/ui/static/lib/ansible/form-generator.js @@ -223,8 +223,6 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator $(this).remove(); }); - $(window).unbind('resize'); - // Prepend an asterisk to required field label $('.form-control[required], input[type="radio"][required]').each(function () { var label, span; @@ -1656,4 +1654,4 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator } }; } -]); \ No newline at end of file +]); diff --git a/awx/ui/static/lib/ansible/list-generator.js b/awx/ui/static/lib/ansible/list-generator.js index 5dafeec78e..e046d461d7 100644 --- a/awx/ui/static/lib/ansible/list-generator.js +++ b/awx/ui/static/lib/ansible/list-generator.js @@ -186,7 +186,6 @@ angular.module('ListGenerator', ['GeneratorHelpers']) // remove lingering popover
. Seems to be a bug in TB3 RC1 $(this).remove(); }); - $(window).unbind('resize'); try { $('#help-modal').empty().dialog('destroy'); @@ -582,4 +581,4 @@ angular.module('ListGenerator', ['GeneratorHelpers']) return html; } }; - }]); \ No newline at end of file + }]);