easywebhub / easyapp

More information and tutorials, please visit our website
https://easywebhub.com
0 stars 3 forks source link

Thêm type Selection (dropbox) cho phần Setting #27

Open baotnq opened 8 years ago

baotnq commented 8 years ago

Một số dữ liệu trong Content users sẽ lựa chọn 1 giá trị có sẵn trong danh sách có sẵn, gọi chung là Selection type

Danh sách giá trị có sẵn để users lựa chọn sẽ định nghĩa theo json format

[
   { 
       "name" : "",
       "value" : ""
   },
   { 
       "name" : "",
       "value" : ""
   },
]

Trong trường hợp type khác, như text, object, array, chúng ta sẽ gọi là default value

Chúng ta sẽ bổ sung thêm type dữ liệu này vào trong phần Config, có thể thực hiện như hình đính kèm

ewa-selection-type

nemesisqp commented 8 years ago

implemented in 4948f7f1595063d8d951b062151a5ec15977e020 mới chỉ cho Text với Number image image

baotnq commented 7 years ago
baotnq commented 7 years ago

bị lỗi với Selection phần Text, lúc trước thì OK

nemesisqp commented 7 years ago

em mới test nó bt mà anh, anh quang cái *.config.json của layout bi lỗi lên đây đi

baotnq commented 7 years ago

test với standard

error-selection

baotnq commented 7 years ago
[
    {
        "name": "title",
        "displayName": "title",
        "type": "Text",
        "validations": [],
        "viewOnly": false,
        "required": false
    },
    {
        "name": "slug",
        "displayName": "slug",
        "type": "Text",
        "validations": [],
        "viewOnly": false,
        "required": false
    },
    {
        "name": "header",
        "displayName": "header",
        "type": "Text",
        "validations": [],
        "viewOnly": false,
        "required": false
    },
    {
        "name": "description",
        "displayName": "description",
        "type": "Text",
        "validations": [],
        "viewOnly": false,
        "required": false
    },
    {
        "name": "layout",
        "displayName": "layout",
        "type": "Text",
        "validations": [],
        "viewOnly": true,
        "required": false
    },
    {
        "name": "permalink",
        "displayName": "permalink",
        "type": "Boolean",
        "validations": [],
        "required": false
    }
]
nemesisqp commented 7 years ago

ah cái type Selection là cũ, quên xóa đi sau khi add DisplayType DropDown, removed in master