File structure:
sample_extension
js
extension.js
__init__.py
extension.py
setup.py
I had to change the extension.js file extension to ".txt" so google would
send it.
Thanks,
Christopher Nostrand
--
Supercharge your Review Board with Power Pack:
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons:
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/reviewboard/3ce36f63-3607-4a11-b715-c97b8a7b6473n%40googlegroups.com.
from reviewboard.extensions.base import Extension, JSExtension
class SampleJSExtension(JSExtension):
model_class = 'SampleExtensionProject.Extension'
class SampleExtension(Extension):
js_extensions = [SampleJSExtension]
js_bundles = {
'default': {
'source_filenames': (
'js/extension.js',
),
}
}from reviewboard.extensions.packaging import setup
from setuptools import find_packages
setup(
name='sample_extension',
version='0.1',
description='Description of extension package.',
author='Christopher Nostrand',
packages=find_packages(),
entry_points={
'reviewboard.extensions': [
'sample_extension = sample_extension.extension:SampleExtension',
]
},
)window.SampleExtensionProject = {};
SampleExtensionProject.CommentDialogHookView = Backbone.View.extend({
initialize: function(options) {
this.commentDialog = options.commentDialog;
this.commentEditor = options.commentEditor;
},
render: function() {
}
});
SampleExtensionProject.Extension = RB.Extension.extend({
initialize: function() {
RB.Extension.initialize.call(this);
new RB.CommentDialogHook({
extension: this,
viewType: SampleExtensionProject.CommentDialogHookView
});
}
});