Changeset 1187
- Timestamp:
- 07/28/08 13:15:16
- Files:
-
- qtheme.template/trunk/qthemetemplate/localcommands/subtemplates.py (modified) (1 diff)
- qtheme.template/trunk/qthemetemplate/localcommands/templates/jsresource (added)
- qtheme.template/trunk/qthemetemplate/localcommands/templates/jsresource/browser (added)
- qtheme.template/trunk/qthemetemplate/localcommands/templates/jsresource/browser/configure.zcml_insert (added)
- qtheme.template/trunk/qthemetemplate/localcommands/templates/jsresource/browser/scripts (added)
- qtheme.template/trunk/qthemetemplate/localcommands/templates/jsresource/browser/scripts/+js_resource_name+_tmpl (added)
- qtheme.template/trunk/qthemetemplate/localcommands/templates/jsresource/browser/scripts/README.txt_tmpl (added)
- qtheme.template/trunk/qthemetemplate/localcommands/templates/jsresource/profiles (added)
- qtheme.template/trunk/qthemetemplate/localcommands/templates/jsresource/profiles/default (added)
- qtheme.template/trunk/qthemetemplate/localcommands/templates/jsresource/profiles/default/jsregistry.xml_insert (added)
- qtheme.template/trunk/qthemetemplate/templates/qplone3_theme/+namespace_package+/+namespace_package2+/+package+/profiles/default/jsregistry.xml_tmpl (modified) (2 diffs)
- qtheme.template/trunk/setup.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qtheme.template/trunk/qthemetemplate/localcommands/subtemplates.py
r1184 r1187 71 71 vars['css_resource_content'] = file(vars['css_file_path'],'rb').read() 72 72 73 74 class JSSubTemplate(QThemeSubTemplate): 75 """ 76 A Plone JS resource skeleton 77 """ 78 _template_dir = 'templates/jsresource' 79 summary = "A Plone 3 JS resource template" 80 81 82 vars = [ 83 var('js_resource_name', 'Name of JS resource', default="foo.js"), 84 var('js_file_path', 'Path to JS file'), 85 var('jsreg_inline', 'Optional.Boolean', default="False"), 86 var('jsreg_cacheable', '', default="True"), 87 var('jsreg_compression', 'Compression type.Possible:none,safe,full,safe-encode,full-encode', 88 default="safe"), 89 var('jsreg_cookable', 'Boolean, aka merging allowed', default="True"), 90 var('jsreg_enables', 'Optional.Boolean', default="1"), 91 var('jsreg_expression', 'Optional.A tal condition.', default=""), 92 ] 93 94 def pre(self, command, output_dir, vars): 95 """ Set 'js_resource_content' value from js_file_path 96 """ 97 98 if not os.path.isfile(vars['js_file_path']): 99 raise ValueError('%s - wrong file path for js resource' % \ 100 vars['js_file_path'] ) 101 vars['js_resource_content'] = file(vars['js_file_path'],'rb').read() 102 qtheme.template/trunk/qthemetemplate/templates/qplone3_theme/+namespace_package+/+namespace_package2+/+package+/profiles/default/jsregistry.xml_tmpl
r1176 r1187 6 6 #end if 7 7 <object name="portal_javascripts"> 8 9 <!-- -*- extra stuff goes here -*- --> 8 10 9 11 #if str($include_doc) == 'True' … … 27 29 enabled="True" expression="" inline="False"/> 28 30 --> 29 30 31 #end if 31 32 </object> qtheme.template/trunk/setup.py
r1184 r1187 30 30 skin_sublayer = qthemetemplate.localcommands.subtemplates:SkinSublayerSubTemplate 31 31 css_resource = qthemetemplate.localcommands.subtemplates:CSSSubTemplate 32 js_resource = qthemetemplate.localcommands.subtemplates:JSSubTemplate 32 33 33 34 # -*- Entry points: -*-
