-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtabs.js
35 lines (30 loc) · 887 Bytes
/
tabs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function addTab(tab_name) {
let sys_tab_name = generateID(tab_name, "tab");
var tabObj = {
"role": "presentation",
"class": "",
"navtab": [
{
"role": "tab",
"data_toggle": "tab",
"title": tab_name,
"location": sys_tab_name
}
],
"panel": [{
"role": "tabpanel",
"class": "tab-pane",
"subpanel": []
}
]
};
codePreview.tabs.push(tabObj);
launchModal("Se ha agregado la pestana correctamente");
};
function getAllTabs(){
let allTabs= [];
for (let tab of codePreview.tabs){
allTabs.push({"name":tab.navtab[0].title ,"location":tab.navtab[0].location});
}
return allTabs;
}