summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-04-21 14:42:50 +0200
committerLukas Reschke <lukas@statuscode.ch>2014-04-21 14:42:50 +0200
commit51eee3dec1a52656fdfc6834de5c61c615d110d2 (patch)
treed002c5c73e0d16c4cd55cac55a930d260b21fed1 /core/js
parent8fcffae1e2448cfa04297aa028801db5a00e6073 (diff)
downloadnextcloud-server-51eee3dec1a52656fdfc6834de5c61c615d110d2.tar.gz
nextcloud-server-51eee3dec1a52656fdfc6834de5c61c615d110d2.zip
Fix JSDoc
Diffstat (limited to 'core/js')
-rw-r--r--core/js/eventsource.js12
-rw-r--r--core/js/js.js18
-rw-r--r--core/js/oc-requesttoken.js5
-rw-r--r--core/js/tags.js49
4 files changed, 43 insertions, 41 deletions
diff --git a/core/js/eventsource.js b/core/js/eventsource.js
index 536b180bc8f..70fd3192ba1 100644
--- a/core/js/eventsource.js
+++ b/core/js/eventsource.js
@@ -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();
}
}
-}
+};
diff --git a/core/js/js.js b/core/js/js.js
index ff6538f9824..76fe973fa5d 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -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(".");
diff --git a/core/js/oc-requesttoken.js b/core/js/oc-requesttoken.js
index 0d7f40c592a..02175a3d674 100644
--- a/core/js/oc-requesttoken.js
+++ b/core/js/oc-requesttoken.js
@@ -1,4 +1,3 @@
-$(document).on('ajaxSend',function(elm, xhr, s) {
+$(document).on('ajaxSend',function(elm, xhr) {
xhr.setRequestHeader('requesttoken', oc_requesttoken);
-});
-
+}); \ No newline at end of file
diff --git a/core/js/tags.js b/core/js/tags.js
index bc2b42bf5ff..32a930259a6 100644
--- a/core/js/tags.js
+++ b/core/js/tags.js
@@ -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) {