diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ffluci.uci | 14 | ||||
-rw-r--r-- | contrib/media/cascade.css | 19 | ||||
-rw-r--r-- | contrib/media/cbi.js | 36 | ||||
-rw-r--r-- | contrib/package/ffluci/Makefile | 1 |
4 files changed, 57 insertions, 13 deletions
diff --git a/contrib/ffluci.uci b/contrib/ffluci.uci index ecd72f6ed3..c887b1b33e 100644 --- a/contrib/ffluci.uci +++ b/contrib/ffluci.uci @@ -4,13 +4,13 @@ config core main config public contact - option nickname - - option name - - option mail - - option phone - - option location - - option geo - - option note - + option nickname + option name + option mail + option phone + option location + option geo + option note config event uci_oncommit diff --git a/contrib/media/cascade.css b/contrib/media/cascade.css index b0131dc581..55d6f76bd1 100644 --- a/contrib/media/cascade.css +++ b/contrib/media/cascade.css @@ -179,27 +179,31 @@ code { margin-top: 1em; } -.cbi-section-create { - margin-bottom: 3em; +.cbi-section-remove { + text-align: right; } .cbi-value-title { line-height: 1.75em; + width: 15em; + font-weight: bold; } .cbi-value-field { - margin-left: 10em; - text-align: center; + text-align: left; line-height: 1.75em; } -.cbi-value-field input, .cbi-value-field select, .cbi-optionals select, .cbi-optionals input { +.cbi-value-field input, .cbi-value-field select, +.cbi-optionals select, .cbi-optionals input, +.cbi-section-remove input, .cbi-section-create input { font-size: 0.8em; } .cbi-value-description { font-style: italic; font-size: 0.8em; + margin-bottom: 0.5em; } .cbi-form-separator { @@ -211,6 +215,7 @@ code { background: #f7f7f7; border: 1px solid #d7d7d7; overflow: auto; + margn-bottom: 0%; } .cbi-section-node h3 { @@ -220,10 +225,12 @@ code { .cbi-error { color: red; font-weight: bold; + font-size: 0.8em; + margin-bottom: 0.75em; } .cbi-optionals { - margin-top: 2em; + margin-top: 1em; } .cbi-optionals option { diff --git a/contrib/media/cbi.js b/contrib/media/cbi.js new file mode 100644 index 0000000000..f9e463bca1 --- /dev/null +++ b/contrib/media/cbi.js @@ -0,0 +1,36 @@ +var cbi_d = {}; + +function cbi_d_add(field, target, value) { + if (!cbi_d[target]) { + cbi_d[target] = {}; + } + if (!cbi_d[target][value]) { + cbi_d[target][value] = []; + } + cbi_d[target][value].push(field); +} + +function cbi_d_update(target) { + if (!cbi_d[target]) { + return; + } + + for (var x in cbi_d[target]) { + for (var i=0; i<cbi_d[target][x].length; i++) { + document.getElementById(cbi_d[target][x][i]).style.display = "none"; + } + } + + var t = document.getElementById(target); + if (t && t.value && cbi_d[target][t.value]) { + for (var i=0; i<cbi_d[target][t.value].length; i++) { + document.getElementById(cbi_d[target][t.value][i]).style.display = "block"; + } + } +} + +function cbi_d_init() { + for (var x in cbi_d) { + cbi_d_update(x); + } +}
\ No newline at end of file diff --git a/contrib/package/ffluci/Makefile b/contrib/package/ffluci/Makefile index 677c865ce1..f57a5da792 100644 --- a/contrib/package/ffluci/Makefile +++ b/contrib/package/ffluci/Makefile @@ -35,6 +35,7 @@ define Package/ffluci/install $(INSTALL_DIR) $(1)/usr/lib/lua $(INSTALL_DIR) $(1)/www/cgi-bin $(INSTALL_DIR) $(1)/www/ffluci + $(INSTALL_DIR) $(1)/etc/config $(CP) $(PKG_BUILD_DIR)/dist/* $(1)/usr/lib/lua/ -R $(CP) $(PKG_BUILD_DIR)/contrib/media $(1)/www/ffluci/ -R $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/ffluci $(1)/www/cgi-bin |