Revision 121
- Date:
- 2011/08/22 16:08:07
- Files:
-
- /koi8/core/comps/contenido/components/__section_tree__.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/class_filter.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/index_tree.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/inputs/image.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/inputs/notetext.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/link_browse.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/naviline.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/object_form.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/project.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/set_image.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/structure.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/subsection.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/title.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/components/users.msn (Diff) (Checkout)
- /koi8/core/comps/contenido/document_filter_list.html (Diff) (Checkout)
- /koi8/core/comps/contenido/sections.html (Diff) (Checkout)
- /koi8/core/lib/Contenido/File.pm (Diff) (Checkout)
Legend:
- Added
- Removed
- Modified
-
koi8/core/comps/contenido/components/__section_tree__.msn
37 37 my ($statcase) = grep { $_->[0] == $sect->status } @{$statprop->{cases}} if exists $statprop->{cases} && ref $statprop->{cases} eq 'ARRAY'; 38 38 my $statname = $statcase->[1] if ref $statcase; 39 39 my $html_sect = '<span'.($statstyle).(!$sect->status ? ' class="hiddensect"' : '').'>'.($section_access ? '<a href="'.$href.'"'.$statstyle.'>' : '').$sname.' ' . ($section_access ? '</a>' : '') . ' '.($sect->status != 1 && $statname ? ' <span style="font-size:12px;">('.$statname.')</span>' : '').'</span>'; 40 my $style = ($offset == 1) ? ($viewmode ? ' style="font-size:110%;"':' style="font-size:95%;"') : ''; 40 my $style = ($offset == 1) ? ($viewmode ? ' style="font-size:16px;font-weight:bold;"':' style="font-size:14px;"') : ' style="font-size:12px;"'; 41 41 42 42 $m->out(<<EOT); 43 43 <tr> … … 54 54 55 55 if ($viewmode) 56 56 { 57 my $fhref = '/contenido/?set_context=filter-'.$sect->id(); 58 my $new_doc_class = $sect->default_document_class; 59 $m->out(qq^\n<td align="center" nowrap><a href="$fhref">���.������</a>^); 60 $m->out(qq^ <a href="document.html?sect_id=$sect->{id}&class=$new_doc_class">���.�����</a>^) if $section_access == 2 and $new_doc_class; 61 $m->out("</td>"); 57 my $fhref = '/contenido/?set_context=filter-'.$sect->id(); 58 my $new_doc_class = $sect->default_document_class; 59 $m->out(qq^\n<td align="center" nowrap>^); 60 $m->out(qq^<a href="section.html?id=$sect->{id}" title="������������� ��������� ������"><img src="/contenido/i/actions/edit.gif" width="15" height="17" align="absmiddle" border="0"></a> ^); 61 $m->out(qq^<a href="$fhref">������</a>^); 62 $m->out(qq^ <a href="document.html?sect_id=$sect->{id}&class=$new_doc_class">���.�����</a>^) if $section_access == 2 and $new_doc_class; 63 $m->out("</td>"); 62 64 } 63 65 64 66 $m->out('</tr>'); -
koi8/core/comps/contenido/components/class_filter.msn
16 16 <tr>\ 17 17 % } 18 18 <td><% $serial %></td>\ 19 <td style="font-size:75%;" nowrap><% $document->class_name() %></td>\ 20 <td style="font-size:75%;" nowrap align="right"><a href="sections.html?class=<% $document->class() %>&id=<% $id %>&use_section=1">� ������</a>/<a href="sections.html?class=<% $document->class() %>&id=<% $id %>">��� �����</a> ������</td>\ 19 <td nowrap><% $document->class_name() %></td>\ 20 <td nowrap align="right"><a href="sections.html?class=<% $document->class() %>&id=<% $id %>&use_section=1">� ������</a>/<a href="sections.html?class=<% $document->class() %>&id=<% $id %>">��� �����</a> ������</td>\ 21 21 </tr> 22 22 % } 23 23 </table> -
koi8/core/comps/contenido/components/index_tree.msn
10 10 <& "/contenido/components/__section_tree__.msn", root=>$root, level => $level, mode=>1 &> 11 11 12 12 </table> 13 <div style="font-size:70%;font-family:Tahoma;margin:5px 4px 10px 4px;"><b><a href="section.html?sect_id=<% $root %>">������� ��������� »</a></b></div> 13 <div style="font-size:11px;font-family:Tahoma;margin:5px 4px 10px 4px;"><b><a href="section.html?sect_id=<% $root %>">������� ��������� »</a></b></div> 14 14 </fieldset> 15 15 16 16 <%args> -
koi8/core/comps/contenido/components/inputs/image.msn
1 1 <!-- ���� �������� --> 2 <table cellpadding="0" cellspacing="2" border="0"> 2 <table cellpadding="0" cellspacing="2" border="0" width="100%"> 3 3 <tr><td><b><% $rusname %></b> / <font size="-1" color="#888888">name="<% $attr %>"</font> </td></tr> 4 <tr><td><input type="file" name="<% $attr %>" style="width:95%;font-family:arial;font-size:9pt;"></td></tr> 4 <tr><td> 5 <div><a href="javascript:void(0)" class="mm_act" id="<% $attr %>_file_prompt" style="padding:0 6px;" 6 onclick="$('#<% $attr %>_url_loader').hide(); $('#<% $attr %>_file_loader').show(); $('#<% $attr %>_file_prompt').addClass('mm_act'); $('#<% $attr %>_url_prompt').removeClass('mm_act'); return false;">file</a> 7 <a href="javascript:void(0)" class="mm_inact" id="<% $attr %>_url_prompt" style="padding:0 6px;" 8 onclick="$('#<% $attr %>_file_loader').hide(); $('#<% $attr %>_url_loader').show(); $('#<% $attr %>_url_prompt').addClass('mm_act'); $('#<% $attr %>_file_prompt').removeClass('mm_act'); $('#<% $attr %>_ext_url')[0].focus(); return false;">url</a></div> 9 <div id="<% $attr %>_file_loader" style="background:#d0d0d0; padding:2px;"> 10 <input type="file" name="<% $attr %>" style="width:95%;font-family:arial;font-size:9pt;"></div> 11 <div id="<% $attr %>_url_loader" style="display:none; background:#d0d0d0; padding:2px;"> URL: <input 12 id="<% $attr %>_ext_url" type="text" name="<% $attr %>.ext_url" style="width:81%;font-family:arial;font-size:9pt;"></div> 13 </td></tr> 5 14 % if ( exists($IMAGE->{width}) && exists($IMAGE->{height}) && exists($IMAGE->{filename}) ) 6 15 % { 7 16 <tr><td style="font-size:95%;"><% $IMAGE->{filename} %></td></tr> … … 16 25 % $path =~ s|/{2,}|/|g; 17 26 % $u1->path($path); 18 27 % $img_path = $u1->canonical; 19 <font size="-1" color="#888888">��� x ���: <% $IMAGE->{width} %>x<% $IMAGE->{height} %></font><br> 28 <font size="-1" color="#888888">��� x ���: <% $IMAGE->{width} %>x<% $IMAGE->{height} %></font> 20 29 <img src="<% $img_path %>" alt="<% html_escape($IMAGE->{alt}) %>" width="<% $show_w %>" height="<% $show_h %>"><br> 21 30 </td></tr> 22 31 % } -
koi8/core/comps/contenido/components/inputs/notetext.msn
22 22 // ---> 23 23 </script> 24 24 25 <table border="0" width="95%" style="font-size:70%; font-weight:; font-family:Tahoma;background-color:#dcdcdc;color:#000000;"> 25 <table border="0" width="95%" style="font-size:11px; font-weight:; font-family:Tahoma;background-color:#dcdcdc;color:#000000;"> 26 26 <tr><td> 27 27 ������� �����:<br> 28 28 <a style="color:#000000" href="javascript: insertTags('<br>','')" title="������� ������"><br></a> -
koi8/core/comps/contenido/components/link_browse.msn
32 32 </div> 33 33 % } 34 34 % if ( $total or defined $alpha or defined $search ) { 35 <div style="font-size:75%; font-family:Arial;"> 35 <div style="font-size:12px; font-family:Arial;"> 36 36 <table border="0" cellspacing="0" cellpadding="2" width="100%" style="margin:4px 0 0; border:1px solid gray;"> 37 37 <tr bgcolor="#e0e0e0"><th colspan="4">����� �� �����: [<a href="?class=<% $class %>" style="font-weight:normal;">����� �������</a>]</th></tr> 38 <tr><td style="font-size:75%; font-family:Arial; padding:2px 4px;"> 38 <tr><td style="font-size:12px; font-family:Arial; padding:2px 4px;"> 39 39 <& /inc/alpha.msn, alpha=>$alpha, params=>\%ARGS, &> 40 40 </td></tr></table> 41 41 … … 212 212 % } #- foreach @documents 213 213 </table> 214 214 215 <div style="font-size:75%; font-family:Arial;"> 215 <div style="font-size:12px; font-family:Arial;"> 216 216 <& /inc/pages_.msn, p=>$p, n=>$n, total=>$total, params=>\%ARGS, &> 217 217 <div style="height:5px"><spacer type="block" height="5"></div> 218 218 </div> -
koi8/core/comps/contenido/components/object_form.msn
99 99 <div><iframe name="DocFinder" id="DocFinder" src="/contenido/find_document.html" frameborder="0" 100 100 marginheight="0" marginwidth="0" width="100%" height="0"></iframe></div> 101 101 <table cellpadding="5" cellspacing="0" border="0"><tr><td> 102 <p><font size=+1><b><nobr>�����������-�������</nobr> � <% $PROTOS->{$proto}->[2] %></b></font></p> 102 <p><b style="font-size:15px;"><nobr>�����������-�������</nobr> � <% $PROTOS->{$proto}->[2] %></b></p> 103 103 104 104 % for (0..$#properties) 105 105 % { … … 271 271 if ($toopi && (ref($toopi) eq 'HASH') && (exists($toopi->{ $object->class }))) { 272 272 %{ $options } = %{ $toopi->{ $object->class } }; 273 273 } 274 </%INIT> 274 my $is_multimedia = scalar( grep { $_->{type} =~ /(image|multimedia|audio)/ } $object->structure ); 275 my $is_pickup = scalar( grep { $_->{type} =~ /(pickup)/ } $object->structure ); 276 277 </%INIT> -
koi8/core/comps/contenido/components/project.msn
8 8 ul.listtypes li.active {list-style-image:url(/contenido/i/nav-2.gif)} 9 9 </style> 10 10 11 <ul class="listtypes" style="font-size:70%;font-family:Tahoma;text-align:left;"> 11 <ul class="listtypes" style="font-size:11px;font-family:Tahoma;text-align:left;"> 12 12 <li>���������: 13 13 <ul> 14 14 % for my $class (sort {$a->class_name cmp $b->class_name} @{ $state->{available_documents} }) -
koi8/core/comps/contenido/components/set_image.msn
19 19 20 20 my $IMAGE = $default; 21 21 22 if ($SETS->{$field}) { 22 if ($SETS->{$field} || $SETS->{"$field.ext_url"}) { 23 23 24 my $upload = $r->upload($field); 24 my $upload; 25 if ( $SETS->{$field} ) { 26 $upload = $r->upload($field); 27 } elsif ( $SETS->{"$field.ext_url"} && $SETS->{"$field.ext_url"} =~ /^(http|https|ftp):\/\/.*/ ) { 28 $upload = $SETS->{"$field.ext_url"}; 29 } 25 30 if ($upload) { 26 31 27 32 my $IMG = $object->_store_image( $upload, attr => $prop->{attr} ); -
koi8/core/comps/contenido/components/structure.msn
8 8 ul.liststruct li {list-style-image:url(/contenido/i/nav-2-a.gif)} 9 9 </style> 10 10 11 <ul class="liststruct" style="font-size:70%;font-family:Tahoma;text-align:left;"> 11 <ul class="liststruct" style="font-size:11px;font-family:Tahoma;text-align:left;"> 12 12 <li><a href="options.html?proto=colors">�������������� �������� ����������</a> 13 13 <li><a href="options.html?proto=widths">������</a> 14 14 <li><a href="options.html?proto=params">�������������� ���������</a> -
koi8/core/comps/contenido/components/subsection.msn
11 11 </table> 12 12 % if ($section_access == 2) 13 13 % { 14 <div style="font-size:70%;font-family:Tahoma;margin:5px 4px 10px 4px;"><b><a href="section.html?sect_id=<% $section->id %>">������� ��������� »</a></b></div> 14 <div style="font-size:11px;font-family:Tahoma;margin:5px 4px 10px 4px;"><b><a href="section.html?sect_id=<% $section->id %>">������� ��������� »</a></b></div> 15 15 % } 16 <div style="font-size:70%;font-family:Tahoma;margin:5px 4px 10px 4px;"><b><a href="/contenido/?set_context=filter-<% $section->id %>">���������� � �������� ������� »</a></b></div> 16 <div style="font-size:11px;font-family:Tahoma;margin:5px 4px 10px 4px;"><b><a href="/contenido/?set_context=filter-<% $section->id %>">���������� � �������� ������� »</a></b></div> 17 17 </fieldset> 18 18 19 19 -
koi8/core/comps/contenido/components/title.msn
1 1 <html> 2 2 <head> 3 <META http-equiv="Content-Type" content="text/html; charset=KOI8-R"> 3 <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4 4 <style> 5 5 body { 6 6 background-color: #FFFFFF; 7 7 margin: 0px; 8 font-family: Tahoma, Arial, sans-serif; 8 9 } 9 10 form { 10 11 margin: 0px; … … 23 24 24 25 fieldset {padding:6px;margin-bottom:10px;border:2px solid #8093B0;} 25 26 fieldset legend {font-size:8pt;font-weight:bold;font-family:Tahoma;padding:3px 6px 3px 6px;margin-bottom:6px;color:#ffffff;background-color:#8093B0;} 27 28 table { font-size:13px; } 29 input { font-size:12px; } 26 30 27 .tatop {font-size:70%;font-family:Tahoma;color:#ffffff;} 31 .tatop {font-size:11px;font-family:Tahoma;color:#ffffff;} 28 32 .tatop a {color:#ffffff;} 29 .npath {font-size:70%;font-family:Tahoma;padding:8px;} 33 .npath {font-size:11px;font-family:Tahoma;padding:8px;} 30 34 31 .textnorm { font-size:70%; font-family:Tahoma; } 35 .textnorm { font-size:12px; font-family:Tahoma; } 32 36 .input_btn {background-color:#930300;color:#FFFFFF;height:2.4em;} 33 37 34 38 table.tlistdocs { margin-top:10px; margin-bottom:10px; border-right:1px solid #d9d9d9;border-bottom:1px solid #d9d9d9; } 35 39 table.tlistdocs td, table.tlistdocs th { border:1px solid #d9d9d9; border-right:0px; border-bottom:0px; } 36 table.tlistdocs td {font-size:70%;font-family:Tahoma;} 40 table.tlistdocs td {font-size:12px;font-family:Arial;} 37 41 table.tlistdocs table td {border:0px;} 38 42 39 43 table.tform th, table.tform td { 40 font-size: 70%; 44 font-size: 11px; 41 45 font-family: Tahoma; 42 46 text-align: left; 43 47 } 44 48 45 th {font-size:70%;font-family:Tahoma;text-align:left;} 49 th {font-size:11px;font-family:Tahoma;text-align:left;} 46 50 47 h5, .hdr5 {font-size:70%;font-family:Tahoma;font-weight:bold;padding-top:10px;padding-bottom:5px;} 51 h5, .hdr5 {font-size:11px;font-family:Tahoma;font-weight:bold;padding-top:10px;padding-bottom:5px;} 48 52 49 53 50 54 .hiddensect { color:#909090; } … … 65 69 } 66 70 .link_string { font: 12px Tahoma; padding:5px 10px; border-bottom:1px solid gray; } 67 71 .link_string p { margin:0; padding:0; } 72 73 .mm_act { background:#d0d0d0; border-top:1px solid gray; border-right:1px solid gray; text-decoration:none; } 68 74 69 75 </style> 70 76 <title>������������ ���������<% (length($title) > 0) ? " | $title" : "" %></title> … … 97 103 98 104 convert_urls : false, 99 105 106 extended_valid_elements : "iframe[src|width|height|name|align|noresize|scrolling|frameBorder|marginWidth|marginHeight]", 107 100 108 paste_create_paragraphs : false, 101 109 paste_create_linebreaks : false, 102 110 paste_auto_cleanup_on_paste : true, -
koi8/core/comps/contenido/components/users.msn
7 7 ul.listtypes li.unactive a {color:gray} 8 8 </style> 9 9 10 <ul class="listtypes" style="font-size:70%;font-family:Tahoma;text-align:left;"> 10 <ul class="listtypes" style="font-size:11px;font-family:Tahoma;text-align:left;"> 11 11 % for my $u (sort { $a->name cmp $b->name } @users) { 12 12 <li class="<% $u->status == 0 ? 'un' : '' %>active"><a href="users.html?login=<% $u->login() %>&class=<% $u->class() %>"><% $u->name() %> (<% $u->login() %>)</a> 13 13 % } -
koi8/core/comps/contenido/document_filter_list.html
3 3 <span style="font:11px Verdana;">(<a href="document.html?class=<% $class %>&<% $field %>=<% $id %><% $defaults %>" target="_blank">������� �����</a>)</span></div> 4 4 % if ( ref $docs eq 'ARRAY' && @$docs ) { 5 5 % if ($total > $size) { 6 <div style="font-size:75%; font-family:Arial; text-align:center;"> 6 <div style="font-size:12px; font-family:Arial; text-align:center;"> 7 7 <& /inc/pages_.msn, p => $p, n => $size, total => $total, params => {%ARGS} &></div> 8 8 % } 9 9 % my @props = sort { $a->{column} <=> $b->{column} } grep { exists $_->{column} } $docs->[0]->required_properties; -
koi8/core/comps/contenido/sections.html
82 82 sect_id => $owner->id, 83 83 default => ($owner->default_document_class ? $owner->default_document_class : undef) &> 84 84 % } 85 <div style="font-size:75%; font-family:Arial;"> 85 <div style="font-size:12px; font-family:Arial;"> 86 86 <table border="0" cellspacing="0" cellpadding="2" width="100%" style="margin:4px 0 0; border:1px solid gray;"> 87 87 <tr bgcolor="#e0e0e0"><th colspan="4">����� �� �����: [<a href="?id=<% $id %>" style="font-weight:normal;">����� �������</a>]</th></tr> 88 <tr><td style="font-size:75%; font-family:Arial; padding:2px 4px;"> 88 <tr><td style="font-size:12px; font-family:Arial; padding:2px 4px;"> 89 89 <& /inc/alpha.msn, alpha=>$alpha, params=>\%ARGS, &> 90 90 </td></tr></table> 91 91 % ## ����� ������. �������� ��� ���������� ������� ������ … … 132 132 133 133 <& /contenido/components/section_browse.msn, documents => \@documents, columns => \@columns, section => $owner, filter => \%filter_params, %ARGS &> 134 134 135 <div style="font-size:75%; font-family:Arial;"> 135 <div style="font-size:12px; font-family:Arial;"> 136 136 % if ( $owner->no_count ) { 137 137 <& /inc/pages_nocount.msn, p=>$p, n=>$n, found=> scalar @documents, href=>'sections.html', params=>\%ARGS, size => 15 &> 138 138 % } else { -
koi8/core/lib/Contenido/File.pm
173 173 my $fh = get_fh($input); 174 174 return unless ref $fh; 175 175 176 my $size = (stat $fh)[7]; 177 176 my $ext; 178 if ( $opts{filename} ) { 179 $ext = $opts{filename} =~ /(jpe?g|gif|png)$/i ? lc $1 : 'bin'; 180 } elsif ( not ref $input ) { 177 my $size = 1073741824; 178 if ( not ref $input ) { 181 179 $ext = $input =~ /(jpe?g|gif|png)$/i ? lc $1 : 'bin'; 180 if ( scheme($input) eq 'file' ) { 181 $size = (stat $fh)[7]; 182 } 182 183 } elsif ( ref $input eq 'Apache::Upload' ) { 183 184 $ext = $input->filename() =~ /(jpe?g|gif|png)$/i ? lc $1 : 'bin'; 185 $size = (stat $fh)[7]; 186 } elsif ( $opts{filename} ) { 187 $ext = $opts{filename} =~ /(jpe?g|gif|png)$/i ? lc $1 : 'bin'; 184 188 } 185 189 $ext ||= 'bin'; 186 190 187 191 my $fh_tmp = IO::File->new('>'.$filename_tmp.'.'.$ext) || return; 188 192 my $buffer; 189 193 190 sysread $fh, $buffer, $size; 194 $size = sysread $fh, $buffer, $size; 191 195 syswrite $fh_tmp, $buffer, $size; 192 196 193 197 undef $fh_tmp;