Commit d7e604f3a58da093db8043e21cdbbea1315e7d9f
1 parent
de3777e9
Default to using text menus rather than images, to ease translation.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2949 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
189 additions
and
10 deletions
lib/visualpatterns/NavBar.inc
| @@ -62,6 +62,15 @@ class NavBar { | @@ -62,6 +62,15 @@ class NavBar { | ||
| 62 | $this->prefs = "$default->graphicsUrl/prefs/norm.gif"; | 62 | $this->prefs = "$default->graphicsUrl/prefs/norm.gif"; |
| 63 | $this->help = "$default->graphicsUrl/help/norm.gif"; | 63 | $this->help = "$default->graphicsUrl/help/norm.gif"; |
| 64 | $this->logout = "$default->graphicsUrl/logout/norm.gif"; | 64 | $this->logout = "$default->graphicsUrl/logout/norm.gif"; |
| 65 | + | ||
| 66 | + $this->mdocsClass = "dash"; | ||
| 67 | + $this->homeClass = "dash"; | ||
| 68 | + $this->subscriptionsClass = "dash"; | ||
| 69 | + $this->asearchClass = "dash"; | ||
| 70 | + $this->adminClass = "dash"; | ||
| 71 | + $this->prefsClass = "dash"; | ||
| 72 | + $this->helpClass = "dash"; | ||
| 73 | + $this->logoutClass = "dash"; | ||
| 65 | } | 74 | } |
| 66 | 75 | ||
| 67 | /** | 76 | /** |
| @@ -86,45 +95,54 @@ class NavBar { | @@ -86,45 +95,54 @@ class NavBar { | ||
| 86 | if($section == "General") { | 95 | if($section == "General") { |
| 87 | $this->home = "$default->graphicsUrl/home/over.gif"; | 96 | $this->home = "$default->graphicsUrl/home/over.gif"; |
| 88 | $this->nwColourBar = "$default->graphicsUrl/home/def.gif"; | 97 | $this->nwColourBar = "$default->graphicsUrl/home/def.gif"; |
| 98 | + $this->homeClass = "dashactive"; | ||
| 89 | } | 99 | } |
| 90 | 100 | ||
| 91 | if(($section == "Manage Documents") || ($section == "Manage Categories") || ($section == "Manage Document Types")) { | 101 | if(($section == "Manage Documents") || ($section == "Manage Categories") || ($section == "Manage Document Types")) { |
| 92 | $this->mdocs = "$default->graphicsUrl/mdocs/over.gif"; | 102 | $this->mdocs = "$default->graphicsUrl/mdocs/over.gif"; |
| 93 | $this->nwColourBar = "$default->graphicsUrl/mdocs/def.gif"; | 103 | $this->nwColourBar = "$default->graphicsUrl/mdocs/def.gif"; |
| 104 | + $this->mdocsClass = "dashactive"; | ||
| 94 | } | 105 | } |
| 95 | if($section == "Discussion Threads" ) { | 106 | if($section == "Discussion Threads" ) { |
| 96 | $this->mdocs = "$default->graphicsUrl/mdocs/over.gif"; | 107 | $this->mdocs = "$default->graphicsUrl/mdocs/over.gif"; |
| 97 | $this->nwColourBar = "$default->graphicsUrl/mdocs/def.gif"; | 108 | $this->nwColourBar = "$default->graphicsUrl/mdocs/def.gif"; |
| 109 | + $this->mdocsClass = "dashactive"; | ||
| 98 | } | 110 | } |
| 99 | 111 | ||
| 100 | if($section == "Subscriptions") { | 112 | if($section == "Subscriptions") { |
| 101 | $this->subscriptions = "$default->graphicsUrl/subscriptions/over.gif"; | 113 | $this->subscriptions = "$default->graphicsUrl/subscriptions/over.gif"; |
| 102 | $this->nwColourBar = "$default->graphicsUrl/subscriptions/def.gif"; | 114 | $this->nwColourBar = "$default->graphicsUrl/subscriptions/def.gif"; |
| 115 | + $this->subscriptionsClass = "dashactive"; | ||
| 103 | } | 116 | } |
| 104 | 117 | ||
| 105 | if(($section == "Standard Search") || ($section == "Advanced Search")) { | 118 | if(($section == "Standard Search") || ($section == "Advanced Search")) { |
| 106 | $this->asearch = "$default->graphicsUrl/asearch/over.gif"; | 119 | $this->asearch = "$default->graphicsUrl/asearch/over.gif"; |
| 107 | $this->nwColourBar = "$default->graphicsUrl/asearch/def.gif"; | 120 | $this->nwColourBar = "$default->graphicsUrl/asearch/def.gif"; |
| 121 | + $this->asearchClass = "dashactive"; | ||
| 108 | } | 122 | } |
| 109 | 123 | ||
| 110 | if(substr($section, -14) == "Administration") { | 124 | if(substr($section, -14) == "Administration") { |
| 111 | $this->admin = "$default->graphicsUrl/admin/over.gif"; | 125 | $this->admin = "$default->graphicsUrl/admin/over.gif"; |
| 112 | $this->nwColourBar = "$default->graphicsUrl/admin/def.gif"; | 126 | $this->nwColourBar = "$default->graphicsUrl/admin/def.gif"; |
| 127 | + $this->adminClass = "dashactive"; | ||
| 113 | } | 128 | } |
| 114 | 129 | ||
| 115 | if($section == "Preferences") { | 130 | if($section == "Preferences") { |
| 116 | $this->prefs = "$default->graphicsUrl/prefs/over.gif"; | 131 | $this->prefs = "$default->graphicsUrl/prefs/over.gif"; |
| 117 | $this->nwColourBar = "$default->graphicsUrl/prefs/def.gif"; | 132 | $this->nwColourBar = "$default->graphicsUrl/prefs/def.gif"; |
| 133 | + $this->prefsClass = "dashactive"; | ||
| 118 | } | 134 | } |
| 119 | 135 | ||
| 120 | if($section == "Help") { | 136 | if($section == "Help") { |
| 121 | $this->help = "$default->graphicsUrl/help/over.gif"; | 137 | $this->help = "$default->graphicsUrl/help/over.gif"; |
| 122 | $this->nwColourBar = "$default->graphicsUrl/help/def.gif"; | 138 | $this->nwColourBar = "$default->graphicsUrl/help/def.gif"; |
| 139 | + $this->helpClass = "dashactive"; | ||
| 123 | } | 140 | } |
| 124 | 141 | ||
| 125 | if($section == "Logout") { | 142 | if($section == "Logout") { |
| 126 | $this->logout = "$default->graphicsUrl/logout/over.gif"; | 143 | $this->logout = "$default->graphicsUrl/logout/over.gif"; |
| 127 | $this->nwColourBar = "$default->graphicsUrl/logout/def.gif"; | 144 | $this->nwColourBar = "$default->graphicsUrl/logout/def.gif"; |
| 145 | + $this->logoutClass = "dashactive"; | ||
| 128 | } | 146 | } |
| 129 | } | 147 | } |
| 130 | 148 | ||
| @@ -168,24 +186,67 @@ class NavBar { | @@ -168,24 +186,67 @@ class NavBar { | ||
| 168 | $this->help, | 186 | $this->help, |
| 169 | $this->logout); | 187 | $this->logout); |
| 170 | 188 | ||
| 189 | + $aTopMenuClasses = array($this->homeClass, | ||
| 190 | + $this->mdocsClass, | ||
| 191 | + $this->subscriptionsClass, | ||
| 192 | + $this->asearchClass, | ||
| 193 | + $this->adminClass, | ||
| 194 | + $this->prefsClass, | ||
| 195 | + $this->helpClass, | ||
| 196 | + $this->logoutClass); | ||
| 197 | + | ||
| 198 | + $aTopMenuWords = array( | ||
| 199 | + _("Dashboard"), | ||
| 200 | + _("Browse Collections"), | ||
| 201 | + _("Subscriptions"), | ||
| 202 | + _("Advanced Search"), | ||
| 203 | + _("Admin"), | ||
| 204 | + _("Preferences"), | ||
| 205 | + _("Help"), | ||
| 206 | + _("Logout"), | ||
| 207 | + ); | ||
| 208 | + | ||
| 209 | + $aTopMenuColourClass = array( | ||
| 210 | + "dashboard", | ||
| 211 | + "browse", | ||
| 212 | + "subscriptions", | ||
| 213 | + "asearch", | ||
| 214 | + "admin", | ||
| 215 | + "prefs", | ||
| 216 | + "help", | ||
| 217 | + "logout", | ||
| 218 | + ); | ||
| 219 | + | ||
| 171 | // create array of menu colour images | 220 | // create array of menu colour images |
| 172 | $aColourMenuImages = array($colourHome,$colourmdocs,$coloursubscriptions,$colourasearch,$colouradmin,$colourprefs,$colourhelp,$colourlogout); | 221 | $aColourMenuImages = array($colourHome,$colourmdocs,$coloursubscriptions,$colourasearch,$colouradmin,$colourprefs,$colourhelp,$colourlogout); |
| 173 | 222 | ||
| 174 | - //set up the links | ||
| 175 | - for ($i = 0; $i < count($aTopMenuLinks); $i++) { | ||
| 176 | - if (strcmp($aTopMenuLinks[$i], "help") == 0) { | ||
| 177 | - $sTopMenu .= "<td width=\"10\"><a href=\"#\" onClick=\"javascript:helpWindow();\"><image src=\"" . $aTopMenuImages[$i] . "\" border=\"0\" /></a></td>\n"; | ||
| 178 | - $sColourMenu .= "<td width=\"10\"><a href=\"#\" onClick=\"javascript:helpWindow();\"><image src=\"" . $aColourMenuImages[$i] . "\" border=\"0\" /></a></td>\n"; | ||
| 179 | - } else { | ||
| 180 | - $sTopMenu .= "<td width=\"10\">" . (strlen($aTopMenuLinks[$i]) > 0 ? "<a href=\"" . $aTopMenuLinks[$i] . "\">" : "") . "<img src=\"" . $aTopMenuImages[$i] . "\" border=\"0\" /></a></td>\n"; | ||
| 181 | - $sColourMenu .= "<td width=\"10\">" . (strlen($aTopMenuLinks[$i]) > 0 ? "<a href=\"" . $aTopMenuLinks[$i] . "\">" : "") . "<img src=\"" . $aColourMenuImages[$i] . "\" border=\"0\"/></a></td>\n"; | 223 | + if ($default->useTextButtons === false) { |
| 224 | + //set up the links | ||
| 225 | + for ($i = 0; $i < count($aTopMenuLinks); $i++) { | ||
| 226 | + if (strcmp($aTopMenuLinks[$i], "help") == 0) { | ||
| 227 | + $sTopMenu .= "<td width=\"10\"><a href=\"#\" onClick=\"javascript:helpWindow();\"><image src=\"" . $aTopMenuImages[$i] . "\" border=\"0\" /></a></td>\n"; | ||
| 228 | + $sColourMenu .= "<td width=\"10\"><a href=\"#\" onClick=\"javascript:helpWindow();\"><image src=\"" . $aColourMenuImages[$i] . "\" border=\"0\" /></a></td>\n"; | ||
| 229 | + } else { | ||
| 230 | + $sTopMenu .= "<td width=\"10\">" . (strlen($aTopMenuLinks[$i]) > 0 ? "<a href=\"" . $aTopMenuLinks[$i] . "\">" : "") . "<img src=\"" . $aTopMenuImages[$i] . "\" border=\"0\" /></a></td>\n"; | ||
| 231 | + $sColourMenu .= "<td width=\"10\">" . (strlen($aTopMenuLinks[$i]) > 0 ? "<a href=\"" . $aTopMenuLinks[$i] . "\">" : "") . "<img src=\"" . $aColourMenuImages[$i] . "\" border=\"0\"/></a></td>\n"; | ||
| 232 | + } | ||
| 233 | + } | ||
| 234 | + } else { | ||
| 235 | + for ($i = 0; $i < count($aTopMenuLinks); $i++) { | ||
| 236 | + if (strcmp($aTopMenuLinks[$i], "help") == 0) { | ||
| 237 | + $sTopMenu .= "<td valign=\"top\"><a href=\"#\" onClick=\"javascript:helpWindow();\"><span class=\"" . $aTopMenuClasses[$i] . "\">" . strtoupper($aTopMenuWords[$i]) . "</span></a></td>\n"; | ||
| 238 | + $sColourMenu .= "<td valign=\"top\" class=\"colour_" . $aTopMenuColourClass[$i] . "\"><a href=\"#\" onClick=\"javascript:helpWindow();\"><span> </span></a></td>\n"; | ||
| 239 | + } else { | ||
| 240 | + $sTopMenu .= "<td valign=\"top\">" . (strlen($aTopMenuLinks[$i]) > 0 ? "<a href=\"" . $aTopMenuLinks[$i] . "\">" : "") . "<span class=\"" . $aTopMenuClasses[$i] . "\">" . strtoupper($aTopMenuWords[$i]) . "</span></a></td>\n"; | ||
| 241 | + $sColourMenu .= "<td valign=\"top\" class=\"colour_" . $aTopMenuColourClass[$i] . "\">" . (strlen($aTopMenuLinks[$i]) > 0 ? "<a href=\"" . $aTopMenuLinks[$i] . "\">" : "") . "<span> </span></a></td>\n"; | ||
| 242 | + } | ||
| 182 | } | 243 | } |
| 183 | } | 244 | } |
| 184 | 245 | ||
| 185 | $toRender = new PatternCustom; | 246 | $toRender = new PatternCustom; |
| 186 | 247 | ||
| 187 | // build the nav bar | 248 | // build the nav bar |
| 188 | - $bar = "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n"; | 249 | + $bar = "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"608\">\n"; |
| 189 | $bar .= "\t<tr height=\"30\">\n"; | 250 | $bar .= "\t<tr height=\"30\">\n"; |
| 190 | $bar .= "\t\t<td align=\"right\" valign=\"top\" width=\"100%\"><img src=\"$heading\"/><img src=\"$default->graphicsUrl/logo.jpg\" width=\"30\" height=\"36\"/></td>\n"; | 251 | $bar .= "\t\t<td align=\"right\" valign=\"top\" width=\"100%\"><img src=\"$heading\"/><img src=\"$default->graphicsUrl/logo.jpg\" width=\"30\" height=\"36\"/></td>\n"; |
| 191 | $bar .= "\t</tr>\n"; | 252 | $bar .= "\t</tr>\n"; |
| @@ -211,7 +272,8 @@ class NavBar { | @@ -211,7 +272,8 @@ class NavBar { | ||
| 211 | } | 272 | } |
| 212 | $bar .= "\t\t</td>\n"; | 273 | $bar .= "\t\t</td>\n"; |
| 213 | $bar .= "\t</tr>\n"; | 274 | $bar .= "\t</tr>\n"; |
| 214 | - $bar .= "<tr height=30><td ><table cellspacing=0 cellpadding=0 border=0><tr>$sTopMenu</tr>\n"; | 275 | + /* $bar .= "<tr height=30><td ><table cellspacing=0 cellpadding=0 border=0><tr>$sTopMenu</tr>\n"; */ |
| 276 | + $bar .= "<tr><td><table cellspacing=0 cellpadding=0 border=0><tr>$sTopMenu</tr>\n"; | ||
| 215 | $bar .= "<tr>$sColourMenu</tr></table></td></tr>\n"; | 277 | $bar .= "<tr>$sColourMenu</tr></table></td></tr>\n"; |
| 216 | $bar .= "</table>\n"; | 278 | $bar .= "</table>\n"; |
| 217 | 279 |
presentation/lookAndFeel/knowledgeTree/stylesheet.php
| @@ -176,3 +176,120 @@ span.disabledbutton { | @@ -176,3 +176,120 @@ span.disabledbutton { | ||
| 176 | display: block; | 176 | display: block; |
| 177 | margin-top: 4px; | 177 | margin-top: 4px; |
| 178 | } | 178 | } |
| 179 | + | ||
| 180 | +span.dash { | ||
| 181 | + font-size: 7pt; | ||
| 182 | + font-weight: 600; | ||
| 183 | + /* height: 20px; */ | ||
| 184 | + /* border: 1px solid #FFF; */ | ||
| 185 | + border-left: 2px solid #FFF; | ||
| 186 | + border-top: 2px solid #FFF; | ||
| 187 | + background-color: #9D9D7F; | ||
| 188 | + text-align: center; | ||
| 189 | + white-space: nowrap; | ||
| 190 | + display: block; | ||
| 191 | + /* margin: 2px; */ | ||
| 192 | + /* padding: 1px; */ | ||
| 193 | + padding-left: 5px; | ||
| 194 | + padding-right: 5px; | ||
| 195 | + padding-top: 2px; | ||
| 196 | + padding-bottom: 1px; | ||
| 197 | + text-decoration: none; | ||
| 198 | + font-style : normal; | ||
| 199 | + color : #FFFFFF; | ||
| 200 | +} | ||
| 201 | + | ||
| 202 | +span.dash:Hover { | ||
| 203 | + /* background-color: #EEE; */ | ||
| 204 | + text-decoration: none; | ||
| 205 | +} | ||
| 206 | + | ||
| 207 | +span.dashactive { | ||
| 208 | + font-size: 7pt; | ||
| 209 | + font-weight: 600; | ||
| 210 | + /* height: 20px; */ | ||
| 211 | + /* border: 1px solid #FFF; */ | ||
| 212 | + border-left: 2px solid #FFF; | ||
| 213 | + border-top: 2px solid #FFF; | ||
| 214 | + background-color: #1A4383; | ||
| 215 | + text-align: center; | ||
| 216 | + white-space: nowrap; | ||
| 217 | + display: block; | ||
| 218 | + /* margin: 2px; */ | ||
| 219 | + padding-left: 5px; | ||
| 220 | + padding-right: 5px; | ||
| 221 | + padding-top: 2px; | ||
| 222 | + padding-bottom: 1px; | ||
| 223 | + text-decoration: none; | ||
| 224 | + font-style : normal; | ||
| 225 | + color : #FFFFFF; | ||
| 226 | +} | ||
| 227 | + | ||
| 228 | +span.dashactive:Hover { | ||
| 229 | + /* background-color: #EEE; */ | ||
| 230 | + text-decoration: none; | ||
| 231 | +} | ||
| 232 | + | ||
| 233 | +td.colour_dashboard { | ||
| 234 | + border-left: 2px solid #FFF; | ||
| 235 | + border-top: 2px solid #FFF; | ||
| 236 | + height: 10px; | ||
| 237 | + width: 100%; | ||
| 238 | + background-color: #007A3F; | ||
| 239 | +} | ||
| 240 | + | ||
| 241 | +td.colour_browse { | ||
| 242 | + border-left: 2px solid #FFF; | ||
| 243 | + border-top: 2px solid #FFF; | ||
| 244 | + height: 10px; | ||
| 245 | + width: 100%; | ||
| 246 | + background-color: #57AFAE; | ||
| 247 | +} | ||
| 248 | + | ||
| 249 | +td.colour_subscriptions { | ||
| 250 | + border-left: 2px solid #FFF; | ||
| 251 | + border-top: 2px solid #FFF; | ||
| 252 | + height: 10px; | ||
| 253 | + width: 100%; | ||
| 254 | + background-color: #FFC602; | ||
| 255 | +} | ||
| 256 | + | ||
| 257 | +td.colour_asearch { | ||
| 258 | + border-left: 2px solid #FFF; | ||
| 259 | + border-top: 2px solid #FFF; | ||
| 260 | + height: 10px; | ||
| 261 | + width: 100%; | ||
| 262 | + background-color: #A1571B; | ||
| 263 | +} | ||
| 264 | + | ||
| 265 | +td.colour_admin { | ||
| 266 | + border-left: 2px solid #FFF; | ||
| 267 | + border-top: 2px solid #FFF; | ||
| 268 | + height: 10px; | ||
| 269 | + width: 100%; | ||
| 270 | + background-color: #056DCE; | ||
| 271 | +} | ||
| 272 | + | ||
| 273 | +td.colour_prefs { | ||
| 274 | + border-left: 2px solid #FFF; | ||
| 275 | + border-top: 2px solid #FFF; | ||
| 276 | + height: 10px; | ||
| 277 | + width: 100%; | ||
| 278 | + background-color: #F87308; | ||
| 279 | +} | ||
| 280 | + | ||
| 281 | +td.colour_help { | ||
| 282 | + border-left: 2px solid #FFF; | ||
| 283 | + border-top: 2px solid #FFF; | ||
| 284 | + height: 10px; | ||
| 285 | + width: 100%; | ||
| 286 | + background-color: #80CE05; | ||
| 287 | +} | ||
| 288 | + | ||
| 289 | +td.colour_logout { | ||
| 290 | + border-left: 2px solid #FFF; | ||
| 291 | + border-top: 2px solid #FFF; | ||
| 292 | + height: 10px; | ||
| 293 | + width: 100%; | ||
| 294 | + background-color: #CE0505; | ||
| 295 | +} |