HTTPS SSH

GSoC 2012

jWindow is a jQuery plugin that lets you create windows, like an OS.

The salient features are:

  • The $.jWindow object, which is both powerful and easily extensible, should you choose to add custom functionality.
  • jWindow requires no extra libraries other than jQuery, version 1.7 or newer. If you wish to make it work with earlier versions of jQuery, you will need to modify the source code and replace all occurrences of the $.on() method with either $.live() or $.bind().
  • It consists of an embedded iframe whose url can be dynamically changed, as per the users wishes.

Set Up

Place the following libraries in the <head> section:

<link type="stylesheet" href="style.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>
<script type="text/javascript" src="jWindow.js"></script>

Now, to create a new window, all you need to do is call the $.jWindow() method and pass it an object containing the new window's ID:

$.jWindow({ id: "demo" });

This will instantiate a window, but it will not display it. In order to actually make it appear on the screen, you also need to call the jWindow.show() method:

var w = $.jWindow({ id: "demo" });
w.show();

The windows have been customized to look similar to that used in the BioGPS project - So, the Windows have the Close, Maximize, Settings/More Options Drop Down and Species Drop Down - on the TitleBar.

Basic Features

A more concrete example:

var w = $.jWindow({
id: "demo",
title: "Demo window",
width: 600,
height: 400,
posx: 100,
posy: 100
});

API reference

The $.jWindow() method acts as a window factory and getter. The Parameters are:

Property Default Value
id ""
title ""
parentElement "body"
width 300
height 200
posx 50
posy 50
fixed true
marginTop 10
marginRight 10
marginBottom 10
marginLeft 10
onDragStart null
onDragEnd null
onResizeStart null
onResizeEnd null
onUpdate null
onClose null
onMaximise null
onRestore null
onMinimise null
statusBar true
edgeBar true
settingsButton true
minimiseButton false
ddSelect true
maximiseButton true
closeButton true
draggable true
resizeable true
type "iframe"
url ""
modal false

The Project

BioGPS

This project was undertaken under the Google Summer of Code - 2012, alongwith the Scripps Research Institute, La Jolla, California, under the mentorship of Mr. Ian MacLeod, Research Programmer III, BioGPS team - on the project - JQuery-based BioGPS gene-report layout canvas.

Licence

jWindow: jQuery Windows System Copyright (c) 2012 Shivansh Srivastava All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The name of Shivansh Srivastava may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY SHIVANSH SRIVASTAVA - UNDER THE GOOGLE SUMMER OF CODE PROGRAM 2012 AND THE SCRIPPS RESEARCH INSTITUTE, CALIFORNIA - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SHIVANSH SRIVASTAVA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Credits

The second version was developed by DOMINIK MARCZUK and licenced under the MIT licence.

The original plugin, on which jWindow is based, is called jQuery Windows Engine. It was written by HernĂ¡n Amiune and licenced under the MIT licence.