Fixed data-item attribute
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
module OrderScreen
|
module OrderScreen
|
||||||
open System.Security.Cryptography.Xml
|
open System.Security.Cryptography.Xml
|
||||||
|
open System.Web
|
||||||
open DredgeFramework
|
open DredgeFramework
|
||||||
open DredgePos
|
open DredgePos
|
||||||
open FSharp.Collections
|
open FSharp.Collections
|
||||||
@@ -10,10 +11,9 @@ open Theme
|
|||||||
let htmlAttributes (attributes: Map<string, string>) =
|
let htmlAttributes (attributes: Map<string, string>) =
|
||||||
" " + (attributes
|
" " + (attributes
|
||||||
|> Map.toArray
|
|> Map.toArray
|
||||||
|> Array.map (fun (attribute, value) -> attribute+"="+value)
|
|> Array.map (fun (attribute, value) -> attribute+"=\""+HttpUtility.HtmlEncode value + "\"")
|
||||||
|> String.concat " ")
|
|> String.concat " ")
|
||||||
|
|
||||||
|
|
||||||
let getAllPageGrids () = Entity.getAllInVenue<order_screen_page_group>
|
let getAllPageGrids () = Entity.getAllInVenue<order_screen_page_group>
|
||||||
|> Array.filter(fun pageGroup -> pageGroup.grid_id <> 0)
|
|> Array.filter(fun pageGroup -> pageGroup.grid_id <> 0)
|
||||||
|> Array.map(fun pageGroup -> (Entity.getById<grid> pageGroup.grid_id), pageGroup)
|
|> Array.map(fun pageGroup -> (Entity.getById<grid> pageGroup.grid_id), pageGroup)
|
||||||
@@ -24,11 +24,7 @@ let getImageButtonData (button: button) =
|
|||||||
|
|
||||||
let extraData =
|
let extraData =
|
||||||
map [
|
map [
|
||||||
"data-item-code", item.item_code
|
"data-item", jsonEncode item
|
||||||
"data-item-price", item.price1.ToString()
|
|
||||||
"data-item-name", item.item_name
|
|
||||||
"data-item-type", item.item_type
|
|
||||||
"data-item-category", item.item_category.ToString()
|
|
||||||
] |> htmlAttributes
|
] |> htmlAttributes
|
||||||
|
|
||||||
{|
|
{|
|
||||||
|
|||||||
Reference in New Issue
Block a user