mirror of https://github.com/avecms/AVE.cms.git
M@d D3n
7 years ago
94 changed files with 8478 additions and 7380 deletions
@ -0,0 +1,136 @@ |
|||||||
|
<div class="title"> |
||||||
|
<h5>{#RUBRIK_FIELDS_TEMPLATES_H2#}</h5> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="breadCrumbHolder module"> |
||||||
|
<div class="breadCrumb module"> |
||||||
|
<ul> |
||||||
|
<li class="firstB"><a href="index.php" title="{#MAIN_PAGE#}">{#MAIN_PAGE#}</a></li> |
||||||
|
<li><a href="index.php?do=modules&cp={$sess}">{#MODULES_SUB_TITLE#}</a></li> |
||||||
|
<li><a href="index.php?do=modules&action=modedit&mod=fieldsmanager&moduleaction=1&cp={$sess}">Управление полями</a></li> |
||||||
|
{if $params.id} |
||||||
|
<li><strong>{#RUBRIK_FIELDS_EDIT_RUBRIC#}</strong> > {$params.field.rubric_title}</li> |
||||||
|
<li><strong>{#RUBRIK_FIELDS_EDIT_FIELD#}</strong> > {$params.field.rubric_field_title}</li> |
||||||
|
{/if} |
||||||
|
<li><strong>{#RUBRIK_FIELDS_EDIT_TYPE#}</strong> > {$main.name} {if $params.id}(id: {$params.id}){/if}</li> |
||||||
|
<li> |
||||||
|
<strong class="code"> |
||||||
|
{if $params.type == 'adm'} |
||||||
|
{#RUBRIK_FIELDS_EDIT_TPL_ADM#} |
||||||
|
{elseif $params.type == 'doc'} |
||||||
|
{#RUBRIK_FIELDS_EDIT_TPL_DOC#}{ |
||||||
|
elseif $params.type == 'req'} |
||||||
|
{#RUBRIK_FIELDS_EDIT_TPL_REQ#} |
||||||
|
{/if} |
||||||
|
</strong> |
||||||
|
</li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
{if $code_text} |
||||||
|
<form id="code_templ" method="post" action="index.php?do=rubs&action=ftsave&cp={$sess}" class="mainForm"> |
||||||
|
|
||||||
|
<div class="widget first"> |
||||||
|
<div class="head"> |
||||||
|
<h5 class="iFrames">{if $params.func == 'new'}{#RUBRIK_FIELDS_EDIT_TPL_CREAT#}{else}{#RUBRIK_FIELDS_EDIT_TPL_EDIT#}{/if}</h5> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="rowElem" style="padding: 0"> |
||||||
|
<textarea id="code_text" name="code_text">{$code_text|escape}</textarea> |
||||||
|
<div class="fix"></div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="rowElem"> |
||||||
|
<button class="basicBtn SaveButton">{#RUBRIK_ALIAS_BUTT#}</button> |
||||||
|
|
||||||
|
<a href="javascript:void(0);" class="button redBtn Close">{#RUBRIK_BUTTON_TPL_CLOSE#}</a> |
||||||
|
<div class="fix"></div> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
|
||||||
|
<input type="hidden" name="func" value="{$params.func}" /> |
||||||
|
{if $params.id} |
||||||
|
<input type="hidden" name="field_id" value="{$params.id}" /> |
||||||
|
{/if} |
||||||
|
<input type="hidden" name="field_name" value="{$params.fld}" /> |
||||||
|
<input type="hidden" name="field_type" value="{$params.type}" /> |
||||||
|
|
||||||
|
</form> |
||||||
|
|
||||||
|
{include file="$codemirror_editor" conn_id="ftpl" textarea_id='code_text' ctrls='$("#code_templ").ajaxSubmit(sett_options);' height=400} |
||||||
|
|
||||||
|
<script language="javascript"> |
||||||
|
$(document).ready(function(){ldelim} |
||||||
|
|
||||||
|
$(".SaveButton").on('click', function(event){ldelim} |
||||||
|
event.preventDefault(); |
||||||
|
$("#code_templ").ajaxSubmit({ldelim} |
||||||
|
url: 'index.php?do=rubs&action=ftsave&cp={$sess}', |
||||||
|
dataType: 'json', |
||||||
|
beforeSubmit: function(){ldelim} |
||||||
|
$.alerts._overlay('show'); |
||||||
|
{rdelim}, |
||||||
|
success: function(data){ldelim} |
||||||
|
$.jGrowl(data['message'], {ldelim} |
||||||
|
header: data['header'], |
||||||
|
theme: data['theme'] |
||||||
|
{rdelim}); |
||||||
|
$.alerts._overlay('hide'); |
||||||
|
|
||||||
|
{if $params.func == 'new'} |
||||||
|
var html = |
||||||
|
'<a data-dialog="rft-{$params.id}" href="index.php?do=rubs&action=ftedit&rubric_id={$smarty.request.rubric_id}&id={$params.id}&fld={$params.fld}&type={$params.type}&cp={$sess}&pop=1&onlycontent=1" data-height="650" data-modal="true" class="openDialog">{#RUBRIC_TMPLS_EDIT#}</a>' |
||||||
|
+ '<br />' |
||||||
|
+ '<a href="index.php?do=rubs&action=ftdelete&rubric_id={$smarty.request.rubric_id}&id={$params.id}&fld={$params.fld}&type={$params.type}&cp={$sess}" class="link">{#RUBRIC_TMPLS_DELETE#}</a>' |
||||||
|
; |
||||||
|
|
||||||
|
$('#{$params.type}_{$params.fld}_{$params.id}').html(html); |
||||||
|
$('a.openDialog').off(); |
||||||
|
AveAdmin.modalDialog(); |
||||||
|
{/if} |
||||||
|
|
||||||
|
$('#ajax-dialog-rft-{if $params.id}{$params.id}{else}{$params.fld}{/if}').dialog('destroy').remove(); |
||||||
|
{rdelim} |
||||||
|
{rdelim}); |
||||||
|
return false; |
||||||
|
{rdelim}); |
||||||
|
|
||||||
|
$(".Close").on('click', function(event){ldelim} |
||||||
|
event.preventDefault(); |
||||||
|
$('#ajax-dialog-rft-{if $params.id}{$params.id}{else}{$params.fld}{/if}').dialog('destroy').remove(); |
||||||
|
return false; |
||||||
|
{rdelim}); |
||||||
|
|
||||||
|
{literal} |
||||||
|
setTimeout(function(){editorftpl.refresh();}, 20); |
||||||
|
{/literal} |
||||||
|
|
||||||
|
{rdelim}); |
||||||
|
</script> |
||||||
|
|
||||||
|
{else} |
||||||
|
|
||||||
|
<div class="widget first"> |
||||||
|
<div class="head"> |
||||||
|
<h5 class="iFrames"> |
||||||
|
{$main.name} - |
||||||
|
{if $params.type == 'adm'} |
||||||
|
{#RUBRIK_FIELDS_EDIT_TPL_ADM#} |
||||||
|
{elseif $params.type == 'doc'} |
||||||
|
{#RUBRIK_FIELDS_EDIT_TPL_DOC#}{ |
||||||
|
elseif $params.type == 'req'} |
||||||
|
{#RUBRIK_FIELDS_EDIT_TPL_REQ#} |
||||||
|
{/if} |
||||||
|
</h5> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<ul class="messages first"> |
||||||
|
<li class="highlight red"> |
||||||
|
<strong>{#RUBRIK_FIELDS_EDIT_NO_TPL#}</strong> |
||||||
|
</li> |
||||||
|
</ul> |
||||||
|
|
||||||
|
{/if} |
@ -0,0 +1,142 @@ |
|||||||
|
<script language="Javascript" type="text/javascript"> |
||||||
|
var sess = '{$sess}'; |
||||||
|
</script> |
||||||
|
|
||||||
|
<div class="title"> |
||||||
|
<h5>{#RUBRIK_FIELDS_TEMPLATES_H2#}</h5> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="widget" style="margin-top: 0px;"> |
||||||
|
<div class="body"> |
||||||
|
<ul style="list-style: square; margin-left:15px;"> |
||||||
|
<li>{#RUBRIK_FIELDS_TEMPLATES_T1#}</li> |
||||||
|
<li>{#RUBRIK_FIELDS_TEMPLATES_T2#}</li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<table class="first tableButtons" cellpadding="0" cellspacing="0" width="100%" id="rubricButtons"> |
||||||
|
<col width="20%"> |
||||||
|
<col width="20%"> |
||||||
|
<col width="20%"> |
||||||
|
<col width="20%"> |
||||||
|
<col width="20%"> |
||||||
|
<tr> |
||||||
|
<td> |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=edit&Id={$smarty.request.rubric_id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_FIELDS#}</a> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=fieldsgroups&Id={$smarty.request.rubric_id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_FGROUPS#}</a> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=template&Id={$smarty.request.rubric_id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_TEMPLATES#}</a> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
{if check_permission('rubric_code')} |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=code&Id={$smarty.request.rubric_id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_CODE#}</a> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=rules&Id={$smarty.request.rubric_id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_RULES#}</a> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
</table> |
||||||
|
|
||||||
|
<div class="breadCrumbHolder module"> |
||||||
|
<div class="breadCrumb module"> |
||||||
|
<ul> |
||||||
|
<li class="firstB"> |
||||||
|
<a href="index.php" title="{#MAIN_PAGE#}">{#MAIN_PAGE#}</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<a href="index.php?do=rubs&cp={$sess}">{#RUBRIK_SUB_TITLE#}</a> |
||||||
|
</li> |
||||||
|
<li>{#RUBRIK_FIELDS_TEMPLATES_H1#}</li> |
||||||
|
<li><strong class="code">{$rubric->rubric_title}</strong></li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
{foreach from=$rubrics item=rubric} |
||||||
|
<div class="widget"> |
||||||
|
<div class="head"> |
||||||
|
<h5>{$main.name} ({$main.id})</h5> |
||||||
|
<div class="num"> |
||||||
|
<a class="basicNum" href="index.php?do=rubs&action=ftlist&Id={$smarty.request.rubric_id}&cp={$sess}">{#RUBRIK_FIELDS_TEMPLATES_BACK#}</a> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic mainForm"> |
||||||
|
<col width="10" /> |
||||||
|
<col /> |
||||||
|
<col width="100" /> |
||||||
|
<col width="100" /> |
||||||
|
<col width="100" /> |
||||||
|
<col width="80" /> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<td colspan="1" rowspan="2">Id</td> |
||||||
|
<td colspan="1" rowspan="2">{#RUBRIK_FIELDS_TEMPLATES_FNAME#}</td> |
||||||
|
<td colspan="3" rowspan="1">{#RUBRIK_FIELDS_TEMPLATES_FTEMPL#}</td> |
||||||
|
<td colspan="1" rowspan="2">{#RUBRIK_FIELDS_TEMPLATES_DB#}</td> |
||||||
|
</tr> |
||||||
|
<tr> |
||||||
|
<td style="border-left: solid 1px #C7D6E6 !important;">{#RUBRIK_FIELDS_TEMPLATES_PANEL#}</td> |
||||||
|
<td>{#RUBRIK_FIELDS_TEMPLATES_DOC#}</td> |
||||||
|
<td>{#RUBRIK_FIELDS_TEMPLATES_REQ#}</td> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
{foreach from=$rubric.fields item=field} |
||||||
|
<tr class="center"> |
||||||
|
<td align="center">{$field.id}</td> |
||||||
|
<td><strong>{$field.title}</strong></td> |
||||||
|
<td align="center" id="adm_{$main.id}_{$field.id}"> |
||||||
|
{if $field.adm_main} |
||||||
|
{if $field.adm_tpl} |
||||||
|
<a data-dialog="rft-{$field.id}" href="index.php?do=rubs&action=ftedit&rubric_id={$smarty.request.rubric_id}&id={$field.id}&fld={$main.id}&type=adm&cp={$sess}&pop=1&onlycontent=1" data-height="650" data-modal="true" class="openDialog">{#RUBRIC_TMPLS_EDIT#}</a> |
||||||
|
<br /> |
||||||
|
<a href="index.php?do=rubs&action=ftdelete&rubric_id={$smarty.request.rubric_id}&id={$field.id}&fld={$main.id}&type=adm&cp={$sess}" class="link">{#RUBRIC_TMPLS_DELETE#}</a> |
||||||
|
{else} |
||||||
|
<a data-dialog="rft-{$field.id}" href="index.php?do=rubs&action=ftcreate&rubric_id={$smarty.request.rubric_id}&id={$field.id}&fld={$main.id}&type=adm&cp={$sess}&pop=1&onlycontent=1" data-height="650" data-modal="true" class="openDialog">{#RUBRIC_TMPLS_CREAT#}</a> |
||||||
|
{/if} |
||||||
|
{else} |
||||||
|
<small>{#RUBRIK_FIELDS_NO_TEMPLATES#}</small> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
<td align="center" id="doc_{$main.id}_{$field.id}"> |
||||||
|
{if $field.doc_main} |
||||||
|
{if $field.doc_tpl} |
||||||
|
<a data-dialog="rft-{$field.id}" href="index.php?do=rubs&action=ftedit&rubric_id={$smarty.request.rubric_id}&id={$field.id}&fld={$main.id}&type=doc&cp={$sess}&pop=1&onlycontent=1" data-height="650" data-modal="true" class="openDialog">{#RUBRIC_TMPLS_EDIT#}</a> |
||||||
|
<br /> |
||||||
|
<a href="index.php?do=rubs&action=ftdelete&rubric_id={$smarty.request.rubric_id}&id={$field.id}&fld={$main.id}&type=doc&cp={$sess}" class="link">{#RUBRIC_TMPLS_DELETE#}</a> |
||||||
|
{else} |
||||||
|
<a data-dialog="rft-{$field.id}" href="index.php?do=rubs&action=ftcreate&rubric_id={$smarty.request.rubric_id}&id={$field.id}&fld={$main.id}&type=doc&cp={$sess}&pop=1&onlycontent=1" data-height="650" data-modal="true" class="openDialog">{#RUBRIC_TMPLS_CREAT#}</a> |
||||||
|
{/if} |
||||||
|
{else} |
||||||
|
<small>{#RUBRIK_FIELDS_NO_TEMPLATES#}</small> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
<td align="center" id="req_{$main.id}_{$field.id}"> |
||||||
|
{if $field.req_main} |
||||||
|
{if $field.req_tpl} |
||||||
|
<a data-dialog="rft-{$field.id}" href="index.php?do=rubs&action=ftedit&rubric_id={$smarty.request.rubric_id}&id={$field.id}&fld={$main.id}&type=req&cp={$sess}&pop=1&onlycontent=1" data-height="650" data-modal="true" class="openDialog">{#RUBRIC_TMPLS_EDIT#}</a> |
||||||
|
<br /> |
||||||
|
<a href="index.php?do=rubs&action=ftdelete&rubric_id={$smarty.request.rubric_id}&id={$field.id}&fld={$main.id}&type=req&cp={$sess}" class="link">{#RUBRIC_TMPLS_DELETE#}</a> |
||||||
|
{else} |
||||||
|
<a data-dialog="rft-{$field.id}" href="index.php?do=rubs&action=ftcreate&rubric_id={$smarty.request.rubric_id}&id={$field.id}&fld={$main.id}&type=req&cp={$sess}&pop=1&onlycontent=1" data-height="650" data-modal="true" class="openDialog">{#RUBRIC_TMPLS_CREAT#}</a> |
||||||
|
{/if} |
||||||
|
{else} |
||||||
|
<small>{#RUBRIK_FIELDS_NO_TEMPLATES#}</small> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
<td align="center"> |
||||||
|
<a data-dialog="rft-{$field.id}" title="{#RUBRIK_FILED_TEMPLATE_H#}" href="index.php?do=rubs&action=field_template&field_id={$field.id}&rubric_id={$rubric.rubric_id}&cp={$sess}&pop=1&onlycontent=1" data-height="700" data-modal="true" data-title="{#RUBRIK_FILED_TEMPLATE_H#}" class="openDialog icon_sprite ico_template topleftDir"></a> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
{/foreach} |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
|
</div> |
||||||
|
{/foreach} |
||||||
|
|
||||||
|
{include file="$codemirror_connect"} |
@ -0,0 +1,136 @@ |
|||||||
|
<script language="Javascript" type="text/javascript"> |
||||||
|
var sess = '{$sess}'; |
||||||
|
</script> |
||||||
|
|
||||||
|
<div class="title"> |
||||||
|
<h5>{#RUBRIK_FIELDS_TEMPLATES_H2#}</h5> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="widget" style="margin-top: 0px;"> |
||||||
|
<div class="body"> |
||||||
|
<ul style="list-style: square; margin-left:15px;"> |
||||||
|
<li>{#RUBRIK_FIELDS_TEMPLATES_T1#}</li> |
||||||
|
<li>{#RUBRIK_FIELDS_TEMPLATES_T2#}</li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<table class="first tableButtons" cellpadding="0" cellspacing="0" width="100%" id="rubricButtons"> |
||||||
|
<col width="20%"> |
||||||
|
<col width="20%"> |
||||||
|
<col width="20%"> |
||||||
|
<col width="20%"> |
||||||
|
<col width="20%"> |
||||||
|
<tr> |
||||||
|
<td> |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=edit&Id={$smarty.request.Id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_FIELDS#}</a> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=fieldsgroups&Id={$smarty.request.Id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_FGROUPS#}</a> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=template&Id={$smarty.request.Id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_TEMPLATES#}</a> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
{if check_permission('rubric_code')} |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=code&Id={$smarty.request.Id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_CODE#}</a> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=rules&Id={$smarty.request.Id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_RULES#}</a> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
</table> |
||||||
|
|
||||||
|
<div class="breadCrumbHolder module"> |
||||||
|
<div class="breadCrumb module"> |
||||||
|
<ul> |
||||||
|
<li class="firstB"> |
||||||
|
<a href="index.php" title="{#MAIN_PAGE#}">{#MAIN_PAGE#}</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<a href="index.php?do=rubs&cp={$sess}">{#RUBRIK_SUB_TITLE#}</a> |
||||||
|
</li> |
||||||
|
<li>{#RUBRIK_FIELDS_TEMPLATES_H1#}</li> |
||||||
|
<li><strong class="code">{$rubric->rubric_title}</strong></li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="widget"> |
||||||
|
<div class="head"> |
||||||
|
<h5>{#RUBRIK_FIELDS_TEMPLATES_LIST#}</h5> |
||||||
|
</div> |
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic mainForm"> |
||||||
|
|
||||||
|
<col /> |
||||||
|
<col width="100" /> |
||||||
|
<col width="100" /> |
||||||
|
<col width="100" /> |
||||||
|
<col width="80" /> |
||||||
|
<col width="100" /> |
||||||
|
<col width="80" /> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
|
||||||
|
</tr> |
||||||
|
|
||||||
|
<tr> |
||||||
|
<td colspan="1" rowspan="2">{#RUBRIK_FIELDS_TEMPLATES_FNAME#}</td> |
||||||
|
<td colspan="1" rowspan="2">{#RUBRIK_FIELDS_TEMPLATES_FFUNC#}</td> |
||||||
|
<td colspan="3" rowspan="1">{#RUBRIK_FIELDS_TEMPLATES_FTEMP#}</td> |
||||||
|
</tr> |
||||||
|
<tr> |
||||||
|
<td style="border-left: solid 1px #C7D6E6 !important;">{#RUBRIK_FIELDS_TEMPLATES_PANEL#}</td> |
||||||
|
<td>{#RUBRIK_FIELDS_TEMPLATES_DOC#}</td> |
||||||
|
<td>{#RUBRIK_FIELDS_TEMPLATES_REQ#}</td> |
||||||
|
</tr> |
||||||
|
|
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
{foreach from=$fields item=field key=number} |
||||||
|
{if in_array($field.id, $enable)} |
||||||
|
<tr> |
||||||
|
<td> |
||||||
|
<strong><a class="link" href="index.php?do=rubs&action=ftshowfield&rubric_id={$smarty.request.Id}&type={$field.id}&cp={$sess}">{$field.name}</a></strong> |
||||||
|
</td> |
||||||
|
|
||||||
|
<td class="date_text dgrey" align="center"> |
||||||
|
{$field.id} |
||||||
|
</td> |
||||||
|
|
||||||
|
<td align="center"> |
||||||
|
{foreach from=$exists item=exist key=key} |
||||||
|
{if $field.id == $key} |
||||||
|
{if $exist.adm} |
||||||
|
<a data-dialog="rft-{$field.id}" href="index.php?do=rubs&action=ftempledit&rubric_id={$smarty.request.Id}&fld={$field.id}&type=adm&cp={$sess}&pop=1&onlycontent=1" data-height="650" data-modal="true" class="openDialog">{#RUBRIC_TMPLS_EDIT#}</a> |
||||||
|
{/if} |
||||||
|
{/if} |
||||||
|
{/foreach} |
||||||
|
</td> |
||||||
|
<td align="center"> |
||||||
|
{foreach from=$exists item=exist key=key} |
||||||
|
{if $field.id == $key} |
||||||
|
{if $exist.doc} |
||||||
|
<a data-dialog="rft-{$field.id}" href="index.php?do=rubs&action=ftempledit&rubric_id={$smarty.request.Id}&fld={$field.id}&type=doc&cp={$sess}&pop=1&onlycontent=1" data-height="650" data-modal="true" class="openDialog">{#RUBRIC_TMPLS_EDIT#}</a> |
||||||
|
{/if} |
||||||
|
{/if} |
||||||
|
{/foreach} |
||||||
|
</td> |
||||||
|
<td align="center"> |
||||||
|
{foreach from=$exists item=exist key=key} |
||||||
|
{if $field.id == $key} |
||||||
|
{if $exist.req} |
||||||
|
<a data-dialog="rft-{$field.id}" href="index.php?do=rubs&action=ftempledit&rubric_id={$smarty.request.Id}&fld={$field.id}&type=req&cp={$sess}&pop=1&onlycontent=1" data-height="650" data-modal="true" class="openDialog">{#RUBRIC_TMPLS_EDIT#}</a> |
||||||
|
{/if} |
||||||
|
{/if} |
||||||
|
{/foreach} |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
{/if} |
||||||
|
{/foreach} |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
|
</div> |
||||||
|
|
||||||
|
{include file="$codemirror_connect"} |
@ -0,0 +1,240 @@ |
|||||||
|
<script language="Javascript" type="text/javascript"> |
||||||
|
var sess = '{$sess}'; |
||||||
|
</script> |
||||||
|
|
||||||
|
<div class="title"> |
||||||
|
<h5>{#RUBRIK_EDIT_RULES#}</h5> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="widget" style="margin-top: 0px;"> |
||||||
|
<div class="body">{#RUBRIC_WARNING_TIP#}</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<table class="first tableButtons" cellpadding="0" cellspacing="0" width="100%" id="rubricButtons"> |
||||||
|
<col width="20%"> |
||||||
|
<col width="20%"> |
||||||
|
<col width="20%"> |
||||||
|
<col width="20%"> |
||||||
|
<col width="20%"> |
||||||
|
<tr> |
||||||
|
<td> |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=edit&Id={$smarty.request.Id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_FIELDS#}</a> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=ftlist&Id={$smarty.request.Id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_FTEMPLATES#}</a> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=fieldsgroups&Id={$smarty.request.Id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_FGROUPS#}</a> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=template&Id={$smarty.request.Id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_TEMPLATES#}</a> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
{if check_permission('rubric_code')} |
||||||
|
<a class="button basicBtn topBtn" href="index.php?do=rubs&action=code&Id={$smarty.request.Id|escape}&cp={$sess}">{#RUBRIC_TABLE_BTN_CODE#}</a> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
</table> |
||||||
|
|
||||||
|
<div class="breadCrumbHolder module"> |
||||||
|
<div class="breadCrumb module"> |
||||||
|
<ul> |
||||||
|
<li class="firstB"> |
||||||
|
<a href="index.php" title="{#MAIN_PAGE#}">{#MAIN_PAGE#}</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<a href="index.php?do=rubs&cp={$sess}">{#RUBRIK_SUB_TITLE#}</a> |
||||||
|
</li> |
||||||
|
<li>{#RUBRIK_EDIT_FIELDS#}</li> |
||||||
|
<li><strong class="code">{$rubric->rubric_title}</strong></li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
{if check_permission('rubric_edit') && check_permission('rubric_perms')} |
||||||
|
<div class="widget first"> |
||||||
|
<div class="head"> |
||||||
|
<h5>{#RUBRIK_SET_PERMISSION#}</h5> |
||||||
|
</div> |
||||||
|
<div style="display: block;"> |
||||||
|
<form id="rubperm" action="index.php?do=rubs&action=rules&Id={$smarty.request.Id|escape}&submit=saveperms&cp={$sess}" method="post" class="mainForm"> |
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
||||||
|
<col width="16%"> |
||||||
|
<col width="12%"> |
||||||
|
<col width="12%"> |
||||||
|
<col width="12%"> |
||||||
|
<col width="12%"> |
||||||
|
<col width="12%"> |
||||||
|
<col width="12%"> |
||||||
|
<col width="12%"> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<td>{#RUBRIK_USER_GROUP#}</td> |
||||||
|
<td align="center"> |
||||||
|
{#RUBRIK_DOC_READ#} <a href="javascript:void(0);" class="topDir link" style="cursor: help;" title="{#RUBRIK_VIEW_TIP#}">[?]</a> |
||||||
|
</td> |
||||||
|
<td align="center"> |
||||||
|
{#RUBRIK_ALL_PERMISSION#} <a href="javascript:void(0);" class="topDir link" style="cursor: help;" title="{#RUBRIK_ALL_TIP#}">[?]</a> |
||||||
|
</td> |
||||||
|
<td align="center"> |
||||||
|
{#RUBRIK_CREATE_DOC#} <a href="javascript:void(0);" class="topDir link" style="cursor: help;" title="{#RUBRIK_DOC_TIP#}">[?]</a> |
||||||
|
</td> |
||||||
|
<td align="center"> |
||||||
|
{#RUBRIK_CREATE_DOC_NOW#} <a href="javascript:void(0);" class="topDir link" style="cursor: help;" title="{#RUBRIK_DOC_NOW_TIP#}">[?]</a> |
||||||
|
</td> |
||||||
|
<td align="center"> |
||||||
|
{#RUBRIK_EDIT_OWN#} <a href="javascript:void(0);" class="topDir link" style="cursor: help;" title="{#RUBRIK_OWN_TIP#}">[?]</a> |
||||||
|
</td> |
||||||
|
<td align="center"> |
||||||
|
{#RUBRIK_EDIT_OTHER#} <a href="javascript:void(0);" class="topleftDir link" style="cursor: help;" title="{#RUBRIK_OTHER_TIP#}">[?]</a> |
||||||
|
</td> |
||||||
|
<td align="center"> |
||||||
|
{#RUBRIK_EDIT_DELREV#} <a href="javascript:void(0);" class="topleftDir link" style="cursor: help;" title="{#RUBRIK_DELREV_TIP#}">[?]</a> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
{foreach from=$groups item=group} |
||||||
|
{assign var=doall value=$group->doall} |
||||||
|
<tr> |
||||||
|
<td>{$group->user_group_name|escape:html} </td> |
||||||
|
<td align="center" {if in_array('docread', $group->permissions) || in_array('alles', $group->permissions)} class="yellow"{/if}> |
||||||
|
{if $group->doall_h==1} |
||||||
|
<input type="hidden" name="perm[{$group->user_group}][]" value="docread" /> |
||||||
|
<input class="check_perm" name="perm[{$group->user_group}][]" type="checkbox" value="docread" checked="checked" disabled="disabled" /> |
||||||
|
{else} |
||||||
|
<input class="check_perm" name="perm[{$group->user_group}][]" type="checkbox" value="docread"{if in_array('docread', $group->permissions) || in_array('alles', $group->permissions)} checked="checked"{/if} /> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
<td align="center" {if in_array('alles', $group->permissions)} class="yellow"{/if}> |
||||||
|
{if $group->doall_h==1} |
||||||
|
<input type="hidden" name="perm[{$group->user_group}][]" value="alles" /> |
||||||
|
<input class="check_perm" name="perm[{$group->user_group}][]" type="checkbox" value="alles" checked="checked" disabled="disabled" /> |
||||||
|
{else} |
||||||
|
<input class="check_perm" name="perm[{$group->user_group}][]" type="checkbox" value="alles"{if in_array('alles', $group->permissions)} checked="checked"{/if}{if $group->user_group==2} disabled="disabled"{/if} /> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
<td align="center" {if in_array('new', $group->permissions) || in_array('alles', $group->permissions)} class="yellow"{/if}> |
||||||
|
<input type="hidden" name="user_group[{$group->user_group}]" value="{$group->user_group}" /> |
||||||
|
{if $group->doall_h==1} |
||||||
|
<input class="check_perm" name="{$group->user_group}" type="checkbox" value="1"{$doall} /> |
||||||
|
<input type="hidden" name="perm[{$group->user_group}][]" value="new" /> |
||||||
|
{else} |
||||||
|
<input class="check_perm new" id="new_{$group->user_group}" name="perm[{$group->user_group}][]" type="checkbox" value="new"{if in_array('new', $group->permissions) || in_array('alles', $group->permissions)} checked="checked"{/if}{if $group->user_group==2} disabled="disabled"{/if} /> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
<td align="center" {if in_array('newnow', $group->permissions) || in_array('alles', $group->permissions)} class="yellow"{/if}> |
||||||
|
<input type="hidden" name="user_group[{$group->user_group}]" value="{$group->user_group}" /> |
||||||
|
{if $group->doall_h==1} |
||||||
|
<input class="check_perm" name="{$group->user_group}" type="checkbox" value="1"{$doall} /> |
||||||
|
<input type="hidden" name="perm[{$group->user_group}][]" value="newnow" /> |
||||||
|
{else} |
||||||
|
<input class="check_perm newnow" id="newnow_{$group->user_group}" name="perm[{$group->user_group}][]" type="checkbox" value="newnow"{if in_array('newnow', $group->permissions) || in_array('alles', $group->permissions)} checked="checked"{/if}{if $group->user_group==2} disabled="disabled"{/if} /> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
<td align="center" {if in_array('editown', $group->permissions) || in_array('alles', $group->permissions)} class="yellow"{/if}> |
||||||
|
{if $group->doall_h==1} |
||||||
|
<input class="check_perm" name="{$group->user_group}" type="checkbox" value="1"{$doall} /> |
||||||
|
<input type="hidden" name="perm[{$group->user_group}][]" value="editown" /> |
||||||
|
{else} |
||||||
|
<input class="check_perm editown" id="editown_{$group->user_group}" data-id="{$group->user_group}" name="perm[{$group->user_group}][]" type="checkbox" value="editown"{if in_array('editown', $group->permissions) || in_array('alles', $group->permissions)} checked="checked"{/if}{if $group->user_group==2} disabled="disabled"{/if} /> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
<td align="center" {if in_array('editall', $group->permissions) || in_array('alles', $group->permissions)} class="yellow"{/if}> |
||||||
|
{if $group->doall_h==1} |
||||||
|
<input class="check_perm" name="{$group->user_group}" type="checkbox" value="1"{$doall} /> |
||||||
|
{else} |
||||||
|
<input class="check_perm editall" id="editall_{$group->user_group}" name="perm[{$group->user_group}][]" data-id="{$group->user_group}" type="checkbox" value="editall"{if in_array('editall', $group->permissions) || in_array('alles', $group->permissions)} checked="checked"{/if}{if $group->user_group==2} disabled="disabled"{/if} /> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
<td align="center" {if in_array('delrev', $group->permissions) || in_array('alles', $group->permissions)} class="yellow"{/if}> |
||||||
|
{if $group->doall_h==1} |
||||||
|
<input class="check_perm" name="{$group->user_group}" type="checkbox" value="1"{$doall} /> |
||||||
|
<input type="hidden" name="perm[{$group->user_group}][]" value="delrev" /> |
||||||
|
{else} |
||||||
|
<input class="check_perm" name="perm[{$group->user_group}][]" type="checkbox" value="delrev"{if in_array('delrev', $group->permissions) || in_array('alles', $group->permissions)} checked="checked"{/if}{if $group->user_group==2} disabled="disabled"{/if} /> |
||||||
|
{/if} |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
{/foreach} |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
|
<div class="rowElem"> |
||||||
|
<input type="submit" class="basicBtn" value="{#RUBRIK_BUTTON_PERM#}" /> |
||||||
|
|
||||||
|
<input type="submit" class="blackBtn SaveEditPerms" value="{#RUBRIK_BUTTON_TPL_NEXT#}" /> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{/if} |
||||||
|
|
||||||
|
<script language="javascript"> |
||||||
|
$(document).ready(function(){ldelim} |
||||||
|
|
||||||
|
{literal} |
||||||
|
|
||||||
|
$(document).on('change', '#selall', function(event) { |
||||||
|
event.preventDefault(); |
||||||
|
if ($('#selall').is(':checked')) { |
||||||
|
$('#FieldsList .checkbox').attr('checked','checked'); |
||||||
|
$('#FieldsList .checkbox').addClass('jqTransformChecked'); |
||||||
|
} else { |
||||||
|
$('#FieldsList .checkbox').removeClass('jqTransformChecked'); |
||||||
|
$('#FieldsList .checkbox').removeAttr('checked'); |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
$('.check_perm').on('change', function(event) { |
||||||
|
event.preventDefault(); |
||||||
|
if ($(this).is(':checked')) { |
||||||
|
$(this).parent().parent('td').addClass('yellow'); |
||||||
|
} else { |
||||||
|
$(this).parent().parent('td').removeClass('yellow'); |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
{/literal} |
||||||
|
|
||||||
|
Mousetrap.bind(['ctrl+s', 'command+s'], function(event) {ldelim} |
||||||
|
event.preventDefault(); |
||||||
|
$("#rubperm").ajaxSubmit({ldelim} |
||||||
|
url: 'index.php?do=rubs&action=rules&Id={$smarty.request.Id|escape}&submit=saveperms&cp={$sess}&ajax=1', |
||||||
|
dataType: 'json', |
||||||
|
beforeSubmit: function(){ldelim} |
||||||
|
$.alerts._overlay('show'); |
||||||
|
{rdelim}, |
||||||
|
success: function(data){ldelim} |
||||||
|
$.jGrowl(data['message'], {ldelim} |
||||||
|
header: data['header'], |
||||||
|
theme: data['theme'] |
||||||
|
{rdelim}); |
||||||
|
$.alerts._overlay('hide'); |
||||||
|
{rdelim} |
||||||
|
{rdelim}); |
||||||
|
return false; |
||||||
|
{rdelim}); |
||||||
|
|
||||||
|
$(".SaveEditPerms").click(function(event){ldelim} |
||||||
|
event.preventDefault(); |
||||||
|
$("#rubperm").ajaxSubmit({ldelim} |
||||||
|
url: 'index.php?do=rubs&action=rules&Id={$smarty.request.Id|escape}&submit=saveperms&cp={$sess}&ajax=1', |
||||||
|
dataType: 'json', |
||||||
|
beforeSubmit: function(){ldelim} |
||||||
|
$.alerts._overlay('show'); |
||||||
|
{rdelim}, |
||||||
|
success: function(data){ldelim} |
||||||
|
$.jGrowl(data['message'], {ldelim} |
||||||
|
header: data['header'], |
||||||
|
theme: data['theme'] |
||||||
|
{rdelim}); |
||||||
|
$.alerts._overlay('hide'); |
||||||
|
{rdelim} |
||||||
|
{rdelim}); |
||||||
|
return false; |
||||||
|
{rdelim}); |
||||||
|
|
||||||
|
|
||||||
|
{rdelim}); |
||||||
|
</script> |
@ -0,0 +1,78 @@ |
|||||||
|
<div class="title"> |
||||||
|
<h5>{#SETTINGS_FILE_EDIT_H#} {$file_name}</h5> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="widget"> |
||||||
|
<div class="title"> |
||||||
|
<h5>{#SETTINGS_FILE_CONTENT#} {$file_name}</h5> |
||||||
|
</div> |
||||||
|
|
||||||
|
<form id="code_form" method="post" action="{$formaction}" class="mainForm"> |
||||||
|
<div class="rowElem" style="padding: 0"> |
||||||
|
<textarea id="code_text" name="code_text">{$template|escape}</textarea> |
||||||
|
<div class="fix"></div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="rowElem"> |
||||||
|
<button type="submit" class="basicBtn">{#SETTINGS_BUTTON_SAVE#}</button> |
||||||
|
{#SETTINGS_OR#} |
||||||
|
<button class="blackBtn SaveEditFile">{#SETTINGS_BUTTON_SAVE_AJAX#}</button> |
||||||
|
<div class="fix"></div> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
|
||||||
|
</div> |
||||||
|
|
||||||
|
<script language="Javascript" type="text/javascript"> |
||||||
|
var sett_options = {ldelim} |
||||||
|
url: '{$formaction}', |
||||||
|
dataType: 'json', |
||||||
|
data: {ldelim} ajax: '1' {rdelim}, |
||||||
|
beforeSubmit: Request, |
||||||
|
success: Response |
||||||
|
{rdelim} |
||||||
|
|
||||||
|
function Request(){ldelim} |
||||||
|
$.alerts._overlay('show'); |
||||||
|
{rdelim} |
||||||
|
|
||||||
|
function Response(data){ldelim} |
||||||
|
$.alerts._overlay('hide'); |
||||||
|
$.jGrowl(data['message'], {ldelim} |
||||||
|
header: data['header'], |
||||||
|
theme: data['theme'] |
||||||
|
{rdelim}); |
||||||
|
{rdelim} |
||||||
|
|
||||||
|
$(document).ready(function(){ldelim} |
||||||
|
|
||||||
|
Mousetrap.bind(['ctrl+s', 'command+s'], function(e) {ldelim} |
||||||
|
if (e.preventDefault) {ldelim} |
||||||
|
e.preventDefault(); |
||||||
|
{rdelim} else {ldelim} |
||||||
|
// internet explorer |
||||||
|
e.returnValue = false; |
||||||
|
{rdelim} |
||||||
|
$("#code_form").ajaxSubmit(sett_options); |
||||||
|
return false; |
||||||
|
{rdelim}); |
||||||
|
|
||||||
|
$(".SaveEditFile").click(function(e){ldelim} |
||||||
|
if (e.preventDefault) {ldelim} |
||||||
|
e.preventDefault(); |
||||||
|
{rdelim} else {ldelim} |
||||||
|
// internet explorer |
||||||
|
e.returnValue = false; |
||||||
|
{rdelim} |
||||||
|
$("#code_form").ajaxSubmit(sett_options); |
||||||
|
return false; |
||||||
|
{rdelim}); |
||||||
|
|
||||||
|
{literal} |
||||||
|
setTimeout(function(){editorfile.refresh();}, 20); |
||||||
|
{/literal} |
||||||
|
|
||||||
|
{rdelim}); |
||||||
|
</script> |
||||||
|
|
||||||
|
{include file="$codemirror_editor" conn_id="file" textarea_id='code_text' ctrls='$("#code_form").ajaxSubmit(sett_options);' height=450} |
@ -1,96 +0,0 @@ |
|||||||
.cascad3 { |
|
||||||
position: relative; |
|
||||||
} |
|
||||||
|
|
||||||
.cascad3_item { |
|
||||||
display: inline-block; |
|
||||||
margin: 3px; |
|
||||||
width: 120px; |
|
||||||
height: 226px; |
|
||||||
background-color: rgba(255, 255, 255, 0.5); |
|
||||||
border: solid 1px #eaeaea; |
|
||||||
border-radius: 5px; |
|
||||||
-moz-border-radius: 5px; |
|
||||||
-webkit-border-radius: 5px; |
|
||||||
position: relative; |
|
||||||
text-align: center; |
|
||||||
} |
|
||||||
|
|
||||||
.cascad3_item:hover { |
|
||||||
background-color: rgba(255, 255, 255, 1.0); |
|
||||||
border: solid 1px rgba(234, 234, 234, 0.5); |
|
||||||
-webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.1); |
|
||||||
-moz-box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.1); |
|
||||||
box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.1); |
|
||||||
} |
|
||||||
|
|
||||||
.cascad3_item:hover > .header { |
|
||||||
background-color: rgba(210, 210, 210, 0.3); |
|
||||||
} |
|
||||||
|
|
||||||
.cascad3_item .header { |
|
||||||
background-color: rgba(210, 210, 210, 0.5); |
|
||||||
height: 26px; |
|
||||||
margin-bottom: 10px; |
|
||||||
cursor: move; |
|
||||||
border-radius: 5px 5px 0 0; |
|
||||||
} |
|
||||||
|
|
||||||
.cascad3_item .image { |
|
||||||
background-color: #fcfcfc; |
|
||||||
border: solid 1px #eaeaea; |
|
||||||
border-radius: 5px; |
|
||||||
-moz-border-radius: 5px; |
|
||||||
-webkit-border-radius: 5px; |
|
||||||
} |
|
||||||
|
|
||||||
.cascad3_item input { |
|
||||||
display: inline-block; |
|
||||||
width: 100px; |
|
||||||
margin-top: 5px; |
|
||||||
border-radius: 0 0 2px 2px; |
|
||||||
border: 1px solid #eaeaea !important; |
|
||||||
resize: none !important; |
|
||||||
box-shadow: none !important; |
|
||||||
-webkit-box-shadow: none !important; |
|
||||||
-moz-box-shadow: none !important; |
|
||||||
padding: 3px !important; |
|
||||||
box-sizing: border-box !important; |
|
||||||
-webkit-box-sizing: border-box !important; |
|
||||||
-moz-box-sizing: border-box !important; |
|
||||||
} |
|
||||||
|
|
||||||
.cascad3_item .view { |
|
||||||
position: absolute; |
|
||||||
top: 3px; |
|
||||||
left: 3px; |
|
||||||
cursor: pointer !important; |
|
||||||
} |
|
||||||
|
|
||||||
.cascad3_item .delete { |
|
||||||
position: absolute; |
|
||||||
top: 3px; |
|
||||||
right: 3px; |
|
||||||
cursor: pointer !important; |
|
||||||
} |
|
||||||
|
|
||||||
.cascad3_item .info { |
|
||||||
position: absolute; |
|
||||||
top: 30px; |
|
||||||
right: 3px; |
|
||||||
cursor: pointer !important; |
|
||||||
} |
|
||||||
|
|
||||||
.cascad3_sortable > .ui-state-highlight { |
|
||||||
display: inline-block; |
|
||||||
margin: 5px; |
|
||||||
width: 120px; |
|
||||||
height: 200px; |
|
||||||
background-color: rgba(255,255,255,0.5); !important; |
|
||||||
border: solid 1px #eaeaea; |
|
||||||
border-radius: 5px; |
|
||||||
-moz-border-radius: 5px; |
|
||||||
-webkit-border-radius: 5px; |
|
||||||
position: relative; |
|
||||||
text-align: center; |
|
||||||
} |
|
@ -1,307 +0,0 @@ |
|||||||
<?php |
|
||||||
|
|
||||||
/** |
|
||||||
* AVE.cms |
|
||||||
* |
|
||||||
* @package AVE.cms |
|
||||||
* @version 3.x |
|
||||||
* @filesource |
|
||||||
* @copyright © 2007-2014 AVE.cms, http://www.ave-cms.ru |
|
||||||
* |
|
||||||
* @license GPL v.2 |
|
||||||
*/ |
|
||||||
|
|
||||||
// Изображение (Каскад) |
|
||||||
function get_field_image_multi_new_3inputs($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null) |
|
||||||
{ |
|
||||||
|
|
||||||
global $AVE_Template, $img_pixel; |
|
||||||
|
|
||||||
$fld_dir = dirname(__FILE__) . '/'; |
|
||||||
$tpl_dir = $fld_dir . 'tpl/'; |
|
||||||
$fld_name = basename($fld_dir); |
|
||||||
|
|
||||||
$lang_file = $fld_dir . 'lang/' . (defined('ACP') ? $_SESSION['admin_language'] : $_SESSION['user_language']) . '.txt'; |
|
||||||
|
|
||||||
$AVE_Template->config_load($lang_file, 'lang'); |
|
||||||
$AVE_Template->assign('config_vars', $AVE_Template->get_config_vars()); |
|
||||||
$AVE_Template->config_load($lang_file, 'admin'); |
|
||||||
|
|
||||||
$res = 0; |
|
||||||
|
|
||||||
$iniset_count = ini_get('max_file_uploads'); |
|
||||||
|
|
||||||
switch ($action) |
|
||||||
{ |
|
||||||
case 'edit': |
|
||||||
|
|
||||||
$items = array(); |
|
||||||
$items = unserialize($field_value); |
|
||||||
$image_items = array(); |
|
||||||
|
|
||||||
if($items != false){ |
|
||||||
|
|
||||||
foreach($items as $k => $v){ |
|
||||||
$image_item = explode('|', $v); |
|
||||||
|
|
||||||
$image[$k]['url'] = $image_item[0]; |
|
||||||
$image[$k]['thumb'] = ($image_item[0] != '') ? make_thumbnail(array('size' => 'f100x100', 'link' => $image_item[0])) : $img_pixel; |
|
||||||
$image[$k]['desc'] = (isset($image_item[1])) ? htmlspecialchars($image_item[1], ENT_QUOTES) : ''; |
|
||||||
$image[$k]['desc2'] = (isset($image_item[2])) ? htmlspecialchars($image_item[2], ENT_QUOTES) : ''; |
|
||||||
$image[$k]['desc3'] = (isset($image_item[3])) ? htmlspecialchars($image_item[3], ENT_QUOTES) : ''; |
|
||||||
} |
|
||||||
|
|
||||||
if (!empty($image)) { |
|
||||||
$image_items = $image; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
$show_upload = true; |
|
||||||
|
|
||||||
if(preg_match("/%id/i", $default)) |
|
||||||
{ |
|
||||||
if ($_REQUEST['action'] != 'new') { |
|
||||||
$path_upload = trim(@str_replace('%id', $_REQUEST['Id'], $default), '/'); |
|
||||||
$show_upload = true; |
|
||||||
} else { |
|
||||||
$path_upload = (!empty($default)) ? trim($default, '/') : ''; |
|
||||||
$show_upload = false; |
|
||||||
} |
|
||||||
} |
|
||||||
else |
|
||||||
{ |
|
||||||
$path_upload = (!empty($default)) ? $default : ''; |
|
||||||
$show_upload = true; |
|
||||||
} |
|
||||||
|
|
||||||
$dir_upload = '/' . UPLOAD_DIR . '/' . ((!empty($path_upload)) ? $path_upload . '/' : ''); |
|
||||||
|
|
||||||
$tpl_file = get_field_tpl($tpl_dir, $field_id, 'admin'); |
|
||||||
|
|
||||||
$AVE_Template->assign('max_files', $AVE_Template->get_config_vars('max_f_f') . $iniset_count); |
|
||||||
$AVE_Template->assign('dir_upload', $AVE_Template->get_config_vars('upl_dir') . $dir_upload); |
|
||||||
$AVE_Template->assign('show_upload', $show_upload); |
|
||||||
|
|
||||||
$AVE_Template->assign('field_dir', $fld_name); |
|
||||||
$AVE_Template->assign('images', $image_items); |
|
||||||
$AVE_Template->assign('field_id', $field_id); |
|
||||||
$AVE_Template->assign('doc_id', (int)$_REQUEST['Id']); |
|
||||||
return $AVE_Template->fetch($tpl_file); |
|
||||||
break; |
|
||||||
|
|
||||||
case 'doc': |
|
||||||
|
|
||||||
$items = (isset($field_value)) ? unserialize($field_value) : array(); |
|
||||||
|
|
||||||
$res = array(); |
|
||||||
|
|
||||||
if($items != false){ |
|
||||||
foreach($items as $image_item) |
|
||||||
{ |
|
||||||
$image_item = clean_php($image_item); |
|
||||||
$field_param = explode('|', $image_item); |
|
||||||
if($image_item){ |
|
||||||
if ($tpl_empty) |
|
||||||
{ |
|
||||||
$image_item = $field_param; |
|
||||||
} |
|
||||||
else |
|
||||||
{ |
|
||||||
$image_item = preg_replace_callback( |
|
||||||
'/\[tag:parametr:(\d+)\]/i', |
|
||||||
function($data) use($field_param) |
|
||||||
{ |
|
||||||
return $field_param[(int)$data[1]]; |
|
||||||
}, |
|
||||||
$tpl |
|
||||||
); |
|
||||||
|
|
||||||
$image_item = preg_replace_callback( |
|
||||||
'/\[tag:watermark:(.+?):([a-zA-Z]+):([0-9]+)\]/', |
|
||||||
create_function( |
|
||||||
'$m', |
|
||||||
'return watermarks(\'$m[1]\', \'$m[2]\', $m[3]);' |
|
||||||
), |
|
||||||
$image_item |
|
||||||
); |
|
||||||
|
|
||||||
$image_item = preg_replace_callback('/\[tag:([r|c|f|t|s]\d+x\d+r*):(.+?)]/', 'callback_make_thumbnail', $image_item); |
|
||||||
} |
|
||||||
} |
|
||||||
$res[] = $image_item; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
$tpl_file = get_field_tpl($tpl_dir, $field_id, 'doc'); |
|
||||||
|
|
||||||
if($tpl_empty && $tpl_file){ |
|
||||||
|
|
||||||
$AVE_Template->assign('field_id', $field_id); |
|
||||||
$AVE_Template->assign('field_value', $res); |
|
||||||
$AVE_Template->assign('field_count', count($res)); |
|
||||||
$AVE_Template->assign('rubric_id', $rubric_id); |
|
||||||
$AVE_Template->assign('default', $default); |
|
||||||
|
|
||||||
return $AVE_Template->fetch($tpl_file); |
|
||||||
} |
|
||||||
return (!empty($res)) ? implode(PHP_EOL, $res) : $tpl; |
|
||||||
break; |
|
||||||
|
|
||||||
case 'req': |
|
||||||
$items = unserialize($field_value); |
|
||||||
|
|
||||||
$res = ''; |
|
||||||
|
|
||||||
if($items != false) { |
|
||||||
foreach($items as $image_item) |
|
||||||
{ |
|
||||||
$image_item = clean_php($image_item); |
|
||||||
$field_param = explode('|', $image_item); |
|
||||||
if($image_item){ |
|
||||||
if ($tpl_empty) |
|
||||||
{ |
|
||||||
$image_item = $field_param; |
|
||||||
} |
|
||||||
else |
|
||||||
{ |
|
||||||
$image_item = preg_replace_callback( |
|
||||||
'/\[tag:parametr:(\d+)\]/i', |
|
||||||
function($data) use($field_param) |
|
||||||
{ |
|
||||||
return $field_param[(int)$data[1]]; |
|
||||||
}, |
|
||||||
$tpl |
|
||||||
); |
|
||||||
|
|
||||||
$image_item = preg_replace_callback( |
|
||||||
'/\[tag:watermark:(.+?):([a-zA-Z]+):([0-9]+)\]/', |
|
||||||
create_function( |
|
||||||
'$m', |
|
||||||
'return watermarks(\'$m[1]\', \'$m[2]\', $m[3]);' |
|
||||||
), |
|
||||||
$image_item |
|
||||||
); |
|
||||||
|
|
||||||
$image_item = preg_replace_callback('/\[tag:([r|c|f]\d+x\d+r*):(.+?)]/', 'callback_make_thumbnail', $image_item); |
|
||||||
} |
|
||||||
} |
|
||||||
$res[] = $image_item; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
$tpl_file = get_field_tpl($tpl_dir, $field_id, 'req'); |
|
||||||
|
|
||||||
if($tpl_empty && $tpl_file){ |
|
||||||
|
|
||||||
$AVE_Template->assign('field_id', $field_id); |
|
||||||
$AVE_Template->assign('field_value', $res); |
|
||||||
$AVE_Template->assign('field_count', count($res)); |
|
||||||
$AVE_Template->assign('rubric_id', $rubric_id); |
|
||||||
$AVE_Template->assign('default', $default); |
|
||||||
|
|
||||||
return $AVE_Template->fetch($tpl_file); |
|
||||||
} |
|
||||||
|
|
||||||
return (!empty($res)) ? implode(PHP_EOL, $res) : $tpl; |
|
||||||
break; |
|
||||||
|
|
||||||
case 'save': |
|
||||||
foreach ($field_value as $v) |
|
||||||
{ |
|
||||||
if(!empty($v['url'])){ |
|
||||||
$field_value_new[] = $v['url'] . '|' . $v['descr'] . '|' . $v['descr2'] . '|' . $v['descr3']; |
|
||||||
} |
|
||||||
} |
|
||||||
if (isset($field_value_new)) { |
|
||||||
return @serialize($field_value_new); |
|
||||||
} else { |
|
||||||
return $field_value_new = ''; |
|
||||||
} |
|
||||||
|
|
||||||
break; |
|
||||||
|
|
||||||
case 'name' : |
|
||||||
return $AVE_Template->get_config_vars('name'); |
|
||||||
break; |
|
||||||
|
|
||||||
case 'upload': |
|
||||||
$error = false; |
|
||||||
|
|
||||||
$files_unput = 'cascad3_files'.'_'.$_REQUEST['field_id'].'_'.$_REQUEST['doc_id']; |
|
||||||
|
|
||||||
if(preg_match("/%id/i", $default)) |
|
||||||
{ |
|
||||||
$path = trim(@str_replace('%id', $_REQUEST['doc_id'], $default), '/'); |
|
||||||
} |
|
||||||
else |
|
||||||
{ |
|
||||||
$path = (!empty($default)) ? $default : ''; |
|
||||||
} |
|
||||||
|
|
||||||
function getExtension($file) |
|
||||||
{ |
|
||||||
$file = pathinfo($file); |
|
||||||
return $file['extension']; |
|
||||||
} |
|
||||||
|
|
||||||
$valid_formats = array("jpg", "png", "gif", "bmp","jpeg"); |
|
||||||
|
|
||||||
$dir = '/' . UPLOAD_DIR . '/' . ((!empty($path)) ? $path . '/' : ''); |
|
||||||
$dir_abs = BASE_DIR . $dir; |
|
||||||
|
|
||||||
if (!is_dir($dir_abs)) @mkdir($dir_abs, 0777, true); |
|
||||||
|
|
||||||
foreach ($_FILES[$files_unput]['name'] as $name => $value) { |
|
||||||
|
|
||||||
$filename = strtolower(stripslashes(prepare_url($_FILES[$files_unput]['name'][$name]))); |
|
||||||
//$size = filesize($_FILES[$files_unput]['tmp_name'][$name]); |
|
||||||
|
|
||||||
$ext = getExtension($filename); |
|
||||||
$ext = strtolower($ext); |
|
||||||
|
|
||||||
if(in_array($ext, $valid_formats)) |
|
||||||
{ |
|
||||||
if (file_exists($dir_abs . $filename)) |
|
||||||
{ |
|
||||||
$filename = rand(1000, 9999) . '_' . $filename; |
|
||||||
} |
|
||||||
|
|
||||||
if (@move_uploaded_file($_FILES[$files_unput]['tmp_name'][$name], $dir_abs . $filename)) { |
|
||||||
$new_files[] = $filename; |
|
||||||
$error = false; |
|
||||||
} else { |
|
||||||
$error = true; |
|
||||||
} |
|
||||||
} |
|
||||||
else |
|
||||||
{ |
|
||||||
$error = true; |
|
||||||
@unlink($_FILES[$files_unput]['tmp_name'][$name]); |
|
||||||
} |
|
||||||
} |
|
||||||
if ($error !== true) { |
|
||||||
echo json_encode(array( |
|
||||||
'files' => $new_files, |
|
||||||
'dir' => $dir, |
|
||||||
'respons' => 'succes', |
|
||||||
'message' => $AVE_Template->get_config_vars('resp_s_m'), |
|
||||||
'header' => $AVE_Template->get_config_vars('resp_s_h'), |
|
||||||
'theme' => 'accept' |
|
||||||
) |
|
||||||
); |
|
||||||
} |
|
||||||
else |
|
||||||
{ |
|
||||||
echo json_encode(array( |
|
||||||
'respons' => 'error', |
|
||||||
'message' => $AVE_Template->get_config_vars('resp_e_m'), |
|
||||||
'header' => $AVE_Template->get_config_vars('resp_e_h'), |
|
||||||
'theme' => 'error' |
|
||||||
) |
|
||||||
); |
|
||||||
} |
|
||||||
exit; |
|
||||||
} |
|
||||||
|
|
||||||
return ($res ? $res : $field_value); |
|
||||||
} |
|
@ -1,235 +0,0 @@ |
|||||||
var Cascad3 = { |
|
||||||
|
|
||||||
init: false, |
|
||||||
|
|
||||||
init: function() { |
|
||||||
if (this.initialized) return; |
|
||||||
this.initialized = true; |
|
||||||
|
|
||||||
this.cascad3(); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3: function() { |
|
||||||
this.cascad3_sortable(); |
|
||||||
this.cascad3_del_item(); |
|
||||||
this.cascad3_del_all_item(); |
|
||||||
this.cascad3_add_single(); |
|
||||||
this.cascad3_add_folder(); |
|
||||||
this.cascad3_upload_files(); |
|
||||||
this.cascad3_click_upload(); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_update: function() { |
|
||||||
this.cascad3_maxid(); |
|
||||||
this.cascad3_del_item(); |
|
||||||
AveAdmin.fancy_box(); |
|
||||||
AveAdmin.tooltip(); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_maxid: function(id, doc) { |
|
||||||
var maxid = 1; |
|
||||||
$('#cascad3_' + doc + '_' + id).children('.cascad3_sortable').children('.cascad3_item').each(function() { |
|
||||||
maxid = Math.max(maxid, parseInt($(this).attr("data-id")) + 1); |
|
||||||
}); |
|
||||||
return maxid; |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_del_item: function() { |
|
||||||
$('.cascad3_item .delete').on('click', function(event) { |
|
||||||
event.preventDefault(); |
|
||||||
var id = $(this).attr('data-id'); |
|
||||||
jConfirm( |
|
||||||
del_conf, |
|
||||||
del_head, |
|
||||||
function(b) { |
|
||||||
if (b) { |
|
||||||
$('#cascad3_image_' + id).remove(); |
|
||||||
} |
|
||||||
} |
|
||||||
); |
|
||||||
}); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_del_all_item: function() { |
|
||||||
$('.cascad3_del_all').on('click', function(event) { |
|
||||||
event.preventDefault(); |
|
||||||
var c_id = $(this).parent().parent().parent('.cascad3').attr("data-id"); |
|
||||||
var d_id = $(this).parent().parent().parent('.cascad3').attr("data-doc"); |
|
||||||
jConfirm( |
|
||||||
del_all_c, |
|
||||||
del_all_h, |
|
||||||
function(b) { |
|
||||||
if (b) { |
|
||||||
$('#cascad3_' + d_id + '_' + c_id).children('.cascad3_sortable').children('.cascad3_item').each(function() { |
|
||||||
$(this).remove(); |
|
||||||
}); |
|
||||||
} |
|
||||||
} |
|
||||||
); |
|
||||||
}); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_upload_files: function() { |
|
||||||
$('.cascad3_upload').on('change', function(event) { |
|
||||||
|
|
||||||
var cascad3_input = $(this); |
|
||||||
|
|
||||||
event.preventDefault(); |
|
||||||
|
|
||||||
if (cascad3_input.val() == '') { |
|
||||||
return false; |
|
||||||
} |
|
||||||
|
|
||||||
var files_input = this.files.length; |
|
||||||
var max_files = cascad3_input.attr("data-max-files"); |
|
||||||
|
|
||||||
if (files_input > max_files) { |
|
||||||
$.jGrowl(max_f_t, { |
|
||||||
header: max_f_h, |
|
||||||
theme: 'error' |
|
||||||
}); |
|
||||||
|
|
||||||
cascad3_input.replaceWith(cascad3_input.val('').clone(true)); |
|
||||||
|
|
||||||
return false; |
|
||||||
} |
|
||||||
|
|
||||||
var cid = $(this).parent('.cascad3').attr("data-id"); |
|
||||||
var did = $(this).parent('.cascad3').attr("data-doc"); |
|
||||||
var rid = $(this).parent('.cascad3').attr("data-rubric"); |
|
||||||
|
|
||||||
$('#formDoc').ajaxSubmit({ |
|
||||||
url: 'index.php?do=fields', |
|
||||||
data: { |
|
||||||
"field_id": cid, |
|
||||||
"rubric_id": rid, |
|
||||||
"doc_id": did, |
|
||||||
"field": 'image_multi_new_3inputs', |
|
||||||
"type": 'upload' |
|
||||||
}, |
|
||||||
beforeSend: function() { |
|
||||||
$.alerts._overlay('show'); |
|
||||||
}, |
|
||||||
dataType: "json", |
|
||||||
success: function(data) { |
|
||||||
if (data['respons'] == 'succes') { |
|
||||||
for (var p = 0, max = data.files.length; p < max; p++) { |
|
||||||
iid = Cascad3.cascad3_maxid(cid, did); |
|
||||||
var field_value = data['dir'] + data.files[p]; |
|
||||||
var img_path = '../index.php?thumb=' + field_value + '&mode=f&width=128&height=128'; |
|
||||||
$('#cascad3_' + did + '_' + cid + ' > .cascad3_sortable:last').prepend( |
|
||||||
'<div class="cascad3_item ui-state-default" id="cascad3_image_' + cid + '_' + did + '_' + iid + '" data-id="' + iid + '" doc=id="' + did + '">' + |
|
||||||
'<div class="header grey_bg"></div>' + |
|
||||||
'<a class="topDir icon_sprite ico_photo view fancy preview__' + cid + '_' + did + '_' + iid + '" href="' + field_value + '" title="' + look + '"></a>' + |
|
||||||
'<a class="topDir icon_sprite ico_delete delete" href="javascript:void(0);" title="' + del + '" data-id="' + cid + '_' + did + '_' + iid + '"></a>' + |
|
||||||
'<span class="topDir icon_sprite ico_info info" title="' + field_value + '"></span>' + |
|
||||||
'<input type="hidden" value="' + field_value + '" name="feld[' + cid + '][' + iid + '][url]" id="image__' + cid + '_' + did + '_' + iid + '">' + |
|
||||||
'<img id="preview__' + cid + '_' + did + '_' + iid + '" src="' + img_path + '" onclick="browse_uploads(\'image__' + cid + '_' + did + '_' + iid + '\');" class="image" alt="" width="100" height="100" />' + |
|
||||||
'<input class="mousetrap" name="feld[' + cid + '][' + iid + '][descr]" placeholder="' + place + ' 1" value = ""/>' + |
|
||||||
'<input class="mousetrap" name="feld[' + cid + '][' + iid + '][descr2]" placeholder="' + place + ' 2" value = ""/>' + |
|
||||||
'<input class="mousetrap" name="feld[' + cid + '][' + iid + '][descr3]" placeholder="' + place + ' 3" value = ""/>' + |
|
||||||
'</div>' |
|
||||||
); |
|
||||||
$.alerts._overlay('hide'); |
|
||||||
Cascad3.cascad3_update(); |
|
||||||
} |
|
||||||
} |
|
||||||
$.jGrowl(data['message'], { |
|
||||||
header: data['header'], |
|
||||||
theme: data['theme'] |
|
||||||
}); |
|
||||||
cascad3_input.replaceWith(cascad3_input = cascad3_input.clone(true)); |
|
||||||
cascad3_input.val(); |
|
||||||
} |
|
||||||
}); |
|
||||||
return false; |
|
||||||
}); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_click_upload: function() { |
|
||||||
$('.cascad3_upload_local').on('click', function(event) { |
|
||||||
event.preventDefault(); |
|
||||||
var c_id = $(this).parent().parent().parent('.cascad3').attr("data-id"); |
|
||||||
var d_id = $(this).parent().parent().parent('.cascad3').attr("data-doc"); |
|
||||||
$('.cascad3_upload_field_' + c_id + '_' + d_id).trigger('click'); |
|
||||||
}); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_add_single: function() { |
|
||||||
$('.cascad3_add_single').on('click', function(event) { |
|
||||||
event.preventDefault(); |
|
||||||
var c_id = $(this).parent().parent().parent('.cascad3').attr("data-id"); |
|
||||||
var d_id = $(this).parent().parent().parent('.cascad3').attr("data-doc"); |
|
||||||
var iid = Cascad3.cascad3_maxid(c_id, d_id); |
|
||||||
$('#cascad3_' + d_id + '_' + c_id + ' > .cascad3_sortable:last').prepend( |
|
||||||
'<div class="cascad3_item ui-state-default" id="cascad3_image_' + c_id + '_' + d_id + '_' + iid + '" data-id="' + iid + '" data-doc="' + d_id + '">' + |
|
||||||
'<div class="header grey_bg"></div>' + |
|
||||||
'<a class="topDir icon_sprite ico_photo view fancy preview__' + c_id + '_' + d_id + '_' + iid + '" href="" title="' + look + '"></a>' + |
|
||||||
'<a class="topDir icon_sprite ico_delete delete" href="javascript:void(0);" title="' + del + '" data-id="' + c_id + '_' + d_id + '_' + iid + '"></a>' + |
|
||||||
'<input type="hidden" value="" name="feld[' + c_id + '][' + iid + '][url]" id="image__' + c_id + '_' + d_id + '_' + iid + '">' + |
|
||||||
'<img id="preview__' + c_id + '_' + d_id + '_' + iid + '" src="' + blank + '" onclick="browse_uploads(\'image__' + c_id + '_' + d_id + '_' + iid + '\');" class="image" alt="" width="100" height="100" />' + |
|
||||||
'<input class="mousetrap" name="feld[' + c_id + '][' + iid + '][descr]" placeholder="' + place + ' 1" value = ""/>' + |
|
||||||
'<input class="mousetrap" name="feld[' + c_id + '][' + iid + '][descr2]" placeholder="' + place + ' 2" value = ""/>' + |
|
||||||
'<input class="mousetrap" name="feld[' + c_id + '][' + iid + '][descr3]" placeholder="' + place + ' 3" value = ""/>' + |
|
||||||
'</div>' |
|
||||||
); |
|
||||||
browse_uploads('image__' + c_id + '_' + d_id + '_' + iid + ''); |
|
||||||
Cascad3.cascad3_update(); |
|
||||||
}); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_sortable: function() { |
|
||||||
$('.cascad3_sortable').sortable({ |
|
||||||
handle: ".header", |
|
||||||
placeholder: "ui-state-highlight grey_bg" |
|
||||||
}); |
|
||||||
//$(".cascad3").disableSelection();
|
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_add_folder: function() { |
|
||||||
$('.cascad3_add_folder').on('click', function(event) { |
|
||||||
event.preventDefault(); |
|
||||||
var c_id = $(this).parent().parent().parent('.cascad3').attr("data-id"); |
|
||||||
var d_id = $(this).parent().parent().parent('.cascad3').attr("data-doc"); |
|
||||||
browse_dirs("cascad3__" + c_id + '_' + d_id); |
|
||||||
}); |
|
||||||
} |
|
||||||
}; |
|
||||||
|
|
||||||
$(document).ready(function() { |
|
||||||
Cascad3.init(); |
|
||||||
|
|
||||||
$.fn.myPlugin = function cascad3_add_items(dir, cid, did) { |
|
||||||
|
|
||||||
$.ajax({ |
|
||||||
url: ave_path + 'admin/index.php?do=docs&action=image_import&ajax=run', |
|
||||||
data: { |
|
||||||
"path": dir |
|
||||||
}, |
|
||||||
dataType: "json", |
|
||||||
success: function(data) { |
|
||||||
$.alerts._overlay('hide'); |
|
||||||
for (var p = 0, max = data.respons.length; p < max; p++) { |
|
||||||
var iid = Cascad3.cascad3_maxid(cid, did); |
|
||||||
var field_value = dir + data.respons[p]; |
|
||||||
var img_path = '../index.php?thumb=' + field_value + '&mode=f&width=128&height=128'; |
|
||||||
$('#cascad3_' + did + '_' + cid + ' > .cascad3_sortable:last').prepend( |
|
||||||
'<div class="cascad3_item ui-state-default" id="cascad3_image_' + cid + '_' + did + '_' + iid + '" data-id="' + iid + '" doc=id="' + did + '">' + |
|
||||||
'<div class="header grey_bg"></div>' + |
|
||||||
'<a class="topDir icon_sprite ico_photo view fancy preview__' + cid + '_' + did + '_' + iid + '" href="' + field_value + '" title="' + look + '"></a>' + |
|
||||||
'<a class="topDir icon_sprite ico_delete delete" href="javascript:void(0);" title="' + del + '" data-id="' + cid + '_' + did + '_' + iid + '"></a>' + |
|
||||||
'<span class="topDir icon_sprite ico_info info" title="' + field_value + '"></span>' + |
|
||||||
'<input type="hidden" value="' + field_value + '" name="feld[' + cid + '][' + iid + '][url]" id="image__' + cid + '_' + did + '_' + iid + '">' + |
|
||||||
'<img id="preview__' + cid + '_' + did + '_' + iid + '" src="' + img_path + '" onclick="browse_uploads(\'image__' + cid + '_' + did + '_' + iid + '\');" class="image" alt="" width="100" height="100" />' + |
|
||||||
'<input class="mousetrap" name="feld[' + cid + '][' + iid + '][descr]" placeholder="' + place + ' 1" value = ""/>' + |
|
||||||
'<input class="mousetrap" name="feld[' + cid + '][' + iid + '][descr2]" placeholder="' + place + ' 2" value = ""/>' + |
|
||||||
'<input class="mousetrap" name="feld[' + cid + '][' + iid + '][descr3]" placeholder="' + place + ' 3" value = ""/>' + |
|
||||||
'</div>' |
|
||||||
); |
|
||||||
Cascad3.cascad3_update(); |
|
||||||
} |
|
||||||
} |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
}); |
|
@ -1,231 +0,0 @@ |
|||||||
var Cascad3 = { |
|
||||||
|
|
||||||
init: false, |
|
||||||
|
|
||||||
init: function() { |
|
||||||
if (this.initialized) return; |
|
||||||
this.initialized = true; |
|
||||||
|
|
||||||
this.cascad3(); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3: function() { |
|
||||||
this.cascad3_sortable(); |
|
||||||
this.cascad3_del_item(); |
|
||||||
this.cascad3_del_all_item(); |
|
||||||
this.cascad3_add_single(); |
|
||||||
this.cascad3_add_folder(); |
|
||||||
this.cascad3_upload_files(); |
|
||||||
this.cascad3_click_upload(); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_update: function() { |
|
||||||
this.cascad3_maxid(); |
|
||||||
this.cascad3_del_item(); |
|
||||||
AveAdmin.fancy_box(); |
|
||||||
AveAdmin.tooltip(); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_maxid: function(id, doc) { |
|
||||||
var maxid = 1; |
|
||||||
$('#cascad3_' + doc + '_' + id).children('.cascad3_sortable').children('.cascad3_item').each(function() { |
|
||||||
maxid = Math.max(maxid, parseInt($(this).attr("data-id")) + 1); |
|
||||||
}); |
|
||||||
return maxid; |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_del_item: function() { |
|
||||||
$('.cascad3_item .delete').on('click', function(event) { |
|
||||||
event.preventDefault(); |
|
||||||
var id = $(this).attr('data-id'); |
|
||||||
jConfirm( |
|
||||||
del_conf, |
|
||||||
del_head, |
|
||||||
function(b) { |
|
||||||
if (b) { |
|
||||||
$('#cascad3_image_' + id).remove(); |
|
||||||
} |
|
||||||
} |
|
||||||
); |
|
||||||
}); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_del_all_item: function() { |
|
||||||
$('.cascad3_del_all').on('click', function(event) { |
|
||||||
event.preventDefault(); |
|
||||||
var c_id = $(this).parent().parent().parent('.cascad3').attr("data-id"); |
|
||||||
var d_id = $(this).parent().parent().parent('.cascad3').attr("data-doc"); |
|
||||||
jConfirm( |
|
||||||
del_all_c, |
|
||||||
del_all_h, |
|
||||||
function(b) { |
|
||||||
if (b) { |
|
||||||
$('#cascad3_' + d_id + '_' + c_id).children('.cascad3_sortable').children('.cascad3_item').each(function() { |
|
||||||
$(this).remove(); |
|
||||||
}); |
|
||||||
} |
|
||||||
} |
|
||||||
); |
|
||||||
}); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_upload_files: function() { |
|
||||||
$('.cascad3_upload').on('change', function(event) { |
|
||||||
|
|
||||||
event.preventDefault(); |
|
||||||
|
|
||||||
var cascad3_input = $(this); |
|
||||||
|
|
||||||
event.preventDefault(); |
|
||||||
|
|
||||||
if (cascad3_input.val() == '') { |
|
||||||
return false; |
|
||||||
} |
|
||||||
|
|
||||||
var files_input = this.files.length; |
|
||||||
var max_files = cascad3_input.attr("data-max-files"); |
|
||||||
|
|
||||||
if (files_input > max_files) { |
|
||||||
$.jGrowl(max_f_t, { |
|
||||||
header: max_f_h, |
|
||||||
theme: 'error' |
|
||||||
}); |
|
||||||
|
|
||||||
cascad3_input.replaceWith(cascad3_input.val('').clone(true)); |
|
||||||
|
|
||||||
return false; |
|
||||||
} |
|
||||||
|
|
||||||
var cid = $(this).parent('.cascad3').attr("data-id"); |
|
||||||
var did = $(this).parent('.cascad3').attr("data-doc"); |
|
||||||
var rid = $(this).parent('.cascad3').attr("data-rubric"); |
|
||||||
|
|
||||||
$('#docmanager_edit').ajaxSubmit({ |
|
||||||
url: 'index.php?do=fields', |
|
||||||
data: { |
|
||||||
"field_id": cid, |
|
||||||
"rubric_id": rid, |
|
||||||
"doc_id": did, |
|
||||||
"field": 'image_multi_new_3inputs', |
|
||||||
"type": 'upload' |
|
||||||
}, |
|
||||||
beforeSend: function() { |
|
||||||
$.alerts._overlay('show'); |
|
||||||
}, |
|
||||||
dataType: "json", |
|
||||||
success: function(data) { |
|
||||||
if (data['respons'] == 'succes') { |
|
||||||
for (var p = 0, max = data.files.length; p < max; p++) { |
|
||||||
iid = Cascad3.cascad3_maxid(cid, did); |
|
||||||
var field_value = data['dir'] + data.files[p]; |
|
||||||
var img_path = '../index.php?thumb=' + field_value + '&mode=f&width=128&height=128'; |
|
||||||
$('#cascad3_' + did + '_' + cid + ' > .cascad3_sortable:last').prepend( |
|
||||||
'<div class="cascad3_item ui-state-default" id="cascad3_image_' + cid + '_' + did + '_' + iid + '" data-id="' + iid + '" doc=id="' + did + '">' + |
|
||||||
'<div class="header grey_bg"></div>' + |
|
||||||
'<a class="topDir icon_sprite ico_photo view fancy preview__' + cid + '_' + did + '_' + iid + '" href="' + field_value + '" title="' + look + '"></a>' + |
|
||||||
'<a class="topDir icon_sprite ico_delete delete" href="javascript:void(0);" title="' + del + '" data-id="' + cid + '_' + did + '_' + iid + '"></a>' + |
|
||||||
'<span class="topDir icon_sprite ico_info info" title="' + field_value + '"></span>' + |
|
||||||
'<input type="hidden" value="' + field_value + '" name="data[' + did + '][feld][' + cid + '][' + iid + '][url]" id="image__' + cid + '_' + did + '_' + iid + '">' + |
|
||||||
'<img id="preview__' + cid + '_' + did + '_' + iid + '" src="' + img_path + '" onclick="browse_uploads(\'image__' + cid + '_' + did + '_' + iid + '\');" class="image" alt="" width="100" height="100" />' + |
|
||||||
'<textarea class="mousetrap" name="data[' + did + '][feld][' + cid + '][' + iid + '][descr]" placeholder="' + place + '"></textarea>' + |
|
||||||
'</div>' |
|
||||||
); |
|
||||||
$.alerts._overlay('hide'); |
|
||||||
Cascad3.cascad3_update(); |
|
||||||
} |
|
||||||
} |
|
||||||
$.jGrowl(data['message'], { |
|
||||||
header: data['header'], |
|
||||||
theme: data['theme'] |
|
||||||
}); |
|
||||||
cascad3_input.replaceWith(cascad3_input = cascad3_input.clone(true)); |
|
||||||
cascad3_input.val(); |
|
||||||
} |
|
||||||
}); |
|
||||||
return false; |
|
||||||
}); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_click_upload: function() { |
|
||||||
$('.cascad3_upload_local').on('click', function(event) { |
|
||||||
event.preventDefault(); |
|
||||||
var c_id = $(this).parent().parent().parent('.cascad3').attr("data-id"); |
|
||||||
var d_id = $(this).parent().parent().parent('.cascad3').attr("data-doc"); |
|
||||||
$('.cascad3_upload_field_' + c_id + '_' + d_id).trigger('click'); |
|
||||||
}); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_add_single: function() { |
|
||||||
$('.cascad3_add_single').on('click', function(event) { |
|
||||||
event.preventDefault(); |
|
||||||
var c_id = $(this).parent().parent().parent('.cascad3').attr("data-id"); |
|
||||||
var d_id = $(this).parent().parent().parent('.cascad3').attr("data-doc"); |
|
||||||
var iid = Cascad3.cascad3_maxid(c_id, d_id); |
|
||||||
$('#cascad3_' + d_id + '_' + c_id + ' > .cascad3_sortable:last').prepend( |
|
||||||
'<div class="cascad3_item ui-state-default" id="cascad3_image_' + c_id + '_' + d_id + '_' + iid + '" data-id="' + iid + '" data-doc="' + d_id + '">' + |
|
||||||
'<div class="header grey_bg"></div>' + |
|
||||||
'<a class="topDir icon_sprite ico_photo view fancy preview__' + c_id + '_' + d_id + '_' + iid + '" href="" title="' + look + '"></a>' + |
|
||||||
'<a class="topDir icon_sprite ico_delete delete" href="javascript:void(0);" title="' + del + '" data-id="' + c_id + '_' + d_id + '_' + iid + '"></a>' + |
|
||||||
'<input type="hidden" value="" name="data[' + d_id + '][feld][' + c_id + '][' + iid + '][url]" id="image__' + c_id + '_' + d_id + '_' + iid + '">' + |
|
||||||
'<img id="preview__' + c_id + '_' + d_id + '_' + iid + '" src="' + blank + '" onclick="browse_uploads(\'image__' + c_id + '_' + d_id + '_' + iid + '\');" class="image" alt="" width="100" height="100" />' + |
|
||||||
'<textarea class="mousetrap" name="data[' + d_id + '][feld][' + c_id + '][' + iid + '][descr]" placeholder="' + place + '"></textarea>' + |
|
||||||
'</div>' |
|
||||||
); |
|
||||||
browse_uploads('image__' + c_id + '_' + d_id + '_' + iid + ''); |
|
||||||
Cascad3.cascad3_update(); |
|
||||||
}); |
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_sortable: function() { |
|
||||||
$('.cascad3_sortable').sortable({ |
|
||||||
handle: ".header", |
|
||||||
placeholder: "ui-state-highlight grey_bg" |
|
||||||
}); |
|
||||||
//$(".cascad3").disableSelection();
|
|
||||||
}, |
|
||||||
|
|
||||||
cascad3_add_folder: function() { |
|
||||||
$('.cascad3_add_folder').on('click', function(event) { |
|
||||||
event.preventDefault(); |
|
||||||
var c_id = $(this).parent().parent().parent('.cascad3').attr("data-id"); |
|
||||||
var d_id = $(this).parent().parent().parent('.cascad3').attr("data-doc"); |
|
||||||
browse_dirs("cascad3__" + c_id + '_' + d_id); |
|
||||||
}); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
$(document).ready(function() { |
|
||||||
Cascad3.init(); |
|
||||||
|
|
||||||
$.fn.myPlugin = function cascad3_add_items(dir, cid, did) { |
|
||||||
|
|
||||||
$.ajax({ |
|
||||||
url: ave_path + 'admin/index.php?do=docs&action=image_import&ajax=run', |
|
||||||
data: { |
|
||||||
"path": dir |
|
||||||
}, |
|
||||||
dataType: "json", |
|
||||||
success: function(data) { |
|
||||||
$.alerts._overlay('hide'); |
|
||||||
for (var p = 0, max = data.respons.length; p < max; p++) { |
|
||||||
var iid = Cascad3.cascad3_maxid(cid, did); |
|
||||||
var field_value = dir + data.respons[p]; |
|
||||||
var img_path = '../index.php?thumb=' + field_value + '&mode=f&width=128&height=128'; |
|
||||||
$('#cascad3_' + did + '_' + cid + ' > .cascad3_sortable:last').prepend( |
|
||||||
'<div class="cascad3_item ui-state-default" id="cascad3_image_' + cid + '_' + did + '_' + iid + '" data-id="' + iid + '" doc=id="' + did + '">' + |
|
||||||
'<div class="header grey_bg"></div>' + |
|
||||||
'<a class="topDir icon_sprite ico_photo view fancy preview__' + cid + '_' + did + '_' + iid + '" href="' + field_value + '" title="' + look + '"></a>' + |
|
||||||
'<a class="topDir icon_sprite ico_delete delete" href="javascript:void(0);" title="' + del + '" data-id="' + cid + '_' + did + '_' + iid + '"></a>' + |
|
||||||
'<span class="topDir icon_sprite ico_info info" title="' + field_value + '"></span>' + |
|
||||||
'<input type="hidden" value="' + field_value + '" name="data[' + did + '][feld][' + cid + '][' + iid + '][url]" id="image__' + cid + '_' + did + '_' + iid + '">' + |
|
||||||
'<img id="preview__' + cid + '_' + did + '_' + iid + '" src="' + img_path + '" onclick="browse_uploads(\'image__' + cid + '_' + did + '_' + iid + '\');" class="image" alt="" width="100" height="100" />' + |
|
||||||
'<textarea class="mousetrap" name="data[' + did + '][feld][' + cid + '][' + iid + '][descr]" placeholder="' + place + '"></textarea>' + |
|
||||||
'</div>' |
|
||||||
); |
|
||||||
Cascad3.cascad3_update(); |
|
||||||
} |
|
||||||
} |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
}); |
|
@ -1,27 +0,0 @@ |
|||||||
[admin] |
|
||||||
name = "Изображение (Каскада, 3 полета)" |
|
||||||
look = "Преглед" |
|
||||||
link = "Промени пътя" |
|
||||||
select = "Избери изображение" |
|
||||||
delete = "Изтриване на елелемт от элемент каскадата" |
|
||||||
place = "Описание" |
|
||||||
del_conf = "Сигурни ли сте, че желаете да изтриете този елемент?<br>(Изображението няма да бъде изтрито от сървъра)" |
|
||||||
del_head = "Изтриване на елемент от каскадата..." |
|
||||||
add_n_e = "Добави нов елемент:" |
|
||||||
add_f = "Избор на изображение" |
|
||||||
add_d = "Избор на папка" |
|
||||||
add_l = "Качи от компютъра" |
|
||||||
add_upl_e = "Вие може за заредите изображения от локален компютър след създаването на документа. За това натиснете бутона по долу «Добави и продължи редактирането»" |
|
||||||
upl_dir = "Папка: " |
|
||||||
del_all = "Изтриване на всички елементи" |
|
||||||
del_all_c = "Сигурни ли сте, че желаете да изтриете всички елементи?<br>(Изображенията няма да бъдат изтрити от сървъра)" |
|
||||||
del_all_h = "Изтриване на всички елементи на каскадата..." |
|
||||||
resp_s_h = "Изпълнено" |
|
||||||
resp_s_m = "Файловете са успешно заредени" |
|
||||||
resp_e_m = "Възникна грешка при зареждането на файловете. Моля, опитайте отново." |
|
||||||
resp_e_h = "Грешка" |
|
||||||
resp_m_m = "Броя на файловете за зареждане са повече от максималния, зададен в настройките на PHP." |
|
||||||
resp_m_h = "Грешка" |
|
||||||
max_f_f = "Максимален брой файлове за зареждане: " |
|
||||||
max_f_h = "Грешка" |
|
||||||
max_f_t = "Превишен е максималния брой файлове,<br>разрешен за едновременно зареждане" |
|
@ -1,29 +0,0 @@ |
|||||||
[admin] |
|
||||||
name = "Zobrazení (Kaskáda, 3 inputy)" |
|
||||||
look = "Zobrazit" |
|
||||||
link = "Změnit cestu" |
|
||||||
select = "Vybrat zobrazení" |
|
||||||
delete = "Smazat prvek kaskády" |
|
||||||
place = "Popis" |
|
||||||
del_conf = "Opravdu chcete odstranit tento prvek?<br>(Zobrazení nebude smazáno ze serveru)" |
|
||||||
del_head = "Smazání prvku kaskády..." |
|
||||||
add_n_e = "Přidat nový element:" |
|
||||||
add_f = "Vybrat zobrazení" |
|
||||||
add_d = "Vybrat složku" |
|
||||||
add_l = "Nahrát z počítače" |
|
||||||
add_upl_e = "Můžete nahrávat obrázky z místního počítače po vytvoření dokumentu. Kliknutím níže na "Přidat a pokračovat v úpravách" |
|
||||||
upl_dir = "Složka: " |
|
||||||
del_all = "Odstranit všechny prvky" |
|
||||||
del_all_c = "Opravdu chcete odstranit všechny prvky?<br>(Zobrazení nebude smazáno ze serveru)" |
|
||||||
del_all_h = "Odstranit všechny prvky kaskádu..." |
|
||||||
resp_s_h = "Hotovo" |
|
||||||
resp_s_m = "Soubory úspěšně nahrány" |
|
||||||
resp_s_h = "Hotovo" |
|
||||||
resp_s_m = "Soubory úspěšně nahrány" |
|
||||||
resp_e_m = "Při stahování souborů došlo k chybě. Zkuste znovu." |
|
||||||
resp_e_h = "Chyba" |
|
||||||
resp_m_m = "Počet souborů, které se mají nahrát překračují hodnotu zadanou v konfiguračním PHP." |
|
||||||
resp_m_h = "Chyba" |
|
||||||
max_f_f = "Maximální počet souborů ke stažení: " |
|
||||||
max_f_h = "Chba" |
|
||||||
max_f_t = Překročen maximální počet souborů,<br>během jednoho nahrávání" |
|
@ -1,26 +0,0 @@ |
|||||||
[en] |
|
||||||
name = "Cascad NEW, 3 inputs" |
|
||||||
look = "Lool" |
|
||||||
link = "Change path" |
|
||||||
select = "Select image" |
|
||||||
delete = "Delete item cascade" |
|
||||||
place = "Description" |
|
||||||
del_conf = "are you sure You want to delete this item?<br>(the Image will not be deleted from the server)" |
|
||||||
del_head = "Delete item cascade..." |
|
||||||
add_n_e = "Add new item:" |
|
||||||
add_f = "Select image" |
|
||||||
add_d = "Select folder" |
|
||||||
add_l = "Download to computer" |
|
||||||
add_upl_e = "You can upload pictures from your computer after you create the document. To do this, press the bottom button "Add and continue editing"" |
|
||||||
del_all = "Delete any items" |
|
||||||
del_all_c = "are you sure You want to delete all items?<br>(Image will not be deleted from the server)" |
|
||||||
del_all_h = "Delete all items of the cascade..." |
|
||||||
resp_s_h = "Done" |
|
||||||
resp_s_m = "File successfully loaded" |
|
||||||
resp_e_m = "an error Occurred when uploading files. Try again." |
|
||||||
resp_e_h = "Error" |
|
||||||
resp_m_m = "number of uploaded file exceeds the value set in your PHP settings." |
|
||||||
resp_m_h = "Error" |
|
||||||
max_f_f = "Maximum number zagrozenia files:" |
|
||||||
max_f_h = "Error" |
|
||||||
max_f_t = "you have Exceeded the maximum number of files<br>to download" |
|
@ -1,27 +0,0 @@ |
|||||||
[admin] |
|
||||||
name = "Obrazek (Kaskada, 3 input’y)" |
|
||||||
look = "Popatrz" |
|
||||||
link = "Zmień sposób" |
|
||||||
select = "Wybierz obrazek" |
|
||||||
delete = "Usuń kaskadę" |
|
||||||
place = "Opis" |
|
||||||
del_conf = "Czy na pewno chcesz usunąć ten element? <br> (Obrazek nie będzie usunięty z serwera)" |
|
||||||
del_head = "Usuń element kaskady ..." |
|
||||||
add_n_e = "Dodaj nowy element" |
|
||||||
add_f = "Wybierz obrazek" |
|
||||||
add_d = "Wybierz folder" |
|
||||||
add_l = "Pobierz z komputera" |
|
||||||
add_upl_e = "Możesz pobrać obrazki z komputera lokalnego po utworzeniu dokumentu. Aby to zrobić, kliknij poniżej na “Dodaj i kontynuować edycję”" |
|
||||||
upl_dir = "Folder:" |
|
||||||
del_all = "Usuń wszystkie elementy" |
|
||||||
del_all_c = "Czy na pewno chcesz usunąć wszystkie elementy? <br /> (Obrazek nie będzie usunięty z serwera)" |
|
||||||
del_all_h = "Usuń wszystkie pozycje kaskady..." |
|
||||||
resp_s_h = "Gotowe" |
|
||||||
resp_s_m = "Pliki pomyślnie pobrane" |
|
||||||
resp_e_m = "Wystąpił błąd podczas pobierania plików. Spróbuj ponownie." |
|
||||||
resp_e_h = "Błąd" |
|
||||||
resp_m_m = "Liczba plików do przesłania przekracza wartości, określone w PHP konfiguracji." |
|
||||||
resp_m_h = "Błąd" |
|
||||||
max_f_f = "Maksymalna liczba plików do pobrania:" |
|
||||||
max_f_h = "Błąd" |
|
||||||
max_f_t = "Przekroczono maksymalną liczbę plików, <br /> na jednoczesne ładowanie" |
|
@ -1,27 +0,0 @@ |
|||||||
[admin] |
|
||||||
name = "Изображение (Каскад, 3 инпута)" |
|
||||||
look = "Посмотреть" |
|
||||||
link = "Изменить путь" |
|
||||||
select = "Выбрать изображение" |
|
||||||
delete = "Удалить элемент каскада" |
|
||||||
place = "параметр" |
|
||||||
del_conf = "Вы уверены, что хотите удалить данный элемент?<br>(Изображение не будет удалено с сервера)" |
|
||||||
del_head = "Удаление элемента каскада..." |
|
||||||
add_n_e = "Добавить новый элемент:" |
|
||||||
add_f = "Выбрать изображение" |
|
||||||
add_d = "Выбрать папку" |
|
||||||
add_l = "Загрузить с компьютера" |
|
||||||
add_upl_e = "Вы сможете загрузить фотографии с локального компьютера после создания документа. Для этого нажмите внизу кнопку «Добавить и продолжить редактирование»" |
|
||||||
upl_dir = "Папка: " |
|
||||||
del_all = "Удалить все элементы" |
|
||||||
del_all_c = "Вы уверены, что хотите удалить все элементы?<br>(Изображения не будет удалены с сервера)" |
|
||||||
del_all_h = "Удаление всех элемента каскада..." |
|
||||||
resp_s_h = "Выполнено" |
|
||||||
resp_s_m = "Файлы успешно загрузились" |
|
||||||
resp_e_m = "Возникла ошибка при загрузке файлов. Попробуйте еще раз." |
|
||||||
resp_e_h = "Ошибка" |
|
||||||
resp_m_m = "Кол-во загружаемых файлов превышает значение, заданное в настройках PHP." |
|
||||||
resp_m_h = "Ошибка" |
|
||||||
max_f_f = "Макимальное кол-во загружаемых файлов: " |
|
||||||
max_f_h = "Ошибка" |
|
||||||
max_f_t = "Превышено максимальное число файлов,<br>для одновременной загрузки" |
|
@ -1,27 +0,0 @@ |
|||||||
[admin] |
|
||||||
name = "Зображення (Каскад, 3 інпута)" |
|
||||||
look = "Подивитися" |
|
||||||
link = "Змінити шлях" |
|
||||||
select = "Обрати зображення" |
|
||||||
delete = "Видалити елемент каскаду" |
|
||||||
place = "Опис" |
|
||||||
del_conf = "Ви впевнені, що бажаєте видалити цей елемент?<br>(Зображення не буде видалено зі сервера)" |
|
||||||
del_head = "Видалення елемента каскаду..." |
|
||||||
add_n_e = "Додати новий елемент:" |
|
||||||
add_f = "Обрати зображення" |
|
||||||
add_d = "Обрати папку" |
|
||||||
add_l = "Завантажити з компьютера" |
|
||||||
add_upl_e = "Ви зможете завантажити зображення з локального компьютера післе створення документа. Для цього натисніть внизу кнопку “Додати та продовжити редагування”" |
|
||||||
upl_dir = "Папка: " |
|
||||||
del_all = "Видалити всі елементи" |
|
||||||
del_all_c = "Ви впевнені, що бажаєте видалити всі елементи?<br>(Зображення не буде видалено зі сервера)" |
|
||||||
del_all_h = "Видалення всіх елементів каскаду..." |
|
||||||
resp_s_h = "Виконано" |
|
||||||
resp_s_m = "Файли успішно завантажилися" |
|
||||||
resp_e_m = "Сталася помилка при завантаженні файлів. Спробуйте ще раз." |
|
||||||
resp_e_h = "Помилка" |
|
||||||
resp_m_m = "Кількість файлів для завантаження перевищує значення, яке вказане у налаштуваннях PHP." |
|
||||||
resp_m_h = "Помилка" |
|
||||||
max_f_f = "Максимальна кількість файлів для завантаження: " |
|
||||||
max_f_h = "Помилка" |
|
||||||
max_f_t = "Перевищено максимальне число файлів,<br>для одночасного завантаження" |
|
@ -1,3 +0,0 @@ |
|||||||
{foreach from=$field_value item=image} |
|
||||||
<img src="{$image[0]}" alt="{if isset($image[1])}{$image[1]}{/if}" title="{if isset($image[1])}{$image[1]}{/if}"> |
|
||||||
{/foreach} |
|
@ -1,3 +0,0 @@ |
|||||||
{foreach from=$field_value item=image} |
|
||||||
<img src="{$image[0]}" alt="{if isset($image[1])}{$image[1]}{/if}" title="{if isset($image[1])}{$image[1]}{/if}"> |
|
||||||
{/foreach} |
|
@ -1,65 +0,0 @@ |
|||||||
{if $cascad3_new_3inputs != load} |
|
||||||
{assign var=cascad3_new_3inputs value='' scope="global"} |
|
||||||
{if $smarty.request.outside} |
|
||||||
<script src="{$ABS_PATH}fields/{$field_dir}/js/outside.js" type="text/javascript"></script> |
|
||||||
{else} |
|
||||||
<script src="{$ABS_PATH}fields/{$field_dir}/js/field.js" type="text/javascript"></script> |
|
||||||
{/if} |
|
||||||
<link href="{$ABS_PATH}fields/{$field_dir}/css/field.css" rel="stylesheet" type="text/css" media="screen" /> |
|
||||||
<script type="text/javascript"> |
|
||||||
var blank = '{$tpl_dir}/images/blanc.gif'; |
|
||||||
var place = '{#place#}'; |
|
||||||
var look = '{#look#}'; |
|
||||||
var del = '{#delete#}'; |
|
||||||
var del_conf = '{#del_conf#}'; |
|
||||||
var del_head = '{#del_head#}'; |
|
||||||
var del_all_c = '{#del_all_c#}'; |
|
||||||
var del_all_h = '{#del_all_h#}'; |
|
||||||
var max_f_t = '{#max_f_t#}'; |
|
||||||
var max_f_h = '{#max_f_h#}'; |
|
||||||
</script> |
|
||||||
{assign var=cascad3_new_3inputs value="load" scope="global"} |
|
||||||
{/if} |
|
||||||
|
|
||||||
<div class="cascad3" id="cascad3_{$doc_id}_{$field_id}" data-id="{$field_id}" data-doc="{$doc_id}" data-rubric="{$smarty.request.rubric_id}"> |
|
||||||
<input type="hidden" value="" id="cascad3__{$field_id}_{$doc_id}"> |
|
||||||
{if $show_upload} |
|
||||||
<input type="file" class="cascad3_upload cascad3_upload_field_{$field_id}_{$doc_id}" multiple name="cascad3_files_{$field_id}_{$doc_id}[]" style="visibility: hidden; display: none;" data-max-files="{$max_files}" /> |
|
||||||
{/if} |
|
||||||
<ul class="messages"> |
|
||||||
<li class="highlight grey"> |
|
||||||
{#add_n_e#} |
|
||||||
<a href="javascript:void(0);" class="cascad3_add_single link">{#add_f#}</a> |
|
||||||
| |
|
||||||
<a href="javascript:void(0);" class="cascad3_add_folder link">{#add_d#}</a> |
|
||||||
| |
|
||||||
<a href="javascript:void(0);" class="cascad3_del_all link">{#del_all#}</a> |
|
||||||
{if $show_upload} |
|
||||||
| |
|
||||||
<a href="javascript:void(0);" class="cascad3_upload_local link">{#add_l#}</a> <a href="javascript:void(0);" class="topDir" title="{$max_files}<br>{$dir_upload}">[?]</a> |
|
||||||
{else} |
|
||||||
| |
|
||||||
<a href="javascript:void(0);" class="topDir" title="{#add_upl_e#}<br><br>{$max_files}<br>{$dir_upload}">[?]</a> |
|
||||||
{/if} |
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
|
|
||||||
<div class="cascad3_sortable"> |
|
||||||
{foreach from=$images key=key item=image} |
|
||||||
|
|
||||||
<div class="cascad3_item ui-state-default" id="cascad3_image_{$field_id}_{$doc_id}_{$key}" data-id="{$key}" data-doc="{$doc_id}"> |
|
||||||
<div class="header grey_bg"></div> |
|
||||||
<a class="topDir icon_sprite ico_photo view fancy preview__{$field_id}_{$doc_id}_{$key}" href="{$image.url}" title="{#look#}"></a> |
|
||||||
<a class="topDir icon_sprite ico_delete delete" href="javascript:void(0);" title="{#delete#}" data-id="{$field_id}_{$doc_id}_{$key}"></a> |
|
||||||
<span class="topDir icon_sprite ico_info info" title="{$image.url}"></span> |
|
||||||
<input type="hidden" value="{$image.url}" name="feld[{$field_id}][{$key}][url]" id="image__{$field_id}_{$doc_id}_{$key}"> |
|
||||||
<img id="preview__{$field_id}_{$doc_id}_{$key}" src="{$image.thumb}" onclick="browse_uploads('image__{$field_id}_{$doc_id}_{$key}');" class="image" alt="" width="100" height="100" /> |
|
||||||
<input class="mousetrap" name="feld[{$field_id}][{$key}][descr]" placeholder="{#place#} 1" value="{$image.desc}"/> |
|
||||||
<input class="mousetrap" name="feld[{$field_id}][{$key}][descr2]" placeholder="{#place#} 2" value="{$image.desc2}"/> |
|
||||||
<input class="mousetrap" name="feld[{$field_id}][{$key}][descr3]" placeholder="{#place#} 3" value="{$image.desc3}"/> |
|
||||||
</div> |
|
||||||
|
|
||||||
{/foreach} |
|
||||||
</div> |
|
||||||
|
|
||||||
</div> |
|
@ -1,3 +1,9 @@ |
|||||||
[admin] |
[admin] |
||||||
|
|
||||||
name = "YouTube" |
name = "YouTube" |
||||||
|
f_url = "Линк" |
||||||
|
f_width = "Ширина" |
||||||
|
f_height = "Височина" |
||||||
|
f_fullscreen = "На цял екран" |
||||||
|
f_allow = "Разреши" |
||||||
|
f_forbidden = "Забрани" |
||||||
|
f_metod = "Метод на вмъкване" |
||||||
|
@ -1,2 +1,9 @@ |
|||||||
[admin] |
[admin] |
||||||
name = "YouTube" |
name = "YouTube" |
||||||
|
f_url = "Ссылка" |
||||||
|
f_width = "Ширина" |
||||||
|
f_height = "Высота" |
||||||
|
f_fullscreen = "Полноэкранный режим" |
||||||
|
f_allow = "Разрешить" |
||||||
|
f_forbidden = "Запретить" |
||||||
|
f_metod = "Метод вставки" |
@ -1,2 +1,9 @@ |
|||||||
[admin] |
[admin] |
||||||
name = "YouTube" |
name = "YouTube" |
||||||
|
f_url = "Url" |
||||||
|
f_width = "Width" |
||||||
|
f_height = "Height" |
||||||
|
f_fullscreen = "Fullscreen" |
||||||
|
f_allow = "Allow" |
||||||
|
f_forbidden = "Forbidden" |
||||||
|
f_metod = "Metod" |
@ -1,2 +1,9 @@ |
|||||||
[admin] |
[admin] |
||||||
name = "YouTube" |
name = "YouTube" |
||||||
|
f_url = "Url" |
||||||
|
f_width = "Width" |
||||||
|
f_height = "Height" |
||||||
|
f_fullscreen = "Fullscreen" |
||||||
|
f_allow = "Allow" |
||||||
|
f_forbidden = "Forbidden" |
||||||
|
f_metod = "Metod" |
@ -1,2 +1,9 @@ |
|||||||
[admin] |
[admin] |
||||||
name = "YouTube" |
name = "YouTube" |
||||||
|
f_url = "Ссылка" |
||||||
|
f_width = "Ширина" |
||||||
|
f_height = "Высота" |
||||||
|
f_fullscreen = "Полноэкранный режим" |
||||||
|
f_allow = "Разрешить" |
||||||
|
f_forbidden = "Запретить" |
||||||
|
f_metod = "Метод вставки" |
@ -1,2 +1,9 @@ |
|||||||
[admin] |
[admin] |
||||||
name = "YouTube" |
name = "YouTube" |
||||||
|
f_url = "Url" |
||||||
|
f_width = "Width" |
||||||
|
f_height = "Height" |
||||||
|
f_fullscreen = "Fullscreen" |
||||||
|
f_allow = "Allow" |
||||||
|
f_forbidden = "Forbidden" |
||||||
|
f_metod = "Metod" |
Loading…
Reference in new issue