Extra Components Documentation

Sweet Alerts

A beautiful replacement for javascript's "alert". SweetAlert automatically centers itself on the page and looks great no matter if you're using a desktop computer, mobile or tablet. It's even highly customizable.

1. Initialize the plugin by referencing the necessary files:
                
                    <script src="sweetalert.min.js"></script>
                    <link rel="stylesheet" type="text/css" href="sweetalert.css">
                
            
2. Call the sweetAlert-function after the page has loaded
                
                    swal({
                        title: "Error!",
                        text: "Here's my error message!",
                        type: "error",
                        confirmButtonText: "Cool"
                    });
                
            

Refer following links for detailed documentation, configuration options, methods and examples:

Type URL
Plugin Link http://t4t5.github.io/sweetalert/
Template Page https://themeselection.com/demo/chameleon-admin-template/html/ltr/vertical-menu-template/ex-component-sweet-alerts.html

Toastr

toastr is a Javascript library for Gnome / Growl type non-blocking notifications.

1. Initialize the plugin by referencing the necessary files:
                
                    <script src="toastr.js"></script>
                    <link rel="stylesheet" type="text/css" href="toastr.css">
                
            
2. Use toastr to display a toast for info, success, warning or error.
                
                    // Display an info toast with no title
                    toastr.info('Are you the 6 fingered man?')
                
            

Refer following links for detailed documentation, configuration options, methods and examples:

Type URL
Plugin Link https://github.com/CodeSeven/toastr
Template Page https://themeselection.com/demo/chameleon-admin-template/html/ltr/vertical-menu-template/ex-component-toastr.html

jQuery Raty

jQuery Raty - A Star Rating Plugin

Usage with Image


1. Initialize the plugin by referencing the necessary files:
                    
                        <script src="jquery.raty.js"></script>
                    
                
2. The component will bind to any existing DOM element.
                    
                        <div id="star-rating"></div>
                    
                
3. Basic usage may look something like this.
                    
                        $('#star-rating').raty();
                    
                

Usage with Font


1. Initialize the plugin by referencing the necessary files:
                    
                        <script src="jquery.raty.js"></script>
                        <link rel="stylesheet" type="text/css" href="jquery.raty.css">
                    
                
2. The component will bind to any existing DOM element.
                    
                        <div id="star-rating"></div>
                    
                
3. Basic usage may look something like this.
                    
                        $('#star-rating').raty({ starType: 'i' });
                    
                

Refer following links for detailed documentation, configuration options, methods and examples:

Type URL
Plugin Link https://github.com/wbotelhos/raty
Template Page https://themeselection.com/demo/chameleon-admin-template/html/ltr/vertical-menu-template/ex-component-ratings.html

Tour

Hopscotch is a framework to make it easy for developers to add product tours to their pages. Hopscotch accepts a tour JSON object as input and provides an API for the developer to control rendering the tour display and managing the tour progress.

1. Initialize the plugin by referencing the necessary files:
                
                    <script src="hopscotch.min.js"></script>
                    <link rel="stylesheet" type="text/css" href="hopscotch.css">
                
            
2. Use below js code to start a tour.
                
                    var tour = {
                        id: "demo-tour",
                        showPrevButton: true,
                        steps: [       
                            
                            {
                                title: "Apps",
                                content: "This is a shortcut for your useful apps.",
                                target: "#",
                                placement: "bottom"
                            },
                            {
                                title: "Notification",
                                content: "Check your daily notifications here.",
                                target: "#",
                                placement: "left"
                            }      
                        ]
                    };
                    $('#btnStartTour').on('click',function(e){
                        hopscotch.startTour(tour);
                    });
                
            

Refer following links for detailed documentation, configuration options, methods and examples:

Type URL
Plugin Link https://github.com/linkedin/hopscotch
Template Page https://themeselection.com/demo/chameleon-admin-template/html/ltr/vertical-menu-template/ex-component-tour.html

CKEditor

A set of ready-to-use rich text editors created with a powerful framework. Made with real-time collaborative editing in mind.

1. Initialize the plugin by referencing the necessary files:
                
                    <script src="ckeditor/ckeditor.js"></script>
                
            
2. Add editor js code file for ckeditor.
                
                    <script src="editor-ckeditor.js"></script>
                
            

Refer following links for detailed documentation, configuration options, methods and examples:

Type URL
Plugin Link https://ckeditor.com/
Template Page https://themeselection.com/demo/chameleon-admin-template/html/ltr/vertical-menu-template/editor-ckeditor.html

TinyMCE

A set of ready-to-use rich text editors created with a powerful framework. Made with real-time collaborative editing in mind.

1. Initialize the plugin by referencing the necessary files:
                
                    <script src="tinymce/tinymce.js"></script>
                    <link rel="stylesheet" type="text/css" href="tinymce/tinymce.min.css">
                
            
2. Add editor js code file for tinymce.
                
                    <script src="editor-tinymce.js"></script>
                
            

Refer following links for detailed documentation, configuration options, methods and examples:

Type URL
Plugin Link https://www.tinymce.com/
Template Page https://themeselection.com/demo/chameleon-admin-template/html/ltr/vertical-menu-template/editor-tinymce.html

Bootstrap DateRange Picker

Date Range Picker can be attached to any webpage element to pop up two calendars for selecting dates, times, or predefined ranges like "Last 30 Days".

1. To get started, include jQuery, Moment.js and Date Range Picker's files in your webpage:
                
                    <script src="moment-with-locales.min.js"></script>
                    <script src="daterangepicker.js"></script>
                    <link rel="stylesheet" type="text/css" href="daterange/daterangepicker.css">
                
            
2. Basic usage may look something like this.
                
                    $('input[name="dates"]').daterangepicker();
                
            

Refer following links for detailed documentation, configuration options, methods and examples:

Type URL
Plugin Link https://github.com/dangrossman/daterangepicker
Template Page https://themeselection.com/demo/chameleon-admin-template/html/ltr/vertical-menu-template/pickers-date-&-time-picker.html

pickadate.js

The mobile-friendly, responsive, and lightweight jQuery date & time input picker.

1. To get started, There are three picker files:
                
                    <script src="picker.js"></script>
                    <script src="picker.date.js"></script>
                    <script src="picker.time.js"></script>
                
            
To support old browsers, namely IE8, also include the legacy.js file.
2. Based on the theme, pick the relevant picker styles:
                
                    <link rel="stylesheet" type="text/css" href="default.date.css">
                    <link rel="stylesheet" type="text/css" href="classic.date.css">
                
            
3. Basic usage may look something like this.
                
                    // The date picker
                    $('.datepicker').pickadate();

                    // The time picker
                    $('.timepicker').pickatime()
                
            

Refer following links for detailed documentation, configuration options, methods and examples:

Type URL
Plugin Link http://amsul.ca/pickadate.js/
Template Page https://themeselection.com/demo/chameleon-admin-template/html/ltr/vertical-menu-template/pickers-date-&-time-picker.html

Block UI

The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser[1]. When activated, it will prevent user activity with the page (or part of the page) until it is deactivated. BlockUI adds elements to the DOM to give it both the appearance and behavior of blocking user interaction.

1. Initialize the plugin by referencing the necessary files:
                
                    <script src="jquery.blockUI.js."></script>
                
            
2. Basic usage may look something like this.
                
                    $.blockUI();
                
            

Refer following links for detailed documentation, configuration options, methods and examples:

Type URL
Plugin Link http://jquery.malsup.com/block/
Template Page https://themeselection.com/demo/chameleon-admin-template/html/ltr/vertical-menu-template/block-ui.html

Dropzone

DropzoneJS is an open source library that provides drag’n’drop file uploads with image previews. It’s lightweight, doesn't depend on any other library (like jQuery) and is highly customizable.

1. Initialize the plugin by referencing the necessary files:
                
                    <script src="/path/to/dropzone.min.js"></script>
                
            
2. The typical way of using dropzone is by creating a form element with the class dropzone. That’s it. Dropzone will find all form elements with the class dropzone, automatically attach itself to it, and upload files dropped into it to the specified action attribute. The uploaded files can be handled just as if there would have been a html input.
                
                    <form action="/file-upload" class="dropzone">
                        <div class="fallback">
                            <input name="file" type="file" multiple />
                        </div>
                    </form>
                
            
3. Alternatively you can create dropzones programmatically (even on non form elements) by instantiating the Dropzone class
                
                    // Dropzone class:
                    var myDropzone = new Dropzone("div#myId", { url: "/file/post"});
                
            
                
                    // jQuery
                    $("div#myId").dropzone({ url: "/file/post" });
                
            

Notes


  • If you do not want the default message at all (»Drop files to upload (or click)«), you can put an element inside your dropzone element with the class dz-message and dropzone will not create the message for you.
  • Dropzone will submit any hidden fields you have in your dropzone form. So this is an easy way to submit additional data. You can also use the params option.
  • Dropzone adds data to the file object you can use when events fire. You can access file.width and file.height if it’s an image, as well as file.upload which is an object containing: progress (0-100), total (the total bytes) and bytesSent.
  • If you want to add additional data to the file upload that has to be specific for each file, you can register for the sending event:
                            
                                myDropzone.on("sending", function(file, xhr, formData) {
                                    // Will send the filesize along with the file as POST data.
                                    formData.append("filesize", file.size);
                                });
                            
                        
  • To access the preview html of a file, you can access file.previewElement. For example:
                            
                                myDropzone.on("addedfile", function(file) {
                                    file.previewElement.addEventListener("click", function() {
                                        myDropzone.removeFile(file);
                                    });
                                });
                            
                        
  • If you want the whole body to be a Dropzone and display the files somewhere else you can simply instantiate a Dropzone object for the body, and define the previewsContainer option. The previewsContainer should have the dropzone-previews or dropzone class to properly display the file previews.
                            
                                new Dropzone(document.body, {
                                    previewsContainer: ".dropzone-previews",
                                    // You probably don't want the whole body
                                    // to be clickable to select files
                                    clickable: false
                                });
                            
                        
  • Look at the github wiki for more examples.