changed: menu plugin (static files are skipped)

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@769 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2011-09-26 06:39:05 +00:00
parent 89efaa790f
commit 302cb0130d
2 changed files with 24 additions and 434 deletions

View File

@ -53,6 +53,17 @@ void menu_dir_skip_items(long parent_id)
}
void menu_dir_skip_static_files()
{
for(size_t x=0 ; x<menu_dir_items.size() ; )
{
if( menu_dir_items[x].file == Item::file && menu_dir_items[x].file_type != WINIX_ITEM_FILETYPE_NONE )
menu_dir_items.erase(menu_dir_items.begin() + x);
else
x += 1;
}
}
void menu_dir_load_menu(long parent_id)
@ -61,14 +72,11 @@ void menu_dir_load_menu(long parent_id)
menu_dir_iq.sel_subject = true;
menu_dir_iq.sel_url = true;
menu_dir_iq.sel_sort_index = true;
menu_dir_iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
menu_dir_iq.WhereParentId(parent_id);
// !! directories will not be read with WINIX_ITEM_FILETYPE_NONE
//menu_dir_iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
db->GetItems(menu_dir_items, menu_dir_iq);
menu_dir_skip_items(parent_id);
menu_dir_skip_static_files();
log << log1 << "Menu: db used" << logend;
}

View File

