A generic printing class that assists with the printing of any Ext.Component
License
edspencer/Ext.ux.Printer
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Overview ======== Ext.ux.Printer is a small library that provides a generic way of printing Ext Components (Grids, Trees, etc). It consists of the main Printer class, and a number of Renderers, which each provide support for a given type of component. Installation ============ Printer.js and renderers/Base.js are required: <script type="text/javascript" src="Printer.js"></script> <script type="text/javascript" src="renderers/Base.js"></script> The library currently comes with renderers for Ext.grid.GridPanel, and Ext.tree.ColumnTree. These can be included as required: <script type="text/javascript" src="renderers/GridPanel.js"></script> <script type="text/javascript" src="renderers/ColumnTree.js"></script> Usage ===== Ext.ux.Printer.print just take a single argument - a normal component instance. Use it like this: var myGrid = new Ext.grid.GridPanel({ //your usual grid config here }); var myTree = new Ext.tree.ColumnTree({ //your usual tree config here }) Ext.ux.Printer.print(myGrid); Ext.ux.Printer.print(myTree); Each of the above examines the component you pass to the print function, and if a suitable renderer has been created for it, the component is printed by opening a new window, writing some print-friendly HTML to it, and calling the window's print function. Currently supported components are: Ext.grid.GridPanel Ext.tree.ColumnTreePanel To add support for another Component type, simply subclass Ext.ux.Printer.BaseRenderer (see the existing renderers for examples), and register it with Ext.ux.Printer.registerRenderer('somextype', Ext.ux.Printer.SomeComponentRenderer).
About
A generic printing class that assists with the printing of any Ext.Component
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published