boolean-expression.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <span class="select-variable-value" ng-class="{'need-to-set': value.v[0].v==''}">
  2. (
  3. <span select-variable="value.v[0].v" select-vars="vars" type="''"></span>
  4. <span ng-show="value.v[0].v==''" class="normal"> « selecione uma variável</span>
  5. <span class="dropdown select-variable-value" ng-hide="value.v[0].v==''">
  6. <a id="drop1" href="#" role="button" class="dropdown-toggle normal" data-toggle="dropdown">
  7. <span ng-hide="value.v[0].v==''">{{operators[value.v[1].v].display}}</span>
  8. <span ng-show="value.v[1].v==''"> selecionar operador </span>
  9. </a>
  10. <ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
  11. <li ng-repeat="op in operators" ng-show="op.compatible.indexOf(vars[value.v[0].v].type)>=0">
  12. <a ng-click="value.v[1].v = op.id;">{{op.display}}</a>
  13. </li>
  14. </ul>
  15. </span>
  16. <span ng-hide="value.v[0].v==''">
  17. <!--
  18. TODO: mudar para select-variable-value,
  19. um componente a fazer que permite escolher uma variavel ou um valor
  20. -->
  21. <span ng-show="value.v[2].t==''" class="dropdown">
  22. <a href="javascript:;" class="btn btn-mini" data-toggle="dropdown">Selecione...</a>
  23. <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
  24. <li><a role="menuitem" ng-click="value.v[2].t='var'">Variável</a></li>
  25. <li><a role="menuitem" ng-click="value.v[2].t='val'; value.v[2].v=getDefaultValue(vars[value.v[0].v].type)">Valor</a></li>
  26. </ul>
  27. </span>
  28. <span ng-show="value.v[2].t=='var'">
  29. <span select-variable="value.v[2].v" select-vars="vars" type="vars[value.v[0].v].type"></span>
  30. </span>
  31. <span ng-show="value.v[2].t=='val'">
  32. <span edit-in-place-var-value='value.v[2].v' type='vars[value.v[0].v].type'></span>
  33. </span>
  34. <span ng-hide="value.v[2].t==''" class="dropdown">
  35. <a href="javascript:;" class="btn btn-mini" data-toggle="dropdown"><img src="img/operations.png" /></a>
  36. <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
  37. <li><a role="menuitem" ng-click="value.v[2].t=''; value.v[2].v=''">Limpar</a></li>
  38. </ul>
  39. </span>
  40. </span>
  41. )
  42. </span>