Bug 140619 - Support links to CSS files
Summary: Support links to CSS files
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 2.2.0 M6   Edit
Assignee: Wenbin He CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2006-05-08 13:19 EDT by Krishna Venkatraman CLA
Modified: 2007-04-02 18:49 EDT (History)
4 users (show)

See Also:


Attachments
Feature spec (216.31 KB, application/pdf)
2007-04-02 18:23 EDT, Rima Kanguri CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Krishna Venkatraman CLA 2006-05-08 13:19:03 EDT
CSS files are currently imported into the report design. A more common
use case is to link to the CSS file which is maintained outside of the report
design environment. This way, updates made to the CSS file do not require
re-importing.

This would be similar to the library concept.
Comment 1 Ivy Li CLA 2006-05-08 22:20:51 EDT
The CSS file is not designed as the library concept. It is not auto referenced. Once you import the CSS styls from the external CSS file, the style is created in the report design and can work alone without the CSS file. 
Comment 2 Krishna Venkatraman CLA 2006-05-09 13:27:20 EDT
This is not a bug. It is an enhancement request to make CSS files auto referenceable. Please don't close out enhancement requests. That is the job of product management I believe.
Comment 3 Ivy Li CLA 2006-10-27 02:33:56 EDT
The CSS style sheet is created for user the import the style into birt design but not for reference. The style can be referenced from library. 
Comment 4 xingjie he CLA 2007-02-08 03:50:16 EST
Now model loads styles into report design.And there is no reference between css file and styles. Because for model we can't know when css file is changed and when it should be reloaded. It is different from library. When library inclued in report design is changed, GUI will tell model library is changed and should be refreshed.
For css file,GUI can't give us more information about whether css file is changed.
For regular solution, model should check it time by time. Set a timer maybe every 5 or 10 minutes to check the css file whether this file is lost or be edited. I don't think such enhancement is deserved. You know the timer will cost a lot of performance. Otherwise I don't know the better method to check status of css file time by time. So please check it. Thanks!
Comment 5 Wenfeng Li CLA 2007-02-08 04:03:31 EST
(In reply to comment #4)
> Now model loads styles into report design.And there is no reference between css
> file and styles. Because for model we can't know when css file is changed and
> when it should be reloaded. It is different from library. When library inclued
> in report design is changed, GUI will tell model library is changed and should
> be refreshed.
> For css file,GUI can't give us more information about whether css file is
> changed.
> For regular solution, model should check it time by time. Set a timer maybe
> every 5 or 10 minutes to check the css file whether this file is lost or be
> edited. I don't think such enhancement is deserved. You know the timer will
> cost a lot of performance. Otherwise I don't know the better method to check
> status of css file time by time. So please check it. Thanks!


I agree there is no need to auto detect the css file has been changed after it is loaded into report design.  Suggest we only need to support loading the css file when the report design XML is openned.  And provide method on the report design handle to reload the referenced css file, and also provide a method to reload referenced libraries.  MOdel do not need to detect library file change or css file change.   

THe client of model can decide if it will detect lib or css file change or simply require user to manually reload the referenced lib or css files. Regardless if such auto detection is implemented by UI or not, the ability to reference a CSS file in model is still a very useful feature, expecially after the report is deployed.

Please only load the referenced css file during report generation. Then the styles should be extracted from the css file and persisted into the report document.  THe report document should be self-contained.  It should not depend on the external CSS file.  During render task, there should be no need to load the external css file.



Comment 6 xingjie he CLA 2007-02-08 22:53:30 EST
If want to load css file when opening report design xml file , model should store its relative file path like library. I think absolute file path is forbiddened. Following our file search strategy, css file should be under 'org.eclipse.birt.resources' plugin package , resource folder or the same folder of input design file. So GUI or others should do such copy action when first create relationship between design file and css file. Then model will support importCss, refreshCss , removeCss method. 
Comment 7 Rima Kanguri CLA 2007-04-02 18:23:59 EDT
Created attachment 62731 [details]
Feature spec
Comment 8 Rima Kanguri CLA 2007-04-02 18:49:39 EDT
Model and UI changes are done.