Merge "Fix typo and minor edit modal issue"
This commit is contained in:
commit
69a0139526
@ -1,5 +1,5 @@
|
||||
<div class="pull-right">
|
||||
<a ng-ig="ctrl.product.can_manage"
|
||||
<a ng-if="ctrl.product.can_manage"
|
||||
href="javascript:void(0)"
|
||||
ng-click="ctrl.openProductEditModal()">
|
||||
Edit
|
||||
|
@ -336,7 +336,7 @@
|
||||
|
||||
var ctrl = this;
|
||||
|
||||
ctrl.version = version;
|
||||
ctrl.version = angular.copy(version);
|
||||
ctrl.parent = parent;
|
||||
|
||||
ctrl.close = close;
|
||||
@ -369,6 +369,8 @@
|
||||
'/versions/', ctrl.version.id ].join('');
|
||||
var content = {'cpid': ctrl.version.cpid};
|
||||
$http.put(url, content).success(function() {
|
||||
// Update the original version object.
|
||||
version.cpid = ctrl.version.cpid;
|
||||
ctrl.showSuccess = true;
|
||||
}).error(function(error) {
|
||||
ctrl.showError = true;
|
||||
@ -400,7 +402,7 @@
|
||||
ctrl.saveChanges = saveChanges;
|
||||
ctrl.removeProperty = removeProperty;
|
||||
|
||||
ctrl.product = product;
|
||||
ctrl.product = angular.copy(product);
|
||||
ctrl.productName = product.name;
|
||||
ctrl.productProperties = [];
|
||||
|
||||
|
@ -267,7 +267,7 @@
|
||||
ctrl.saveChanges = saveChanges;
|
||||
ctrl.removeProperty = removeProperty;
|
||||
|
||||
ctrl.vendor = vendor;
|
||||
ctrl.vendor = angular.copy(vendor);
|
||||
ctrl.vendorName = vendor.name;
|
||||
ctrl.vendorProperties = [];
|
||||
ctrl.isAdmin = $rootScope.auth.currentUser.is_admin;
|
||||
|
@ -79,8 +79,10 @@ class VersionsController(validation.BaseRestControllerWithValidation):
|
||||
|
||||
creator = api_utils.get_user_id()
|
||||
pecan.response.status = 201
|
||||
allowed_keys = ['id', 'product_id', 'version', 'cpid']
|
||||
return db.add_product_version(self.product_id, version_info['version'],
|
||||
creator, version_info.get('cpid'))
|
||||
creator, version_info.get('cpid'),
|
||||
allowed_keys)
|
||||
|
||||
@secure(api_utils.is_authenticated)
|
||||
@pecan.expose('json', method='PUT')
|
||||
|
Loading…
x
Reference in New Issue
Block a user