edit-expression-java.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <script type="text/ng-template" id="exp.html">
  2. (<span ng-repeat="item in item.v">
  3. <span ng-show="item.t==''" class="dropdown">
  4. <a href="javascript:;" class="btn btn-mini normal" data-toggle="dropdown" title="Selecione alguma variavel ou valor">Selecione...</a>
  5. <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
  6. <li><a role="menuitem" ng-click="setType(item, 'var')">Variável</a></li>
  7. <li><a role="menuitem" ng-click="setType(item, 'val');">Valor</a></li>
  8. </ul>
  9. </span>
  10. <span ng-show="item.t=='exp'">
  11. <span ng-include="'exp.html'"></span>
  12. </span>
  13. <span ng-show="item.t=='expB'">
  14. <span boolean-expression="item" ex="item.v" vars="vars"></span>
  15. </span>
  16. <span ng-show="item.t=='var'">
  17. <span select-variable="item.v" select-vars="vars" type="type"></span>
  18. </span>
  19. <span ng-show="item.t=='val'">
  20. <span edit-in-place-var-value='item.v' type='type'></span>
  21. </span>
  22. <span class="dropdown" ng-show="item.t=='val' || item.t=='var' || item.t=='expB'">
  23. <a href="javascript:;" class="btn btn-mini" data-toggle="dropdown"><img src="img/operations.png" /></a>
  24. <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
  25. <li ng-repeat="op in operators" ng-show="op.compatible.indexOf(type)>=0"><a role="menuitem" ng-click="selectOp(item, op.id)">{{op.display}}</a></li>
  26. <li><a role="menuitem" ng-click="cleanOp(item)">Limpar</a></li>
  27. </ul>
  28. </span>
  29. <span ng-show="item.t=='op'">
  30. <span select-operator="item.v" type="type"></span>
  31. </span>
  32. </span>
  33. <span ng-show="item.v.length==2" class="dropdown">
  34. <a href="javascript:;" class="btn btn-mini normal" data-toggle="dropdown" title="Selecione alguma variavel ou valor">Selecione...</a>
  35. <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
  36. <li><a role="menuitem" ng-click="addEl(item.v, 'var')">Variável</a></li>
  37. <li><a role="menuitem" ng-click="addEl(item.v, 'val')">Valor</a></li>
  38. </ul>
  39. </span>
  40. )
  41. </script>
  42. <!-- nao add nada ainda -->
  43. <!-- This is the selector to 'variable' or 'value' in logical expression of the command 'if' -->
  44. <span ng-show="ex.length==0" class="dropdown">
  45. <a href="javascript:;" class="btn btn-mini normal" data-toggle="dropdown" title="Selecione alguma variavel ou valor">Selecione...</a>
  46. <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
  47. <li><a role="menuitem" ng-click="addEl(ex, 'var')">Variável</a></li>
  48. <li><a role="menuitem" ng-click="addEl(ex, 'val')">Valor</a></li>
  49. </ul>
  50. </span>
  51. <span ng-repeat="item in ex">
  52. <span ng-show="item.t=='exp'">
  53. <!--span edit-expression-java="item.v" vars="vars" type="type"></span-->
  54. <span ng-include="'exp.html'"></span>
  55. </span>
  56. <span ng-show="item.t=='var'">
  57. <span select-variable="item.v" select-vars="vars" type="type"></span>
  58. </span>
  59. <span ng-show="item.t=='expB'">
  60. <span boolean-expression="item" ex="item.v" vars="vars"></span>
  61. </span>
  62. <span ng-show="item.t=='val'">
  63. <span edit-in-place-var-value='item.v' type='type'></span>
  64. </span>
  65. <span class="dropdown" ng-show="item.t=='val' || item.t=='var' || item.t=='exp'">
  66. <span class="dropdown">
  67. <a href="javascript:;" class="btn btn-mini" data-toggle="dropdown"><img src="img/operations.png" /></a>
  68. <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
  69. <li ng-repeat="op in operators" ng-show="op.compatible.indexOf(type)>=0"><a role="menuitem" ng-click="selectOp(item, op.id)">{{op.display}}</a></li>
  70. <li><a role="menuitem" ng-click="ex.pop()">Limpar</a></li>
  71. </ul>
  72. </span>
  73. </span>
  74. <span ng-show="item.t=='op'">
  75. <span select-operator="item.v" type="type"></span>
  76. </span>
  77. </span>
  78. <span ng-show="ex.length==2" class="dropdown">
  79. <a href="javascript:;" class="btn btn-mini normal" data-toggle="dropdown" title="Selecione alguma variavel ou valor">Selecione...</a>
  80. <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
  81. <li><a role="menuitem" ng-click="addEl('var')">Variável</a></li>
  82. <li><a role="menuitem" ng-click="addEl('val')">Valor</a></li>
  83. </ul>
  84. </span>
  85. <!--
  86. <span ng-show="ex.t=='exp'">
  87. (<span ng-repeat="ex in ex.exp">
  88. <span edit-in-place-var-value='ex.v' type='type'></span>
  89. </span>
  90. <span class="dropdown">
  91. <button class="btn btn-mini" data-toggle="dropdown"><i class="icon icon-align-justify"></i></button>
  92. <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
  93. <li><a role="menuitem" ng-click="addElVar(ex.exp)">Variável</a></li>
  94. <li><a role="menuitem" ng-click="addElVal(ex.exp)">Valor</a></li>
  95. <li><a role="menuitem" ng-click="addElExpB(ex.exp)">Expressão Booleana</a></li>
  96. </ul>
  97. </span>)
  98. </span>
  99. <span ng-hide="ex.o==''">&nbsp;<span select-operator="ex.o" ex="ex" select-model="ex.v" select-vars="program.functions[currentFunction].vars" type="type"></span>&nbsp;</span>
  100. <span ng-show="ex.t=='val'">
  101. <span edit-in-place-var-value='ex.v' type='type'></span>
  102. </span>
  103. <span ng-show="ex.t=='var'">
  104. <span select-variable-expression="ex.v" ex="ex" vars="vars" type="type"></span>
  105. </span>
  106. <span ng-show="ex.t=='expB'">
  107. <span boolean-expression="ex.v" ex="ex" vars="vars"></span>
  108. </span>-->