1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-10 12:58:21 +03:00

шаблон developer к плагинам page и profiler

This commit is contained in:
Mzhelskiy Maxim 2010-06-05 11:18:07 +00:00
parent 99483703d9
commit a7a09cdcfb
18 changed files with 559 additions and 2 deletions

View file

@ -37,6 +37,7 @@ abstract class ActionPlugin extends Action {
public function __construct(Engine $oEngine, $sAction) {
parent::__construct($oEngine, $sAction);
$this->Viewer_Assign('sTemplatePathPlugin',rtrim($this->getTemplatePathPlugin(),'/'));
$this->Viewer_Assign('sTemplateWebPathPlugin',Plugin::GetTemplateWebPath(get_class($this)));
}
/**

View file

@ -7,7 +7,7 @@
<lang name="default">LiveStreet Developers Team</lang>
</author>
<homepage>http://livestreet.ru</homepage>
<version>1.0.1</version>
<version>1.0.2</version>
<requires>
<livestreet>0.4.1</livestreet>
<plugins>

View file

@ -0,0 +1,91 @@
{include file='window_load_img.tpl' sToLoad='page_text'}
<link rel="stylesheet" type="text/css" href="{$sTemplateWebPathPlugin}css/style.css" media="all" />
{if $oConfig->GetValue('view.tinymce')}
<script type="text/javascript" src="{cfg name='path.root.engine_lib'}/external/tinymce_3.2.7/tiny_mce.js"></script>
{literal}
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_buttons1 : "lshselect,bold,italic,underline,strikethrough,|,bullist,numlist,|,undo,redo,|,lslink,unlink,lsvideo,lsimage,code",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : 0,
theme_advanced_resizing_use_cookie : 0,
theme_advanced_path : false,
object_resizing : true,
force_br_newlines : true,
forced_root_block : '', // Needed for 3.x
force_p_newlines : false,
plugins : "lseditor,safari,inlinepopups,media",
convert_urls : false,
extended_valid_elements : "embed[src|type|allowscriptaccess|allowfullscreen|width|height]",
language : TINYMCE_LANG
});
</script>
{/literal}
{/if}
<form action="" method="POST">
<input type="hidden" name="security_ls_key" value="{$LIVESTREET_SECURITY_KEY}" />
<p><label for="page_pid">{$aLang.page_create_parent_page}</label><br />
<select name="page_pid" id="page_pid" class="input-300">
<option value="0"></option>
{foreach from=$aPages item=oPage}
<option style="margin-left: {$oPage->getLevel()*20}px;" value="{$oPage->getId()}" {if $_aRequest.page_pid==$oPage->getId()}selected{/if}>{$oPage->getTitle()}(/{$oPage->getUrlFull()}/)</option>
{/foreach}
</select></p>
<p><label for="page_title">{$aLang.page_create_title}:</label><br />
<input type="text" id="page_title" name="page_title" value="{$_aRequest.page_title}" class="input-wide" /> </p>
<p><label for="page_url">{$aLang.page_create_url}:</label><br />
<input type="text" id="page_url" name="page_url" value="{$_aRequest.page_url}" class="input-wide" /> </p>
<label for="topic_text">{$aLang.page_create_text}:</label>
{if !$oConfig->GetValue('view.tinymce')}
<div class="panel-form" style="background: #eaecea; ">
<a href="#" onclick="lsPanel.putTagAround('page_text','b'); return false;"><img src="{cfg name='path.static.skin'}/images/panel/bold_ru.gif" width="20" height="20" title="{$aLang.panel_b}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','i'); return false;"><img src="{cfg name='path.static.skin'}/images/panel/italic_ru.gif" width="20" height="20" title="{$aLang.panel_i}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','u'); return false;"><img src="{cfg name='path.static.skin'}/images/panel/underline_ru.gif" width="20" height="20" title="{$aLang.panel_u}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','s'); return false;"><img src="{cfg name='path.static.skin'}/images/panel/strikethrough.gif" width="20" height="20" title="{$aLang.panel_s}"></a>
&nbsp;
<a href="#" onclick="lsPanel.putTagUrl('page_text','Введите ссылку'); return false;"><img src="{cfg name='path.static.skin'}/images/panel/link.gif" width="20" height="20" title="{$aLang.panel_url}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','code'); return false;"><img src="{cfg name='path.static.skin'}/images/panel/code.gif" width="30" height="20" title="{$aLang.panel_code}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','video'); return false;"><img src="{cfg name='path.static.skin'}/images/panel/video.gif" width="20" height="20" title="{$aLang.panel_video}"></a>
<a href="#" onclick="showImgUploadForm(); return false;"><img src="{cfg name='path.static.skin'}/images/panel/img.gif" width="20" height="20" title="{$aLang.panel_image}"></a>
<a href="#" onclick="lsPanel.putText('page_text','<cut>'); return false;"><img src="{cfg name='path.static.skin'}/images/panel/cut.gif" width="20" height="20" title="{$aLang.panel_cut}"></a>
</div>
{/if}
<textarea name="page_text" id="page_text" rows="20" class="input-wide">{$_aRequest.page_text}</textarea><br /><br />
<p><label for="page_seo_keywords">{$aLang.page_create_seo_keywords}:</label><br />
<input type="text" id="page_seo_keywords" name="page_seo_keywords" value="{$_aRequest.page_seo_keywords}" class="input-wide" />
<span class="note">{$aLang.page_create_seo_keywords_notice}</span></p>
<p><label for="page_seo_description">{$aLang.page_create_seo_description}:</label><br />
<input type="text" id="page_seo_description" name="page_seo_description" value="{$_aRequest.page_seo_description}" class="input-wide" />
<span class="note">{$aLang.page_create_seo_description_notice}</span></p>
<p><label><input type="checkbox" id="page_active" name="page_active" value="1" class="checkbox" {if $_aRequest.page_active==1}checked{/if} />{$aLang.page_create_active}</label></p>
<p>
<input type="submit" name="submit_page_save" value="{$aLang.page_create_submit_save}" />
<input type="submit" name="submit_page_cancel" value="{$aLang.page_create_submit_cancel}" onclick="window.location='{router page='page'}admin/'; return false;" />
</p>
<input type="hidden" name="page_id" value="{$_aRequest.page_id}">
</form>

View file

@ -0,0 +1,59 @@
{include file='header.tpl'}
<link rel="stylesheet" type="text/css" href="{$sTemplateWebPathPlugin}css/style.css" media="all" />
<div class="topic">
<h2>{$aLang.page_admin}</h2>
{if $aParams.0=='new'}
<h3>{$aLang.page_create}</h3>
{include file="$sTemplatePathPlugin/actions/ActionPage/add.tpl"}
{elseif $aParams.0=='edit'}
<h3>{$aLang.page_edit} «{$oPageEdit->getTitle()}»</h3>
{include file="$sTemplatePathPlugin/actions/ActionPage/add.tpl"}
{else}
<a href="{router page='page'}admin/new/" class="page-new">{$aLang.page_new}</a><br /><br />
{/if}
<table cellspacing="0" class="table">
<thead>
<tr>
<td>{$aLang.page_admin_title}</td>
<td align="center" width="250px">{$aLang.page_admin_url}</td>
<td align="center" width="50px">{$aLang.page_admin_active}</td>
<td align="center" width="80px">{$aLang.page_admin_action}</td>
</tr>
</thead>
<tbody>
{foreach from=$aPages item=oPage name=el2}
<tr>
<td>
<img src="{$sTemplateWebPathPlugin}images/{if $oPage->getLevel()==0}folder{else}document{/if}.gif" alt="" title="" border="0" style="margin-left: {$oPage->getLevel()*20}px;"/>
<a href="{router page='page'}{$oPage->getUrlFull()}/">{$oPage->getTitle()}</a>
</td>
<td>
/{$oPage->getUrlFull()}/
</td>
<td align="center">
{if $oPage->getActive()}
{$aLang.page_admin_active_yes}
{else}
{$aLang.page_admin_active_no}
{/if}
</td>
<td align="center">
<a href="{router page='page'}admin/edit/{$oPage->getId()}/"><img src="{cfg name='path.static.skin'}/images/edit.png" alt="{$aLang.page_admin_action_edit}" title="{$aLang.page_admin_action_edit}" /></a>
<a href="{router page='page'}admin/delete/{$oPage->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" onclick="return confirm('«{$oPage->getTitle()}»: {$aLang.page_admin_action_delete_confirm}');"><img src="{cfg name='path.static.skin'}/images/delete.png" alt="{$aLang.page_admin_action_delete}" title="{$aLang.page_admin_action_delete}" /></a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{include file='footer.tpl'}

View file

@ -0,0 +1,14 @@
{assign var="noSidebar" value=true}
{include file='header.tpl'}
<div class="topic">
<div class="content">
{if $oConfig->GetValue('view.tinymce')}
{$oPage->getText()}
{else}
{$oPage->getText()|nl2br}
{/if}
</div>
</div>
{include file='footer.tpl'}

View file

@ -0,0 +1,4 @@
.table a { color: #333; }
.table a:hover { color: #666; }
.page-new { padding-left: 13px; background: url(../images/document.gif) no-repeat 0 3px; color: #555; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

View file

@ -7,7 +7,7 @@
<lang name="default">LiveStreet Developers Team</lang>
</author>
<homepage>http://livestreet.ru/</homepage>
<version>1.0.0</version>
<version>1.0.1</version>
<requires>
<livestreet>0.4.1</livestreet>
<plugins>

View file

@ -0,0 +1,14 @@
<div class="profiler-table">
<table class="profiler entries">
{foreach from=$oReport->getAllEntries() item=oEntry}
<tr class="entry_{$oReport->getId()}_all entry_{$oReport->getId()}_{$oEntry->getName()}{if $oEntry->getChildCount()!=0} has-child{/if}">
<td align="center" width="20px">{if $oEntry->getChildCount()!=0}<img src="{cfg name='path.root.web'}/plugins/profiler/templates/skin/developer/images/open.gif" alt="+" title="{$aLang.comment_collapse}/{$aLang.comment_expand}" class="folding lsProfiler_tree" id="tree_{$oReport->getId()}_{$oEntry->getId()}" style="margin-right:3px;"/>{/if}</td>
<td width="5%">{$oEntry->getId()}</td>
<td width="12%">{$oEntry->getName()}</td>
<td width="12%" class="time">{$oEntry->getTimeFull()}</td>
<td width="18%">{$oReport->getEntryFullShare($oEntry->getId())}% ({$oReport->getEntryShare($oEntry->getId())}%)</td>
<td>{$oEntry->getComment()}</td>
</tr>
{/foreach}
</table>
</div>

View file

@ -0,0 +1,22 @@
{if $oReport}
<a href="#" class="profiler tree {if $sAction=='tree'}active{/if}" onclick="lsProfiler.toggleEntriesByClass('{$oReport->getId()}','tree',this); return false;">{$aLang.profiler_entries_show_tree}</a>
<a href="#" class="profiler all {if $sAction=='all'}active{/if}" onclick="lsProfiler.toggleEntriesByClass('{$oReport->getId()}','all',this); return false;">{$aLang.profiler_entries_show_all} ({$oReport->getStat('count')})</a>
<a href="#" class="profiler query {if $sAction=='query'}active{/if}" onclick="lsProfiler.toggleEntriesByClass('{$oReport->getId()}','query',this); return false;">{$aLang.profiler_entries_show_query} ({$oReport->getStat('query')})</a>
<div class="profiler-table">
<table class="profiler entries">
{foreach from=$oReport->getAllEntries() item=oEntry}
<tr class="entry_{$oReport->getId()}_all entry_{$oReport->getId()}_{$oEntry->getName()}{if $oEntry->getChildCount()!=0} child{/if}">
<td></td>
<td width="5%">{$oEntry->getId()}</td>
<td width="12%">{$oEntry->getName()}</td>
<td width="12%" class="time">{$oEntry->getTimeFull()}</td>
<td width="18%">{$oReport->getEntryFullShare($oEntry->getId())}% ({$oReport->getEntryShare($oEntry->getId())}%)</td>
<td>{$oEntry->getComment()}</td>
</tr>
{/foreach}
</table>
</div>
{else}
{$aLang.error}
{/if}

View file

@ -0,0 +1,9 @@
{if $oReport}
<a href="#" class="profiler tree {if $sAction=='tree'}active{/if}" onclick="lsProfiler.toggleEntriesByClass('{$oReport->getId()}','tree',this); return false;">{$aLang.profiler_entries_show_tree}</a>
<a href="#" class="profiler all {if $sAction=='all'}active{/if}" onclick="lsProfiler.toggleEntriesByClass('{$oReport->getId()}','all',this); return false;">{$aLang.profiler_entries_show_all} ({$oReport->getStat('count')})</a>
<a href="#" class="profiler query {if $sAction=='query'}active{/if}" onclick="lsProfiler.toggleEntriesByClass('{$oReport->getId()}','query',this); return false;">{$aLang.profiler_entries_show_query} ({$oReport->getStat('query')})</a>
{include file='profiler/templates/skin/developer/actions/ActionProfiler/ajax/level.tpl'}
{else}
{$aLang.error}
{/if}

View file

@ -0,0 +1,46 @@
{include file='header.tpl' noShowSystemMessage=false}
<script language="JavaScript" type="text/javascript">
var DIR_PLUGIN_SKIN='{cfg name='path.root.web'}/plugins/profiler/templates/skin/developer';
</script>
<script type="text/javascript" src="{$sTemplateWebPathPlugin}js/profiler.js"></script>
<link rel="stylesheet" type="text/css" href="{$sTemplateWebPathPlugin}css/style.css" media="all" />
<h2>{$aLang.profiler_reports_title}</h2>
<form action="{router page='profiler'}" method="post" id="form_report_list">
<input type="hidden" name="security_ls_key" value="{$LIVESTREET_SECURITY_KEY}" />
<table class="table">
<thead>
<tr>
<td width="20px"><input type="checkbox" name="" onclick="checkAllReport(this);"></td>
<td></td>
<td>{$aLang.profiler_table_date}</td>
<td align="center">{$aLang.profiler_table_time_full}</td>
<td align="center">{$aLang.profiler_table_count_id}</td>
</tr>
</thead>
<tbody>
{foreach from=$aReports item=oReport}
<tr>
<td><input type="checkbox" name="report_del[{$oReport.request_id}]" class="form_reports_checkbox"></td>
<td align="center"><img src="{$sTemplateWebPathPlugin}images/open.gif" alt="+" title="{$aLang.comment_collapse}/{$aLang.comment_expand}" class="folding" id="img_{$oReport.request_id}" /></td>
<td>{date_format date=$oReport.request_date}</td>
<td align="center" class="time">{$oReport.time_full}</td>
<td align="center">{$oReport.count_time_id}</td>
</tr>
{/foreach}
</tbody>
</table>
<input type="submit" name="submit_report_delete" value="{$aLang.profiler_report_delete}" onclick="return ($$('.form_reports_checkbox').length==0)?false:confirm('{$aLang.profiler_report_delete_confirm}');">
</form>
{include file='pagination.tpl' aPaging="$aPaging"}
{include file='footer.tpl'}

View file

@ -0,0 +1,89 @@
<div class="block">
<div class="profiler-highlight">
{$aLang.profiler_filter_highlight} ({$aLang.profiler_filter_seconds}):<br />
<input type="text" name="profiler_filter_entries" id="profiler_filter_entries" onchange="lsProfiler.filterNode(this);" class="input-100" />
</div>
</div>
<div class="block">
<h3>{$aLang.profiler_dbstat_title}</h3>
<form action="{router page='profiler'}" method="POST" name="profiler_import_form">
<p>{$aLang.profiler_dbstat_count}: <strong>{$aDatabaseStat.count}</strong><br />
{$aLang.profiler_dbstat_max_date}: <strong>{$aDatabaseStat.max_date}</strong></p>
<p><label for="profiler_date_import">{$aLang.profiler_import_label}:</label><br />
<input type="text" id="profiler_date_import" name="profiler_date_import" value="{if $_aRequest.date_import}{$_aRequest.date_import}{else}{if $aDatabaseStat.max_date}{$aDatabaseStat.max_date}{else}{date_format date=$smarty.now format='Y-m-d \0\0\:\0\0\:\0\0'}{/if}{/if}" class="input-200" /><br />
<span class="note">{$aLang.profiler_import_notice}</span></p>
<input type="submit" name="submit_profiler_import" value="{$aLang.profiler_import_submit}" />
</form>
</div>
<div class="block">
<h3>{$aLang.profiler_filter_title}</h3>
{literal}
<script language="JavaScript" type="text/javascript">
document.addEvent('domready', function() {
new vlaDatePicker(
$('profiler_filter_start'),
{
separator: '.',
leadingZero: true,
twoDigitYear: false,
alignX: 'center',
alignY: 'top',
offset: { y: 3 },
filePath: DIR_WEB_ROOT+'/engine/lib/external/MooTools_1.2/plugs/vlaCal-v2.1/inc/',
prefillDate: false,
startMonday: true
}
);
new vlaDatePicker(
$('profiler_filter_end'),
{
separator: '.',
leadingZero: true,
twoDigitYear: false,
alignX: 'center',
alignY: 'top',
offset: { y: 3 },
filePath: DIR_WEB_ROOT+'/engine/lib/external/MooTools_1.2/plugs/vlaCal-v2.1/inc/',
prefillDate: false,
startMonday: true
}
);
});
function eraseFilterForm() {
$$("#profiler_filter_per_page, #profiler_filter_time, #profiler_filter_start, #profiler_filter_end").each(
function(item,index){
return item.set('value','');
}
);
return false;
}
</script>
{/literal}
<form action="{router page='profiler'}" method="GET" name="profiler_filter_form">
<p><label for="profiler_filter_start">{$aLang.profiler_filter_label_date}:</label><br />
<input type="text" id="profiler_filter_start" name="start" value="{$_aRequest.start}" style="width: 43%" readonly="readonly" /> &mdash;
<input type="text" id="profiler_filter_end" name="end" value="{$_aRequest.end}" style="width: 43%" readonly="readonly" /><br />
<span class="note">{$aLang.profiler_filter_notice_date}</span></p>
<p><label for="profiler_filter_time">{$aLang.profiler_filter_label_time}:</label><br />
<input type="text" id="profiler_filter_time" name="time" value="{$_aRequest.time}" class="input-100" /><br />
<span class="note">{$aLang.profiler_filter_notice_time}</span></p>
<p><label for="profiler_filter_per_page">{$aLang.profiler_filter_label_per_page}:</label><br />
<input type="text" id="profiler_filter_per_page" name="per_page" value="{if $_aRequest.per_page}{$_aRequest.per_page}{else}{cfg name='module.profiler.per_page'}{/if}" class="input-200" /></p>
<input type="submit" name="submit_profiler_filter" value="{$aLang.profiler_filter_submit}"/>
</form>
<div class="bottom"><a href="#" onclick="return eraseFilterForm();">{$aLang.profiler_filter_erase_form}</a> | <a href="{router page='profiler'}">{$aLang.profiler_filter_erase}</a></div>
</div>

View file

@ -0,0 +1 @@
a.profiler { margin: 2px; padding: 4px 5px; text-decoration: none; } a.profiler.active { background: #333; color: #fff; } .profiler.entries { margin-top: 5px; } .profiler-table .has-child { background: #f4f4f4; } .profiler-table .filter { background: #dafad8; } .profiler-highlight { color: #4bb23b; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

View file

@ -0,0 +1,207 @@
var lsProfilerClass = new Class({
Implements: Options,
options: {
img : {
path: DIR_PLUGIN_SKIN+'/images/',
openName: 'open.gif',
closeName: 'close.gif'
},
classes: {
visible: 'lsProfiler_visible',
hidden: 'lsProfiler_hidden',
openImg: 'lsProfiler_open',
closeImg: 'lsProfiler_close',
treeNode: 'lsProfiler_tree',
filterNode: 'lsProfiler_filter'
},
prefix: {
img: 'img_',
td: 'report_',
entry: 'entry_',
tree: 'tree_',
treeNode: 'tree_node_'
},
path: {
loadReport: aRouter['profiler']+'ajaxloadreport/',
loadEntries: aRouter['profiler']+'ajaxloadentriesbyfilter/'
}
},
initialize: function(options){
this.setOptions(options);
this.make();
},
make: function(expandClass){
var thisObj = this;
var aImgFolding=(!expandClass)?$$('img.folding'):$$('img.folding.'+expandClass);
aImgFolding.each(function(img, i){thisObj.makeImg(img);});
},
makeImg: function(img) {
var thisObj = this;
img.setStyles({
'cursor' : 'pointer',
'display' : 'inline'
});
img.removeClass(this.options.classes.closeImg);
img.addClass(this.options.classes.openImg);
img.removeEvents('click');
img.addEvent('click',function(){
thisObj.toggleNode(img);
});
},
toggleNode: function(img) {
if (img.hasClass(this.options.classes.closeImg)) {
this.collapseNode(img);
} else {
this.expandNode(img);
}
},
expandNode: function(img) {
var thisObj = this;
img.setProperties({'src': this.options.img.path + this.options.img.closeName});
img.removeClass(this.options.classes.openImg);
img.addClass(this.options.classes.closeImg);
if(img.hasClass(thisObj.options.classes.treeNode)) {
// Это элемент дерева - обрабатываем его соответствующим образом
ids = img.get('id').replace(this.options.prefix.tree,'').split('_');
reportId=ids[0];
var trReportId=this.options.prefix.treeNode+ids[0]+'_'+ids[1];
var trReport=$(trReportId);
var parentId=ids[1];
} else {
reportId=img.get('id').replace(this.options.prefix.img,this.options.prefix.td);
var trReport = $(reportId);
var parentId = 0;
var trReportId = 0;
}
if(trReport){
trReport.show();
} else {
thisObj.loadReport(img.getParent('tr'),reportId,parentId,trReportId);
}
},
loadReport: function(obj,reportId,parentId,namedId) {
var thisObj=this;
var trCurrent = obj;
JsHttpRequest.query(
'POST '+thisObj.options.path.loadReport,
{
reportId: reportId,
bTreeView: true,
parentId: parentId,
security_ls_key: LIVESTREET_SECURITY_KEY
},
function(result, errors) {
if (!result) {
msgErrorBox.alert('Error','Please try again later');
}
if (result.bStateError) {
msgErrorBox.alert(result.sMsgTitle,result.sMsg);
} else {
var trReport=new Element('tr', {'id':(!namedId)?reportId:namedId});
trReport.adopt(new Element('td',{
'colspan': 6,
'html' : result.sReportText
}));
trReport.inject(trCurrent,'after');
trReport.getElements('img').each(function(img, i){thisObj.makeImg(img);});
}
},
true
);
},
collapseNode: function(img) {
var thisObj = this;
img.setProperties({'src': this.options.img.path + this.options.img.openName});
img.removeClass(this.options.classes.closeImg);
img.addClass(this.options.classes.openImg);
if(img.hasClass(thisObj.options.classes.treeNode)) {
// Это элемент дерева - обрабатываем его соответствующим образом
trReport=img.getParent('tr').getNext('tr');
} else {
reportId=img.get('id').replace(this.options.prefix.img,this.options.prefix.td);
var trReport = $(reportId);
}
trReport.hide();
},
toggleEntriesByClass: function(reportId,name,link) {
var thisObj=this;
$$('a.profiler').removeClass('active');
$$('a.profiler.'+name).addClass('active');
//var trCurrent = link.getParent('tr').getPrevious('tr');
JsHttpRequest.query(
'POST '+thisObj.options.path.loadEntries+name+'/',
{
reportId: reportId,
security_ls_key: LIVESTREET_SECURITY_KEY
},
function(result, errors) {
if (!result) {
msgErrorBox.alert('Error','Please try again later');
}
if (result.bStateError) {
msgErrorBox.alert(result.sMsgTitle,result.sMsg);
} else {
var trReport = $(thisObj.options.prefix.td+reportId).empty();
trReport.adopt(new Element('td',{
'colspan': 5,
'html' : result.sReportText
}));
trReport.getElements('img').each(function(img, i){thisObj.makeImg(img);});
}
},
true
);
},
filterNode: function(obj) {
var thisObj = this;
var iTime=obj.get('value');
if(iTime!='' && parseFloat(iTime)){ thisObj.highlightFilterNode(iTime); }
},
highlightFilterNode: function(iTime) {
var thisObj = this;
$$('.time').each(function(el,i){
el.getParent('tr').removeClass(thisObj.options.classes.filterNode);
if(el.get('text')>iTime) {
el.getParent('tr').addClass(thisObj.options.classes.filterNode);
}
});
}
});
var lsProfiler;
window.addEvent('domready', function() {
lsProfiler = new lsProfilerClass({
img: {
path: DIR_PLUGIN_SKIN+'/images/'
},
classes: {
openImg: 'folding-open',
closeImg: 'folding',
filterNode: 'filter'
}
});
});