mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Updated jquery.concrete
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92538 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f60e94b1ca
commit
241bff3df9
12
thirdparty/jquery-concrete/jquery.concrete.js
vendored
12
thirdparty/jquery-concrete/jquery.concrete.js
vendored
@ -106,13 +106,11 @@ var console;
|
|||||||
namespaces[name] = this;
|
namespaces[name] = this;
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.$ = function() {
|
this.$ = function() {
|
||||||
var jq = $.apply(window, arguments);
|
var jq = $.apply(window, arguments);
|
||||||
jq.namespace = self;
|
jq.namespace = self;
|
||||||
return jq;
|
return jq;
|
||||||
}
|
}
|
||||||
$.extend(this.$, $);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -163,7 +161,15 @@ var console;
|
|||||||
build_jquery_injection: function(name) {
|
build_jquery_injection: function(name) {
|
||||||
if (!$.fn[name]) {
|
if (!$.fn[name]) {
|
||||||
$.fn[name] = function() {
|
$.fn[name] = function() {
|
||||||
var namespace = (this.namespace && this.namespace.proxies[name]) ? this.namespace : namespaces.__base;
|
// Try bound namespace
|
||||||
|
var namespace = this.namespace;
|
||||||
|
// If that doesn't exist, or doesn't have function, try root namespace
|
||||||
|
if (!namespace || !namespace.proxies[name]) namespace = namespaces.__base;
|
||||||
|
// If that doesn't exist, throw error
|
||||||
|
if (!namespace.proxies[name]) {
|
||||||
|
throw new ReferenceError('Concrete function '+name+' not found in ' + (this.namespace ? ('namespace '+this.namespace.name+' or root namespace') : 'root namespace'));
|
||||||
|
}
|
||||||
|
|
||||||
namespace.__context = null;
|
namespace.__context = null;
|
||||||
return namespace.proxies[name].apply(this, arguments);
|
return namespace.proxies[name].apply(this, arguments);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user