[Kimchi-devel] [PATCH V2] Change the width of Actions button

Socorro Stoppler socorro at linux.vnet.ibm.com
Mon Jun 8 14:32:30 UTC 2015


From: Socorro Stoppler <socorrob at us.ibm.com>

Make the resume icon more visible in the tile
Make the Pause button behave like Reset button
Changed the width of the Actions button spanning the 3 buttons above it.

Signed-off-by: Socorro Stoppler <socorrob at us.ibm.com>
---
 ui/css/theme-default/list.css  |  2 +-
 ui/js/src/kimchi.guest_main.js |  4 +++-
 ui/pages/guest.html.tmpl       | 10 +++++-----
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/ui/css/theme-default/list.css b/ui/css/theme-default/list.css
index 9b4f88f..718c855 100644
--- a/ui/css/theme-default/list.css
+++ b/ui/css/theme-default/list.css
@@ -283,7 +283,7 @@
 }
 
 .list-vm .paused img {
-    opacity: 0.1;
+    opacity: 0.6;
 }
 
 .list-title {
diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index 57150e7..7e25b68 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -379,11 +379,13 @@ kimchi.createGuestLi = function(vmObject, prevScreenImage, openMenu) {
     guestActions.find(".running-disabled").prop("disabled", vmRunningBool);
     guestActions.find(".non-persistent-disabled").prop("disabled", !vmPersistent);
     guestActions.find(".reset-disabled").prop("disabled", vmPoweredOffBool || !vmPersistent);
+    guestActions.find(".pause-disabled").prop("disabled", vmPoweredOffBool || !vmPersistent);
 
     if (vmSuspendedBool) { //VM is paused
         //Hide Start
         guestActions.find(".running-hidden").hide();
-        //Hide Pause
+        //Hide Pause button and menu
+        guestActions.find(".pause-disabled").hide();
         guestActions.find(".pause-hidden").hide();
     }	
 
diff --git a/ui/pages/guest.html.tmpl b/ui/pages/guest.html.tmpl
index 57563c1..a192413 100644
--- a/ui/pages/guest.html.tmpl
+++ b/ui/pages/guest.html.tmpl
@@ -51,24 +51,24 @@
            <div class="sortable guest-actions" name="guest-actions">
                 <div class="top">
                     <button class="btn reset-disabled" name="vm-reset" href="javascript:void(0);" title="$_("Reset")"><span class="icon reset"></span></button>
+		    <button class="btn pause-disabled" name="vm-pause" href="javascript:void(0);" title="$_("Pause")"><span class="icon pause"></span></button>
+		    <button class="btn resume-hidden" name="vm-resume" href="javascript:void(0);" title="$_("Resume")"><span class="icon resume"></span></button>
                     <button class="btn running-hidden" name="vm-start" href="javascript:void(0);" title="$_("Start")"><span class="icon power-down"></span></button>
                     <button class="btn shutoff-hidden" name="vm-poweroff" href="javascript:void(0);" title="$_("Power Off")"><span class="icon power-up"></span></button>
-		    <button class="btn pause-hidden" name="vm-pause" href="javascript:void(0);" title="$_("Pause")"><span class="icon pause"></span></button>
-		    <button class="btn resume-hidden" name="vm-resume" href="javascript:void(0);" title="$_("Resume")"><span class="icon resume"></span></button>
                 </div>
                 <div class="bottom">
-                    <div name="actionmenu" class="btn dropdown popable vm-action" style="width: 70px">
+                    <div name="actionmenu" class="btn dropdown popable vm-action" style="width: 126px">
                         <span class="text">$_("Actions")</span><span class="arrow"></span>
                         <div class="popover actionsheet right-side" style="width: 250px">
                             <button class="button-big shutoff-disabled" name="vm-console" ><span class="text">$_("Connect")</span></button>
                             <button class="button-big running-disabled" name="vm-clone"><span class="text">$_("Clone")</span></button>
                             <button class="button-big" name="vm-edit"><span class="text">$_("Edit")</span></button>
                             <button class="button-big shutoff-hidden non-persistent-disabled" name="vm-reset"><span class="text">$_("Reset")</span></button>
+			    <button class="button-big pause-hidden non-persistent-disabled" name="vm-pause"><span class="text">$_("Pause")</span></button>
+			    <button class="button-big resume-hidden" name="vm-resume"><span class="text">$_("Resume")</span></button>
                             <button class="button-big shutoff-hidden" name="vm-shutdown"><span class="text">$_("Shut Down")</span></button>
                             <button class="button-big running-hidden" name="vm-start"><span class="text">$_("Start")</span></button>
                             <button class="button-big shutoff-hidden" name="vm-poweroff"><span class="text">$_("Power Off")</span></button>
-			    <button class="button-big pause-hidden" name="vm-pause"><span class="text">$_("Pause")</span></button>
-			    <button class="button-big resume-hidden" name="vm-resume"><span class="text">$_("Resume")</span></button>
                             <button class="button-big red non-persistent-disabled" name="vm-delete">$_("Delete")</button>
                         </div>
                     </div>
-- 
1.9.1




More information about the Kimchi-devel mailing list