Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- slide = {
- executiveList : [],
- showScoreboard : true,
- timeScoreBoard : 5000,
- timeExecutive : 8000,
- loop : true,
- init : function(){
- this.getExecutiveList();
- this.start();
- },
- start : function(){
- var _me = this
- var auxList = dojo.fromJson(this.executiveList);
- //while( this.loop ){
- dojo.forEach(auxList, function(executive, index, array) {
- console.log( executive.id );
- _me.showTable();
- //setTimeout( '_me.showExecutive('+executive.id+')', 5000);
- }
- );
- //}
- },
- stop :function(){
- this.loop = false;
- },
- getExecutiveList : function(){
- var _me = this
- dojo.xhrGet({
- sync : true,
- url: 'index/getexecutives',
- load: function(data){
- _me.executiveList = data;
- },
- error: function(err){
- console.debug("An error occurred: ", err);
- },
- timeout: 5000
- });
- },
- showTable : function(){
- dojo.xhrGet({
- sync : true,
- url: 'index/showtable',
- load: function(data){
- dojo.byId("mainContent").innerHTML = data;
- },
- error: function(err){
- console.debug("An error occurred: ", err);
- },
- timeout: 5000
- });
- },
- showExecutive : function(id){
- dojo.xhrPost({
- sync : true,
- url: 'index/showgraph',
- content: {exeId : id},
- load: function(data){
- dojo.byId("mainContent").innerHTML = data;
- },
- error: function(error){
- console.error('Error: ', error);
- },
- timeout: 5000
- });
- }
- }
Add Comment
Please, Sign In to add comment