[Kimchi-devel] [PATCH] [Kimchi 1/1] Use fontawesome icon instead of external image

Aline Manera aline.manera at gmail.com
Sun Sep 10 01:13:37 UTC 2017


edit-alt class is linked to an external image on Wok. There is no need
to use it as fontawesome has the same icon available.

Signed-off-by: Aline Manera <aline.manera at gmail.com>
---
 ui/css/kimchi.css                 | 4 ++--
 ui/css/src/modules/_guests.scss   | 2 +-
 ui/js/src/kimchi.guest_main.js    | 2 +-
 ui/pages/guest.html.tmpl          | 4 +---
 ui/pages/tabs/network.html.tmpl   | 3 ++-
 ui/pages/tabs/storage.html.tmpl   | 8 ++++++--
 ui/pages/tabs/templates.html.tmpl | 3 ++-
 7 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/ui/css/kimchi.css b/ui/css/kimchi.css
index 4c40fcd5..c3d61ffa 100644
--- a/ui/css/kimchi.css
+++ b/ui/css/kimchi.css
@@ -1,7 +1,7 @@
 /*
  * Project Kimchi
  *
- * Copyright IBM Corp, 2015-2017
+ * Copyright IBM Corp, 2015-2016
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -798,7 +798,7 @@
   display: none;
 }
 
-#guest-content-container .wok-guest-gallery .wok-guest-list-item .guest-done {
+#guest-content-container .wok-guest-gallery .wok-guest-list-item .guest-actions {
   display: none;
 }
 
diff --git a/ui/css/src/modules/_guests.scss b/ui/css/src/modules/_guests.scss
index 37654dd7..ce3838f8 100644
--- a/ui/css/src/modules/_guests.scss
+++ b/ui/css/src/modules/_guests.scss
@@ -492,7 +492,7 @@
                     }
                 }
             }
-            .guest-done {
+            .guest-actions {
                 display: none;
             }
             .guest-state {
diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index 8cfd229c..e9b3e8d2 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -766,7 +766,7 @@ kimchi.createGuestLi = function(vmObject, prevScreenImage, openMenu) {
             });
         } else {
             guestActions.find('.btn').attr('disabled', true);
-            result.find('.guest-done').addClass('hidden');
+            result.find('.guest-actions').addClass('hidden');
             result.find('.guest-state').addClass('hidden');
             result.find('.guest-pending').removeClass('hidden');
             pendingText = result.find('.guest-pending .text')
diff --git a/ui/pages/guest.html.tmpl b/ui/pages/guest.html.tmpl
index cc09aa05..7e3658b5 100644
--- a/ui/pages/guest.html.tmpl
+++ b/ui/pages/guest.html.tmpl
@@ -39,9 +39,7 @@
                 <span class="pull-right">
                     <div class="dropdown menu-flat guest-actions" name="guest-actions">
                         <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
-                            <span class="guest-done">
-                                <span class="edit-alt"></span>$_("Actions")<span class="caret"></span>
-                            </span>
+                            <i class="fa fa-pencil-square-o" aria-hidden="true"> </i>$_("Actions")<span class="caret"></span>
                             <span class="guest-state">
                                 <span class="running"><i class="fa fa-power-off"></i><span class="text-status">$_("Running")</span></span><!--
                              --><span class="shutoff shutdown blocked"><i class="fa fa-ban"></i><span class="text-status">$_("Disconnected")</span></span><!--
diff --git a/ui/pages/tabs/network.html.tmpl b/ui/pages/tabs/network.html.tmpl
index bd7aca06..57f3d3af 100644
--- a/ui/pages/tabs/network.html.tmpl
+++ b/ui/pages/tabs/network.html.tmpl
@@ -74,7 +74,8 @@
                     --><span class='column-action' style="display:none">
                                 <span class="pull-right">
                                     <div class="dropdown menu-flat">
-                                        <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false"><span class="edit-alt"></span>$_("Actions")<span class="caret"></span>
+                                        <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
+                                          <i class="fa fa-pencil-square-o" aria-hidden="true"> </i>$_("Actions")<span class="caret"></span>
                                         </button>
                                         <ul class="dropdown-menu" role="menu">
                                             <li role="presentation" nwAct="start" class='{startClass}'><a><i class="fa fa-undo"></i>$_("Start")</a></li>
diff --git a/ui/pages/tabs/storage.html.tmpl b/ui/pages/tabs/storage.html.tmpl
index 06bfab52..fed79847 100644
--- a/ui/pages/tabs/storage.html.tmpl
+++ b/ui/pages/tabs/storage.html.tmpl
@@ -94,7 +94,9 @@
     --><span class="column-action storage-button" style="display:none">
             <span class="pull-right">
                 <div class="dropdown menu-flat storage-action" data-state="{state}" data-type="{type}" data-name="{name}">
-                    <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false" aria-haspopup="true"><span class="edit-alt"></span>$_("Actions")<span class="caret"></span></button>
+                    <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false" aria-haspopup="true">
+                      <i class="fa fa-pencil-square-o" aria-hidden="true"> </i>$_("Actions")<span class="caret"></span>
+                    </button>
                     <ul class="dropdown-menu actionsheet">
                         <li><a href="#" class="pool-deactivate" data-inuse="{in_use}" data-stat="{state}" data-name="{name}" data-persistent="{persistent}"><i class="fa fa-minus-circle"></i>$_("Deactivate")</a></li>
                         <li><a href="#" class="pool-activate" data-stat="{state}" data-name="{name}"><i class="fa fa-power-off"></i>$_("Activate")</a></li>
@@ -110,7 +112,9 @@
                     <div class="col-sm-7">
                         <div class="btn-group">
                         <div class="dropdown menu-flat pool-action">
-                            <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false" aria-haspopup="true"><span class="edit-alt"></span>$_("Actions")<span class="caret"></span></button>
+                            <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false" aria-haspopup="true">
+                              <i class="fa fa-pencil-square-o" aria-hidden="true"> </i>$_("Actions")<span class="caret"></span>
+                            </button>
                             <ul class="dropdown-menu actionsheet">
                                 <li class="disabled"><a href="#" class="volume-add" data-stat="{state}" data-name="{name}" data-type="{type}"><i class="fa fa-plus-circle"></i> $_("Add Volume")</a></li>
                                 <li class="disabled"><a href="#" class="volume-resize" data-name="{name}"><i class="fa fa-external-link-square"></i> $_("Resize")</a></li>
diff --git a/ui/pages/tabs/templates.html.tmpl b/ui/pages/tabs/templates.html.tmpl
index 86427705..a5a272cb 100644
--- a/ui/pages/tabs/templates.html.tmpl
+++ b/ui/pages/tabs/templates.html.tmpl
@@ -96,7 +96,8 @@
             --><span class='column-action pull-right'>
                 <span class="pull-right">
                     <div class="dropdown menu-flat">
-                        <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false"><span class="edit-alt"></span>$_("Actions")<span class="caret"></span>
+                        <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
+                          <i class="fa fa-pencil-square-o" aria-hidden="true"> </i>$_("Actions")<span class="caret"></span>
                         </button>
                         <ul class="dropdown-menu" role="menu">
                             <li nwAct="edit" class='template-edit'><a href="#" data-template='{name}'><i class="fa fa-pencil"></i>$_("Edit")</a></li>
-- 
2.13.5



More information about the Kimchi-devel mailing list