Skip to content

Commit

Permalink
屏蔽测试代码
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTong committed May 18, 2016
1 parent 494e6ab commit 7f3cc5a
Show file tree
Hide file tree
Showing 9 changed files with 414 additions and 88 deletions.
2 changes: 1 addition & 1 deletion build-configs.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports =
data:
version: "0.0.1",
packageName: "",
contextPath: "/",
contextPath: "/yiduizhang",
htmlSuffix: ".html",
language: "zh-CN",
currency: ""
Expand Down
146 changes: 73 additions & 73 deletions public/frame/main-top.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,80 +13,80 @@ cola((model)->
content: appName
}))

model.set("menus", [
{
icon: "iconfont icon-yonghuguanli",
label: "销售管理",
menus: [
{
icon: "iconfont icon-yonghuliebiao",
label: "销售订单",
menus: [
{
label: "全部订单"
},
{
label: "未完成订单"
},
{
label: "未收款订单"
}
]
}, {
icon: "iconfont icon-yonghuguanli",
label: "销售收款",
menus: [
{
label: "全部对账单"
},
{
label: "已收款对账单"
}
]
}, {
icon: "iconfont icon-zhucerenzheng",
label: "销售提成",
menus: [
{
label: "全部提成"
},
{
label: "未分配提成"
},
{
label: "已分配提成"
}
]
}
]
},
{
icon: "iconfont icon-yonghuguanli",
label: "用户管理",
menus: [
{
icon: "iconfont icon-yonghuliebiao",
label: "用户列表"
},
{
icon: "iconfont icon-yonghuguanli",
label: "用户组"
},
{
icon: "iconfont icon-zhucerenzheng",
label: "职位管理"
},
{
icon: "iconfont icon-03",
label: "批量邀请"
}
]
}])
# model.set("menus", [
# {
# icon: "iconfont icon-yonghuguanli",
# label: "销售管理",
# menus: [
# {
# icon: "iconfont icon-yonghuliebiao",
# label: "销售订单",
# menus: [
# {
# label: "全部订单"
# },
# {
# label: "未完成订单"
# },
# {
# label: "未收款订单"
# }
# ]
# }, {
# icon: "iconfont icon-yonghuguanli",
# label: "销售收款",
# menus: [
# {
# label: "全部对账单"
# },
# {
# label: "已收款对账单"
# }
# ]
# }, {
# icon: "iconfont icon-zhucerenzheng",
# label: "销售提成",
# menus: [
# {
# label: "全部提成"
# },
# {
# label: "未分配提成"
# },
# {
# label: "已分配提成"
# }
# ]
# }
# ]
# },
# {
# icon: "iconfont icon-yonghuguanli",
# label: "用户管理",
# menus: [
# {
# icon: "iconfont icon-yonghuliebiao",
# label: "用户列表"
# },
# {
# icon: "iconfont icon-yonghuguanli",
# label: "用户组"
# },
# {
# icon: "iconfont icon-zhucerenzheng",
# label: "职位管理"
# },
# {
# icon: "iconfont icon-03",
# label: "批量邀请"
# }
# ]
# }])

# model.describe("menus", {
# provider:
# url: App.prop("service.menus")
# })
model.describe("menus", {
provider:
url: App.prop("service.menus")
})


model.describe("user", {
Expand Down
100 changes: 100 additions & 0 deletions views/example/custom-dropdown-tree.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
extends ../.cola
append head
style.
.current > .tree.node .node-operation {
display: inline-block;
}
.node-operation {
display: none;
float: right;
padding-right: 0.5em;
}
.node-operation i{
margin-right: 0.5em;
}

block body
#treeDropDown
append scripts
script.
cola(function (model) {
model.set("node", {
nodes: [
{
name: "中国",
nodes: [
{
name: "上海",
nodes: [
{
name: "浦东新区"
},
{
name: "杨浦"
},
{
name: "松江"
}, {
name: "徐汇区"
}
]
}, {
name: "内蒙古",
nodes: [
{
name: "兴安盟"
}, {
name: "通辽"
}, {
name: "锡林郭勒"
}, {
name: "呼伦贝尔"
}, {
name: "赤峰"
}
]
}
]
}
]
});


model.widgetConfig({
treeDropDown: {
$type: "customDropdown",
openMode: "drop",
valueProperty: "name",
dropDownHeight:400,
content: {
$type: "tree",
tag:"dropdownTree",
autoCollapse: false,
autoExpand: true,

highlightCurrentItem: true,
bind: {
recursive: true,
expandedProperty: "expanded",
textProperty: "name",
expression: "node in node.nodes"
},
itemClick: function (self, arg) {
var dropdown = cola.findDropDown(self);

if (dropdown) dropdown.close(arg.item.get("data"));
}
},
open:function(self,arg){
var tree=cola.tag("dropdownTree")[0];
var value=self.get("value");
var node=model.get("node");
console.log(node)
debugger;
tree.findNode()
}

}

});
});
14 changes: 14 additions & 0 deletions views/example/mapping.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
extends ../.cola
append head

block body
.ui.fragment(style="height: 100%; ")
.ui.form(style="width:400px")
.two.fields
.field
#MappingDropDown
.field
div(c-widget="button; caption:测试; click:showValue")
#ProductTable
append scripts
script(src="./example/mapping.js")
23 changes: 23 additions & 0 deletions views/example/table.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
extends ../.cola
append head
link(rel="stylesheet", type="text/css", href="./example/table.css")
block body
.ui.fragment(style="height: 100%; ")
div.secondary(c-widget="menu")
a(c-widget="item; caption:获得已选列表; click:getSelections")
div#productTable
template(name="productName")
div.product-name
span(c-bind="item.name")
template(name="select")
div
div(c-widget="checkbox;class:in-cell;bind:item.selected;" c-display="!selectable(item)")
template(name="price")
div
div.mini(c-widget="input; bind:item.unitPrice; blur:blur")
span.btn
i.edit.icon
span(c-bind="formatNumber(item.unitPrice, '¥#,##0.00')")

append scripts
script(src="./example/table.js")
Loading

0 comments on commit 7f3cc5a

Please sign in to comment.