PX Style Overrider


  • Overrides PX Page Styling
  • Invisible on screen
  • Create transparent background widgets
  • Combine with our dashboard products
Add to Cart
n4 pxStyleOverrider

Overview


The PX Style Overrider basically overrides any style already on the px page. This is helpful say if you wan to have transparent widgets on screen. Before you start, copy the .jar file to your modules directory. Restart the station and Workbench.

Are you looking for a cost effective way to manage and visualize data for all your customers? Why not have a look at View Builder?

Usage


Before you start. Download the modules from our portal (see your order confirmation, which also explains licensing). Copy the modules file to your modules directory. Restart BOTH station and Workbench.

1. Copy the pxStyleOverrider-ux.jar file to your modules directory.
2. Open the module from your palette file.
3. Drag and drop the widget from the palette onto your px view.

Tridium px page


Properties


bms totals chart properties

Height, Width:

Size of the transparent box on screen. Can be in pixels or percentage. E.g. 1px or 1%.

Background Color:

Can be transparent or a color choosen from the color palette.

CSS Override:

This is where you can enter css styling of your choice. You must remove line breaks from the value. For example you could enter the following to create a transparent background when using an hx profile.


    body { background: transparent; } .hx { background: transparent !important; } .hxPx { background: transparent !important; } .window-bg { background: transparent !important; }

To find styles you want, in Chrome use Dev tools to asssit you.

n4 pxStyleOverrider

Using in your HTML Page


You can now use the widget in your custom html page as long as the html file is in a appropriate station directory. E.g.:
C:/../station/shared/demo1.html

1. Create an html page and place in your station files directory.
2. Create a div element and give it an id so you can inject the widget into this area. E.g.: widget1.
3. Add the following scripts before the closing head tag or the closing body tag. E.g.:

    
        <script type="text/javascript">

            var require = {
                paths: {
                    //pointing nmodule at /module is a Niagara convention, allowing us to
                    //refer to module resources without having RequireJS get hung up on
                    //the use of absolute paths everywhere.
                    "nmodule": "/module",
                    "baja": "/module/bajaScript/rc/plugin/baja",
                    "bajaScript": "/module/bajaScript/rc",
                    "bajaux": "/module/bajaux/rc",
                    "lex": "/module/js/rc/lex/lexplugin",
                    "css": "/module/js/com/tridium/js/ext/require/css",
        
                    "jquery": "/module/js/rc/jquery/jquery-3.4.1.min",
                    "Handlebars": "/module/js/rc/handlebars/handlebars.min",
                    "Promise": "/module/js/rc/bluebird/bluebird",
        
                    // these are runtime dependencies
                    "hbs": "/module/js/rc/require-handlebars-plugin/hbs",
                    "i18nprecompile": "/module/js/rc/require-handlebars-plugin/hbs/i18nprecompile",
                    "json2": "/module/js/rc/require-handlebars-plugin/hbs/json2",
                    "underscore": "/module/js/rc/underscore/underscore",
                    "dialogs": "/module/js/rc/dialogs/dialogs",
                    "theme": "/module/themeZebra/ux/theme",
                    "pikaday": "/module/js/rc/pikaday/pikaday",
                    'log': '/module/js/rc/log/logPlugin',
                },
        
                hbs: {
                    disableI18n: true
                },
            }
        </script>
        <script type="text/javascript" src="/module/js/com/tridium/js/ext/require/require.min.js"></script>
        <script>
            require(['/module/pxStyleOverrider/rc/pxStyleOverriderWidget.run.js'], function (app) {
        
                app.initialiseValue({
                    divId: '#widget1',
                    height: '100%',
                    width: '100%',
                    backgroundColor: 'transparent',
                    cssOverride: 'body { background: transparent; } .hx { background: transparent !important; } .hxPx { background: transparent !important; } .window-bg { background: transparent !important; }',
                });
            });
        </script>
        </head>
        <!--html to go here-->
        <div id="widget1" style="width:300px;height:300px;"></div>
        <!--Rest of your html below...-->
                                    


You May Also Like





Energy Benchmark Chart

N4 View Builder™©

tridium bms system

Multiline Chart

tridium charting

back to more widgets...