mirror of
https://github.com/nextcloud/passman.git
synced 2025-09-12 07:54:45 +08:00
chore: Remove deprecated and removed API from mocks
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
1acfd2a4ed
commit
735df00f02
1 changed files with 0 additions and 52 deletions
|
@ -348,58 +348,6 @@ var OC={
|
||||||
return result.join('/');
|
return result.join('/');
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Load a script for the server and load it. If the script is already loaded,
|
|
||||||
* the event handler will be called directly
|
|
||||||
* @param {string} app the app id to which the script belongs
|
|
||||||
* @param {string} script the filename of the script
|
|
||||||
* @param ready event handler to be called when the script is loaded
|
|
||||||
*/
|
|
||||||
addScript:function(app,script,ready){
|
|
||||||
var deferred, path=OC.filePath(app,'js',script+'.js');
|
|
||||||
if(!OC.addScript.loaded[path]){
|
|
||||||
if(ready){
|
|
||||||
deferred=$.getScript(path,ready);
|
|
||||||
}else{
|
|
||||||
deferred=$.getScript(path);
|
|
||||||
}
|
|
||||||
OC.addScript.loaded[path]=deferred;
|
|
||||||
}else{
|
|
||||||
if(ready){
|
|
||||||
ready();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return OC.addScript.loaded[path];
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
addStyle:function(app,style){
|
|
||||||
var path=OC.filePath(app,'css',style+'.css');
|
|
||||||
if(OC.addStyle.loaded.indexOf(path)===-1){
|
|
||||||
OC.addStyle.loaded.push(path);
|
|
||||||
if (document.createStyleSheet) {
|
|
||||||
document.createStyleSheet(path);
|
|
||||||
} else {
|
|
||||||
style=$('<link rel="stylesheet" type="text/css" href="'+path+'"/>');
|
|
||||||
$('head').append(style);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Loads translations for the given app asynchronously.
|
|
||||||
*
|
|
||||||
* @param {String} app app name
|
|
||||||
* @param {Function} callback callback to call after loading
|
|
||||||
* @return {Promise}
|
|
||||||
*/
|
|
||||||
addTranslations: function(app, callback) {
|
|
||||||
return OC.L10N.load(app, callback);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the base name of the given path.
|
* Returns the base name of the given path.
|
||||||
* For example for "/abc/somefile.txt" it will return "somefile.txt"
|
* For example for "/abc/somefile.txt" it will return "somefile.txt"
|
||||||
|
|
Loading…
Add table
Reference in a new issue