Repellent
8 years ago
1 changed files with 233 additions and 170 deletions
@ -1,274 +1,337 @@ |
|||||||
<div class="title"> |
<script> |
||||||
<h5>{if $smarty.request.id == ''}{#IMPORT_H_ADD#}{else}{#IMPORT_H_EDIT#}{/if}</h5> |
var import_id = {$import_id}; |
||||||
</div> |
</script> |
||||||
|
|
||||||
<div class="widget" style="margin-top: 0px;"> |
<div class="title"> |
||||||
<div class="body"> |
<h5>{if $import_id}{#import_edit_tit#}{else}{#import_new_tit#}{/if}</h5> |
||||||
{#IMPORT_INFO_EDIT#} |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
|
||||||
<div class="breadCrumbHolder module"> |
<div class="breadCrumbHolder module"> |
||||||
<div class="breadCrumb module"> |
<div class="breadCrumb module"> |
||||||
<ul> |
<ul> |
||||||
<li class="firstB"><a href="index.php" title="{#MAIN_PAGE#}">{#MAIN_PAGE#}</a></li> |
<li class="firstB"> |
||||||
<li><a href="index.php?do=modules&cp={$sess}">{#MODULES_SUB_TITLE#}</a></li> |
<a href="index.php" title="{#MAIN_PAGE#}">{#MAIN_PAGE#}</a> |
||||||
<li><a href="index.php?do=modules&action=modedit&mod=import&moduleaction=1&cp={$sess}">{#IMPORT_MODULE_NAME#}</a></li> |
</li> |
||||||
<li>{if $smarty.request.id == ''}{#IMPORT_H_ADD#}{else}{#IMPORT_H_EDIT#}{/if}</li> |
<li> |
||||||
<li><strong class="code">{if $smarty.request.id == ''}{#IMPORT_H_ADD#}{else}{$import_name|escape}{/if}</strong></li> |
<a href="index.php?do=modules&cp={$sess}">{#MODULES_SUB_TITLE#}</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<a href="index.php?do=modules&action=modedit&mod=import&moduleaction=1&cp={$sess}">{#mod_name#}</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
{if $import_id}{#import_edit_tit#}{else}{#import_new_tit#}{/if} |
||||||
|
</li> |
||||||
|
{if $import_id} |
||||||
|
<li> |
||||||
|
<strong class="code">{$import.name|escape|stripslashes}</strong> |
||||||
|
</li> |
||||||
|
{/if} |
||||||
</ul> |
</ul> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<form method="post" id="import_edit_form" action="index.php?do=modules&action=modedit&mod=import&moduleaction=saveedit&cp={$sess}" class="mainForm"> |
<form action="index.php?do=modules&action=modedit&mod=import&moduleaction=save&import_id={$import_id}&cp={$sess}" method="post" class="mainForm" id="importSaveForm"> |
||||||
|
|
||||||
<div class="widget first"> |
<div class="widget first"> |
||||||
<div class="head{if $smarty.request.id != ''} closed{/if}"> |
<div class="head {if $import_id}closed{/if}"> |
||||||
<h5 class="iFrames">{#IMPORT_H_EDIT#}</h5> |
<h5 class="iFrames">{#import_set#}</h5> |
||||||
</div> |
</div> |
||||||
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
||||||
<tr class="noborder"> |
<tr class="noborder"> |
||||||
<td width="250">{#IMPORT_NAME#}</td> |
<td width="250">{#name#}</td> |
||||||
<td> |
<td> |
||||||
<div class="pr12"> |
<input name="name" class="mousetrap" type="text" style="width:250px" value="{$import.name|escape|stripslashes}" autocomplete="off" id="importNameInput" /> |
||||||
<input name="import_name" type="text" value="{$import_name|escape}" placeholder="{#CONTACT_FORM_NAME#}" size="50" /> |
|
||||||
</div> |
|
||||||
</td> |
</td> |
||||||
</tr> |
</tr> |
||||||
<tr> |
<tr> |
||||||
<td>{#IMPORT_RUBRICS#}</td> |
<td>{#rub_name#}</td> |
||||||
<td> |
<td> |
||||||
<select class="mousetrap" style="width: 250px" name="import_rub" {if $smarty.request.id != ''}disabled="disabled"{/if}> |
{if !$import_id} |
||||||
|
<select name="rub_id"> |
||||||
{foreach from=$rubs item=rub} |
{foreach from=$rubs item=rub} |
||||||
{if $rub->Id==$import_rub} |
<option value="{$rub.id}">{$rub.title}</option> |
||||||
<option value="{$rub->Id}" selected>{$rub->rubric_title}</option> |
|
||||||
{else} |
|
||||||
<option value="{$rub->Id}">{$rub->rubric_title}</option> |
|
||||||
{/if} |
|
||||||
{/foreach} |
{/foreach} |
||||||
</select> |
</select> |
||||||
|
{else} |
||||||
|
{$import.rub_title|escape|stripslashes} |
||||||
|
{/if} |
||||||
</td> |
</td> |
||||||
</tr> |
</tr> |
||||||
<tr> |
<tr> |
||||||
<td>{#IMPORT_PARSER#}</td> |
<td>{#parser#}</td> |
||||||
<td> |
<td> |
||||||
<select class="mousetrap" name="import_parser" style="width: 250px"> |
<select name="parser" style="width: 250px;"> |
||||||
{foreach from=$parses item=parse} |
{foreach from=$parsers item=parser} |
||||||
{if $parse==$import_parser} |
<option value="{$parser}" {if $import.parser == $parser}selected="selected"{/if}>{$parser}</option> |
||||||
<option value="{$parse}" selected>{$parse}</option> |
|
||||||
{else} |
|
||||||
<option value="{$parse}">{$parse}</option> |
|
||||||
{/if} |
|
||||||
{/foreach} |
{/foreach} |
||||||
</select> |
</select> |
||||||
</td> |
</td> |
||||||
</tr> |
</tr> |
||||||
<tr> |
<tr> |
||||||
<td>{#IMPORT_DELETE_DOCS#}</td> |
<td>{#docs_disable#}</td> |
||||||
<td><input class="mousetrap" name="import_delete_docs" type="checkbox" value="1" {if $import_delete_docs==1}checked="checked"{/if}/></td> |
<td><input class="mousetrap" type="checkbox" name="docs_disable" value="1" {if $import.docs_disable}checked="checked"{/if} /></td> |
||||||
</tr> |
</tr> |
||||||
<tr> |
<tr> |
||||||
<td>{#IMPORT_DOCS_CREATE#}</td> |
<td>{#docs_create#}</td> |
||||||
<td><input class="mousetrap" name="import_docs_create" type="checkbox" value="1" {if $import_docs_create==1}checked="checked"{/if}/></td> |
<td><input type="checkbox" name="docs_create" value="1" {if $import.docs_create}checked="checked"{/if} /></td> |
||||||
</tr> |
</tr> |
||||||
<tr> |
<tr> |
||||||
<td>{#IMPORT_FILE#}</td> |
<td>{#monitor#}</td> |
||||||
<td><div class="pr12"> |
<td><input type="checkbox" name="monitor" value="1" {if $import.monitor}checked="checked"{/if} /></td> |
||||||
<input class="mousetrap" name="import_default_file" type="text" value="{$import_default_file|escape}" size="50" placeholder="{#IMPORT_FILE#}" /> |
|
||||||
</div></td> |
|
||||||
</tr> |
</tr> |
||||||
<tr> |
<tr> |
||||||
<td>{#IMPORT_CHECK_FILE#}</td> |
<td>{#file#}</td> |
||||||
<td><input class="mousetrap" name="import_monitor_file" id="import_monitor_file" type="checkbox" value="1" {if $import_monitor_file==1}checked="checked"{/if}/></td> |
<td>/ <input class="mousetrap" type="text" name="file" value="{$import.file|escape|stripslashes}" style="width:300px;" /></td> |
||||||
</tr> |
|
||||||
<tr> |
|
||||||
<td colspan="3"> |
|
||||||
<input type="submit" class="basicBtn" value="{if $smarty.request.id != ''}{#IMPORT_SAVE#}{else}{#IMPORT_CREATE#}{/if}"/> |
|
||||||
{if $smarty.request.id != ''} |
|
||||||
<input type="submit" class="blackBtn SaveEdit" value="{#IMPORT_CTRLS#}" /> |
|
||||||
<input type="submit" class="greenBtn" value="{#IMPORT_REFRESH_TAGS#}" onclick="window.location ='index.php?do=modules&action=modedit&mod=import&moduleaction=tags&id={$id}&cp={$sess}';return false;" /> |
|
||||||
|
|
||||||
<input type="submit" class="redBtn" onclick="location.href='index.php?do=modules&action=modedit&mod=import&moduleaction=do&id={$id}&cp={$sess}'; return false;" value="{#IMPORT_DO_HINT#}" style="float: right;"> |
|
||||||
{/if} |
|
||||||
</td> |
|
||||||
</tr> |
</tr> |
||||||
</table> |
</table> |
||||||
|
<div class="rowElem"> |
||||||
|
<input type="submit" class="basicBtn" value="{if $import_id}{#save#}{else}{#create#}{/if}" /> |
||||||
|
{if $import_id} |
||||||
|
|
||||||
|
<input type="submit" class="blackBtn importSaveContBtn" value="{#save_cont#}" /> |
||||||
|
<input type="submit" class="greenBtn" value="{#tags_refresh#}" onClick="location.href='index.php?do=modules&action=modedit&mod=import&moduleaction=tags&import_id={$import.id}&cp={$sess}';return false;" /> |
||||||
|
<input type="submit" class="redBtn" onClick="location.href='index.php?do=modules&action=modedit&mod=import&moduleaction=run&import_id={$import_id}&cp={$sess}';return false;" value="{#run_btn#} (Ctrl+O)" /> |
||||||
|
{/if} |
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
{if $smarty.request.id != ''} |
{if $import_id} |
||||||
<div style="position:relative;width:73%;float:left"> |
<div style="position:relative;width:73%;float:left"> |
||||||
<div class="widget first"> |
<div class="widget first"> |
||||||
<div class="head closed"> |
<div class="head {if $import_id}closed{/if}"> |
||||||
<h5 class="iFrames">{#IMPORT_MAIN_FIELDS#}</h5> |
<h5 class="iFrames">{#fields_main#}</h5> |
||||||
</div> |
</div> |
||||||
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
||||||
|
<colgroup> |
||||||
|
<col width="1" /> |
||||||
|
<col width="1" /> |
||||||
|
<col width="1" /> |
||||||
|
<col width="250" /> |
||||||
|
<col width="1" /> |
||||||
|
<col width="*" /> |
||||||
|
</colgroup> |
||||||
<thead> |
<thead> |
||||||
<tr> |
<tr class="noborder"> |
||||||
<td width="35" align="center"> |
<td align="center"> |
||||||
<div align="center"> |
<div align="center"> |
||||||
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#IMPORT_ACTIVE_INFO#}"></a> |
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#check_f_active#}"></a> |
||||||
</div> |
</div> |
||||||
</td> |
</td> |
||||||
<td width="35" align="center"> |
<td align="center"> |
||||||
<div align="center"> |
<div align="center"> |
||||||
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#IMPORT_KEYS_INFO#}"></a> |
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#check_f_key#}"></a> |
||||||
</div> |
</div> |
||||||
</td> |
</td> |
||||||
<td width="35" align="center"> |
<td align="center"> |
||||||
<div align="center"> |
<div align="center"> |
||||||
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#IMPORT_CRITICAL_INFO#}"></a> |
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#check_f_oblig#}"></a> |
||||||
</div> |
</div> |
||||||
</td> |
</td> |
||||||
<td width="300">{#IMPORT_F#}</td> |
<td>{#field#}</td> |
||||||
<td>{#IMPORT_TPL#}</td> |
<td align="center"> |
||||||
|
<div align="center"> |
||||||
|
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#compare_type#}"></a> |
||||||
|
</div> |
||||||
|
</td> |
||||||
|
<td>{#field_tpl#}</td> |
||||||
</tr> |
</tr> |
||||||
</thead> |
</thead> |
||||||
<tbody> |
<tbody> |
||||||
{foreach from=$data.fields.header key=k item=v} |
{foreach from=$import.fields.main key=field_id item=field} |
||||||
<tr> |
<tr> |
||||||
<td> |
<td> |
||||||
<input class="mousetrap" name="document[active][header][{$k}]" type="hidden" value="0" /> |
<input type="checkbox" value="1" name="fields[main][{$field_id}][active]" {if $field.active}checked="checked"{/if}/> |
||||||
<input class="mousetrap" name="document[active][header][{$k}]" type="checkbox" value="1" {if !$data.active.header.$k==0}checked="checked"{/if} {if $k=='Id'}disabled="disabled"{/if} /> |
</td> |
||||||
|
<td> |
||||||
|
<input type="checkbox" value="1" name="fields[main][{$field_id}][key]" {if $field.key}checked="checked"{/if}/> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<input type="checkbox" value="1" name="fields[main][{$field_id}][oblig]" {if $field.oblig}checked="checked"{/if}/> |
||||||
|
</td> |
||||||
|
<td>{$field.title}</td> |
||||||
|
<td> |
||||||
|
<select name="fields[main][{$field_id}][comp]" style="width: 80px;"> |
||||||
|
<option value="">==</option> |
||||||
|
<option value="LIKE" {if $field.comp=='LIKE'}selected="selected"{/if}>LIKE</option> |
||||||
|
</select> |
||||||
|
<td> |
||||||
|
<div class="pr12"><textarea class="mousetrap" name="fields[main][{$field_id}][tpl]" style="width:100%; height:24px;">{$field.tpl|escape|stripslashes}</textarea></div> |
||||||
</td> |
</td> |
||||||
<td><input class="mousetrap" name="document[key][header][{$k}]" type="checkbox" value="1" {if $data.key.header.$k==1}checked="checked"{/if}/></td> |
|
||||||
<td><input class="mousetrap" name="document[critical][header][{$k}]" type="checkbox" value="1" {if $data.critical.header.$k==1}checked="checked"{/if}/></td> |
|
||||||
<td>{$v[1]}</td> |
|
||||||
<td><div class="pr12"><input class="mousetrap" type="text" name="document[fields][header][{$k}]" value="{$v[0]|escape|stripslashes}" size="50" /></div></td> |
|
||||||
</tr> |
</tr> |
||||||
{/foreach} |
{/foreach} |
||||||
</tbody> |
|
||||||
</table> |
</table> |
||||||
</div> |
</div> |
||||||
<div class="widget first"> |
<div class="widget first"> |
||||||
<div class="head"> |
<div class="head"> |
||||||
<h5 class="iFrames">{#IMPORT_RUB_FIELDS#}</h5> |
<h5 class="iFrames">{#fields_body#}</h5> |
||||||
</div> |
</div> |
||||||
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
||||||
|
<colgroup> |
||||||
|
<col width="1" /> |
||||||
|
<col width="1" /> |
||||||
|
<col width="1" /> |
||||||
|
<col width="1" /> |
||||||
|
<col width="250" /> |
||||||
|
<col width="1" /> |
||||||
|
<col width="*" /> |
||||||
|
</colgroup> |
||||||
<thead> |
<thead> |
||||||
<tr> |
<tr class="noborder"> |
||||||
<td width="35" align="center"> |
<td align="center"> |
||||||
<div align="center"> |
<div align="center"> |
||||||
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#IMPORT_ACTIVE_INFO#}"></a> |
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#check_f_active#}"></a> |
||||||
</div> |
</div> |
||||||
</td> |
</td> |
||||||
<td width="35" align="center"> |
<td align="center"> |
||||||
<div align="center"> |
<div align="center"> |
||||||
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#IMPORT_KEYS_INFO#}"></a> |
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#check_f_key#}"></a> |
||||||
</div> |
</div> |
||||||
</td> |
</td> |
||||||
<td width="35" align="center"> |
<td align="center"> |
||||||
<div align="center"> |
<div align="center"> |
||||||
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#IMPORT_CRITICAL_INFO#}"></a> |
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#check_f_oblig#}"></a> |
||||||
</div> |
</div> |
||||||
</td> |
</td> |
||||||
<td width="300">{#IMPORT_F#}</td> |
<td align="center"> |
||||||
<td>{#IMPORT_TPL#}</td> |
<div align="center"> |
||||||
|
ID |
||||||
|
</div> |
||||||
|
</td> |
||||||
|
<td>{#field#}</td> |
||||||
|
<td align="center"> |
||||||
|
<div align="center"> |
||||||
|
<a href="javascript:void(0);" class="topDir icon_sprite ico_info" title="{#compare_type#}"></a> |
||||||
|
</div> |
||||||
|
</td> |
||||||
|
<td>{#field_tpl#}</td> |
||||||
</tr> |
</tr> |
||||||
</thead> |
</thead> |
||||||
<tbody> |
<tbody> |
||||||
{foreach from=$data.fields.body key=k item=v} |
{foreach from=$import.fields.body key=field_id item=field} |
||||||
<tr> |
<tr> |
||||||
<td> |
<td> |
||||||
<input class="mousetrap" name="document[active][body][{$k}]" type="hidden" value="0" /> |
<input type="checkbox" value="1" name="fields[body][{$field_id}][active]" {if $field.active}checked="checked"{/if} /> |
||||||
<input class="mousetrap" name="document[active][body][{$k}]" type="checkbox" value="1" {if !$data.active.body.$k==0}checked="checked"{/if}/> |
|
||||||
</td> |
</td> |
||||||
<td><input class="mousetrap" name="document[key][body][{$k}]" type="checkbox" value="1" {if $data.key.body.$k==1}checked="checked"{/if}/></td> |
<td> |
||||||
<td><input class="mousetrap" name="document[critical][body][{$k}]" type="checkbox" value="1" {if $data.critical.body.$k==1}checked="checked"{/if}/></td> |
<input type="checkbox" value="1" name="fields[body][{$field_id}][key]" {if $field.key}checked="checked"{/if} /> |
||||||
<td>{$v[1]}</td> |
</td> |
||||||
<td><div class="pr12"><input class="mousetrap" type="text" name="document[fields][body][{$k}]" value="{$v[0]|escape|stripslashes}" size="50" /></div></td> |
<td> |
||||||
</tr> |
<input type="checkbox" value="1" name="fields[body][{$field_id}][oblig]" {if $field.oblig}checked="checked"{/if} /> |
||||||
{/foreach} |
</td> |
||||||
<tr> |
<td><strong class="code">{$field_id}</strong></td> |
||||||
<td colspan="5"> |
<td>{$field.title}</td> |
||||||
<input type="hidden" name="id" value="{$id}"> |
<td> |
||||||
<input type="submit" class="basicBtn" value="{#IMPORT_SAVE#}"/> |
<select name="fields[body][{$field_id}][comp]" style="width: 80px;"> |
||||||
<input type="submit" class="blackBtn SaveEdit" value="{#IMPORT_CTRLS#}" /> |
<option value="">==</option> |
||||||
<input type="submit" class="greenBtn" value="{#IMPORT_REFRESH_TAGS#}" onclick="window.location ='index.php?do=modules&action=modedit&mod=import&moduleaction=tags&id={$id}&cp={$sess}';return false;" /> |
<option value="LIKE" {if $field.comp=='LIKE'}selected="selected"{/if}>LIKE</option> |
||||||
<input type="submit" class="redBtn" onclick="location.href='index.php?do=modules&action=modedit&mod=import&moduleaction=do&id={$id}&cp={$sess}'; return false;" value="{#IMPORT_DO_HINT#}" style="float: right;"> |
</select> |
||||||
|
<td> |
||||||
|
<div class="pr12"><textarea class="mousetrap" name="fields[body][{$field_id}][tpl]" style="width:100%; height:24px;">{$field.tpl|escape|stripslashes}</textarea></div> |
||||||
</td> |
</td> |
||||||
</tr> |
</tr> |
||||||
</tbody> |
{/foreach} |
||||||
|
|
||||||
</table> |
</table> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="widget first" style="position:relative;display:block;float:right;clear:none;width:25%"> |
<div class="widget first" style="position:relative;display:block;float:right;clear:none;width:25%"> |
||||||
<div class="head"> |
<div class="head"> |
||||||
<h5 class="iFrames">{#IMPORT_TAGS#}</h5> |
<h5 class="iFrames">{#tags#}</h5> |
||||||
</div> |
</div> |
||||||
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
||||||
|
<tbody> |
||||||
<tr> |
<tr> |
||||||
<td align="center"> |
<td> |
||||||
<div class="pr12"> |
<div class="pr12"><input class="mousetrap topleftDir" readonly style="width:100%" type="text" value="[Y-m-d]" title="{#tag_date#}"></div> |
||||||
<input class="mousetrap" readonly type="text" value="[Y-m-d]" style="margin-top:5px;" title="{#IMPORT_TAG_DATE#}"> |
|
||||||
<input class="mousetrap" readonly type="text" value="[row:XXX]" style="margin-top:5px;" title="{#IMPORT_TAG_1#}"> |
|
||||||
<input class="mousetrap" readonly type="text" value="[row:XXX:YYY:...]" style="margin-top:5px;" title="{#IMPORT_TAG_2#}"> |
|
||||||
</div> |
|
||||||
</td> |
</td> |
||||||
</tr> |
</tr> |
||||||
{if $data.tags} |
|
||||||
<tr> |
<tr> |
||||||
<td align="center"> |
<td> |
||||||
{#IMPORT_TAGS_TITLE#} |
<div class="pr12"><input class="mousetrap topleftDir" readonly style="width:100%" type="text" value="[row:XXX]" title="{#tag_one#}"></div> |
||||||
</td> |
</td> |
||||||
</tr> |
</tr> |
||||||
|
<tr> |
||||||
{foreach from=$data.tags key=k item=v} |
<td> |
||||||
|
<div class="pr12"><input class="mousetrap topleftDir" readonly style="width:100%" type="text" value="[row:XXX:YYY:...]" title="{#tag_many#}"></div> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
{if $import.tags} |
||||||
<tr> |
<tr> |
||||||
<td align="center"> |
<td align="center"> |
||||||
<div class="pr12"><input class="mousetrap" readonly type="text" value="{$v}"></div> |
{#fields_file#} |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
{foreach from=$import.tags item=tag} |
||||||
|
<tr> |
||||||
|
<td> |
||||||
|
<div class="pr12"><input class="mousetrap" readonly style="width:100%" type="text" value="{$tag}"></div> |
||||||
</td> |
</td> |
||||||
</tr> |
</tr> |
||||||
{/foreach} |
{/foreach} |
||||||
|
<tr> |
||||||
{/if} |
{/if} |
||||||
</table> |
</table> |
||||||
</div> |
</div> |
||||||
{/if} |
{/if} |
||||||
</form> |
</form> |
||||||
|
<script type="text/javascript"> |
||||||
|
$(function() {ldelim} |
||||||
|
Mousetrap.bind(['ctrl+s', 'meta+s'], function(event) {ldelim} |
||||||
|
event.preventDefault(); |
||||||
|
{if $import_id} |
||||||
|
saveCont(); |
||||||
|
{else} |
||||||
|
$('#importSaveForm').submit(); |
||||||
|
{/if} |
||||||
|
return false; |
||||||
|
{rdelim}); |
||||||
|
|
||||||
<script language="javascript"> |
{if $import_id} |
||||||
var sett_options = {ldelim} |
Mousetrap.bind(['ctrl+o', 'meta+o'], function(event) {ldelim} |
||||||
url: 'index.php?do=modules&action=modedit&mod=import&moduleaction=saveedit&cp={$sess}', |
event.preventDefault(); |
||||||
beforeSubmit: Request, |
importRun (); |
||||||
success: Response, |
return false; |
||||||
error: Error |
{rdelim}); |
||||||
{rdelim} |
{/if} |
||||||
|
|
||||||
function Request(){ldelim} |
|
||||||
$.alerts._overlay('show'); |
|
||||||
{rdelim} |
|
||||||
|
|
||||||
function Response(){ldelim} |
$('.importSaveContBtn').click(function(event) {ldelim} |
||||||
$.alerts._overlay('hide'); |
saveCont(); |
||||||
$.jGrowl('{#IMPORT_SAVED#}', {ldelim}theme: 'accept'{rdelim}); |
return false; |
||||||
{rdelim} |
{rdelim}); |
||||||
|
{rdelim}); |
||||||
|
|
||||||
function Error(){ldelim} |
// функция ajax-сохранения |
||||||
|
function saveCont () {ldelim} |
||||||
|
$('#importSaveForm').ajaxSubmit({ldelim} |
||||||
|
dataType: 'json', |
||||||
|
beforeSubmit: function () {ldelim} $.alerts._overlay('show');{rdelim}, |
||||||
|
success: function (data) {ldelim} |
||||||
$.alerts._overlay('hide'); |
$.alerts._overlay('hide'); |
||||||
$.jGrowl('{#IMPORT_FAILED#}', {ldelim}theme: 'error'{rdelim}); |
$.jGrowl(data['message'], {ldelim} |
||||||
{rdelim} |
header: data['header'], |
||||||
|
theme: data['theme'] |
||||||
$(document).ready(function(){ldelim} |
{rdelim}); |
||||||
|
|
||||||
Mousetrap.bind(['ctrl+s', 'meta+s'], function(e) {ldelim} |
|
||||||
if (e.preventDefault) {ldelim} |
|
||||||
e.preventDefault(); |
|
||||||
{rdelim} else {ldelim} |
|
||||||
// internet explorer |
|
||||||
e.returnValue = false; |
|
||||||
{rdelim} |
{rdelim} |
||||||
$("#import_edit_form").ajaxSubmit(sett_options); |
|
||||||
return false; |
|
||||||
{rdelim}); |
{rdelim}); |
||||||
|
return false; |
||||||
|
{rdelim} |
||||||
|
|
||||||
$(".SaveEdit").click(function(e){ldelim} |
// функция запуска импорта |
||||||
if (e.preventDefault) {ldelim} |
function importRun () {ldelim} |
||||||
e.preventDefault(); |
location.href='index.php?do=modules&action=modedit&mod=import&moduleaction=importrun&import_id={$import_id}&cp={$sess}'; |
||||||
{rdelim} else {ldelim} |
/* $.ajax({ldelim} |
||||||
// internet explorer |
url: 'index.php?do=modules&action=modedit&mod=import&moduleaction=importrun&import_id={$import_id}&cp={$sess}', |
||||||
e.returnValue = false; |
beforeSend: function () {ldelim} $.alerts._overlay('show');{rdelim}, |
||||||
|
success: function () {ldelim} |
||||||
|
$.alerts._overlay('hide'); |
||||||
|
$.jGrowl('{#imported#}', {ldelim} theme: 'accept'{rdelim}); |
||||||
{rdelim} |
{rdelim} |
||||||
$("#import_edit_form").ajaxSubmit(sett_options); |
{rdelim});*/ |
||||||
return false; |
{rdelim} |
||||||
{rdelim}); |
|
||||||
|
|
||||||
{rdelim}); |
|
||||||
</script> |
</script> |
||||||
|
{if $import_id} |
||||||
|
{include file="$codemirror_connect"} |
||||||
|
{include conn_id="_1" file="$codemirror_editor" textarea_id='codemirror' ctrls='saveCont();' ctrlo='importRun();' height=200} |
||||||
|
{include conn_id="_2" file="$codemirror_editor" textarea_id='codemirror2' ctrls='saveCont();' ctrlo='importRun();' height=200} |
||||||
|
{include conn_id="_3" file="$codemirror_editor" textarea_id='codemirror3' ctrls='saveCont();' ctrlo='importRun();' height=200} |
||||||
|
{/if} |
||||||
|
Loading…
Reference in new issue