Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
82107c0d
Commit
82107c0d
authored
Mar 14, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't ever remove the _super obj
parent
e87731f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
src/converse-core.js
src/converse-core.js
+7
-10
No files found.
src/converse-core.js
View file @
82107c0d
...
@@ -2056,20 +2056,14 @@
...
@@ -2056,20 +2056,14 @@
return
this
;
return
this
;
};
};
this
.
wrappedOverride
=
function
(
key
,
value
,
super_method
,
clean
)
{
this
.
wrappedOverride
=
function
(
key
,
value
,
super_method
)
{
// We create a partially applied wrapper function, that
// We create a partially applied wrapper function, that
// makes sure to set the proper super method when the
// makes sure to set the proper super method when the
// overriding method is called. This is done to enable
// overriding method is called. This is done to enable
// chaining of plugin methods, all the way up to the
// chaining of plugin methods, all the way up to the
// original method.
// original method.
var
ret
;
if
(
clean
)
{
converse
.
_super
=
{
'
converse
'
:
converse
};
}
this
.
_super
[
key
]
=
super_method
;
this
.
_super
[
key
]
=
super_method
;
ret
=
value
.
apply
(
this
,
_
.
rest
(
arguments
,
4
));
return
value
.
apply
(
this
,
_
.
rest
(
arguments
,
3
));
if
(
clean
)
{
delete
this
.
_super
;
}
return
ret
;
};
};
this
.
_overrideAttribute
=
function
(
key
,
plugin
)
{
this
.
_overrideAttribute
=
function
(
key
,
plugin
)
{
...
@@ -2078,7 +2072,7 @@
...
@@ -2078,7 +2072,7 @@
if
(
typeof
value
===
"
function
"
)
{
if
(
typeof
value
===
"
function
"
)
{
var
wrapped_function
=
_
.
partial
(
var
wrapped_function
=
_
.
partial
(
converse
.
wrappedOverride
.
bind
(
converse
),
converse
.
wrappedOverride
.
bind
(
converse
),
key
,
value
,
converse
[
key
].
bind
(
converse
)
,
true
key
,
value
,
converse
[
key
].
bind
(
converse
)
);
);
converse
[
key
]
=
wrapped_function
;
converse
[
key
]
=
wrapped_function
;
}
else
{
}
else
{
...
@@ -2102,7 +2096,7 @@
...
@@ -2102,7 +2096,7 @@
// original method.
// original method.
var
wrapped_function
=
_
.
partial
(
var
wrapped_function
=
_
.
partial
(
converse
.
wrappedOverride
,
converse
.
wrappedOverride
,
key
,
value
,
obj
.
prototype
[
key
]
,
false
key
,
value
,
obj
.
prototype
[
key
]
);
);
obj
.
prototype
[
key
]
=
wrapped_function
;
obj
.
prototype
[
key
]
=
wrapped_function
;
}
else
{
}
else
{
...
@@ -2112,6 +2106,9 @@
...
@@ -2112,6 +2106,9 @@
};
};
this
.
initializePlugins
=
function
()
{
this
.
initializePlugins
=
function
()
{
if
(
typeof
converse
.
_super
===
'
undefined
'
)
{
converse
.
_super
=
{
'
converse
'
:
converse
};
}
var
updateSettings
=
function
(
settings
)
{
var
updateSettings
=
function
(
settings
)
{
/* Helper method which gets put on the plugin and allows it to
/* Helper method which gets put on the plugin and allows it to
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment