mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
@@ -227,6 +227,11 @@ __PluginManager__.registerPlugins({
|
||||
type: 'loader',
|
||||
deps: ['Logger', 'support']
|
||||
},
|
||||
fancybox: {
|
||||
path: __pmConfig__.assetsPath + '/fancybox',
|
||||
css: '/fancybox.css',
|
||||
js: '/fancybox.umd.js',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -922,12 +922,15 @@ script, style {
|
||||
.kit-icon-line img {
|
||||
height: calc(1em * var(--font-ratio-height, 1));
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
vertical-align: baseline;
|
||||
display: block;
|
||||
fill: currentColor;
|
||||
transition: inherit;
|
||||
object-fit: contain;
|
||||
object-position: center;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
kit.PluginManager.register('lib',function(module, exports, require, global) {
|
||||
|
||||
/**
|
||||
* @memberOf kitCore
|
||||
* @memberOf kit
|
||||
*/
|
||||
var lib = {
|
||||
svg: {
|
||||
|
||||
@@ -151,7 +151,8 @@ input[type="color"] ~ .kit-field__color {
|
||||
height: 100%;
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 2px 0 3px;
|
||||
padding-bottom: var(--kit-field-line-padding);
|
||||
padding-top: var(--kit-field-line-padding);
|
||||
text-align: left;
|
||||
-moz-transition: color 0.3s 0.1s;
|
||||
transition: color 0.3s 0.1s;
|
||||
@@ -194,6 +195,22 @@ input[type="color"] ~ .kit-field__color {
|
||||
--line-clamp: 1;
|
||||
--line-clamp-height: var(--line-height-ratio);
|
||||
}
|
||||
|
||||
.kit-field input[type="file"] ~ .kit-field__label {
|
||||
pointer-events: auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
.kit-field input[type="file"] ~ .kit-field__display {
|
||||
cursor: auto;
|
||||
}
|
||||
.kit-field__display-file {
|
||||
|
||||
}
|
||||
.kit-field__label-icon, .kit-field__display-file-icon {
|
||||
width: 1em;
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
.kit-field textarea:focus,
|
||||
.kit-field input:focus,
|
||||
.kit-field textarea.focus,
|
||||
@@ -949,7 +966,6 @@ select.kit-field__input:disabled ~.kit-field__hr {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: relative;
|
||||
padding-right: 30px !important;
|
||||
text-align: left;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* @var array $arParams
|
||||
*/
|
||||
|
||||
use Wt\Core\Tools;
|
||||
|
||||
$arParams['TYPE'] = 'file';
|
||||
$isReadonly = Tools::isTrue($arParams['READONLY']);
|
||||
$isRequired = Tools::isTrue($arParams['REQUIRED']);
|
||||
$isChecked = Tools::isTrue($arParams['CHECKED']);
|
||||
$multiple = Tools::isTrue($arParams['MULTIPLE']);
|
||||
$moduleId = $arParams['MODULE_ID']?:'main';
|
||||
|
||||
$MAX_FILE_SIZE = $arParams['MAX_FILE_SIZE']?:1048576;
|
||||
|
||||
if(is_array($arParams['VALUE'])) {
|
||||
$arParams['VALUE'] = array_filter($arParams['VALUE']);
|
||||
}
|
||||
if($multiple) {
|
||||
$value = (array)$arParams['VALUE'];
|
||||
} else {
|
||||
if(is_array($arParams['VALUE'])) {
|
||||
$value = (int)$arParams['VALUE'][array_key_first($arParams['VALUE'])];
|
||||
}
|
||||
$value = (int)$arParams['VALUE'];
|
||||
}
|
||||
$isHint = (string)($arParams['HINT']) !== '';
|
||||
|
||||
|
||||
$componentParams = array(
|
||||
'INPUT_NAME' => $arParams['NAME'],
|
||||
//'INPUT_NAME_UNSAVED' => 'FILE_NEW_TMP',
|
||||
'INPUT_VALUE' => $value,
|
||||
'MAX_FILE_SIZE' => $MAX_FILE_SIZE,
|
||||
'MULTIPLE' => $multiple?'Y':'N',
|
||||
'MODULE_ID' => $moduleId,
|
||||
'ALLOW_UPLOAD' => 'A',
|
||||
'ICO' => 'Y',
|
||||
'HINT' => $arParams['HINT'],
|
||||
'WRAP_CLASS' => $arParams['WRAP_CLASS'],
|
||||
);
|
||||
|
||||
$GLOBALS["APPLICATION"]->IncludeComponent('bitrix:main.file.input', 'kit', $componentParams, false, Array("HIDE_ICONS" => "Y"));
|
||||
Reference in New Issue
Block a user