Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
99a3b291
Commit
99a3b291
authored
Feb 11, 2023
by
wd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
顶部free shipping bar 保存错误修复,字体单位更改,以及不存在时样式的修改
parent
9fc60a99
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
7 deletions
+18
-7
app/code/Sparsh/FreeShippingBar/Controller/Adminhtml/Entity/Save.php
+4
-4
app/code/Sparsh/FreeShippingBar/Ui/Component/Listing/Column/FreeShippingBarActions.php
+2
-2
app/code/Sparsh/FreeShippingBar/view/frontend/templates/free_shipping_bar.phtml
+1
-1
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/header/logo.phtml
+11
-0
No files found.
app/code/Sparsh/FreeShippingBar/Controller/Adminhtml/Entity/Save.php
View file @
99a3b291
...
@@ -88,24 +88,24 @@ class Save extends \Sparsh\FreeShippingBar\Controller\Adminhtml\Entity implement
...
@@ -88,24 +88,24 @@ class Save extends \Sparsh\FreeShippingBar\Controller\Adminhtml\Entity implement
}
}
//pc img upload
//pc img upload
if
(
$_FILES
[
'background_img'
][
'name'
]){
if
(
isset
(
$_FILES
[
'background_img'
][
'name'
])
&&
$_FILES
[
'background_img'
][
'name'
]){
$this
->
saveImg
(
'background_img'
);
$this
->
saveImg
(
'background_img'
);
$data
[
'background_img'
]
=
'/'
.
self
::
FILE_DIR
.
'/'
.
$_FILES
[
'background_img'
][
'name'
];
$data
[
'background_img'
]
=
'/'
.
self
::
FILE_DIR
.
'/'
.
$_FILES
[
'background_img'
][
'name'
];
}
}
//phone img upload
//phone img upload
if
(
$_FILES
[
'background_img_phone'
][
'name'
]){
if
(
isset
(
$_FILES
[
'background_img_phone'
][
'name'
])
&&
$_FILES
[
'background_img_phone'
][
'name'
]){
$this
->
saveImg
(
'background_img_phone'
);
$this
->
saveImg
(
'background_img_phone'
);
$data
[
'background_img_phone'
]
=
'/'
.
self
::
FILE_DIR
.
'/'
.
$_FILES
[
'background_img_phone'
][
'name'
];
$data
[
'background_img_phone'
]
=
'/'
.
self
::
FILE_DIR
.
'/'
.
$_FILES
[
'background_img_phone'
][
'name'
];
}
}
//not request img info
//not request img info
if
(
is_array
(
$data
[
'background_img'
])){
if
(
is
set
(
$data
[
'background_img'
])
&&
is
_array
(
$data
[
'background_img'
])){
//no delete and no upload new img
//no delete and no upload new img
unset
(
$data
[
'background_img'
]);
unset
(
$data
[
'background_img'
]);
}
}
if
(
is_array
(
$data
[
'background_img_phone'
])){
if
(
is
set
(
$data
[
'background_img_phone'
])
&&
is
_array
(
$data
[
'background_img_phone'
])){
//no delete and no upload new img
//no delete and no upload new img
unset
(
$data
[
'background_img_phone'
]);
unset
(
$data
[
'background_img_phone'
]);
}
}
...
...
app/code/Sparsh/FreeShippingBar/Ui/Component/Listing/Column/FreeShippingBarActions.php
View file @
99a3b291
...
@@ -78,8 +78,8 @@ class FreeShippingBarActions extends Column
...
@@ -78,8 +78,8 @@ class FreeShippingBarActions extends Column
),
),
'label'
=>
__
(
'Delete'
),
'label'
=>
__
(
'Delete'
),
'confirm'
=>
[
'confirm'
=>
[
'title'
=>
__
(
'Delete
${ $.$data.name }
'
),
'title'
=>
__
(
'Delete
Free Shipping Bar
'
),
'message'
=>
__
(
'Are you sure you want to delete a
${ $.$data.name }
record?'
)
'message'
=>
__
(
'Are you sure you want to delete a
Free Shipping Bar
record?'
)
]
]
];
];
}
}
...
...
app/code/Sparsh/FreeShippingBar/view/frontend/templates/free_shipping_bar.phtml
View file @
99a3b291
...
@@ -41,7 +41,7 @@ endif;
...
@@ -41,7 +41,7 @@ endif;
}
}
</style>
</style>
<div
class=
"sparsh-free-shipping-bar-goal-message"
<div
class=
"sparsh-free-shipping-bar-goal-message"
style=
" background-size: 100%; line-height: initial; text-align: center; background-color:
<?=
/* @noEscape */
$barData
[
'bar_background_color'
]
?>
; font-size:
<?=
/* @noEscape */
$barData
[
'bar_font_size'
]
.
'
px
'
?>
"
>
style=
" background-size: 100%; line-height: initial; text-align: center; background-color:
<?=
/* @noEscape */
$barData
[
'bar_background_color'
]
?>
; font-size:
<?=
/* @noEscape */
$barData
[
'bar_font_size'
]
.
'
em
'
?>
"
>
<a
<?=
/* @noEscape */
$barData
[
'is_clickable'
]
?
'href='
.
$barData
[
'bar_link_url'
]
:
null
?>
<a
<?=
/* @noEscape */
$barData
[
'is_clickable'
]
?
'href='
.
$barData
[
'bar_link_url'
]
:
null
?>
<?=
/* @noEscape */
$barData
[
'is_clickable'
]
?
(
$barData
[
'is_link_open_in_new_page'
]
?
'target=_blank'
:
'target=_self'
)
:
null
?>
<?=
/* @noEscape */
$barData
[
'is_clickable'
]
?
(
$barData
[
'is_link_open_in_new_page'
]
?
'target=_blank'
:
'target=_self'
)
:
null
?>
style=
"color:
<?=
/* @noEscape */
$barData
[
'bar_text_color'
]
?>
"
>
style=
"color:
<?=
/* @noEscape */
$barData
[
'bar_text_color'
]
?>
"
>
...
...
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/header/logo.phtml
View file @
99a3b291
...
@@ -37,7 +37,13 @@ $logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
...
@@ -37,7 +37,13 @@ $logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
if
(
userAgentInfo
.
indexOf
(
Agents
[
v
])
>
0
)
{
flag
=
false
;
break
;
}
if
(
userAgentInfo
.
indexOf
(
Agents
[
v
])
>
0
)
{
flag
=
false
;
break
;
}
}
}
require
([
'jquery'
],
function
(
$
){
require
([
'jquery'
],
function
(
$
){
//free shipping bar not existent
if
(
!
flag
&&
!
$
(
'.sparsh-free-shipping-bar-goal-message'
).
length
){
$
(
'.page-header'
).
css
(
'margin-top'
,
'0'
);
}
//auto logo height
if
(
flag
){
if
(
flag
){
var
imgH
=
$
(
'.logo'
).
height
();
var
imgH
=
$
(
'.logo'
).
height
();
imgH
=
Math
.
ceil
(
imgH
/
3
);
imgH
=
Math
.
ceil
(
imgH
/
3
);
...
@@ -47,7 +53,12 @@ $logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
...
@@ -47,7 +53,12 @@ $logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
console
.
log
(
headerH
);
console
.
log
(
headerH
);
$
(
'.columns'
).
css
(
'margin-top'
,
headerH
);
$
(
'.columns'
).
css
(
'margin-top'
,
headerH
);
}
}
});
});
</script>
</script>
<span
data-action=
"toggle-nav"
class=
"action nav-toggle"
><span>
<?=
$block
->
escapeHtml
(
__
(
'Toggle Nav'
))
?>
</span></span>
<span
data-action=
"toggle-nav"
class=
"action nav-toggle"
><span>
<?=
$block
->
escapeHtml
(
__
(
'Toggle Nav'
))
?>
</span></span>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment