Fixed pop-help directive so clicking on a help icon or button closes all other help windows. Prior to this help windows would remain open. Clicking on multiple help icons/buttons left help windows allover the screen, especially on Job Template page.

This commit is contained in:
chouseknecht
2013-07-22 18:42:33 -04:00
parent 2bb77dd2ad
commit 6295efd330
8 changed files with 32 additions and 15 deletions

View File

@@ -10,7 +10,7 @@
angular.module('GeneratorHelpers', ['GeneratorHelpers'])
.factory('Attr', function() {
return function(obj, key) {
return function(obj, key, fld) {
var result;
var value = (typeof obj[key] === "string") ? obj[key].replace(/[\'\"]/g, '"') : obj[key];
switch(key) {
@@ -49,7 +49,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
break;
case 'awPopOver':
// construct the entire help link
result = "<a href=\"\" aw-pop-over=\"" + value + "\" ";
result = "<a id=\"awp-" + fld + "\" href=\"\" aw-pop-over=\"" + value + "\" ";
result += (obj.dataTitle) ? "data-title=\"" + obj['dataTitle'].replace(/[\'\"]/g, '&quot;') + "\" " : "";
result += (obj.dataPlacement) ? "data-placement=\"" + obj['dataPlacement'].replace(/[\'\"]/g, '&quot;') + "\" " : "";
result += (obj.dataContainer) ? "data-container=\"" + obj['dataContainer'].replace(/[\'\"]/g, '&quot;') + "\" " : "";