add image to xoslib
authorScott Baker <smbaker@gmail.com>
Tue, 28 Oct 2014 05:30:28 +0000 (22:30 -0700)
committerScott Baker <smbaker@gmail.com>
Tue, 28 Oct 2014 05:30:28 +0000 (22:30 -0700)
planetstack/core/xoslib/static/js/xoslib/xos-backbone.js

index f18d303..285fb4d 100644 (file)
@@ -7,6 +7,7 @@ if (! window.XOSLIB_LOADED ) {
     SITE_API = "/plstackapi/sites/";
     USER_API = "/plstackapi/users/";
     DEPLOYMENT_API = "/plstackapi/deployments";
+    IMAGE_API = "/plstackapi/images";
 
     SLICEPLUS_API = "/xoslib/slicesplus/";
 
@@ -192,6 +193,11 @@ if (! window.XOSLIB_LOADED ) {
                                                            model: this.deployment});
         this.deployments = new this.deploymentCollection();
 
+        this.image = XOSModel.extend({ urlRoot: IMAGE_API });
+        this.imageCollection = XOSCollection.extend({ urlRoot: IMAGE_API,
+                                                           model: this.image});
+        this.images = new this.imageCollection();
+
         // enhanced REST
         this.slicePlus = XOSModel.extend({ urlRoot: SLICEPLUS_API });
         this.slicePlusCollection = XOSCollection.extend({ urlRoot: SLICEPLUS_API,