Skip to content

Commit

Permalink
Merge pull request #5 from Chicago/master
Browse files Browse the repository at this point in the history
OG 1.4 changes
  • Loading branch information
nfspeedypur authored Jun 30, 2017
2 parents 89ee41f + d7cb301 commit 447edb6
Show file tree
Hide file tree
Showing 28 changed files with 35,895 additions and 3,950 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![OpenGrid](img/branding/OpenGrid_Logo_Horizontal_3Color.png)

[![Build status-Linux](https://img.shields.io/travis/Chicago/opengrid/master.svg?style=flat-square&label=Linux build)](https://travis-ci.org/Chicago/opengrid)[![Build status-Windows](https://img.shields.io/appveyor/ci/tomschenkjr/opengrid/master.svg?style=flat-square&label=Windows build)](https://ci.appveyor.com/project/tomschenkjr/opengrid)[![Node.js dependencies](https://img.shields.io/coveralls/Chicago/opengrid/master.svg?style=flat-square)](https://coveralls.io/github/Chicago/opengrid)[![Node.js](https://img.shields.io/node/v/gh-badges.svg?style=flat-square)](https://david-dm.org/Chicago/opengrid)[![Node.js dependencies](https://img.shields.io/david/Chicago/opengrid.svg?style=flat-square)](https://david-dm.org/Chicago/opengrid)[![Node.js devdependencies](https://img.shields.io/david/dev/chicago/opengrid.svg?style=flat-square)](https://david-dm.org/Chicago/opengrid#info=devDependencies&view=table)
[![Build status-Linux](https://img.shields.io/travis/Chicago/opengrid/master.svg?style=flat-square&label=Linux%20build)](https://travis-ci.org/Chicago/opengrid)[![Build status-Windows](https://img.shields.io/appveyor/ci/tomschenkjr/opengrid/master.svg?style=flat-square&label=Windows%20build)](https://ci.appveyor.com/project/tomschenkjr/opengrid)[![Node.js dependencies](https://img.shields.io/coveralls/Chicago/opengrid/master.svg?style=flat-square)](https://coveralls.io/github/Chicago/opengrid)[![Node.js](https://img.shields.io/node/v/gh-badges.svg?style=flat-square)](https://david-dm.org/Chicago/opengrid)[![Node.js dependencies](https://img.shields.io/david/Chicago/opengrid.svg?style=flat-square)](https://david-dm.org/Chicago/opengrid)[![Node.js devdependencies](https://img.shields.io/david/dev/chicago/opengrid.svg?style=flat-square)](https://david-dm.org/Chicago/opengrid#info=devDependencies&view=table)

OpenGrid an open-source, interactive map platform that allows users to explore multiple data sources in an easy-to-use interface. Developed to support situational awareness, incident monitoring and responses, historical data retrieval, and real-time advanced analytics. Users can perform advanced queries to filter data, search within custom boundaries, or based on the users location. Other GIS data, such as weather and Shapefiles can be overlaid on the map with other data. OpenGrid is natively compatible with desktops and mobile devices.

Expand Down
21 changes: 17 additions & 4 deletions docs/OpenGrid API.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">OpenGrid REST Service <br> Application Programming Interface (API)</h1>
<h4 align="center">Version 1.3.0</h4>
<h4 align="center">Version 1.4.0</h4>

<!--
## Table of Contents
Expand Down Expand Up @@ -822,14 +822,18 @@ The maximum number of records to return; If this parameter is not specified, no
]
}
],
"quickSearch" : {
"chart" : {
"xAxisField" : "date",
"xAxisLabel" : "Post Date"
}
},
"quickSearch" : {
"enable" : true,
"triggerAlias" : "twe",
"triggerWord" : "tweet",
"hintCaption" : "Search Tweets",
"hintExample" : "tweet 'food'"
}
},
"columns" :
[
{
Expand Down Expand Up @@ -907,7 +911,16 @@ The maximum number of records to return; If this parameter is not specified, no
]
}
```

<h4>New in 1.4.0</h4>
Two new column properties were introduced as part of the 1.4.0 release:
<ul>
<li><b>array</b> - a flag to indicate that the column contains array-type values</li>
<li><b>dotSizer</b> - an object specifying how the dot size will be calculated dynamically. </li>
</ul>
For example, a value like below will calculate the dot size using the given formula depending on the value of this column as represented by the @v token:<br>
"dotSizer" : {
"calculator" : "(Math.sqrt(@v) * 2.5) + 2"
}
<h2>1.1.9 /datasets/{dataset_id}/query</h2>

**Method**
Expand Down
6 changes: 3 additions & 3 deletions docs/User Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### Table of Contents
* [Getting Started](#getting-started)
* [Background and Overview](#background-and-overview)
* [Overview](#overview)
* [Acknowledgements](#acknowledgements)
* [User Documentation](#user-documentation)
* [Supported Browsers](#supported-browsers)
Expand Down Expand Up @@ -34,7 +34,7 @@
<br>

## Getting Started
### Background and Overview
### Overview
<p>Open Grid is a geographical information systems developed for residents to access public city data in a more intuitive manner. The application supports situational awareness, incident responses and monitoring, historical data retrieval, and real-time advanced analytics.</p>

<p>OpenGrid design has a three-layer service architecture: Presentation, Business and Data. The presentation layer provides the application’s user interface which is a static HTML/JavaScript based GUI that presents a more intuitive and modernized approach that support usage and accessibility on any mobile device and terminals in public safety vehicles.</p>
Expand All @@ -50,7 +50,7 @@
OpenGrid was developed with the support of Bloomberg Philanthropies.

## User Documentation
<p>User documentation is designed to assist end users with the use of OpenGrid product and services. Upon usage of documentation the user will gain appropriate knowledge and capabilities to navigate the system. The user will inherit an understanding of the system and its processes and have the foundation to execute queries for navigation.</p>
<p>User documentation is designed to assist end users with the use of OpenGrid product and services. Upon usage of documentation the user will gain appropriate knowledge and capabilities to navigate the system. The user will inherit an understanding of the system, its processes and have the foundation to execute queries for navigation.</p>

#### Supported Browsers
<p>OpenGrid supports both mobile and desktop versions search engines. Mobile Android devices support Firefox version 40&#43; and Chrome 44&#43;. Ios devices support Chrome 45&#43;, Safari 8.1&#43; and Firefox 40&#43;. Desktop versions support Firefox 42&#43; and Chrome 46&#43;; Internet Explorer is supported from IE10&#43; no older versions will be continued. All browsers must have cookies enabled and support JavaScript/ECMAScript version 5.1.</p>
Expand Down
5 changes: 5 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ var third_party_sources = [
'lib/bootstrap-table-1.8.1/js/bootstrap-table.js',
'lib/leaflet-1.0.1/js/leaflet-src.js',
'lib/jspdf-1.1.135/js/jspdf.js',

//load first before crossroads.js
'lib/misc/js/signals.js',
'lib/misc/js/hasher.js',

'lib/**/*.js'
];

Expand Down
83 changes: 83 additions & 0 deletions lib/bootstrap-3.3.5/css/bootstrap-toggle.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*! ========================================================================
* Bootstrap Toggle: bootstrap-toggle.css v2.2.0
* http://www.bootstraptoggle.com
* ========================================================================
* Copyright 2014 Min Hur, The New York Times Company
* Licensed under MIT
* ======================================================================== */


.checkbox label .toggle,
.checkbox-inline .toggle {
margin-left: -20px;
margin-right: 5px;
}

.toggle {
position: relative;
overflow: hidden;
}
.toggle input[type="checkbox"] {
display: none;
}
.toggle-group {
position: absolute;
width: 200%;
top: 0;
bottom: 0;
left: 0;
transition: left 0.35s;
-webkit-transition: left 0.35s;
-moz-user-select: none;
-webkit-user-select: none;
}
.toggle.off .toggle-group {
left: -100%;
}
.toggle-on {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 50%;
margin: 0;
border: 0;
border-radius: 0;
}
.toggle-off {
position: absolute;
top: 0;
bottom: 0;
left: 50%;
right: 0;
margin: 0;
border: 0;
border-radius: 0;
}
.toggle-handle {
position: relative;
margin: 0 auto;
padding-top: 0px;
padding-bottom: 0px;
height: 100%;
width: 0px;
border-width: 0 1px;
}

.toggle.btn { min-width: 59px; min-height: 34px; }
.toggle-on.btn { padding-right: 24px; }
.toggle-off.btn { padding-left: 24px; }

.toggle.btn-lg { min-width: 79px; min-height: 45px; }
.toggle-on.btn-lg { padding-right: 31px; }
.toggle-off.btn-lg { padding-left: 31px; }
.toggle-handle.btn-lg { width: 40px; }

.toggle.btn-sm { min-width: 50px; min-height: 30px;}
.toggle-on.btn-sm { padding-right: 20px; }
.toggle-off.btn-sm { padding-left: 20px; }

.toggle.btn-xs { min-width: 35px; min-height: 22px;}
.toggle-on.btn-xs { padding-right: 12px; }
.toggle-off.btn-xs { padding-left: 12px; }

180 changes: 180 additions & 0 deletions lib/bootstrap-3.3.5/js/bootstrap-toggle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
/*! ========================================================================
* Bootstrap Toggle: bootstrap-toggle.js v2.2.0
* http://www.bootstraptoggle.com
* ========================================================================
* Copyright 2014 Min Hur, The New York Times Company
* Licensed under MIT
* ======================================================================== */


+function ($) {
'use strict';

// TOGGLE PUBLIC CLASS DEFINITION
// ==============================

var Toggle = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, this.defaults(), options)
this.render()
}

Toggle.VERSION = '2.2.0'

Toggle.DEFAULTS = {
on: 'On',
off: 'Off',
onstyle: 'primary',
offstyle: 'default',
size: 'normal',
style: '',
width: null,
height: null
}

Toggle.prototype.defaults = function() {
return {
on: this.$element.attr('data-on') || Toggle.DEFAULTS.on,
off: this.$element.attr('data-off') || Toggle.DEFAULTS.off,
onstyle: this.$element.attr('data-onstyle') || Toggle.DEFAULTS.onstyle,
offstyle: this.$element.attr('data-offstyle') || Toggle.DEFAULTS.offstyle,
size: this.$element.attr('data-size') || Toggle.DEFAULTS.size,
style: this.$element.attr('data-style') || Toggle.DEFAULTS.style,
width: this.$element.attr('data-width') || Toggle.DEFAULTS.width,
height: this.$element.attr('data-height') || Toggle.DEFAULTS.height
}
}

Toggle.prototype.render = function () {
this._onstyle = 'btn-' + this.options.onstyle
this._offstyle = 'btn-' + this.options.offstyle
var size = this.options.size === 'large' ? 'btn-lg'
: this.options.size === 'small' ? 'btn-sm'
: this.options.size === 'mini' ? 'btn-xs'
: ''
var $toggleOn = $('<label class="btn">').html(this.options.on)
.addClass(this._onstyle + ' ' + size)
var $toggleOff = $('<label class="btn">').html(this.options.off)
.addClass(this._offstyle + ' ' + size + ' active')
var $toggleHandle = $('<span class="toggle-handle btn btn-default">')
.addClass(size)
var $toggleGroup = $('<div class="toggle-group">')
.append($toggleOn, $toggleOff, $toggleHandle)
var $toggle = $('<div class="toggle btn" data-toggle="toggle">')
.addClass( this.$element.prop('checked') ? this._onstyle : this._offstyle+' off' )
.addClass(size).addClass(this.options.style)

this.$element.wrap($toggle)
$.extend(this, {
$toggle: this.$element.parent(),
$toggleOn: $toggleOn,
$toggleOff: $toggleOff,
$toggleGroup: $toggleGroup
})
this.$toggle.append($toggleGroup)

var width = this.options.width || Math.max($toggleOn.outerWidth(), $toggleOff.outerWidth())+($toggleHandle.outerWidth()/2)
var height = this.options.height || Math.max($toggleOn.outerHeight(), $toggleOff.outerHeight())
$toggleOn.addClass('toggle-on')
$toggleOff.addClass('toggle-off')
this.$toggle.css({ width: width, height: height })
if (this.options.height) {
$toggleOn.css('line-height', $toggleOn.height() + 'px')
$toggleOff.css('line-height', $toggleOff.height() + 'px')
}
this.update(true)
this.trigger(true)
}

Toggle.prototype.toggle = function () {
if (this.$element.prop('checked')) this.off()
else this.on()
}

Toggle.prototype.on = function (silent) {
if (this.$element.prop('disabled')) return false
this.$toggle.removeClass(this._offstyle + ' off').addClass(this._onstyle)
this.$element.prop('checked', true)
if (!silent) this.trigger()
}

Toggle.prototype.off = function (silent) {
if (this.$element.prop('disabled')) return false
this.$toggle.removeClass(this._onstyle).addClass(this._offstyle + ' off')
this.$element.prop('checked', false)
if (!silent) this.trigger()
}

Toggle.prototype.enable = function () {
this.$toggle.removeAttr('disabled')
this.$element.prop('disabled', false)
}

Toggle.prototype.disable = function () {
this.$toggle.attr('disabled', 'disabled')
this.$element.prop('disabled', true)
}

Toggle.prototype.update = function (silent) {
if (this.$element.prop('disabled')) this.disable()
else this.enable()
if (this.$element.prop('checked')) this.on(silent)
else this.off(silent)
}

Toggle.prototype.trigger = function (silent) {
this.$element.off('change.bs.toggle')
if (!silent) this.$element.change()
this.$element.on('change.bs.toggle', $.proxy(function() {
this.update()
}, this))
}

Toggle.prototype.destroy = function() {
this.$element.off('change.bs.toggle')
this.$toggleGroup.remove()
this.$element.removeData('bs.toggle')
this.$element.unwrap()
}

// TOGGLE PLUGIN DEFINITION
// ========================

function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.toggle')
var options = typeof option == 'object' && option

if (!data) $this.data('bs.toggle', (data = new Toggle(this, options)))
if (typeof option == 'string' && data[option]) data[option]()
})
}

var old = $.fn.bootstrapToggle

$.fn.bootstrapToggle = Plugin
$.fn.bootstrapToggle.Constructor = Toggle

// TOGGLE NO CONFLICT
// ==================

$.fn.toggle.noConflict = function () {
$.fn.bootstrapToggle = old
return this
}

// TOGGLE DATA-API
// ===============

$(function() {
$('input[type=checkbox][data-toggle^=toggle]').bootstrapToggle()
})

$(document).on('click.bs.toggle', 'div[data-toggle^=toggle]', function(e) {
var $checkbox = $(this).find('input[type=checkbox]')
$checkbox.bootstrapToggle('toggle')
e.preventDefault()
})

}(jQuery);
Loading

0 comments on commit 447edb6

Please sign in to comment.