]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix JSDoc
authorLukas Reschke <lukas@statuscode.ch>
Mon, 21 Apr 2014 12:42:50 +0000 (14:42 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Mon, 21 Apr 2014 12:42:50 +0000 (14:42 +0200)
core/js/eventsource.js
core/js/js.js
core/js/oc-requesttoken.js
core/js/tags.js

index 536b180bc8f9d5ca989a864d21cc2304ca72e462..70fd3192ba159f7ba11c59e96e1ce9ca9143afd9 100644 (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();
                }
        }
-}
+};
index ff6538f98243d9d9b399b2f3f2bc067dd3e141b0..76fe973fa5da51a2b54a867721558538b07f3f88 100644 (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} 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(".");
index 0d7f40c592abfc3fa139e2eca29b67209fa859af..02175a3d674d9968a6a3dc8a43a023661b7ebc85 100644 (file)
@@ -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
index bc2b42bf5ff58f4dbbf5c102c7a6ecc602ec87e4..32a930259a6cbe12cc9ea6d3aaf29a1028c11c28 100644 (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) {