Author: jfthomps
Date: Tue Feb 21 19:25:04 2012
New Revision: 1291961

URL: http://svn.apache.org/viewvc?rev=1291961&view=rev
Log:
VCL-385
Hide noimage from showing in the list of images in Edit Image Profiles

images.php:
-modified viewImages - do not print noimage image in list of images to edit
-modified viewImageGrouping - do not print noimage image in list of images to 
add to a group
-modified subimageDialogContent - do not print noimage image in list of images 
that can be added as a subimage

requests.php: modified newReservation - do not print noimage image in list of 
images that can be reserved

vm.php: modified AJprofileData - do not add noimage image to data structure of 
images that can be selected for a profile

Modified:
    incubator/vcl/trunk/web/.ht-inc/images.php
    incubator/vcl/trunk/web/.ht-inc/requests.php
    incubator/vcl/trunk/web/.ht-inc/vm.php

Modified: incubator/vcl/trunk/web/.ht-inc/images.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/images.php?rev=1291961&r1=1291960&r2=1291961&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/images.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/images.php Tue Feb 21 19:25:04 2012
@@ -167,7 +167,7 @@ function viewImages() {
        }
        print "  </TR>\n";
        foreach(array_keys($images) as $id) {
-               if(! in_array($id, $userImageIDs))
+               if(! in_array($id, $userImageIDs) || $images[$id]['name'] == 
'noimage')
                        continue;
                print "  <TR>\n";
                print "    <TD align=center>\n";
@@ -257,6 +257,8 @@ function viewImageGrouping() {
        $images = $tmp['image'];
        uasort($images, 'sortKeepIndex');
        foreach($images as $id => $image) {
+               if($image == 'No Image')
+                       continue;
                print "<option value=$id>$image</option>\n";
        }
        print "</select>\n";
@@ -1522,8 +1524,11 @@ function subimageDialogContent() {
 
        $content  = "<h3>Add New Subimage</h3>";
        $content .= "<select dojoType=\"dijit.form.FilteringSelect\" 
id=addsubimagesel>";
-       foreach($resources['image'] as $id => $name)
+       foreach($resources['image'] as $id => $name) {
+               if($name == 'No Image')
+                       continue;
                $content .= "<option value=$id>$name</option>";
+       }
        $content .= "</select>";
        $content .= "<button dojoType=\"dijit.form.Button\" id=addbtn>";
        $content .= "Add Subimage";

Modified: incubator/vcl/trunk/web/.ht-inc/requests.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/requests.php?rev=1291961&r1=1291960&r2=1291961&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/requests.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/requests.php Tue Feb 21 19:25:04 2012
@@ -115,11 +115,14 @@ function newReservation() {
                        print "onChange=\"updateWaitTime(1);\" tabIndex=1 
style=\"width: 400px\" ";
                        print "queryExpr=\"*\${0}*\" highlightMatch=\"all\" 
autoComplete=\"false\" ";
                        print "name=imageid>\n";
-                       foreach($resources['image'] as $id => $image)
+                       foreach($resources['image'] as $id => $image) {
+                               if($image == 'No Image')
+                                       continue;
                                if($id == $imageid)
                                        print "        <option value=\"$id\" 
selected>$image</option>\n";
                                else
                                        print "        <option 
value=\"$id\">$image</option>\n";
+                       }
                        print "      </select>\n";
                }
                else

Modified: incubator/vcl/trunk/web/.ht-inc/vm.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/vm.php?rev=1291961&r1=1291960&r2=1291961&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/vm.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/vm.php Tue Feb 21 19:25:04 2012
@@ -774,8 +774,11 @@ function AJprofileData($profileid="") {
        $types = getVMtypes();
        $allimages = getImages();
        $images = array();
-       foreach($allimages as $key => $image)
+       foreach($allimages as $key => $image) {
+               if($image['name'] == 'noimage')
+                       continue;
                $images[] = array('id' => $key, 'name' => $image['prettyname']);
+       }
        $imagedata = array('identifier' => 'id', 'items' => $images);
        
        $types2 = array();


Reply via email to