[Kimchi-devel] [PATCH] Issue #755 : Action's states are showing in correctly for Repositories
atreyee at linux.vnet.ibm.com
atreyee at linux.vnet.ibm.com
Mon Nov 16 08:39:32 UTC 2015
From: Atreyee Mukhopadhyay <atreyee at 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
More information about the Kimchi-devel
mailing list