some hacky inline css to make the env section look not terrible

This commit is contained in:
Brad Rydzewski 2015-05-28 11:31:10 -07:00
parent 910a6a6594
commit 0207929d49
2 changed files with 39 additions and 16 deletions

View file

@ -87,10 +87,24 @@
} }
$scope.repo.params[param.key]=param.value; $scope.repo.params[param.key]=param.value;
$scope.param={} $scope.param={}
// auto-update
repos.update($scope.repo).then(function(payload) {
$scope.repo = payload.data;
}).catch(function(err){
$scope.error = err;
});
} }
$scope.deleteParam = function(key) { $scope.deleteParam = function(key) {
delete $scope.repo.params[key]; delete $scope.repo.params[key];
// auto-update
repos.update($scope.repo).then(function(payload) {
$scope.repo = payload.data;
}).catch(function(err){
$scope.error = err;
});
} }
} }

View file

@ -21,22 +21,31 @@
</div> </div>
<article> <article>
<section> <section style="padding:30px;">
<form> <div ng-repeat="(key, value) in repo.params" style="
<ul> padding: 30px 0px;
<li ng-repeat="(key, value) in repo.params"> border-bottom: 1px solid #EEE;
<label>{{ key }}</label> font-size: 14px;
<input type="text" ng-model="repo.params[key]"/> color: #757575;font-family:'Droid Sans Mono','Roboto','Arial';position:relative;">
<button ng-click="deleteParam(key)">remove</button> <div style="display:inline-block;"><span style="color:#2196F3">export</span> {{ key }} <span style="color:#2196F3">=</span></div>
</li> <div style="display:inline-block;">{{ value }}</div>
<li> <button ng-click="deleteParam(key)" style="position:absolute;right:0px;background: #EF5350;
<input type="text" ng-model="param.key" /> padding: 8px 10px;
<input type="text" ng-model="param.value" /> color: #FFF;
<button ng-click="addParam(param)">add</button> font-family: Roboto;
</li> font-size:12px;
</ul> text-transform: uppercase;">remove</button>
</div>
<button ng-click="save(repo)">Save</button> <form style="padding-top:30px;font-family:'Droid Sans Mono','Roboto','Arial';font-size:14px;">
<span style="color:#2196F3">export</span>
<input type="text" placeholder="FOO" ng-model="param.key" style="border:none;border-bottom:1px solid #9E9E9E;line-height:24px;font-family:'Droid Sans Mono','Roboto','Arial';font-size:14px;" />
<span style="color:#2196F3">=</span>
<input type="text" placeholder="BAR" ng-model="param.value" style="border:none;border-bottom:1px solid #9E9E9E;line-height:24px;font-family:'Droid Sans Mono','Roboto','Arial';font-size:14px;" />
<button ng-click="addParam(param)" style="background: #66bb6a;
padding: 8px 20px;
color: #FFF;
font-family: Roboto;
text-transform: uppercase;">add</button>
</form> </form>
</section> </section>
</article> </article>