for.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334
  1. <div class="instr repeat" id="node{{node.id}}">
  2. <div class="handle"><i class="fa fa-sort"></i></div>
  3. <span><a href="javascript:;" ng-click="childrenVisible(node)"><img src="img/expand_up.png" ng-show="node.isChildrenVisible" /><img src="img/expand_down.png" ng-hide="node.isChildrenVisible" /></a></span>
  4. <!-- for simples -->
  5. <span ng-show="node.forType==1">
  6. Repetir
  7. <span var-value="node.limit" ttype="node.limitType" type="'int'" vars="program.functions[currentFunction].vars" class="for1"></span>
  8. vezes
  9. </span>
  10. <span ng-show="node.forType==2">
  11. Repetir
  12. <span var-value="node.limit" ttype="node.limitType" type="'int'" vars="program.functions[currentFunction].vars" class="for1"></span>
  13. vezes, incrementando
  14. <span select-variable="node.using" select-vars="program.functions[currentFunction].vars" type="'int'" class="for2"></span>
  15. </span>
  16. <span ng-show="node.forType==3">
  17. Repita, usando <span select-variable="node.using" select-vars="program.functions[currentFunction].vars" type="'int'"></span> de <span var-value="node.initial" ttype="node.initialType" type="'int'" vars="program.functions[currentFunction].vars"></span> até <span var-value="node.limit" ttype="node.limitType" type="'int'" vars="program.functions[currentFunction].vars"></span>, incrementando de <span var-value="node.step" ttype="node.stepType" type="'int'" vars="program.functions[currentFunction].vars" class="for3"></span>
  18. </span>
  19. <span class="btn-group">
  20. <button ng-show="node.forType>1" class="btn btn-xs" ng-click="changeForType(node, -1)"><i class="fa fa-angle-double-left"></i><img src="img/mode1.png" /></button>
  21. <button ng-show="node.forType<3" class="btn btn-xs btn-warning" ng-click="changeForType(node, 1)"><i class="fa fa-angle-double-right"></i></button>
  22. </span>
  23. <span ng-hide="node.simple">para <span select-variable="node.variable" select-model="node.variable" select-vars="program.functions[currentFunction].vars"></span> = <span edit-in-place='node.initialValue'></span> até <span edit-in-place='node.endValue'></span> incrementando em <span edit-in-place='node.increment'></span> faça <button class="btn btn-xs btn-warning" ng-click="changeForType(node)"><i class="fa fa-angle-double-left"></i></button></span>
  24. <button class="btn btn-danger btn-sm btn-delete" ng-click="removeItem(node.parent, node)"><i class="fa fa-minus"></i></button>
  25. <span ng-show="node.isChildrenVisible">
  26. <span ng-include="'nodes.html'"></span>
  27. <span ng-include="'partials/elements/btns.html'"></span>
  28. </span>
  29. </div>