<?php

/**
 * 
 *
 * @version $Id$
 * @copyright 2003 
 **/

class rhcss_editor_month_view extends module_righthere_css{
	function __construct($args=array()){
		return parent::__construct($args);
	}
	
	function options($t=array()){
		$i = count($t);
		//-- Container --------------------------------			
		/*
		$i++;
		$t[$i]=(object)array();
		$t[$i]->id 			= 'rhc-month-container'; 
		$t[$i]->label 		= __('Container','rhc');
		$t[$i]->options = array();		
		*/	
		//-- Background
		//.rhcalendar.not-widget
		$t[$i]=(object)array();
		$t[$i]->id 			= 'rhc-month-background'; 
		$t[$i]->label 		= __('View background','rhc');
		$t[$i]->options = array();	
		$t[$i]->options = $this->add_backgroud_options( $t[$i]->options, array(
			'label'		=> __('View Background','rhc'),
			'prefix'	=> 'rhc_monthview_bg',
			'selector'	=> '.rhcalendar.not-widget .fc-view-month'	
		));		

		//-- View border
		$i = count($t);
		$t[$i]=(object)array();
		$t[$i]->id 			= 'rhc-month-border'; 
		$t[$i]->label 		= __('View border','rhc');
		$t[$i]->options = array();	
			
		$t[$i]->options = $this->add_border_options($t[$i]->options,array(
			'prefix'	=> 'rhc_month_border',
			'selector'	=> "body .fc-view-month table",
			'show_collapse'	=> true,
			'show_spacing'	=> true
		));					

		
		//-- Top cell --------------------------------			
		$i = count($t);
		$t[$i]=(object)array();
		$t[$i]->id 			= 'rhc-month-top'; 
		$t[$i]->label 		= __('Day label','rhc');
		$t[$i]->options = array();		
		
		$t[$i]->options = $this->add_font_options( $t[$i]->options, array(
			'prefix'	=> 'rhc_month_header_font',
			'selector'	=> '.rhcalendar.not-widget .fc-view-month.fc-view .fc-first .fc-widget-header',
			'labels'	=> (object)array(
				'family'	=> __('Day font','rhc'),
				'size'		=> __('Size','rhc'),
				'color'		=> __('Color','rhc')				
			)
		));	
		
		$t[$i]->options[] =(object)array(
				'id'				=> 'rhc_allviews_header_font_shadow',
				'type'				=> 'css',
				'label'				=> __('Day font shadow','rhc'),
				'input_type'		=> 'textshadow',
				'opacity'			=> true,
				'selector'			=> '.rhcalendar.not-widget .fc-view-month.fc-view .fc-first .fc-widget-header',
				'property'			=> 'text-shadow',
				'real_time'			=> true,
				'btn_clear'			=> true
			);	
			
		$t[$i]->options = $this->add_backgroud_options( $t[$i]->options, array(
			'label'		=> __('Cell Background','rhc'),
			'prefix'	=> 'rhc_allview_day_label_bg',
			'selector'	=> '.rhcalendar.not-widget .fc-view-month.fc-view thead .fc-first .fc-widget-header'/*,
			'derived_color'=> array(
						array(
							'type'	=> 'color_darken',
							'val'	=> '10',
							'sel'	=> ".rhcalendar .fc-state-default, .rhcalendar .fc-state-default .fc-button-inner",
							'arg'	=> array(
								(object)array(
									'name' => 'border-color',
									'tpl'	=>'__value__'
								)
							)
						)
					)	
			*/		
		));		
		
		$t[$i]->options = $this->add_border_options($t[$i]->options,array(
			'prefix'	=> 'rhc_allview_day_label_border_top',
			'selector'	=> ".fullCalendar .fc-view-month table th",
			'label'			=> array(
				'color'	=> __('Top border color','rhc'),
				'style' => __('Top border style','rhc'),
				'size'	=> __('Width','rhc'),
				'collapse'	=> __('Collapse', 'rhc'),
				'spacing'	=> __('Spacing', 'rhc')
			),
			'property'	=>array(
				'color'		=> 'border-top-color',
				'style' 	=> 'border-top-style',
				'size'		=> 'border-top-width',
				'collapse'	=> 'border-top-collapse',
				'spacing'	=> 'border-top-spacing'
			)			
		));		
		
		$t[$i]->options = $this->add_border_options($t[$i]->options,array(
			'prefix'	=> 'rhc_allview_day_label_border_bottom',
			'selector'	=> ".fullCalendar .fc-view-month table th",
			'label'			=> array(
				'color'	=> __('Bottom border color','rhc'),
				'style' => __('Bottom border style','rhc'),
				'size'	=> __('Width','rhc'),
				'collapse'	=> __('Collapse', 'rhc'),
				'spacing'	=> __('Spacing', 'rhc')
			),
			'property'	=>array(
				'color'		=> 'border-bottom-color',
				'style' 	=> 'border-bottom-style',
				'size'		=> 'border-bottom-width',
				'collapse'	=> 'border-bottom-collapse',
				'spacing'	=> 'border-bottom-spacing'
			)			
		));		
		
		$t[$i]->options = $this->add_border_options($t[$i]->options,array(
			'prefix'	=> 'rhc_allview_day_label_border_left',
			'selector'	=> ".fullCalendar .fc-view-month table th",
			'label'			=> array(
				'color'	=> __('Left border color','rhc'),
				'style' => __('Left border style','rhc'),
				'size'	=> __('Width','rhc'),
				'collapse'	=> __('Collapse', 'rhc'),
				'spacing'	=> __('Spacing', 'rhc')
			),
			'property'	=>array(
				'color'		=> 'border-left-color',
				'style' 	=> 'border-left-style',
				'size'		=> 'border-left-width',
				'collapse'	=> 'border-left-collapse',
				'spacing'	=> 'border-left-spacing'
			)			
		));		
		
		$t[$i]->options = $this->add_border_options($t[$i]->options,array(
			'prefix'	=> 'rhc_allview_day_label_border_right',
			'selector'	=> ".fullCalendar .fc-view-month table th",
			'label'			=> array(
				'color'	=> __('Right border color','rhc'),
				'style' => __('Right border style','rhc'),
				'size'	=> __('Width','rhc'),
				'collapse'	=> __('Collapse', 'rhc'),
				'spacing'	=> __('Spacing', 'rhc')
			),
			'property'	=>array(
				'color'		=> 'border-right-color',
				'style' 	=> 'border-right-style',
				'size'		=> 'border-right-width',
				'collapse'	=> 'border-right-collapse',
				'spacing'	=> 'border-right-spacing'
			)			
		));			
				
		//-- Day number
		$i = count($t);
		$t[$i]=(object)array();
		$t[$i]->id 			= 'rhc-month-day-number'; 
		$t[$i]->label 		= __('Day number','rhc');
		$t[$i]->options = array();		
		$t[$i]->options = $this->add_font_options( $t[$i]->options, array(
			'prefix'	=> 'rhc_month_dnum_font',
			'selector'	=> '.rhcalendar.not-widget .fc-view-month.fc-grid .fc-day-number',
			'labels'	=> (object)array(
				'family'	=> __('Day font','rhc'),
				'size'		=> __('Size','rhc'),
				'color'		=> __('Color','rhc')				
			)
		));	
		
		$t[$i]->options[] =(object)array(
				'id'				=> 'rhc_month_dnum_font_shadow',
				'type'				=> 'css',
				'label'				=> __('Text shadow','rhc'),
				'input_type'		=> 'textshadow',
				'opacity'			=> true,
				'selector'			=> '.rhcalendar.not-widget .fc-view-month.fc-grid .fc-day-number',
				'property'			=> 'text-shadow',
				'real_time'			=> true,
				'btn_clear'			=> true
			);		

		$t[$i]->options[] =(object)array(
				'id'				=> 'rhc_month_dnum_text_align',
				'type'				=> 'css',
				'label'				=> 'Text align',
				'input_type'		=> 'select',
				'options'	=> array(
					''			=> '',
					'left'		=> 'left',
					'right'		=> 'right',
					'center' 	=> 'center',
					'justify'	=> 'justify',
					'initial'	=> 'initial',
					'inherit'	=> 'inherit'
				),
				'class'				=> '',
				'holder_class'		=> '',
				'selector'			=> '.fullCalendar .fc-view-month.fc-grid .fc-day .fc-day-number',
				'property'			=> 'text-align',
				'real_time'			=> true
			);
			
		$t[$i]->options = $this->add_border_options($t[$i]->options,array(
			'prefix'	=> 'rhc_month_dnum_border_top',
			'selector'	=> ".fullCalendar .fc-view-month table td, .fullCalendar .fc-border-separate tbody tr.fc-first td",
			'label'			=> array(
				'color'	=> __('Top border color','rhc'),
				'style' => __('Top border style','rhc'),
				'size'	=> __('Width','rhc'),
				'collapse'	=> __('Collapse', 'rhc'),
				'spacing'	=> __('Spacing', 'rhc')
			),
			'property'	=>array(
				'color'		=> 'border-top-color',
				'style' 	=> 'border-top-style',
				'size'		=> 'border-top-width',
				'collapse'	=> 'border-top-collapse',
				'spacing'	=> 'border-top-spacing'
			)
		));		

		$t[$i]->options = $this->add_border_options($t[$i]->options,array(
			'prefix'	=> 'rhc_month_dnum_border_bottom',
			'selector'	=> ".fullCalendar .fc-view-month table td",
			'label'			=> array(
				'color'	=> __('Bottom border color','rhc'),
				'style' => __('Bottom border style','rhc'),
				'size'	=> __('Width','rhc'),
				'collapse'	=> __('Collapse', 'rhc'),
				'spacing'	=> __('Spacing', 'rhc')
			),
			'property'	=>array(
				'color'		=> 'border-bottom-color',
				'style' 	=> 'border-bottom-style',
				'size'		=> 'border-bottom-width',
				'collapse'	=> 'border-bottom-collapse',
				'spacing'	=> 'border-bottom-spacing'
			)
		));	
		
		$t[$i]->options = $this->add_border_options($t[$i]->options,array(
			'prefix'	=> 'rhc_month_dnum_border_left',
			'selector'	=> ".fullCalendar .fc-view-month table td",
			'label'			=> array(
				'color'	=> __('Left border color','rhc'),
				'style' => __('Left border style','rhc'),
				'size'	=> __('Width','rhc'),
				'collapse'	=> __('Collapse', 'rhc'),
				'spacing'	=> __('Spacing', 'rhc')
			),
			'property'	=>array(
				'color'		=> 'border-left-color',
				'style' 	=> 'border-left-style',
				'size'		=> 'border-left-width',
				'collapse'	=> 'border-left-collapse',
				'spacing'	=> 'border-left-spacing'
			)
		));	
					
		$t[$i]->options = $this->add_border_options($t[$i]->options,array(
			'prefix'	=> 'rhc_month_dnum_border_right',
			'selector'	=> ".fullCalendar .fc-view-month table td",
			'label'			=> array(
				'color'	=> __('Right border color','rhc'),
				'style' => __('Right border style','rhc'),
				'size'	=> __('Width','rhc'),
				'collapse'	=> __('Collapse', 'rhc'),
				'spacing'	=> __('Spacing', 'rhc')
			),
			'property'	=>array(
				'color'		=> 'border-right-color',
				'style' 	=> 'border-right-style',
				'size'		=> 'border-right-width',
				'collapse'	=> 'border-right-collapse',
				'spacing'	=> 'border-right-spacing'
			)
		));		

							
		//-- Week number
		$i = count($t);
		$t[$i]=(object)array();
		$t[$i]->id 			= 'rhc-month-week-number'; 
		$t[$i]->label 		= __('Week number','rhc');
		$t[$i]->options = array();		
		$t[$i]->options = $this->add_font_options( $t[$i]->options, array(
			'prefix'	=> 'rhc_month_wnum_font',
			'selector'	=> '.rhcalendar.not-widget .fc-view-month.fc-grid tbody .fc-week-number',
			'labels'	=> (object)array(
				'family'	=> __('Day font','rhc'),
				'size'		=> __('Size','rhc'),
				'color'		=> __('Color','rhc')				
			)
		));	
		$t[$i]->options[] = (object)array(
				'id'				=> 'rhc_month_wnum_bg',
				'type'				=> 'css',
				'label'				=> __('Background color','rhc'),
				'input_type'		=> 'color_or_something_else',
				'holder_class'		=> '',
				'opacity'			=> true,
				'btn_clear'			=> true,
				'selector'			=> '.rhcalendar.not-widget .fc-view-month.fc-grid tbody .fc-week-number',
				'property'			=> 'background-color',
				'other_options'		=> array(
					'transparent'	=> 'transparent'
				),				
				'real_time'			=> true
			);
		$t[$i]->options = $this->add_padding_options($t[$i]->options,array(
			'prefix'	=> 'rhc_month_wnum_pad',
			'selector'	=> '.rhcalendar.not-widget .fc-view-month.fc-grid tbody .fc-week-number'
		));		
		
		//-- Event color
		$i = count($t);
		$t[$i]=(object)array();
		$t[$i]->id 			= 'rhc-month-default-event'; 
		$t[$i]->label 		= __('Default event','rhc');
		$t[$i]->options = array();	
		$t[$i]->options[] = (object)array(
				'id'				=> 'rhc_month_default_event_color',
				'type'				=> 'css',
				'label'				=> __('Event color','rhc'),
				'input_type'		=> 'color_or_something_else',
				'holder_class'		=> '',
				'opacity'			=> true,
				'btn_clear'			=> true,
				'selector'			=> ".rhcalendar .fc-event",
				'property'			=> 'background-color',
				'real_time'			=> true,
				'derived'			=> array(
						array(
							'type'	=> 'same',
							'val'	=> '5',
							'sel'	=> "body .fct-tooltip",
							'arg'	=> array(
								(object)array(
									'name' => 'border-color',
									'tpl'	=>'__value__;'
								)
							)
						)
					)	
			);	
		$t[$i]->options = $this->add_border_options($t[$i]->options,array(
			'prefix'	=> 'rhc_month_default_event_border',
			'selector'	=> ".rhcalendar .fc-event"
		));		
		
		
		$i = count($t);
		$t[$i]=(object)array();
		$t[$i]->id 			= 'rhc-month-image'; 
		$t[$i]->label 		= __('Image','rhc');
		$t[$i]->options = array();	

		$t[$i]->options[] =(object)array(
				'id'				=> 'rhc-month-image-min-height',
				'type'				=> 'css',
				'label'				=> 'Min height',
				'input_type'		=> 'number',
				'unit'				=> 'px',
				'class'				=> '',
				'holder_class'		=> '',
				'min'				=> '50',
				'max'				=> '200',
				'step'				=> '1',
				'selector'			=> '.rhcalendar.rhc_holder .fc-content  a.fc-event.has-fc-image img.fc-image',
				'property'			=> 'min-height',
				'real_time'			=> true
			);

		

							
		//-- Saved and DC  -----------------------		
		$i = count($t);
		$t[$i]=(object)array();
		$t[$i]->id 			= 'rh-saved-list'; 
		$t[$i]->label 		= __('Templates','rhc');
		$t[$i]->options = array(
			(object)array(
				'id'				=> 'rh_saved_settings',
				'input_type'		=> 'backup_list'
			)			
		);			
//----------------------------------------------------------------------
		return $t;
	}
}
?>