Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //- This is unbuffered comment (will not show up in generated HTML) [http://jade-lang.com/reference/comments]
  2.  
  3. h1= title
  4.  
  5. b: p Kategorije izdelkov
  6.  
  7. //- master variable [see index.js, line 45, 49]
  8. ul
  9. each el in master
  10.     li
  11.         <input type="radio" name="group1" value='+el.CategoryID+' onclick='document.location="/index?category=1"'> #{el.CategoryName} (#{el.Description})</input>
  12.        
  13.         - if (selected == el.CategoryID)
  14.             b: a(href= '/index?category='+el.CategoryID) #{el.CategoryName}
  15.         - else
  16.             a(href= '/index?category='+el.CategoryID) #{el.CategoryName}
  17.         //- GET Param.  ^----------------------^
  18.         //- Iteration [http://jade-lang.com/reference/iteration]
  19.         //- Attributes "a(href...)" [http://jade-lang.com/reference/attributes]
  20.         //- Inline JS "#{el.CategoryName}" [http://jade-lang.com/reference/code, see Interpolation]
  21.  
  22. //- detail variable [see index.js, line 45, 49]
  23. if detail != null
  24.     b: p= titleP
  25.    
  26.     <ul>
  27.     <button onclick="dodaj()" background-color:Transparent background-repeat:no-repeat border:none cursor:pointer overflow:hidden outline:none>dodaj</button>
  28.     <button onclick="posodobi()" background-color:Transparent background-repeat:no-repeat border:none cursor:pointer overflow:hidden outline:none>posodobi</button>
  29.     <button onclick="zbrisi()" background-color:Transparent background-repeat:no-repeat border:none cursor:pointer overflow:hidden outline:none>izbriši</button>
  30.     </ul>
  31.     <br></br>
  32.    
  33.     <div>
  34.     <table class='table'><tr><th class ='text-left' align='left'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ime izdelka</th><th class='text-right' align='left'>&nbsp;&nbsp;&nbsp;Cena &nbsp;&nbsp;&nbsp;</th><th class='text-right' align='left'>Zaloga</th></tr>
  35.  
  36.     each el in detail
  37.         <tr><td><input id=el.ProductID onclick="izbranProdukt()" type="radio" name="group2" value=el.ProductID>#{el.ProductName}</td><td class='text-right'>&nbsp;&nbsp;&nbsp;#{el.UnitPrice}&nbsp;&nbsp;&nbsp;</td><td class='text-right'>#{el.UnitsInStock}x</td></input></tr>
  38.         //<table class='table'><tr><th class ='text-left'>#{el.ProductName}</th><th class='text-right'>#{el.UnitPrice} €</th><th class='text-right'>#{el.UnitsInStock}x</th></tr>
  39.         //li= el.ProductName +" "+ el.UnitPrice +" € "+ el.UnitsInStock + "x"
  40.         //- Conditionals [http://jade-lang.com/reference/conditionals]
  41.         //- Iteration [http://jade-lang.com/reference/iteration]
  42.         //- Inline JS "#{el.CompanyName}" [http://jade-lang.com/reference/code, see Buffered Code]
  43.     </table>
  44.     </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement