From 36c067844fafad482bfe5b59af67f49b2b77174e Mon Sep 17 00:00:00 2001
From: Adam Young <ayo...@redhat.com>
Date: Fri, 12 Nov 2010 15:23:58 -0500
Subject: [PATCH 82/83] more css cleanup
 remove quick links
 css very close to  specs

---
 install/static/entity.js       |   73 ++++++++-------------------------------
 install/static/group.js        |    3 +-
 install/static/host.js         |    3 +-
 install/static/hostgroup.js    |    3 +-
 install/static/ipa.css         |   53 +++++++++++++++++++++--------
 install/static/netgroup.js     |    3 +-
 install/static/policy.js       |   10 ++----
 install/static/serverconfig.js |    9 ++---
 install/static/service.js      |    7 ----
 install/static/user.js         |    1 -
 10 files changed, 63 insertions(+), 102 deletions(-)

diff --git a/install/static/entity.js b/install/static/entity.js
index 4ae979e7502c699394f1ddf075bb1b79793c60e3..94eab45b6836f6a73fb85e3dd9dd6e6732924ef6 100644
--- a/install/static/entity.js
+++ b/install/static/entity.js
@@ -318,18 +318,15 @@ function ipa_entity_setup(container, unspecified) {
     facet.load(container, unspecified);
 }
 
-function ipa_facet_setup_views(container) {
 
-    var facet = this;
-
-    var div = $('<div/>',
-                {
-                    "class":"action-panel",
-                    html: $('<h3>Actions</h3>'),
-                }).appendTo(container);
+function action_panel(entity_name){
+    var div = $('<div/>', {
+        "class":"action-panel",
+        html: $('<h3>Actions</h3>'),
+    });
     var ul = $('<ul/>', {'class': 'action'}).appendTo(div);
 
-    var entity = IPA.get_entity(facet.entity_name);
+    var entity = IPA.get_entity(entity_name);
 
     for (var i=0; i<entity.facets.length; i++) {
         var other_facet = entity.facets[i];
@@ -346,12 +343,12 @@ function ipa_facet_setup_views(container) {
                     return function() {
                         IPA.show_page(entity_name, facet_name);
                     };
-                }(facet.entity_name, facet_name)
+                }(entity_name, facet_name)
             }));
 
         } else { // For now empty label indicates an association facet
 
-            var attribute_members = IPA.metadata[facet.entity_name].attribute_members;
+            var attribute_members = IPA.metadata[entity_name].attribute_members;
             for (var attribute_member in attribute_members) {
                 var other_entities = attribute_members[attribute_member];
                 for (var j = 0; j < other_entities.length; j++) {
@@ -365,60 +362,20 @@ function ipa_facet_setup_views(container) {
                             return function() {
                                 IPA.show_page(entity_name, facet_name, other_entity);
                             };
-                        }(facet.entity_name, facet_name, other_entity)
+                        }(entity_name, facet_name, other_entity)
                     }));
                 }
             }
         }
     }
+    return div;
 }
 
