Commit 4afc1b63 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Перенес CIdCounter в editorscommon.js

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62465 954022d7-b5bf-4e40-9824-e11837661b57
parent a72e8abd
......@@ -948,4 +948,43 @@ function asc_ajax (obj) {
};
init(obj);
}
function CIdCounter () {
this.m_sUserId = null;
this.m_bLoad = true;
this.m_nIdCounterLoad = 0; // Счетчик Id для загрузки
this.m_nIdCounterEdit = 0; // Счетчик Id для работы
this.Get_NewId = function()
{
if ( true === this.m_bLoad || null === this.m_sUserId )
{
this.m_nIdCounterLoad++;
return ("" + this.m_nIdCounterLoad);
}
else
{
this.m_nIdCounterEdit++;
return ("" + this.m_sUserId + "_" + this.m_nIdCounterEdit);
}
};
this.Set_UserId = function(sUserId)
{
this.m_sUserId = sUserId;
};
this.Set_Load = function(bValue)
{
this.m_bLoad = bValue;
};
this.Clear = function()
{
this.m_sUserId = null;
this.m_bLoad = true;
this.m_nIdCounterLoad = 0; // Счетчик Id для загрузки
this.m_nIdCounterEdit = 0; // Счетчик Id для работы
};
}
\ No newline at end of file
......@@ -63,40 +63,6 @@ function CLock()
return false;
};
}
function CIdCounter()
{
this.m_sUserId = null;
this.m_bLoad = true;
this.m_nIdCounterLoad = 0; // Счетчик Id для загрузки
this.m_nIdCounterEdit = 0; // Счетчик Id для работы
this.Get_NewId = function()
{
if ( true === this.m_bLoad || null === this.m_sUserId )
{
this.m_nIdCounterLoad++;
return ("" + this.m_nIdCounterLoad);
}
else
{
this.m_nIdCounterEdit++;
var cur_id = ("" + this.m_sUserId + "_" + this.m_nIdCounterEdit);
while(isRealObject(g_oTableId.Get_ById(cur_id)))
{
this.m_nIdCounterEdit++;
cur_id = ("" + this.m_sUserId + "_" + this.m_nIdCounterEdit);
}
return cur_id;
}
};
this.Set_UserId = function(sUserId)
{
this.m_sUserId = sUserId;
};
this.Set_Load = function(bValue)
{
this.m_bLoad = bValue;
};
}
function CTableId()
{
this.m_aPairs = {};
......
......@@ -6,38 +6,6 @@
* Time: 12:01
*/
function CIdCounter()
{
this.m_sUserId = null;
this.m_bLoad = true;
this.m_nIdCounterLoad = 0; // Счетчик Id для загрузки
this.m_nIdCounterEdit = 0; // Счетчик Id для работы
this.Get_NewId = function()
{
if ( true === this.m_bLoad || null === this.m_sUserId )
{
this.m_nIdCounterLoad++;
return ("" + this.m_nIdCounterLoad);
}
else
{
this.m_nIdCounterEdit++;
return ("" + this.m_sUserId + "_" + this.m_nIdCounterEdit);
}
};
this.Set_UserId = function(sUserId)
{
this.m_sUserId = sUserId;
};
this.Set_Load = function(bValue)
{
this.m_bLoad = bValue;
};
}
var g_oIdCounter = new CIdCounter();
function CTableId()
......
......@@ -6,46 +6,6 @@
* Time: 12:01
*/
function CIdCounter()
{
this.m_sUserId = null;
this.m_bLoad = true;
this.m_nIdCounterLoad = 0; // Счетчик Id для загрузки
this.m_nIdCounterEdit = 0; // Счетчик Id для работы
this.Get_NewId = function()
{
if ( true === this.m_bLoad || null === this.m_sUserId )
{
this.m_nIdCounterLoad++;
return ("" + this.m_nIdCounterLoad);
}
else
{
this.m_nIdCounterEdit++;
return ("" + this.m_sUserId + "_" + this.m_nIdCounterEdit);
}
};
this.Set_UserId = function(sUserId)
{
this.m_sUserId = sUserId;
};
this.Set_Load = function(bValue)
{
this.m_bLoad = bValue;
};
this.Clear = function()
{
this.m_sUserId = null;
this.m_bLoad = true;
this.m_nIdCounterLoad = 0; // Счетчик Id для загрузки
this.m_nIdCounterEdit = 0; // Счетчик Id для работы
}
}
var g_oIdCounter = new CIdCounter();
function CTableId()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment