Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #51 from marmelab/bug_fix
Browse files Browse the repository at this point in the history
[RFR] Bugfix on property form
  • Loading branch information
fzaninotto committed May 30, 2014
2 parents 0345dd6 + fd21f49 commit 6598ada
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sass/phpcr-browser/properties.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

td:nth-child(4) {
/* Type column */
width: 10%;
width: 12%;
vertical-align: middle;
text-align: center;
}
Expand Down
2 changes: 1 addition & 1 deletion web/assets/css/screen.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions web/assets/js/browser/controllers/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ define([
});
}

return $scope.currentNode.createProperty(name, value).then(function() {
return $scope.currentNode.createProperty(name, value, type).then(function() {
$translate('NODE_ADD_PROPERTY_SUCCESS').then($log.log, $log.log);
reloadProperties();
$scope.name = $scope.value = undefined;
$scope.newProperty = {};
$scope.displayCreateForm = false;
}, function(err) {
if (err.data && err.data.message) { return $log.error(err, err.data.message); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<input type="text" ng-model="newProperty.value" class="form-control" placeholder="{{ 'NODE_ADD_PROPERTY_VALUE_PROMPT' | translate }}" ui-keypress="keyBinding.createForm.keypress" ui-keydown="keyBinding.createForm.keydown">
</td>
<td>
<select ng-model="type" class="form-control" ng-options="type.name for type in types">
<select ng-model="newProperty.type" class="form-control" ng-options="type.name for type in types">
<option value="">{{ 'NODE_ADD_PROPERTY_TYPE_PROMPT' | translate }}</option>
</select>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<a class="btn btn-default btn-sm validate" ng-click="toggleCreateForm()" ng-show="displayCreateForm">
<span class="glyphicon glyphicon-remove"></span> {{ 'NODE_ADD_PROPERTY_CANCEL_BUTTON' | translate }}
</a>
<a class="btn btn-primary btn-sm validate" ng-click="createProperty(name, value, type.value)" ng-show="displayCreateForm">
<a class="btn btn-primary btn-sm validate" ng-click="createProperty(newProperty.name, newProperty.value, newProperty.type.value)" ng-show="displayCreateForm">
<span class="glyphicon glyphicon-ok"></span> {{ 'NODE_ADD_PROPERTY_SAVE_BUTTON' | translate }}
</a>
</div>
Expand Down

0 comments on commit 6598ada

Please sign in to comment.