-function ipa_entity_quick_links(container, name, value, entry_attrs) {
 
-    var obj_name = container.closest('.entity-container').attr('title');
-    var pkey = IPA.metadata[obj_name].primary_key;
-    var pkey_value = entry_attrs[pkey];
+function ipa_facet_setup_views(container) {
 
-    var span = $('span[name="'+name+'"]', container);
-    span.empty();
-
-    $("<a/>", {
-        href: '#details',
-        title: 'Details',
-        text: 'Details',
-        click: function() {
-            var state = {};
-            state[obj_name+'-facet'] = 'details';
-            state[obj_name+'-pkey'] = pkey_value;
-            nav_push_state(state);
-            return false;
-        }
-    }).appendTo(span);
-
-    var attribute_members = IPA.metadata[obj_name].attribute_members;
-    for (attr_name in attribute_members) {
-        var objs = attribute_members[attr_name];
-        for (var i = 0; i < objs.length; ++i) {
-            var m = objs[i];
-            var label = IPA.metadata[m].label;
-
-            span.append(' | ');
-
-            $("<a/>", {
-                href: '#'+m,
-                title: label,
-                text: label,
-                click: function(m) {
-                    return function() {
-                        var state = {};
-                        state[obj_name+'-facet'] = 'associate';
-                        state[obj_name+'-enroll'] = m;
-                        state[obj_name+'-pkey'] = pkey_value;
-                        nav_push_state(state);
-                        return false;
-                    }
-                }(m)
-            }).appendTo(span);
-        }
-    }
+    var facet = this;
+    var entity_name = facet.entity_name;
+    action_panel(entity_name).appendTo(container);
 }
+
diff --git a/install/static/group.js b/install/static/group.js
index 97f498ae27372fa046d66bae372cc5de0fa0e02d..45aa83a58d34d5c7e2b7fc1c618b3f71410e74d4 100644
--- a/install/static/group.js
+++ b/install/static/group.js
@@ -69,8 +69,7 @@ function ipa_group_add_dialog(spec) {
 ipa_entity_set_search_definition('group', [
     ['cn', 'Name', null],
     ['gidnumber', 'GID', null],
-    ['description', 'Description', null],
-    ['quick_links', 'Quick Links', ipa_entity_quick_links]
+    ['description', 'Description', null]
 ]);
 
 ipa_entity_set_details_definition('group',[
diff --git a/install/static/host.js b/install/static/host.js
index 65c2b571a4e04852c9db02f9bb626a1e5dc03cef..bd9deda389e7e3ff915771e87d98ec63fc007163 100644
--- a/install/static/host.js
+++ b/install/static/host.js
@@ -24,8 +24,7 @@ ipa_entity_set_search_definition('host', [
     ['fqdn', 'Name', null],
     ['description', 'Description', null],
     ['enrolled', 'Enrolled?', null],
-    ['manages', 'Manages?', null],
-    ['quick_links', 'Quick Links', ipa_entity_quick_links]
+    ['manages', 'Manages?', null]
 ]);
 
 ipa_entity_set_add_definition('host', [
diff --git a/install/static/hostgroup.js b/install/static/hostgroup.js
index 02418bf05438857f0b44a322dc76d56f17003699..eb7f8b5c0f08c6c2dc9a1183e0c7f02bfade9e16 100644
--- a/install/static/hostgroup.js
+++ b/install/static/hostgroup.js
@@ -22,8 +22,7 @@
 
 ipa_entity_set_search_definition('hostgroup', [
     ['cn', 'Name', null],
-    ['description', 'Description', null],
-    ['quick_links', 'Quick Links', ipa_entity_quick_links]
+    ['description', 'Description', null]
 ]);
 
 ipa_entity_set_add_definition('hostgroup', [
diff --git a/install/static/ipa.css b/install/static/ipa.css
index ee4c85a74b3e4643b95c33c969c13715f2fbb443..6fac7ae73b2ae6869b7391e1056e5104f3adfa8e 100644
--- a/install/static/ipa.css
+++ b/install/static/ipa.css
@@ -6,7 +6,10 @@
 */
 
 
-body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;}
+body{
+    font: 62.5% "Trebuchet MS", sans-serif; margin: 5px;
+}
+
 .demoHeaders { margin-top: 2em; }
 
 
@@ -20,7 +23,8 @@ div.header {
     background-image: url(header_background.png);
     background: -moz-linear-gradient(top, #65646e, #1f1f1f);
     background-color: #1f1f1f;
-    height: 70px;
+    height: 25px;
+    width: 100%;
 }
 
 div.header a {
@@ -37,13 +41,14 @@ div.header a:visited {
     color: white;
 }
 
-div.header div.header-logo {
-    float: left;
-    padding: 10px 10px 0 10px;
+div.header span.header-logo {
+#    float: left;
+    padding-left: 100px;
 }
 
-div.header div.header-logo img {
+div.header span.header-logo a img {
     border: 0;
+    height: 25px;
 }
 
 div.header span.header-loggedinas {
@@ -56,6 +61,8 @@ div.header span.header-loggedinas {
 /* ---- Navigation ---- */
 div.tabs {
     overflow: auto;
+    width: 100%;
+    height: 100%;
 }
 
 
@@ -178,15 +185,23 @@ span.attrhint {
     position: absolute;
 }
 
+.ui-tabs-nav{
+}
+
 /*Navigation */
 .tabs1 .ui-tabs-nav{
-    margin: 0; padding: 2.9em .2em 0;
+    padding-left: 50px;
+    margin: 0;
     background-image: url(Mainnav-background.png);
-
 }
 
 
-.ui-tabs .ui-tabs-nav li { height: 30px;  margin: 0 0 1px 0;}
+.ui-tabs .ui-tabs-nav li {
+    height: 30px;
+    margin: 0 0 0 0;
+    padding: 0 0 0 0;
+    border-width: 0;
+ }
 
 
 .tabs1 .ui-tabs-nav li a{
@@ -205,13 +220,17 @@ span.attrhint {
     color: lightgreen;
 }
 
-.tabs1 .ui-tabs-panel { display: block; border-width: 0; padding: 0.1em 0.4em; background: none; }
+.tabs1 .ui-tabs-panel {
+    display: block; border-width: 0;
+    padding: 0 0;
+    background: none;
+}
+
 
 
 .tabs2 .ui-tabs-nav {
     background-image: url(Subnav-background.png);
-    margin: 0; padding: .1em .2em 0;
-
+    margin: 0;
 }
 
 
@@ -259,7 +278,8 @@ span.main-separator{
 .entity-container{
     position: relative;
     width: 80%;
-    height: 1000px;
+    height: 100%;
+    min-height: 200 px;
     margin: 10px;
     padding: 10px;
     background: #e8e8e8;
@@ -267,15 +287,18 @@ span.main-separator{
 
 .action-panel {
     position:relative;
-    top:50px;
+    top:30px;
+    left: -20px;
     border-width: thin;
     border-style: solid;
     border-color: black;
     float: left;
+    margin: 10px;
 }
 
 .action-panel h3{
-   border-width: thin;
+    margin: 0;
+    border-width: thin;
     border-style: solid;
     border-color: black;
     background: #e8e8e8;
diff --git a/install/static/netgroup.js b/install/static/netgroup.js
index 5bedc93578d418237b84aa4d115a3a84937951e4..0341ed78a6d3200119f6d7bb25ad35bc92ec3dcd 100644
--- a/install/static/netgroup.js
+++ b/install/static/netgroup.js
@@ -22,8 +22,7 @@
 
 ipa_entity_set_search_definition('netgroup', [
     ['cn', 'Name', null],
-    ['description', 'Description', null],
-    ['quick_links', 'Quick Links', ipa_entity_quick_links]
+    ['description', 'Description', null]
 ]);
 
 ipa_entity_set_add_definition('netgroup', [
diff --git a/install/static/policy.js b/install/static/policy.js
index 89fe16a707fe4ae6a2edd9ff36df5596a99f2e16..26af6aa18c8176251ff95ed56fcf64a5d5df1ed0 100644
--- a/install/static/policy.js
+++ b/install/static/policy.js
@@ -22,8 +22,7 @@
 
 /* DNS */
 ipa_entity_set_search_definition('dns', [
-    ['idnsname', 'Zone Name', null],
-    ['quick_links', 'Quick Links', ipa_entity_quick_links]
+    ['idnsname', 'Zone Name', null]
 ]);
 
 
@@ -459,9 +458,7 @@ function ipa_records_facet(spec){
 /**Automount*/
 
 ipa_entity_set_search_definition('automountlocation', [
-    ['cn', 'Name', null],
-    ['quick_links', 'Quick Links', ipa_entity_quick_links]
-
+    ['cn', 'Name', null]
 ]);
 
 ipa_entity_set_add_definition('automountlocation', [
@@ -482,8 +479,7 @@ ipa_entity_set_association_definition('automountlocation', {
 /**pwpolicy*/
 
 ipa_entity_set_search_definition('pwpolicy', [
-    ['cn', 'Name', null],
-    ['quick_links', 'Quick Links', ipa_entity_quick_links]
+    ['cn', 'Name', null]
 
 ]);
 
diff --git a/install/static/serverconfig.js b/install/static/serverconfig.js
index 327616aa49fdaf8cfd288379bfc3f74f3c9dc4de..63c77d068a8f6bd1f3c25065d37b08b6204bd6b8 100644
--- a/install/static/serverconfig.js
+++ b/install/static/serverconfig.js
@@ -25,8 +25,7 @@
 
 /* ACI */
 ipa_entity_set_search_definition('aci', [
-    ['cn', 'ACI name', null],
-    ['quick_links', 'Quick Links', ipa_entity_quick_links]
+    ['cn', 'ACI name', null]
 ]);
 
 ipa_entity_set_add_definition('aci', [
@@ -48,8 +47,7 @@ ipa_entity_set_details_definition('aci', [
 
 ipa_entity_set_search_definition('taskgroup', [
     ['cn', 'Role-group name', null],
-    ['description', 'Description', null],
-    ['quick_links', 'Quick Links', ipa_entity_quick_links]
+    ['description', 'Description', null]
 ]);
 
 ipa_entity_set_add_definition('taskgroup', [
@@ -80,8 +78,7 @@ ipa_entity_set_association_definition('rolegroup', {
 
 ipa_entity_set_search_definition('rolegroup', [
     ['cn', 'Role-group name', null],
-    ['description', 'Description', null],
-    ['quick_links', 'Quick Links', ipa_entity_quick_links]
+    ['description', 'Description', null]
 ]);
 
 ipa_entity_set_add_definition('rolegroup', [
diff --git a/install/static/service.js b/install/static/service.js
index f4179cb8a75ab362c30dbd030542d6cbb4b7f7d4..4d1c94b966ab577dbe063823c6849b6f3f283494 100644
--- a/install/static/service.js
+++ b/install/static/service.js
@@ -160,13 +160,6 @@ function ipa_service_search_facet(spec) {
     that.init = function() {
 
         this.create_column({name:'krbprincipalname', label:'Principal'});
-
-        this.create_column({
-            name: 'quick_links',
-            label: 'Quick Links',
-            setup: ipa_entity_quick_links
-        });
-
         that.super_init();
     };
 
diff --git a/install/static/user.js b/install/static/user.js
index 035bf9e74e60d4157cf56e2ad5550fd184573321..74c003e58d937588cecfff3976eae2666fd21bf2 100644
--- a/install/static/user.js
+++ b/install/static/user.js
@@ -27,7 +27,6 @@ ipa_entity_set_search_definition('user', [
     ['mail', 'EMAIL', null],
     ['telephonenumber', 'Phone', null],
     ['title', 'Job Title', null],
-    ['quick_links', 'Quick Links', ipa_entity_quick_links]
 ]);
 
 ipa_entity_set_add_definition('user', [
-- 
1.7.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to