You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2014/09/22 15:52:04 UTC

svn commit: r1626775 - in /vcl/trunk/web: .ht-inc/requests.php js/requests.js

Author: jfthomps
Date: Mon Sep 22 13:52:04 2014
New Revision: 1626775

URL: http://svn.apache.org/r1626775
Log:
VCL-780 - combine new reservation and current reservations pages

requests.php:
- modified printImageDescription: added preg_replace to wrap text at 60 characters
- modified processRequestInput: commented out processing configs

requests.js: modified validateDeployInputs: check for endat being defined before checking its value

Modified:
    vcl/trunk/web/.ht-inc/requests.php
    vcl/trunk/web/js/requests.js

Modified: vcl/trunk/web/.ht-inc/requests.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/requests.php?rev=1626775&r1=1626774&r2=1626775&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/requests.php (original)
+++ vcl/trunk/web/.ht-inc/requests.php Mon Sep 22 13:52:04 2014
@@ -1903,6 +1903,7 @@ function printImageDescription($imageid)
 		$desc = preg_replace("/\n/", '<br>', $imagenotes['description']);
 		$desc = preg_replace("/\r/", '', $desc);
 		$desc = preg_replace("/'/", '&#39;', $desc);
+		$desc = preg_replace("/(.{1,60}([ \n]|$))/", '\1<br>', $desc);
 		print "dojo.byId('imgdesc').innerHTML = '<strong>";
 		print _("Image Description") . "</strong>:<br>";
 		print "$desc<br><br>'; ";
@@ -4474,7 +4475,8 @@ function processRequestInput() {
 			$return['monitored'] = 0;
 
 		# configs
-		$tmp = getUserResources(array("configAdmin"));
+		# TODO configs
+		/*$tmp = getUserResources(array("configAdmin"));
 		$userconfigs = $tmp['config'];
 		$initconfigs = getMappedConfigs($return['imageid']);
 		if(array_key_exists('configdata', $_POST)) {
@@ -4526,7 +4528,7 @@ function processRequestInput() {
 		#print "/*";
 		#printArray($initconfigvars);
 		#printArray($configvars);
-		#print "*/";
+		#print "*" . "/";
 		$return['configvars'] = array();
 		foreach($initconfigvars as $id => $configvar) {
 			$tmp = explode('/', $id);
@@ -4553,7 +4555,7 @@ function processRequestInput() {
 			}
 			if(isset($configvars->{$id}))
 				unset($configvars->{$id});
-		}
+		}*/
 		/*print "/*";
 		printArray($rescfgmapids);
 		foreach($configvars as $id => $var) {

Modified: vcl/trunk/web/js/requests.js
URL: http://svn.apache.org/viewvc/vcl/trunk/web/js/requests.js?rev=1626775&r1=1626774&r2=1626775&view=diff
==============================================================================
--- vcl/trunk/web/js/requests.js (original)
+++ vcl/trunk/web/js/requests.js Mon Sep 22 13:52:04 2014
@@ -304,7 +304,7 @@ function validateDeployInputs() {
 		dijit.byId('newResDlgBtn').set('disabled', true);
 		return false;
 	}
-	if(dojo.byId('endat').checked &&
+	if(dojo.byId('endat') && dojo.byId('endat').checked &&
 	   (! dijit.byId('deployenddate').isValid() ||
 	   ! dijit.byId('deployendtime').isValid())) {
 		dijit.byId('newResDlgBtn').set('disabled', true);