From 36661f53e6cb7bd5fe202157f794255d4d6932af Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 1 Sep 2014 00:12:37 +0800 Subject: Update deps --- public/ng/less/gogs/base.less | 1 + 1 file changed, 1 insertion(+) (limited to 'public/ng/less/gogs/base.less') diff --git a/public/ng/less/gogs/base.less b/public/ng/less/gogs/base.less index 241846db..8a884507 100644 --- a/public/ng/less/gogs/base.less +++ b/public/ng/less/gogs/base.less @@ -11,6 +11,7 @@ html, body { height: 100%; + overflow-y: scroll; } .octicon, .fa { -- cgit v1.2.3 From fdc8c34258fb279970bab601018ed50883b761d6 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 10 Sep 2014 11:32:14 -0400 Subject: Fix clone panel z-index --- gogs.go | 2 +- public/ng/css/gogs.css | 2 +- public/ng/less/gogs/base.less | 1 - public/ng/less/gogs/repository.less | 1 + templates/.VERSION | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) (limited to 'public/ng/less/gogs/base.less') diff --git a/gogs.go b/gogs.go index 02ae7fd2..d3aa4377 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.5.0.0909 Beta" +const APP_VER = "0.5.0.0910 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index f4d33540..ee364905 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -1,7 +1,6 @@ html, body { height: 100%; - overflow-y: scroll; } .octicon, .fa { @@ -1015,6 +1014,7 @@ The register and sign-in page style left: -354px; padding: 20px; box-sizing: border-box; + z-index: 1; } #repo-header-download-drop .btn > i { margin-right: 6px; diff --git a/public/ng/less/gogs/base.less b/public/ng/less/gogs/base.less index 8a884507..241846db 100644 --- a/public/ng/less/gogs/base.less +++ b/public/ng/less/gogs/base.less @@ -11,7 +11,6 @@ html, body { height: 100%; - overflow-y: scroll; } .octicon, .fa { diff --git a/public/ng/less/gogs/repository.less b/public/ng/less/gogs/repository.less index 4a49ac43..955a617c 100644 --- a/public/ng/less/gogs/repository.less +++ b/public/ng/less/gogs/repository.less @@ -84,6 +84,7 @@ border-top-right-radius: .25em; left: -354px; padding: 20px; box-sizing: border-box; + z-index: 1; .btn > i { margin-right: 6px; } diff --git a/templates/.VERSION b/templates/.VERSION index b539e339..18a13b3a 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.5.0.0909 Beta \ No newline at end of file +0.5.0.0910 Beta \ No newline at end of file -- cgit v1.2.3 From 904f799c1a871d1c730b2834206da7f57c46efc5 Mon Sep 17 00:00:00 2001 From: fuxiaohei Date: Tue, 23 Sep 2014 21:43:45 +0800 Subject: improve ui details --- public/ng/css/gogs.css | 17 +- public/ng/less/gogs/base.less | 5 + public/ng/less/gogs/dashboard.less | 57 ++- public/ng/less/gogs/repository.less | 759 ++++++++++++++++++------------------ 4 files changed, 419 insertions(+), 419 deletions(-) (limited to 'public/ng/less/gogs/base.less') diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index 5429d012..1d0c468c 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -45,6 +45,9 @@ img.avatar-100 { height: 100px; vertical-align: middle; } +.drop-down .panel-header { + font-size: 14px; +} #wrapper { padding: 0; margin: 0 0 -55px 0; @@ -703,11 +706,12 @@ ol.linenums { height: 69px; } #dashboard-header > .menu-line > li { - padding: 12px 0; + padding: 12px 6px; } #dashboard-header > .menu-line > li.right > a { font-size: 1.2em; color: #444444; + padding: .4em .8em; } #dashboard-header > .menu-line > li.right > a:hover { background-color: transparent; @@ -724,6 +728,7 @@ ol.linenums { } #dashboard { padding: 24px 0; + margin-bottom: 60px; } #dashboard-sidebar .panel-header h4 { margin: 0; @@ -737,7 +742,7 @@ ol.linenums { border-top-left-radius: .3em; border-top-right-radius: .3em; width: 100%; - height: 35px; + height: 32px; } #dashboard-sidebar-menu > li { border: 1px solid #d6d6d6; @@ -746,8 +751,8 @@ ol.linenums { border-bottom: none; } #dashboard-sidebar-menu > li > a { - padding-top: .4em; - padding-bottom: .4em; + padding-top: .3em; + padding-bottom: .3em; } #dashboard-sidebar-menu > li.first { border-top-left-radius: .3em; @@ -821,6 +826,7 @@ ol.linenums { } #dashboard-my-repo .repo-count { margin-left: 4px; + font-size: .8em; } #dashboard-my-org, #dashboard-my-mirror { @@ -828,7 +834,7 @@ ol.linenums { } #dashboard-new-repo { width: 50px; - height: 35px; + height: 33px; padding-top: 6px; margin-right: 1px; border-top-left-radius: .3em; @@ -994,7 +1000,6 @@ The register and sign-in page style } #repo-header-meta a > .btn { line-height: 16px; - font-size: 1.05em; margin-left: 16px; } #repo-header-meta a > .btn i { diff --git a/public/ng/less/gogs/base.less b/public/ng/less/gogs/base.less index 241846db..47d8b1b6 100644 --- a/public/ng/less/gogs/base.less +++ b/public/ng/less/gogs/base.less @@ -55,6 +55,11 @@ img.avatar-100{ height: 100px; vertical-align: middle; } +.drop-down{ + .panel-header{ + font-size: 14px; + } +} #wrapper { padding: 0; margin: 0 0 -55px 0; diff --git a/public/ng/less/gogs/dashboard.less b/public/ng/less/gogs/dashboard.less index 60aa8072..1609b9d1 100644 --- a/public/ng/less/gogs/dashboard.less +++ b/public/ng/less/gogs/dashboard.less @@ -14,12 +14,13 @@ height: 69px; > .menu-line { > li { - padding: 12px 0; + padding: 12px 6px; } > li.right { > a { font-size: 1.2em; color: @dashboardHeaderLinkColor; + padding: .4em .8em; &:hover { background-color: transparent; color: @dashboardHeaderLinkHoverColor; @@ -34,18 +35,16 @@ } } } - // dashboard context switch selection #dashboard-selection-menu { a img { margin: -4px 10px 0 0; } } - #dashboard { padding: 24px 0; + margin-bottom: 60px; } - // dashboard sidebar contains contributed repositories panel, // and my repositories panel #dashboard-sidebar { @@ -58,7 +57,6 @@ border-bottom-right-radius: .3em; } } - #dashboard-sidebar-menu { border-top-left-radius: .3em; border-top-right-radius: .3em; @@ -68,8 +66,8 @@ margin-right: -1px; border-bottom: none; > a { - padding-top: .4em; - padding-bottom: .4em; + padding-top: .3em; + padding-bottom: .3em; } } > li.first { @@ -83,7 +81,7 @@ float: right; } width: 100%; - height: 35px; + height: 32px; > li.js-tab-nav-show { background-color: #EEEEEE; } @@ -94,7 +92,6 @@ } } } - #dashboard-my-mirror, #dashboard-my-org, #dashboard-my-repo { @@ -130,7 +127,6 @@ border-top: 1px solid #d6d6d6; } } - #dashboard-my-repo { .panel-header { .octicon { @@ -140,18 +136,17 @@ } .repo-count { margin-left: 4px; + font-size: .8em; } } - #dashboard-my-org, #dashboard-my-mirror { display: none; } - // the button of new repository in my repositories panel #dashboard-new-repo { width: 50px; - height: 35px; + height: 33px; padding-top: 6px; margin-right: 1px; .octicon { @@ -160,7 +155,6 @@ border-top-left-radius: .3em; border-top-right-radius: .3em; } - // the drop-down menu of #dashboard-new-repo #dashboard-new-repo-menu { top: 35px; @@ -172,28 +166,26 @@ font-size: 1.1em; } } - #dashboard-selection-menu { - width: auto; - max-width: 300px; - > .drop-down { - top: 56px; + width: auto; + max-width: 300px; + > .drop-down { + top: 56px; + } + li { + white-space: nowrap; + &.checked { + .octicon { + opacity: 1; + } } - li { - white-space: nowrap; - &.checked { - .octicon { - opacity: 1; - } - } - a { - text-overflow: ellipsis; - -o-text-overflow: ellipsis; - overflow: hidden; - } + a { + text-overflow: ellipsis; + -o-text-overflow: ellipsis; + overflow: hidden; } + } } - // the drop-down menu of #dashboard-selection-menu #dashboard-switch-menu { > li { @@ -226,7 +218,6 @@ border-bottom-left-radius: .3em; border-bottom-right-radius: .3em; } - #dashboard-news { .news { margin-right: 2.4em; diff --git a/public/ng/less/gogs/repository.less b/public/ng/less/gogs/repository.less index c86cb7f0..0753d11f 100644 --- a/public/ng/less/gogs/repository.less +++ b/public/ng/less/gogs/repository.less @@ -6,460 +6,459 @@ /* repository main */ #repo-wrapper { - padding-bottom: 100px; + padding-bottom: 100px; } #repo-header { - height: 69px; - border-bottom: 1px solid@repoHeaderBorderColor; + height: 69px; + border-bottom: 1px solid@repoHeaderBorderColor; -background-color: @repoHeaderBgColor; + background-color: @repoHeaderBgColor; } #repo-header-name { - line-height: 66px; - color: @repoHeaderNameColor; - font-size: 1.6em; - font-weight: normal; - margin-bottom: 0; - i { - margin-right: 12px; - vertical-align: middle; - } - .divider { - margin: 0 4px; - } + line-height: 66px; + color: @repoHeaderNameColor; + font-size: 1.6em; + font-weight: normal; + margin-bottom: 0; + i { + margin-right: 12px; + vertical-align: middle; + } + .divider { + margin: 0 4px; + } } #repo-header-meta { - line-height: 66px; - li { - > a { - padding: 0; - &:hover { - background-color: transparent; - } - } - } - a { - &>.btn { - line-height: 16px; - font-size: 1.05em; - margin-left: 16px; - i { - margin-right: 6px; - } - .num { - margin-left: 6px; - } - } - } + line-height: 66px; + li { + > a { + padding: 0; + &:hover { + background-color: transparent; + } + } + } + a { + & > .btn { + line-height: 16px; + margin-left: 16px; + i { + margin-right: 6px; + } + .num { + margin-left: 6px; + } + } + } } #repo-header-download-btn { - > .btn > i { - margin-right: 0 !important; - } - &:hover { - &:after, .btn { - background-color: @btnHoverBlackColor; - color: #FFF; - } - } - &:after { - background-color: @btnBlackColor; - padding: 9px 16px 8px 0; - margin-left: -8px !important; - color: #FFF; - border-top: 1px solid@btnBlackColor; - border-bottom: 1px solid@btnBlackColor; - border-top-right-radius: .25em; - border-bottom-right-radius: .25em; - } + > .btn > i { + margin-right: 0 !important; + } + &:hover { + &:after, .btn { + background-color: @btnHoverBlackColor; + color: #FFF; + } + } + &:after { + background-color: @btnBlackColor; + padding: 9px 16px 8px 0; + margin-left: -8px !important; + color: #FFF; + border-top: 1px solid@btnBlackColor; + border-bottom: 1px solid@btnBlackColor; + border-top-right-radius: .25em; + border-bottom-right-radius: .25em; + } } #repo-header-download-drop { - line-height: 24px; - width: 440px; - top: 50px; - left: -370px; - padding: 20px; - box-sizing: border-box; - z-index: 1; - .btn > i { - margin-right: 6px; - } - button, - input { - font-size: 11px; - } + line-height: 24px; + width: 440px; + top: 50px; + left: -370px; + padding: 20px; + box-sizing: border-box; + z-index: 1; + .btn > i { + margin-right: 6px; + } + button, + input { + font-size: 11px; + } } #repo-content { - padding: 18px 0; + padding: 18px 0; } #repo-clone-url { - border-right: none; - width: 190px; - border-left: none; + border-right: none; + width: 190px; + border-left: none; } #repo-clone-help { - clear: both; - line-height: 48px; + clear: both; + line-height: 48px; } #repo-clone-zip { - line-height: 48px; - a { - cursor: pointer; - color: white; - overflow: visible; - padding: .6em 1.2em; - } - .btn { - margin: 0 6px; - } + line-height: 48px; + a { + cursor: pointer; + color: white; + overflow: visible; + padding: .6em 1.2em; + } + .btn { + margin: 0 6px; + } } #repo-desc { - font-size: 1.2em; + font-size: 1.2em; } #repo-sidebar-nav { - .label { - font-size: 12px; - line-height: 1.4em; - margin-top: 2px; - } - i { - margin-right: 6px; - } + .label { + font-size: 12px; + line-height: 1.4em; + margin-top: 2px; + } + i { + margin-right: 6px; + } } #repo-file-nav { - padding: .6em 0 1em 0; - > li > a { - padding-left: 0; - &:hover { - background-color: transparent; - } - } - li.repo-jump > a { - padding-right: 0; - .btn { - margin-left: -1px; - } - } + padding: .6em 0 1em 0; + > li > a { + padding-left: 0; + &:hover { + background-color: transparent; + } + } + li.repo-jump > a { + padding-right: 0; + .btn { + margin-left: -1px; + } + } } #repo-branch-switch { - > a { - .btn { - padding-right: 30px; - } - &:after { - position: absolute; - top: 12px; - right: 30px; - margin-left: 0; - color: @baseFontColor; + > a { + .btn { + padding-right: 30px; + } + &:after { + position: absolute; + top: 12px; + right: 30px; + margin-left: 0; + color: @baseFontColor; - } - } - > .drop-down { - top: 40px; - left: 0; - } + } + } + > .drop-down { + top: 40px; + left: 0; + } } #repo-branch-filter-ipt { - width: 100%; - border-left: none; - border-right: none; - box-sizing: border-box; + width: 100%; + border-left: none; + border-right: none; + box-sizing: border-box; } #repo-branch-tag { - .tab-nav { - border-bottom: 1px solid #EAEAEA; - a { - padding: .3em .8em; - } - .js-tab-nav-show { - background-color: #EEE; - font-weight: bold; - } - } + .tab-nav { + border-bottom: 1px solid #EAEAEA; + a { + padding: .3em .8em; + } + .js-tab-nav-show { + background-color: #EEE; + font-weight: bold; + } + } } #repo-branch-list, #repo-tag-list { - li { - i { - margin-right: 12px; - opacity: 0; - } - } - li.checked { - i { - opacity: 1; - } - } + li { + i { + margin-right: 12px; + opacity: 0; + } + } + li.checked { + i { + opacity: 1; + } + } } #repo-tag-list { - display: none; + display: none; } #repo-bread { - .bread { - padding-right: 0; - font-size: 16px; - font-weight: bold; - } + .bread { + padding-right: 0; + font-size: 16px; + font-weight: bold; + } } #repo-main { - padding-right: 40px; - box-sizing: border-box; + padding-right: 40px; + box-sizing: border-box; } #repo-files-table { - margin-bottom: 20px; - th, td { - text-align: left; - line-height: 32px; - } - td.icon { - width: 16px; - padding-right: .1em; - padding-left: 1em; - } - td.name { - max-width: 120px; - .text-truncate { - max-width: 100%; - } - } - td.age { - max-width: 120px; - text-align: right; - } - td.msg { - max-width: 440px; - .text-truncate { - max-width: 100%; - } - } - td.age, - td.size, - td.msg a { - color: #888; - } - td.msg a:hover { - color: #428BCA; - text-decoration: underline; - } - tbody { - background-color: #FFF; - tr:hover { - background-color: #ffffEE; - } - } - thead { - background-color: #F0F0F0; - .author { - a { - margin: 0 .4em; - } - } - .last-commit { - strong { - color: #444; - } - .text-truncate { - margin-left: .4em; - } - } - .last-commit .text-truncate, - .age { - font-weight: normal; - color: #888; - } - } + margin-bottom: 20px; + th, td { + text-align: left; + line-height: 32px; + } + td.icon { + width: 16px; + padding-right: .1em; + padding-left: 1em; + } + td.name { + max-width: 120px; + .text-truncate { + max-width: 100%; + } + } + td.age { + max-width: 120px; + text-align: right; + } + td.msg { + max-width: 440px; + .text-truncate { + max-width: 100%; + } + } + td.age, + td.size, + td.msg a { + color: #888; + } + td.msg a:hover { + color: #428BCA; + text-decoration: underline; + } + tbody { + background-color: #FFF; + tr:hover { + background-color: #ffffEE; + } + } + thead { + background-color: #F0F0F0; + .author { + a { + margin: 0 .4em; + } + } + .last-commit { + strong { + color: #444; + } + .text-truncate { + margin-left: .4em; + } + } + .last-commit .text-truncate, + .age { + font-weight: normal; + color: #888; + } + } } #repo-readme { - margin-bottom: 80px; + margin-bottom: 80px; } #repo-bare-start { - margin-bottom: 100px; - .panel-content { - background-color: #FFF; - } - pre { - margin: 0 40px; - padding: 6px 10px; - border: 1px solid #ddd; - background: #f8f8f8; - } + margin-bottom: 100px; + .panel-content { + background-color: #FFF; + } + pre { + margin: 0 40px; + padding: 6px 10px; + border: 1px solid #ddd; + background: #f8f8f8; + } } .repo-bare { - #repo-bare-start { - h2 { - margin-top: 30px; - margin-bottom: 24px; - } - } - #repo-header-meta { - display: none; - } - #repo-clone-ssh { - margin-left: 200px; - } - #repo-clone-copy { - margin-right: 200px; - } - #repo-clone-help { - clear: both; - width: 100%; - } - #repo-clone-url { - width: 520px; - } + #repo-bare-start { + h2 { + margin-top: 30px; + margin-bottom: 24px; + } + } + #repo-header-meta { + display: none; + } + #repo-clone-ssh { + margin-left: 200px; + } + #repo-clone-copy { + margin-right: 200px; + } + #repo-clone-help { + clear: both; + width: 100%; + } + #repo-clone-url { + width: 520px; + } } /* repository create */ #team-create-form, #repo-migrate-form, #repo-create-form { - width: 800px; - margin: 60px auto auto auto; - background: white; - h2 { - margin: .5em 1em; - } - .field { - margin: 1.2em 0 2em 0; - } - .ipt { - width: 540px; - } - textarea { - height: 120px; - } - .avatar { - vertical-align: middle; - margin-right: .6em; - width: 28px; - height: 28px; - } - &:hover { - box-shadow: 0px 0px 6px #CCC; - } + width: 800px; + margin: 60px auto auto auto; + background: white; + h2 { + margin: .5em 1em; + } + .field { + margin: 1.2em 0 2em 0; + } + .ipt { + width: 540px; + } + textarea { + height: 120px; + } + .avatar { + vertical-align: middle; + margin-right: .6em; + width: 28px; + height: 28px; + } + &:hover { + box-shadow: 0px 0px 6px #CCC; + } } #repo-create-cancel { - margin-left: 4em; + margin-left: 4em; } #repo-create-owner-list { - top: 30px; - left: 0; - width: auto; - max-width: 300px; - .octicon { - margin-right: 12px; - opacity: 0; - } - .avatar { - width: 20px; - height: 20px; - } - li { - white-space: nowrap; - &.checked { - .octicon { - opacity: 1; - } - } - a { - text-overflow: ellipsis; - -o-text-overflow: ellipsis; - overflow: hidden; - } - } + top: 30px; + left: 0; + width: auto; + max-width: 300px; + .octicon { + margin-right: 12px; + opacity: 0; + } + .avatar { + width: 20px; + height: 20px; + } + li { + white-space: nowrap; + &.checked { + .octicon { + opacity: 1; + } + } + a { + text-overflow: ellipsis; + -o-text-overflow: ellipsis; + overflow: hidden; + } + } } .file-name { - margin-left: 1em; + margin-left: 1em; } .file-size { - font-size: 13px; - color: #888; - margin-left: 1em; + font-size: 13px; + color: #888; + margin-left: 1em; } .code-view { - overflow: auto; - overflow-x: auto; - overflow-y: hidden; - background: white; - .view-raw { - min-height: 40px; - text-align: center; - padding-top: 20px; - .btn { - font-size: 1.05em; - line-height: 16px; - padding: 6px 8px; - } - } - table { - width: 100%; - td { - padding: 0; - } - } - .lines-num { - vertical-align: top; - text-align: right; - color: #999; - background: #f5f5f5; - width: 1%; - span { - font-family: Monaco, Menlo, Consolas, "Courier New", monospace; - line-height: 18px; - padding: 0 8px 0 10px; - cursor: pointer; - display: block; - margin-top: 2px; - font-size: 12px; - } - } - .lines-code > pre { - border: none; - border-left: 1px solid #ddd; - > ol.linenums > li { - padding: 0 10px; - &.active { - background: #ffffdd; - } - } - } + overflow: auto; + overflow-x: auto; + overflow-y: hidden; + background: white; + .view-raw { + min-height: 40px; + text-align: center; + padding-top: 20px; + .btn { + font-size: 1.05em; + line-height: 16px; + padding: 6px 8px; + } + } + table { + width: 100%; + td { + padding: 0; + } + } + .lines-num { + vertical-align: top; + text-align: right; + color: #999; + background: #f5f5f5; + width: 1%; + span { + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; + line-height: 18px; + padding: 0 8px 0 10px; + cursor: pointer; + display: block; + margin-top: 2px; + font-size: 12px; + } + } + .lines-code > pre { + border: none; + border-left: 1px solid #ddd; + > ol.linenums > li { + padding: 0 10px; + &.active { + background: #ffffdd; + } + } + } } .repo-setting-zone { - padding: 30px; + padding: 30px; } #team-repositories-list, #team-members-list, #repo-collab-list { - list-style: none; - padding: 10px 0 5px 0; - li.collab { - clear: both; - height: 50px; - padding: 0 15px 0 15px; - } - a.member { - color: #444; - height: 50px; - line-height: 50px; - &:hover { - color: #4183C4; - } - } - .avatar { - margin-right: 1em; - width: 40px; - } - .remove-collab { - color: #DD4B39; - } + list-style: none; + padding: 10px 0 5px 0; + li.collab { + clear: both; + height: 50px; + padding: 0 15px 0 15px; + } + a.member { + color: #444; + height: 50px; + line-height: 50px; + &:hover { + color: #4183C4; + } + } + .avatar { + margin-right: 1em; + width: 40px; + } + .remove-collab { + color: #DD4B39; + } } .repo-user-list-block { - position: relative; - top: 5px; + position: relative; + top: 5px; } .setting-list { - width: 100%; - list-style: none; + width: 100%; + list-style: none; } \ No newline at end of file -- cgit v1.2.3 From 5bbeeb0f1b5cecb67e1527410a45fb65df0096d1 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 23 Sep 2014 15:30:04 -0400 Subject: Page: Commits and fix #249 --- conf/locale/locale_en-US.ini | 9 +++++++++ conf/locale/locale_zh-CN.ini | 9 +++++++++ models/repo.go | 14 +++++++++++++ models/user.go | 29 +++++++++++++++++++++++++++ public/ng/css/gogs.css | 26 ++++++++++++++++++++++++ public/ng/css/ui.css | 4 ++++ public/ng/less/gogs/base.less | 5 +++++ public/ng/less/gogs/repository.less | 33 ++++++++++++++++++++++++------ public/ng/less/ui/label.less | 8 +++++--- routers/repo/commit.go | 4 +++- templates/admin/user/list.tmpl | 4 ++-- templates/repo/commits.tmpl | 15 +++++++------- templates/repo/commits_table.tmpl | 40 ++++++++++++++++++------------------- 13 files changed, 160 insertions(+), 40 deletions(-) (limited to 'public/ng/less/gogs/base.less') diff --git a/conf/locale/locale_en-US.ini b/conf/locale/locale_en-US.ini index b241e45d..15d8028c 100644 --- a/conf/locale/locale_en-US.ini +++ b/conf/locale/locale_en-US.ini @@ -258,6 +258,15 @@ issues = Issues commits = Commits releases = Releases +commits.commits = Commits +commits.search = Search commits +commits.find = Find +commits.author = Author +commits.message = Message +commits.date = Date +commits.older = Older +commits.newer = Newer + settings = Settings settings.options = Options settings.collaboration = Collaboration diff --git a/conf/locale/locale_zh-CN.ini b/conf/locale/locale_zh-CN.ini index 2957cf90..e479f5cd 100644 --- a/conf/locale/locale_zh-CN.ini +++ b/conf/locale/locale_zh-CN.ini @@ -258,6 +258,15 @@ issues = 工单管理 commits = 提交历史 releases = 版本发布 +commits.commits = 次代码提交 +commits.search = 搜索提交历史 +commits.find = 查找 +commits.author = 作者 +commits.message = 备注 +commits.date = 提交日期 +commits.older = 更旧的提交 +commits.newer = 更新的提交 + settings = 仓库设置 settings.options = 基本设置 settings.collaboration = 管理协作者 diff --git a/models/repo.go b/models/repo.go index ccfaae2c..c0a581b9 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1081,6 +1081,13 @@ func SearchRepositoryByName(opt SearchOption) (repos []*Repository, err error) { return repos, err } +// __ __ __ .__ +// / \ / \_____ _/ |_ ____ | |__ +// \ \/\/ /\__ \\ __\/ ___\| | \ +// \ / / __ \| | \ \___| Y \ +// \__/\ / (____ /__| \___ >___| / +// \/ \/ \/ \/ + // Watch is connection request for receiving repository notifycation. type Watch struct { Id int64 @@ -1151,6 +1158,13 @@ func NotifyWatchers(act *Action) error { return nil } +// _________ __ +// / _____// |______ _______ +// \_____ \\ __\__ \\_ __ \ +// / \| | / __ \| | \/ +// /_______ /|__| (____ /__| +// \/ \/ + type Star struct { Id int64 Uid int64 `xorm:"UNIQUE(s)"` diff --git a/models/user.go b/models/user.go index 46e1b155..c09a7726 100644 --- a/models/user.go +++ b/models/user.go @@ -5,6 +5,7 @@ package models import ( + "container/list" "crypto/sha256" "encoding/hex" "errors" @@ -513,6 +514,34 @@ func GetUserIdsByNames(names []string) []int64 { return ids } +// UserCommit represtns a commit with validation of user. +type UserCommit struct { + UserName string + *git.Commit +} + +// ValidCommitsWithEmails checks if authors' e-mails of commits are correcponding to users. +func ValidCommitsWithEmails(oldCommits *list.List) *list.List { + newCommits := list.New() + e := oldCommits.Front() + for e != nil { + c := e.Value.(*git.Commit) + + uname := "" + u, err := GetUserByEmail(c.Author.Email) + if err == nil { + uname = u.Name + } + + newCommits.PushBack(UserCommit{ + UserName: uname, + Commit: c, + }) + e = e.Next() + } + return newCommits +} + // GetUserByEmail returns the user object by given e-mail if exists. func GetUserByEmail(email string) (*User, error) { if len(email) == 0 { diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index d11ae959..662a737f 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -20,6 +20,11 @@ img.avatar-16 { height: 16px; vertical-align: middle; } +img.avatar-20 { + width: 20px; + height: 20px; + vertical-align: middle; +} img.avatar-24 { width: 24px; height: 24px; @@ -1446,6 +1451,27 @@ The register and sign-in page style width: 100%; list-style: none; } +#commits-list { + padding-top: 20px; +} +.commit-list th { + background-color: #FFF; + line-height: 28px !important; +} +.commit-list .date { + width: 120px; +} +.commit-list .author { + padding-left: 20px; + min-width: 180px; +} +.commit-list .author img { + margin-top: -4px; +} +.commit-list .sha a { + font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace; + font-size: 14px; +} #admin-wrapper, #setting-wrapper { padding-bottom: 100px; diff --git a/public/ng/css/ui.css b/public/ng/css/ui.css index 5dc3cc04..bd2eb4c9 100644 --- a/public/ng/css/ui.css +++ b/public/ng/css/ui.css @@ -732,6 +732,10 @@ ul.menu-radius > li:last-child > a { .label-green { background-color: #65ad4e; } +.label-green:hover { + background-color: #71bf57; + color: #FFF; +} .label-orange { background-color: #df7514; } diff --git a/public/ng/less/gogs/base.less b/public/ng/less/gogs/base.less index 47d8b1b6..4319a56e 100644 --- a/public/ng/less/gogs/base.less +++ b/public/ng/less/gogs/base.less @@ -30,6 +30,11 @@ img.avatar-16 { height: 16px; vertical-align: middle; } +img.avatar-20 { + width: 20px; + height: 20px; + vertical-align: middle; +} img.avatar-24 { width: 24px; height: 24px; diff --git a/public/ng/less/gogs/repository.less b/public/ng/less/gogs/repository.less index d9824913..7d6cdd0a 100644 --- a/public/ng/less/gogs/repository.less +++ b/public/ng/less/gogs/repository.less @@ -6,14 +6,12 @@ /* repository main */ #repo-wrapper { - padding-bottom: 100px; + padding-bottom: 100px; } #repo-header { - height: 69px; - border-bottom: 1px solid@repoHeaderBorderColor; - - background-color: @repoHeaderBgColor; - + height: 69px; + border-bottom: 1px solid@repoHeaderBorderColor; + background-color: @repoHeaderBgColor; } #repo-header-name { line-height: 66px; @@ -494,4 +492,27 @@ .setting-list { width: 100%; list-style: none; +} +#commits-list { + padding-top: 20px; +} +.commit-list { + th { + background-color: #FFF; + line-height: 28px !important; + } + .date { + width: 120px; + } + .author { + padding-left: 20px; + min-width: 180px; + img { + margin-top: -4px; + } + } + .sha a { + font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace; + font-size: 14px; + } } \ No newline at end of file diff --git a/public/ng/less/ui/label.less b/public/ng/less/ui/label.less index a2a8a679..21a4c82d 100644 --- a/public/ng/less/ui/label.less +++ b/public/ng/less/ui/label.less @@ -16,11 +16,13 @@ .label-gray { background-color: @labelGrayColor; } - .label-green { - background-color: @labelGreenColor; + background-color: @labelGreenColor; + &:hover { + background-color: @btnHoverGreenColor; + color: #FFF; + } } - .label-orange { background-color: @labelOrangeColor; } diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 218cae7b..c23fdfe7 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -56,12 +56,14 @@ func Commits(ctx *middleware.Context) { } // Both `git log branchName` and `git log commitId` work. - ctx.Data["Commits"], err = ctx.Repo.Commit.CommitsByRange(page) + commits, err := ctx.Repo.Commit.CommitsByRange(page) if err != nil { ctx.Handle(500, "CommitsByRange", err) return } + commits = models.ValidCommitsWithEmails(commits) + ctx.Data["Commits"] = commits ctx.Data["Username"] = userName ctx.Data["Reponame"] = repoName ctx.Data["CommitCount"] = commitsCount diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl index 1092539e..a09863ae 100644 --- a/templates/admin/user/list.tmpl +++ b/templates/admin/user/list.tmpl @@ -45,8 +45,8 @@ {{if or .LastPageNum .NextPageNum}} {{end}} diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl index e7518e98..2f68f1e0 100644 --- a/templates/repo/commits.tmpl +++ b/templates/repo/commits.tmpl @@ -1,8 +1,9 @@ -{{template "base/head" .}} -{{template "base/navbar" .}} -{{template "repo/nav" .}} -{{template "repo/toolbar" .}} -
- {{template "repo/commits_table" .}} +{{template "ng/base/head" .}} +{{template "ng/base/header" .}} +
+ {{template "repo/header" .}} +
+ {{template "repo/commits_table" .}} +
-{{template "base/footer" .}} +{{template "ng/base/footer" .}} diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index cb2ed5d0..032299b1 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -1,23 +1,19 @@ -
-
-
- -- cgit v1.2.3 From a046a31d2be4a72959ec98f1bed7dc5e29ca7126 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 29 Sep 2014 18:52:28 -0400 Subject: UI: Confirmation box --- README.md | 2 +- README_ZH.md | 4 +-- conf/locale/locale_en-US.ini | 1 + conf/locale/locale_zh-CN.ini | 1 + public/ng/css/gogs.css | 6 +---- public/ng/js/gogs.js | 19 +++++++++++--- public/ng/js/min/gogs-min.js | 8 +++--- public/ng/less/gogs/base.less | 3 --- public/ng/less/gogs/dashboard.less | 2 +- public/ng/less/gogs/organization.less | 1 - routers/repo/setting.go | 3 +++ templates/repo/settings/options.tmpl | 49 ++++++++++++++++++++++------------- 12 files changed, 60 insertions(+), 39 deletions(-) (limited to 'public/ng/less/gogs/base.less') diff --git a/README.md b/README.md index e85aaf72..b7ff264e 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ There are 5 ways to install Gogs: ## Acknowledgments -- Router and middleware mechanism of [martini](http://martini.codegangsta.io/). +- Router and middleware mechanism of [Macaron](https://github.com/Unknwon/macaron). - Mail Service, modules design is inspired by [WeTalk](https://github.com/beego/wetalk). - System Monitor Status is inspired by [GoBlog](https://github.com/fuxiaohei/goblog). - Usage and modification from [beego](http://beego.me) modules. diff --git a/README_ZH.md b/README_ZH.md index 817110b3..d704053f 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -56,10 +56,10 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自 ## 特别鸣谢 +- [Macaron](https://github.com/Unknwon/macaron) 的路由与中间件机制。 +- [beego](http://beego.me) 模块的使用与修改。 - 基于 [WeTalk](https://github.com/beego/wetalk) 修改的邮件服务和模块设计。 - 基于 [GoBlog](https://github.com/fuxiaohei/goblog) 修改的系统监视状态。 -- [beego](http://beego.me) 模块的使用与修改。 -- [martini](http://martini.codegangsta.io/) 的路由与中间件机制。 - 感谢 [gobuild.io](http://gobuild.io) 提供二进制编译与下载服务。 - 感谢 [lavachen](http://www.lavachen.cn/) 和 [Rocker](http://weibo.com/rocker1989) 设计的 Logo。 diff --git a/conf/locale/locale_en-US.ini b/conf/locale/locale_en-US.ini index 3990ea87..8e68fb98 100644 --- a/conf/locale/locale_en-US.ini +++ b/conf/locale/locale_en-US.ini @@ -299,6 +299,7 @@ settings.transfer_desc = Transfer this repo to another user or to an organizatio settings.new_owner_has_same_repo = New owner already has a repository with same name. settings.delete = Delete This Repository settings.delete_desc = Once you delete a repository, there is no going back. Please be certain. +settings.transfer_notices =

