<div ng-mouseenter="showEdit()" ng-mouseleave="hideEdit()" class="ep" ng-dblclick="doEdit()">
  {{getText()}}&nbsp;<i class="ep-edit icon-pencil" title="Edit this item" ng-click="doEdit(); $event.stopPropagation();" no-click></i>
</div>
<div class="ep editing" ng-show="editing" no-click>
  <form class="form-inline no-bottom-margin" ng-submit="saveEdit()">
    <fieldset>
      <span ng-switch="inputType">
        <span ng-switch-when="number">
          <input type="number" size="{{text.length}}" ng-style="getInputStyle()" value="{{text}}" max="{{max}}" min="{{min}}">
        </span>
        <span ng-switch-when="password">
          <input type="password" size="{{text.length}}" ng-style="getInputStyle()" value="{{text}}">
        </span>
        <span ng-switch-default>
          <input type="text" size="{{text.length}}" ng-style="getInputStyle()" value="{{text}}">
        </span>
      </span>
      <i class="green clickable icon-ok icon1point5x" title="Save changes" ng-click="saveEdit()"></i>
      <i class="red clickable icon-remove icon1point5x" title="Discard changes" ng-click="stopEdit()"></i>
    </fieldset>
  </form>
</div>
