remove Dashboard Views from user admin
[plstackapi.git] / planetstack / core / xoslib / static / js / helloworld.js
1 // helloworld.js
2 function updateHelloWorldData() {
3     var html = "<table class='table table-bordered table-striped'>";
4     for (var slicekey in xos.slices.models) {
5         slice = xos.slices.models[slicekey]
6         html = html + "<tr><td>" + slice.get("name") + "</td><td>" + slice.get("description") + "</td></tr>";
7     }
8     html = html + "</table>";
9     $('#dynamicTableOfInterestingThings').html(html);
10 }
11
12 $(document).ready(function(){
13     xos.slices.on("change", function() { updateHelloWorldData(); });
14     xos.slices.on("remove", function() { updateHelloWorldData(); });
15     xos.slices.on("sort", function() { updateHelloWorldData();  });
16
17     xos.slices.startPolling();
18 });
19
20 // helloworld.js
21 $(document).ready(function() {
22     $('#submitNewDescription').bind('click', function() {
23         newDescription = $("#newDescription").val();
24         xos.slices.models[0].set("description", newDescription);
25         xos.slices.models[0].save();
26     });
27 });