Skip to content

Commit

Permalink
Item10221: Update attachment counter to work with QUERY
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@10472 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
ArthurClemens authored and ArthurClemens committed Jan 3, 2011
1 parent 61c4c93 commit ba350f5
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 24 deletions.
11 changes: 0 additions & 11 deletions PatternSkin/pub/System/PatternSkin/pattern_src.js
@@ -1,17 +1,6 @@

jQuery(document).ready(
function ($) {
// Create an attachment counter in the attachment table twisty.
$('div.foswikiAttachments').livequery(function() {
var count = $(this).find('table.foswikiTable').attr('rows').length - 1;
var countStr = " <span class='foswikiSmall'>" + count + "<\/span>";
$(this).find('.patternAttachmentHeader').livequery(function() {
$(this).append(countStr);
}
);
}
);

var searchResultsCount = 0;

// Search page handling
Expand Down
7 changes: 0 additions & 7 deletions PatternSkin/pub/System/PatternSkinTheme/style_src.css
Expand Up @@ -400,12 +400,6 @@ table.foswikiFormTable th.foswikiFormTableHRow a:link,
table.foswikiFormTable th.foswikiFormTableHRow a:visited {
text-decoration:none;
}
.patternAttachmentHeader {
/* behaviour class */
}
.patternAttachmentHeader .foswikiSmall {
font-weight:normal;
}
.patternTwistyButton {
font-weight:bold;
margin:.5em 0;
Expand All @@ -422,7 +416,6 @@ h3 .foswikiSmall {
border-style:solid;
}
.foswikiFormStep {
line-height:140%;
padding:12px 20px;
margin:-1px -20px -1px -20px;
border-width:1px;
Expand Down
5 changes: 0 additions & 5 deletions PatternSkin/pub/System/PatternSkinTheme2009/style.css
Expand Up @@ -413,10 +413,6 @@ table.foswikiFormTable th.foswikiFormTableHRow a:visited {
/* always add class foswikiButton as well */
padding:.1em .2em;
}
.patternAttachmentHeader {
font-size: 1.1em;
/* behaviour class */
}
.foswikiForm h3 a:link,
.foswikiForm h3 a:visited {
text-decoration:none;
Expand All @@ -437,7 +433,6 @@ table.foswikiFormTable th.foswikiFormTableHRow a:visited {
border-style:solid;
}
.foswikiFormStep {
line-height:140%;
padding:12px 40px;
margin:-1px -40px -1px -40px;
border-width:1px;
Expand Down
2 changes: 1 addition & 1 deletion PatternSkin/templates/attachtables.pattern.tmpl
Expand Up @@ -3,7 +3,7 @@

%TMPL:DEF{"commonattachtableattributes"}%valign="middle" dataalign="center,left,left,right,left,left,left,center" datavalign="top" headercolor="#0066cc" databg="#ffffff" headerbg="#ffffff" headerbgsorted="#eeeeee" databgsorted="#f5f5f5" tablerules="rows" %TMPL:END%

%TMPL:DEF{"topicattachmentwisty"}%%TWISTY{id="topicattachmentslist" mode="div" remember="on" showimgleft="%ICONURLPATH{toggleopen}%" hideimgleft="%ICONURLPATH{toggleclose}%" showlink="%MAKETEXT{"Attachments"}%" hidelink="%MAKETEXT{"Attachments"}%" linkclass="patternTwistyButton patternAttachmentHeader"}%%TMPL:END%
%TMPL:DEF{"topicattachmentwisty"}%%TWISTY{id="topicattachmentslist" mode="div" remember="on" showimgleft="%ICONURLPATH{toggleopen}%" hideimgleft="%ICONURLPATH{toggleclose}%" link="%MAKETEXT{"Attachments ([_1])" args="%QUERY{"length(attachments)"}%"}%" linkclass="patternTwistyButton"}%%TMPL:END%

%{ Header definition for topic attachments and top table in attach screen }%
%TMPL:DEF{ATTACH:files:header(basic)}%<div class="foswikiAttachments">
Expand Down

0 comments on commit ba350f5

Please sign in to comment.