mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
+1
-1
@@ -8,13 +8,13 @@ body {
|
||||
div.row {
|
||||
clear: both;
|
||||
padding-top: 10px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
div.row label {
|
||||
float: left;
|
||||
width: 120px;
|
||||
padding: 3px 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
input {
|
||||
|
||||
@@ -3,7 +3,8 @@ var DynamicTextInput = new Class({
|
||||
Implements: [Options],
|
||||
|
||||
options: {
|
||||
parentContainer: null
|
||||
parentContainer: null,
|
||||
containerLevel: 1
|
||||
},
|
||||
|
||||
initialize: function(targets, options) {
|
||||
@@ -68,7 +69,11 @@ var DynamicTextInput = new Class({
|
||||
"margin-top": "2px"
|
||||
});
|
||||
if (!this.options.parentContainer) {
|
||||
field[0].inject(this.target.getParent(), "after");
|
||||
var container = this.target;
|
||||
for (var i = 0; i < this.options.containerLevel; i++) {
|
||||
container = container.getParent()
|
||||
}
|
||||
field[0].inject(container, "after");
|
||||
} else {
|
||||
field[0].inject(this.options.parentContainer);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
<script type="text/javascript" src="{{ MEDIA_URL }}js/Autocompleter.Request.js"></script>
|
||||
<script type="text/javascript">
|
||||
function init_form() {
|
||||
var dti = new DynamicTextInput($$("input[name=targets]"));
|
||||
var dti = new DynamicTextInput($$("input[name=targets]"), {
|
||||
containerLevel: 2
|
||||
});
|
||||
|
||||
new Autocompleter.Request.JSON("id_targets",
|
||||
"{% url admin.views.mailboxes_search %}", {
|
||||
|
||||
Reference in New Issue
Block a user