On 09/17/2010 10:36 AM, Adam Young wrote:
css tabs and facets
 includes Makfile changes to get images to deploy


Note that the Makefile changes are undone by a later patch.

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

>From 8eebec8ef81d203e39bb4d42b3557320b4595827 Mon Sep 17 00:00:00 2001
From: Adam Young <ayo...@redhat.com>
Date: Thu, 16 Sep 2010 15:13:48 -0400
Subject: [PATCH 29/33] css tabs and facets
 includes Makfile changes to get images to deploy

---
 install/static/Makefile.am        |    4 ++
 install/static/entity.js          |   12 ++++---
 install/static/images/Makefile.am |   28 ++++++++++++++
 install/static/ipa.css            |   71 +++++++++++++++++++++++++------------
 install/static/navigation.js      |    7 ++--
 5 files changed, 91 insertions(+), 31 deletions(-)
 create mode 100644 install/static/images/Makefile.am

diff --git a/install/static/Makefile.am b/install/static/Makefile.am
index 884c8bf..748ccf1 100644
--- a/install/static/Makefile.am
+++ b/install/static/Makefile.am
@@ -1,5 +1,9 @@
 NULL =
 
+SUBDIRS =                       	\
+	images				\
+	$(NULL)
+
 appdir = $(IPA_DATA_DIR)/static
 app_DATA =                              \
 	add.js				\
diff --git a/install/static/entity.js b/install/static/entity.js
index ea7292e..7aec565 100644
--- a/install/static/entity.js
+++ b/install/static/entity.js
@@ -131,17 +131,19 @@ function ipa_entity_generate_views(obj_name, container)
 
     var ul = $('<ul></ul>', {'class': 'entity-views'});
 
+    //TODO replace the plus image with the correct image for each facet
     ul.append($('<li></li>', {
-        text: 'Back to Search',
         title: 'search',
         click: switch_view
-    }));
+    })).append('<img src="plus-enabled.png"/>')
+        .append('Search')  ;
 
     ul.append($('<li></li>', {
         text: 'Details',
         title: 'details',
         click: switch_view
-    }));
+    })).append('<img src="plus-enabled.png"/>')
+        .append('Details')  ;
 
     var attribute_members = ipa_objs[obj_name].attribute_members;
     for (attr in attribute_members) {
@@ -151,10 +153,10 @@ function ipa_entity_generate_views(obj_name, container)
             var label = ipa_objs[m].label;
 
             ul.append($('<li></li>', {
-                text: label,
                 title: m,
                 click: switch_view
-            }));
+            })).append('<img src="plus-enabled.png"/>')
+                .append(label);
         }
     }
 
diff --git a/install/static/images/Makefile.am b/install/static/images/Makefile.am
new file mode 100644
index 0000000..cc122a4
--- /dev/null
+++ b/install/static/images/Makefile.am
@@ -0,0 +1,28 @@
+NULL =
+
+appdir = $(IPA_DATA_DIR)/static
+app_DATA =                                       \
+        ui-bg_flat_65_ffffff_40x100.png          \
+        ui-bg_glass_40_111111_1x400.png          \
+        ui-bg_glass_55_1c1c1c_1x400.png          \
+        ui-bg_highlight-hard_100_f9f9f9_1x100.png\
+        ui-bg_highlight-hard_40_aaaaaa_1x100.png \
+        ui-bg_highlight-soft_50_aaaaaa_1x100.png \
+        ui-bg_inset-hard_45_cd0a0a_1x100.png     \
+        ui-bg_inset-hard_55_ffeb80_1x100.png     \
+        ui-bg_loop_8_333333_21x21.png            \
+        ui-icons_222222_256x240.png              \
+        ui-icons_4ca300_256x240.png              \
+        ui-icons_bbbbbb_256x240.png              \
+        ui-icons_ededed_256x240.png              \
+        ui-icons_ffcf29_256x240.png              \
+        ui-icons_ffffff_256x240.png              \
+	$(NULL)
+
+EXTRA_DIST =                            \
+        $(app_DATA)                     \
+        $(NULL)
+
+MAINTAINERCLEANFILES =                  \
+        *~                              \
+        Makefile.in
diff --git a/install/static/ipa.css b/install/static/ipa.css
index d3cb6fb..0c12fd3 100644
--- a/install/static/ipa.css
+++ b/install/static/ipa.css
@@ -8,8 +8,14 @@
 body {
     font-family: sans-serif;
     font-size: 14pt;
+    margin: 25px;
 }
 
