Articles

Tags:
View Cloud
 
 
 

The Workflow Carousel Library: card.events.js Functionality

rubic-eventsBack to Workflow Carousel

The code for this part of the project is on GitHub.

In addition to Card Handling and Workflow Carousel, Card Events are the developer-defined functionality for individual cards (they are defined in Card Settings).

The simple and complex example on GitHub are generally the same.

There is a single ClickEventHandling function that determines the current card and then passes the event information to a function defined in settings.events.

Within each function, all event handling can occur within the single function, or as in the complex example on gitHub, events can be passed to seperate handlers: generally, separating based on whether the event is based on an HTML ID or a CLASS.

The structure for the main handler function is as follows:
Data.prototype.ClickEventHandling = function(event_element, event_source, track_id) {
	var self = this;

	var page = settings.Cards[rubic.current_card].Current;	
	settings.events[page](event_element, event_source, track_id);
}
The structure for card event handling functions is as follows:
/* ----------------------------------------------------------------------------------
-- EventMAIN
-- : Handle all clickable elements on this page type
-- ------------------------------------------------------------------------------- */
Data.prototype.EventMAIN = function(event_element, event_source, track_id) {
	var self = this;
	
	// CLICK ON BUSINESS BUTTON
	if (event_source.hasClass("db-businessunits") && !event_source.hasClass("btn-success")) {
		// GET/SET THE NEW BUSINESS UNIT ID
		self.EventMAIN_subfunction(event_source);
		return false;
	}		
}

	Data.prototype.EventMAIN_subfunction = function(event_source) {
		var self = this;

	}
 
by User Not Found
11 Apr 2014
Tags:
  • Workflow Carousel
  • Mobile
  • Javascript
  • Front-End
  • Development


 

You are not allowed to post comments.