Move attribution handling to seperate file.

This commit is contained in:
David Molineus committed 2015-01-27 15:51:42 +01:00
1 parent 50cf8312d2
commit e10bfd24a3
3 files changed
+20 -23

No files matched your search

-22
View File
@@ -297,28 +297,6 @@ L.Contao = L.Class.extend({
}
});
/**
* Attribution handling.
*/
L.Contao.Attribution = {
setPrefix: function(prefix) {
if (prefix.indexOf(L.Contao.ATTRIBUTION) === -1) {
prefix += L.Contao.ATTRIBUTION;
}
this.options.prefix = prefix;
this._update();
return this;
}
};
L.Control.Attribution.addInitHook(function() {
this.options.prefix += L.Contao.ATTRIBUTION;
});
L.Control.Attribution.include(L.Contao.Attribution);
/**
* Start Contao integration.
*/
+19
View File
@@ -0,0 +1,19 @@
/**
* Attribution handling.
*/
L.Control.Attribution.addInitHook(function() {
this.options.prefix += L.Contao.ATTRIBUTION;
});
L.Control.Attribution.include({
setPrefix: function (prefix) {
if (prefix.indexOf(L.Contao.ATTRIBUTION) === -1) {
prefix += L.Contao.ATTRIBUTION;
}
this.options.prefix = prefix;
this._update();
return this;
}
});