Changeset 12587

Show
Ignore:
Timestamp:
05/28/08 10:54:52 (13 months ago)
Author:
retlet
Message:

tagsAndComment formatとstyleを少し追加

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/vimperator-plugins/trunk/sbmcommentsviewer.js

    r12552 r12587  
    2323 * 
    2424 * 指定可能フォーマット: 
    25  *  id, timpstamp, tags, comment 
     25 *  id, timpstamp, tags, comment, tagsAndComment 
    2626 * 
    2727 * SBMタイプ: 
     
    7373        } else { 
    7474            var str = [ 
    75                 '<table><caption style="text-align:left;" class="hl-Title">' + label + '</caption><tr>' 
     75                '<table id="liberator-sbmcommentsviewer"><caption style="text-align:left;" class="hl-Title">' + label + '</caption><tr>' 
    7676            ]; 
    7777            format.forEach(function(colum){ 
     
    120120            switch(colum){ 
    121121                case 'id': 
    122                     str.push('<td>' + (self.userIcon ? '<img src="'+self.userIcon +'" width="16" height="16"/>' : '') + 
    123                              self.id + '</td>'); 
     122                    str.push('<td class="liberator-sbmcommentsviewer-id">' + (self.userIcon ? '<p style="display:table-cell;vertical-align:middle;padding-right:3px;"><img src="'+self.userIcon +'" width="16" height="16"/></p>' : '') + 
     123                             '<p style="display:table-cell;vertical-align:middle;">' + self.id + '</p></td>'); 
    124124                    break; 
    125125                case 'timestamp': 
    126                     str.push('<td>' + self.formatDate() + '</td>'); break; 
     126                    str.push('<td class="liberator-sbmcommentsviewer-timestamp">' + self.formatDate() + '</td>'); break; 
    127127                case 'tags': 
    128                     str.push('<td>' + self.tags.join(',') + '</td>'); break; 
     128                    str.push('<td class="liberator-sbmcommentsviewer-tags">' + self.tags.join(',') + '</td>'); break; 
    129129                case 'comment': 
    130                     str.push('<td style="white-space:normal;">' + self.comment + '</td>'); break; 
     130                    str.push('<td class="liberator-sbmcommentsviewer-comment" style="white-space:normal;">' + self.comment + '</td>'); break; 
     131                case 'tagsAndComment': 
     132                    tagString = self.tags.length ? '[' + self.tags.join('][') + ']':''; 
     133                    str.push('<td class="liberator-sbmcommentsviewer-tagsAndComment" style="white-space:normal;">' + tagString + ' ' + self.comment + '</td>'); break; 
    131134                default: 
    132135                    str.push('<td>-</td>'); 
     
    355358        comment: 'Comment', 
    356359        timestamp: 'TimeStamp', 
    357         tags: 'Tags' 
     360        tags: 'Tags', 
     361        tagsAndComment: 'Tags&Comment' 
    358362    }, 
    359363    // for debug