isearch/cv - disable autosave
This commit is contained in:
parent
18c9fb9b29
commit
424b6eafab
|
@ -63,43 +63,43 @@ echo $this->Html->link($text,array('controller'=>'user','action'=>'profil'),arra
|
|||
<?php
|
||||
if($cvc_item['DreamjobListCvCategory']['startdate'] and $cvc_item['DreamjobListCvCategory']['enddate'] and $cvc_item['DreamjobListCvCategory']['place']){
|
||||
?>
|
||||
<td><span class="label"><?=__('dreamjob.between');?>:</span><?=$this->Form->input('DreamjobCvEntry.'.$i.'.startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?><span class="label"><?=__('dreamjob.between.till');?>:</span><?=$this->Form->input('DreamjobCvEntry.'.$i.'.enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100,'maxYear' => date('Y')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?><span><?=$this->Form->input('DreamjobCvEntry.'.$i.'.place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str']));?></span></td>
|
||||
<td><span class="label"><?=__('dreamjob.between');?>:</span><?=$this->Form->input('DreamjobCvEntry.'.$i.'.startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?><span class="label"><?=__('dreamjob.between.till');?>:</span><?=$this->Form->input('DreamjobCvEntry.'.$i.'.enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100,'maxYear' => date('Y'),'required'=>false));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str'],'required'=>false));?><span><?=$this->Form->input('DreamjobCvEntry.'.$i.'.place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str'],'required'=>false));?></span></td>
|
||||
<?php
|
||||
}else if($cvc_item['DreamjobListCvCategory']['place']){
|
||||
if($cvc_item['DreamjobListCvCategory']['startdate']){
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?></td>
|
||||
<?php
|
||||
}else if($cvc_item['DreamjobListCvCategory']['enddate']){
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?></td>
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str']));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str'],'required'=>false));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str'],'required'=>false));?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if($cvc_item['DreamjobListCvCategory']['startdate'] or $cvc_item['DreamjobListCvCategory']['enddate']){
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?><span><?=$this->Form->input('DreamjobCvEntry.'.$i.'.place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str']));?></span></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str'],'required'=>false));?><span><?=$this->Form->input('DreamjobCvEntry.'.$i.'.place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str'],'required'=>false));?></span></td>
|
||||
<?php
|
||||
}
|
||||
}else{
|
||||
if($cvc_item['DreamjobListCvCategory']['startdate'] and $cvc_item['DreamjobListCvCategory']['enddate']){
|
||||
?>
|
||||
<td><?=__('dreamjob.between');?>: <?=$this->Form->input('DreamjobCvEntry.'.$i.'.startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?> <br/> <?=__('dreamjob.between.till');?>: <?=$this->Form->input('DreamjobCvEntry.'.$i.'.enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?></td>
|
||||
<td><?=__('dreamjob.between');?>: <?=$this->Form->input('DreamjobCvEntry.'.$i.'.startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?> <br/> <?=__('dreamjob.between.till');?>: <?=$this->Form->input('DreamjobCvEntry.'.$i.'.enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?></td>
|
||||
<?php
|
||||
}else if($cvc_item['DreamjobListCvCategory']['startdate']){
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?></td>
|
||||
<?php
|
||||
}else if($cvc_item['DreamjobListCvCategory']['enddate']){
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?></td>
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
|
@ -107,7 +107,7 @@ echo $this->Html->link($text,array('controller'=>'user','action'=>'profil'),arra
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str'],'required'=>false));?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -123,43 +123,43 @@ echo $this->Html->link($text,array('controller'=>'user','action'=>'profil'),arra
|
|||
<?php
|
||||
if($cvc_item['DreamjobListCvCategory']['startdate'] and $cvc_item['DreamjobListCvCategory']['enddate'] and $cvc_item['DreamjobListCvCategory']['place']){
|
||||
?>
|
||||
<td><span class="label"><?=__('dreamjob.between');?>:</span><?=$this->Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?><span class="label"><?=__('dreamjob.between.till');?>:</span><?=$this->Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?><span><?=$this->Form->input('DreamjobCvEntry..place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str']));?></span></td>
|
||||
<td><span class="label"><?=__('dreamjob.between');?>:</span><?=$this->Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?><span class="label"><?=__('dreamjob.between.till');?>:</span><?=$this->Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str'],'required'=>false));?><span><?=$this->Form->input('DreamjobCvEntry..place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str'],'required'=>false));?></span></td>
|
||||
<?php
|
||||
}else if($cvc_item['DreamjobListCvCategory']['place']){
|
||||
if($cvc_item['DreamjobListCvCategory']['startdate']){
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?></td>
|
||||
<?php
|
||||
}else if($cvc_item['DreamjobListCvCategory']['enddate']){
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?></td>
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str']));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str'],'required'=>false));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str'],'required'=>false));?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if($cvc_item['DreamjobListCvCategory']['startdate'] or $cvc_item['DreamjobListCvCategory']['enddate']){
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?><span><?=$this->Form->input('DreamjobCvEntry..place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str']));?></span></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?><span><?=$this->Form->input('DreamjobCvEntry..place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str'],'required'=>false));?></span></td>
|
||||
<?php
|
||||
}
|
||||
}else{
|
||||
if($cvc_item['DreamjobListCvCategory']['startdate'] and $cvc_item['DreamjobListCvCategory']['enddate']){
|
||||
?>
|
||||
<td><span class="label"><?=__('dreamjob.between');?>:</span><?=$this->Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?><span class="label"> <?=__('dreamjob.between.till');?>:</span><?=$this->Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?></td>
|
||||
<td><span class="label"><?=__('dreamjob.between');?>:</span><?=$this->Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?><span class="label"> <?=__('dreamjob.between.till');?>:</span><?=$this->Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?></td>
|
||||
<?php
|
||||
}else if($cvc_item['DreamjobListCvCategory']['startdate']){
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?></td>
|
||||
<?php
|
||||
}else if($cvc_item['DreamjobListCvCategory']['enddate']){
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y'),'required'=>false));?></td>
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
|
@ -167,16 +167,21 @@ echo $this->Html->link($text,array('controller'=>'user','action'=>'profil'),arra
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?></td>
|
||||
<td><?=$this->Form->input('DreamjobCvEntry..title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str'],'required'=>false));?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td><a class="btn btn-default btn-del rmEvnt" ref="eventOff"><span class="glyphicon glyphicon-trash"></span></a></td>
|
||||
<?=$this->Form->input('DreamjobCvEntry..category_id',array('type'=>'hidden','value'=>$cvc_item['DreamjobListCvCategory']['id']));?>
|
||||
<?=$this->Form->input('DreamjobCvEntry..category_id',array('type'=>'hidden','value'=>$cvc_item['DreamjobListCvCategory']['id'],'required'=>false));?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="buttonrow">
|
||||
<?=$this->Form->button('<span class="glyphicon glyphicon-floppy-disk"></span> '.__('dreamjob.settings.save'),array('div' => false,'class'=>"btn btn-primary ",'type' => 'submit'));?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
echo $this->Form->input('AppUser.avatar',array('type'=>'file','label'=>array('text'=>__("dreamjob.avatar"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
?>
|
||||
<div class="buttonrow">
|
||||
<?=$this->Form->button('<span class="glyphicon glyphicon-floppy-disk"></span> '.__('dreamjob.settings.save'),array('div' => false,'class'=>"btn btn-primary ",'type' => 'submit'));?>
|
||||
<?=$this->Form->button('<span class="glyphicon glyphicon-floppy-disk"></span> '.__('dreamjob.save'),array('div' => false,'class'=>"btn btn-primary ",'type' => 'submit'));?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
|
|
|
@ -39,21 +39,27 @@ if($profil['AppUser']['take_systemwide']){
|
|||
<tr data="set">
|
||||
<td>
|
||||
<?=$this->Form->hidden("DreamjobISearch.$i.id");?>
|
||||
<?=$this->Form->input("DreamjobISearch.$i.branch_id",array('empty' => __('dreamjob.form.chooseOne')));?>
|
||||
<?=$this->Form->input("DreamjobISearch.$i.branch_id",array('empty' => __('dreamjob.form.chooseOne'),'required'=>false));?>
|
||||
</td>
|
||||
<td><?=$this->Form->input("DreamjobISearch.$i.job_id",array('empty' =>__('dreamjob.form.chooseOne')));?></td>
|
||||
<td><?=$this->Form->input("DreamjobISearch.$i.kindofjob_id",array('empty' => __('dreamjob.form.chooseOne')));?></td>
|
||||
<td><?=$this->Form->input("DreamjobISearch.$i.job_id",array('empty' =>__('dreamjob.form.chooseOne'),'required'=>false));?></td>
|
||||
<td><?=$this->Form->input("DreamjobISearch.$i.kindofjob_id",array('empty' => __('dreamjob.form.chooseOne'),'required'=>false));?></td>
|
||||
<td><a class="btn btn-default btn-del rmEvnt" ref="eventOff"><span class="glyphicon glyphicon-trash"></span></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr class="new">
|
||||
<td><?=$this->Form->input('DreamjobISearch..branch_id',array('empty' => __('dreamjob.form.chooseOne')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobISearch..job_id',array('empty' =>__('dreamjob.form.chooseOne')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobISearch..kindofjob_id',array('empty' => __('dreamjob.form.chooseOne')));?></td>
|
||||
<td><?=$this->Form->input('DreamjobISearch..branch_id',array('empty' => __('dreamjob.form.chooseOne'),'required'=>false));?></td>
|
||||
<td><?=$this->Form->input('DreamjobISearch..job_id',array('empty' =>__('dreamjob.form.chooseOne'),'required'=>false));?></td>
|
||||
<td><?=$this->Form->input('DreamjobISearch..kindofjob_id',array('empty' => __('dreamjob.form.chooseOne'),'required'=>false));?></td>
|
||||
<td><a class="btn btn-default btn-del" ref="eventOff"><span class="glyphicon glyphicon-trash"></span></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="buttonrow">
|
||||
<?=$this->Form->button('<span class="glyphicon glyphicon-floppy-disk"></span> '.__('dreamjob.save'),array('div' => false,'class'=>"btn btn-primary ",'type' => 'submit'));?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -110,7 +110,7 @@ if($profil['AppUser']['take_systemwide']){
|
|||
echo $this->Html->link('<span class="glyphicon glyphicon-trash"></span> '.__('dreamjob.page.del'),array('controller'=>'user','action'=>'settings_pageInh','?'=>array('del'=> $pag['id'])),array('escape'=>false,'class'=>'btn btn-default'));
|
||||
}
|
||||
?>
|
||||
<?=$this->Form->button('<span class="glyphicon glyphicon-floppy-disk"></span> '.__('dreamjob.settings.save'),array('div' => false,'class'=>"btn btn-primary ",'type' => 'submit'));?>
|
||||
<?=$this->Form->button('<span class="glyphicon glyphicon-floppy-disk"></span> '.__('dreamjob.save'),array('div' => false,'class'=>"btn btn-primary ",'type' => 'submit'));?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
|
|
|
@ -15,8 +15,6 @@ var global_load = null;
|
|||
}
|
||||
});
|
||||
$(window).bind('popstate', function(evt) {
|
||||
console.log(evt.target.pageurl);
|
||||
console.log(evt);
|
||||
if (evt.originalEvent.state !== null) {
|
||||
load(location.href, {'history': false}, false);
|
||||
}
|
||||
|
@ -57,7 +55,7 @@ var global_load = null;
|
|||
$(where + " a").tooltip();
|
||||
;
|
||||
$(where + " a").not('[href*="mailto:"]').each(function(that) {
|
||||
if ($(this).attr("rel") !== "external" && $(this).attr("ref") !== "eventOff" && !$(this).parents('ul').hasClass("wysihtml5-toolbar") && !$(this).hasClass(".select2-choice") && !$(this).parents('form').hasClass('tableForm'))
|
||||
if ($(this).attr("rel") !== "external" && $(this).attr("ref") !== "eventOff" && !$(this).parents('ul').hasClass("wysihtml5-toolbar") && !$(this).hasClass(".select2-choice"))
|
||||
$(this).click(function(e) {
|
||||
stopLoad(e);
|
||||
load($(this).attr('href'), {}, ($(this).attr('rel') == "tab"));
|
||||
|
@ -66,8 +64,19 @@ var global_load = null;
|
|||
});
|
||||
|
||||
$(where + " form").submit(function(e) {
|
||||
if (!$(this).hasClass("hide-form") && $(this).attr('enctype') != 'multipart/form-data') {
|
||||
if ($(this).attr('enctype') != 'multipart/form-data') {
|
||||
stopLoad(e);
|
||||
if ($(this).hasClass('tableForm')) {
|
||||
$("tbody tr.new", $(this)).remove();
|
||||
i=0;
|
||||
$("tbody tr", $(this)).each(function() {
|
||||
$(":input[name]", this).each(function() {
|
||||
str = $(this).attr("name").replace(/data\[(.*?)\]\[.*?\]\[(.+)\]/g, 'data[$1][' + i + '][$2]');
|
||||
$(this).attr("name", str);
|
||||
});
|
||||
i++;
|
||||
});
|
||||
}
|
||||
$(":input[ name *= '_wysihtml5_mod' ]", this).remove();
|
||||
//stopLoad(e);
|
||||
if ($(this).attr("back"))
|
||||
|
@ -80,12 +89,12 @@ var global_load = null;
|
|||
});
|
||||
|
||||
$(where + " form[ enctype *= 'multipart/form-data' ]").each(function(evt) {
|
||||
stopLoad(evt);
|
||||
if (!$('#fileUpload').length)
|
||||
$('body').append('<iframe id="fileUpload" name="fileUpload" style="display:none" />');
|
||||
$(this).attr('target', 'fileUpload');
|
||||
$(":input[ name *= '_wysihtml5_mod' ]", this).remove();
|
||||
$(this).submit(function() {
|
||||
stopLoad(evt);
|
||||
frame = $('#fileUpload').load(function() {
|
||||
setContent(frame.contents().find('body').html());
|
||||
frame.unbind('load');
|
||||
|
@ -101,7 +110,6 @@ var global_load = null;
|
|||
var newRow = $(".new", this).html();
|
||||
$(that).on('change',function(e) {
|
||||
stopLoad(e);
|
||||
tosave = true;
|
||||
$("tr", that).each(function(evt) {
|
||||
see = true;
|
||||
$(":input:not([ type = 'hidden' ] ):not(.select2-focusser):not(.select2-input)", this).each(function() {
|
||||
|
@ -119,57 +127,19 @@ var global_load = null;
|
|||
$(that).append("<tr class=\"new\">" + newRow + "</tr>");
|
||||
evet();
|
||||
}
|
||||
|
||||
save = true;
|
||||
that2 = this;
|
||||
$(":input:not([ type = 'hidden' ] ):not(.select2-focusser):not(.select2-input)", this).each(function() {
|
||||
if (save && !$(that2).hasClass("new")) {
|
||||
save = $(this).val() != '';
|
||||
}
|
||||
});
|
||||
if (tosave && !$(that2).hasClass("new")) {
|
||||
tosave = save;
|
||||
}
|
||||
});
|
||||
if (tosave)
|
||||
//console.log("sendTosave");
|
||||
saveForm(that);
|
||||
});
|
||||
//ZUOFT WIRD GESPEICHERT
|
||||
|
||||
function evet() {
|
||||
$("tr:not(.new)", that).each(function() {
|
||||
var that2 = this;
|
||||
$(".btn-del", this).unbind("click").click(function(evt) {
|
||||
$(that2).remove();
|
||||
saveForm(that);
|
||||
});
|
||||
});
|
||||
}
|
||||
evet();
|
||||
});
|
||||
|
||||
function saveForm(here, back) {
|
||||
i = 0;
|
||||
$(":input[ name *= '_wysihtml5_mod' ]", $(here).parents('form')).remove();
|
||||
//$(":input[ class *= 'select2-focusser' ]",$(here).parents('form')).remove();
|
||||
$("tbody tr.new", $(here).parents('form')).remove();
|
||||
$("tbody tr", $(here).parents('form')).each(function() {
|
||||
$(":input[name]", this).each(function() {
|
||||
str = $(this).attr("name").replace(/data\[(.*?)\]\[.*?\]\[(.+)\]/g, 'data[$1][' + i + '][$2]');
|
||||
$(this).attr("name", str);
|
||||
});
|
||||
i++;
|
||||
});
|
||||
load($(here).parents("form").attr("action"), {back: back, data: $(here).parents("form").serialize(), type: 'POST'}, false);
|
||||
}
|
||||
|
||||
|
||||
$($(where + " form.tableForm .label.edit").parents('form.tableForm a')).click(function() {
|
||||
saveForm('form.tableForm tbody', $(this).attr('href'));
|
||||
return false;
|
||||
});
|
||||
//$(where+" form label.has-error").parent(".form-group").addClass("has-error")
|
||||
}
|
||||
function setContent(data, back, tab, backignore) {
|
||||
title = data.split('<title>')[1].split('</title>')[0];
|
||||
|
|
Loading…
Reference in New Issue