aboutsummaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js')
-rw-r--r--core/js/js.js32
1 files changed, 24 insertions, 8 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 95889ac8a27..6e0a405114b 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -88,7 +88,7 @@ var OC={
PERMISSION_DELETE:8,
PERMISSION_SHARE:16,
webroot:oc_webroot,
- appswebroots:oc_appswebroots,
+ appswebroots:(typeof oc_appswebroots !== 'undefined') ? oc_appswebroots:false,
currentUser:(typeof oc_current_user!=='undefined')?oc_current_user:false,
coreApps:['', 'admin','log','search','settings','core','3rdparty'],
/**
@@ -101,6 +101,27 @@ var OC={
return OC.filePath(app,'',file);
},
/**
+ * Creates an url for remote use
+ * @param string $service id
+ * @return string the url
+ *
+ * Returns a url to the given service.
+ */
+ linkToRemoteBase:function(service) {
+ return OC.webroot + '/remote.php/' + service;
+ },
+ /**
+ * @brief Creates an absolute url for remote use
+ * @param string $service id
+ * @param bool $add_slash
+ * @return string the url
+ *
+ * Returns a absolute url to the given service.
+ */
+ linkToRemote:function(service) {
+ return window.location.protocol + '//' + window.location.host + OC.linkToRemoteBase(service);
+ },
+ /**
* get the absolute url for a file in an app
* @param app the id of the app
* @param type the type of the file to link to (e.g. css,img,ajax.template)
@@ -504,6 +525,7 @@ function fillHeight(selector) {
if(selector.outerHeight() > selector.height()){
selector.css('height', height-(selector.outerHeight()-selector.height()) + 'px');
}
+ console.warn("This function is deprecated! Use CSS instead");
}
/**
@@ -519,17 +541,11 @@ function fillWindow(selector) {
if(selector.outerWidth() > selector.width()){
selector.css('width', width-(selector.outerWidth()-selector.width()) + 'px');
}
+ console.warn("This function is deprecated! Use CSS instead");
}
$(document).ready(function(){
- $(window).resize(function () {
- fillHeight($('#leftcontent'));
- fillWindow($('#content'));
- fillWindow($('#rightcontent'));
- });
- $(window).trigger('resize');
-
if(!SVGSupport()){ //replace all svg images with png images for browser that dont support svg
replaceSVG();
}else{