Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
addcpm-json
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Александр Чаплыгин
addcpm-json
Commits
67ee96d3
Commit
67ee96d3
authored
May 31, 2019
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Завел попап подтверждения отклонения заказа с комментарием
parent
27d27cda
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
1 deletion
+96
-1
styles-feeds-stat.css
src/public/css/styles-feeds-stat.css
+31
-0
script-feeds-stat.js
src/public/js/script-feeds-stat.js
+54
-1
order-regected-comment.phtml
src/templates/app/popup/order-regected-comment.phtml
+10
-0
layout-main.phtml
src/templates/layout/layout-main.phtml
+1
-0
No files found.
src/public/css/styles-feeds-stat.css
View file @
67ee96d3
...
...
@@ -607,3 +607,33 @@ input[type="checkbox"]
border
:
0
;
}
.b-popup-content
{
padding
:
10px
;
}
.b-popup-content
h2
{
margin-top
:
10px
;
margin-bottom
:
10px
;
text-align
:
center
;
font-size
:
16px
;
color
:
#337ab7
;
}
.b-popup-content
textarea
.b-popup-comment
{
padding
:
10px
;
width
:
100%
;
background-color
:
#FFFFFF
;
border
:
1px
solid
#CCCCCC
;
border-radius
:
4px
;
resize
:
none
;
}
.b-popup-content
button
{
display
:
block
;
margin
:
0
auto
;
}
\ No newline at end of file
src/public/js/script-feeds-stat.js
View file @
67ee96d3
...
...
@@ -330,7 +330,7 @@ $(document).ready(function(){
OrdersStatusReCalc
();
// Переключение статусов заказов:
// Переключение статусов заказов
в таблице
:
$ordersSwitcher
.
on
(
'click'
,
function
()
{
var
$this
=
$
(
this
);
...
...
@@ -342,6 +342,49 @@ $(document).ready(function(){
}
});
var
$popupBg
=
$
(
'.l-popup'
),
$popup
=
$
(
'.b-popup__window.order-regected-comment'
,
$popupBg
),
$popupClose
=
$
(
'.button-close'
,
$popup
),
$popupContent
=
$
(
'.b-popup-content'
,
$popup
),
$popupComment
=
$
(
'.b-popup-comment'
,
$popup
);
// Закрыввем попап по клику на Х:
$popupClose
.
on
(
'click'
,
function
(){
ClosePopup
();
});
// Закрыввем попап по клику извне:
$popup
.
on
(
'click'
,
function
(
event
){
event
.
stopPropagation
();
});
$popupBg
.
on
(
'click'
,
function
(){
ClosePopup
();
});
function
ShowPopup
(
dataPopup
)
{
$popupBg
.
addClass
(
'open-popup'
);
$popup
.
show
();
$popupContent
.
attr
(
"data-feed-id"
,
dataPopup
.
feedId
);
$popupContent
.
attr
(
"data-order-id"
,
dataPopup
.
orderId
);
}
function
ClosePopup
()
{
$popupBg
.
removeClass
(
'open-popup'
);
$popup
.
hide
();
var
feedIdValue
=
$popupContent
.
attr
(
"data-feed-id"
),
orderIdValue
=
$popupContent
.
attr
(
"data-order-id"
);
console
.
log
(
'AAA feedIdValue = '
,
feedIdValue
);
console
.
log
(
'AAA orderIdValue = '
,
orderIdValue
);
$popupContent
.
attr
(
"data-feed-id"
,
null
);
$popupContent
.
attr
(
"data-order-id"
,
null
);
$popupComment
.
val
(
''
);
}
// Клик на галочку подтверждения заказа:
$tableStat
.
on
(
'change'
,
'td.status input'
,
function
(
e
)
{
...
...
@@ -359,6 +402,16 @@ $(document).ready(function(){
$tableToExcel
=
$
(
"#table2excel"
),
$orderTrExcel
=
$
(
'tbody tr.order-item[data-feed-id="'
+
$spanWrap
.
data
(
'feed-id'
)
+
'"][data-order-id="'
+
$spanWrap
.
data
(
'order-id'
)
+
'"]'
,
$tableToExcel
);
// Popup с комментарием к отклонению заказа:
if
(
!
data
.
confirmed
)
{
var
dataPopup
=
{
'feedId'
:
$spanWrap
.
data
(
'feed-id'
),
'orderId'
:
$spanWrap
.
data
(
'order-id'
),
}
ShowPopup
(
dataPopup
);
}
return
false
;
$this
.
prop
(
"disabled"
,
true
);
$
.
ajax
(
action
,
{
...
...
src/templates/app/popup/order-regected-comment.phtml
0 → 100644
View file @
67ee96d3
<div
class=
"order-regected-comment b-popup__window"
>
<p
class=
"button-close"
></p>
<div
class=
"b-popup-content"
data-feed-id=
""
data-order-id=
""
>
<h2>
<?=
_t
(
"Комментарий к отклонению заказа"
)
?>
</h2>
<textarea
class=
"b-popup-comment"
></textarea>
<button
class=
"btn btn-danger"
type=
"button111"
>
Отклонить заказ
</button>
</div>
</div>
src/templates/layout/layout-main.phtml
View file @
67ee96d3
...
...
@@ -130,6 +130,7 @@ $urlHome = $this->url('home',['lang' => $lang]);
<?=
$this
->
partial
(
'app::popup/connection'
,
[
'lang'
=>
$lang
])
?>
<?=
$this
->
partial
(
'app::popup/password-reset'
,
[
'lang'
=>
$lang
])
?>
<?=
$this
->
partial
(
'app::popup/confirm'
,
[
'lang'
=>
$lang
])
?>
<?=
$this
->
partial
(
'app::popup/order-regected-comment'
,
[
'lang'
=>
$lang
])
?>
</div>
...
...
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