Metronic

The Ultimate Bootstrap & Angular 6 Admin Theme Framework For Next Generation Applications

Portlet

Overview

mPortlet is a Metronic's custom plugin defined in [root]/theme/default/src/js/framework/components/general/portlet.js.

Initialization

First parameter is the id, class, or tag of the HTML element. The second parameter is for the options.

 var portlet = new mPortlet('m_portlet_tools_1', options);

Options

var options = {
    bodyToggleSpeed: 400,
    tooltips: true,
    tools: {
        toggle: {
            collapse: 'Collapse',
            expand: 'Expand'
        },
        reload: 'Reload',
        remove: 'Remove',
        fullscreen: {
            on: 'Fullscreen',
            off: 'Exit Fullscreen'
        }
    }
};
Field Type Description
bodyToggleSpeed number

Set the portlet body toggle speed in miliseconds

Sample
bodyToggleSpeed: 400
tooltips boolean

Enable/disable portlet tooltips

Sample
tooltips: true
tooltips boolean

Enable/disable portlet tooltips

Sample
tooltips: true
tools.toggle object

Portlet toggle tools options. Set the title for the collapse and expand toggle.

Sample
tools: {
    toggle: {
        collapse: 'Collapse',
        expand: 'Expand'
    }
}
tools.reload string

Set portlet reload title in the tools.

Sample
tools: {
    reload: 'Reload',
}
tools.remove string

Set portlet remove title in the tools.

Sample
tools: {
    remove: 'Remove',
}
tools.fullscreen object

Set portlet fullscreen title in the tools.

Sample
tools: {
    fullscreen: {
        on: 'Fullscreen',
        off: 'Exit Fullscreen'
    }
}

API Methods

Method Description
setDefaults(options)

Set default options

Input Parameters
Name Type Description
options object

A new options object for the menu

setContent(contents)

Set dropdown content

Input Parameters
Name Type Description
contents string

Inner HTML to be placed in the dropdown content

remove()

Remove the portlet

reload()

Reload the portlet

toggle()

Toggle the portlet to collapse or expand

collapse()

Set portlet to collapse

expand()

Set portlet to expand

fullcreen()

Set portlet to fullscreen

unFullcreen()

Set portlet to default minimize

getBody()

Get the portlet body as HTML object

getSelf()

Get the portlet as HTML object

on(name, handler)

Register event

Input Parameters
Name Type Description
name string

Unique event name

handler function

Callback function handler for the event

one(name, handler)

Register event to be run once

Input Parameters
Name Type Description
name string

Unique event name

handler function

Callback function handler for the event

I run a team of 20 product managers, developers, QA and UX resources. Previously we designed everything ourselves. For our newest platform we tried out Metronic. I cannot overestimate the impact Metronic has had. It's accelerated development 3x and reduced QA issues by 50%. If you add up the reduced need for design time/resources, the increase in dev speed and the reduction in QA, it's probably saved us $100,000 on this project alone, and I plan to use it for all platforms moving forward.
The flexibility of the design has also allowed us to put out a better looking & working platform and reduced my headaches by 90%. Thank you KeenThemes! Jonathan Bartlett, Metronic Customer

Powerful Framework

Everything within Metronic is customizable globally to provide limitless unique styled projects

Multi Demo

Choose a perfect design for your next project among hundreds of demos

Limitless Components

A huge collection of components to power your application with the latest UI/UX trands

Angular 6 Support

Enterprise ready Angular 6 integration with built-in authentication module and many more

Bootstrap 4

Metronic deeply customizes Bootstrap with native look and feel

Exclusive Datatable Plugin

Our super sleek and intuitive Datatable comes packed with all advanced CRUD features

60,000+ Strong

Metronic is the only theme trusted by over 60,000 developers world wide

Continuous Updates

Lifetime updates with new demos and features is guaranteed

Quality Code

Metronic is writer with a code structure that all developers will be able to pick up easily and fall in love

The Ultimate Bootstrap Admin Theme Trusted By Over 60,000 Developers World Wide