Skip to content
Snippets Groups Projects
Commit f353e6f6 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #8286 from owncloud/use-proper-jsdoc

Use proper JSDoc documentation instead of inconsistent documentation styles
parents 54873c7a 381c1c8b
Branches
No related tags found
No related merge requests found
...@@ -20,16 +20,16 @@ ...@@ -20,16 +20,16 @@
*/ */
/** /**
* wrapper for server side events (http://en.wikipedia.org/wiki/Server-sent_events) * Wrapper for server side events (http://en.wikipedia.org/wiki/Server-sent_events)
* includes a fallback for older browsers and IE * includes a fallback for older browsers and IE
* *
* use server side events with causion, to many open requests can hang the server * Use server side events with caution, too many open requests can hang the server
*/ */
/** /**
* create a new event source * Create a new event source
* @param string src * @param {string} src
* @param object data to be send as GET * @param {object} [data] to be send as GET
*/ */
OC.EventSource=function(src,data){ OC.EventSource=function(src,data){
var dataStr=''; var dataStr='';
...@@ -74,12 +74,12 @@ OC.EventSource=function(src,data){ ...@@ -74,12 +74,12 @@ OC.EventSource=function(src,data){
this.close(); this.close();
} }
}.bind(this)); }.bind(this));
} };
OC.EventSource.fallBackSources=[]; OC.EventSource.fallBackSources=[];
OC.EventSource.iframeCount=0;//number of fallback iframes OC.EventSource.iframeCount=0;//number of fallback iframes
OC.EventSource.fallBackCallBack=function(id,type,data){ OC.EventSource.fallBackCallBack=function(id,type,data){
OC.EventSource.fallBackSources[id].fallBackCallBack(type,data); OC.EventSource.fallBackSources[id].fallBackCallBack(type,data);
} };
OC.EventSource.prototype={ OC.EventSource.prototype={
typelessListeners:[], typelessListeners:[],
iframe:null, iframe:null,
...@@ -127,4 +127,4 @@ OC.EventSource.prototype={ ...@@ -127,4 +127,4 @@ OC.EventSource.prototype={
this.source.close(); this.source.close();
} }
} }
} };
This diff is collapsed.
$(document).on('ajaxSend',function(elm, xhr, s) { $(document).on('ajaxSend',function(elm, xhr) {
xhr.setRequestHeader('requesttoken', oc_requesttoken); xhr.setRequestHeader('requesttoken', oc_requesttoken);
}); });
\ No newline at end of file
...@@ -59,7 +59,8 @@ OC.Tags= { ...@@ -59,7 +59,8 @@ OC.Tags= {
}); });
}, },
/** /**
* @param string type * @param {string} type
* @param {string} tag
* @return jQuery.Promise which resolves with an array of ids * @return jQuery.Promise which resolves with an array of ids
*/ */
getIdsForTag:function(type, tag) { getIdsForTag:function(type, tag) {
...@@ -80,8 +81,8 @@ OC.Tags= { ...@@ -80,8 +81,8 @@ OC.Tags= {
return defer.promise(); return defer.promise();
}, },
/** /**
* @param string type * @param {string} type
* @return jQuery.Promise which resolves with an array of ids * @return {*} jQuery.Promise which resolves with an array of ids
*/ */
getFavorites:function(type) { getFavorites:function(type) {
if(!type && !this.type) { if(!type && !this.type) {
...@@ -101,8 +102,8 @@ OC.Tags= { ...@@ -101,8 +102,8 @@ OC.Tags= {
return defer.promise(); return defer.promise();
}, },
/** /**
* @param string type * @param {string} type
* @return jQuery.Promise which resolves with an array of id/name objects * @return {*} jQuery.Promise which resolves with an array of id/name objects
*/ */
getTags:function(type) { getTags:function(type) {
if(!type && !this.type) { if(!type && !this.type) {
...@@ -122,9 +123,10 @@ OC.Tags= { ...@@ -122,9 +123,10 @@ OC.Tags= {
return defer.promise(); return defer.promise();
}, },
/** /**
* @param int id * @param {number} id
* @param string type * @param {string} tag
* @return jQuery.Promise * @param {string} type
* @return {*} jQuery.Promise
*/ */
tagAs:function(id, tag, type) { tagAs:function(id, tag, type) {
if(!type && !this.type) { if(!type && !this.type) {
...@@ -146,9 +148,10 @@ OC.Tags= { ...@@ -146,9 +148,10 @@ OC.Tags= {
return defer.promise(); return defer.promise();
}, },
/** /**
* @param int id * @param {number} id
* @param string type * @param {string} tag
* @return jQuery.Promise * @param {string} type
* @return {*} jQuery.Promise
*/ */
unTag:function(id, tag, type) { unTag:function(id, tag, type) {
if(!type && !this.type) { if(!type && !this.type) {
...@@ -170,9 +173,9 @@ OC.Tags= { ...@@ -170,9 +173,9 @@ OC.Tags= {
return defer.promise(); return defer.promise();
}, },
/** /**
* @param int id * @param {number} id
* @param string type * @param {string} type
* @return jQuery.Promise * @return {*} jQuery.Promise
*/ */
addToFavorites:function(id, type) { addToFavorites:function(id, type) {
if(!type && !this.type) { if(!type && !this.type) {
...@@ -194,9 +197,9 @@ OC.Tags= { ...@@ -194,9 +197,9 @@ OC.Tags= {
return defer.promise(); return defer.promise();
}, },
/** /**
* @param int id * @param {number} id
* @param string type * @param {string} type
* @return jQuery.Promise * @return {*} jQuery.Promise
*/ */
removeFromFavorites:function(id, type) { removeFromFavorites:function(id, type) {
if(!type && !this.type) { if(!type && !this.type) {
...@@ -218,9 +221,9 @@ OC.Tags= { ...@@ -218,9 +221,9 @@ OC.Tags= {
return defer.promise(); return defer.promise();
}, },
/** /**
* @param string tag * @param {string} tag
* @param string type * @param {string} type
* @return jQuery.Promise which resolves with an object with the name and the new id * @return {*} jQuery.Promise which resolves with an object with the name and the new id
*/ */
addTag:function(tag, type) { addTag:function(tag, type) {
if(!type && !this.type) { if(!type && !this.type) {
...@@ -245,9 +248,9 @@ OC.Tags= { ...@@ -245,9 +248,9 @@ OC.Tags= {
return defer.promise(); return defer.promise();
}, },
/** /**
* @param array tags * @param {array} tags
* @param string type * @param {string} type
* @return jQuery.Promise * @return {*} jQuery.Promise
*/ */
deleteTags:function(tags, type) { deleteTags:function(tags, type) {
if(!type && !this.type) { if(!type && !this.type) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment