Articles

Tags:
View Cloud
 
 
 

The Workflow Carousel Library: card.subscriptions.js Functionality

rubic-subscribeBack to Workflow Carousel

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

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

In the simple example on GitHub there is additional function, configureView that takes the Settings information and uses it for display-data.

In the complex example, the function does not exist since the data is pulled via AJAX calls.

The structure for these functions is as follows:
var Data = function() {
	var self = this;		
}

Data.prototype.ProcessEmpty  = function(title, direction) {
	var self = this;
	
	console.log("Process EMPTY Card");
}

Data.prototype.ProcessMAIN  = function(title, direction) {
	var self = this;
	
	console.log("Process Main Card");
	self.configureView(title, direction);
}

Data.prototype.ProcessDOWN  = function(title, direction) {
	var self = this;
	
	console.log("Process Down Card");
	self.configureView(title, direction);
}

...

Data.prototype.configureView = function(title, direction) {
	var self = this;
	
	console.log(direction + " " + title);
	$("#" + direction + " .Content").attr("style", [
			"color: "
			,settings.FG[title] + ";"
			,"background-color: "
			,settings.BG[title]
		].join(""));
	$("#" + direction + " .Content").html(settings.Content[title]);
}
 
by User Not Found
11 Apr 2014
Tags:
  • Workflow Carousel
  • Mobile
  • Javascript
  • Front-End
  • Development


 

You are not allowed to post comments.