mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
Fix JS code style
This commit is contained in:
@@ -32,7 +32,7 @@ define([
|
||||
ModalView,
|
||||
SaveView,
|
||||
DcFieldView
|
||||
) {
|
||||
) {
|
||||
var expect = chai.expect;
|
||||
var assert = chai.assert;
|
||||
var should = chai.should();
|
||||
|
@@ -12,7 +12,7 @@ define([
|
||||
FormView,
|
||||
InputView,
|
||||
ErrorView
|
||||
) {
|
||||
) {
|
||||
var expect = chai.expect;
|
||||
var assert = chai.assert;
|
||||
var should = chai.should();
|
||||
|
@@ -71,7 +71,7 @@ function ini_edit_usrs(){
|
||||
$('#users_rights_form div.switch_right').bind('click', function(event){
|
||||
user_click_box(event, $(this));
|
||||
});
|
||||
$('#right-ajax button.users_rights_valid').bind('click', function(){
|
||||
$('#right-ajax button.users_rights_valid').bind('click', function(){
|
||||
var datas = {
|
||||
users:$('#users_rights_form input[name="users"]').val(),
|
||||
values:$('#users_rights_form').serialize(),
|
||||
|
@@ -918,18 +918,18 @@ function set_image_position(smooth, image, width, height, container, callback)
|
||||
{
|
||||
callback = function(){};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dimensions.width = parseInt(width);
|
||||
dimensions.height = parseInt(height);
|
||||
dimensions.width = parseInt(width);
|
||||
dimensions.height = parseInt(height);
|
||||
// if(smooth)
|
||||
// {
|
||||
// $(image).stop().animate(dimensions,500,callback);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
$(image).css(dimensions);
|
||||
callback;
|
||||
$(image).css(dimensions);
|
||||
callback;
|
||||
// }
|
||||
}
|
||||
|
||||
|
@@ -4,7 +4,7 @@ $(document).ready(function(){
|
||||
|
||||
|
||||
|
||||
$('.confirm_report').live('click',function(){
|
||||
$('.confirm_report').live('click',function(){
|
||||
var $this = $(this);
|
||||
|
||||
$('.loader', $this).css({
|
||||
@@ -39,7 +39,7 @@ $('.confirm_report').live('click',function(){
|
||||
return;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('.agreement_radio').live('vmousedown', function(){
|
||||
var sselcont_id = $(this).attr('for').split('_').pop();
|
||||
|
@@ -1961,7 +1961,7 @@ function startThisEditing(sbas_id,what,regbasprid,ssel)
|
||||
}
|
||||
});
|
||||
|
||||
$('#EDIT_MID_R')
|
||||
$('#EDIT_MID_R')
|
||||
.css('left', $('#EDIT_MID_L').position().left + $('#EDIT_MID_L').width() + 15)
|
||||
.resizable({
|
||||
handles : 'w',
|
||||
|
@@ -67,7 +67,7 @@ function showFound2(term, lterm, branch, depth)
|
||||
thb.className = "ob";
|
||||
}
|
||||
// }
|
||||
/*
|
||||
/*
|
||||
if(depth == 0)
|
||||
{
|
||||
document.getElementById("WT1").style.visibility="hidden";
|
||||
@@ -77,7 +77,7 @@ function showFound2(term, lterm, branch, depth)
|
||||
evt_kup_T1();
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
return(ret);
|
||||
}
|
||||
|
||||
@@ -241,8 +241,8 @@ function dirty()
|
||||
document.getElementById("saveButton").style.display = "";
|
||||
}
|
||||
/*
|
||||
function delTerm(inputName, zTerm) // inputName = "TS"|"TA"|"SY"
|
||||
{
|
||||
function delTerm(inputName, zTerm) // inputName = "TS"|"TA"|"SY"
|
||||
{
|
||||
if(typeof(zTerm)=="undefined")
|
||||
zTerm = document.forms["fTh"]["text"+inputName].value;
|
||||
|
||||
@@ -330,18 +330,18 @@ function delTerm(inputName, zTerm) // inputName = "TS"|"TA"|"SY"
|
||||
// alert("Le terme associé '"+newterm+"' n' existe pas.");
|
||||
}
|
||||
evt_kup(inputName);
|
||||
}
|
||||
*/
|
||||
}
|
||||
*/
|
||||
/*
|
||||
// supprime un terme et tous ses fils (deplace la branche dans '(deleted)' )
|
||||
function deleteBranch(the, thb_deleted)
|
||||
{
|
||||
// supprime un terme et tous ses fils (deplace la branche dans '(deleted)' )
|
||||
function deleteBranch(the, thb_deleted)
|
||||
{
|
||||
newdel = thb_deleted.appendChild(the.cloneNode(true));
|
||||
deleteBranch0(newdel, "R"+thb_deleted.parentNode.id.substr(1));
|
||||
}
|
||||
}
|
||||
|
||||
function deleteBranch0(node, pfxid)
|
||||
{
|
||||
function deleteBranch0(node, pfxid)
|
||||
{
|
||||
if(node.id && node.id.substr(0,2)=="TH")
|
||||
{
|
||||
oldid = node.oldid ? node.oldid : node.id.substr(4);
|
||||
@@ -360,8 +360,8 @@ function deleteBranch0(node, pfxid)
|
||||
{
|
||||
deleteBranch0(node, pfxid);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
*/
|
||||
// supprime un terme et tous ses fils (deplace 'e plat') dans '(deleted)'
|
||||
function deleteBranch(the, thb_deleted)
|
||||
{
|
||||
|
@@ -55,8 +55,8 @@ function evt_dblclk_doc(event, gui)
|
||||
|
||||
var iiii=0;
|
||||
|
||||
function ww_evt_mdwn_doc(gui, evt)
|
||||
{
|
||||
function ww_evt_mdwn_doc(gui, evt)
|
||||
{
|
||||
var gui = eval(gui);
|
||||
|
||||
if(gui.elemBalloon)
|
||||
@@ -168,11 +168,11 @@ var iiii=0;
|
||||
}
|
||||
evt.cancelBubble = true;
|
||||
evt.returnValue = false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
function unused_evt_mmov_doc(event, gui)
|
||||
{
|
||||
function unused_evt_mmov_doc(event, gui)
|
||||
{
|
||||
var gui = eval(gui);
|
||||
var button, xmouse, ymouse;
|
||||
|
||||
@@ -275,11 +275,11 @@ function unused_evt_mmov_doc(event, gui)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
*/
|
||||
|
||||
function ww_evt_mmov_doc(gui, evt)
|
||||
{
|
||||
function ww_evt_mmov_doc(gui, evt)
|
||||
{
|
||||
var gui = eval(gui);
|
||||
var button, xmouse, ymouse;
|
||||
|
||||
@@ -383,7 +383,7 @@ function unused_evt_mmov_doc(event, gui)
|
||||
}
|
||||
return; // if drag/drop, don't care about moving windows
|
||||
}
|
||||
/*
|
||||
/*
|
||||
dragObj.objCursor.style.visibility = "hidden";
|
||||
|
||||
// msg("" + (e.clientX) + " - " + (e.clientY) );
|
||||
@@ -402,7 +402,7 @@ function unused_evt_mmov_doc(event, gui)
|
||||
{
|
||||
var opos = gui.sliding.opos;
|
||||
var npos = opos + (xmouse - gui.x0);
|
||||
// self.status = "otop=" + otop + " ntop="+ntop;
|
||||
// self.status = "otop=" + otop + " ntop="+ntop;
|
||||
if(npos < 0)
|
||||
npos = 0;
|
||||
else if(npos > gui.sliding.posmax )
|
||||
@@ -429,7 +429,7 @@ function unused_evt_mmov_doc(event, gui)
|
||||
{
|
||||
var otop = parseInt(gui.splitting.getAttribute('otop'));
|
||||
var ntop = otop + (ymouse - gui.y0);
|
||||
// self.status = "otop=" + otop + " ntop="+ntop;
|
||||
// self.status = "otop=" + otop + " ntop="+ntop;
|
||||
if(ntop > 40 && ntop < hwin-40 )
|
||||
gui.splitting.style.top = ntop+"px";
|
||||
}
|
||||
@@ -437,7 +437,7 @@ function unused_evt_mmov_doc(event, gui)
|
||||
{
|
||||
var oleft = parseInt(gui.splitting.getAttribute('oleft'));
|
||||
var nleft = oleft + (xmouse - gui.x0);
|
||||
// self.status = "otop=" + otop + " ntop="+ntop;
|
||||
// self.status = "otop=" + otop + " ntop="+ntop;
|
||||
if(nleft > 40 && nleft < wwin-40 )
|
||||
gui.splitting.style.left = nleft+"px";
|
||||
}
|
||||
@@ -496,22 +496,22 @@ function unused_evt_mmov_doc(event, gui)
|
||||
gui.windowBorder.style.width = (gui.new_w-4)+"px";
|
||||
gui.windowBorder.style.height = (gui.new_h-4)+"px";
|
||||
}
|
||||
t += "z-index:999; display:block; background-color:#FFFF00; position:absolute;"
|
||||
// self.status = t;
|
||||
t += "z-index:999; display:block; background-color:#FFFF00; position:absolute;"
|
||||
// self.status = t;
|
||||
|
||||
// gui.twin[gui.w_active].hide();
|
||||
// document.getElementById(gui.varname+"w"+gui.w_active).style.display = "none";
|
||||
// document.getElementById(gui.varname+"wb").style.cssText = t;
|
||||
// gui.windowBorder.style.cssText = t;
|
||||
// gui.windowBorder.style.cssText = t;
|
||||
}
|
||||
*/
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
function unused_evt_mup_doc(event, gui)
|
||||
{
|
||||
function unused_evt_mup_doc(event, gui)
|
||||
{
|
||||
var gui = eval(gui);
|
||||
var srcElement = (event.target) ? event.target : event.srcElement;
|
||||
var src0;
|
||||
@@ -578,10 +578,10 @@ function unused_evt_mup_doc(event, gui)
|
||||
dragObj.Src0 = dragObj.Src = dragObj.Target0 = dragObj.Target = null;
|
||||
if(dragObj.objCursor)
|
||||
dragObj.objCursor.style.visibility = "hidden";
|
||||
}
|
||||
*/
|
||||
function ww_evt_mup_doc(gui, evt)
|
||||
{
|
||||
}
|
||||
*/
|
||||
function ww_evt_mup_doc(gui, evt)
|
||||
{
|
||||
var gui = eval(gui);
|
||||
var srcElement = (evt.target) ? evt.target : evt.srcElement;
|
||||
var src0;
|
||||
@@ -648,7 +648,7 @@ function unused_evt_mup_doc(event, gui)
|
||||
if(dragObj.objCursor)
|
||||
dragObj.objCursor.style.visibility = "hidden";
|
||||
}
|
||||
/*
|
||||
/*
|
||||
if(gui.sliding)
|
||||
{
|
||||
gui.sliding = null;
|
||||
@@ -674,9 +674,9 @@ function unused_evt_mup_doc(event, gui)
|
||||
gui.dragging = gui.sizing = false;
|
||||
// eval(gui.twin[gui.w_active].onresized);
|
||||
}
|
||||
*/
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -733,10 +733,10 @@ function ww_evt_kon_doc(gui, evt)
|
||||
}
|
||||
|
||||
/*
|
||||
function disabled_evt_kon_doc(event, gui)
|
||||
{
|
||||
// var str=''; for (var k in event) {str+='event.'+k+'='+event[k]+'<br/>\n'}
|
||||
// document.getElementById("debug").innerHTML = "KON "+(iiii++)+"<br/>\n" + str ;
|
||||
function disabled_evt_kon_doc(event, gui)
|
||||
{
|
||||
// var str=''; for (var k in event) {str+='event.'+k+'='+event[k]+'<br/>\n'}
|
||||
// document.getElementById("debug").innerHTML = "KON "+(iiii++)+"<br/>\n" + str ;
|
||||
|
||||
var gui = eval(gui);
|
||||
|
||||
@@ -784,9 +784,9 @@ function disabled_evt_kon_doc(event, gui)
|
||||
}
|
||||
event.cancelBubble = true;
|
||||
event.returnValue = false;
|
||||
// document.getElementById("debug").innerHTML = "src0:("+src0.tagName+" id="+src0.id+" "+src0.draggable+")<br/>e:("+e.tagName+" id="+e.id+" "+e.draggable+") --- "+dragObj.dragging;
|
||||
}
|
||||
*/
|
||||
// document.getElementById("debug").innerHTML = "src0:("+src0.tagName+" id="+src0.id+" "+src0.draggable+")<br/>e:("+e.tagName+" id="+e.id+" "+e.draggable+") --- "+dragObj.dragging;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
@@ -1086,11 +1086,11 @@ function ww_evt_mdwn_closer(idx)
|
||||
|
||||
|
||||
/*
|
||||
function ww_evt_mdwn_doc(gui)
|
||||
{
|
||||
// gui = eval(gui);
|
||||
// if(window.event.srcElement.id == gui.desktop)
|
||||
// {
|
||||
function ww_evt_mdwn_doc(gui)
|
||||
{
|
||||
// gui = eval(gui);
|
||||
// if(window.event.srcElement.id == gui.desktop)
|
||||
// {
|
||||
// on a clique sur le bureau
|
||||
if(window.event.srcElement.onMenu && (window.event.altKey || window.event.button==2))
|
||||
{
|
||||
@@ -1098,12 +1098,12 @@ function ww_evt_mdwn_doc(gui)
|
||||
window.event.returnValue = false;
|
||||
return(false);
|
||||
}
|
||||
// }
|
||||
}
|
||||
*/
|
||||
// }
|
||||
}
|
||||
*/
|
||||
/*
|
||||
function ww_evt_mmov_doc(gui)
|
||||
{
|
||||
function ww_evt_mmov_doc(gui)
|
||||
{
|
||||
gui = eval(gui);
|
||||
e = window.event;
|
||||
// msg("" + (e.clientX) + " - " + (e.clientY) );
|
||||
@@ -1140,8 +1140,8 @@ function ww_evt_mmov_doc(gui)
|
||||
document.getElementById(gui.varname+"wb").style.cssText = t;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
||||
*/
|
||||
function ww_setProperties(properties)
|
||||
{
|
||||
style = "";
|
||||
@@ -1203,8 +1203,8 @@ function ww_setProperties(properties)
|
||||
}
|
||||
}
|
||||
/*
|
||||
function ww_evt_mup_doc(gui)
|
||||
{
|
||||
function ww_evt_mup_doc(gui)
|
||||
{
|
||||
gui = eval(gui);
|
||||
if((gui.w_active != -1) && (gui.dragging || gui.sizing))
|
||||
{
|
||||
@@ -1217,8 +1217,8 @@ function ww_evt_mup_doc(gui)
|
||||
gui.dragging = gui.sizing = false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
}
|
||||
*/
|
||||
function ww_repaint()
|
||||
{
|
||||
w = parseInt(this.gui.twin[this.idx].properties.width);
|
||||
@@ -1232,7 +1232,7 @@ function ww_sizeto(w, h)
|
||||
if(h == -1)
|
||||
h = parseInt(this.gui.twin[this.idx].properties.height);
|
||||
this.gui.twin[this.idx].setProperties( { width:(w)+"px", height:(h)+"px" } );
|
||||
/*
|
||||
/*
|
||||
if(w != -1 && h != -1)
|
||||
this.gui.twin[this.idx].setProperties( { width:(w)+"px", height:(h)+"px" } );
|
||||
else
|
||||
@@ -1241,7 +1241,7 @@ function ww_sizeto(w, h)
|
||||
else
|
||||
if(h != -1)
|
||||
this.gui.twin[this.idx].setProperties( { height:(h)+"px" } );
|
||||
*/
|
||||
*/
|
||||
if(this.gui.twin[this.idx].onresized)
|
||||
(this.gui.twin[this.idx].onresized)(parseInt(this.gui.twin[this.idx].properties.top)
|
||||
, parseInt(this.gui.twin[this.idx].properties.left), w, h);
|
||||
@@ -1387,8 +1387,8 @@ function ww_autoMove()
|
||||
this.sizeto(wwin, hwin);
|
||||
// this.setProperties( {top:twin+"px", left:lwin+"px" } );
|
||||
}
|
||||
/*
|
||||
*/
|
||||
/*
|
||||
*/
|
||||
}
|
||||
|
||||
function ww_Window(gui, anchor, varname, idx, properties)
|
||||
@@ -1826,7 +1826,7 @@ function GUI(varname, idbody, skin)
|
||||
this.unselect = ww_unselect;
|
||||
|
||||
this.setDragObj = ww_setDragObj;
|
||||
/*
|
||||
/*
|
||||
s = "<div id=\""+this.varname+"wb\" class=\"ww_winborder\"></div>";
|
||||
s += "<img id=\"dragDropCursor\" style=\"position:absolute; top:50px; left:50px; z-index:99; visibility:hidden\" src=\"/skins/icons/nodrop01.gif\">";
|
||||
document.write(s);
|
||||
@@ -1852,22 +1852,22 @@ function GUI(varname, idbody, skin)
|
||||
// on interdit les menus contextuels de explorer... ?
|
||||
// document.oncontextmenu = function () { window.event.returnValue=false; return false; };
|
||||
// ... en fait on simule un 'mousedown' pour safari qui ne le fait pas avec les souris 2 bouton
|
||||
// var old = (document.oncontextmenu) ? document.oncontextmenu : function () {};
|
||||
// var old = (document.oncontextmenu) ? document.oncontextmenu : function () {};
|
||||
|
||||
// document.oncontextmenu = function(e){if(e){old(e, varname); window.event.returnValue=false; return(evt_mdwn_doc(e, varname));}else{old(window.event, varname); window.event.returnValue=false; return(evt_mdwn_doc(window.event, varname));}};
|
||||
// document.oncontextmenu = function(e){if(e){old(e, varname); window.event.returnValue=false; return(evt_mdwn_doc(e, varname));}else{old(window.event, varname); window.event.returnValue=false; return(evt_mdwn_doc(window.event, varname));}};
|
||||
|
||||
// document.oncontextmenu = function(e){if(e){old(e, varname); alert('rz'); return(evt_mdwn_doc(e, varname));}else{old(window.event, varname); alert('xc'); return(evt_mdwn_doc(window.event, varname));}};
|
||||
// document.oncontextmenu = function(e){if(e){old(e, varname); return(evt_kon_doc(e, varname));}else{old(window.event, varname); return(evt_kon_doc(window.event, varname));} };
|
||||
// document.oncontextmenu = function(e){if(e){old(e, varname); alert('rz'); return(evt_mdwn_doc(e, varname));}else{old(window.event, varname); alert('xc'); return(evt_mdwn_doc(window.event, varname));}};
|
||||
// document.oncontextmenu = function(e){if(e){old(e, varname); return(evt_kon_doc(e, varname));}else{old(window.event, varname); return(evt_kon_doc(window.event, varname));} };
|
||||
|
||||
// document.onmousedown = w2md;
|
||||
// document.onmouseup = w2mu;
|
||||
// document.onmousedown = w2md;
|
||||
// document.onmouseup = w2mu;
|
||||
|
||||
document.oncontextmenu = function(e){if(!e) e=window.event; e.returnValue=false;
|
||||
if(e.stopPropagation) e.stopPropagation();
|
||||
if(e.preventDefault) e.preventDefault();
|
||||
return true;
|
||||
};
|
||||
*/
|
||||
*/
|
||||
}
|
||||
|
||||
function evt_select_doc(evt)
|
||||
|
Reference in New Issue
Block a user