lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi list,

I'd like to ask some basic question about orbit sample app - todo.

  <body>
  <h1>To-do</h1>
  <ul id="items">
  $items
  </ul>
  <form id = "add" method = "POST" action = "" '/add' }">
  <input id = "title" type = "text" name = "item" size = 30 />
  <input id = "button" type = "submit" value = "Add" />
  </form>
  </body>
  </html>
]===]

todo.items = [===[
  $if{$items|1}[==[
  $items[[
  <li item_id="$id"><input class="item" type="checkbox" $if{$done}[=[checked]=] item_id="$id"/> $title
    <a href = "" class = "remove" item_id = "$id">Remove</a></li>
  ]]
  ]==],[==[Nothing to do!]==]
]===]

This is some part of it.

Let me show you part I don't understand.

  $if{$items|1}[==[
  ................
  ]==],[==[Nothing to do!]==]

And the part below also.

  $items[[
  <li item_id="$id"><input class="item" type="checkbox" $if{$done}[=[checked]=] item_id="$id"/> $title
    <a href = "" class = "remove" item_id = "$id">Remove</a></li>
  ]]

There are parts galore which I don't understand..
But If you give me some hint I believe I can understand about orbit..

Thank you very much in advance!

Journeyer