Print seat layout for movie, flight (jQuery plugin)

Overview

seatLayout.js (movie-seat-layout)

Print seat layout for movie, flight and seat selection (jQuery plugin)

Demo : https://sachinkurkute.github.io/movie-seat-layout/src/index.html

Prerequisites

seatLayout.js is jQuery plugin, you need jQuery already installed OR added referense on your page

Installing

Download code from git https://github.com/SachinKurkute/movie-seat-layout

Add seatlayout.js reference below the jQuery plugin.

  <script src="app/lib/jquery.js"></script>
  <script src="bin/seatLayout/seatLayout.min.js"></script>

Your installation is done !

Run and Initialize

Add html element

<div class="movieLayoutContainer"></div>

Initialize


$('.movieLayoutContainer').seatLayout({
      data: {...},    // Movie seat data 
      showActionButtons:true,
      classes : {     // Add class or classes for the component
          doneBtn : '',
          cancelBtn : '',
          row:'',
          area:'',
          screen:'',
          seat:''
      },
      numberOfSeat: 3  // Nuber of seat want to select
})

data :

data (object) This is JavaScript object. It's help to print the seat layout of movie please find the JOSN file, which is help to understand the structure.

numberOfSeat

numberOfSeat (number) Number of seats allow to select

showActionButtons

showActionButtons (bool) Default is true, hide the action button i.e Done and Cancel.

classes

classes (object) set the component wise classes

{
      doneBtn : '', // classes for Done button
      cancelBtn : '', // classes for Cancel button
      row:'',   // classes for each row
      area:'', // Classes for each area
      screen:'',  // Classes for screen 
      seat:'' // Classes for each seat
}

Functions


        $('.selectMove').seatLayout({
            data: seatData,
            showActionButtons:true,
            classes : {
                doneBtn : '',
                cancelBtn : '',
                row:'',
                area:'',
                screen:'',
                seat:''
            },
            numberOfSeat: nuberOfSeat,
            callOnSeatRender: function (Obj) {
                //modify seat object if require and return it;
                return Obj;
            },
            callOnSeatSelect: function (_event, _data, _element) {
                console.log(_event);
                console.log(_data);
                console.log(_element);
            },
            selectionDone: function (_array) {
                console.log(_array);
            },
            cancel: function () {
                return false;
            }
        });
        

callOnSeatRender

callOnSeatRender (function) called every seat rendering this seat object

    callOnSeatRender: function (Obj) {   // Obj (param )is seat object
        //modify seat object if require and return it;
        return Obj;
    }

callOnSeatSelect

callOnSeatSelect (function) Called after selected the seat

    callOnSeatSelect: function (_event, _data, _element) {
        console.log(_event);  // Event
        console.log(_data);  // Data of selected seat with total selected seat property
        console.log(_element); // Selected element i.e. $(this)
    }
    

selectionDone

selectionDone (function) Called after clicked Done button with param Array of selected seat

selectionDone: function (_array) {
    console.log(_array);   // Selected seat array
},

cancel

cancel (function) Called after clicked Cancel button with param Array of selected seat

cancel: function () {
    return false;   // In case preventing the cancel action return false, Otherwise it will null the current object
},

License

This project is licensed under the MIT License - see the LICENSE file for details

You might also like...

Snipes Test Flight apps. Configurable & has the ability to use a burner account for checking the status to avoid bans.

Snipes Test Flight apps. Configurable & has the ability to use a burner account for checking the status to avoid bans.

TestFlight Sniper Snipes TestFlight beta apps. Configurable & has the ability to use a burner account for checking the status to avoid bans. Features

Dec 20, 2022

A JQuery plugin to animate text as in the credits of the 2014 movie "Birdman".

birdman.js A JQuery plugin to animate text as in the credits of the 2014 movie "Birdman". See it in action at chrisma.github.io/birdman.js I'm aware t

Dec 30, 2021

A daily print-and-play roguelike adventure you can play offline.

A daily print-and-play roguelike adventure you can play offline.

Chronicles of Stampadia A print-and-play roguelike with a new adventure every day! Play today's adventure | Read the manual | Learn how to play | Disc

Oct 15, 2022

NoPrint.js - Disable Print, Screenshot, Copy & Paste in HTML by JavaScript.

NoPrint.js Disable Print, Screenshot, Copy & Paste in HTML by JavaScript. NoPrint.js is a small and neat open source JS library that disables print, s

Dec 26, 2022

Mixed Messages is a simple Node.js application, that will print a randomized fake fact to the terminal each time it is ran.

Mixed Messages - Fake Fact Generator Mixed Messages is a simple Node.js application, That will print a randomized fake fact to the terminal each time

Jan 10, 2022

A vscode extension to quickly print variable, variable type, tensor shape etc by using shortcuts

A vscode extension to quickly print variable, variable type, tensor shape etc by using shortcuts

Quick Python Print This repo is inspired by "Python Quick Print". "Python Quick Print" can quickly print out variables on the console by using shortcu

Oct 28, 2022

print faceit elo into the console/chat via telnet

Print MM Ranks and FaceIT elo ingame This tool uses telnet to interact with the console in CS:GO Description Gets faceit elo via the official faceit a

Sep 20, 2022

📄 A responsive print preview in A4 format

react-preview-a4 📄 A responsive print preview in A4 format. Table of Contents Installation Examples Demo Installation To install, you can use npm: $

Oct 18, 2022

Create a card layout that let your user flip through it like you see on Google Tips

#Tip Cards by Pete R. Create an animated card layout that let your viewer flip through it like you see on Google Tips Page. Created by Pete R., Founde

Nov 5, 2022
Owner
Sachin Kurkute
Sachin Kurkute
A NodeJs service which allows you to create a movie based on it's title (additional movie details will be fetched) and fetch all created movies.

movies-api A NodeJs service which allows you to create a movie based on it's title (additional movie details will be fetched) and fetch all created mo

Ugochukwu Ejiogu 2 Mar 27, 2022
An open source movie library platform for viewing movie info and saving movies for later.

GoodWatch An open source movie library platform for viewing movie info and saving movies for later. How to get started? Fork and clone the repo. Then

null 13 Apr 28, 2022
Rent-A Movie is a website based on movie renting. The user can leave likes, comments or make reservations for movies they would like to rent. Made using tvMaze API, Involvement API, HTML, SASS and JavaScript

Rent-A Movie "Rent-A Movie" is a website for movie renting where you can make reservations, add comments & likes or just get details about movies that

Zeeshan Haider 19 Aug 23, 2022
Movie application consuming The Movie DB's API

Movie application consuming The Movie DB's API

Pamella Fernandes 6 Aug 11, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Attempt to replicate the visuals of late 80s / early 90s flight simulators

Retro Fligh Simulator Quick and dirty attempt to replicate the visuals of late 80s / early 90s flight simulators, using as a reference MicroProse's F-

Ruben Moreno Montoliu 70 Dec 15, 2022
Flight is a universal package manager for your needs, no matter what language you may want to write your code in.

Flight Swift, reliable, multi-language package manager. âš¡ Installation We don't have an official release of Flight yet, however, if you would like to

null 26 Dec 25, 2022
A three.js and roslibjs powered web-control for zju fast-drone-250 for laptop-free flight control

Web Control for ZJU Fast-Drone-250 A three.js and roslibjs powered web-control for zju fast-drone-250 for laptop-free flight control (tested on Xiaomi

null 6 Nov 11, 2022