- You will lose access if new owner is a individual user.

- You will remain access if new owner is an organization and you're one of the owners.

settings.update_settings_success = Repository options has been successfully updated. settings.transfer_owner = New Owner settings.make_transfer = Make Transfer diff --git a/conf/locale/locale_zh-CN.ini b/conf/locale/locale_zh-CN.ini index 6ecd529d..360bf4bc 100644 --- a/conf/locale/locale_zh-CN.ini +++ b/conf/locale/locale_zh-CN.ini @@ -299,6 +299,7 @@ settings.transfer_desc = 您可以将仓库转移至您拥有管理员权限的 settings.new_owner_has_same_repo = 新的仓库拥有者已经存在同名仓库! settings.delete = 删除本仓库 settings.delete_desc = 删除仓库操作不可逆转,请三思而后行。 +settings.transfer_notices =

- 如果您转移给个人用户,您将对仓库失去所有权限。

- 如果您转移给您作为拥有者的组织,则可继续保持操作权限。

settings.update_settings_success = 仓库设置更新成功! settings.transfer_owner = 新拥有者 settings.make_transfer = 确认转移仓库 diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index 2d2ab7f3..6d38ac9b 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -7,9 +7,6 @@ body { width: 16px; text-align: center; } -.fa { - font-size: 14px; -} .container { max-width: 1170px; padding: 0 1.5em; @@ -854,7 +851,7 @@ ol.linenums { font-size: 2em; } #dashboard-new-repo-menu { - top: 35px; + top: 33px; width: 180px; background-color: #FFF; left: -132px; @@ -1889,7 +1886,6 @@ textarea#issue-add-content { } #org-header > div > .menu-line > li.right > a .label { margin-left: 4px; - font-size: .6em; } #org-header > div > .menu-line > li.right .current { border-bottom: 2px solid #D26911; diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js index 9a861004..4bcdc5c8 100644 --- a/public/ng/js/gogs.js +++ b/public/ng/js/gogs.js @@ -437,11 +437,22 @@ function initRepoSetting() { initHookTypeChange(); - $('#transfer-button').click(function () { - $('#transfer-form').show(); + // Transfer repository. + $('#transfer-repo-btn').magnificPopup({ + modal: true + }); + $('#transfer-repo-submit').click(function () { + $.magnificPopup.close(); + $('#transfer-repo-form').submit(); }); - $('#delete-button').click(function () { - $('#delete-form').show(); + + // Delete repository. + $('#delete-repo-btn').magnificPopup({ + modal: true + }); + $('#delete-repo-submit').click(function () { + $.magnificPopup.close(); + $('#delete-repo-form').submit(); }); // Collaboration. diff --git a/public/ng/js/min/gogs-min.js b/public/ng/js/min/gogs-min.js index 5bb6daa7..1538c363 100644 --- a/public/ng/js/min/gogs-min.js +++ b/public/ng/js/min/gogs-min.js @@ -1,5 +1,5 @@ -function Tabs(e){function t(e){console.log("hide",e),e.removeClass("js-tab-nav-show"),$(e.data("tab-target")).removeClass("js-tab-show").hide()}function n(e){console.log("show",e),e.addClass("js-tab-nav-show"),$(e.data("tab-target")).addClass("js-tab-show").show()}var r=$(e);if(r.length){var i=r.find(".js-tab-nav-show");i.length&&$(i.data("tab-target")).addClass("js-tab-show"),r.on("click",".js-tab-nav",function(e){e.preventDefault();var o=$(this);o.hasClass("js-tab-nav-show")||(i=r.find(".js-tab-nav-show").eq(0),t(i),n(o))}),console.log("init tabs @",e)}}function Preview(e,t){function n(e){return e.find(".js-preview-input").eq(0)}function r(e){return e.hasClass("js-preview-container")?e:e.find(".js-preview-container").eq(0)}var i=$(e),o=$(t),a=n(o);if(!a.length)return void console.log("[preview]: no preview input");var s=r(o);return s.length?(i.on("click",function(){$.post("/api/v1/markdown",{text:a.val()},function(e){s.html(e)})}),void console.log("[preview]: init preview @",e,"&",t)):void console.log("[preview]: no preview container")}function initCore(){Gogs.renderMarkdown(),Gogs.renderCodeView(),$(".js-tab-nav").click(function(e){$(this).hasClass("js-tab-nav-show")||($(this).parent().find(".js-tab-nav-show").each(function(){$(this).removeClass("js-tab-nav-show"),$($(this).data("tab-target")).hide()}),$(this).addClass("js-tab-nav-show"),$($(this).data("tab-target")).show()),e.preventDefault()}),$(document).on("click",".popup-modal-dismiss",function(e){e.preventDefault(),$.magnificPopup.close()})}function initUserSetting(){var t=$("#username"),n=$("#user-profile-form");$("#change-username-btn").magnificPopup({modal:!0,callbacks:{open:function(){t.data("uname")==t.val()&&($.magnificPopup.close(),n.submit())}}}).click(function(){return t.data("uname")!=t.val()?(e.preventDefault(),!0):void 0}),$("#change-username-submit").click(function(){$.magnificPopup.close(),n.submit()}),$("#ssh-add").click(function(){$("#user-ssh-add-form").removeClass("hide")}),$("#delete-account-btn").magnificPopup({modal:!0}).click(function(e){return e.preventDefault(),!0}),$("#delete-account-submit").click(function(){$.magnificPopup.close(),$("#delete-account-form").submit()})}function initRepoCreate(){$("#repo-create-owner-list").on("click","li",function(){if(!$(this).hasClass("checked")){var e=$(this).data("uid");$("#repo-owner-id").val(e),$("#repo-owner-avatar").attr("src",$(this).find("img").attr("src")),$("#repo-owner-name").text($(this).text().trim()),$(this).parent().find(".checked").removeClass("checked"),$(this).addClass("checked"),console.log("set repo owner to uid :",e,$(this).text().trim())}}),$("#auth-button").click(function(e){$("#repo-migrate-auth").slideToggle("fast"),e.preventDefault()}),console.log("initRepoCreate")}function initRepo(){$("#repo-clone-ssh").click(function(){$(this).removeClass("btn-gray").addClass("btn-blue"),$("#repo-clone-https").removeClass("btn-blue").addClass("btn-gray"),$("#repo-clone-url").val($(this).data("link")),$(".clone-url").text($(this).data("link"))}),$("#repo-clone-https").click(function(){$(this).removeClass("btn-gray").addClass("btn-blue"),$("#repo-clone-ssh").removeClass("btn-blue").addClass("btn-gray"),$("#repo-clone-url").val($(this).data("link")),$(".clone-url").text($(this).data("link"))});var e=$("#repo-clone-copy");e.hover(function(){Gogs.bindCopy($(this))}),e.tipsy({fade:!0})}function initHookTypeChange(){$("select#hook-type").on("change",function(){hookTypes=["Gogs","Slack"];var e=$(this).val();hookTypes.forEach(function(t){e===t?$("div#"+t.toLowerCase()).toggleShow():$("div#"+t.toLowerCase()).toggleHide()})})}function initRepoSetting(){var t=$("#repo_name"),n=$("#repo-setting-form");$("#change-reponame-btn").magnificPopup({modal:!0,callbacks:{open:function(){t.data("repo-name")==t.val()&&($.magnificPopup.close(),n.submit())}}}).click(function(){return t.data("repo-name")!=t.val()?(e.preventDefault(),!0):void 0}),$("#change-reponame-submit").click(function(){$.magnificPopup.close(),n.submit()}),initHookTypeChange(),$("#transfer-button").click(function(){$("#transfer-form").show()}),$("#delete-button").click(function(){$("#delete-form").show()}),$("#repo-collab-list hr:last-child").remove();var r=$("#repo-collaborator").next().next().find("ul");$("#repo-collaborator").on("keyup",function(){var e=$(this);return e.val()?void Gogs.searchUsers(e.val(),r):void r.toggleHide()}).on("focus",function(){$(this).val()?r.toggleShow():r.toggleHide()}).next().next().find("ul").on("click","li",function(){$("#repo-collaborator").val($(this).text()),r.toggleHide()})}function initOrgSetting(){var t=$("#orgname"),n=$("#org-setting-form");$("#change-orgname-btn").magnificPopup({modal:!0,callbacks:{open:function(){t.data("orgname")==t.val()&&($.magnificPopup.close(),n.submit())}}}).click(function(){return t.data("orgname")!=t.val()?(e.preventDefault(),!0):void 0}),$("#change-orgname-submit").click(function(){$.magnificPopup.close(),n.submit()}),$("#delete-org-btn").magnificPopup({modal:!0}).click(function(e){return e.preventDefault(),!0}),$("#delete-org-submit").click(function(){$.magnificPopup.close(),$("#delete-org-form").submit()}),initHookTypeChange()}function initInvite(){var e=$("#org-member-invite-list");$("#org-member-invite").on("keyup",function(){var t=$(this);return t.val()?void Gogs.searchUsers(t.val(),e):void e.toggleHide()}).on("focus",function(){$(this).val()?e.toggleShow():e.toggleHide()}).next().next().find("ul").on("click","li",function(){$("#org-member-invite").val($(this).text()),e.toggleHide()})}function initOrgTeamCreate(){$("#org-team-delete").magnificPopup({modal:!0}).click(function(e){return e.preventDefault(),!0}),$("#delete-team-submit").click(function(){$.magnificPopup.close();var e=$("#team-create-form");e.attr("action",e.data("delete-url"))})}function initTeamMembersList(){var e=$("#org-team-members-list");$("#org-team-members-add").on("keyup",function(){var t=$(this);return t.val()?void Gogs.searchUsers(t.val(),e):void e.toggleHide()}).on("focus",function(){$(this).val()?e.toggleShow():e.toggleHide()}).next().next().find("ul").on("click","li",function(){$("#org-team-members-add").val($(this).text()),e.toggleHide()})}function initTeamRepositoriesList(){var e=$("#org-team-repositories-list");$("#org-team-repositories-add").on("keyup",function(){var t=$(this);return t.val()?void Gogs.searchRepos(t.val(),e,"uid="+t.data("uid")):void e.toggleHide()}).on("focus",function(){$(this).val()?e.toggleShow():e.toggleHide()}).next().next().find("ul").on("click","li",function(){$("#org-team-repositories-add").val($(this).text()),e.toggleHide()})}function initAdmin(){$("#login-type").on("change",function(){var e=$(this).val();e.indexOf("0-")+1?($(".auth-name").toggleHide(),$(".pwd").find("input").attr("required","required").end().toggleShow()):($(".pwd").find("input").removeAttr("required").end().toggleHide(),$(".auth-name").toggleShow())}),$("#delete-account-btn").magnificPopup({modal:!0}).click(function(e){return e.preventDefault(),!0}),$("#delete-account-submit").click(function(){$.magnificPopup.close();var e=$("#user-profile-form");e.attr("action",e.data("delete-url"))}),$("#auth-type").on("change",function(){var e=$(this).val();2==e&&($(".ldap").toggleShow(),$(".smtp").toggleHide()),3==e&&($(".smtp").toggleShow(),$(".ldap").toggleHide())}),$("#delete-auth-btn").magnificPopup({modal:!0}).click(function(e){return e.preventDefault(),!0}),$("#delete-auth-submit").click(function(){$.magnificPopup.close();var e=$("#auth-setting-form");e.attr("action",e.data("delete-url"))})}function initInstall(){!function(){var e="127.0.0.1:3306",t="127.0.0.1:5432";$("#install-database").on("change",function(){var n=$(this).val();"SQLite3"!=n?($(".server-sql").show(),$(".sqlite-setting").addClass("hide"),"PostgreSQL"==n?($(".pgsql-setting").removeClass("hide"),$("#database-host").val()==e&&$("#database-host").val(t)):"MySQL"==n?($(".pgsql-setting").addClass("hide"),$("#database-host").val()==t&&$("#database-host").val(e)):$(".pgsql-setting").addClass("hide")):($(".server-sql").hide(),$(".pgsql-setting").hide(),$(".sqlite-setting").removeClass("hide"))})}()}function initProfile(){$("#profile-avatar").tipsy({fade:!0})}function homepage(){$("#promo-form").submit(function(e){return""===$("#username").val()?(e.preventDefault(),window.location.href=Gogs.AppSubUrl+"/user/login",!0):void 0}),$("#register-button").click(function(e){return""===$("#username").val()?(e.preventDefault(),window.location.href=Gogs.AppSubUrl+"/user/sign_up",!0):void $("#promo-form").attr("action",Gogs.AppSubUrl+"/user/sign_up")})}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=ot.type(e);return"function"===n||ot.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(ot.isFunction(t))return ot.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ot.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(pt.test(t))return ot.filter(t,e,n);t=ot.filter(t,e)}return ot.grep(e,function(e){return ot.inArray(e,t)>=0!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t=wt[e]={};return ot.each(e.match(xt)||[],function(e,n){t[n]=!0}),t}function a(){mt.addEventListener?(mt.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(mt.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(mt.addEventListener||"load"===event.type||"complete"===mt.readyState)&&(a(),ot.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace($t,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Tt.test(n)?ot.parseJSON(n):n}catch(i){}ot.data(e,t,n)}else n=void 0}return n}function c(e){var t;for(t in e)if(("data"!==t||!ot.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(e,t,n,r){if(ot.acceptData(e)){var i,o,a=ot.expando,s=e.nodeType,l=s?ot.cache:e,c=s?e[a]:e[a]&&a;if(c&&l[c]&&(r||l[c].data)||void 0!==n||"string"!=typeof t)return c||(c=s?e[a]=V.pop()||ot.guid++:a),l[c]||(l[c]=s?{}:{toJSON:ot.noop}),("object"==typeof t||"function"==typeof t)&&(r?l[c]=ot.extend(l[c],t):l[c].data=ot.extend(l[c].data,t)),o=l[c],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[ot.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[ot.camelCase(t)])):i=o,i}}function d(e,t,n){if(ot.acceptData(e)){var r,i,o=e.nodeType,a=o?ot.cache:e,s=o?e[ot.expando]:ot.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){ot.isArray(t)?t=t.concat(ot.map(t,ot.camelCase)):t in r?t=[t]:(t=ot.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!c(r):!ot.isEmptyObject(r))return}(n||(delete a[s].data,c(a[s])))&&(o?ot.cleanData([e],!0):rt.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function f(){return!0}function p(){return!1}function h(){try{return mt.activeElement}catch(e){}}function m(e){var t=Ht.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,r,i=0,o=typeof e.getElementsByTagName!==St?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==St?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||ot.nodeName(r,t)?o.push(r):ot.merge(o,g(r,t));return void 0===t||t&&ot.nodeName(e,t)?ot.merge([e],o):o}function v(e){jt.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return ot.nodeName(e,"table")&&ot.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function b(e){return e.type=(null!==ot.find.attr(e,"type"))+"/"+e.type,e}function x(e){var t=Zt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function w(e,t){for(var n,r=0;null!=(n=e[r]);r++)ot._data(n,"globalEval",!t||ot._data(t[r],"globalEval"))}function C(e,t){if(1===t.nodeType&&ot.hasData(e)){var n,r,i,o=ot._data(e),a=ot._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)ot.event.add(t,n,s[n][r])}a.data&&(a.data=ot.extend({},a.data))}}function S(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!rt.noCloneEvent&&t[ot.expando]){i=ot._data(t);for(r in i.events)ot.removeEvent(t,r,i.handle);t.removeAttribute(ot.expando)}"script"===n&&t.text!==e.text?(b(t).text=e.text,x(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),rt.html5Clone&&e.innerHTML&&!ot.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&jt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function k(t,n){var r,i=ot(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(r=e.getDefaultComputedStyle(i[0]))?r.display:ot.css(i[0],"display");return i.detach(),o}function T(e){var t=mt,n=Jt[e];return n||(n=k(e,t),"none"!==n&&n||(Kt=(Kt||ot("