summaryrefslogtreecommitdiffstats
path: root/web/dom.js
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-04-21 23:48:54 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2016-04-19 15:25:49 +0300
commita693a0459c176b86e17d536584d0c1c527f92857 (patch)
treef9cfd749454f1e24c14400741d403bb1f1388ce8 /web/dom.js
parentbe803d679f7a51f93194c86e37168c651471031b (diff)
downloadaconf-14fbca8df55671dcc09f6b0381e4ebad3712a90c.tar.bz2
aconf-14fbca8df55671dcc09f6b0381e4ebad3712a90c.tar.xz
web client: refactor using AngularJS and Bootstrapv0.6.0
Diffstat (limited to 'web/dom.js')
-rw-r--r--web/dom.js47
1 files changed, 0 insertions, 47 deletions
diff --git a/web/dom.js b/web/dom.js
deleted file mode 100644
index f11c933..0000000
--- a/web/dom.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2012-2014 Kaarle Ritvanen
- * See LICENSE file for license details
- */
-
-define(["aconf/navigation", "jquery", "underscore"], function(navi, $, _) {
- function href() {
- return $("<a>").attr({href: "javascript:void(0);"});
- }
-
- return {
- setText: function(el, s) {
- el.html(_.map(s.split("\n"), _.escape).join("<br/>"));
- },
-
- href: href,
-
- objectRef: function(value, el) {
- el = el || href();
- if (value) {
- el.click(function() { navi.setPath(value); }).text("Show");
- }
- return el;
- },
-
- button: function(label, func) {
- return $("<input>").attr(
- {type: "submit", value: label}
- ).click(func);
- },
-
- makeRow: function(el) {
- if (el.is("td")) return $("<tr>").html(el);
- return el;
- },
-
- setStatus: function(el, status) {
- el.removeClass();
- if (status) el.addClass(status);
- },
-
- setVisible: function(el, visible) {
- if (visible) el.show();
- else el.hide();
- }
- };
-});