afterDelete working in tenant view
diff --git a/planetstack/core/xoslib/static/js/xosTenant.js b/planetstack/core/xoslib/static/js/xosTenant.js
index 6f73046..5a548ed 100644
--- a/planetstack/core/xoslib/static/js/xosTenant.js
+++ b/planetstack/core/xoslib/static/js/xosTenant.js
@@ -42,7 +42,7 @@
                      },
 
             deleteClicked: function(e) {
-                     this.options.linkedView.deleteClicked.call(this.options.linkedView, e);
+                     XOSTenantApp.deleteSlice(this.options.linkedView.model);
                      },
 
             addUserClicked: function(e) {
@@ -156,6 +156,11 @@
     $("#tenant-addslice-dialog").dialog("open");

 };

 

+XOSTenantApp.deleteSlice = function(model) {

+    var app=this;

+    app.deleteDialog(model, function() { console.log("afterDelete"); app.viewSlice(undefined); });

+};

+

 XOSTenantApp.viewSlice = function(model) {

     if (!model && xos.slicesPlus.models.length > 0) {

         model = xos.slicesPlus.models[0];

diff --git a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
index 4ec75a6..9f9964c 100644
--- a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
+++ b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
@@ -400,6 +400,8 @@
             that.destroyModel(model);
             if (afterDelete=="list") {
                 that.navigate("list", modelName);
+            } else if (afterDelete) {
+                afterDelete();
             }
         });
     },
diff --git a/planetstack/core/xoslib/templates/xosAdmin.html b/planetstack/core/xoslib/templates/xosAdmin.html
index ac90e94..53b9fe6 100644
--- a/planetstack/core/xoslib/templates/xosAdmin.html
+++ b/planetstack/core/xoslib/templates/xosAdmin.html
@@ -228,11 +228,17 @@
   </div>
 </script>
 
-<script type="text/template" id="xos-datatable-spinner-template">
+<script type="text/template" id="xos-datatable-spinner-template-old">
     <!-- arguments: value, id, collectionName, fieldName -->
     <%= value %> <a href='#increase/<%= collectionName %>/<%= id %>/<%= fieldName %>'>more</a> <a href='#decrease/<%= collectionName %>/<%= id %>/<%= fieldName %>'>less</a>
 </script>
 
+<script type="text/template" id="xos-datatable-spinner-template">
+    <!-- arguments: value, id, collectionName, fieldName -->
+    <%= value %> <a href="javascript:undefined" onclick='<%= app.varName %>.adjustCollectionField("<%= collectionName %>", <%= id %>, "<%= fieldName %>", 1)'> more </a>
+                 <a href="javascript:undefined" onclick='<%= app.varName %>.adjustCollectionField("<%= collectionName %>", <%= id %>, "<%= fieldName %>", -1)'> less </a>
+</script>
+
 <script type="text/template" id="xos-spinner-template">
     <!-- arguments: fieldName, id, value -->
     <input name="<%= fieldName %>" class="xos-spinner" id="<%= id %>">