@ -79,6 +79,14 @@ list-style-type: decimal;
margin-left: 3em;
padding: 0.4em 0 0.4em 5px;
}
dl {
margin: 0.5em 0 0.5em 0;
}
dt {
margin: 0.7em 0 0.0em 0;
}
* html ul li {
@ -114,434 +122,8 @@ padding-right: 2em;
table td {
padding-right: 2em;
}
/* */
p.withnext {
margin: 1em 0 0 0;
width: 520px;
}
p.iteminfo {
font-size: 0.7em;
color: #AAAAAA;
margin: 0.4em 0 1.8em 0;
}
p.itemtabinfo {
font-size: 0.7em;
color: #AAAAAA;
margin: 0 0 1em 0;
padding: 0.5em 0 0 0;
}
p.itemtabinfo2 {
font-size: 0.7em;
color: #AAAAAA;
margin: 0 0 1em 0;
padding: 1.5em 0 0 0;
}
.error {
color: red;
font-weight: bold;
}
#additem legend {
display: none;
}
#additem .edit {
margin: 0.3em 0 0.3em 0;
padding: 0.2em;
border: 1px solid #dedede;
display: block;
width: 530px;
}
#additem .editshort {
margin: 0.3em 0 0.3em 0;
padding: 0.2em;
border: 1px solid #dedede;
display: block;
width: 250px;
}
#additem .check {
vertical-align: middle;
}
#additem label {
vertical-align: top;
margin: 0.3em 0 0.3em 0;
padding: 0.2em;
display: block;
}
#additem select {
border: 1px solid #dedede;
width: 100px;
margin: 0.3em 0 0.3em 0;
}
#additem select.contenttype {
width: 150px;
}
#additem select.template {
width: 200px;
}
#additem .privileges {
margin: 0.5em 0 0.5em 0;
border: 1px solid #dedede;
display: block;
width: 100px;
}
#additem .multitext {
margin: 0.5em 0 0.5em 0;
border: 1px solid #dedede;
display: block;
width: 530px;
}
#additem .multitextfull {
margin: 0.5em 0 0.5em 0;
border: 1px solid #dedede;
display: block;
width: 630px;
}
#additem .submit {
margin: 1.5em 0 0.5em 0;
display: block;
width: 10em;
padding: 0.2em;
}
div.itemoptions {
clear: both;
border-top: 1px solid #D1D1E1;
padding: 1em;
margin: 5em 0 1em 0;
}
div.itemoptions h2 {
margin-top: 0;
font-size: 1.1em;
}
ul.itemmenu {
overflow: hidden;
margin: 1em 0 2em 0;
display: block;
}
/* ie6 has some problems */
* html ul.itemmenu {
overflow: visible;
height: 1em;
}
ul.itemmenu li {
display: block;
margin-right: 2em;
font-size: 0.8em;
line-height: 1.8em;
}
div.threadbox {
padding: 0.2em 1em 1em 1em;
}
div.threadboxcolor {
background: #F4F4F4;
border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
}
div.threadbox a.threadedit {
margin: 0.5em 0 0 0;
float: right;
font-size: 0.8em;
}
table.forum {
border: 1px solid #D1D1E1;
}
table.forum th {
border: 1px solid #D1D1E1;
}
table.forum td {
border: 1px solid #D1D1E1;
}
table.forum a {
display: block;
padding: 0 4px 0 4px;
}
.smallfont {
font-size: 0.7em;
}
table.tickettab {
border: 1px solid #D1D1E1;
}
table.tickettab th {
font-weight: bold;
}
table.tickettab th, table.tickettab td {
text-align: center;
border: 0;
font-size: 0.7em;
border: 1px solid #D1D1E1;
vertical-align: middle;
}
table.tickettab td.tickettabtitle {
font-size: 1em;
text-align: left;
padding: 0 4px 0 4px;
}
table.tickettab a {
display: block;
padding: 0 4px 0 4px;
}
table.ticket {
margin: 1em 0 1em 0;
}
table.ticket th {
text-align: left;
font-weight: normal;
padding: 0 1em 0 0;
}
table.ticket th, table.ticket td {
border: 0;
vertical-align: middle;
}
table.ticket input {
margin: 0.3em 0 0.3em 0;
padding: 0.2em;
border: 1px solid #dedede;
display: block;
width: 100px;
}
div.ticketinfo {
background: #FFFED5;
padding: 2em;
border: 1px dotted #AFAFAF;
}
div.ticketinfo table th {
text-align: left;
border: 0;
padding: 0 1em 0 0;
}
div.ticketinfo table td {
border: 0;
}
div.ticketinfo p.edit {
font-size: 0.8em;
text-align: right;
float: right;
}
ul.ls_browse li {
display: block;
float: left;
margin: 10px;
list-style-type: none;
}
strong {
font-weight: bold;
}
img.catimage {
max-width: 600px;
}
pre.nowinixbreak {
display: inline;
white-space: normal;
}
/*
from bbcode
*/
span.bbitalic {
font-style: italic;
}
span.bbunderline {
text-decoration: underline;
}
span.bbstrike {
text-decoration: line-through;
}
div.bbquote {
display: block;
padding: 0.5em;
margin: 0.5em 0 1em 0;
border: 1px solid #C3C3C3;
background: #F0F0F0;
}
div.bbquote span.bbquotewho {
font-size: 0.8em;
color: #BABABA;
}
code.bbcode {
display: block;
background-color: #fafafa;
padding: 1em;
font-size: 0.8em;
}
ul.bblist {
margin-left: 2em;
}
ul.bblist li {
list-style-type: disc;
}
span.bbcolyellow {
color: yellow;
}
span.bbcolred {
color: red;
}
span.bbcolgreen {
color: green;
}
span.bbcolblue {
color: blue;
}
span.bbcolbrown {
color: brown;
}
span.bbcolblack {
color: black;
}
ul.galleryimages li {
display: block;
float: left;
margin: 0 0 6px 10px;
}
ul.galleryimages a, ul.galleryimages a:hover, ul.galleryimages a:focus, ul.galleryimages a:active {
background: none;
}
ul.galleryimages img {
background: none;
}
table.mountpoints {
}
table.mountpoints th {
font-weight: bold;
white-space: normal;
text-align: center;
}
table.slog th, table.slog td {
border: 0;
}
td.slogerror {
background: red;
color: white;
}
ul#sortable li{
list-style-type: none;
display: block;
padding: 0.2em 1em 0.2em 1em;
border: 1px solid #D3D3D3;
background: #EDEDED;
margin: 0.3em 0 0.3em 0;
}
ul#sortable input{
width: 30px;
margin: 0 10px 0 0;
}
ul#sortable img {
height: 50px;
}
div#fileupload {
font-size: 0.8em;
}
p {
margin: 0.5em 0 0.5em 0;
}