summaryrefslogtreecommitdiffstats
path: root/web/layout
diff options
context:
space:
mode:
Diffstat (limited to 'web/layout')
-rw-r--r--web/layout/default.html11
-rw-r--r--web/layout/stacked.html10
-rw-r--r--web/layout/stacked.js14
-rw-r--r--web/layout/tabular.html6
-rw-r--r--web/layout/tabular.js29
5 files changed, 27 insertions, 43 deletions
diff --git a/web/layout/default.html b/web/layout/default.html
new file mode 100644
index 0000000..2c52777
--- /dev/null
+++ b/web/layout/default.html
@@ -0,0 +1,11 @@
+<!--
+ Copyright (c) 2012-2015 Kaarle Ritvanen
+ See LICENSE file for license details
+-->
+
+<ng-form name="form" ui-sortable="sortable" ng-model="fields">
+ <aconf-widget ng-repeat="field in fields"
+ field="field"
+ form-field="form[field.name]">
+ </aconf-widget>
+</ng-form>
diff --git a/web/layout/stacked.html b/web/layout/stacked.html
new file mode 100644
index 0000000..8fda2a1
--- /dev/null
+++ b/web/layout/stacked.html
@@ -0,0 +1,10 @@
+<!--
+ Copyright (c) 2012-2015 Kaarle Ritvanen
+ See LICENSE file for license details
+-->
+
+<div ui-sortable="sortable">
+ <div ng-repeat="field in fields" aconf-field="field">
+ <ng-include src="'widget/inline.html'"></ng-include>
+ </div>
+</div>
diff --git a/web/layout/stacked.js b/web/layout/stacked.js
deleted file mode 100644
index acff8a6..0000000
--- a/web/layout/stacked.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2012-2014 Kaarle Ritvanen
- * See LICENSE file for license details
- */
-
-define(["aconf/type", "aconf/widget/inline"], function(type, Base) {
- return Base.extend({
- widget: function(meta) {
- return type.isTreeNode(meta) ? Base : Base.widget.call(this, meta);
- }
- });
-});
-
-
diff --git a/web/layout/tabular.html b/web/layout/tabular.html
new file mode 100644
index 0000000..deb33df
--- /dev/null
+++ b/web/layout/tabular.html
@@ -0,0 +1,6 @@
+<!--
+ Copyright (c) 2012-2015 Kaarle Ritvanen
+ See LICENSE file for license details
+-->
+
+<aconf-tabular-layout></aconf-tabular-layout>
diff --git a/web/layout/tabular.js b/web/layout/tabular.js
deleted file mode 100644
index db849e8..0000000
--- a/web/layout/tabular.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2012-2014 Kaarle Ritvanen
- * See LICENSE file for license details
- */
-
-define(
- [
- "aconf/type",
- "aconf/widget/inline",
- "aconf/widget/table/header",
- "aconf/widget/table/row"
- ],
- function(type, Base, TableHeader, TableRow) {
- return Base.extend({
- render: function(data, meta) {
- this.header = true;
- Base.render.call(this, data, meta);
- },
-
- widget: function(meta) {
- if (!type.isTreeNode(meta))
- return Base.widget.call(this, meta);
- if (!this.header) return TableRow;
- this.header = false;
- return TableHeader;
- }
- });
- }
-);