From 6ebc43650554f41eee2ae715b99a178b9c75c532 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 30 Apr 2014 17:42:35 +0200 Subject: Added sharing overview page (WIP) - added sharing overview entries in the sidebar - use OCS Share API to get the list of files --- core/js/js.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index 3c3efc469bf..44b0a1a39af 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -211,7 +211,16 @@ var OC={ linkToRemote:function(service) { return window.location.protocol + '//' + window.location.host + OC.linkToRemoteBase(service); }, - + + /** + * Gets the base path for the given OCS API service. + * @param {string} service name + * @return {string} OCS API base path + */ + linkToOCS: function(service) { + return window.location.protocol + '//' + window.location.host + OC.webroot + '/ocs/v1.php/' + service + '/'; + }, + /** * Generates the absolute url for the given relative url, which can contain parameters. * @param {string} url -- cgit v1.2.3 From c9d05c66de06290c8c6a8fde06f35652ad796f48 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 23 May 2014 16:14:02 +0200 Subject: Fix IE8 issue when icon is not defined Sometimes no icon file is passed to replaceSVGIcon(), it showed an error in IE8 and broke the code flow. This fix adds a check whether the file name is set. --- core/js/js.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index 44b0a1a39af..e31f67cca9c 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1250,7 +1250,7 @@ OC.Util = { * @return {string} fixed image path with png extension if SVG is not supported */ replaceSVGIcon: function(file) { - if (!OC.Util.hasSVGSupport()) { + if (file && !OC.Util.hasSVGSupport()) { var i = file.lastIndexOf('.svg'); if (i >= 0) { file = file.substr(0, i) + '.png' + file.substr(i+4); -- cgit v1.2.3