Guest User

Untitled

a guest
Feb 9th, 2015
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.68 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4.     <title></title>
  5.     <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
  6.     <script src="radioApp.js"></script>
  7.     <script src="radioController.js"></script>
  8. </head>
  9. <body ng-app="radioApp">
  10.     <div ng-controller="radioController">
  11.         <table>
  12.             <tr ng-repeat="x in model | orderBy: 'ID'">
  13.                 <th ng-click="toTop(model.indexOf(x))" ng-show="model.indexOf(x) > 0">↑</th>
  14.                 <th ng-show="model.indexOf(x) === 0"> </th>
  15.                 <th ng-click="toBottom(model.indexOf(x))" ng-show="model.indexOf(x) < model.length - 1"></th>
  16.                 <th ng-show="model.indexOf(x) === model.length - 1"> </th>
  17.                 <th><input type="radio" name="test" /></th>
  18.                 <th ng-show="!x.edit"><div ng-click="edit(model.indexOf(x))">{{ x.value }}</div></th>
  19.                 <th ng-show="x.edit">
  20.                     <input type="text" value="{{ x.value }}" ng-model="x.value"/>
  21.                 </th>
  22.                 <th ng-show="!x.edit">
  23.                     <button ng-click="edit(model.indexOf(x))">Edytuj</button>
  24.                     <button ng-click="delete(model.indexOf(x))">Usuń</button>
  25.                 </th>
  26.                 <th ng-show="x.edit">
  27.                     <button ng-click="cancel(model.indexOf(x))">Anuluj</button>
  28.                     <button ng-click="save(x)">Zapisz</button>
  29.                 </th>
  30.             </tr>
  31.         </table>
  32.         <div>
  33.             <input ng-model="newItem" type="text"/>
  34.             <button ng-click="add()">Dodaj</button>
  35.         </div>
  36.     </div>
  37. </body>
  38. </html>
Advertisement
Add Comment
Please, Sign In to add comment