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.
65 lines
2.2 KiB
65 lines
2.2 KiB
// Generated by CoffeeScript 1.9.1 |
|
(function() { |
|
var XMLDeclaration, XMLNode, create, isObject, |
|
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |
|
hasProp = {}.hasOwnProperty; |
|
|
|
create = require('lodash/object/create'); |
|
|
|
isObject = require('lodash/lang/isObject'); |
|
|
|
XMLNode = require('./XMLNode'); |
|
|
|
module.exports = XMLDeclaration = (function(superClass) { |
|
extend(XMLDeclaration, superClass); |
|
|
|
function XMLDeclaration(parent, version, encoding, standalone) { |
|
var ref; |
|
XMLDeclaration.__super__.constructor.call(this, parent); |
|
if (isObject(version)) { |
|
ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; |
|
} |
|
if (!version) { |
|
version = '1.0'; |
|
} |
|
this.version = this.stringify.xmlVersion(version); |
|
if (encoding != null) { |
|
this.encoding = this.stringify.xmlEncoding(encoding); |
|
} |
|
if (standalone != null) { |
|
this.standalone = this.stringify.xmlStandalone(standalone); |
|
} |
|
} |
|
|
|
XMLDeclaration.prototype.toString = function(options, level) { |
|
var indent, newline, offset, pretty, r, ref, ref1, ref2, space; |
|
pretty = (options != null ? options.pretty : void 0) || false; |
|
indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; |
|
offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; |
|
newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; |
|
level || (level = 0); |
|
space = new Array(level + offset + 1).join(indent); |
|
r = ''; |
|
if (pretty) { |
|
r += space; |
|
} |
|
r += '<?xml'; |
|
r += ' version="' + this.version + '"'; |
|
if (this.encoding != null) { |
|
r += ' encoding="' + this.encoding + '"'; |
|
} |
|
if (this.standalone != null) { |
|
r += ' standalone="' + this.standalone + '"'; |
|
} |
|
r += '?>'; |
|
if (pretty) { |
|
r += newline; |
|
} |
|
return r; |
|
}; |
|
|
|
return XMLDeclaration; |
|
|
|
})(XMLNode); |
|
|
|
}).call(this);
|
|
|