summaryrefslogtreecommitdiffstats
path: root/install/ui/search.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-04-11 14:49:36 -0400
committerAdam Young <ayoung@redhat.com>2011-04-26 16:49:23 -0400
commit1b12a282782173ce55e6bd7e1773a3b28686d81a (patch)
treec2ae570d16b375d92995fc77a187c77d951775da /install/ui/search.js
parent6f7984a532057fa173b6a645e5eaf525066edd1a (diff)
downloadfreeipa-1b12a282782173ce55e6bd7e1773a3b28686d81a.tar.gz
freeipa-1b12a282782173ce55e6bd7e1773a3b28686d81a.tar.xz
freeipa-1b12a282782173ce55e6bd7e1773a3b28686d81a.zip
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.
Diffstat (limited to 'install/ui/search.js')
-rw-r--r--install/ui/search.js57
1 files changed, 30 insertions, 27 deletions
diff --git a/install/ui/search.js b/install/ui/search.js
index 9a458bfcd..95847bf56 100644
--- a/install/ui/search.js
+++ b/install/ui/search.js
@@ -167,7 +167,7 @@ IPA.search_facet = function(spec) {
'click': function (value) {
return function() {
var state = IPA.tab_state(that.entity_name);
- state[that.entity_name + '-facet'] = 'details';
+ state[that.entity_name + '-facet'] = 'default';
state[that.entity_name + '-pkey'] = value;
$.bbq.pushState(state);
return false;
@@ -183,7 +183,7 @@ IPA.search_facet = function(spec) {
that.table = IPA.search_widget({
id: that.entity_name+'-search',
- name: 'search',
+ name: 'search',
label: IPA.metadata.objects[that.entity_name].label,
entity_name: that.entity_name,
search_all: that.search_all
@@ -211,13 +211,32 @@ IPA.search_facet = function(spec) {
};
that.table.init();
+
};
- that.create_action_panel = function(container) {
+ that.create_content = function(container) {
+
+ var span = $('<span/>', { 'name': 'search' }).appendTo(container);
+
+ that.table.create(span);
+ };
+
+ that.setup = function(container) {
+
+ that.facet_setup(container);
+
+ that.entity_header.title.empty();
+ that.entity_header.title.append(
+ $('<h3/>',{
+ text:that.entity.metadata.label
+ }));
+
+ that.entity_header.facet_tabs.css('visibility','hidden');
+ $('#back_to_search', that.entity_header.search_bar).
+ css('display','none');
- that.facet_create_action_panel(container);
- var buttons = $('.action-controls', container);
+ var buttons = that.entity_header.buttons;
$('<input/>', {
'type': 'button',
@@ -230,25 +249,14 @@ IPA.search_facet = function(spec) {
'name': 'add',
'value': IPA.messages.buttons.add
}).appendTo(buttons);
- };
-
- that.create_content = function(container) {
-
- var span = $('<span/>', { 'name': 'search' }).appendTo(container);
-
- that.table.create(span);
- };
-
- that.setup = function(container) {
- that.facet_setup(container);
var span = $('span[name=search]', that.container);
that.table.setup(span);
- var action_panel = that.get_action_panel();
+ var search_buttons = that.entity_header.buttons;
- var button = $('input[name=remove]', action_panel);
+ var button = $('input[name=remove]', search_buttons);
that.remove_button = IPA.action_button({
'label': IPA.messages.buttons.remove,
'icon': 'ui-icon-trash',
@@ -260,7 +268,7 @@ IPA.search_facet = function(spec) {
button.replaceWith(that.remove_button);
that.remove_button.addClass('input_link_disabled');
- button = $('input[name=add]', action_panel);
+ button = $('input[name=add]', search_buttons);
that.add_button = IPA.action_button({
'label': IPA.messages.buttons.add,
'icon': 'ui-icon-plus',
@@ -273,9 +281,8 @@ IPA.search_facet = function(spec) {
var values = that.table.get_selected_values();
- var action_panel = that.get_action_panel();
- var links = $('li.entity-facet', action_panel);
- var input = $('input[id=pkey]', action_panel);
+ var links = $('li', that.entity_header.tabs);
+ var input = $('input[id=pkey]', that.entity_header.buttons);
if (values.length == 1) {
links.removeClass('entity-facet-disabled');
@@ -354,10 +361,7 @@ IPA.search_facet = function(spec) {
function on_success(data, text_status, xhr) {
- var action_panel = that.get_action_panel();
- $('li.entity-facet', action_panel).
- addClass('entity-facet-disabled');
- $('input', action_panel).val(null);
+ $("input id=[pkey]", that.entity_header.buttons).val(null);
that.table.empty();
@@ -423,4 +427,3 @@ IPA.search_facet = function(spec) {
return that;
};
-