Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
baletu committed Nov 7, 2023
1 parent 3c81381 commit 7a0e71a
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 52 deletions.
2 changes: 1 addition & 1 deletion simpleui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


def get_version():
return '2023.08.28'
return '2023.11.15'
37 changes: 32 additions & 5 deletions simpleui/static/admin/simpleui-x/css/base.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion simpleui/static/admin/simpleui-x/css/base.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 38 additions & 8 deletions simpleui/static/admin/simpleui-x/css/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,32 @@
}

#content {
padding: 20px;
background-color: white;
margin: 20px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
padding: 0;
}

#content-main{

.page-header{
margin-top: 0;
margin-bottom: 20px;
background-color: white;
padding: 20px;
}

.module{
margin:20px;
margin-bottom: 0;
padding: 10px;
//顶部圆角
border-radius: 10px 10px 0 0;
}
.submit-row{
margin:20px;
margin-top: 0;
background-color: white!important;
padding: 10px;
}
}
.simpleui-form-item {
display: inline-block;
width: auto;
Expand Down Expand Up @@ -79,9 +99,9 @@ a:link, a:visited {
}

.object-tools {
margin-top: 0px;
margin-top: 0;
position: absolute;
top: 30px;
top: 13px;
right: 30px;
}

Expand All @@ -105,7 +125,12 @@ tbody tr:hover td, tbody tr:hover th {
.form-row {
border-bottom: none !important;
}
.submit-row{
padding-bottom: 20px!important;
display: flex;
justify-content: space-between;

}
.submit-row input[type='submit'] {
height: auto;
}
Expand Down Expand Up @@ -145,7 +170,7 @@ tbody tr:hover td, tbody tr:hover th {
}
}

@bg-color: #f1f1f1;
@bg-color: #f1f4f6;

body,
#container {
Expand Down Expand Up @@ -242,7 +267,12 @@ body,
:root {
--error-fg: red!important;
}

#user_form{
background-color: white;
margin: 10px;
padding: 10px;
color: #5a9cf8;
}
/*django新特性 主题适配*/
@media (prefers-color-scheme: dark) {
:root {
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions simpleui/templates/admin/change_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
</el-dialog>
{% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %}

<el-button @click="go_url('{% add_preserved_filters history_url %}')" class="historylink el-button--small"
icon="fas fa-history">{% trans "History" %}
<el-button @click="go_url('{% add_preserved_filters history_url %}')" class="historylink el-button--small" type="text">
<span class="fas fa-history" style="margin-right: 5px"></span>
{% trans "History" %}
</el-button>
</li>
{% if has_absolute_url %}
Expand Down
5 changes: 4 additions & 1 deletion simpleui/templates/admin/object_history.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@
body, #container {
background: #FFF!important;
}
.history-table{
width: 100%;
}
</style>
<div id="content-main">
<div class="module">

{% if action_list %}
<table id="change-history" class="layui-table">
<table id="change-history" class="history-table">
<thead>
<tr>
<th scope="col">{% trans 'Date/time' %}</th>
Expand Down
67 changes: 35 additions & 32 deletions simpleui/templates/admin/submit_line.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
{% load i18n admin_urls simpletags%}
<div class="submit-row">
{% if '_popup' not in request.GET %}
<el-button size="small" type="button" icon="el-icon-arrow-left" onclick="prev()"
style="float: left;margin-right: 10px;margin-bottom: 10px;">
<span v-text="getLanuage('Go back')"></span>
</el-button>
{% endif %}
{% if show_delete_link %}
{% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %}
<el-button size="small" icon="el-icon-delete" type="danger" onclick="del('{% add_preserved_filters delete_url %}')"
style="float: left">{% trans "Delete" %}</el-button>
{% endif %}
{% if show_save_as_new %}
<el-button size="small" type="primary"
@click="formSubmit('_saveasnew','{% trans 'Save as new' %}',$event)">{% trans 'Save as new' %}</el-button>
{% endif %}
{% if show_save_and_add_another %}
<button type="submit" class="el-button el-button--primary el-button--small" name="_addanother">
{% trans 'Save and add another' %}
</button>
{% endif %}
{% if show_save_and_continue %}

<button type="submit" class="el-button el-button--primary el-button--small" name="_continue">
{% trans 'Save and continue editing' %}
</button>
{% endif %}
{% if show_save %}
<button type="submit" class="el-button el-button--primary el-button--small" name="_save">
{% trans 'Save' %}
</button>
{% endif %}
<input type="hidden" name="actionName" value="actionValue" id="actionName">
<div class="other-wrap">
{% if show_save %}
<button type="submit" class="el-button el-button--primary el-button--small" name="_save">
{% trans 'Save' %}
</button>
{% endif %}

{% if show_save_and_continue %}

<button type="submit" class="el-button el-button--success el-button--small" name="_continue">
{% trans 'Save and continue editing' %}
</button>
{% endif %}

{% if show_save_as_new %}
<el-button size="small" type="primary"
@click="formSubmit('_saveasnew','{% trans 'Save as new' %}',$event)">{% trans 'Save as new' %}</el-button>
{% endif %}
{% if show_save_and_add_another %}
<button type="submit" class="el-button el-button--success is-plain el-button--small" name="_addanother">
{% trans 'Save and add another' %}
</button>
{% endif %}


<input type="hidden" name="actionName" value="actionValue" id="actionName">
</div>

<div class="delete-wrap">
{% if show_delete_link %}
{% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %}
<el-button size="small" icon="el-icon-delete" type="danger" onclick="del('{% add_preserved_filters delete_url %}')"
style="float: left" plain>{% trans "Delete" %}</el-button>
{% endif %}
</div>
</div>
<script type="text/javascript">
var submitrows=document.getElementsByClassName('submit-row');
Expand Down

0 comments on commit 7a0e71a

Please sign in to comment.