Browse Source

Move OC.dialogs to the main bundle

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pull/15294/head
Christoph Wurst 7 years ago
parent
commit
35d8e7a4e0
No known key found for this signature in database GPG Key ID: CC42AC2A7F0E56D8
  1. 1
      core/js/core.json
  2. 106
      core/js/dist/main.js
  3. 2
      core/js/dist/main.js.map
  4. 6
      core/js/js.js
  5. 1
      core/js/merged-template-prepend.json
  6. 560
      core/src/OC/dialogs.js
  7. 2
      core/src/OC/index.js
  8. 15
      core/src/globals.js

1
core/js/core.json

@ -2,7 +2,6 @@
"libraries": [
],
"modules": [
"oc-dialogs.js",
"js.js",
"share.js",
"sharetemplates.js",

106
core/js/dist/main.js
File diff suppressed because it is too large
View File

2
core/js/dist/main.js.map
File diff suppressed because it is too large
View File

6
core/js/js.js

@ -477,12 +477,6 @@ Object.assign(window.OC, {
return path;
},
/**
* Dialog helper for jquery dialogs.
*
* @namespace OC.dialogs
*/
dialogs:OCdialogs,
/**
* Parses a URL query string into a JS map
* @param {string} queryString query string in the format param1=1234&param2=abcde&param3=xyz

1
core/js/merged-template-prepend.json

@ -1,5 +1,4 @@
[
"oc-dialogs.js",
"js.js",
"oc-requesttoken.js",
"mimetype.js",

560
core/src/OC/dialogs.js
File diff suppressed because it is too large
View File

2
core/src/OC/index.js

@ -23,6 +23,7 @@ import Apps from './apps'
import AppConfig from './appconfig'
import Backbone from './backbone'
import ContactsMenu from './contactsmenu'
import Dialogs from './dialogs'
import EventSource from './eventsource'
import L10N from './l10n'
import msg from './msg'
@ -39,6 +40,7 @@ export default {
AppConfig,
Backbone,
ContactsMenu,
dialogs: Dialogs,
EventSource,
L10N,
msg,

15
core/src/globals.js

@ -20,7 +20,7 @@
*/
/**
*
*
* @param {Function} func the library to deprecate
* @param {String} funcName the name of the library
*/
@ -34,6 +34,18 @@ const deprecate = (func, funcName) => {
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 'jquery'
import 'jquery-migrate/dist/jquery-migrate.min'
@ -91,6 +103,7 @@ window['md5'] = md5
window['moment'] = moment
window['OC'] = OC
setDeprecatedProp('OCDialogs', OC.dialogs, 'use OC.dialogs')
window['OCP'] = OCP
window['OCA'] = OCA
window['escapeHTML'] = deprecate(escapeHTML, 'escapeHTML')

Loading…
Cancel
Save