Contains the Concourse pipeline definition for building a line-server container
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.7 KiB

  1. var navlist = document.getElementById("info").getElementsByClassName("right")[0];
  2. init();
  3. function init() {
  4. var editA = document.createElement('a');
  5. editA.setAttribute("href", "#");
  6. editA.setAttribute("onclick", "edit();return false;");
  7. editA.innerHTML = "edit";
  8. var separator = document.createTextNode(" | ");
  9. navlist.insertBefore(editA, navlist.firstChild);
  10. navlist.insertBefore(separator, navlist.children[1]);
  11. }
  12. function edit() {
  13. navlist.remove();
  14. document.getElementById("filename").remove();
  15. document.getElementById("foarm").style.display = "block";
  16. var normalcontent = document.getElementById("normal-content");
  17. normalcontent.removeChild(document.getElementById("normal-code"));
  18. var editordiv = document.getElementById("editor");
  19. editordiv.style.display = "block";
  20. var editor = ace.edit("editor");
  21. editor.commands.bindKeys({"ctrl-l":null, 'Command-L': null, 'ctrl-R': null, 'Command-R': null, 'Ctrl-Shift-R': null, 'Command-Shift-R': null});
  22. editor.commands.addCommand({name: ' ', bindKey: {win: 'Ctrl-S', mac: 'Command-S'}, exec: function() { paste(); } });
  23. }
  24. function paste() {
  25. document.getElementById("newcontent").value = editor.getSession().getValue();
  26. document.forms["reply"].submit();
  27. }
  28. function wrap() {
  29. if (document.getElementById("wordwrap").checked) {
  30. document.getElementById("codeb").style.wordWrap = "break-word";
  31. document.getElementById("codeb").style.whiteSpace = "pre-wrap";
  32. }
  33. else {
  34. document.getElementById("codeb").style.wordWrap = "normal";
  35. document.getElementById("codeb").style.whiteSpace = "pre";
  36. }
  37. }