coffeescript-ui
Version:
Coffeescript User Interface System
77 lines (58 loc) • 1.46 kB
text/coffeescript
###
* coffeescript-ui - Coffeescript User Interface System (CUI)
* Copyright (c) 2013 - 2016 Programmfabrik GmbH
* MIT Licence
* https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org
###
class CUI.ListViewHeaderColumn extends CUI.ListViewColumn
initOpts: ->
super()
#
spacer:
check: Boolean
rotate_90:
check: Boolean
label:
check: (v) ->
if CUI.util.isPlainObject(v) or v instanceof CUI.Label
true
else
false
return
readOpts: ->
super()
if instanceof CUI.Label
=
else if
.rotate_90 =
= new CUI.defaults.class.Label()
setElement: () ->
super()
if
listView = .getListView()
if not listView.hasResizableColumns()
return
coldef = listView.getColdef()
if coldef == "fixed"
return
move_handle = CUI.dom.element("DIV", class: "cui-lv-col-resize-handle")
new CUI.ListViewColResize
element: move_handle
row:
column: @
CUI.dom.append(, move_handle)
render: ->
if
arr = [ CUI.dom.div("cui-tree-node-spacer") ]
else
arr = []
if
arr.push()
else if
arr.push()
arr