From: Atreyee Mukhopadhyay <atreyee(a)linux.vnet.ibm.com>
Fix Action enable/disable functionality of the repositories.
---
.../plugins/gingerbase/ui/js/src/gingerbase.host.js | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/wok/plugins/gingerbase/ui/js/src/gingerbase.host.js
b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.host.js
index 24a4aa6..6a6e690 100644
--- a/src/wok/plugins/gingerbase/ui/js/src/gingerbase.host.js
+++ b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.host.js
@@ -161,11 +161,21 @@ gingerbase.host_main = function() {
if (!repository) {
return;
}
- $('#repositories-grid-remove-button').prop('disabled',
false);
- $('#repositories-grid-edit-button').prop('disabled',
false);
+ var selectedRow = $('tr',repositoriesGrid.bodyContainer);
+
$('#repositories-grid-remove-button',selectedRow).prop('disabled',
false);
+
$('#repositories-grid-edit-button',selectedRow).prop('disabled', false);
var enabled = repository['enabled'];
- $('#repositories-grid-enable-button')
- .text(i18n[enabled ? 'GGBREPO6017M' :
'GGBREPO6016M'])
+ var actionHtml,actionText,actionIcon ='';
+ if(enabled){
+ actionText= i18n['GGBREPO6017M'];
+ actionIcon = 'fa-pause';
+ }else{
+ actionText= i18n['GGBREPO6016M'];
+ actionIcon = 'fa-play-circle-o';
+ }
+ actionHtml = ['<i class="fa','
',actionIcon,'"></i>','',actionText].join('');
+ $('#repositories-grid-enable-button',selectedRow)
+ .html(actionHtml)
.prop('disabled', false);
},
frozenFields: [],
--
2.1.0
Show replies by date
Applied. Thanks.
Regards,
Aline Manera