trac-code-comments-plugin-master/0002755000175000017500000000000012015430206015456 5ustar wmbwmbtrac-code-comments-plugin-master/README.md0000644000175000017500000000531312015430206016735 0ustar wmbwmbCode Comments, an enhancement for Trac ===================================== The problem is two-fold. When reviewing code, it's difficult to associate your comments with their appropriate context. Then, collecting all of these new issues into actionable tickets requires a lot of manual effort. This plugin allows you to leave comments on top of files, changesets, and attachments. Once you've added all of your comments, you can send them to tickets. These include links to these comments and their description. It's Github, in your Trac. Installation ------------ Pick an `.egg` file from the Downloads section and place it in the `plugins/` directory of your Trac install. Trac Code Comments plugin requres at least python 2.4 and runs on Trac 0.12. Features -------- * Comments on files – you can comment on every file in the repository. * Inline comments on files – comment on a specific line. The comments appears in context, below the line in question. * Comments on changesets – useful when doing code reviews of incoming commits. * Comments on attachment pages – useful when reviewing patches. * Wiki Markup – you can use the standard Trac wiki markup inside your comments. * Instant preview – to make sure you get the formatting right. * Sending comments to tickets – you can select arbitrary number of comments and create a new ticket out of them. The text of the ticket defaults to links to the comments and their text, but you can edit these before saving the ticket. * Comments/ticket cross-reference – to remember which comments are already in tickets and which are not. Screenshots ----------- ![Inline comment screenshot](https://github.com/Automattic/trac-code-comments-plugin/raw/master/screenshots/0.png) Contributing ------------ We'd love your help! If you are a developer, feel free to fork the project here, on github and submit a pull request with your changes. If you are a designer and have UI suggestions, [open an issue](https://github.com/Automattic/trac-code-comments-plugin/issues), and we'll make sure to address your concerns. If you want to help with copy, or just wanna say how great or sucky we are [creating an issue](https://github.com/Automattic/trac-code-comments-plugin/issues) is the way to go. You can find help with setting up a local development environment in the [`HACKING`](https://github.com/Automattic/trac-code-comments-plugin/blob/master/HACKING) file in this repostitory. Roadmap ------- Nobody can predict the future, but here are some features on the roadmap: * Line-level comments for changesets and diff atatchments, too * E-mail notifictaions License ------- Copyright (C) 2011-2012, Automattic Inc. This plugin is distributed under the GPLv2 or later license.trac-code-comments-plugin-master/code_comments/0002755000175000017500000000000012015430206020275 5ustar wmbwmbtrac-code-comments-plugin-master/code_comments/db.py0000644000175000017500000000520612015430206021235 0ustar wmbwmbfrom trac.core import * from trac.db.schema import Table, Column, Index from trac.env import IEnvironmentSetupParticipant from trac.db.api import DatabaseManager # Database version identifier for upgrades. db_version = 1 # Database schema schema = { 'code_comments': Table('code_comments', key=('id', 'version'))[ Column('id', auto_increment=True), Column('version', type='int'), Column('text'), Column('path'), Column('revision', type='int'), Column('line', type='int'), Column('author'), Column('time', type='int'), Index(['path']), Index(['author']), ], } def to_sql(env, table): """ Convenience function to get the to_sql for the active connector.""" dc = DatabaseManager(env)._get_connector()[0] return dc.to_sql(table) def create_tables(env, db): cursor = db.cursor() for table_name in schema: for stmt in to_sql(env, schema[table_name]): cursor.execute(stmt) cursor.execute("INSERT into system values ('code_comments_schema_version', %s)", str(db_version)) # Upgrades def upgrade_from_1_to_2(env, db): pass upgrade_map = { 2: upgrade_from_1_to_2 } class CodeCommentsSetup(Component): """Component that deals with database setup and upgrades.""" implements(IEnvironmentSetupParticipant) def environment_created(self): """Called when a new Trac environment is created.""" pass def environment_needs_upgrade(self, db): """Called when Trac checks whether the environment needs to be upgraded. Returns `True` if upgrade is needed, `False` otherwise.""" return self._get_version(db) != db_version def upgrade_environment(self, db): """Actually perform an environment upgrade, but don't commit as that is done by the common upgrade procedure when all plugins are done.""" current_ver = self._get_version(db) if current_ver == 0: create_tables(self.env, db) else: while current_ver+1 <= db_version: upgrade_map[current_ver+1](self.env, db) current_ver += 1 cursor = db.cursor() cursor.execute("UPDATE system SET value=%s WHERE name='code_comments_schema_version'", str(db_version)) def _get_version(self, db): cursor = db.cursor() try: sql = "SELECT value FROM system WHERE name='code_comments_schema_version'" cursor.execute(sql) for row in cursor: return int(row[0]) return 0 except: return 0 trac-code-comments-plugin-master/code_comments/__init__.py0000644000175000017500000000032712015430206022406 0ustar wmbwmbfrom code_comments import comment from code_comments import comments from code_comments import db from code_comments import web from code_comments import comment_macro from code_comments import ticket_event_listenertrac-code-comments-plugin-master/code_comments/htdocs/0002755000175000017500000000000012121436515021570 5ustar wmbwmbtrac-code-comments-plugin-master/code_comments/htdocs/code-comments.js0000644000175000017500000001434512015430206024661 0ustar wmbwmbjQuery(function($) { var _ = window.underscore; $(document).ajaxError( function(e, xhr, options){ var errorText = xhr.statusText; if (-1 == xhr.responseText.indexOf(''); $('a.bubble').click(function(e) { e.preventDefault(); AddCommentDialog.open(LineComments, line); }) .css({width: $th.width(), height: $th.height(), 'text-align': 'center'}) .find('span').css('margin-left', ($th.width() - 16) / 2); }, function() { var $th = $('th', this); $('a.bubble', $th).remove(); $('a', $th).show(); } ); } }); window.TopComments = new CommentsList(); window.LineComments = new CommentsList(); window.TopCommentsBlock = new TopCommentsView(); window.LineCommentsBlock = new LineCommentsView(); window.AddCommentDialog = new AddCommentDialogView(); window.LineCommentBubbles = new LineCommentBubblesView({el: $('table.code')}); $(CodeComments.selectorToInsertBefore).before(TopCommentsBlock.render().el); LineCommentsBlock.render(); AddCommentDialog.render(); LineCommentBubbles.render(); }); trac-code-comments-plugin-master/code_comments/htdocs/code-comments.css0000644000175000017500000000242412015430206025030 0ustar wmbwmbtable.code-comments td.check { width: 2em; } #add-comment-dialog textarea { width: 400px; height: 180px; padding: 6px; } #add-comment-dialog button { float: left; } #add-comment-dialog a.formatting { float: right; } #add-comment-dialog h3 { display: none; } #add-comment-dialog div.preview { margin-bottom: 12px; } .ui-dialog { width: auto !important; } ul.comments .active { background-color: #FFFFCD; } ul.comments { margin: 0; padding: 2px 4px 0 0; font-size: 11px; font-family: Verdana, sans-serif; } ul.comments>li { border-radius: 4px; border: 1px solid #dfdfdf; margin-bottom: 4px; list-style-type: none; } ul.comments>li .meta { padding: 6px; background-color: #dfdfdf; } ul.comments>li .time { font-size: 10px; } ul.comments>li .meta img.gravatar { vertical-align: middle; padding: 1px; border: 1px solid #888; } ul.comments>li .meta .author { font-weight: bold; } ul.comments>li .meta .delete { float: right; margin-right: 1em; } ul.comments>li .text { padding: 1px 8px; border: 0; margin: 0; } #top-comments button { margin-bottom: 16px; } tr.with-comments { background-color: #FFFFE2; border-bottom: 1px solid #998; } tr.comments { border-bottom: 1px solid #998; } table.code tr { height: 17px; } table.code tr:hover td { background-color: #FFFFCA; }trac-code-comments-plugin-master/code_comments/htdocs/trac-theme.css0000644000175000017500000010124112015430206024321 0ustar wmbwmb/* * jQuery UI CSS Framework 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Theming/API */ /* Layout helpers ----------------------------------*/ .ui-helper-hidden { display: none; } .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .ui-helper-clearfix { display: inline-block; } /* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix { height:1%; } .ui-helper-clearfix { display:block; } /* end clearfix */ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } /* Interaction Cues ----------------------------------*/ .ui-state-disabled { cursor: default !important; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } /* Misc visuals ----------------------------------*/ /* Overlays */ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } /* * jQuery UI CSS Framework 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Theming/API * * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=verdana,%20Arial,sans-serif&fwDefault=bold&fsDefault=11px&cornerRadius=3px&bgColorHeader=ffffdd&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=30&borderColorHeader=303030&fcHeader=000000&iconColorHeader=b00000&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=00&borderColorContent=000000&fcContent=000000&iconColorContent=b00000&bgColorDefault=b00000&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=0&borderColorDefault=eeeeee&fcDefault=ffffff&iconColorDefault=ffffff&bgColorHover=e0e0e0&bgTextureHover=04_highlight_hard.png&bgImgOpacityHover=0&borderColorHover=505050&fcHover=505050&iconColorHover=505050&bgColorActive=000000&bgTextureActive=01_flat.png&bgImgOpacityActive=0&borderColorActive=bbbbbb&fcActive=d7d7d7&iconColorActive=d7d7d7&bgColorHighlight=c0f0c0&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=c0f0c0&fcHighlight=444444&iconColorHighlight=4b954f&bgColorError=ffddcc&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=75&borderColorError=9b081d&fcError=500000&iconColorError=9b081d&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=333333&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=10&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px */ /* Component containers ----------------------------------*/ .ui-widget { font-family: verdana, Arial,sans-serif; font-size: 11px; } .ui-widget .ui-widget { font-size: 1em; } .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: verdana, Arial,sans-serif; font-size: 1em; } .ui-widget-content { border: 1px solid #000000; background: #ffffff url(images/ui-bg_flat_00_ffffff_40x100.png) 50% 50% repeat-x; color: #000000; } .ui-widget-content a { color: #000000; } .ui-widget-header { border: 1px solid #303030; background: #ffffdd url(images/ui-bg_highlight-soft_30_ffffdd_1x100.png) 50% 50% repeat-x; color: #000000; font-weight: bold; } .ui-widget-header a { color: #000000; } /* Interaction states ----------------------------------*/ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #eeeeee; background: #b00000 url(images/ui-bg_highlight-hard_0_b00000_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; } .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #ffffff; text-decoration: none; } .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #505050; background: #e0e0e0 url(images/ui-bg_highlight-hard_0_e0e0e0_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #505050; } .ui-state-hover a, .ui-state-hover a:hover { color: #505050; text-decoration: none; } .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #bbbbbb; background: #000000 url(images/ui-bg_flat_0_000000_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #d7d7d7; } .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #d7d7d7; text-decoration: none; } .ui-widget :active { outline: none; } /* Interaction Cues ----------------------------------*/ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #c0f0c0; background: #c0f0c0 url(images/ui-bg_glass_55_c0f0c0_1x400.png) 50% 50% repeat-x; color: #444444; } .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #444444; } .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #9b081d; background: #ffddcc url(images/ui-bg_diagonals-thick_75_ffddcc_40x40.png) 50% 50% repeat; color: #500000; } .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #500000; } .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #500000; } .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_b00000_256x240.png); } .ui-widget-content .ui-icon {background-image: url(images/ui-icons_b00000_256x240.png); } .ui-widget-header .ui-icon {background-image: url(images/ui-icons_b00000_256x240.png); } .ui-state-default .ui-icon { background-image: url(images/ui-icons_ffffff_256x240.png); } .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_505050_256x240.png); } .ui-state-active .ui-icon {background-image: url(images/ui-icons_d7d7d7_256x240.png); } .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_4b954f_256x240.png); } .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_9b081d_256x240.png); } /* positioning */ .ui-icon-carat-1-n { background-position: 0 0; } .ui-icon-carat-1-ne { background-position: -16px 0; } .ui-icon-carat-1-e { background-position: -32px 0; } .ui-icon-carat-1-se { background-position: -48px 0; } .ui-icon-carat-1-s { background-position: -64px 0; } .ui-icon-carat-1-sw { background-position: -80px 0; } .ui-icon-carat-1-w { background-position: -96px 0; } .ui-icon-carat-1-nw { background-position: -112px 0; } .ui-icon-carat-2-n-s { background-position: -128px 0; } .ui-icon-carat-2-e-w { background-position: -144px 0; } .ui-icon-triangle-1-n { background-position: 0 -16px; } .ui-icon-triangle-1-ne { background-position: -16px -16px; } .ui-icon-triangle-1-e { background-position: -32px -16px; } .ui-icon-triangle-1-se { background-position: -48px -16px; } .ui-icon-triangle-1-s { background-position: -64px -16px; } .ui-icon-triangle-1-sw { background-position: -80px -16px; } .ui-icon-triangle-1-w { background-position: -96px -16px; } .ui-icon-triangle-1-nw { background-position: -112px -16px; } .ui-icon-triangle-2-n-s { background-position: -128px -16px; } .ui-icon-triangle-2-e-w { background-position: -144px -16px; } .ui-icon-arrow-1-n { background-position: 0 -32px; } .ui-icon-arrow-1-ne { background-position: -16px -32px; } .ui-icon-arrow-1-e { background-position: -32px -32px; } .ui-icon-arrow-1-se { background-position: -48px -32px; } .ui-icon-arrow-1-s { background-position: -64px -32px; } .ui-icon-arrow-1-sw { background-position: -80px -32px; } .ui-icon-arrow-1-w { background-position: -96px -32px; } .ui-icon-arrow-1-nw { background-position: -112px -32px; } .ui-icon-arrow-2-n-s { background-position: -128px -32px; } .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } .ui-icon-arrow-2-e-w { background-position: -160px -32px; } .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } .ui-icon-arrowstop-1-n { background-position: -192px -32px; } .ui-icon-arrowstop-1-e { background-position: -208px -32px; } .ui-icon-arrowstop-1-s { background-position: -224px -32px; } .ui-icon-arrowstop-1-w { background-position: -240px -32px; } .ui-icon-arrowthick-1-n { background-position: 0 -48px; } .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } .ui-icon-arrowthick-1-e { background-position: -32px -48px; } .ui-icon-arrowthick-1-se { background-position: -48px -48px; } .ui-icon-arrowthick-1-s { background-position: -64px -48px; } .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } .ui-icon-arrowthick-1-w { background-position: -96px -48px; } .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } .ui-icon-arrow-4 { background-position: 0 -80px; } .ui-icon-arrow-4-diag { background-position: -16px -80px; } .ui-icon-extlink { background-position: -32px -80px; } .ui-icon-newwin { background-position: -48px -80px; } .ui-icon-refresh { background-position: -64px -80px; } .ui-icon-shuffle { background-position: -80px -80px; } .ui-icon-transfer-e-w { background-position: -96px -80px; } .ui-icon-transferthick-e-w { background-position: -112px -80px; } .ui-icon-folder-collapsed { background-position: 0 -96px; } .ui-icon-folder-open { background-position: -16px -96px; } .ui-icon-document { background-position: -32px -96px; } .ui-icon-document-b { background-position: -48px -96px; } .ui-icon-note { background-position: -64px -96px; } .ui-icon-mail-closed { background-position: -80px -96px; } .ui-icon-mail-open { background-position: -96px -96px; } .ui-icon-suitcase { background-position: -112px -96px; } .ui-icon-comment { background-position: -128px -96px; } .ui-icon-person { background-position: -144px -96px; } .ui-icon-print { background-position: -160px -96px; } .ui-icon-trash { background-position: -176px -96px; } .ui-icon-locked { background-position: -192px -96px; } .ui-icon-unlocked { background-position: -208px -96px; } .ui-icon-bookmark { background-position: -224px -96px; } .ui-icon-tag { background-position: -240px -96px; } .ui-icon-home { background-position: 0 -112px; } .ui-icon-flag { background-position: -16px -112px; } .ui-icon-calendar { background-position: -32px -112px; } .ui-icon-cart { background-position: -48px -112px; } .ui-icon-pencil { background-position: -64px -112px; } .ui-icon-clock { background-position: -80px -112px; } .ui-icon-disk { background-position: -96px -112px; } .ui-icon-calculator { background-position: -112px -112px; } .ui-icon-zoomin { background-position: -128px -112px; } .ui-icon-zoomout { background-position: -144px -112px; } .ui-icon-search { background-position: -160px -112px; } .ui-icon-wrench { background-position: -176px -112px; } .ui-icon-gear { background-position: -192px -112px; } .ui-icon-heart { background-position: -208px -112px; } .ui-icon-star { background-position: -224px -112px; } .ui-icon-link { background-position: -240px -112px; } .ui-icon-cancel { background-position: 0 -128px; } .ui-icon-plus { background-position: -16px -128px; } .ui-icon-plusthick { background-position: -32px -128px; } .ui-icon-minus { background-position: -48px -128px; } .ui-icon-minusthick { background-position: -64px -128px; } .ui-icon-close { background-position: -80px -128px; } .ui-icon-closethick { background-position: -96px -128px; } .ui-icon-key { background-position: -112px -128px; } .ui-icon-lightbulb { background-position: -128px -128px; } .ui-icon-scissors { background-position: -144px -128px; } .ui-icon-clipboard { background-position: -160px -128px; } .ui-icon-copy { background-position: -176px -128px; } .ui-icon-contact { background-position: -192px -128px; } .ui-icon-image { background-position: -208px -128px; } .ui-icon-video { background-position: -224px -128px; } .ui-icon-script { background-position: -240px -128px; } .ui-icon-alert { background-position: 0 -144px; } .ui-icon-info { background-position: -16px -144px; } .ui-icon-notice { background-position: -32px -144px; } .ui-icon-help { background-position: -48px -144px; } .ui-icon-check { background-position: -64px -144px; } .ui-icon-bullet { background-position: -80px -144px; } .ui-icon-radio-off { background-position: -96px -144px; } .ui-icon-radio-on { background-position: -112px -144px; } .ui-icon-pin-w { background-position: -128px -144px; } .ui-icon-pin-s { background-position: -144px -144px; } .ui-icon-play { background-position: 0 -160px; } .ui-icon-pause { background-position: -16px -160px; } .ui-icon-seek-next { background-position: -32px -160px; } .ui-icon-seek-prev { background-position: -48px -160px; } .ui-icon-seek-end { background-position: -64px -160px; } .ui-icon-seek-start { background-position: -80px -160px; } /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ .ui-icon-seek-first { background-position: -80px -160px; } .ui-icon-stop { background-position: -96px -160px; } .ui-icon-eject { background-position: -112px -160px; } .ui-icon-volume-off { background-position: -128px -160px; } .ui-icon-volume-on { background-position: -144px -160px; } .ui-icon-power { background-position: 0 -176px; } .ui-icon-signal-diag { background-position: -16px -176px; } .ui-icon-signal { background-position: -32px -176px; } .ui-icon-battery-0 { background-position: -48px -176px; } .ui-icon-battery-1 { background-position: -64px -176px; } .ui-icon-battery-2 { background-position: -80px -176px; } .ui-icon-battery-3 { background-position: -96px -176px; } .ui-icon-circle-plus { background-position: 0 -192px; } .ui-icon-circle-minus { background-position: -16px -192px; } .ui-icon-circle-close { background-position: -32px -192px; } .ui-icon-circle-triangle-e { background-position: -48px -192px; } .ui-icon-circle-triangle-s { background-position: -64px -192px; } .ui-icon-circle-triangle-w { background-position: -80px -192px; } .ui-icon-circle-triangle-n { background-position: -96px -192px; } .ui-icon-circle-arrow-e { background-position: -112px -192px; } .ui-icon-circle-arrow-s { background-position: -128px -192px; } .ui-icon-circle-arrow-w { background-position: -144px -192px; } .ui-icon-circle-arrow-n { background-position: -160px -192px; } .ui-icon-circle-zoomin { background-position: -176px -192px; } .ui-icon-circle-zoomout { background-position: -192px -192px; } .ui-icon-circle-check { background-position: -208px -192px; } .ui-icon-circlesmall-plus { background-position: 0 -208px; } .ui-icon-circlesmall-minus { background-position: -16px -208px; } .ui-icon-circlesmall-close { background-position: -32px -208px; } .ui-icon-squaresmall-plus { background-position: -48px -208px; } .ui-icon-squaresmall-minus { background-position: -64px -208px; } .ui-icon-squaresmall-close { background-position: -80px -208px; } .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } .ui-icon-grip-solid-vertical { background-position: -32px -224px; } .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } .ui-icon-grip-diagonal-se { background-position: -80px -224px; } /* Misc visuals ----------------------------------*/ /* Corner radius */ .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -khtml-border-top-left-radius: 3px; border-top-left-radius: 3px; } .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; -khtml-border-top-right-radius: 3px; border-top-right-radius: 3px; } .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; -khtml-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; } .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; -khtml-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; } /* Overlays */ .ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #333333 url(images/ui-bg_flat_0_333333_40x100.png) 50% 50% repeat-x; opacity: .10;filter:Alpha(Opacity=10); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* * jQuery UI Resizable 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Resizable#theming */ .ui-resizable { position: relative;} .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; } .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* * jQuery UI Selectable 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Selectable#theming */ .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } /* * jQuery UI Accordion 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Accordion#theming */ /* IE/Win - Fix animation bug - #4615 */ .ui-accordion { width: 100%; } .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } .ui-accordion .ui-accordion-li-fix { display: inline; } .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } .ui-accordion .ui-accordion-content-active { display: block; } /* * jQuery UI Autocomplete 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Autocomplete#theming */ .ui-autocomplete { position: absolute; cursor: default; } /* workarounds */ * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ /* * jQuery UI Menu 1.8.16 * * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Menu#theming */ .ui-menu { list-style:none; padding: 2px; margin: 0; display:block; float: left; } .ui-menu .ui-menu { margin-top: -3px; } .ui-menu .ui-menu-item { margin:0; padding: 0; zoom: 1; float: left; clear: left; width: 100%; } .ui-menu .ui-menu-item a { text-decoration:none; display:block; padding:.2em .4em; line-height:1.5; zoom:1; } .ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; } /* * jQuery UI Button 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Button#theming */ .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ .ui-button-icons-only { width: 3.4em; } button.ui-button-icons-only { width: 3.7em; } /*button text element */ .ui-button .ui-button-text { display: block; line-height: 1.4; } .ui-button-text-only .ui-button-text { padding: .4em 1em; } .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } /* no icon support for input elements, provide padding by default */ input.ui-button { padding: .4em 1em; } /*button icon element(s) */ .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } /*button sets*/ .ui-buttonset { margin-right: 7px; } .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } /* workarounds */ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ /* * jQuery UI Dialog 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Dialog#theming */ .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } .ui-draggable .ui-dialog-titlebar { cursor: move; } /* * jQuery UI Slider 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Slider#theming */ .ui-slider { position: relative; text-align: left; } .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } .ui-slider-horizontal { height: .8em; } .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } .ui-slider-horizontal .ui-slider-range-min { left: 0; } .ui-slider-horizontal .ui-slider-range-max { right: 0; } .ui-slider-vertical { width: .8em; height: 100px; } .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } .ui-slider-vertical .ui-slider-range-min { bottom: 0; } .ui-slider-vertical .ui-slider-range-max { top: 0; }/* * jQuery UI Tabs 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Tabs#theming */ .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } .ui-tabs .ui-tabs-hide { display: none !important; } /* * jQuery UI Datepicker 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Datepicker#theming */ .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } .ui-datepicker .ui-datepicker-prev { left:2px; } .ui-datepicker .ui-datepicker-next { right:2px; } .ui-datepicker .ui-datepicker-prev-hover { left:1px; } .ui-datepicker .ui-datepicker-next-hover { right:1px; } .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } .ui-datepicker select.ui-datepicker-month-year {width: 100%;} .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { width: 49%;} .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } .ui-datepicker td { border: 0; padding: 1px; } .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } /* with multiple calendars */ .ui-datepicker.ui-datepicker-multi { width:auto; } .ui-datepicker-multi .ui-datepicker-group { float:left; } .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } /* RTL support */ .ui-datepicker-rtl { direction: rtl; } .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } .ui-datepicker-rtl .ui-datepicker-group { float:right; } .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ .ui-datepicker-cover { display: none; /*sorry for IE5*/ display/**/: block; /*sorry for IE5*/ position: absolute; /*must have*/ z-index: -1; /*must have*/ filter: mask(); /*must have*/ top: -4px; /*must have*/ left: -4px; /*must have*/ width: 200px; /*must have*/ height: 200px; /*must have*/ }/* * jQuery UI Progressbar 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Progressbar#theming */ .ui-progressbar { height:2em; text-align: left; } .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }trac-code-comments-plugin-master/code_comments/htdocs/jquery.ba-throttle-debounce.js0000644000175000017500000002401612121423634027452 0ustar wmbwmb/*! * jQuery throttle / debounce - v1.1 - 3/7/2010 * http://benalman.com/projects/jquery-throttle-debounce-plugin/ * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ // Script: jQuery throttle / debounce: Sometimes, less is more! // // *Version: 1.1, Last updated: 3/7/2010* // // Project Home - http://benalman.com/projects/jquery-throttle-debounce-plugin/ // GitHub - http://github.com/cowboy/jquery-throttle-debounce/ // Source - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.js // (Minified) - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.min.js (0.7kb) // // About: License // // Copyright (c) 2010 "Cowboy" Ben Alman, // Dual licensed under the MIT and GPL licenses. // http://benalman.com/about/license/ // // About: Examples // // These working examples, complete with fully commented code, illustrate a few // ways in which this plugin can be used. // // Throttle - http://benalman.com/code/projects/jquery-throttle-debounce/examples/throttle/ // Debounce - http://benalman.com/code/projects/jquery-throttle-debounce/examples/debounce/ // // About: Support and Testing // // Information about what version or versions of jQuery this plugin has been // tested with, what browsers it has been tested in, and where the unit tests // reside (so you can test it yourself). // // jQuery Versions - none, 1.3.2, 1.4.2 // Browsers Tested - Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome 4-5, Opera 9.6-10.1. // Unit Tests - http://benalman.com/code/projects/jquery-throttle-debounce/unit/ // // About: Release History // // 1.1 - (3/7/2010) Fixed a bug in where trailing callbacks // executed later than they should. Reworked a fair amount of internal // logic as well. // 1.0 - (3/6/2010) Initial release as a stand-alone project. Migrated over // from jquery-misc repo v0.4 to jquery-throttle repo v1.0, added the // no_trailing throttle parameter and debounce functionality. // // Topic: Note for non-jQuery users // // jQuery isn't actually required for this plugin, because nothing internal // uses any jQuery methods or properties. jQuery is just used as a namespace // under which these methods can exist. // // Since jQuery isn't actually required for this plugin, if jQuery doesn't exist // when this plugin is loaded, the method described below will be created in // the `Cowboy` namespace. Usage will be exactly the same, but instead of // $.method() or jQuery.method(), you'll need to use Cowboy.method(). (function(window,undefined){ '$:nomunge'; // Used by YUI compressor. // Since jQuery really isn't required for this plugin, use `jQuery` as the // namespace only if it already exists, otherwise use the `Cowboy` namespace, // creating it if necessary. var $ = window.jQuery || window.Cowboy || ( window.Cowboy = {} ), // Internal method reference. jq_throttle; // Method: jQuery.throttle // // Throttle execution of a function. Especially useful for rate limiting // execution of handlers on events like resize and scroll. If you want to // rate-limit execution of a function to a single time, see the // method. // // In this visualization, | is a throttled-function call and X is the actual // callback execution: // // > Throttled with `no_trailing` specified as false or unspecified: // > ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| // > X X X X X X X X X X X X // > // > Throttled with `no_trailing` specified as true: // > ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| // > X X X X X X X X X X // // Usage: // // > var throttled = jQuery.throttle( delay, [ no_trailing, ] callback ); // > // > jQuery('selector').bind( 'someevent', throttled ); // > jQuery('selector').unbind( 'someevent', throttled ); // // This also works in jQuery 1.4+: // // > jQuery('selector').bind( 'someevent', jQuery.throttle( delay, [ no_trailing, ] callback ) ); // > jQuery('selector').unbind( 'someevent', callback ); // // Arguments: // // delay - (Number) A zero-or-greater delay in milliseconds. For event // callbacks, values around 100 or 250 (or even higher) are most useful. // no_trailing - (Boolean) Optional, defaults to false. If no_trailing is // true, callback will only execute every `delay` milliseconds while the // throttled-function is being called. If no_trailing is false or // unspecified, callback will be executed one final time after the last // throttled-function call. (After the throttled-function has not been // called for `delay` milliseconds, the internal counter is reset) // callback - (Function) A function to be executed after delay milliseconds. // The `this` context and all arguments are passed through, as-is, to // `callback` when the throttled-function is executed. // // Returns: // // (Function) A new, throttled, function. $.throttle = jq_throttle = function( delay, no_trailing, callback, debounce_mode ) { // After wrapper has stopped being called, this timeout ensures that // `callback` is executed at the proper times in `throttle` and `end` // debounce modes. var timeout_id, // Keep track of the last time `callback` was executed. last_exec = 0; // `no_trailing` defaults to falsy. if ( typeof no_trailing !== 'boolean' ) { debounce_mode = callback; callback = no_trailing; no_trailing = undefined; } // The `wrapper` function encapsulates all of the throttling / debouncing // functionality and when executed will limit the rate at which `callback` // is executed. function wrapper() { var that = this, elapsed = +new Date() - last_exec, args = arguments; // Execute `callback` and update the `last_exec` timestamp. function exec() { last_exec = +new Date(); callback.apply( that, args ); }; // If `debounce_mode` is true (at_begin) this is used to clear the flag // to allow future `callback` executions. function clear() { timeout_id = undefined; }; if ( debounce_mode && !timeout_id ) { // Since `wrapper` is being called for the first time and // `debounce_mode` is true (at_begin), execute `callback`. exec(); } // Clear any existing timeout. timeout_id && clearTimeout( timeout_id ); if ( debounce_mode === undefined && elapsed > delay ) { // In throttle mode, if `delay` time has been exceeded, execute // `callback`. exec(); } else if ( no_trailing !== true ) { // In trailing throttle mode, since `delay` time has not been // exceeded, schedule `callback` to execute `delay` ms after most // recent execution. // // If `debounce_mode` is true (at_begin), schedule `clear` to execute // after `delay` ms. // // If `debounce_mode` is false (at end), schedule `callback` to // execute after `delay` ms. timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay ); } }; // Set the guid of `wrapper` function to the same of original callback, so // it can be removed in jQuery 1.4+ .unbind or .die by using the original // callback as a reference. if ( $.guid ) { wrapper.guid = callback.guid = callback.guid || $.guid++; } // Return the wrapper function. return wrapper; }; // Method: jQuery.debounce // // Debounce execution of a function. Debouncing, unlike throttling, // guarantees that a function is only executed a single time, either at the // very beginning of a series of calls, or at the very end. If you want to // simply rate-limit execution of a function, see the // method. // // In this visualization, | is a debounced-function call and X is the actual // callback execution: // // > Debounced with `at_begin` specified as false or unspecified: // > ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| // > X X // > // > Debounced with `at_begin` specified as true: // > ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| // > X X // // Usage: // // > var debounced = jQuery.debounce( delay, [ at_begin, ] callback ); // > // > jQuery('selector').bind( 'someevent', debounced ); // > jQuery('selector').unbind( 'someevent', debounced ); // // This also works in jQuery 1.4+: // // > jQuery('selector').bind( 'someevent', jQuery.debounce( delay, [ at_begin, ] callback ) ); // > jQuery('selector').unbind( 'someevent', callback ); // // Arguments: // // delay - (Number) A zero-or-greater delay in milliseconds. For event // callbacks, values around 100 or 250 (or even higher) are most useful. // at_begin - (Boolean) Optional, defaults to false. If at_begin is false or // unspecified, callback will only be executed `delay` milliseconds after // the last debounced-function call. If at_begin is true, callback will be // executed only at the first debounced-function call. (After the // throttled-function has not been called for `delay` milliseconds, the // internal counter is reset) // callback - (Function) A function to be executed after delay milliseconds. // The `this` context and all arguments are passed through, as-is, to // `callback` when the debounced-function is executed. // // Returns: // // (Function) A new, debounced, function. $.debounce = function( delay, at_begin, callback ) { return callback === undefined ? jq_throttle( delay, at_begin, false ) : jq_throttle( delay, callback, at_begin !== false ); }; })(this); trac-code-comments-plugin-master/code_comments/htdocs/code-comments-list.js0000644000175000017500000000171112015430206025623 0ustar wmbwmbjQuery(document).ready(function($){ $('#send-to-ticket').click(function(e) { e.preventDefault(); var ids = $('table.code-comments td.check input:checked' ).map(function(i, e) {return e.id.replace('checked-', '')}).get(); if (!ids.length) { alert("Please select comments to include in the ticket."); return; } window.location = $(this).attr('data-url') + '?ids=' + ids.join(','); }); $check_all_checkbox = $('th.check input'); $all_checkboxes = $('td.check input') $check_all_checkbox.click(function(){ $this = $(this); var checked = $this.attr('checked'); $all_checkboxes.attr('checked', checked); }); $all_checkboxes.click(function(){ var $this = $(this); var all_checked = true; if ( !$this.attr('checked') ) { all_checked = false; } else { $all_checkboxes.each(function(){ if ( !$(this).attr('checked') ) { all_checked = false; } }); } $check_all_checkbox.attr('checked', all_checked); }); }); trac-code-comments-plugin-master/code_comments/htdocs/sort/0002755000175000017500000000000012015430206022550 5ustar wmbwmbtrac-code-comments-plugin-master/code_comments/htdocs/sort/sort.css0000644000175000017500000000050212015430206024244 0ustar wmbwmbtable.code-comments thead tr .header { background-image: url(bg.gif); background-repeat: no-repeat; background-position: center right; cursor: pointer; } table.code-comments thead tr .headerSortUp { background-image: url(asc.gif); } table.code-comments thead tr .headerSortDown { background-image: url(desc.gif); }trac-code-comments-plugin-master/code_comments/htdocs/sort/asc.gif0000644000175000017500000000006612015430206024005 0ustar wmbwmbGIF89a#-0!,  ڛgk$-;trac-code-comments-plugin-master/code_comments/htdocs/sort/bg.gif0000644000175000017500000000010012015430206023614 0ustar wmbwmbGIF89a #-0!,  bxT2W>e`U;trac-code-comments-plugin-master/code_comments/htdocs/sort/desc.gif0000644000175000017500000000006612015430206024155 0ustar wmbwmbGIF89a#-0!, ɭT2Y;trac-code-comments-plugin-master/code_comments/web.py0000644000175000017500000002626012015430206021430 0ustar wmbwmbimport re import copy from trac.core import * from trac.web.chrome import INavigationContributor, ITemplateProvider, add_script, add_script_data, add_stylesheet, add_notice, add_link from trac.web.main import IRequestHandler, IRequestFilter from trac.util import Markup from trac.util.text import to_unicode from trac.util.presentation import Paginator from trac.versioncontrol.api import RepositoryManager from code_comments.comments import Comments from code_comments.comment import CommentJSONEncoder, format_to_html try: import json except ImportError: import simplejson as json class CodeComments(Component): implements(ITemplateProvider, IRequestFilter) href = 'code-comments' # ITemplateProvider methods def get_templates_dirs(self): return [self.get_template_dir()] def get_template_dir(self): from pkg_resources import resource_filename return resource_filename(__name__, 'templates') def get_htdocs_dirs(self): from pkg_resources import resource_filename return [('code-comments', resource_filename(__name__, 'htdocs'))] # IRequestFilter methods def pre_process_request(self, req, handler): return handler def post_process_request(self, req, template, data, content_type): add_stylesheet(req, 'code-comments/code-comments.css') return template, data, content_type class MainNavigation(CodeComments): implements(INavigationContributor) # INavigationContributor methods def get_active_navigation_item(self, req): return self.href def get_navigation_items(self, req): if 'TRAC_ADMIN' in req.perm: yield 'mainnav', 'code-comments', Markup('Code Comments' % ( req.href(self.href) ) ) class JSDataForRequests(CodeComments): implements(IRequestFilter) js_templates = ['top-comments-block', 'comment', 'add-comment-dialog', 'line-comment', 'comments-for-a-line',] # IRequestFilter methods def pre_process_request(self, req, handler): return handler def post_process_request(self, req, template, data, content_type): if data is None: return js_data = { 'comments_rest_url': req.href(CommentsREST.href), 'formatting_help_url': req.href.wiki('WikiFormatting'), 'delete_url': req.href(DeleteCommentForm.href), 'preview_url': req.href(WikiPreview.href), 'templates': self.templates_js_data(), 'active_comment_id': req.args.get('codecomment'), 'username': req.authname, 'is_admin': 'TRAC_ADMIN' in req.perm, } original_return_value = template, data, content_type if req.path_info.startswith('/changeset/'): js_data.update(self.changeset_js_data(req, data)) elif req.path_info.startswith('/browser'): js_data.update(self.browser_js_data(req, data)) elif re.match(r'/attachment/ticket/\d+/.*', req.path_info): js_data.update(self.attachment_js_data(req, data)) else: return original_return_value add_script(req, 'code-comments/json2.js') add_script(req, 'code-comments/underscore-min.js') add_script(req, 'code-comments/backbone-min.js') # jQuery UI includes: UI Core, Interactions, Button & Dialog Widgets, Core Effects, custom theme add_script(req, 'code-comments/jquery-ui/jquery-ui.js') add_stylesheet(req, 'code-comments/jquery-ui/trac-theme.css') add_script(req, 'code-comments/jquery.ba-throttle-debounce.min.js') add_script(req, 'code-comments/code-comments.js') add_script_data(req, {'CodeComments': js_data}) return original_return_value def templates_js_data(self): data = {} for name in self.js_templates: # we want to use the name as JS identifier and we can't have dashes there data[name.replace('-', '_')] = self.template_js_data(name) return data def changeset_js_data(self, req, data): return {'page': 'changeset', 'revision': data['new_rev'], 'path': '', 'selectorToInsertBefore': 'div.diff:first'} def browser_js_data(self, req, data): return {'page': 'browser', 'revision': data['rev'], 'path': data['path'], 'selectorToInsertBefore': 'table#info'} def attachment_js_data(self, req, data): path = req.path_info.replace('/attachment/', 'attachment:/') return {'page': 'attachment', 'revision': 0, 'path': path, 'selectorToInsertBefore': 'table#info'} def template_js_data(self, name): file_name = name + '.html' return to_unicode(open(self.get_template_dir() + '/js/' + file_name).read()) class ListComments(CodeComments): implements(IRequestHandler) COMMENTS_PER_PAGE = 50 # IRequestHandler methods def match_request(self, req): return req.path_info == '/' + self.href def process_request(self, req): req.perm.require('TRAC_ADMIN') self.data = {} self.args = {} self.req = req self.per_page = int(req.args.get('per-page', self.COMMENTS_PER_PAGE)) self.page = int(req.args.get('page', 1)) self.order_by = req.args.get('orderby', 'id') self.order = req.args.get('order', 'DESC') self.add_path_and_author_filters() self.comments = Comments(req, self.env); self.data['comments'] = self.comments.search(self.args, self.order, self.per_page, self.page, self.order_by) self.data['reponame'], repos, path = RepositoryManager(self.env).get_repository_by_path('/') self.data['can_delete'] = 'TRAC_ADMIN' in req.perm self.data['paginator'] = self.get_paginator() self.data['current_sorting_method'] = self.order_by self.data['current_order'] = self.order self.data['sortable_headers'] = [] self.data.update(self.comments.get_filter_values()) self.prepare_sortable_headers() return 'comments.html', self.data, None def post_process_request(self, req, template, data, content_type): add_stylesheet(req, 'code-comments/sort/sort.css') add_script(req, 'code-comments/code-comments-list.js') return template, data, content_type def add_path_and_author_filters(self): self.data['current_path_selection'] = ''; self.data['current_author_selection'] = ''; if self.req.args.get('filter-by-path'): self.args['path__prefix'] = self.req.args['filter-by-path']; self.data['current_path_selection'] = self.req.args['filter-by-path'] if self.req.args.get('filter-by-author'): self.args['author'] = self.req.args['filter-by-author'] self.data['current_author_selection'] = self.req.args['filter-by-author'] def get_paginator(self): def href_with_page(page): args = copy.copy(self.req.args) args['page'] = page return self.req.href(self.href, args) paginator = Paginator(self.data['comments'], self.page-1, self.per_page, Comments(self.req, self.env).count(self.args)) if paginator.has_next_page: add_link(self.req, 'next', href_with_page(self.page + 1), 'Next Page') if paginator.has_previous_page: add_link(self.req, 'prev', href_with_page(self.page - 1), 'Previous Page') shown_pages = paginator.get_shown_pages(page_index_count = 11) links = [{'href': href_with_page(page), 'class': None, 'string': str(page), 'title': 'Page %d' % page} for page in shown_pages] paginator.shown_pages = links paginator.current_page = {'href': None, 'class': 'current', 'string': str(paginator.page + 1), 'title': None} return paginator def prepare_sortable_headers(self): displayed_sorting_methods = ('id', 'author', 'time', 'path', 'text') displayed_sorting_method_names = ('ID', 'Author', 'Date', 'Path', 'Text') query_args = self.req.args if ( query_args.has_key('page') ): del query_args['page'] for sorting_method, sorting_method_name in zip(displayed_sorting_methods, displayed_sorting_method_names): query_args['orderby'] = sorting_method html_class = 'header' if self.order_by == sorting_method: if 'ASC' == self.order: query_args['order'] = 'DESC' html_class += ' headerSortUp' else: query_args['order'] = 'ASC' html_class += ' headerSortDown' link = self.req.href(self.href, query_args) self.data['sortable_headers'].append({ 'name': sorting_method_name, 'link': link, 'html_class': html_class }) class DeleteCommentForm(CodeComments): implements(IRequestHandler) href = CodeComments.href + '/delete' # IRequestHandler methods def match_request(self, req): return req.path_info == '/' + self.href def process_request(self, req): req.perm.require('TRAC_ADMIN') if 'GET' == req.method: return self.form(req) else: return self.delete(req) def form(self, req): data = {} referrer = req.get_header('Referer') data['comment'] = Comments(req, self.env).by_id(req.args['id']) data['return_to'] = referrer return 'delete.html', data, None def delete(self, req): comment = Comments(req, self.env).by_id(req.args['id']) comment.delete() add_notice(req, 'Comment deleted.') req.redirect(req.args['return_to'] or req.href()) class BundleCommentsRedirect(CodeComments): implements(IRequestHandler) href = CodeComments.href + '/create-ticket' # IRequestHandler methods def match_request(self, req): return req.path_info == '/' + self.href def process_request(self, req): text = '' for id in req.args['ids'].split(','): comment = Comments(req, self.env).by_id(id) text += """ [[CodeCommentLink(%(id)s)]] %(comment_text)s """.lstrip() % {'id': id, 'comment_text': comment.text} req.redirect(req.href.newticket(description=text)) class CommentsREST(CodeComments): implements(IRequestHandler) href = CodeComments.href + '/comments' # IRequestHandler methods def match_request(self, req): return req.path_info.startswith('/' + self.href) def return_json(self, req, data, code=200): req.send(json.dumps(data, cls=CommentJSONEncoder), 'application/json') def process_request(self, req): #TODO: catch errors if '/' + self.href == req.path_info: if 'GET' == req.method: self.return_json(req, Comments(req, self.env).search(req.args)) if 'POST' == req.method: comments = Comments(req, self.env) id = comments.create(json.loads(req.read())) self.return_json(req, comments.by_id(id)) class WikiPreview(CodeComments): implements(IRequestHandler) href = CodeComments.href + '/preview' # IRequestHandler methods def match_request(self, req): return req.path_info.startswith('/' + self.href) def process_request(self, req): req.send(format_to_html(req, self.env, req.args.get('text', '')).encode('utf-8')) trac-code-comments-plugin-master/code_comments/ticket_event_listener.py0000644000175000017500000000441112015430206025236 0ustar wmbwmbfrom trac.core import * from trac.ticket.api import ITicketChangeListener import re from code_comments.comment_macro import CodeCommentLinkMacro class UpdateTicketCodeComments(Component): """Automatically stores relations to CodeComments whenever a ticket is saved or created Note: This does not catch edits on replies right away but on the next change of the ticket or when adding a new reply """ implements(ITicketChangeListener) def ticket_created(self, ticket): self.update_relations(ticket) def ticket_changed(self, ticket, comment, author, old_values): self.update_relations(ticket) def ticket_deleted(self, ticket): self.update_relations(ticket) def update_relations(self, ticket): comment_ids = [] # (time, author, field, oldvalue, newvalue, permanent) changes = ticket.get_changelog() description = ticket['description'] comment_ids += re.findall(CodeCommentLinkMacro.re, description) if changes: for change in changes: if change[2] == 'comment': comment_ids += re.findall(CodeCommentLinkMacro.re, change[4]) comment_ids = set(comment_ids) comment_ids_csv = ','.join(comment_ids) existing_comments_query = "SELECT * FROM ticket_custom WHERE ticket = %s AND name = 'code_comment_relation'" existing_comments = self.fetch(existing_comments_query, [ticket.id]) if existing_comments: self.query("UPDATE ticket_custom SET value=%s WHERE ticket=%s AND name='code_comment_relation'", [comment_ids_csv, ticket.id]) else: self.query("INSERT INTO ticket_custom (ticket, name, value) VALUES (%s, 'code_comment_relation', %s)", [ticket.id, comment_ids_csv]) def query(self, query, args = [], result_callback=None): if result_callback is None: result_callback = lambda db, cursor: True result = {} @self.env.with_transaction() def insert_comment(db): cursor = db.cursor() cursor.execute(query, args) result['result'] = result_callback(db, cursor) return result['result'] def fetch(self, query, args = []): return self.query(query, args, lambda db, cursor: cursor.fetchall()) trac-code-comments-plugin-master/code_comments/comment.py0000644000175000017500000001336512015430206022317 0ustar wmbwmbimport re import locale import trac.wiki.formatter from trac.mimeview.api import Context from time import strftime, localtime from code_comments import db from trac.util import Markup try: import json except ImportError: import simplejson as json try: import hashlib md5_hexdigest = lambda s: hashlib.md5(s).hexdigest() except ImportError: import md5 md5_hexdigest = lambda s: md5.new(s).hexdigest() VERSION = 1 class Comment: columns = [column.name for column in db.schema['code_comments'].columns] required = 'text', 'author' _email_map = None def __init__(self, req, env, data): if isinstance(data, dict): self.__dict__ = data else: self.__dict__ = dict(zip(self.columns, data)) self.env = env self.req = req if self._empty('version'): self.version = VERSION self.html = format_to_html(self.req, self.env, self.text) email = self.email_map().get(self.author, 'baba@baba.net') self.email_md5 = md5_hexdigest(email) attachment_info = self.attachment_info() self.is_comment_to_attachment = attachment_info['is'] self.attachment_ticket = attachment_info['ticket'] self.attachment_filename = attachment_info['filename'] self.is_comment_to_changeset = self.revision and not self.path self.is_comment_to_file = self.revision and self.path def _empty(self, column_name): return not hasattr(self, column_name) or not getattr(self, column_name) def email_map(self): if Comment._email_map is None: Comment._email_map = {} for username, name, email in self.env.get_known_users(): if email: Comment._email_map[username] = email return Comment._email_map def validate(self): missing = [column_name for column_name in self.required if self._empty(column_name)] if missing: raise ValueError("Comment column(s) missing: %s" % ', '.join(missing)) def href(self): if self.is_comment_to_file: href = self.req.href.browser(self.path, rev=self.revision, codecomment=self.id) elif self.is_comment_to_changeset: href = self.req.href.changeset(self.revision, codecomment=self.id) elif self.is_comment_to_attachment: href = self.req.href('/attachment/ticket/%d/%s' % (self.attachment_ticket, self.attachment_filename), codecomment=self.id) if self.line: href += '#L' + str(self.line) return href def link_text(self): if self.revision and not self.path: return '[%s]' % self.revision if self.path.startswith('attachment:'): return self.attachment_link_text() # except the two specials cases of changesets (revision-only) # and arrachments (path-only), we must always have them both assert self.path and self.revision link_text = self.path + '@' + str(self.revision) if self.line: link_text += '#L' + str(self.line) return link_text def attachment_link_text(self): return '#%s: %s' % (self.attachment_ticket, self.attachment_filename) def trac_link(self): if self.is_comment_to_attachment: return '[%s %s]' % (self.req.href()) return 'source:' + self.link_text() def attachment_info(self): info = {'is': False, 'ticket': None, 'filename': None} info['is'] = self.path.startswith('attachment:') if not info['is']: return info match = re.match(r'attachment:/ticket/(\d+)/(.*)', self.path) if not match: return info info['ticket'] = int(match.group(1)) info['filename'] = match.group(2) return info def path_link_tag(self): return Markup('%s' % (self.href(), self.link_text())) def formatted_date(self): encoding = locale.getlocale()[1] if locale.getlocale()[1] else 'utf-8' return strftime('%d %b %Y, %H:%M', localtime(self.time)).decode(encoding) def get_ticket_relations(self): relations = set() db = self.env.get_db_cnx() cursor = db.cursor() query = """SELECT ticket FROM ticket_custom WHERE name = 'code_comment_relation' AND (value LIKE '%(comment_id)d' OR value LIKE '%(comment_id)d,%%' OR value LIKE '%%,%(comment_id)d' OR value LIKE '%%,%(comment_id)d,%%')""" % {'comment_id': self.id} result = {} @self.env.with_transaction() def get_ticket_ids(db): cursor = db.cursor() cursor.execute(query) result['tickets'] = cursor.fetchall() return set([int(row[0]) for row in result['tickets']]) def get_ticket_links(self): relations = self.get_ticket_relations() links = ['[[ticket:%s]]' % relation for relation in relations] return format_to_html(self.req, self.env, ', '.join(links)) def delete(self): @self.env.with_transaction() def delete_comment(db): cursor = db.cursor() cursor.execute("DELETE FROM code_comments WHERE id=%s", [self.id]) class CommentJSONEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, Comment): for_json = dict([(name, getattr(o, name)) for name in o.__dict__ if isinstance(getattr(o, name), (basestring, int, list, dict))]) for_json['formatted_date'] = o.formatted_date() for_json['permalink'] = o.href() return for_json else: return json.JSONEncoder.default(self, o) def format_to_html(req, env, text): context = Context.from_request(req) return trac.wiki.formatter.format_to_html(env, context, text) trac-code-comments-plugin-master/code_comments/templates/0002755000175000017500000000000012015430206022273 5ustar wmbwmbtrac-code-comments-plugin-master/code_comments/templates/js/0002755000175000017500000000000012015430206022707 5ustar wmbwmbtrac-code-comments-plugin-master/code_comments/templates/js/line-comment.html0000644000175000017500000000057012015430206026164 0ustar wmbwmb
<%= html %>
by <%= author %> @ <%= formatted_date %> <% if (can_delete) { %> • Delete <% } %> trac-code-comments-plugin-master/code_comments/templates/js/top-comments-block.html0000644000175000017500000000011112015430206027301 0ustar wmbwmb

Comments

    trac-code-comments-plugin-master/code_comments/templates/js/add-comment-dialog.html0000644000175000017500000000037512015430206027225 0ustar wmbwmb

    Preview

    Wiki Formatting

    trac-code-comments-plugin-master/code_comments/templates/js/comment.html0000644000175000017500000000076312015430206025243 0ustar wmbwmb
    gravatar for <%= author %> <%= author %> @ <%= formatted_date %>#<%= id %> <% if (can_delete) { %> Delete <% } %>
    <%= html %>
    trac-code-comments-plugin-master/code_comments/templates/js/comments-for-a-line.html0000644000175000017500000000013312015430206027344 0ustar wmbwmb  
      trac-code-comments-plugin-master/code_comments/templates/comments.html0000644000175000017500000000615312015430206025011 0ustar wmbwmb Code Comments

      Code Comments

       Filter comments:
      $header.name Tickets Actions
      $comment.id $comment.author ${comment.formatted_date()} ${comment.path_link_tag()} $comment.html ${comment.get_ticket_links()}
      trac-code-comments-plugin-master/code_comments/templates/delete.html0000644000175000017500000000241512015430206024423 0ustar wmbwmb Code Comments - Delete Comment

      Delete Comment

      Do you want to delete this comment:

      ID
      $comment.id
      Author
      $comment.author
      Time
      ${comment.formatted_date()}
      Text
      $comment.html
      Path
      ${comment.path_link_tag()}

      Cancel

      trac-code-comments-plugin-master/code_comments/comments.py0000644000175000017500000001143112015430206022472 0ustar wmbwmbimport os.path from time import time from code_comments.comment import Comment class Comments: FILTER_MAX_PATH_DEPTH = 2 def __init__(self, req, env): self.req, self.env = req, env self.valid_sorting_methods = ('id', 'author', 'time', 'path', 'text') def comment_from_row(self, row): return Comment(self.req, self.env, row) def get_filter_values(self): comments = self.all() return { 'paths': self.get_all_paths(comments), 'authors': self.get_all_comment_authors(comments), } def get_all_paths(self, comments): get_directory = lambda path: '/'.join(os.path.split(path)[0].split('/')[:self.FILTER_MAX_PATH_DEPTH]) return sorted(set([get_directory(comment.path) for comment in comments if get_directory(comment.path)])) def get_all_comment_authors(self, comments): return sorted(list(set([comment.author for comment in comments]))) def select(self, *query): result = {} @self.env.with_transaction() def get_comments(db): cursor = db.cursor() cursor.execute(*query) result['comments'] = cursor.fetchall() return [self.comment_from_row(row) for row in result['comments']] def count(self, args = {}): conditions_str, values = self.get_condition_str_and_corresponding_values(args) where = '' if conditions_str: where = 'WHERE '+conditions_str query = 'SELECT COUNT(*) FROM code_comments ' + where result = {} @self.env.with_transaction() def get_comment_count(db): cursor = db.cursor() cursor.execute(query, values) result['count'] = cursor.fetchone()[0] return result['count'] def all(self): return self.search({}, order='DESC') def by_id(self, id): return self.select("SELECT * FROM code_comments WHERE id=%s", [id])[0] def assert_name(self, name): if not name in Comment.columns: raise ValueError("Column '%s' doesn't exist." % name) def search(self, args, order = 'ASC', per_page = None, page = 1, order_by = 'time'): if order_by not in self.valid_sorting_methods: order_by = 'time' conditions_str, values = self.get_condition_str_and_corresponding_values(args) where = '' limit = '' if conditions_str: where = 'WHERE '+conditions_str if order != 'ASC': order = 'DESC' if per_page: limit = ' LIMIT %d OFFSET %d' % (per_page, (page - 1)*per_page) return self.select('SELECT * FROM code_comments ' + where + ' ORDER BY ' + order_by + ' ' + order + limit, values) def get_condition_str_and_corresponding_values(self, args): conditions = [] values = [] for name in args: if not name.endswith('__in') and not name.endswith('__prefix'): values.append(args[name]) if name.endswith('__gt'): name = name.replace('__gt', '') conditions.append(name + ' > %s') elif name.endswith('__lt'): name = name.replace('__lt', '') conditions.append(name + ' < %s') elif name.endswith('__prefix'): values.append(args[name].replace('%', '\\%').replace('_', '\\_') + '%') name = name.replace('__prefix', '') conditions.append(name + ' LIKE %s') elif name.endswith('__in'): items = [item.strip() for item in args[name].split(',')] name = name.replace('__in', '') for item in items: values.append(item) conditions.append(name + ' IN (' + ','.join(['%s']*len(items)) + ')') else: conditions.append(name + ' = %s') # don't let SQL injections in - make sure the name is an existing comment column self.assert_name(name) conditions_str = ' AND '.join(conditions) return conditions_str, values def create(self, args): comment = Comment(self.req, self.env, args) comment.validate() comment.time = int(time()) column_names_to_insert = [column_name for column_name in comment.columns if column_name != 'id'] values = [getattr(comment, column_name) for column_name in column_names_to_insert] comment_id = [None] @self.env.with_transaction() def insert_comment(db): cursor = db.cursor() sql = "INSERT INTO code_comments (%s) values(%s)" % (', '.join(column_names_to_insert), ', '.join(['%s'] * len(values))) self.env.log.debug(sql) cursor.execute(sql, values) comment_id[0] = db.get_last_id(cursor, 'code_comments') return comment_id[0] trac-code-comments-plugin-master/code_comments/comment_macro.py0000644000175000017500000000131212015430206023465 0ustar wmbwmbfrom code_comments.comments import Comments from genshi.builder import tag from trac.wiki.macros import WikiMacroBase class CodeCommentLinkMacro(WikiMacroBase): """CodeCommentLink macro. This macro is used to embed a comment link in a ticket or wiki page: [[CodeCommentLink(5)]] where the number in the parentheses is the comment ID. """ revision = "$Rev$" url = "$URL$" re = r'\[\[CodeCommentLink\((\d+)\)\]\]' def expand_macro(self, formatter, name, text, args): try: comment = Comments(formatter.req, formatter.env).by_id(text) return tag.a(comment.link_text(), href=comment.href()) except: return ''trac-code-comments-plugin-master/CHANGELOG0000644000175000017500000000100712015430206016664 0ustar wmbwmbCHANGELOG 1.1 2012-04-05 * NEW: Paging for comments listing page * Pagination now respects filter arguments * Fix expander icon not working in tree view * Closed issues: https://github.com/Automattic/trac-code-comments-plugin/issues?milestone=3&state=closed 1.0.1 2012-02-13 * Fix AJAX calls not working in sub-folder installs * Closed issues: https://github.com/Automattic/trac-code-comments-plugin/issues?milestone=1&state=closed * Props: https://github.com/mumpitzstuff 1.0.0 2012-01-31 * Initial releasetrac-code-comments-plugin-master/setup.py0000644000175000017500000000112512015430206017165 0ustar wmbwmbfrom setuptools import find_packages, setup setup( name='TracCodeComments', version='1.1.1', author='Nikolay Bachiyski, Thorsten Ott', author_email='nikolay@automattic.com, tott@automattic.com', description='Tool for leaving inline code comments', packages=find_packages(exclude=['*.tests*']), entry_points = { 'trac.plugins': [ 'code_comments = code_comments', ], }, package_data = {'code_comments': ['templates/*.html', 'templates/js/*.html', 'htdocs/*.*','htdocs/jquery-ui/*.*', 'htdocs/jquery-ui/images/*.*', 'htdocs/sort/*.*']}, ) trac-code-comments-plugin-master/LICENSE0000644000175000017500000004325412015430206016471 0ustar wmbwmb GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. trac-code-comments-plugin-master/screenshots/0002755000175000017500000000000012015430206020016 5ustar wmbwmbtrac-code-comments-plugin-master/screenshots/0.png0000644000175000017500000014001412015430206020661 0ustar wmbwmbPNG  IHDR+(>iCCPICC ProfilexXeX֞gtwwwww7nPRPJP)$D0 2@A{}{Ώs}s]3sϚg̽Y @9Az3@5#"Tϴ3kXSwPxzExA0nqGhx${sDDSq מ`pkK-XgB ,g cU_'t'k 90wq|Z K"BqEP`_.q^6VpM gc>//h+X3 pni_?W/GtGx wиp?Hv 2 =D%%$@/-Z@#eh a kˇUZc)&vX؂؏82q '9pp^[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^l[cl qS}V +A2ms=pɕ"qEYznpU)w3p/\Daol 7.գ҅FG7TGr?DsxzY)p`8 uMMZ<[t5h @ lP75g+66kѭ R0RlLd@T/ S ϶ⰱ|NN4p&,Xh |ePi2eb XkT8gboHycĂL& "[Pv| F&<ÕwȚ lmF:͎GV~n<;o|̜Σkq)(]h^m= cM!$6qtݲA Mp"2sqB'z\ɔ+NjpSV{ Ky玈FArh*H'҈DD!?|ixfttm%v7M1:Е7훉=0بբA|%>^K&]e8j ԰٠$ۈʫS.FگGN>}X&vIJpg %>ifDHKlY>rZ ۃjи(o`&Jo2@jh(o`&Jo2@jh(o`&Jo2@j|#QQ& P.(---}hdʀW3(j?Ze2p]oDEE566Bk:@3eIMȰ  8IDATHHQ(}XzMiTʀ0@tI x(==L 4QHGQʀsSϔʀ0YɴX IoBYX`/$pI-L\z!`Zqa".0ygߌG`L' b桌oW}-B=ZJma !Wwu33xŴPn0܇9%Z;Tϲ.v%'*; z,i⤃}ZUR^& =(1?7x '+-KLTlLcko[m*/:DH6ve}-V(]e]?I:[g#ou7 )WrN{j2F*'bSCAxlz+m5$9"2U!9Xjc?2b΄Oo8@Qot\UӃGt䄠!Cy_G+}L,醴g/2cYb[ yp^nqp ʓfhVCu f?υ+G+<8;P* } ` uttC>{l8Q8_MMMg'rE>a +9ЭXq[vg6*&?=ccq2- ɮ ISe kbCkfK=50@%}Gٷ{FG x(=B;uJ 4QRoQʀGDinmy&d[(S_gcO?_'/ǿ¸abm_ Bpbw|M@dSS [[z{0K8qzqzLQ=f>L3N 24QrQua7s6n\s]t{ݝisep(޽@ P Х7* P(|j_h P(ƀ'eU+5cMIѯ,m PX<(gOkFXvp6tDR(^ˀOmf~kȘ3.ky(%JޛZkr G$0?R} 2@B initenv The default offered values are good. This will create a directory with the Trac install in the current directory. 2. Create a local SVN repo: $ svnadmin create 3. Checkout the repo and add a dummy file: $ svn co file:// # including leading slash, e.g. file:///home/username/svn-repo/ 4. Add the repo in the trac.ini: $ $EDITOR /conf/trac.ini Change: repository_dir = repository_type = svn 5. Create htpasswd file for Trac auth: $ htpasswd -c Remember the file location. 6. Add yourself as admin: $ $ trac-admin permission add TRAC_ADMIN 6. Run trac server: $ tracd -s -r --port 8000 --basic-auth=',,' # see http://trac.edgewall.org/wiki/TracStandalone You should now have a working vanilla Trac at http://localhost:8000/, where you can log in and be an admin. 7. Checkout the plugin in R/W mode $ git clone git@github.com:Automattic/vip-trac-code-comments.git 8. Deploy the plugin in development mode $ python setup.py develop -mxd /plugins 9. Go to the Admin section in Trac, then Plugins and enable all the components of the TracCodeComments plugin and also the CodeComments macrotrac-code-comments-plugin-master/.gitignore0000644000175000017500000000112412015430206017442 0ustar wmbwmbtracd.sh ################ # Python ignores ################ # stolen from https://github.com/github/gitignore/blob/master/Python.gitignore *.py[co] # Packages *.egg *.egg-info dist build eggs parts bin var sdist develop-eggs .installed.cfg # Installer logs pip-log.txt # Unit test / coverage reports .coverage .tox #Translations *.mo #Mr Developer .mr.developer.cfg ############# # OSX Ignores ############# # stolen from https://github.com/github/gitignore/blob/master/Global/OSX.gitignore .DS_Store # Thumbnails ._* # Files that might appear on external disk .Spotlight-V100 .Trashes