Sha256: fcd6df6aa849de31aa3d7fd9c846de7b34a357da8490c5c00093469c8a298e2e

Contents?: true

Size: 1.12 KB

Versions: 8

Compression:

Stored size: 1.12 KB

Contents

/**
* Gumby Init
*/

!function($) {

	'use strict';

	// not touch device or no touch events required so auto initialize here
	if((!Gumby.touchDevice || !Gumby.touchEvents) && Gumby.autoInit) {
		window.Gumby.init();

	// load jQuery mobile touch events
	} else if(Gumby.touchEvents && Gumby.touchDevice) {
		Gumby.debug('Loading jQuery mobile touch events');
		// set timeout to 2sec
		yepnope.errorTimeout = 2000;
		Modernizr.load({
			test: Modernizr.touch,
			yep: '/assets/loldesign_publisher/libs/jquery.mobile.custom.min.js',
			complete: function() {
				// error loading jQuery mobile
				if(!$.mobile) {
					Gumby.error('Error loading jQuery mobile touch events');
				}

				// if not auto initializing
				// this will allow helpers to fire when initialized
				Gumby.touchEventsLoaded = true;

				// auto initialize
				if(Gumby.autoInit) {
					window.Gumby.init();

				// if already manually initialized then fire helpers
				} else if(Gumby.uiModulesReady) {
					Gumby.helpers();
				}
			}
		});
	}

	// if AMD return Gumby object to define
	if(typeof define == "function" && define.amd) {
		define(window.Gumby);
	}
}(jQuery);

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
loldesign_publisher-2.0.0 app/assets/javascripts/loldesign_publisher/libs/gumby.init.js
loldesign_publisher-1.5.1 app/assets/javascripts/loldesign_publisher/libs/gumby.init.js
loldesign_publisher-1.5.0 app/assets/javascripts/loldesign_publisher/libs/gumby.init.js
loldesign_publisher-1.4.0 app/assets/javascripts/loldesign_publisher/libs/gumby.init.js
loldesign_publisher-1.3.6 app/assets/javascripts/loldesign_publisher/libs/gumby.init.js
loldesign_publisher-1.3.4 app/assets/javascripts/loldesign_publisher/libs/gumby.init.js
loldesign_publisher-1.3.3 app/assets/javascripts/loldesign_publisher/libs/gumby.init.js
loldesign_publisher-1.3.2 app/assets/javascripts/loldesign_publisher/libs/gumby.init.js