1 (function (GCN) { 2 3 'use strict'; 4 5 /** 6 * @TODO (petro): Where is this constant used. Can it be removed? 7 * 8 * @const 9 * @type {number} 10 */ 11 var TYPE_ID = 10011; 12 13 /** 14 * @private 15 * @const 16 * @type {object.<string, boolean>} Default image settings. 17 */ 18 var DEFAULT_SETTINGS = { 19 // Load image for updating 20 update: true 21 }; 22 23 /** 24 * <strong>WARNING!</strong> The ImageAPI object is currently not implemented. 25 * 26 * @class 27 * @name ImageAPI 28 * @extends FileAPI 29 * 30 * @param {number|string} 31 * id of the image to be loaded 32 * @param {function(ContentObjectAPI))=} 33 * success Optional success callback that will receive this 34 * object as its only argument. 35 * @param {function(GCNError):boolean=} 36 * error Optional custom error handler. 37 * @param {object} 38 * settings currently there are no additional settings to be used 39 */ 40 var ImageAPI = GCN.defineChainback({ 41 42 __chainbacktype__: 'ImageAPI', 43 _extends: GCN.FileAPI, 44 _type: 'image', 45 46 /** 47 * writable properties for the page object 48 */ 49 WRITEABLE_PROPS: ['cdate', 50 'description', 51 'folderId', // @TODO Check if moving is implemented 52 // correctly. 53 'name' ], 54 55 /** 56 * @see ContentObjectAPI.!_loadParams 57 */ 58 '!_loadParams': function () { 59 return jQuery.extend(DEFAULT_SETTINGS, this._settings); 60 } 61 }); 62 63 /** 64 * Creates a new instance of ImageAPI. See the {@link ImageAPI} constructor for detailed information. 65 * 66 * @function 67 * @name image 68 * @memberOf GCN 69 * @see ImageAPI 70 */ 71 GCN.image = GCN.exposeAPI(ImageAPI); 72 GCN.ImageAPI = ImageAPI; 73 74 }(GCN)); 75