Subversion Repositories SmartDukaan

Rev

Rev 14517 | Rev 14561 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14517 Rev 14533
Line 8... Line 8...
8
				<fieldset>
8
				<fieldset>
9
					<legend><?php echo __('Add Featured Deal'); ?></legend>
9
					<legend><?php echo __('Add Featured Deal'); ?></legend>
10
				<?php
10
				<?php
11
					echo $this->Form->input('sku',array('type'=>'number'));
11
					echo $this->Form->input('sku',array('type'=>'number'));
12
					echo $this->Form->input('FeaturedDeal.rankDetails.0',array('type'=>'number','label'=>'Default Rank'));
12
					echo $this->Form->input('FeaturedDeal.rankDetails.0',array('type'=>'number','label'=>'Default Rank'));
-
 
13
					$options = array(
-
 
14
					    '3' => 'Mobiles',
-
 
15
					    '5' => 'Tablets'
-
 
16
					);
-
 
17
 
-
 
18
					$attributes = array(
-
 
19
					    'legend' => false,
-
 
20
					    'value' => 3,
-
 
21
					    'class' => 'catselect'
-
 
22
					);
-
 
23
					echo $this->Form->radio('type',$options,$attributes);
-
 
24
					// echo $this->Form->input('FeaturedDeal.rankDetails',array('type'=>'number','label'=>'Rank','class'=>'categoryRank'));
13
					echo $this->Form->input('FeaturedDeal.rankDetails.3',array('type'=>'number','label'=>'Mobiles Rank','class' => 'categoryRank'));
25
					echo $this->Form->input('FeaturedDeal.rankDetails.3',array('type'=>'number','label'=>'Mobiles Rank','class' => 'categoryRank'));
14
					echo $this->Form->input('FeaturedDeal.rankDetails.5',array('type'=>'number','label'=>'Tablets Rank','class'=>'categoryRank'));
26
					echo $this->Form->input('FeaturedDeal.rankDetails.5',array('type'=>'number','label'=>'Tablets Rank','class'=>'categoryRank','disabled'=>true));
15
					echo $this->Form->input('startDate',array('type'=>'datetime','timeFormat'=>24));
27
					echo $this->Form->input('startDate',array('type'=>'datetime','timeFormat'=>24));
16
					echo $this->Form->input('endDate',array('type'=>'datetime','timeFormat'=>24));
28
					echo $this->Form->input('endDate',array('type'=>'datetime','timeFormat'=>24));
17
					echo $this->Form->input('thresholdPrice',array('type'=>'number'));
29
					echo $this->Form->input('thresholdPrice',array('type'=>'number'));
18
				?>
30
				?>
19
				</fieldset>
31
				</fieldset>
Line 22... Line 34...
22
		</div>
34
		</div>
23
	</div>
35
	</div>
24
</div>
36
</div>
25
<script type="text/javascript">
37
<script type="text/javascript">
26
$(function(){
38
$(function(){
27
	$(document).on('click','.categoryRank',function(){
39
	$(document).on('click','.catselect',function(){
28
		var that = $(this);
40
		var that = $(this);
29
		$(this).prop('readonly',false);
-
 
30
		$('.categoryRank').each(function(){
41
		$('.categoryRank').prop('disabled',true).val('');
31
			if($(this).prop('id') != $(that).prop('id')){
-
 
32
				$(this).val('').prop('readonly',true);
42
		$('#FeaturedDealRankDetails'+$(this).val()).prop('disabled',false);		
33
			}
-
 
34
		});
-
 
35
	})
43
	})
36
})
44
})
37
</script>
45
</script>