This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var util = {}; | |
/** | |
* IE8 compatible custom event listener | |
* @method listenToCustomEvents | |
* @param {string} eventName Event to listen for | |
* @param {method} callback Method to run on event | |
*/ | |
util.listenToCustomEvents = function (event_name, callback) { | |
if (document.addEventListener) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint nomen: true, indent: 2, maxerr: 3 */ | |
/*global self, buffer */ | |
(function (worker_instance) { | |
"use strict"; | |
//JavaScript Audio Resampler (c) 2011 - Grant Galitz | |
var INCORRECT_BUFFER_LENGTH = "Buffer was of incorrect sample length."; | |
var INCORRECT_SETTINGS = "Invalid settings specified for the resampler."; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global window, rJS, console, RSVP, Dygraph */ | |
/*jslint indent: 2, maxerr: 3 */ | |
(function (rJS) { | |
"use strict"; | |
var ARRAY_VALUE_LENGTH = 8, | |
OPTION_DICT = { | |
start_date: 0, | |
time_factor: 1000, | |
resolution: 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, user-scalable=no" /> | |
<title>PyData Graph</title> | |
<!-- renderjs --> | |
<script src="rsvp.js" type="text/javascript"></script> | |
<script src="renderjs.js" type="text/javascript"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, user-scalable=no" /> | |
<title>PyData Graph</title> | |
<script src="rsvp.js" type="text/javascript"></script> | |
<script src="renderjs.js" type="text/javascript"></script> | |
<script src="gadget_global.js" type="text/javascript"></script> | |
<script src="gadget_erp5_page_pydata.js" type="text/javascript"></script> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global window, rJS, RSVP, URI */ | |
/*jslint nomen: true, indent: 2, maxerr: 3 */ | |
(function (window, rJS, RSVP, URI) { | |
"use strict"; | |
rJS(window) | |
// Init local properties | |
.ready(function (g) { | |
g.props = {}; | |
}) | |
// Assign the element to a variable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var container = document.createDocumentFragment(); | |
var foo = document.createElement("div") | |
foo.id = "mh"; | |
var bar = document.createElement("div") | |
bar.id = "ha"; | |
foo.appendChild(bar); | |
container.appendChild(foo); | |
var x = { | |
"fragment": container, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is from a larger file, fit as you need: | |
var priv = {}; | |
priv.generator = { | |
/** | |
* Generates elements based on supplied configuration | |
* @method: makeElement | |
* @param: {type} string Type of element to generate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- panel transitions on HTML links --> | |
<a href="somePage.html" data-transition="fade" data-panel="your_panel_id"> | |
<!-- programmatic --> | |
$.mobile.changePage('somePage.html', { | |
transition: 'fade', | |
pageContainer: $('div:jqmData(id="your_panel_id")') | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-role="page" id="your_wrapper_id" data-wrapper="true"> | |
<!-- global header --> | |
<div data-role="panel" data-id="your_menu_panel_id" data-panel="menu"> | |
<div data-role="page" id="your_menu_page_id" data-show="first"> | |
<!-- local header --> | |
<!-- page content --> | |
<!-- local footer --> | |
</div> | |
</div> | |
<div data-role="panel" data-id="your_main_panel_id" data-panel="main"> |
NewerOlder