Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 774375dd
authored
Sep 30, 2016
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issues
1 parent
83135a9b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
code/moya-web/WebContent/product/editProductOptionGroup.xhtml
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/shop/ProductView.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
View file @
774375d
...
@@ -271,6 +271,10 @@ public class MenuBean implements MenuBeanLocal {
...
@@ -271,6 +271,10 @@ public class MenuBean implements MenuBeanLocal {
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/list"
),
ShopPermission
.
LIST_ALL_PRODUCTS
);
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/list"
),
ShopPermission
.
LIST_ALL_PRODUCTS
);
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/create"
),
ShopPermission
.
MANAGE_PRODUCTS
);
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/create"
),
ShopPermission
.
MANAGE_PRODUCTS
);
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/edit"
),
ShopPermission
.
MANAGE_PRODUCTS
).
setVisible
(
false
);
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/edit"
),
ShopPermission
.
MANAGE_PRODUCTS
).
setVisible
(
false
);
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/editDiscount"
),
ShopPermission
.
MANAGE_PRODUCTS
).
setVisible
(
false
);
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/editLimit"
),
ShopPermission
.
MANAGE_PRODUCTS
).
setVisible
(
false
);
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/editProductOptionGroup"
),
ShopPermission
.
MANAGE_PRODUCTS
).
setVisible
(
false
);
adminShopProducts
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/product/createDiscount"
),
ShopPermission
.
MANAGE_PRODUCTS
).
setVisible
(
false
);
MenuNavigation
foodnavi
=
adminshop
.
addPage
(
null
,
null
);
MenuNavigation
foodnavi
=
adminshop
.
addPage
(
null
,
null
);
foodnavi
.
setKey
(
"topnavi.foodwave"
);
foodnavi
.
setKey
(
"topnavi.foodwave"
);
...
...
code/moya-web/WebContent/product/editProductOptionGroup.xhtml
View file @
774375d
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<p:inputNumber
value=
"#{option.priority}"
/>
<p:inputNumber
value=
"#{option.priority}"
/>
</p:column>
</p:column>
<p:column
headerText=
"setAsDefault"
>
<p:column
headerText=
"setAsDefault"
>
<p:commandButton
value=
"#{i18n['option.setAsDefault']}"
update=
"optionGroup:defaultName"
action=
"#{productView.setDefaultOption(option
.id)}"
rendered=
"#{option.id ne null and option.id ne 0
}"
/>
<p:commandButton
value=
"#{i18n['option.setAsDefault']}"
update=
"optionGroup:defaultName"
action=
"#{productView.setDefaultOption(option
)
}"
/>
</p:column>
</p:column>
<!-- TODO: EI IMPLEMENTOITU VIELA MYYNTIPUOLELLE!!!!!
<!-- TODO: EI IMPLEMENTOITU VIELA MYYNTIPUOLELLE!!!!!
<p:column headerText="priceChange">
<p:column headerText="priceChange">
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/shop/ProductView.java
View file @
774375d
...
@@ -268,10 +268,8 @@ public class ProductView extends GenericCDIView {
...
@@ -268,10 +268,8 @@ public class ProductView extends GenericCDIView {
return
"/product/edit"
;
return
"/product/edit"
;
}
}
public
void
setDefaultOption
(
int
id
)
{
public
void
setDefaultOption
(
ProductOption
option
)
{
for
(
ProductOption
o
:
productOptionGroup
.
getOptions
())
{
if
(
option
!=
null
)
if
(
o
.
getId
()
==
id
)
productOptionGroup
.
setDefaultOption
(
option
);
productOptionGroup
.
setDefaultOption
(
o
);
}
}
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment