Skip to content

Commit

Permalink
Fixed: datetime display error when disable edit
Browse files Browse the repository at this point in the history
  • Loading branch information
cg33 committed Feb 26, 2020
1 parent c52bda2 commit f8c0743
Show file tree
Hide file tree
Showing 6 changed files with 208 additions and 142 deletions.
64 changes: 32 additions & 32 deletions adminlte/resource/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func resourceAssetsDistCssAllMinCss() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/css/all.min.css", size: 445206, mode: os.FileMode(420), modTime: time.Unix(1582553669, 0)}
info := bindataFileInfo{name: "resource/assets/dist/css/all.min.css", size: 445206, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -134,7 +134,7 @@ func resourceAssetsDistCssBluePng() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/css/blue.png", size: 1132, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/css/blue.png", size: 1132, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -154,7 +154,7 @@ func resourceAssetsDistCssBlue2xPng() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/css/[email protected]", size: 1410, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/css/[email protected]", size: 1410, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -174,7 +174,7 @@ func resourceAssetsDistCssFonts6xk3dsbykcsvLcoeqqfx1ryoo3qok7gTtf() (*asset, err
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/css/fonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7g.ttf", size: 39456, mode: os.FileMode(420), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/css/fonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7g.ttf", size: 39456, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -194,7 +194,7 @@ func resourceAssetsDistCssFonts6xkydsbykcsvLcoeqqfx1ryoo3i54rwlxdrTtf() (*asset,
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/css/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdr.ttf", size: 39084, mode: os.FileMode(420), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/css/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdr.ttf", size: 39084, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -214,7 +214,7 @@ func resourceAssetsDistCssFonts6xkydsbykcsvLcoeqqfx1ryoo3ig4vwlxdrTtf() (*asset,
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/css/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdr.ttf", size: 39128, mode: os.FileMode(420), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/css/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdr.ttf", size: 39128, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -234,7 +234,7 @@ func resourceAssetsDistCssFonts6xkydsbykcsvLcoeqqfx1ryoo3ik4zwlxdrTtf() (*asset,
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/css/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdr.ttf", size: 39656, mode: os.FileMode(420), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/css/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdr.ttf", size: 39656, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -254,7 +254,7 @@ func resourceAssetsDistFonts6xk1dsbykcsvLcoeqqfx1ryoo3qpz7nsdcTtf() (*asset, err
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/6xK1dSBYKcSV-LCoeQqfX1RYOo3qPZ7nsDc.ttf", size: 36616, mode: os.FileMode(420), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/6xK1dSBYKcSV-LCoeQqfX1RYOo3qPZ7nsDc.ttf", size: 36616, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -274,7 +274,7 @@ func resourceAssetsDistFonts6xkwdsbykcsvLcoeqqfx1ryoo3qpzy4lcds18eTtf() (*asset,
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZY4lCds18E.ttf", size: 36536, mode: os.FileMode(420), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZY4lCds18E.ttf", size: 36536, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -294,7 +294,7 @@ func resourceAssetsDistFonts6xkwdsbykcsvLcoeqqfx1ryoo3qpzzmkids18eTtf() (*asset,
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZZMkids18E.ttf", size: 36932, mode: os.FileMode(420), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZZMkids18E.ttf", size: 36932, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -314,7 +314,7 @@ func resourceAssetsDistFontsFontawesomeOtf() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/FontAwesome.otf", size: 134808, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/FontAwesome.otf", size: 134808, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -334,7 +334,7 @@ func resourceAssetsDistFontsFontawesomeWebfontEot() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/fontawesome-webfont.eot", size: 165742, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/fontawesome-webfont.eot", size: 165742, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -354,7 +354,7 @@ func resourceAssetsDistFontsFontawesomeWebfontSvg() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/fontawesome-webfont.svg", size: 444379, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/fontawesome-webfont.svg", size: 444379, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -374,7 +374,7 @@ func resourceAssetsDistFontsFontawesomeWebfontTtf() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/fontawesome-webfont.ttf", size: 165548, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/fontawesome-webfont.ttf", size: 165548, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -394,7 +394,7 @@ func resourceAssetsDistFontsFontawesomeWebfontWoff() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/fontawesome-webfont.woff", size: 98024, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/fontawesome-webfont.woff", size: 98024, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -414,7 +414,7 @@ func resourceAssetsDistFontsFontawesomeWebfontWoff2() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/fontawesome-webfont.woff2", size: 77160, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/fontawesome-webfont.woff2", size: 77160, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -434,7 +434,7 @@ func resourceAssetsDistFontsGlyphiconsHalflingsRegularEot() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/glyphicons-halflings-regular.eot", size: 20127, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/glyphicons-halflings-regular.eot", size: 20127, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -454,7 +454,7 @@ func resourceAssetsDistFontsGlyphiconsHalflingsRegularSvg() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/glyphicons-halflings-regular.svg", size: 108738, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/glyphicons-halflings-regular.svg", size: 108738, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -474,7 +474,7 @@ func resourceAssetsDistFontsGlyphiconsHalflingsRegularTtf() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/glyphicons-halflings-regular.ttf", size: 45404, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/glyphicons-halflings-regular.ttf", size: 45404, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -494,7 +494,7 @@ func resourceAssetsDistFontsGlyphiconsHalflingsRegularWoff() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/glyphicons-halflings-regular.woff", size: 23424, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/glyphicons-halflings-regular.woff", size: 23424, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -514,7 +514,7 @@ func resourceAssetsDistFontsGlyphiconsHalflingsRegularWoff2() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/glyphicons-halflings-regular.woff2", size: 18028, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/glyphicons-halflings-regular.woff2", size: 18028, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -534,7 +534,7 @@ func resourceAssetsDistFontsIoniconsTtf() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/ionicons.ttf", size: 188508, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/ionicons.ttf", size: 188508, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -554,7 +554,7 @@ func resourceAssetsDistFontsIoniconsWoff() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/fonts/ionicons.woff", size: 67904, mode: os.FileMode(493), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/fonts/ionicons.woff", size: 67904, mode: os.FileMode(493), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -574,7 +574,7 @@ func resourceAssetsDistImgAvatar04Png() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/img/avatar04.png", size: 8582, mode: os.FileMode(420), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/img/avatar04.png", size: 8582, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -594,7 +594,7 @@ func resourceAssetsDistImgClearPng() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/img/clear.png", size: 509, mode: os.FileMode(420), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/img/clear.png", size: 509, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -614,7 +614,7 @@ func resourceAssetsDistImgLoadingGif() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/img/loading.gif", size: 1849, mode: os.FileMode(420), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/img/loading.gif", size: 1849, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -634,7 +634,7 @@ func resourceAssetsDistJsAllMinJs() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/js/all.min.js", size: 262616, mode: os.FileMode(420), modTime: time.Unix(1582553669, 0)}
info := bindataFileInfo{name: "resource/assets/dist/js/all.min.js", size: 262616, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -654,7 +654,7 @@ func resourceAssetsDistJsAll_2MinJs() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/js/all_2.min.js", size: 679105, mode: os.FileMode(420), modTime: time.Unix(1582553669, 0)}
info := bindataFileInfo{name: "resource/assets/dist/js/all_2.min.js", size: 679105, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -674,7 +674,7 @@ func resourceAssetsDistJsContentMinJs() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/js/content.min.js", size: 31024, mode: os.FileMode(420), modTime: time.Unix(1582553669, 0)}
info := bindataFileInfo{name: "resource/assets/dist/js/content.min.js", size: 31024, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -694,7 +694,7 @@ func resourceAssetsDistJsFormMinJs() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/js/form.min.js", size: 250177, mode: os.FileMode(420), modTime: time.Unix(1582553669, 0)}
info := bindataFileInfo{name: "resource/assets/dist/js/form.min.js", size: 250177, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -714,7 +714,7 @@ func resourceAssetsDistJsHtml5shivMinJs() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/js/html5shiv.min.js", size: 2730, mode: os.FileMode(420), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/js/html5shiv.min.js", size: 2730, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand All @@ -734,7 +734,7 @@ func resourceAssetsDistJsRespondMinJs() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "resource/assets/dist/js/respond.min.js", size: 4377, mode: os.FileMode(420), modTime: time.Unix(1582553668, 0)}
info := bindataFileInfo{name: "resource/assets/dist/js/respond.min.js", size: 4377, mode: os.FileMode(420), modTime: time.Unix(1582692248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand Down
56 changes: 36 additions & 20 deletions adminlte/resource/pages/components/form/datetime.tmpl
Original file line number Diff line number Diff line change
@@ -1,28 +1,44 @@
{{define "form_datetime"}}
<label for="{{.Field}}" class="col-sm-2 {{if .Must}}asterisk{{end}} control-label">{{.Head}}</label>
<div class="col-sm-8">
<div class="input-group">
{{if ne .Label ""}}
<span class="input-group-addon">{{.Label}}</span>
{{if not .Editable}}
<div class="col-sm-8">
<div class="box box-solid box-default no-margin">
<div class="box-body" style="min-height: 40px;">
{{.Value}}
</div>
</div>
{{if ne .HelpMsg ""}}
<span class="help-block">
<i class="fa fa-info-circle"></i>&nbsp;{{.HelpMsg}}
</span>
{{end}}
<span class="input-group-addon"><i class="fa fa-calendar fa-fw"></i></span>
<input {{if .Must}}required="1"{{end}} style="width: 160px" type="text" id="{{.Field}}" name="{{.Field}}"
value="{{.Value}}"
class="form-control {{.Field}}" placeholder="{{lang "Input"}} {{.Head}}">
</div>
{{if ne .HelpMsg ""}}
<span class="help-block">
{{else}}
<div class="col-sm-8">
<div class="input-group">
{{if ne .Label ""}}
<span class="input-group-addon">{{.Label}}</span>
{{end}}
<span class="input-group-addon"><i class="fa fa-calendar fa-fw"></i></span>
<input {{if .Must}}required="1"{{end}} style="width: 160px" type="text" id="{{.Field}}"
name="{{.Field}}"
value="{{.Value}}"
class="form-control {{.Field}}" placeholder="{{lang "Input"}} {{.Head}}">
</div>
{{if ne .HelpMsg ""}}
<span class="help-block">
<i class="fa fa-info-circle"></i>&nbsp;{{.HelpMsg}}
</span>
{{end}}
</div>
<script>
$(function () {
$('.{{.Field}}').parent().datetimepicker({
"format": "YYYY-MM-DD HH:mm:ss",
"locale": "zh-CN",
"allowInputToggle": true
{{end}}
</div>
<script>
$(function () {
$('.{{.Field}}').parent().datetimepicker({
"format": "YYYY-MM-DD HH:mm:ss",
"locale": "zh-CN",
"allowInputToggle": true
});
});
});
</script>
</script>
{{end}}
{{end}}
Loading

0 comments on commit f8c0743

Please sign in to comment.