[Kimchi-devel] [PATCH V2 1/2] UI: Delete Manage Media function from action list

Wen Wang wenwang at linux.vnet.ibm.com
Fri Aug 22 06:11:11 UTC 2014


V1 -> V2:
Have the "ui/css/theme-default/guest-media.css" deleted

Have the "Manage Media" function deleted from "Action" list

Signed-off-by: Wen Wang <wenwang at linux.vnet.ibm.com>
---
 ui/css/theme-default/guest-media.css |   42 -------------------------
 ui/js/src/kimchi.guest_main.js       |   13 --------
 ui/pages/guest-media.html.tmpl       |   57 ----------------------------------
 ui/pages/guest.html.tmpl             |    1 -
 4 files changed, 0 insertions(+), 113 deletions(-)
 delete mode 100644 ui/css/theme-default/guest-media.css
 delete mode 100644 ui/pages/guest-media.html.tmpl

diff --git a/ui/css/theme-default/guest-media.css b/ui/css/theme-default/guest-media.css
deleted file mode 100644
index 29b1893..0000000
--- a/ui/css/theme-default/guest-media.css
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2014
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#guest-media-window {
-    font-size: 14px;
-    height: 320px;
-    width: 570px;
-}
-
-#form-guest-media {
-    padding: 1em;
-}
-
-#guest-media-window .guest-media-fieldset {
-    padding-right: 0;
-}
-
-#form-guest-media .guest-edit-wrapper-label {
-    width: 30px;
-}
-
-#form-guest-media .guest-edit-wrapper-controls {
-    width: 480px;
-}
-
-#form-guest-media .guest-edit-cdrom-row-container input[type="text"] {
-    width: 437px;
-}
diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index ff6f2e1..320847e 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -123,18 +123,6 @@ kimchi.vmdelete = function(event) {
     });
 };
 
-kimchi.vmmedia = function(event) {
-    var vm = $(this).closest('li[name=guest]');
-    var vm_id = vm.attr('id');
-    kimchi.selectedGuest = vm_id;
-    kimchi.window.open({
-        url: 'guest-media.html',
-        close: function() {
-            kimchi.clearGuestMedia();
-        }
-    });
-};
-
 kimchi.vmedit = function(event) {
     var vm = $(this).closest('li[name=guest]');
     var vm_id=vm.attr("id");
@@ -293,7 +281,6 @@ kimchi.createGuestLi = function(vmObject, prevScreenImage, openMenu) {
     if (vmRunningBool) {  //If the guest is not running, do not enable shutdown
         guestActions.find("[name=vm-shutdown]").on({click : kimchi.vmshutdown});
     }
-    guestActions.find("[name=vm-media]").on({click : kimchi.vmmedia});
     guestActions.find("[name=vm-edit]").on({click : kimchi.vmedit});
     guestActions.find("[name=vm-delete]").on({click : kimchi.vmdelete});
 
diff --git a/ui/pages/guest-media.html.tmpl b/ui/pages/guest-media.html.tmpl
deleted file mode 100644
index 5435f52..0000000
--- a/ui/pages/guest-media.html.tmpl
+++ /dev/null
@@ -1,57 +0,0 @@
-#*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2014
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *#
-#unicode UTF-8
-#import gettext
-#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang)
-#silent _ = t.gettext
-#silent _t = t.gettext
-
-<div id="guest-media-window" class="window">
-    <header>
-        <h1 class="title">$_("Manage Media")</h1>
-        <div class="close">X</div>
-    </header>
-    <div class="content">
-        <form id="form-guest-media">
-            <fieldset
-                id="guest-edit-cdrom-row-container"
-                class="guest-edit-fieldset guest-edit-cdrom-row-container">
-            </fieldset>
-        </form>
-    </div>
-</div>
-<script id="cdrom-row-tmpl" type="text/html">
-    <div>
-        <div class="guest-edit-wrapper-label">
-            <label for="cdrom-{dev}">{dev}</label>
-        </div>
-        <div class="guest-edit-wrapper-controls">
-            <input id="cdrom-{dev}" name="cdrom" type="text"
-                data-vm="{vm}" data-dev="{dev}"
-                value="{path}" readonly="readonly" />
-            <button class="guest-edit-cdrom-button replace"
-                data-vm="{vm}" data-dev="{dev}"
-                title="$_("Replace")">
-            </button>
-        </div>
-    </div>
-</script>
-
-<script type="text/javascript">
-    kimchi.guest_media_main();
-</script>
diff --git a/ui/pages/guest.html.tmpl b/ui/pages/guest.html.tmpl
index d67ef3e..43fb350 100644
--- a/ui/pages/guest.html.tmpl
+++ b/ui/pages/guest.html.tmpl
@@ -56,7 +56,6 @@
                         <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 shutoff-disabled" name="vm-media"><span class="text">$_("Manage Media")</span></button>
                             <button class="button-big running-disabled" name="vm-edit"><span class="text">$_("Edit")</span></button>
                             <button class="button-big shutoff-hidden" name="vm-reset"><span class="text">$_("Reset")</span></button>
                             <button class="button-big shutoff-hidden" name="vm-shutdown"><span class="text">$_("Shut Down")</span></button>
-- 
1.7.1




More information about the Kimchi-devel mailing list