Commit 1491e2d4 authored by EXT Hélène David's avatar EXT Hélène David
Browse files

show edit mode for each field

parent 8ceec7c1
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
<button class="pull-right cancel" type="button" ng-click="adminCompaniesDetailsCtrl.newFieldForm=false;">{{::_labels.cancelBtn}}</button> <button class="pull-right cancel" type="button" ng-click="adminCompaniesDetailsCtrl.newFieldForm=false;">{{::_labels.cancelBtn}}</button>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
<section ng-repeat="(key, val) in metas" class="hoverableContent">
<section ng-repeat="(key, val) in metas" class="hoverableContent">
<div class="hoverable pull-right"> <div class="hoverable pull-right">
<span ng-if="val[0].custom" class="label label-warning"> <span ng-if="val[0].custom" class="label label-warning">
<span ng-if="val[0].visibility==0"><i class="fa fa-unlock"></i> {{::_labels.articleVisibilityList.public}}</span> <span ng-if="val[0].visibility==0"><i class="fa fa-unlock"></i> {{::_labels.articleVisibilityList.public}}</span>
...@@ -37,12 +38,13 @@ ...@@ -37,12 +38,13 @@
<span ng-if="val[0].visibility==2"><i class="fa fa-unlock-alt"></i> {{::_labels.isMainCampus}}</span> <span ng-if="val[0].visibility==2"><i class="fa fa-unlock-alt"></i> {{::_labels.isMainCampus}}</span>
</span> </span>
<button ng-click="adminCompaniesDetailsCtrl.setCurrentElement(key)" ng-if="adminCompaniesDetailsCtrl.currentElement!=key" <button ng-click="setCurrentElement(key)" ng-if="currentElement!=key"
style="margin-left: 5px;"><i class="fa fa-edit"></i> {{::_labels.editMode}}</button> style="margin-left: 5px;"><i class="fa fa-edit"></i> {{::_labels.editMode}}</button>
</div> </div>
<label>{{val[0].label}}: </label> <label>{{val[0].label}}: </label>
<p ng-if="adminCompaniesDetailsCtrl.currentElement!=key" style="background: #eee; margin-top: 5px;">{{val[0].value}}</p> <p ng-if="currentElement!=key" style="background: #eee; margin-top: 5px;">{{val[0].value}}</p>
<div ng-if="adminCompaniesDetailsCtrl.currentElement==key">
<div ng-if="currentElement==key">
<input ng-model="val[0].value" style="width:100%;"></input> <input ng-model="val[0].value" style="width:100%;"></input>
<div style="font-size:0.9em;"> <div style="font-size:0.9em;">
<span><i class="fa fa-eye"></i>{{::_labels.visibility}}</span> <span><i class="fa fa-eye"></i>{{::_labels.visibility}}</span>
...@@ -58,16 +60,16 @@ ...@@ -58,16 +60,16 @@
</span> </span>
</div> </div>
<div class="separator"></div> <div class="separator"></div>
<div class="pull-right"> <div class="pull-right">
<button ng-click="adminCompaniesDetailsCtrl.setField(val[0]);">{{::_labels.editMode}}</button> <button ng-click="setField(val[0]);">{{::_labels.editMode}}</button>
<button class="cancel" ng-click="adminCompaniesDetailsCtrl.setCurrentElement(null)">{{::_labels.cancelBtn}}</button> <button class="cancel" ng-click="setCurrentElement(null)">{{::_labels.cancelBtn}}</button>
<button ng-click="adminCompaniesDetailsCtrl.deleteField(val[0]);"><i class="fa fa-trash"></i> <button ng-click="deleteField(val[0]);"><i class="fa fa-trash"></i>
{{::_labels.deleteMode}}</button> {{::_labels.deleteMode}}</button>
</div> </div>
<div class="clearfix"></div>
<div class="clearfix"></div>
</div> </div>
</section> </section>
</div> </div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment