Move OC.dialogs to the main bundle
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
2e0199a04a
commit
35d8e7a4e0
|
@ -2,7 +2,6 @@
|
||||||
"libraries": [
|
"libraries": [
|
||||||
],
|
],
|
||||||
"modules": [
|
"modules": [
|
||||||
"oc-dialogs.js",
|
|
||||||
"js.js",
|
"js.js",
|
||||||
"share.js",
|
"share.js",
|
||||||
"sharetemplates.js",
|
"sharetemplates.js",
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -477,12 +477,6 @@ Object.assign(window.OC, {
|
||||||
return path;
|
return path;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Dialog helper for jquery dialogs.
|
|
||||||
*
|
|
||||||
* @namespace OC.dialogs
|
|
||||||
*/
|
|
||||||
dialogs:OCdialogs,
|
|
||||||
/**
|
/**
|
||||||
* Parses a URL query string into a JS map
|
* Parses a URL query string into a JS map
|
||||||
* @param {string} queryString query string in the format param1=1234¶m2=abcde¶m3=xyz
|
* @param {string} queryString query string in the format param1=1234¶m2=abcde¶m3=xyz
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
[
|
[
|
||||||
"oc-dialogs.js",
|
|
||||||
"js.js",
|
"js.js",
|
||||||
"oc-requesttoken.js",
|
"oc-requesttoken.js",
|
||||||
"mimetype.js",
|
"mimetype.js",
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,6 +23,7 @@ import Apps from './apps'
|
||||||
import AppConfig from './appconfig'
|
import AppConfig from './appconfig'
|
||||||
import Backbone from './backbone'
|
import Backbone from './backbone'
|
||||||
import ContactsMenu from './contactsmenu'
|
import ContactsMenu from './contactsmenu'
|
||||||
|
import Dialogs from './dialogs'
|
||||||
import EventSource from './eventsource'
|
import EventSource from './eventsource'
|
||||||
import L10N from './l10n'
|
import L10N from './l10n'
|
||||||
import msg from './msg'
|
import msg from './msg'
|
||||||
|
@ -39,6 +40,7 @@ export default {
|
||||||
AppConfig,
|
AppConfig,
|
||||||
Backbone,
|
Backbone,
|
||||||
ContactsMenu,
|
ContactsMenu,
|
||||||
|
dialogs: Dialogs,
|
||||||
EventSource,
|
EventSource,
|
||||||
L10N,
|
L10N,
|
||||||
msg,
|
msg,
|
||||||
|
|
|
@ -34,6 +34,18 @@ const deprecate = (func, funcName) => {
|
||||||
return newFunc
|
return newFunc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setDeprecatedProp = (global, val, msg) =>
|
||||||
|
Object.defineProperty(window, global, {
|
||||||
|
get: () => {
|
||||||
|
if (msg) {
|
||||||
|
console.warn(`${global} is deprecated: ${msg}`)
|
||||||
|
} else {
|
||||||
|
console.warn(`${global} is deprecated`)
|
||||||
|
}
|
||||||
|
return val
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
import _ from 'underscore'
|
import _ from 'underscore'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
import 'jquery-migrate/dist/jquery-migrate.min'
|
import 'jquery-migrate/dist/jquery-migrate.min'
|
||||||
|
@ -91,6 +103,7 @@ window['md5'] = md5
|
||||||
window['moment'] = moment
|
window['moment'] = moment
|
||||||
|
|
||||||
window['OC'] = OC
|
window['OC'] = OC
|
||||||
|
setDeprecatedProp('OCDialogs', OC.dialogs, 'use OC.dialogs')
|
||||||
window['OCP'] = OCP
|
window['OCP'] = OCP
|
||||||
window['OCA'] = OCA
|
window['OCA'] = OCA
|
||||||
window['escapeHTML'] = deprecate(escapeHTML, 'escapeHTML')
|
window['escapeHTML'] = deprecate(escapeHTML, 'escapeHTML')
|
||||||
|
|
Loading…
Reference in New Issue