Petite correction javascript

This commit is contained in:
Michael RICOIS 2011-01-24 09:57:33 +00:00
parent e045824301
commit 8c5c90056a
2 changed files with 3 additions and 3 deletions

View File

@ -1563,7 +1563,7 @@ $(document).bind('mousedown.qtip',function(event)
{$('.qtip[unfocus]').each(function() {$('.qtip[unfocus]').each(function()
{var api=$(this).qtip("api");if($(this).is(':visible')&&api&&api.status&&!api.status.disabled&&$(event.target).add(api.elements.target).length>1) {var api=$(this).qtip("api");if($(this).is(':visible')&&api&&api.status&&!api.status.disabled&&$(event.target).add(api.elements.target).length>1)
api.hide(event);})};})});$.fn.qtip.interfaces=[] api.hide(event);})};})});$.fn.qtip.interfaces=[]
$.fn.qtip.log={error:function(){return this;}};$.fn.qtip.constants={};$.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:'bottomRight',tooltip:'topLeft'},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:'absolute',container:false},show:{when:{target:false,event:'mouseover'},effect:{type:'fade',length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:'mouseout'},effect:{type:'fade',length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};$.fn.qtip.styles={defaults:{background:'white',color:'#111',overflow:'hidden',textAlign:'left',width:{min:0,max:250},padding:'5px 9px',border:{width:1,radius:0,color:'#d3d3d3'},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:'#e1e1e1',fontWeight:'bold',padding:'7px 12px'},button:{cursor:'pointer'},classes:{target:'',tip:'qtip-tip',title:'qtip-title',button:'qtip-button',content:'qtip-content',active:'qtip-active'}},cream:{border:{width:3,radius:0,color:'#F9E98E'},title:{background:'#F0DE7D',color:'#A27D35'},background:'#FBF7AA',color:'#A27D35',classes:{tooltip:'qtip-cream'}},light:{border:{width:3,radius:0,color:'#E2E2E2'},title:{background:'#f1f1f1',color:'#454545'},background:'white',color:'#454545',classes:{tooltip:'qtip-light'}},dark:{border:{width:3,radius:0,color:'#303030'},title:{background:'#404040',color:'#f3f3f3'},background:'#505050',color:'#f3f3f3',classes:{tooltip:'qtip-dark'}},red:{border:{width:3,radius:0,color:'#CE6F6F'},title:{background:'#f28279',color:'#9C2F2F'},background:'#F79992',color:'#9C2F2F',classes:{tooltip:'qtip-red'}},green:{border:{width:3,radius:0,color:'#A9DB66'},title:{background:'#b9db8c',color:'#58792E'},background:'#CDE6AC',color:'#58792E',classes:{tooltip:'qtip-green'}},blue:{border:{width:3,radius:0,color:'#ADD9ED'},title:{background:'#D0E9F5',color:'#5E99BD'},background:'#E5F6FE',color:'#4D9FBF',classes:{tooltip:'qtip-blue'}}};})(jQuery);$(document).ready(function(){$("#Menu").accordion({autoHeight:false,collapsible:true,active:0});$(window).scroll(function(){var offset=$(document).scrollTop();$("#floatMenu").css('margin-top',offset);});$('#formR-naf').autocomplete({minLength:3,source:function(request,response){$.getJSON('./?page=naf',{q:request.term},function(data){response(data);});}});$('input[name=formR[siret]]').focus();$('form[name=form_recherche]').submit(function(){var reg=/[a-z]{3}/i;var siret=$('input[name=formR[siret]]').val();if(siret.match(reg)){$('input[name=formR[raisonSociale]]').attr('value',siret);$('input[name=formR[siret]]').attr('value','');} $.fn.qtip.log={error:function(){return this;}};$.fn.qtip.constants={};$.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:'bottomRight',tooltip:'topLeft'},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:'absolute',container:false},show:{when:{target:false,event:'mouseover'},effect:{type:'fade',length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:'mouseout'},effect:{type:'fade',length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};$.fn.qtip.styles={defaults:{background:'white',color:'#111',overflow:'hidden',textAlign:'left',width:{min:0,max:250},padding:'5px 9px',border:{width:1,radius:0,color:'#d3d3d3'},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:'#e1e1e1',fontWeight:'bold',padding:'7px 12px'},button:{cursor:'pointer'},classes:{target:'',tip:'qtip-tip',title:'qtip-title',button:'qtip-button',content:'qtip-content',active:'qtip-active'}},cream:{border:{width:3,radius:0,color:'#F9E98E'},title:{background:'#F0DE7D',color:'#A27D35'},background:'#FBF7AA',color:'#A27D35',classes:{tooltip:'qtip-cream'}},light:{border:{width:3,radius:0,color:'#E2E2E2'},title:{background:'#f1f1f1',color:'#454545'},background:'white',color:'#454545',classes:{tooltip:'qtip-light'}},dark:{border:{width:3,radius:0,color:'#303030'},title:{background:'#404040',color:'#f3f3f3'},background:'#505050',color:'#f3f3f3',classes:{tooltip:'qtip-dark'}},red:{border:{width:3,radius:0,color:'#CE6F6F'},title:{background:'#f28279',color:'#9C2F2F'},background:'#F79992',color:'#9C2F2F',classes:{tooltip:'qtip-red'}},green:{border:{width:3,radius:0,color:'#A9DB66'},title:{background:'#b9db8c',color:'#58792E'},background:'#CDE6AC',color:'#58792E',classes:{tooltip:'qtip-green'}},blue:{border:{width:3,radius:0,color:'#ADD9ED'},title:{background:'#D0E9F5',color:'#5E99BD'},background:'#E5F6FE',color:'#4D9FBF',classes:{tooltip:'qtip-blue'}}};})(jQuery);$(document).ready(function(){$("#Menu").accordion({autoHeight:false,collapsible:true,active:0});$(window).scroll(function(){var offset=$(document).scrollTop();$("#floatMenu").css('margin-top',offset);});$('#formR-naf').autocomplete({minLength:3,source:function(request,response){$.getJSON('./?page=naf',{q:request.term},function(data){response(data);});}});$('input[name=formR[siret]]').focus();$('form[name=form_recherche]').submit(function(){var reg=/[a-z]{3}/i;var siret=$('input[name=formR[siret]]').val();if(siret.match(reg)){$('input[name=formR[raisonSociale]]').val(siret);$('input[name=formR[siret]]').val('');}
return true;});$('input.button').button();$('input.button:reset').click(function(){$('input:text','form[name=form_recherche]').val('');return false;});$('.dialogsurv').live('click',function(){var title=$(this).attr('title');var href=$(this).attr('href')+'&dialog=1';var dialogOpts={bgiframe:true,title:title,width:500,height:350,modal:true,open:function(event,ui){$(this).html('Chargement...');$(this).load(href);$('#dialogsurv').keypress(function(e){if(e.keyCode==13){e.preventDefault();survSubmit();}});},buttons:{Ok:function(){survSubmit();},Annuler:function(){$(this).dialog('close');}},close:function(){$('#dialogsurv').remove();}};$('<div id="dialogsurv"></div>').dialog(dialogOpts);return false;});function survSubmit(){var buttons=$('#dialogsurv').dialog('option','buttons');for(var button in buttons){$(":button:contains('"+button+"')").attr('disabled','disabled');} return true;});$('input.button').button();$('input.button:reset').click(function(){$('input:text','form[name=form_recherche]').val('');return false;});$('.dialogsurv').live('click',function(){var title=$(this).attr('title');var href=$(this).attr('href')+'&dialog=1';var dialogOpts={bgiframe:true,title:title,width:500,height:350,modal:true,open:function(event,ui){$(this).html('Chargement...');$(this).load(href);$('#dialogsurv').keypress(function(e){if(e.keyCode==13){e.preventDefault();survSubmit();}});},buttons:{Ok:function(){survSubmit();},Annuler:function(){$(this).dialog('close');}},close:function(){$('#dialogsurv').remove();}};$('<div id="dialogsurv"></div>').dialog(dialogOpts);return false;});function survSubmit(){var buttons=$('#dialogsurv').dialog('option','buttons');for(var button in buttons){$(":button:contains('"+button+"')").attr('disabled','disabled');}
var formAction=$('#frmSurv').attr('action');var href=window.location.href;var serData=$('#frmSurv').serialize();$('#frmSurv').replaceWith('<div id="frmSurv">Mise sous surveillance en cours...</div>');$.post(formAction,serData,function(data){if(data==''){$('#frmSurv').html("L'entité a été placé sous surveillance.\n");window.location.href=href;}else{$('#frmSurv').html(data);}});} var formAction=$('#frmSurv').attr('action');var href=window.location.href;var serData=$('#frmSurv').serialize();$('#frmSurv').replaceWith('<div id="frmSurv">Mise sous surveillance en cours...</div>');$.post(formAction,serData,function(data){if(data==''){$('#frmSurv').html("L'entité a été placé sous surveillance.\n");window.location.href=href;}else{$('#frmSurv').html(data);}});}
$('a[idobjet]').click(function() $('a[idobjet]').click(function()

View File

@ -25,8 +25,8 @@ $(document).ready(function(){
var reg = /[a-z]{3}/i; var reg = /[a-z]{3}/i;
var siret = $('input[name=formR[siret]]').val(); var siret = $('input[name=formR[siret]]').val();
if(siret.match(reg)){ if(siret.match(reg)){
$('input[name=formR[raisonSociale]]').attr('value',siret); $('input[name=formR[raisonSociale]]').val(siret);
$('input[name=formR[siret]]').attr('value',''); $('input[name=formR[siret]]').val('');
} }
return true; return true;
}); });