mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
action panel to top tabs
replacing the action panel with the Design for 2.1 Significantly cleaned up implementation of intra-entity navigation requires additional CSS work still need to integrate the search controls onto each page cleaning up interface between entity and facet simplified nested tabs logic Fixed role navigation select default tab from the search widget fixed unit tests and jsl keep tabs area allocated set default tab selected whenever the pkey changes. Removing styling that is changing positions of buttons. The logic for that was for action-panel, but does not translate to entity-header. change from metadata name to label for I18N set selected tab in entity_init. Default title for entities without search and pkeys associations in table now link. remove colon from title when not showing pkey added Managed by facet group. Removed entities that are, for some reason, invalid.
This commit is contained in:
@@ -41,11 +41,12 @@ IPA.nav = {
|
||||
},
|
||||
|
||||
create : function (nls, container, tabclass) {
|
||||
if (!container)
|
||||
if (!container){
|
||||
container = $('#navigation');
|
||||
if (!tabclass)
|
||||
}
|
||||
if (!tabclass){
|
||||
tabclass = 'tabs';
|
||||
|
||||
}
|
||||
IPA.nav.tabs_lists = nls;
|
||||
IPA.nav.nav_container = container;
|
||||
|
||||
@@ -71,13 +72,22 @@ IPA.nav = {
|
||||
var ul = $('<ul/>');
|
||||
container.append(ul);
|
||||
|
||||
for (var i = 0; i < nls.length; ++i) {
|
||||
for (var i = 0; i < nls.length; i += 1) {
|
||||
var tab = nls[i];
|
||||
if (tab.entity){
|
||||
tab.name = tab.entity;
|
||||
}
|
||||
|
||||
var label = tab.name;
|
||||
if (tab.entity) {
|
||||
var entity = IPA.get_entity(tab.entity);
|
||||
if (!entity){
|
||||
nls.splice(i,1);
|
||||
i -= 1;
|
||||
continue;
|
||||
}
|
||||
label = entity.label;
|
||||
tab.entity = entity;
|
||||
}
|
||||
if (tab.label){
|
||||
label = tab.label;
|
||||
@@ -93,7 +103,7 @@ IPA.nav = {
|
||||
div.addClass('entity-container');
|
||||
}
|
||||
|
||||
if (tab.children && depth === 1) {
|
||||
if (tab.children) {
|
||||
IPA.nav.generate_tabs(tab.children, div, tabclass, depth +1 );
|
||||
}
|
||||
}
|
||||
@@ -127,20 +137,42 @@ IPA.nav = {
|
||||
var tab = nls[index];
|
||||
var container2 = $('#' + tab.name);
|
||||
|
||||
if (tab.children && depth === 1 ) {
|
||||
if (tab.children) {
|
||||
IPA.nav._update_tabs(tab.children, container2,depth+1);
|
||||
|
||||
} else if (tab.entity) {
|
||||
var entity_name = tab.entity;
|
||||
|
||||
var nested_entity = IPA.nav.get_state(entity_name+'-entity');
|
||||
|
||||
if (nested_entity){
|
||||
entity_name = nested_entity;
|
||||
}
|
||||
|
||||
var entity = IPA.get_entity(entity_name);
|
||||
entity.setup(container2);
|
||||
tab.entity.setup(container2);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
IPA.tab_state = function(entity_name,tab){
|
||||
var state;
|
||||
var i;
|
||||
var children;
|
||||
var tab_name;
|
||||
|
||||
if (!tab){
|
||||
children = IPA.tab_set;
|
||||
tab_name = 'navigation';
|
||||
}else if (tab.children){
|
||||
children = tab.children;
|
||||
tab_name = tab.name;
|
||||
}else if (tab.entity){
|
||||
if (tab.entity.name === entity_name){
|
||||
state = {};
|
||||
state[entity_name] = 0;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
for (i = 0; i < children.length; i +=1){
|
||||
state = IPA.tab_state(entity_name,children[i]);
|
||||
if (state){
|
||||
state[tab_name] = i;
|
||||
return state;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user