juan_gandhi: (VP)
[personal profile] juan_gandhi
from VERY expensive contractors


lazy val chartData = JArray(List(
("label" -> "Enabled") ~ ("data" -> enabled) ~ ("color" -> "#78c063"),
("label" -> "Not Enabled") ~ ("data" -> (total - enabled)) ~ ("color" -> "#f7d975")))

def render: CssSel =
".cname" #> name.getOrElse("") &
".total [href]" #> link &
".count-total *" #> total &
".count-enabled *" #> enabled &
".count-active *" #> active &
".count-not-enabled *" #> (total - enabled) &
".count-not-active *" #> (total - active) &
".enabled-pc *" #> asPercent(enabled.toDouble / total.toDouble) &
".chart-data" #> <lift:tail>{ Script(JsCrVar("clients_enabled", chartData) & OnLoad(Run("""$.plot($("#clients-enabled-chart"), clients_enabled, donut_options)"""))) }</lift:tail>

}

Date: 2015-11-11 06:56 am (UTC)
From: [identity profile] vit-r.livejournal.com
Умный контрактник делает такой код, чтобы кроме него никто в нём не разобрался.

Date: 2015-11-11 07:35 am (UTC)
From: [identity profile] errorrishe.livejournal.com
Job security же

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

June 2025

S M T W T F S
1 2345 6 7
8 9 10 11 121314
15161718 1920 21
222324252627 28
29 30     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 3rd, 2025 11:37 pm
Powered by Dreamwidth Studios