You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-11-27 22:18:22 +02:00
Moved scripts to an external js file
This commit is contained in:
@@ -12,6 +12,7 @@ COPY setup.py ./setup.py
|
|||||||
COPY main.py ./main.py
|
COPY main.py ./main.py
|
||||||
COPY flavors /data/master/flavors
|
COPY flavors /data/master/flavors
|
||||||
COPY templates /data/master/templates
|
COPY templates /data/master/templates
|
||||||
|
COPY static ./static
|
||||||
|
|
||||||
#RUN python setup.py https://github.com/mailu/mailu /data
|
#RUN python setup.py https://github.com/mailu/mailu /data
|
||||||
|
|
||||||
|
|||||||
34
setup/static/render.js
Normal file
34
setup/static/render.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
$(document).ready(function() {
|
||||||
|
if ($("#webmail").val() == 'none') {
|
||||||
|
$("#webmail_path").hide();
|
||||||
|
$("#webmail_path").attr("value", "");
|
||||||
|
} else {
|
||||||
|
$("#webmail_path").show();
|
||||||
|
$("#webmail_path").attr("value", "/webmail");
|
||||||
|
}
|
||||||
|
$("#webmail").click(function() {
|
||||||
|
if (this.value == 'none') {
|
||||||
|
$("#webmail_path").hide();
|
||||||
|
$("#webmail_path").attr("value", "");
|
||||||
|
} else {
|
||||||
|
$("#webmail_path").show();
|
||||||
|
$("#webmail_path").attr("value", "/webmail");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
if ($('#admin').prop('checked')) {
|
||||||
|
$("#admin_path").show();
|
||||||
|
$("#admin_path").attr("value", "/admin");
|
||||||
|
}
|
||||||
|
$("#admin").change(function() {
|
||||||
|
if ($(this).is(":checked")) {
|
||||||
|
$("#admin_path").show();
|
||||||
|
$("#admin_path").attr("value", "/admin");
|
||||||
|
} else {
|
||||||
|
$("#admin_path").hide();
|
||||||
|
$("#admin_path").attr("value", "");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -54,25 +54,7 @@ also disable the antivirus if required (it does use aroung 1GB of ram).</p>
|
|||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||||
|
|
||||||
<script type = "text/javascript" language = "javascript">
|
<script type="text/javascript" src="{{ url_for('static', filename='render.js') }}"></script>
|
||||||
$(document).ready(function() {
|
|
||||||
if ($("#webmail").val() == 'none') {
|
|
||||||
$("#webmail_path").hide();
|
|
||||||
$("#webmail_path").attr("value", "");
|
|
||||||
} else {
|
|
||||||
$("#webmail_path").show();
|
|
||||||
$("#webmail_path").attr("value", "/webmail");
|
|
||||||
}
|
|
||||||
$("#webmail").click(function () {
|
|
||||||
if (this.value == 'none') {
|
|
||||||
$("#webmail_path").hide();
|
|
||||||
$("#webmail_path").attr("value", "");
|
|
||||||
} else {
|
|
||||||
$("#webmail_path").show();
|
|
||||||
$("#webmail_path").attr("value", "/webmail");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|||||||
@@ -75,22 +75,6 @@ manage your email domains, users, etc.</p>
|
|||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||||
|
|
||||||
<script type = "text/javascript" language = "javascript">
|
<script type="text/javascript" src="{{ url_for('static', filename='render.js') }}"></script>
|
||||||
$(document).ready(function() {
|
|
||||||
if ($('#admin').prop('checked')) {
|
|
||||||
$("#admin_path").show();
|
|
||||||
$("#admin_path").attr("value", "/admin");
|
|
||||||
}
|
|
||||||
$("#admin").change(function() {
|
|
||||||
if ($(this).is(":checked")) {
|
|
||||||
$("#admin_path").show();
|
|
||||||
$("#admin_path").attr("value", "/admin");
|
|
||||||
} else {
|
|
||||||
$("#admin_path").hide();
|
|
||||||
$("#admin_path").attr("value", "");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|||||||
@@ -54,25 +54,6 @@ also disable the antivirus if required (it does use aroung 1GB of ram).</p>
|
|||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||||
|
|
||||||
<script type = "text/javascript" language = "javascript">
|
<script type="text/javascript" src="{{ url_for('static', filename='render.js') }}"></script>
|
||||||
$(document).ready(function() {
|
|
||||||
if ($("#webmail").val() == 'none') {
|
|
||||||
$("#webmail_path").hide();
|
|
||||||
$("#webmail_path").attr("value", "");
|
|
||||||
} else {
|
|
||||||
$("#webmail_path").show();
|
|
||||||
$("#webmail_path").attr("value", "/webmail");
|
|
||||||
}
|
|
||||||
$("#webmail").click(function () {
|
|
||||||
if (this.value == 'none') {
|
|
||||||
$("#webmail_path").hide();
|
|
||||||
$("#webmail_path").attr("value", "");
|
|
||||||
} else {
|
|
||||||
$("#webmail_path").show();
|
|
||||||
$("#webmail_path").attr("value", "/webmail");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|||||||
Reference in New Issue
Block a user