Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
yii2_fecshop
提交
fa12f11f
Y
yii2_fecshop
项目概览
OpenDocCN
/
yii2_fecshop
通知
17
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yii2_fecshop
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
fa12f11f
编写于
7月 26, 2019
作者:
T
Terry
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
product attr , change config from database
上级
7b8f7a6e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
243 addition
and
0 deletion
+243
-0
app/appadmin/modules/Catalog/controllers/ProductattrgroupController.php
...odules/Catalog/controllers/ProductattrgroupController.php
+45
-0
app/appadmin/theme/base/default/catalog/productattrgroup/manager.php
...n/theme/base/default/catalog/productattrgroup/manager.php
+41
-0
app/appadmin/theme/base/default/catalog/productattrgroup/manageredit.php
...eme/base/default/catalog/productattrgroup/manageredit.php
+157
-0
未找到文件。
app/appadmin/modules/Catalog/controllers/ProductattrgroupController.php
浏览文件 @
fa12f11f
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
namespace
fecshop\app\appadmin\modules\Catalog\controllers
;
use
fecshop\app\appadmin\modules\Catalog\CatalogController
;
/**
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
class
ProductattrgroupController
extends
CatalogController
{
public
$enableCsrfValidation
=
true
;
public
function
actionManager
()
{
$data
=
$this
->
getBlock
()
->
getLastData
();
return
$this
->
render
(
$this
->
action
->
id
,
$data
);
}
public
function
actionManageredit
()
{
$data
=
$this
->
getBlock
()
->
getLastData
();
return
$this
->
render
(
$this
->
action
->
id
,
$data
);
}
public
function
actionManagereditsave
()
{
$data
=
$this
->
getBlock
(
'manageredit'
)
->
save
();
}
public
function
actionManagerdelete
()
{
$this
->
getBlock
(
'manageredit'
)
->
delete
();
}
}
app/appadmin/theme/base/default/catalog/productattrgroup/manager.php
浏览文件 @
fa12f11f
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
use
fec\helpers\CRequest
;
/**
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
?>
<form
id=
"pagerForm"
method=
"post"
action=
"
<?=
\
fec\helpers\CUrl
::
getCurrentUrl
();
?>
"
>
<?=
CRequest
::
getCsrfInputHtml
();
?>
<?=
$pagerForm
;
?>
</form>
<div
class=
"pageHeader"
>
<form
rel=
"pagerForm"
onsubmit=
"return navTabSearch(this);"
action=
"
<?=
\
fec\helpers\CUrl
::
getCurrentUrl
();
?>
"
method=
"post"
>
<?php
echo
CRequest
::
getCsrfInputHtml
();
?>
<div
class=
"searchBar"
>
<?php
echo
$searchBar
;
?>
</div>
</form>
</div>
<div
class=
"pageContent"
>
<div
class=
"panelBar"
>
<?=
$editBar
;
?>
</div>
<div
class=
"panelBar"
>
<?=
$toolBar
;
?>
</div>
<table
class=
"table"
width=
"100%"
layoutH=
"138"
>
<?=
$thead
;
?>
<tbody>
<?=
$tbody
;
?>
</tbody>
</table>
</div>
app/appadmin/theme/base/default/catalog/productattrgroup/manageredit.php
浏览文件 @
fa12f11f
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
use
yii\helpers\Html
;
use
fec\helpers\CRequest
;
use
fecadmin\models\AdminRole
;
/**
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
?>
<style>
.checker
{
float
:
left
;}
.dialog
.pageContent
{
background
:
none
;}
.dialog
.pageContent
.pageFormContent
{
background
:
none
;}
</style>
<script>
function
thissubmit
(
thiss
){
var
fill
=
true
;
items_input
=
""
;
var
selected_product_attr
=
''
;
$
(
"
.selected_product_attr:checked
"
).
each
(
function
(){
attrId
=
$
(
this
).
val
();
sortOrderI
=
"
.selected_product_sort_order_
"
+
attrId
;
sort_order
=
$
(
sortOrderI
).
val
();
selected_product_attr
+=
attrId
+
'
##
'
+
sort_order
+
"
||
"
;
});
//alert(selected_product_attr);
$
(
"
.attr_ids_c
"
).
val
(
selected_product_attr
);
return
validateCallback
(
thiss
,
dialogAjaxDoneCloseAndReflush
);
}
</script>
<div
class=
"pageContent"
>
<form
method=
"post"
action=
"
<?=
$saveUrl
?>
"
class=
"pageForm required-validate"
onsubmit=
"return thissubmit(this)"
>
<?php
echo
CRequest
::
getCsrfInputHtml
();
?>
<div
layouth=
"56"
class=
"pageFormContent"
style=
"height: 240px; overflow: auto;"
>
<input
type=
"hidden"
value=
"
<?=
$product_id
;
?>
"
size=
"30"
name=
"product_id"
class=
"textInput "
>
<fieldset
id=
"fieldset_table_qbe"
>
<legend
style=
"color:#009688"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Edit Info'
)
?>
</legend>
<div>
<?=
$editBar
;
?>
</div>
</fieldset>
<?=
$lang_attr
?>
<?=
$textareas
?>
<input
type=
"hidden"
name=
"editFormData[attr_ids]"
class=
"attr_ids_c"
/>
<div>
<table
class=
"table"
width=
"100%"
layoutH=
"138"
>
<thead>
<tr>
<th
width=
"22"
><input
type=
"checkbox"
group=
"ids"
class=
"checkboxCtrl"
></th>
<th
width=
"110"
align=
"left"
orderField=
"sort_order"
class=
""
>
Sort Order
</th>
<th
width=
"110"
align=
"left"
orderField=
"name"
class=
""
>
属性名称
</th>
<th
width=
"100"
align=
"left"
orderField=
"attr_type"
class=
""
>
属性类型
</th>
<th
width=
"50"
align=
"center"
orderField=
"status"
class=
""
>
状态
</th>
<th
width=
"110"
align=
"center"
orderField=
"db_type"
class=
""
>
数据类型
</th>
<th
width=
"50"
align=
"center"
orderField=
"show_as_img"
class=
""
>
图片显示
</th>
<th
width=
"110"
align=
"center"
orderField=
"display_type"
class=
""
>
类型
</th>
<th
width=
"50"
align=
"center"
orderField=
"is_require"
class=
""
>
必填
</th>
<th
width=
"110"
align=
"center"
orderField=
"default"
class=
""
>
默认值
</th>
</tr>
</thead>
<tbody>
<?php
foreach
(
$attrs
as
$attr
)
:
?>
<?php
$select_checkbox
=
''
;
$s_sort_order
=
''
;
if
(
is_array
(
$select_attr_ids
))
{
foreach
(
$select_attr_ids
as
$select_attr_id
)
{
if
(
$select_attr_id
[
'attr_id'
]
==
$attr
[
'id'
])
{
$select_checkbox
=
'checked="checked"'
;
$s_sort_order
=
$select_attr_id
[
'sort_order'
];
}
}
}
?>
<tr
target=
"sid_user"
rel=
"
<?=
$attr
[
'id'
]
?>
"
>
<td>
<input
class=
"selected_product_attr"
<?=
$select_checkbox
?>
name=
"ids"
value=
"
<?=
$attr
[
'id'
]
?>
"
type=
"checkbox"
>
</td>
<td><span
title=
""
><input
value=
"
<?=
$s_sort_order
?>
"
class=
"selected_product_sort_order_
<?=
$attr
[
'id'
]
?>
"
type=
"text"
style=
"width: 50px;height: 10px;margin-top: 2px;"
/></span></td>
<td><span
title=
""
>
<?=
$attr
[
'name'
]
?>
</span></td>
<td><span
title=
""
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
$attr
[
'attr_type'
]);
?>
</span></td>
<td><span
title=
""
>
<?=
$attr
[
'status'
]
==
1
?
Yii
::
$service
->
page
->
translate
->
__
(
'Enable'
)
:
Yii
::
$service
->
page
->
translate
->
__
(
'Disable'
)
?>
</span></td>
<td><span
title=
""
>
<?=
$attr
[
'db_type'
]
?>
</span></td>
<td><span
title=
""
>
<?=
$attr
[
'show_as_img'
]
==
1
?
Yii
::
$service
->
page
->
translate
->
__
(
'Yes'
)
:
Yii
::
$service
->
page
->
translate
->
__
(
'No'
)
?>
</span></td>
<td><span
title=
""
>
<?=
$attr
[
'display_type'
]
?>
</span></td>
<td><span
title=
""
>
<?=
$attr
[
'is_require'
]
==
1
?
Yii
::
$service
->
page
->
translate
->
__
(
'Yes'
)
:
Yii
::
$service
->
page
->
translate
->
__
(
'No'
)
?>
</span></td>
<td><span
title=
""
>
<?=
$attr
[
'default'
]
?>
</span></td>
</tr>
<?php
endforeach
;
?>
</tbody>
</table>
</div>
</div>
<div
class=
"formBar"
>
<ul>
<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
<li>
<div
class=
"buttonActive"
><div
class=
"buttonContent"
><button
onclick=
"func('accept')"
value=
"accept"
name=
"accept"
type=
"submit"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Save'
)
?>
</button></div></div>
</li>
<li>
<div
class=
"button"
><div
class=
"buttonContent"
><button
type=
"button"
class=
"close"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Cancel'
)
?>
</button></div></div>
</li>
</ul>
</div>
</form>
</div>
<style>
.edit_p
.items
input
{
width
:
100px
;
}
.edit_remark
p
{
width
:
500px
;
font-size
:
14px
;
line-height
:
30px
;
height
:
auto
;
color
:
#777
;
}
.items
table
thead
tr
th
{
background
:
#ddd
none
repeat
scroll
0
0
;
border
:
1px
solid
#ccc
;
padding
:
4px
10px
;
width
:
100px
;
}
.items
table
tbody
tr
td
{
background
:
#fff
;
border-right
:
1px
solid
#ccc
;
border-bottom
:
1px
solid
#ccc
;
padding
:
3px
;
width
:
100px
;
}
.edit_p
.items
input
{
width
:
100px
;}
</style>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录