From 9aed0ad63a20f3847e7c5bc0873e6e1d182e3b2c Mon Sep 17 00:00:00 2001 From: Joe Fiorini Date: Wed, 11 Mar 2015 14:57:50 -0400 Subject: [PATCH] Extract list actions to directive --- awx/ui/static/js/shared/generator-helpers.js | 4 + .../list-generator/list-generator.factory.js | 93 ++++++++++++------- .../static/js/shared/list-generator/main.js | 7 +- .../toolbar-button.directive.js | 39 ++++++++ 4 files changed, 107 insertions(+), 36 deletions(-) create mode 100644 awx/ui/static/js/shared/list-generator/toolbar-button.directive.js diff --git a/awx/ui/static/js/shared/generator-helpers.js b/awx/ui/static/js/shared/generator-helpers.js index 061503300b..1c8f67c372 100644 --- a/awx/ui/static/js/shared/generator-helpers.js +++ b/awx/ui/static/js/shared/generator-helpers.js @@ -188,9 +188,12 @@ angular.module('GeneratorHelpers', [systemStatus.name]) if (toolbar) { //if this is a toolbar button, set some defaults + console.log('toolbar button'); btn.class = 'btn-xs btn-primary'; btn.iconSize = 'fa-lg'; delete btn.label; + } else { + console.log('NOT A TOOLBAR BUTTON'); } html += "