منتدى استراحات زايد

منتدى استراحات زايد (http://vb.ma7room.com/index.php)
-   منتدى أخبار المواقع والمنتديات العربية والأجنبية (http://vb.ma7room.com/forumdisplay.php?f=183)
-   -   removing mini admin menu from your layout (http://vb.ma7room.com/showthread.php?t=462053)

محروم.كوم 07-22-2010 11:10 PM

removing mini admin menu from your layout
 
Mini admin was one of the bigger advancements of phpws. Allowing you to create and edit content without going to the control panel is a huge time saver. Out of the box, mini admin requires a 2 column layout. I've made a change based on the homepage of phpwebsite that keeps the menu fixed at the bottom of the screen, applies jquery to it ala superfish and removes it from the flow of your layout. Also, no scrolling back up to find what you need in the mini admin. it's always on the screen.

I altered my templates/miniadmin/mini_admin.tpl file, but you could create a new template. remember if you revert, it will overwrite your changes.. Here is the new mini_admin.tpl:
Code:


This turns mini admin into a true bulleted list instead of a bulleted list for each module under the module name. so one list instead of several.

Now add the following CSS, which is at the moment very bland. It's the positioning that is important.
Code:
#miniadmin {
position: fixed;
bottom: 0; left: 0;
z-index: 9999; /*--Keeps the panel on top of all other elements--*/
background: #758279;
border: 1px solid #c3c3c3;
border-bottom: none;
width: 90%;
margin: 0 3%;
}

#miniadmin ul {
padding: 0;
margin:0;
list-style-type:none;
}
#miniadmin ul ul {
width:125px;
}
/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
#miniadmin li {
float:left;
width:125px;
position:relative;
}
/* style the links for the top level */
#miniadmin a, #miniadmin a:visited {
display:block;
font-size:11px;
text-decoration:none;
color:#fff;
width:139px;
height:30px;
border-left:1px solid #fff;
/* border-width:1px 1px 0 0; */
background:#758279;
padding-left:10px;
line-height:30px;
}
/* a hack so that IE5.5 faulty box model is corrected */
* html #miniadmin a, * html #miniadmin a:visited {
width:125px;
w\idth:139px;
}

/* style the second level background */
#miniadmin ul ul a.drop, #miniadmin ul ul a.drop:visited {
background:#949e7c;
}
/* style the second level hover */
#miniadmin ul ul a.drop:hover {
background:#c9ba65;
}
#miniadmin ul ul :hover > a.drop {
background:#c9ba65;
}
/* style the third level background */
#miniadmin ul ul ul a, #miniadmin ul ul ul a:visited {
background:#e2dfa8;
}
/* style the third level hover */
#miniadmin ul ul ul a:hover{
background:#b2ab9b;
}
#miniadmin ul ul ul :hover > a {
background:#b2ab9b;
}

/* style the table so that it takes no part in the layout - required for IE to work */
#miniadmin table {border-collapse:collapse; border:0; position:absolute; left:0; bottom:-1px;}

/* hide the sub levels and give them a positon absolute so that they take up no room */
#miniadmin ul ul {
visibility:hidden;
position:absolute;
bottom:30px;
left:0;
width:125px;
}
* html #miniadmin ul ul {
bottom:30px;
}
/* position the third level flyout menu */
#miniadmin ul ul ul{
left:150px;
bottom:0;
width:150px;
}
/* position the third level flyout menu for a left flyout */
#miniadmin ul ul ul.left {
left:-150px;
}


/* style the second level links */
#miniadmin ul ul a, #miniadmin ul ul a:visited {
background:#d4d8bd;
color:#000;
height:auto;
line-height:1.5em;
padding:5px 10px;
width:129px
/* yet another hack for IE5.5 */
}
* html #miniadmin ul ul a{
width:150px;
w\idth:129px;
}


/* style the top level hover */
#miniadmin a:hover, #miniadmin ul ul a:hover{
color:#fff;
background:#949e7c;
}
#miniadmin :hover > a, #miniadmin ul ul :hover > a {
color:#fff;
background:#949e7c;
}

/* make the second level visible when hover on first level list OR link */
#miniadmin ul li:hover ul,
#miniadmin ul a:hover ul{
visibility:visible;
height:auto;
}
/* keep the third level hidden when you hover on first level list OR link */
#miniadmin ul :hover ul ul{
display:none;
}
/* keep the fourth level hidden when you hover on second level list OR link */
#miniadmin ul :hover ul :hover ul ul{
display:none;
}
/* make the third level visible when you hover over second level list OR link */
#miniadmin ul :hover ul :hover ul{
display:block;
bottom:0;
}
/* make the fourth level visible when you hover over third level list OR link */
#miniadmin ul :hover ul :hover ul :hover ul {
display:block;
bottom:0;
}
You can play with the widths, heights and borders until you get the look you want. Next I added this to javascript/jquery/head.js...

Code:



$(document).ready(function(){
$("ul.miniadmin").superfish();
});
Superfish goodness. and yeah... this implies you have superfish menus. I'm not entirely sure it would work without it. probably won't as it is missing some superfish css. but all that does is make the menus fade on the screen. as a pure css solution, it will work without that.

So there you have it. no more designing around an element your visitors will never see.


الساعة الآن 08:45 AM

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By Almuhajir


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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227