MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / selectTab

Function selectTab

lib/web/tabs.js:29–63  ·  view source on GitHub ↗
(internalName)

Source from the content-addressed store, hash-verified

27
28
29var 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
65var setTabContentTo = function(internalName, content)
66{

Callers 2

boxbrowser.jsFile · 0.85
ensureTabCalledFunction · 0.85

Calls 6

updateAllBracketsFunction · 0.85
childrenMethod · 0.80
logMethod · 0.80
refreshMethod · 0.80
$Function · 0.70
htmlMethod · 0.45

Tested by

no test coverage detected