This app provides monitoring and information features for the common freifunk user and the technical stuff of a freifunk community.
Code base is taken from a TUM Practical Course project and added here to see if Freifunk Altdorf can use it.
https://www.freifunk-altdorf.de
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
929 B
32 lines
929 B
var SVGParser = require('./core'); |
|
var Slick = require('../../lib/slick/Source/slick').Slick; |
|
var SheetCascade = require('../../lib/Sheet.Cascade').SheetCascade; |
|
|
|
var applyStyles = SVGParser.prototype.applyStyles; |
|
|
|
SVGParser.implement({ |
|
|
|
applyStyles: function(element, target){ |
|
this.findCSS(element.ownerDocument).applyStyle(element, target); |
|
for (var key in target) |
|
if (target.hasOwnProperty(key) && target[key] == 'inherit') |
|
delete target[key]; |
|
if (target.hasOwnProperty('fill')) target['fill_document'] = element.ownerDocument; |
|
applyStyles.call(this, element, target); |
|
}, |
|
|
|
findCSS: function(document){ |
|
if (this.cssDocument != document){ |
|
this.cssDocument = document; |
|
var css = this.css = new SheetCascade(); |
|
var sheets = Slick.search(document, 'style'); |
|
for (var i = 0, l = sheets.length; i < l; i++){ |
|
css.addSheet(sheets[i]); |
|
} |
|
return css; |
|
} else { |
|
return this.css; |
|
} |
|
} |
|
|
|
});
|
|
|