diff --git a/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/DriveWizard.js b/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/DriveWizard.js index 68bcd42..7fb5445 100644 --- a/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/DriveWizard.js +++ b/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/DriveWizard.js @@ -112,7 +112,7 @@ define([ required: true, label: _('Filename'), validator: lang.hitch(this, function(val) { - var regExp = /^[^./][^/]*$/; + var regExp = /^[^.\/][^\/]*$/; return regExp.test(val) && (!this._volumes || !(val in this._volumes)); }), invalidMessage: _('A valid filename cannot contain "/", may not start with "." and may not already exist in the storage pool.'), @@ -253,9 +253,9 @@ define([ volumeType: mode }; if (mode === 'new') { - values['source'] = null; // trigger volume creation + values.source = null; // trigger volume creation } else { - values['source'] = values['volumeFilename']; + values.source = values.volumeFilename; } return values; }, diff --git a/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/InterfaceWizard.js b/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/InterfaceWizard.js index 89b8734..af4cef6 100644 --- a/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/InterfaceWizard.js +++ b/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/InterfaceWizard.js @@ -111,7 +111,7 @@ define([ }, _setInitialValues: function() { - this.getPage('interface').set('headerText', _('Edit network interface')) + this.getPage('interface').set('headerText', _('Edit network interface')); this.getWidget('interface', 'type').set('value', this.values.type); this.getWidget('interface', 'model').set('value', this.values.model); this.getWidget('interface', 'source').set('value', this.values.source); diff --git a/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/SnapshotGrid.js b/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/SnapshotGrid.js index a01a875..3f68a45 100644 --- a/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/SnapshotGrid.js +++ b/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/SnapshotGrid.js @@ -111,7 +111,7 @@ define([ if (!snapshots_possible) { dialog.alert(_('Creating a snapshots is not possible, because the domain contains writeable raw images!')); return; - } else if (qcow2_images == 0 && this.domain.state != 'SHUTOFF') { + } else if (qcow2_images === 0 && this.domain.state != 'SHUTOFF') { dialog.alert(_('Creating a snapshot is not possible, because the domain does not have at least one qcow2 image!')); return; } diff --git a/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/types.js b/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/types.js index efc19a0..3de1861 100644 --- a/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/types.js +++ b/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/types.js @@ -88,12 +88,16 @@ define([ switch (unit) { case 'P': case 'p': mem *= 1024; + /* falls through */ case 'T': case 't': mem *= 1024; + /* falls through */ case 'G': case 'g': mem *= 1024; + /* falls through */ case 'M': case 'm': mem *= 1024; + /* falls through */ case 'K': case 'k': mem *= 1024; } @@ -227,7 +231,7 @@ define([ 'writethrough': _('Read caching, forced sync (write-through)'), 'writeback': _('Read/write caching, no forced sync (write-back)'), 'directsync': _('No host caching, forced sync (direct-sync)'), - 'unsafe': _('Read/write caching, sync filtered out (unsafe)'), + 'unsafe': _('Read/write caching, sync filtered out (unsafe)') }, POOLS_RW: { // storage pools which support creating new volumes dir: true, @@ -284,20 +288,20 @@ define([ return []; }); }, + ISO: {id: 'iso', label: _('ISO format (iso)')}, + RAW: {id: 'raw', label: _('Simple format (raw)')}, + QCOW2: {id: 'qcow2', label: _('Extended format (qcow2)'), preselected: true}, getImageFormat: function(options) { - ISO = {id: 'iso', label: _('ISO format (iso)')}; - RAW = {id: 'raw', label: _('Simple format (raw)')}; - QCOW2 = {id: 'qcow2', label: _('Extended format (qcow2)'), preselected: true}; var list = []; if (options.type == 'cdrom') { - list.push(ISO); + list.push(self.ISO); } else if (options.type == 'floppy') { - list.push(RAW); + list.push(self.RAW); } else { - list.push(RAW); + list.push(self.RAW); if (options.domain_type == 'kvm') { // TODO: Check self.POOLS_FILE // add qcow2 as pre-selected item - list.push(QCOW2); + list.push(self.QCOW2); } } return list;