Commit ba9d5218 by wd

修改admin 菜单名称,修改top bar默认背景色,以及图片上传样式

parent 70d3644b
...@@ -62,7 +62,6 @@ class DataProvider extends AbstractDataProvider ...@@ -62,7 +62,6 @@ class DataProvider extends AbstractDataProvider
$m['phoneImage'][0]['name'] = $this->getFileName($phoneImg); $m['phoneImage'][0]['name'] = $this->getFileName($phoneImg);
$m['phoneImage'][0]['url'] = $this->getMediaUrl($phoneImg); $m['phoneImage'][0]['url'] = $this->getMediaUrl($phoneImg);
$m['phoneImage'][0]['type'] = 'image'; $m['phoneImage'][0]['type'] = 'image';
$m['phoneImage'][0]['size'] = '20kb';
} }
$this->loadedData[$item->getId()] = array_merge($this->loadedData[$item->getId()],$m); $this->loadedData[$item->getId()] = array_merge($this->loadedData[$item->getId()],$m);
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
/> />
<add id="Sparsh_FreeShippingBar::free_shipping_bar_management" <add id="Sparsh_FreeShippingBar::free_shipping_bar_management"
title="Free Shipping Bar" title="Top Bar"
translate="title" translate="title"
action="sparsh_free_shipping_bar/entity" action="sparsh_free_shipping_bar/entity"
module="Sparsh_FreeShippingBar" module="Sparsh_FreeShippingBar"
......
...@@ -97,7 +97,7 @@ class WhatToDisplay extends \Magento\Backend\Block\Widget\Form\Generic ...@@ -97,7 +97,7 @@ class WhatToDisplay extends \Magento\Backend\Block\Widget\Form\Generic
'name' => 'background_img', 'name' => 'background_img',
'required' => false, 'required' => false,
'disabled' => $isElementDisabled, 'disabled' => $isElementDisabled,
'none' => __('Pictures displayed in the current position') 'none' => __('Allow image type: jpg, jpeg, gif, png')
] ]
); );
...@@ -110,7 +110,7 @@ class WhatToDisplay extends \Magento\Backend\Block\Widget\Form\Generic ...@@ -110,7 +110,7 @@ class WhatToDisplay extends \Magento\Backend\Block\Widget\Form\Generic
'name' => 'background_img_phone', 'name' => 'background_img_phone',
'required' => false, 'required' => false,
'disabled' => $isElementDisabled, 'disabled' => $isElementDisabled,
'none' => __('Pictures displayed in the current position') 'none' => __('Allow image type: jpg, jpeg, gif, png')
] ]
); );
...@@ -176,7 +176,7 @@ class WhatToDisplay extends \Magento\Backend\Block\Widget\Form\Generic ...@@ -176,7 +176,7 @@ class WhatToDisplay extends \Magento\Backend\Block\Widget\Form\Generic
if (!$model->getEntityId()) { if (!$model->getEntityId()) {
if (!$model->hasData('bar_background_color')) { if (!$model->hasData('bar_background_color')) {
$model->setBarBackgroundColor('#1979C3'); $model->setBarBackgroundColor('#EDEDED');
} }
if (!$model->hasData('bar_text_color')) { if (!$model->hasData('bar_text_color')) {
$model->setBarTextColor('#FFFFFF'); $model->setBarTextColor('#FFFFFF');
......
...@@ -14,3 +14,19 @@ ...@@ -14,3 +14,19 @@
.field-snippet_code_insert .sparsh-free-shipping-bar-control-value p{ .field-snippet_code_insert .sparsh-free-shipping-bar-control-value p{
font-size: 16px; font-size: 16px;
} }
.admin__scope-old a{
display: block;
}
.admin__scope-old a>img{
width: auto;
height: auto;
}
#sparsh_free_shipping_bar_entity_background_img_delete{
margin-top: 0!important;
}
#sparsh_free_shipping_bar_entity_background_img_phone_delete{
margin-top: 0!important;
}
\ No newline at end of file
define([ define([
'jquery' 'jquery'
], function ($) { ], function ($) {
$('#sparsh_free_shipping_bar_entity_background_img_image').parent().attr('target','blank');
$('#sparsh_free_shipping_bar_entity_background_img_phone_image').parent().attr('target','blank');
"use strict"; "use strict";
return function () { return function () {
$(document).ready(function(){ $(document).ready(function(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment