bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js
function(_name, id) {
			//return the deferred so client can chain on post-processing
			var data = {};
			data.Id = id;
			return _xhr("POST", this.workspaceBase, {
				headers: {
					"Orion-Version": "1",
					"Content-Type": "application/json;charset=UTF-8",
					"Slug": form.encodeSlug(_name)
				},
				data: JSON.stringify(data),
				timeout: 15000
			}).then(function(result) {
				var jsonData = result.response ? JSON.parse(result.response) : {};
				return jsonData;
			});
		}
function(_name, id) {
			//return the deferred so client can chain on post-processing
			var data = {};
			data.Id = id;
			return _xhr("POST", this.workspaceBase, {
				headers: {
					"Orion-Version": "1",
					"Content-Type": "application/json;charset=UTF-8",
					"Slug": form.encodeSlug(_name)
				},
				data: JSON.stringify(data),
				timeout: 15000
			}).then(function(result) {
				var jsonData = result.response ? JSON.parse(result.response) : {};
				return jsonData;
			});
		}
function ( _name , id ) { //return the deferred so client can chain on post-processing var data = { } ; data . Id = id ; return _xhr ( "POST" , this . workspaceBase , { headers : { "Orion-Version" : "1" , "Content-Type" : "application/json;charset=UTF-8" , "Slug" : form . encodeSlug ( _name ) } , data : JSON . stringify ( data ) , timeout : 15000 } ) . then ( function ( result ) { var jsonData = result . response ? JSON . parse ( result . response ) : { } ; return jsonData ; } ) ; }
Creates a new workspace with the given name. The resulting workspace is
passed as a parameter to the provided onCreate function.
@param {String} _name The name of the new workspace
Creates a new workspace with the given name . The resulting workspace is passed as a parameter to the provided onCreate function .