@ -276,59 +276,75 @@ $(document).ready(function() {
mGlobal . Monitor . fControlPanelRefresh _TechnicalRender = function ( )
{
lResponseJSON = mGlobal . Monitor . mDatasetLast
if ( lResponseJSON != null ) {
///Escape onclick
/// RenderRobotList
lResponseJSON [ "RenderRobotList" ] . forEach (
function ( lItem ) {
if ( 'FooterButtonX2List' in lItem ) {
/// FooterButtonX2List
lItem [ "FooterButtonX2List" ] . forEach (
function ( lItem2 ) {
if ( 'OnClick' in lItem ) {
lOnClickEscaped = lItem [ "OnClick" ] ;
lOnClickEscaped = lOnClickEscaped . replace ( /&/g , "&" ) . replace ( /</g , "<" ) . replace ( />/g , ">" ) . replace ( /"/g , """ ) . replace ( /'/g , "'" ) ;
lItem [ "OnClick" ] = lOnClickEscaped ;
/// New version of control panels
for ( var lKeyStr in lResponseJSON ) {
if ( lKeyStr != "RenderRobotList" ) { /// Check if not "RenderRobotList"
lCPDict = lResponseJSON [ lKeyStr ]
/// Render HTML
if ( "HTMLStr" in lCPDict ) {
}
}
}
/// v1.2.0 Backward compatibility - support old control panels
if ( "RenderRobotList" in lResponseJSON ) {
///Escape onclick
/// RenderRobotList
lResponseJSON [ "RenderRobotList" ] . forEach (
function ( lItem ) {
if ( 'FooterButtonX2List' in lItem ) {
/// FooterButtonX2List
lItem [ "FooterButtonX2List" ] . forEach (
function ( lItem2 ) {
if ( 'OnClick' in lItem ) {
lOnClickEscaped = lItem [ "OnClick" ] ;
lOnClickEscaped = lOnClickEscaped . replace ( /&/g , "&" ) . replace ( /</g , "<" ) . replace ( />/g , ">" ) . replace ( /"/g , """ ) . replace ( /'/g , "'" ) ;
lItem [ "OnClick" ] = lOnClickEscaped ;
}
}
}
) ;
/// FooterButtonX1List
lItem [ "FooterButtonX1List" ] . forEach (
function ( lItem2 ) {
if ( 'OnClick' in lItem ) {
lOnClickEscaped = lItem [ "OnClick" ] ;
lOnClickEscaped = lOnClickEscaped . replace ( /&/g , "&" ) . replace ( /</g , "<" ) . replace ( />/g , ">" ) . replace ( /"/g , """ ) . replace ( /'/g , "'" ) ;
lItem [ "OnClick" ] = lOnClickEscaped ;
);
/// FooterButtonX1List
lItem [ "FooterButtonX1List" ] . forEach (
function ( lItem2 ) {
if ( 'OnClick' in lItem ) {
lOnClickEscaped = lItem [ "OnClick" ] ;
lOnClickEscaped = lOnClickEscaped . replace ( /&/g , "&" ) . replace ( /</g , "<" ) . replace ( />/g , ">" ) . replace ( /"/g , """ ) . replace ( /'/g , "'" ) ;
lItem [ "OnClick" ] = lOnClickEscaped ;
}
}
}
) ;
);
}
}
}
) ;
//////////////////////////////////////////////////////////
///Сформировать HTML код новой таблицы - контрольная панель
lHTMLCode = mGlobal . GeneralGenerateHTMLCodeHandlebars ( ".openrpa-hidden-control-panel" , lResponseJSON )
//Присвоить ответ в mGlobal.Monitor.mResponseList
mGlobal . Monitor . mResponseList = lResponseJSON
///Set result in mGlobal.DataStorage
lResponseJSON [ "RenderRobotList" ] . forEach (
function ( lItem ) {
if ( 'DataStorageKey' in lItem ) {
mGlobal [ "DataStorage" ] [ lItem [ 'DataStorageKey' ] ] = lItem
);
//////////////////////////////////////////////////////////
///Сформировать HTML код новой таблицы - контрольная панель
lHTMLCode += mGlobal . GeneralGenerateHTMLCodeHandlebars ( ".openrpa-hidden-control-panel" , lResponseJSON )
//Присвоить ответ в mGlobal.Monitor.mResponseList
mGlobal . Monitor . mResponseList = lResponseJSON
///Set result in mGlobal.DataStorage
lResponseJSON [ "RenderRobotList" ] . forEach (
function ( lItem ) {
if ( 'DataStorageKey' in lItem ) {
mGlobal [ "DataStorage" ] [ lItem [ 'DataStorageKey' ] ] = lItem
}
}
}
)
///Прогрузить новую таблицу
$ ( ".openrpa-control-panel" ) . html ( lHTMLCode )
////////////////////////////////////////////////////
///Сформировать HTML код новой таблицы - список RDP
lHTMLCode = mGlobal . GeneralGenerateHTMLCodeHandlebars ( ".openrpa-hidden-robotrdpactive-control-panel" , lResponseJSON )
//Присвоить ответ в mGlobal.RobotRDPActive.mResponseList
mGlobal . RobotRDPActive . mResponseList = lResponseJSON
///Прогрузить новую таблицу
$ ( ".openrpa-robotrdpactive-control-panel" ) . html ( lHTMLCode )
///Очистить дерево
//mGlobal.ElementTree.fClear();
)
///Прогрузить новую таблицу
$ ( ".openrpa-control-panel" ) . html ( lHTMLCode )
////////////////////////////////////////////////////
///Сформировать HTML код новой таблицы - список RDP
lHTMLCode = mGlobal . GeneralGenerateHTMLCodeHandlebars ( ".openrpa-hidden-robotrdpactive-control-panel" , lResponseJSON )
//Присвоить ответ в mGlobal.RobotRDPActive.mResponseList
mGlobal . RobotRDPActive . mResponseList = lResponseJSON
///Прогрузить новую таблицу
$ ( ".openrpa-robotrdpactive-control-panel" ) . html ( lHTMLCode )
///Очистить дерево
//mGlobal.ElementTree.fClear();
}
}
}
mGlobal . Monitor . mDatasetLast = null