Fix JSDoc

This commit is contained in:
Lukas Reschke 2014-04-21 14:42:50 +02:00
parent 8fcffae1e2
commit 51eee3dec1
4 changed files with 43 additions and 41 deletions

View File

@ -27,9 +27,9 @@
*/
/**
* create a new event source
* @param string src
* @param object data to be send as GET
* Create a new event source
* @param {string} src
* @param {object} [data] to be send as GET
*/
OC.EventSource=function(src,data){
var dataStr='';
@ -74,12 +74,12 @@ OC.EventSource=function(src,data){
this.close();
}
}.bind(this));
}
};
OC.EventSource.fallBackSources=[];
OC.EventSource.iframeCount=0;//number of fallback iframes
OC.EventSource.fallBackCallBack=function(id,type,data){
OC.EventSource.fallBackSources[id].fallBackCallBack(type,data);
}
};
OC.EventSource.prototype={
typelessListeners:[],
iframe:null,
@ -127,4 +127,4 @@ OC.EventSource.prototype={
this.source.close();
}
}
}
};

View File

@ -147,7 +147,7 @@ function n(app, text_singular, text_plural, count, vars) {
/**
* Sanitizes a HTML string by replacing all potential dangerous characters with HTML entities
* @param {string} String to sanitize
* @param {string} s String to sanitize
* @return {string} Sanitized string
*/
function escapeHTML(s) {
@ -207,7 +207,7 @@ var OC={
/**
* Generates the absolute url for the given relative url, which can contain parameters.
* @param {string} URL
* @param {string} url
* @param params
* @return {string} Absolute URL for the given relative URL
*/
@ -281,8 +281,8 @@ var OC={
* Redirect to the target URL, can also be used for downloads.
* @param {string} targetURL URL to redirect to
*/
redirect: function(targetUrl) {
window.location = targetUrl;
redirect: function(targetURL) {
window.location = targetURL;
},
/**
@ -304,7 +304,7 @@ var OC={
* Load a script for the server and load it. If the script is already loaded,
* the event handeler will be called directly
* @param {string} app the app id to which the script belongs
* @param {string} script the filename of the script
* @param {string} script the filename of the script
* @param ready event handeler to be called when the script is loaded
*/
addScript:function(app,script,ready){
@ -326,7 +326,7 @@ var OC={
/**
* Loads a CSS file
* @param {string} app the app id to which the css style belongs
* @param {string} style the filename of the css file
* @param {string} style the filename of the css file
*/
addStyle:function(app,style){
var path=OC.filePath(app,'css',style+'.css');
@ -1188,7 +1188,7 @@ $.fn.filterAttr = function(attr_name, attr_value) {
/**
* Returns a human readable filesize
* @param {number} Size in bytes
* @param {number} size Size in bytes
* @return {string}
*/
function humanFileSize(size) {
@ -1235,7 +1235,7 @@ function getURLParameter(name) {
/**
* Takes an absolute timestamp and return a string with a human-friendly relative date
* @param {number} A Unix timestamp
* @param {number} timestamp A Unix timestamp
*/
function relative_modified_date(timestamp) {
var timediff = Math.round((new Date()).getTime() / 1000) - timestamp;
@ -1344,7 +1344,7 @@ OC.get=function(name) {
/**
* Set a variable by name
* @param {string} name
* @param mixed value
* @param {*} value
*/
OC.set=function(name, value) {
var namespaces = name.split(".");

View File

@ -1,4 +1,3 @@
$(document).on('ajaxSend',function(elm, xhr, s) {
$(document).on('ajaxSend',function(elm, xhr) {
xhr.setRequestHeader('requesttoken', oc_requesttoken);
});

View File

@ -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
*/
getIdsForTag:function(type, tag) {
@ -80,8 +81,8 @@ OC.Tags= {
return defer.promise();
},
/**
* @param string type
* @return jQuery.Promise which resolves with an array of ids
* @param {string} type
* @return {*} jQuery.Promise which resolves with an array of ids
*/
getFavorites:function(type) {
if(!type && !this.type) {
@ -101,8 +102,8 @@ OC.Tags= {
return defer.promise();
},
/**
* @param string type
* @return jQuery.Promise which resolves with an array of id/name objects
* @param {string} type
* @return {*} jQuery.Promise which resolves with an array of id/name objects
*/
getTags:function(type) {
if(!type && !this.type) {
@ -122,9 +123,10 @@ OC.Tags= {
return defer.promise();
},
/**
* @param int id
* @param string type
* @return jQuery.Promise
* @param {number} id
* @param {string} tag
* @param {string} type
* @return {*} jQuery.Promise
*/
tagAs:function(id, tag, type) {
if(!type && !this.type) {
@ -146,9 +148,10 @@ OC.Tags= {
return defer.promise();
},
/**
* @param int id
* @param string type
* @return jQuery.Promise
* @param {number} id
* @param {string} tag
* @param {string} type
* @return {*} jQuery.Promise
*/
unTag:function(id, tag, type) {
if(!type && !this.type) {
@ -170,9 +173,9 @@ OC.Tags= {
return defer.promise();
},
/**
* @param int id
* @param string type
* @return jQuery.Promise
* @param {number} id
* @param {string} type
* @return {*} jQuery.Promise
*/
addToFavorites:function(id, type) {
if(!type && !this.type) {
@ -194,9 +197,9 @@ OC.Tags= {
return defer.promise();
},
/**
* @param int id
* @param string type
* @return jQuery.Promise
* @param {number} id
* @param {string} type
* @return {*} jQuery.Promise
*/
removeFromFavorites:function(id, type) {
if(!type && !this.type) {
@ -218,9 +221,9 @@ OC.Tags= {
return defer.promise();
},
/**
* @param string tag
* @param string type
* @return jQuery.Promise which resolves with an object with the name and the new id
* @param {string} tag
* @param {string} type
* @return {*} jQuery.Promise which resolves with an object with the name and the new id
*/
addTag:function(tag, type) {
if(!type && !this.type) {
@ -245,9 +248,9 @@ OC.Tags= {
return defer.promise();
},
/**
* @param array tags
* @param string type
* @return jQuery.Promise
* @param {array} tags
* @param {string} type
* @return {*} jQuery.Promise
*/
deleteTags:function(tags, type) {
if(!type && !this.type) {