Changeset View
Changeset View
Standalone View
Standalone View
branches/5.3.x/core/admin_templates/reviews/reviews.tpl
Show All 35 Lines | |||||
// query tab content only in case if not queried or category don't match | // query tab content only in case if not queried or category don't match | ||||
var $url = this.URLMask.replace('#ITEM_PREFIX#', $prefix).replace('#TAB_NAME#', this.queryTabRegistry('prefix', $prefix, 'tab_id')); | var $url = this.URLMask.replace('#ITEM_PREFIX#', $prefix).replace('#TAB_NAME#', this.queryTabRegistry('prefix', $prefix, 'tab_id')); | ||||
this.BusyRequest[$prefix] = false; | this.BusyRequest[$prefix] = false; | ||||
Request.makeRequest($url, this.BusyRequest[$prefix], $div_id, this.successCallback, this.errorCallback, $div_id, this); | Request.makeRequest($url, this.BusyRequest[$prefix], $div_id, this.successCallback, this.errorCallback, $div_id, this); | ||||
} | } | ||||
} | } | ||||
var $Catalog = new Catalog('<inp2:m_Link template="reviews/reviews_tab" item_prefix="#ITEM_PREFIX#" tab_name="#TAB_NAME#" pass_through="td,item_prefix,tab_name" td="no" m_cat_id="-1" no_amp="1" js_escape="1"/>', 'reviews_', 'Reviews'); | var $Catalog = new Catalog('<inp2:adm_SelectorLink template="reviews/reviews_tab" item_prefix="#ITEM_PREFIX#" tab_name="#TAB_NAME#" pass="m" pass_through="td,item_prefix,tab_name" td="no" m_cat_id="-1" no_amp="1" js_escape="1"/>', 'reviews_', 'Reviews'); | ||||
var a_toolbar = new ToolBar(); | var a_toolbar = new ToolBar(); | ||||
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) ); | a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) ); | ||||
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>', | a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>', | ||||
function() { | function() { | ||||
$form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form'; | $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form'; | ||||
std_delete_items($Catalog.ActivePrefix, null, 1); | std_delete_items($Catalog.ActivePrefix, null, 1); | ||||
Show All 26 Lines | |||||
a_toolbar.Render(); | a_toolbar.Render(); | ||||
function edit() | function edit() | ||||
{ | { | ||||
$form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form'; | $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form'; | ||||
var $kf = document.getElementById($form_name); | var $kf = document.getElementById($form_name); | ||||
var $prev_action = $kf.action; | var $prev_action = $kf.action; | ||||
$kf.action = '<inp2:m_t pass="all" pass_through="item_prefix" item_prefix="#PREFIX#" no_amp="1" js_escape="1"/>' . replace('#PREFIX#', $Catalog.ActivePrefix); | $kf.action = '<inp2:adm_SelectorLink pass="all" pass_through="item_prefix" item_prefix="#PREFIX#" no_amp="1" js_escape="1"/>' . replace('#PREFIX#', $Catalog.ActivePrefix); | ||||
std_edit_temp_item( | std_edit_temp_item( | ||||
$Catalog.ActivePrefix, 'reviews/review_direct_edit', | $Catalog.ActivePrefix, 'reviews/review_direct_edit', | ||||
function() { | function() { | ||||
$kf.action = $prev_action; | $kf.action = $prev_action; | ||||
} | } | ||||
); | ); | ||||
} | } | ||||
Show All 19 Lines | |||||
<script type="text/javascript"> | <script type="text/javascript"> | ||||
addLoadEvent( | addLoadEvent( | ||||
function() { | function() { | ||||
$Catalog.Init(); | $Catalog.Init(); | ||||
} | } | ||||
); | ); | ||||
</script> | </script> | ||||
<inp2:m_include t="incs/footer" noform="yes"/> | <inp2:m_include t="incs/footer" noform="yes"/> | ||||
No newline at end of file |