+/*demo page css*/
+.demoHeaders { margin-top: 2em; }
+.input_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
+.input_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
+
 a {
     text-decoration: none;
     border: 0;
@@ -175,51 +181,61 @@ span.attrhint {
 
 /*Navigation */
 
-span.sub-nav-off > a:link, span.sub-nav-off >  a:visited{
-    color:white;
-}
 
-span.main-nav-off > a:link, span.main-nav-off >  a:visited{
-    color:white;
+.tabs1 .ui-tabs-nav{
+    padding: 0.1em;
+
 }
 
-#main-nav{
+.tabs1 .ui-tabs-nav {
     background-image: url(Mainnav-background.png);
-    font-size: 100%;
 }
 
-span.main-nav-on{
-    background-image: url(Mainnav-ontab.png);
+.tabs1 .ui-tabs-nav li > a:link, span.main-nav-off >  a:visited{
+    color:white;
 }
 
-span.main-nav-off{
-    background-image: url(Mainnav-offtab.png);
+.tabs1 .ui-tabs-nav li.ui-tabs-selected {
+    background-image: url(Mainnav-ontab.png);
 }
 
+.tabs1 .ui-tabs-panel { display: block; border-width: 0; padding: 0.1em 0.4em; background: none; }
 
-span.main-separator{
-    background: #333339;
-	padding:1px;
-}
 
-#sub-nav{
+.tabs2 .ui-tabs-nav {
     background-image: url(Subnav-background.png);
-    padding:5px;
+}
+
+.tabs2 .ui-tabs-nav li{
+    background-image: url(Subnav-offbutton.png);
+    padding:0px;
     color: white;
     font-size: 80%;
 }
 
-span.sub-nav-on{
+.tabs2 .ui-tabs-nav li.ui-tabs-selected{
     background-image: url(Subnav-onbutton.png);
-    margin: 10px;
+    padding:5px;
+    color: white;
+    font-size: 80%;
 }
 
-span.sub-nav-off{
-    background-image: url(Subnav-offbutton.png);
-    margin: 10px;
+
+span.sub-nav-off > a:link, span.sub-nav-off >  a:visited{
+    color:white;
+}
+
+span.main-nav-off > a:link, span.main-nav-off >  a:visited{
+    color:white;
+}
+
+span.main-separator{
+    background: #333339;
+    padding:1px;
 }
 
 
+
 /* Search  */
 
 .search-container{
@@ -259,4 +275,13 @@ span.sub-nav-off{
 
 .search-table tr:nth-child(odd){
     background-color:#FFF;
-}
\ No newline at end of file
+}
+
+.entity-views{
+    list-style-type:none;
+}
+
+.entity-views li {
+    display:inline;
+}
+
diff --git a/install/static/navigation.js b/install/static/navigation.js
index ec048d9..b3a6a68 100644
--- a/install/static/navigation.js
+++ b/install/static/navigation.js
@@ -25,16 +25,17 @@ function nav_create(nls, container, tabclass)
     if (!tabclass)
         tabclass = 'tabs';
 
-    nav_generate_tabs(nls, container, tabclass);
+    nav_generate_tabs(nls, container, tabclass, 1);
 
     var tabs = $('.' + tabclass);
     tabs.tabs({event: 'change'});
     tabs.find('ul.ui-tabs-nav a').click(_nav_tab_on_click);
 }
 
-function nav_generate_tabs(nls, container, tabclass)
+function nav_generate_tabs(nls, container, tabclass, depth)
 {
     container.addClass(tabclass);
+    container.addClass('tabs'+depth);
     container.prepend('<ul></ul>');
 
     var ul = container.children().first();
@@ -48,7 +49,7 @@ function nav_generate_tabs(nls, container, tabclass)
         if (typeof n[2] == 'function') {
             n[2](div);
         } else if (n[2].length) {
-            nav_generate_tabs(n[2], div, tabclass);
+            nav_generate_tabs(n[2], div, tabclass, depth +1 );
         }
     }
 }
-- 
1.7.1

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

Reply via email to