| 27 | |
| 28 | |
| 29 | var selectTab = function (internalName) { |
| 30 | var foundContent = null; |
| 31 | |
| 32 | tabcontent.children().each(function (index, value) { |
| 33 | if (value.id == 'target-' + internalName) { |
| 34 | foundContent = value |
| 35 | $(value).css("display", "block") |
| 36 | } |
| 37 | else |
| 38 | $(value).css("display", "none") |
| 39 | }) |
| 40 | tabtray.children().each(function (index, value) { |
| 41 | if (value.id == 'tab-' + internalName) { |
| 42 | $(value).addClass("tabdown") |
| 43 | |
| 44 | selectedTab = internalName |
| 45 | if (value.selectedCallbackHandler) { |
| 46 | console.log(" selected callback handler is '" + value.selectedCallbackHandler + "'") |
| 47 | var h = value.selectedCallbackHandler() |
| 48 | if (h) |
| 49 | $(foundContent).html(h) |
| 50 | } |
| 51 | } |
| 52 | else |
| 53 | $(value).removeClass("tabdown") |
| 54 | }) |
| 55 | |
| 56 | if (typeof cm !== 'undefined') { |
| 57 | cm.refresh() |
| 58 | } |
| 59 | |
| 60 | if (typeof updateAllBrackets !== 'undefined') { |
| 61 | updateAllBrackets() |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | var setTabContentTo = function(internalName, content) |
| 66 | { |