1 define('screen',     
  2 	['jquery','contextmenu','require','prototype'], 
  3     function ( $,contextmenu, require, jsPrototype ) {
  4    		/**
  5 		 * A Class to handle the Screen resize event handling functionality and the initial settup.
  6 		 * @name screen
  7 		 * @class screen
  8 		 * @example require('screen')
  9 		 * @exports screen
 10 		 * @version 1.0
 11 		 * @module screen
 12 		 * @augments contextmenu
 13 		 * @augments jquery
 14 		 **/
 15         return {
 16         	/**
 17 			 * @name init
 18 			 * @memberOf screen
 19 			 * @method 
 20 			 * @description Function for setting up the initial screen size and window resize event handling through screen.reSize function, It calls 
 21 			 * @function
 22 			 */
 23 			init:function(){
 24 				jsPrototype.init();
 25 				$(window).resize(this.reSize);
 26 				this.setRowAndColumnSize();
 27 				contextmenu.init();
 28 				$( ".rowDiv" ).resizable({handles: 'w' });
 29 				$( ".colDiv" ).resizable({handles: 'n' });
 30 				var scrollbar = require('scrollbar');
 31 				scrollbar.registerScrollListener();
 32 				NexcelController = require('NexcelController');
 33 				NexcelController.init();
 34 				this.reSize();
 35 				require('GridView').VIEW_RESIZE.init();
 36 			},
 37 			/**
 38 			 * @name reSize
 39 			 * @memberOf screen
 40 			 * @method 
 41 			 * @description Function to set the screen size according to the user screen size. 
 42 			 * @function
 43 			 */
 44             reSize:function(){
 45 				//console.log('I am Re Sized......');
 46                 var sum=0;
 47 				$('nav').each(function(){sum+=$(this).height() || 0;});
 48 				sum+=$('footer').height();
 49 				var height = $(window).height() -sum;
 50 				$('.dataTableDiv').height( height);
 51 				console.log('Set Height :'+height);
 52 				var width=0;
 53 				$('.dataTableDiv').width($(window).width() - $('.rowTableDiv').width());
 54 				//$('.rowTableDiv').height( height);
 55             },
 56             setRowAndColumnSize : function(){
 57             	var WorkBook = require('WorkBook'); 
 58             	WorkBook.WB_ROW_HEIGHT =  JSON.parse($('#rowHeight').val());
 59             	WorkBook.WB_COL_WIDTH = JSON.parse($('#colWidth').val());
 60             }
 61         };
 62 });
 63 
 64